##// END OF EJS Templates
Now Works with Python 2 & 3, Qt 4 & 5....
Orochimarufan -
r208:1476f2d2cf46
parent child
Show More
@@ -0,0 +1,16
1 # profile for non-mevis users to link to PythonQt
2
3 include ( python.prf )
4
5 INCLUDEPATH += $$PWD/../src
6
7 # check if debug or release
8 CONFIG(debug, debug|release) {
9 DEBUG_EXT = _d
10 } else {
11 DEBUG_EXT =
12 }
13
14 win32-msvc*:LIBS += $$PWD/../lib/PythonQt$${DEBUG_EXT}.lib
15 win32-g++:LIBS += $$PWD/../lib/libPythonQt$${DEBUG_EXT}.a
16 unix:LIBS += -L$$OUT_PWD/../lib -L$$OUT_PWD/../../lib -lPythonQt$${DEBUG_EXT}
@@ -0,0 +1,13
1 # profile for non-mevis users to link to PythonQt_QtAll
2
3 INCLUDEPATH += $$PWD/../extensions/PythonQt_QtAll
4
5 # check if debug or release
6 CONFIG(debug, debug|release) {
7 DEBUG_EXT = _d
8 } else {
9 DEBUG_EXT =
10 }
11
12 win32::LIBS += $$PWD/../lib/PythonQt_QtAll$${DEBUG_EXT}.lib
13 unix::LIBS += -L$$PWD/../lib -lPythonQt_QtAll$${DEBUG_EXT}
@@ -0,0 +1,23
1
2 # depending on your Qt configuration, you want to enable or disable
3 # one of the release/debug builds (if all three lines are commented,
4 # the default of your Qt installation will used)
5
6 # build with both debug and release mode
7 #CONFIG += debug_and_release build_all
8
9 # build with release mode only
10 #CONFIG += release
11
12 # build with debug mode only
13 #CONFIG += debug
14
15 # for all debug builds, add "_d" extension to target
16 CONFIG(debug, debug|release) {
17 TARGET = $${TARGET}_d
18 }
19 mac {
20 QMAKE_POST_LINK += bash $$PWD/../scripts/osx-fix-dylib.sh
21 }
22
23 #message("Directory - Build-Target: "$$PWD - $$TARGET)
@@ -0,0 +1,43
1 # profile to include and link Python
2
3 # Change this variable to your python version (2.5, 2.6)
4 win32:PYTHON_VERSION=27
5 unix:PYTHON_VERSION=2.7
6
7 macx {
8 # for macx you need to have the Python development kit installed as framework
9 INCLUDEPATH += /System/Library/Frameworks/Python.framework/Headers
10 LIBS += -F/System/Library/Frameworks -framework Python
11 } else:win32 {
12 # for windows install a Python development kit or build Python yourself from the sources
13 # Make sure that you set the environment variable PYTHON_PATH to point to your
14 # python installation (or the python sources/header files when building from source).
15 # Make sure that you set the environment variable PYTHON_LIB to point to
16 # the directory where the python libs are located.
17 #
18 # When using the prebuild Python installer, this will be:
19 # set PYTHON_PATH = c:\Python26
20 # set PYTHON_LIB = c:\Python26\libs
21 #
22 # When using the python sources, this will be something like:
23 # set PYTHON_PATH = c:\yourDir\Python-2.6.1\
24 # set PYTHON_LIB = c:\yourDir\Python-2.6.1\PCbuild8\Win32
25
26 # check if debug or release
27 CONFIG(debug, debug|release) {
28 DEBUG_EXT = _d
29 } else {
30 DEBUG_EXT =
31 }
32
33 win32:INCLUDEPATH += $(PYTHON_PATH)/PC $(PYTHON_PATH)/include
34 win32-msvc*:LIBS += $(PYTHON_LIB)/python$${PYTHON_VERSION}$${DEBUG_EXT}.lib
35 win32-g++:LIBS += $(PYTHON_PATH)/libs/libpython$${PYTHON_VERSION}.a
36
37 } else:unix {
38 # on linux, python-config is used to autodetect Python.
39 # make sure that you have installed a matching python-dev package.
40
41 unix:LIBS += $$system(python$${PYTHON_VERSION}-config --libs)
42 unix:QMAKE_CXXFLAGS += $$system(python$${PYTHON_VERSION}-config --includes)
43 }
@@ -1,142 +1,159
1 1 project(PythonQt)
2 2 cmake_minimum_required(VERSION 2.8.10)
3 3
4 4 include(CTestUseLaunchers OPTIONAL)
5 5
6 6 set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH})
7 7
8 8 #-----------------------------------------------------------------------------
9 9 # Debug
10 10 option(PythonQt_DEBUG "Enable/Disable PythonQt debug output" OFF)
11 11 if(PythonQt_DEBUG)
12 12 add_definitions(-DPYTHONQT_DEBUG)
13 13 else()
14 14 remove_definitions(-DPYTHONQT_DEBUG)
15 15 endif()
16 16
17 17 #-----------------------------------------------------------------------------
18 18 # Qt
19 19 option(PythonQt_Qt5 "Use Qt 5.x (5.1+)" OFF)
20 20 if(PythonQt_Qt5)
21 21 include(PythonQt_Qt_5x)
22 22 else(PythonQt_Qt5)
23 23 include(PythonQt_Qt_4x)
24 24 endif(PythonQt_Qt5)
25 25
26 26 #-----------------------------------------------------------------------------
27 27 # The variable "generated_cpp_suffix" allows to conditionnally compile the generated wrappers
28 28 # associated with the Qt version being used.
29 if(PythonQt_Qt5)
30 set(generated_cpp_suffix "_${Qt5Core_VERSION_MAJOR}${Qt5Core_VERSION_MINOR}")
31 else()
32 set(generated_cpp_suffix "_${QT_VERSION_MAJOR}${QT_VERSION_MINOR}")
33 endif()
29 set(generated_cpp_suffix "_${QT_VERSION_MAJOR}${QT_VERSION_MINOR}")
34 30
35 31 if("${generated_cpp_suffix}" STREQUAL "_48")
36 32 set(generated_cpp_suffix "")
37 33 endif()
38 34 if("${generated_cpp_suffix}" STREQUAL "_46")
39 35 set(generated_cpp_suffix "_47") # Also use 4.7 wrappers for 4.6.x version
40 36 endif()
41 37 if("${generated_cpp_suffix}" STREQUAL "_51")
42 38 set(generated_cpp_suffix "_50")
43 39 endif()
44 40
45 41 #-----------------------------------------------------------------------------
46 42 # Generator
47 43 if(PythonQt_Qt5)
48 44 add_subdirectory(generator_50 EXCLUDE_FROM_ALL)
49 45 add_custom_target(generator)
50 46 add_dependencies(generator pythonqt_generator)
51 47 endif()
52 48
53 49 # TODO
54 50
55 51 #-----------------------------------------------------------------------------
56 52 # Build options
57 53
58 54 #option(PythonQt_Wrap_QtAll "Make all Qt components available in python" OFF)
59 55 #
60 56 #set(qtlibs core gui network opengl sql svg uitools webkit xml xmlpatterns)
61 57 #foreach(qtlib ${qtlibs})
62 58 # OPTION(PythonQt_Wrap_Qt${qtlib} "Make all of Qt${qtlib} available in python" OFF)
63 59 #endforeach()
64 60
65 61 # Force option if it applies
66 62 #if(PythonQt_Wrap_QtAll)
67 63 # list(REMOVE_ITEM qtlibs xmlpatterns) # xmlpatterns wrapper does *NOT* build at all :(
68 64 # foreach(qtlib ${qtlibs})
69 65 # if(NOT ${PythonQt_Wrap_Qt${qtlib}})
70 66 # set(PythonQt_Wrap_Qt${qtlib} ON CACHE BOOL "Make all of Qt${qtlib} available in python" FORCE)
71 67 # message(STATUS "Enabling [PythonQt_Wrap_Qt${qtlib}] because of [PythonQt_Wrap_QtAll] evaluates to True")
72 68 # endif()
73 69 # endforeach()
74 70 #endif()
75 71
76 72 #-----------------------------------------------------------------------------
77 73 # Add extra sources
78 74 #foreach(qtlib core gui network opengl sql svg uitools webkit xml xmlpatterns)
79 75 #
80 76 # if (${PythonQt_Wrap_Qt${qtlib}})
81 77 #
82 78 # ADD_DEFINITIONS(-DPYTHONQT_WRAP_Qt${qtlib})
83 79 #
84 80 # set(file_prefix generated_cpp${generated_cpp_suffix}/com_trolltech_qt_${qtlib}/com_trolltech_qt_${qtlib})
85 81 #
86 82 # foreach(index RANGE 0 11)
87 83 #
88 84 # # Source files
89 85 # if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${file_prefix}${index}.cpp)
90 86 # list(APPEND sources ${file_prefix}${index}.cpp)
91 87 # endif()
92 88 #
93 89 # # Headers that should run through moc
94 90 # if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${file_prefix}${index}.h)
95 91 # list(APPEND moc_sources ${file_prefix}${index}.h)
96 92 # endif()
97 93 #
98 94 # endforeach()
99 95 #
100 96 # list(APPEND sources ${file_prefix}_init.cpp)
101 97 #
102 98 # endif()
103 99 #endforeach()
104 100
105 101 #-----------------------------------------------------------------------------
106 102 # Find Python
107 103 option(PythonQt_Python3 "Use Python 3.x (3.3+)" OFF)
108 104 option(PythonQt_Python "Use specific Python Version" OFF)
109 105 if(PythonQt_Python)
110 106 find_package(Python ${PythonQt_Python} REQUIRED EXACT)
111 107 elseif(PythonQt_Python3)
112 108 find_package(Python 3.3 REQUIRED)
113 109 else()
114 110 find_package(Python 2.6 REQUIRED)
115 111 endif()
116 112
117 113 include_directories(${PYTHON_INCLUDE_DIRS})
118 114 add_definitions(-DPYTHONQT_USE_RELEASE_PYTHON_FALLBACK)
119 115
120 116 #-----------------------------------------------------------------------------
117 # Library Name
118 # The variable PythonQt_LibraryName contains the PythonQt core library name
119 # It incorporates library mayor versions
120 # The variable PythonQt_LibrarySuffix is "" or "_d", if it is a debug build
121 set(PythonQt_LibraryName PythonQt)
122
123 if(PythonQt_Qt5)
124 set(PythonQt_LibraryName ${PythonQt_LibraryName}5)
125 endif()
126
127 if(NOT ${PYTHON_VERSION} VERSION_LESS 3)
128 set(PythonQt_LibraryName ${PythonQt_LibraryName}_3)
129 endif()
130
131 if(${CMAKE_BUILD_TYPE} STREQUAL "Debug")
132 set(PythonQt_LibrarySuffix _d)
133 endif()
134
135 message(STATUS "Building ${PythonQt_LibraryName}${PythonQt_LibrarySuffix} (Qt ${QT_VERSION_MAJOR}.${QT_VERSION_MINOR}.${QT_VERSION_PATCH} + Python ${PYTHON_VERSION} | ${CMAKE_BUILD_TYPE})")
136
137 #-----------------------------------------------------------------------------
121 138 # Core
122 139 add_subdirectory(src)
123 140
124 141 #-----------------------------------------------------------------------------
125 142 # Tests
126 143 add_subdirectory(tests EXCLUDE_FROM_ALL)
127 144 # test alias
128 145 add_custom_target(test COMMAND tests/PythonQtTest WORKING_DIRECTORY ${CURRENT_BINARY_DIR})
129 146 add_dependencies(test PythonQtTest)
130 147
131 148 #-----------------------------------------------------------------------------
132 149 # Extenseions (QtAll)
133 150 add_subdirectory(extensions EXCLUDE_FROM_ALL)
134 151 # QtAll alias
135 152 add_custom_target(QtAll)
136 153 add_dependencies(QtAll PythonQt_QtAll)
137 154
138 155 #-----------------------------------------------------------------------------
139 156 # Examples
140 157 include_directories(src)
141 158 include_directories(extensions/PythonQt_QtAll)
142 159 add_subdirectory(examples EXCLUDE_FROM_ALL)
@@ -1,14 +1,19
1 1 find_package(Qt5Core REQUIRED)
2 2
3 3 # aliases
4 4 macro(qt_use_modules)
5 5 qt5_use_modules(${ARGN})
6 6 endmacro()
7 7
8 8 macro(qt_wrap_cpp)
9 9 qt5_wrap_cpp(${ARGN})
10 10 endmacro()
11 11
12 12 macro(qt_add_resources)
13 13 qt5_add_resources(${ARGN})
14 14 endmacro()
15
16 # version
17 set(QT_VERSION_MAJOR ${Qt5Core_VERSION_MAJOR})
18 set(QT_VERSION_MINOR ${Qt5Core_VERSION_MINOR})
19 set(QT_VERSION_PATCH ${Qt5Core_VERSION_PATCH})
@@ -1,43 +1,61
1 1 project(NicePyConsole)
2 2
3 3 SET(HEADERS
4 4 SimpleConsole.h
5 5 NicePyConsole.h
6 6 PygmentsHighlighter.h
7 7 PythonCompleter.h
8 8 PythonCompleterPopup.h
9 9 )
10 10
11 11 SET(SOURCES
12 12 SimpleConsole.cpp
13 13 NicePyConsole.cpp
14 14 main.cpp
15 15 PygmentsHighlighter.cpp
16 16 PythonCompleter.cpp
17 17 PythonCompleterPopup.cpp
18 18 )
19 19
20 20 SET(FILES
21 21 PygmentsHighlighter.py
22 22 PythonCompleter.py
23 23 module_completion.py
24 24 )
25 25
26 SET(DIRS
27 pygments
28 )
29
26 30 qt_wrap_cpp(GEN_MOC ${HEADERS})
27 31
28 32 add_executable(NicePyConsole ${SOURCES} ${GEN_MOC})
29 33 if(PythonQt_Qt5)
30 34 qt_use_modules(NicePyConsole Core Gui Widgets)
31 35 else()
32 36 qt_use_modules(NicePyConsole Core Gui)
33 37 endif()
34 get_property(PythonQt_lib TARGET PythonQt PROPERTY LOCATION)
35 get_property(PythonQt_QtAll_lib TARGET PythonQt_QtAll PROPERTY LOCATION)
38
39 get_property(PythonQt_lib TARGET ${PythonQt} PROPERTY LOCATION)
40 get_property(PythonQt_QtAll_lib TARGET ${PythonQt_QtAll} PROPERTY LOCATION)
36 41 target_link_libraries(NicePyConsole ${PythonQt_lib} ${PythonQt_QtAll_lib} ${PYTHON_LIBRARIES})
37 42
38 43 foreach(FILE ${FILES})
39 add_custom_command(OUTPUT ${FILE}
40 COMMAND cp "${CMAKE_CURRENT_SOURCE_DIR}/${FILE}" "${CMAKE_CURRENT_BINARY_DIR}/${FILE}"
44 SET(OUT "${CMAKE_CURRENT_BINARY_DIR}/${FILE}")
45 SET(IN "${CMAKE_CURRENT_SOURCE_DIR}/${FILE}")
46 add_custom_command(OUTPUT "${OUT}"
47 COMMAND "${CMAKE_COMMAND}" -E copy "${IN}" "${OUT}"
48 MAIN_DEPENDENCY "${IN}"
49 )
50 add_dependencies(NicePyConsole "${OUT}")
51 endforeach()
52
53 foreach(DIR ${DIRS})
54 SET(OUT "${CMAKE_CURRENT_BINARY_DIR}/${DIR}")
55 SET(IN "${CMAKE_CURRENT_SOURCE_DIR}/${DIR}")
56 add_custom_command(OUTPUT "${OUT}"
57 COMMAND "${CMAKE_COMMAND}" -E copy_directory "${IN}" "${OUT}"
58 MAIN_DEPENDENCY "${IN}"
41 59 )
42 add_dependencies(NicePyConsole ${FILE})
60 add_dependencies(NicePyConsole "${OUT}")
43 61 endforeach()
@@ -1,157 +1,160
1 1 project(PythonQt_QtAll)
2 2
3 SET(GEN ../../generated_cpp${generated_cpp_suffix})
4
5 3 # Bindings
6 4 SET(HEADERS
7 5 PythonQt_QtAll.h
8 6 )
9 7
10 8 SET(SOURCES
11 9 PythonQt_QtAll.cpp
12 10 )
13 11
14 # Core
15 LIST(APPEND HEADERS
16 ${GEN}/com_trolltech_qt_core/com_trolltech_qt_core0.h
17 ${GEN}/com_trolltech_qt_core/com_trolltech_qt_core1.h
18 ${GEN}/com_trolltech_qt_core/com_trolltech_qt_core2.h
19 )
20
21 LIST(APPEND SOURCES
22 ${GEN}/com_trolltech_qt_core/com_trolltech_qt_core0.cpp
23 ${GEN}/com_trolltech_qt_core/com_trolltech_qt_core1.cpp
24 ${GEN}/com_trolltech_qt_core/com_trolltech_qt_core2.cpp
25 ${GEN}/com_trolltech_qt_core/com_trolltech_qt_core_init.cpp
26 )
27
28 # Gui
29 LIST(APPEND HEADERS
30 ${GEN}/com_trolltech_qt_gui/com_trolltech_qt_gui0.h
31 ${GEN}/com_trolltech_qt_gui/com_trolltech_qt_gui1.h
32 ${GEN}/com_trolltech_qt_gui/com_trolltech_qt_gui2.h
33 ${GEN}/com_trolltech_qt_gui/com_trolltech_qt_gui3.h
34 ${GEN}/com_trolltech_qt_gui/com_trolltech_qt_gui4.h
35 ${GEN}/com_trolltech_qt_gui/com_trolltech_qt_gui5.h
36 ${GEN}/com_trolltech_qt_gui/com_trolltech_qt_gui6.h
37 ${GEN}/com_trolltech_qt_gui/com_trolltech_qt_gui7.h
38 ${GEN}/com_trolltech_qt_gui/com_trolltech_qt_gui8.h
39 ${GEN}/com_trolltech_qt_gui/com_trolltech_qt_gui9.h
40 )
41
42 LIST(APPEND SOURCES
43 ${GEN}/com_trolltech_qt_gui/com_trolltech_qt_gui0.cpp
44 ${GEN}/com_trolltech_qt_gui/com_trolltech_qt_gui1.cpp
45 ${GEN}/com_trolltech_qt_gui/com_trolltech_qt_gui2.cpp
46 ${GEN}/com_trolltech_qt_gui/com_trolltech_qt_gui3.cpp
47 ${GEN}/com_trolltech_qt_gui/com_trolltech_qt_gui4.cpp
48 ${GEN}/com_trolltech_qt_gui/com_trolltech_qt_gui5.cpp
49 ${GEN}/com_trolltech_qt_gui/com_trolltech_qt_gui6.cpp
50 ${GEN}/com_trolltech_qt_gui/com_trolltech_qt_gui7.cpp
51 ${GEN}/com_trolltech_qt_gui/com_trolltech_qt_gui8.cpp
52 ${GEN}/com_trolltech_qt_gui/com_trolltech_qt_gui9.cpp
53 ${GEN}/com_trolltech_qt_gui/com_trolltech_qt_gui_init.cpp
54 )
55
56 # Network
57 LIST(APPEND HEADERS
58 ${GEN}/com_trolltech_qt_network/com_trolltech_qt_network0.h
59 )
60
61 LIST(APPEND SOURCES
62 ${GEN}/com_trolltech_qt_network/com_trolltech_qt_network0.cpp
63 ${GEN}/com_trolltech_qt_network/com_trolltech_qt_network_init.cpp
64 )
65
66 # OpenGL
67 LIST(APPEND HEADERS
68 ${GEN}/com_trolltech_qt_opengl/com_trolltech_qt_opengl0.h
69 )
70
71 LIST(APPEND SOURCES
72 ${GEN}/com_trolltech_qt_opengl/com_trolltech_qt_opengl0.cpp
73 ${GEN}/com_trolltech_qt_opengl/com_trolltech_qt_opengl_init.cpp
74 )
75
76 # Sql
77 LIST(APPEND HEADERS
78 ${GEN}/com_trolltech_qt_sql/com_trolltech_qt_sql0.h
79 )
80
81 LIST(APPEND SOURCES
82 ${GEN}/com_trolltech_qt_sql/com_trolltech_qt_sql0.cpp
83 ${GEN}/com_trolltech_qt_sql/com_trolltech_qt_sql_init.cpp
84 )
85
86 # Svg
87 LIST(APPEND HEADERS
88 ${GEN}/com_trolltech_qt_svg/com_trolltech_qt_svg0.h
89 )
90
91 LIST(APPEND SOURCES
92 ${GEN}/com_trolltech_qt_svg/com_trolltech_qt_svg0.cpp
93 ${GEN}/com_trolltech_qt_svg/com_trolltech_qt_svg_init.cpp
94 )
95
96 # uitools
97 LIST(APPEND HEADERS
98 ${GEN}/com_trolltech_qt_uitools/com_trolltech_qt_uitools0.h
99 )
100
101 LIST(APPEND SOURCES
102 ${GEN}/com_trolltech_qt_uitools/com_trolltech_qt_uitools0.cpp
103 ${GEN}/com_trolltech_qt_uitools/com_trolltech_qt_uitools_init.cpp
104 )
105
106 # WebKit
107 LIST(APPEND HEADERS
108 ${GEN}/com_trolltech_qt_webkit/com_trolltech_qt_webkit0.h
109 )
110
111 LIST(APPEND SOURCES
112 ${GEN}/com_trolltech_qt_webkit/com_trolltech_qt_webkit0.cpp
113 ${GEN}/com_trolltech_qt_webkit/com_trolltech_qt_webkit_init.cpp
114 )
115
116 # Xml
117 LIST(APPEND HEADERS
118 ${GEN}/com_trolltech_qt_xml/com_trolltech_qt_xml0.h
119 )
12 #-------------------------------------------------------------------
13 # Generated stuff
14 SET(GEN ../../generated_cpp${generated_cpp_suffix})
120 15
121 LIST(APPEND SOURCES
122 ${GEN}/com_trolltech_qt_xml/com_trolltech_qt_xml0.cpp
123 ${GEN}/com_trolltech_qt_xml/com_trolltech_qt_xml_init.cpp
124 )
16 foreach(MODULE core gui network opengl sql svg uitools webkit xml)
17 SET(MODULE_TROLL com_trolltech_qt_${MODULE})
18 SET(MODULE_BASE ${GEN}/${MODULE_TROLL}/${MODULE_TROLL})
19 FILE(GLOB HFILES ${MODULE_BASE}*.h)
20 FILE(GLOB CFILES ${MODULE_BASE}*.cpp)
21 LIST(APPEND HEADERS ${HFILES})
22 LIST(APPEND SOURCES ${CFILES})
23 endforeach()
24
25 ## Core
26 #LIST(APPEND HEADERS
27 # ${GEN}/com_trolltech_qt_core/com_trolltech_qt_core0.h
28 # ${GEN}/com_trolltech_qt_core/com_trolltech_qt_core1.h
29 # ${GEN}/com_trolltech_qt_core/com_trolltech_qt_core2.h
30 #)
31
32 #LIST(APPEND SOURCES
33 # ${GEN}/com_trolltech_qt_core/com_trolltech_qt_core0.cpp
34 # ${GEN}/com_trolltech_qt_core/com_trolltech_qt_core1.cpp
35 # ${GEN}/com_trolltech_qt_core/com_trolltech_qt_core2.cpp
36 # ${GEN}/com_trolltech_qt_core/com_trolltech_qt_core_init.cpp
37 #)
38
39 ## Gui
40 #LIST(APPEND HEADERS
41 # ${GEN}/com_trolltech_qt_gui/com_trolltech_qt_gui0.h
42 # ${GEN}/com_trolltech_qt_gui/com_trolltech_qt_gui1.h
43 # ${GEN}/com_trolltech_qt_gui/com_trolltech_qt_gui2.h
44 # ${GEN}/com_trolltech_qt_gui/com_trolltech_qt_gui3.h
45 # ${GEN}/com_trolltech_qt_gui/com_trolltech_qt_gui4.h
46 # ${GEN}/com_trolltech_qt_gui/com_trolltech_qt_gui5.h
47 # ${GEN}/com_trolltech_qt_gui/com_trolltech_qt_gui6.h
48 # ${GEN}/com_trolltech_qt_gui/com_trolltech_qt_gui7.h
49 # ${GEN}/com_trolltech_qt_gui/com_trolltech_qt_gui8.h
50 # ${GEN}/com_trolltech_qt_gui/com_trolltech_qt_gui9.h
51 #)
52
53 #LIST(APPEND SOURCES
54 # ${GEN}/com_trolltech_qt_gui/com_trolltech_qt_gui0.cpp
55 # ${GEN}/com_trolltech_qt_gui/com_trolltech_qt_gui1.cpp
56 # ${GEN}/com_trolltech_qt_gui/com_trolltech_qt_gui2.cpp
57 # ${GEN}/com_trolltech_qt_gui/com_trolltech_qt_gui3.cpp
58 # ${GEN}/com_trolltech_qt_gui/com_trolltech_qt_gui4.cpp
59 # ${GEN}/com_trolltech_qt_gui/com_trolltech_qt_gui5.cpp
60 # ${GEN}/com_trolltech_qt_gui/com_trolltech_qt_gui6.cpp
61 # ${GEN}/com_trolltech_qt_gui/com_trolltech_qt_gui7.cpp
62 # ${GEN}/com_trolltech_qt_gui/com_trolltech_qt_gui8.cpp
63 # ${GEN}/com_trolltech_qt_gui/com_trolltech_qt_gui9.cpp
64 # ${GEN}/com_trolltech_qt_gui/com_trolltech_qt_gui_init.cpp
65 #)
66
67 ## Network
68 #LIST(APPEND HEADERS
69 # ${GEN}/com_trolltech_qt_network/com_trolltech_qt_network0.h
70 #)
71
72 #LIST(APPEND SOURCES
73 # ${GEN}/com_trolltech_qt_network/com_trolltech_qt_network0.cpp
74 # ${GEN}/com_trolltech_qt_network/com_trolltech_qt_network_init.cpp
75 #)
76
77 ## OpenGL
78 #LIST(APPEND HEADERS
79 # ${GEN}/com_trolltech_qt_opengl/com_trolltech_qt_opengl0.h
80 #)
81
82 #LIST(APPEND SOURCES
83 # ${GEN}/com_trolltech_qt_opengl/com_trolltech_qt_opengl0.cpp
84 # ${GEN}/com_trolltech_qt_opengl/com_trolltech_qt_opengl_init.cpp
85 #)
86
87 ## Sql
88 #LIST(APPEND HEADERS
89 # ${GEN}/com_trolltech_qt_sql/com_trolltech_qt_sql0.h
90 #)
91
92 #LIST(APPEND SOURCES
93 # ${GEN}/com_trolltech_qt_sql/com_trolltech_qt_sql0.cpp
94 # ${GEN}/com_trolltech_qt_sql/com_trolltech_qt_sql_init.cpp
95 #)
96
97 ## Svg
98 #LIST(APPEND HEADERS
99 # ${GEN}/com_trolltech_qt_svg/com_trolltech_qt_svg0.h
100 #)
101
102 #LIST(APPEND SOURCES
103 # ${GEN}/com_trolltech_qt_svg/com_trolltech_qt_svg0.cpp
104 # ${GEN}/com_trolltech_qt_svg/com_trolltech_qt_svg_init.cpp
105 #)
106
107 ## uitools
108 #LIST(APPEND HEADERS
109 # ${GEN}/com_trolltech_qt_uitools/com_trolltech_qt_uitools0.h
110 #)
111
112 #LIST(APPEND SOURCES
113 # ${GEN}/com_trolltech_qt_uitools/com_trolltech_qt_uitools0.cpp
114 # ${GEN}/com_trolltech_qt_uitools/com_trolltech_qt_uitools_init.cpp
115 #)
116
117 ## WebKit
118 #LIST(APPEND HEADERS
119 # ${GEN}/com_trolltech_qt_webkit/com_trolltech_qt_webkit0.h
120 #)
121
122 #LIST(APPEND SOURCES
123 # ${GEN}/com_trolltech_qt_webkit/com_trolltech_qt_webkit0.cpp
124 # ${GEN}/com_trolltech_qt_webkit/com_trolltech_qt_webkit_init.cpp
125 #)
126
127 ## Xml
128 #LIST(APPEND HEADERS
129 # ${GEN}/com_trolltech_qt_xml/com_trolltech_qt_xml0.h
130 #)
131
132 #LIST(APPEND SOURCES
133 # ${GEN}/com_trolltech_qt_xml/com_trolltech_qt_xml0.cpp
134 # ${GEN}/com_trolltech_qt_xml/com_trolltech_qt_xml_init.cpp
135 #)
125 136
126 137 #-------------------------------------------------------------------
127 138 # Build
139 set(PythonQt_QtAll ${PythonQt_LibraryName}_QtAll${PythonQt_LibrarySuffix} CACHE INTERNAL "")
128 140
129 141 include_directories(../../src)
130 142 add_definitions(-DPYTHONQT_QTALL_EXPORTS)
131 143 qt_wrap_cpp(GEN_MOC ${HEADERS})
132 144
133 SET(QT
134 Core
135 Gui
136 Network
137 OpenGL
138 Sql
139 Svg
140 UiTools
141 WebKit
142 Xml
143 )
144
145 SET(QT Core Gui Network OpenGL Sql Svg UiTools WebKit Xml)
145 146 if(PythonQt_Qt5)
146 LIST(APPEND QT
147 Widgets
148 WebKitWidgets
149 )
147 LIST(APPEND QT Widgets WebKitWidgets)
150 148 endif()
151 149
152 150
153 add_library(PythonQt_QtAll SHARED ${SOURCES} ${GEN_MOC})
154 qt_use_modules(PythonQt_QtAll ${QT})
151 add_library(${PythonQt_QtAll} SHARED ${SOURCES} ${GEN_MOC})
152 qt_use_modules(${PythonQt_QtAll} ${QT})
153
154 get_property(PythonQt_lib TARGET ${PythonQt} PROPERTY LOCATION)
155 target_link_libraries(${PythonQt_QtAll} ${PythonQt_lib} ${PYTHON_LIBRARIES})
155 156
156 get_property(PythonQt_lib TARGET PythonQt PROPERTY LOCATION)
157 target_link_libraries(PythonQt_QtAll ${PythonQt_lib} ${PYTHON_LIBRARIES})
157 install(TARGETS ${PythonQt_QtAll}
158 RUNTIME DESTINATION bin
159 LIBRARY DESTINATION lib
160 ARCHIVE DESTINATION lib)
@@ -1,1258 +1,1262
1 1 #include <PythonQt.h>
2 2 #include <QDate>
3 3 #include <QNoImplicitBoolCast>
4 4 #include <QObject>
5 5 #include <QStringList>
6 6 #include <QTextDocument>
7 7 #include <QVariant>
8 8 #include <qbitarray.h>
9 9 #include <qbytearray.h>
10 10 #include <qdatastream.h>
11 11 #include <qdatetime.h>
12 12 #include <qline.h>
13 13 #include <qlist.h>
14 14 #include <qlocale.h>
15 15 #include <qmatrix.h>
16 16 #include <qmatrix4x4.h>
17 17 #include <qnamespace.h>
18 18 #include <qpair.h>
19 19 #include <qpoint.h>
20 20 #include <qrect.h>
21 21 #include <qregexp.h>
22 22 #include <qsize.h>
23 23 #include <qstringlist.h>
24 24 #include <qtextcodec.h>
25 25 #include <qtransform.h>
26 26 #include <qurl.h>
27 27
28 28
29 29
30 30 class PythonQtWrapper_QBitArray : public QObject
31 31 { Q_OBJECT
32 32 public:
33 33 public Q_SLOTS:
34 34 QBitArray* new_QBitArray();
35 35 QBitArray* new_QBitArray(const QBitArray& other);
36 36 QBitArray* new_QBitArray(int size, bool val = false);
37 37 void delete_QBitArray(QBitArray* obj) { delete obj; }
38 38 bool at(QBitArray* theWrappedObject, int i) const;
39 39 void clear(QBitArray* theWrappedObject);
40 40 void clearBit(QBitArray* theWrappedObject, int i);
41 41 int count(QBitArray* theWrappedObject) const;
42 42 int count(QBitArray* theWrappedObject, bool on) const;
43 43 void fill(QBitArray* theWrappedObject, bool val, int first, int last);
44 44 bool fill(QBitArray* theWrappedObject, bool val, int size = -1);
45 45 bool isEmpty(QBitArray* theWrappedObject) const;
46 46 bool isNull(QBitArray* theWrappedObject) const;
47 47 bool __ne__(QBitArray* theWrappedObject, const QBitArray& a) const;
48 48 QBitArray __and__(QBitArray* theWrappedObject, const QBitArray& arg__2);
49 49 QBitArray* __iand__(QBitArray* theWrappedObject, const QBitArray& arg__1);
50 50 void writeTo(QBitArray* theWrappedObject, QDataStream& arg__1);
51 51 QBitArray* operator_assign(QBitArray* theWrappedObject, const QBitArray& other);
52 52 bool __eq__(QBitArray* theWrappedObject, const QBitArray& a) const;
53 53 void readFrom(QBitArray* theWrappedObject, QDataStream& arg__1);
54 54 QBitArray __xor__(QBitArray* theWrappedObject, const QBitArray& arg__2);
55 55 QBitArray* __ixor__(QBitArray* theWrappedObject, const QBitArray& arg__1);
56 56 QBitArray __or__(QBitArray* theWrappedObject, const QBitArray& arg__2);
57 57 QBitArray* __ior__(QBitArray* theWrappedObject, const QBitArray& arg__1);
58 58 QBitArray __invert__(QBitArray* theWrappedObject) const;
59 59 void resize(QBitArray* theWrappedObject, int size);
60 60 void setBit(QBitArray* theWrappedObject, int i);
61 61 void setBit(QBitArray* theWrappedObject, int i, bool val);
62 62 int size(QBitArray* theWrappedObject) const;
63 63 void swap(QBitArray* theWrappedObject, QBitArray& other);
64 64 bool testBit(QBitArray* theWrappedObject, int i) const;
65 65 bool toggleBit(QBitArray* theWrappedObject, int i);
66 66 void truncate(QBitArray* theWrappedObject, int pos);
67 67 bool __nonzero__(QBitArray* obj) { return !obj->isNull(); }
68 68 };
69 69
70 70
71 71
72 72
73 73
74 74 class PythonQtWrapper_QByteArray : public QObject
75 75 { Q_OBJECT
76 76 public:
77 77 public Q_SLOTS:
78 78 QByteArray* new_QByteArray();
79 79 QByteArray* new_QByteArray(const QByteArray& arg__1);
80 80 QByteArray* new_QByteArray(int size, char c);
81 81 void delete_QByteArray(QByteArray* obj) { delete obj; }
82 82 QByteArray* append(QByteArray* theWrappedObject, char c);
83 83 QByteArray* append(QByteArray* theWrappedObject, const QByteArray& a);
84 84 QByteArray* append(QByteArray* theWrappedObject, const QString& s);
85 85 QByteArray* append(QByteArray* theWrappedObject, const char* s, int len);
86 86 char at(QByteArray* theWrappedObject, int i) const;
87 87 int capacity(QByteArray* theWrappedObject) const;
88 88 void chop(QByteArray* theWrappedObject, int n);
89 89 void clear(QByteArray* theWrappedObject);
90 90 QBool contains(QByteArray* theWrappedObject, char c) const;
91 91 QBool contains(QByteArray* theWrappedObject, const QByteArray& a) const;
92 92 QBool contains(QByteArray* theWrappedObject, const char* a) const;
93 93 int count(QByteArray* theWrappedObject, char c) const;
94 94 int count(QByteArray* theWrappedObject, const QByteArray& a) const;
95 95 bool endsWith(QByteArray* theWrappedObject, char c) const;
96 96 bool endsWith(QByteArray* theWrappedObject, const QByteArray& a) const;
97 97 QByteArray* fill(QByteArray* theWrappedObject, char c, int size = -1);
98 98 QByteArray static_QByteArray_fromBase64(const QByteArray& base64);
99 99 QByteArray static_QByteArray_fromHex(const QByteArray& hexEncoded);
100 100 QByteArray static_QByteArray_fromPercentEncoding(const QByteArray& pctEncoded, char percent = '%');
101 101 int indexOf(QByteArray* theWrappedObject, char c, int from = 0) const;
102 102 int indexOf(QByteArray* theWrappedObject, const QByteArray& a, int from = 0) const;
103 103 int indexOf(QByteArray* theWrappedObject, const QString& s, int from = 0) const;
104 104 QByteArray* insert(QByteArray* theWrappedObject, int i, char c);
105 105 QByteArray* insert(QByteArray* theWrappedObject, int i, const QByteArray& a);
106 106 QByteArray* insert(QByteArray* theWrappedObject, int i, const QString& s);
107 107 QByteArray* insert(QByteArray* theWrappedObject, int i, const char* s, int len);
108 108 bool isEmpty(QByteArray* theWrappedObject) const;
109 109 bool isNull(QByteArray* theWrappedObject) const;
110 110 bool isSharedWith(QByteArray* theWrappedObject, const QByteArray& other) const;
111 111 int lastIndexOf(QByteArray* theWrappedObject, char c, int from = -1) const;
112 112 int lastIndexOf(QByteArray* theWrappedObject, const QByteArray& a, int from = -1) const;
113 113 int lastIndexOf(QByteArray* theWrappedObject, const QString& s, int from = -1) const;
114 114 QByteArray left(QByteArray* theWrappedObject, int len) const;
115 115 QByteArray leftJustified(QByteArray* theWrappedObject, int width, char fill = ' ', bool truncate = false) const;
116 116 int length(QByteArray* theWrappedObject) const;
117 117 QByteArray mid(QByteArray* theWrappedObject, int index, int len = -1) const;
118 118 QByteArray static_QByteArray_number(double arg__1, char f = 'g', int prec = 6);
119 119 QByteArray static_QByteArray_number(int arg__1, int base = 10);
120 120 QByteArray static_QByteArray_number(qlonglong arg__1, int base = 10);
121 121 QByteArray static_QByteArray_number(qulonglong arg__1, int base = 10);
122 122 const QByteArray __add__(QByteArray* theWrappedObject, char a2);
123 123 const QByteArray __add__(QByteArray* theWrappedObject, const QByteArray& a2);
124 124 const QString __add__(QByteArray* theWrappedObject, const QString& s);
125 125 const QByteArray __add__(QByteArray* theWrappedObject, const char* a2);
126 126 QByteArray* __iadd__(QByteArray* theWrappedObject, const QByteArray& a);
127 127 bool __lt__(QByteArray* theWrappedObject, const QByteArray& a2);
128 128 bool __lt__(QByteArray* theWrappedObject, const QString& s2) const;
129 129 void writeTo(QByteArray* theWrappedObject, QDataStream& arg__1);
130 130 bool __le__(QByteArray* theWrappedObject, const QByteArray& a2);
131 131 bool __le__(QByteArray* theWrappedObject, const QString& s2) const;
132 132 QByteArray* operator_assign(QByteArray* theWrappedObject, const QByteArray& arg__1);
133 133 bool __eq__(QByteArray* theWrappedObject, const QByteArray& a2);
134 134 bool __eq__(QByteArray* theWrappedObject, const QString& s2) const;
135 135 bool __gt__(QByteArray* theWrappedObject, const QByteArray& a2);
136 136 bool __gt__(QByteArray* theWrappedObject, const QString& s2) const;
137 137 bool __ge__(QByteArray* theWrappedObject, const QByteArray& a2);
138 138 bool __ge__(QByteArray* theWrappedObject, const QString& s2) const;
139 139 void readFrom(QByteArray* theWrappedObject, QDataStream& arg__1);
140 140 QByteArray* prepend(QByteArray* theWrappedObject, char c);
141 141 QByteArray* prepend(QByteArray* theWrappedObject, const QByteArray& a);
142 142 QByteArray* prepend(QByteArray* theWrappedObject, const char* s, int len);
143 143 void push_back(QByteArray* theWrappedObject, const QByteArray& a);
144 144 void push_front(QByteArray* theWrappedObject, const QByteArray& a);
145 145 QByteArray* remove(QByteArray* theWrappedObject, int index, int len);
146 146 QByteArray repeated(QByteArray* theWrappedObject, int times) const;
147 147 QByteArray* replace(QByteArray* theWrappedObject, char before, char after);
148 148 QByteArray* replace(QByteArray* theWrappedObject, char before, const QByteArray& after);
149 149 QByteArray* replace(QByteArray* theWrappedObject, char c, const QString& after);
150 150 QByteArray* replace(QByteArray* theWrappedObject, const QByteArray& before, const QByteArray& after);
151 151 QByteArray* replace(QByteArray* theWrappedObject, const QString& before, const QByteArray& after);
152 152 QByteArray* replace(QByteArray* theWrappedObject, const char* before, int bsize, const char* after, int asize);
153 153 QByteArray* replace(QByteArray* theWrappedObject, int index, int len, const QByteArray& s);
154 154 QByteArray* replace(QByteArray* theWrappedObject, int index, int len, const char* s, int alen);
155 155 void reserve(QByteArray* theWrappedObject, int size);
156 156 void resize(QByteArray* theWrappedObject, int size);
157 157 QByteArray right(QByteArray* theWrappedObject, int len) const;
158 158 QByteArray rightJustified(QByteArray* theWrappedObject, int width, char fill = ' ', bool truncate = false) const;
159 159 QByteArray* setNum(QByteArray* theWrappedObject, double arg__1, char f = 'g', int prec = 6);
160 160 QByteArray* setNum(QByteArray* theWrappedObject, float arg__1, char f = 'g', int prec = 6);
161 161 QByteArray* setNum(QByteArray* theWrappedObject, int arg__1, int base = 10);
162 162 QByteArray* setNum(QByteArray* theWrappedObject, qlonglong arg__1, int base = 10);
163 163 QByteArray* setNum(QByteArray* theWrappedObject, qulonglong arg__1, int base = 10);
164 164 QByteArray* setNum(QByteArray* theWrappedObject, short arg__1, int base = 10);
165 165 QByteArray* setNum(QByteArray* theWrappedObject, ushort arg__1, int base = 10);
166 166 QByteArray* setRawData(QByteArray* theWrappedObject, const char* a, uint n);
167 167 QByteArray simplified(QByteArray* theWrappedObject) const;
168 168 int size(QByteArray* theWrappedObject) const;
169 169 QList<QByteArray > split(QByteArray* theWrappedObject, char sep) const;
170 170 void squeeze(QByteArray* theWrappedObject);
171 171 bool startsWith(QByteArray* theWrappedObject, char c) const;
172 172 bool startsWith(QByteArray* theWrappedObject, const QByteArray& a) const;
173 173 void swap(QByteArray* theWrappedObject, QByteArray& other);
174 174 QByteArray toBase64(QByteArray* theWrappedObject) const;
175 175 double toDouble(QByteArray* theWrappedObject, bool* ok = 0) const;
176 176 float toFloat(QByteArray* theWrappedObject, bool* ok = 0) const;
177 177 QByteArray toHex(QByteArray* theWrappedObject) const;
178 178 int toInt(QByteArray* theWrappedObject, bool* ok = 0, int base = 10) const;
179 179 QByteArray toLower(QByteArray* theWrappedObject) const;
180 180 QByteArray toPercentEncoding(QByteArray* theWrappedObject, const QByteArray& exclude = QByteArray(), const QByteArray& include = QByteArray(), char percent = '%') const;
181 181 ushort toUShort(QByteArray* theWrappedObject, bool* ok = 0, int base = 10) const;
182 182 QByteArray toUpper(QByteArray* theWrappedObject) const;
183 183 QByteArray trimmed(QByteArray* theWrappedObject) const;
184 184 void truncate(QByteArray* theWrappedObject, int pos);
185 185 bool __nonzero__(QByteArray* obj) { return !obj->isNull(); }
186 186
187 187 PyObject* data(QByteArray* b) {
188 188 if (b->data()) {
189 #ifdef PY3K
190 return PyUnicode_FromStringAndSize(b->data(), b->size());
191 #else
189 192 return PyString_FromStringAndSize(b->data(), b->size());
193 #endif
190 194 } else {
191 195 Py_INCREF(Py_None);
192 196 return Py_None;
193 197 }
194 198 }
195 199
196 200 };
197 201
198 202
199 203
200 204
201 205
202 206 class PythonQtWrapper_QDate : public QObject
203 207 { Q_OBJECT
204 208 public:
205 209 Q_ENUMS(MonthNameType )
206 210 enum MonthNameType{
207 211 DateFormat = QDate::DateFormat, StandaloneFormat = QDate::StandaloneFormat};
208 212 public Q_SLOTS:
209 213 QDate* new_QDate();
210 214 QDate* new_QDate(int y, int m, int d);
211 215 QDate* new_QDate(const QDate& other) {
212 216 QDate* a = new QDate();
213 217 *((QDate*)a) = other;
214 218 return a; }
215 219 void delete_QDate(QDate* obj) { delete obj; }
216 220 QDate addDays(QDate* theWrappedObject, int days) const;
217 221 QDate addMonths(QDate* theWrappedObject, int months) const;
218 222 QDate addYears(QDate* theWrappedObject, int years) const;
219 223 QDate static_QDate_currentDate();
220 224 int day(QDate* theWrappedObject) const;
221 225 int dayOfWeek(QDate* theWrappedObject) const;
222 226 int dayOfYear(QDate* theWrappedObject) const;
223 227 int daysInMonth(QDate* theWrappedObject) const;
224 228 int daysInYear(QDate* theWrappedObject) const;
225 229 int daysTo(QDate* theWrappedObject, const QDate& arg__1) const;
226 230 QDate static_QDate_fromJulianDay(int jd);
227 231 QDate static_QDate_fromString(const QString& s, Qt::DateFormat f = Qt::TextDate);
228 232 QDate static_QDate_fromString(const QString& s, const QString& format);
229 233 void getDate(QDate* theWrappedObject, int* year, int* month, int* day);
230 234 uint static_QDate_gregorianToJulian(int y, int m, int d);
231 235 bool static_QDate_isLeapYear(int year);
232 236 bool isNull(QDate* theWrappedObject) const;
233 237 bool isValid(QDate* theWrappedObject) const;
234 238 bool static_QDate_isValid(int y, int m, int d);
235 239 QString static_QDate_longDayName(int weekday);
236 240 QString static_QDate_longDayName(int weekday, QDate::MonthNameType type);
237 241 QString static_QDate_longMonthName(int month);
238 242 QString static_QDate_longMonthName(int month, QDate::MonthNameType type);
239 243 int month(QDate* theWrappedObject) const;
240 244 bool __ne__(QDate* theWrappedObject, const QDate& other) const;
241 245 bool __lt__(QDate* theWrappedObject, const QDate& other) const;
242 246 void writeTo(QDate* theWrappedObject, QDataStream& arg__1);
243 247 bool __le__(QDate* theWrappedObject, const QDate& other) const;
244 248 bool __eq__(QDate* theWrappedObject, const QDate& other) const;
245 249 bool __gt__(QDate* theWrappedObject, const QDate& other) const;
246 250 bool __ge__(QDate* theWrappedObject, const QDate& other) const;
247 251 void readFrom(QDate* theWrappedObject, QDataStream& arg__1);
248 252 bool setDate(QDate* theWrappedObject, int year, int month, int day);
249 253 QString static_QDate_shortDayName(int weekday);
250 254 QString static_QDate_shortDayName(int weekday, QDate::MonthNameType type);
251 255 QString static_QDate_shortMonthName(int month);
252 256 QString static_QDate_shortMonthName(int month, QDate::MonthNameType type);
253 257 int toJulianDay(QDate* theWrappedObject) const;
254 258 QString toString(QDate* theWrappedObject, Qt::DateFormat f = Qt::TextDate) const;
255 259 QString toString(QDate* theWrappedObject, const QString& format) const;
256 260 int weekNumber(QDate* theWrappedObject, int* yearNum = 0) const;
257 261 int year(QDate* theWrappedObject) const;
258 262 QString py_toString(QDate*);
259 263 bool __nonzero__(QDate* obj) { return !obj->isNull(); }
260 264 };
261 265
262 266
263 267
264 268
265 269
266 270 class PythonQtWrapper_QDateTime : public QObject
267 271 { Q_OBJECT
268 272 public:
269 273 public Q_SLOTS:
270 274 QDateTime* new_QDateTime();
271 275 QDateTime* new_QDateTime(const QDate& arg__1);
272 276 QDateTime* new_QDateTime(const QDate& arg__1, const QTime& arg__2, Qt::TimeSpec spec = Qt::LocalTime);
273 277 QDateTime* new_QDateTime(const QDateTime& other);
274 278 void delete_QDateTime(QDateTime* obj) { delete obj; }
275 279 QDateTime addDays(QDateTime* theWrappedObject, int days) const;
276 280 QDateTime addMSecs(QDateTime* theWrappedObject, qint64 msecs) const;
277 281 QDateTime addMonths(QDateTime* theWrappedObject, int months) const;
278 282 QDateTime addSecs(QDateTime* theWrappedObject, int secs) const;
279 283 QDateTime addYears(QDateTime* theWrappedObject, int years) const;
280 284 QDateTime static_QDateTime_currentDateTime();
281 285 QDateTime static_QDateTime_currentDateTimeUtc();
282 286 qint64 static_QDateTime_currentMSecsSinceEpoch();
283 287 QDate date(QDateTime* theWrappedObject) const;
284 288 int daysTo(QDateTime* theWrappedObject, const QDateTime& arg__1) const;
285 289 QDateTime static_QDateTime_fromMSecsSinceEpoch(qint64 msecs);
286 290 QDateTime static_QDateTime_fromString(const QString& s, Qt::DateFormat f = Qt::TextDate);
287 291 QDateTime static_QDateTime_fromString(const QString& s, const QString& format);
288 292 QDateTime static_QDateTime_fromTime_t(uint secsSince1Jan1970UTC);
289 293 bool isNull(QDateTime* theWrappedObject) const;
290 294 bool isValid(QDateTime* theWrappedObject) const;
291 295 qint64 msecsTo(QDateTime* theWrappedObject, const QDateTime& arg__1) const;
292 296 bool __ne__(QDateTime* theWrappedObject, const QDateTime& other) const;
293 297 bool __lt__(QDateTime* theWrappedObject, const QDateTime& other) const;
294 298 void writeTo(QDateTime* theWrappedObject, QDataStream& arg__1);
295 299 bool __le__(QDateTime* theWrappedObject, const QDateTime& other) const;
296 300 bool __eq__(QDateTime* theWrappedObject, const QDateTime& other) const;
297 301 bool __gt__(QDateTime* theWrappedObject, const QDateTime& other) const;
298 302 bool __ge__(QDateTime* theWrappedObject, const QDateTime& other) const;
299 303 void readFrom(QDateTime* theWrappedObject, QDataStream& arg__1);
300 304 int secsTo(QDateTime* theWrappedObject, const QDateTime& arg__1) const;
301 305 void setDate(QDateTime* theWrappedObject, const QDate& date);
302 306 void setMSecsSinceEpoch(QDateTime* theWrappedObject, qint64 msecs);
303 307 void setTime(QDateTime* theWrappedObject, const QTime& time);
304 308 void setTimeSpec(QDateTime* theWrappedObject, Qt::TimeSpec spec);
305 309 void setTime_t(QDateTime* theWrappedObject, uint secsSince1Jan1970UTC);
306 310 void setUtcOffset(QDateTime* theWrappedObject, int seconds);
307 311 QTime time(QDateTime* theWrappedObject) const;
308 312 Qt::TimeSpec timeSpec(QDateTime* theWrappedObject) const;
309 313 QDateTime toLocalTime(QDateTime* theWrappedObject) const;
310 314 qint64 toMSecsSinceEpoch(QDateTime* theWrappedObject) const;
311 315 QString toString(QDateTime* theWrappedObject, Qt::DateFormat f = Qt::TextDate) const;
312 316 QString toString(QDateTime* theWrappedObject, const QString& format) const;
313 317 QDateTime toTimeSpec(QDateTime* theWrappedObject, Qt::TimeSpec spec) const;
314 318 uint toTime_t(QDateTime* theWrappedObject) const;
315 319 QDateTime toUTC(QDateTime* theWrappedObject) const;
316 320 int utcOffset(QDateTime* theWrappedObject) const;
317 321 QString py_toString(QDateTime*);
318 322 bool __nonzero__(QDateTime* obj) { return !obj->isNull(); }
319 323 };
320 324
321 325
322 326
323 327
324 328
325 329 class PythonQtWrapper_QLine : public QObject
326 330 { Q_OBJECT
327 331 public:
328 332 public Q_SLOTS:
329 333 QLine* new_QLine();
330 334 QLine* new_QLine(const QPoint& pt1, const QPoint& pt2);
331 335 QLine* new_QLine(int x1, int y1, int x2, int y2);
332 336 QLine* new_QLine(const QLine& other) {
333 337 QLine* a = new QLine();
334 338 *((QLine*)a) = other;
335 339 return a; }
336 340 void delete_QLine(QLine* obj) { delete obj; }
337 341 int dx(QLine* theWrappedObject) const;
338 342 int dy(QLine* theWrappedObject) const;
339 343 bool isNull(QLine* theWrappedObject) const;
340 344 bool __ne__(QLine* theWrappedObject, const QLine& d) const;
341 345 QLine __mul__(QLine* theWrappedObject, const QMatrix& m);
342 346 QLine __mul__(QLine* theWrappedObject, const QTransform& m);
343 347 void writeTo(QLine* theWrappedObject, QDataStream& arg__1);
344 348 bool __eq__(QLine* theWrappedObject, const QLine& d) const;
345 349 void readFrom(QLine* theWrappedObject, QDataStream& arg__1);
346 350 QPoint p1(QLine* theWrappedObject) const;
347 351 QPoint p2(QLine* theWrappedObject) const;
348 352 void setLine(QLine* theWrappedObject, int x1, int y1, int x2, int y2);
349 353 void setP1(QLine* theWrappedObject, const QPoint& p1);
350 354 void setP2(QLine* theWrappedObject, const QPoint& p2);
351 355 void setPoints(QLine* theWrappedObject, const QPoint& p1, const QPoint& p2);
352 356 void translate(QLine* theWrappedObject, const QPoint& p);
353 357 void translate(QLine* theWrappedObject, int dx, int dy);
354 358 QLine translated(QLine* theWrappedObject, const QPoint& p) const;
355 359 QLine translated(QLine* theWrappedObject, int dx, int dy) const;
356 360 int x1(QLine* theWrappedObject) const;
357 361 int x2(QLine* theWrappedObject) const;
358 362 int y1(QLine* theWrappedObject) const;
359 363 int y2(QLine* theWrappedObject) const;
360 364 QString py_toString(QLine*);
361 365 bool __nonzero__(QLine* obj) { return !obj->isNull(); }
362 366 };
363 367
364 368
365 369
366 370
367 371
368 372 class PythonQtWrapper_QLineF : public QObject
369 373 { Q_OBJECT
370 374 public:
371 375 Q_ENUMS(IntersectType )
372 376 enum IntersectType{
373 377 NoIntersection = QLineF::NoIntersection, BoundedIntersection = QLineF::BoundedIntersection, UnboundedIntersection = QLineF::UnboundedIntersection};
374 378 public Q_SLOTS:
375 379 QLineF* new_QLineF();
376 380 QLineF* new_QLineF(const QLine& line);
377 381 QLineF* new_QLineF(const QPointF& pt1, const QPointF& pt2);
378 382 QLineF* new_QLineF(qreal x1, qreal y1, qreal x2, qreal y2);
379 383 QLineF* new_QLineF(const QLineF& other) {
380 384 QLineF* a = new QLineF();
381 385 *((QLineF*)a) = other;
382 386 return a; }
383 387 void delete_QLineF(QLineF* obj) { delete obj; }
384 388 qreal angle(QLineF* theWrappedObject) const;
385 389 qreal angle(QLineF* theWrappedObject, const QLineF& l) const;
386 390 qreal angleTo(QLineF* theWrappedObject, const QLineF& l) const;
387 391 qreal dx(QLineF* theWrappedObject) const;
388 392 qreal dy(QLineF* theWrappedObject) const;
389 393 QLineF static_QLineF_fromPolar(qreal length, qreal angle);
390 394 QLineF::IntersectType intersect(QLineF* theWrappedObject, const QLineF& l, QPointF* intersectionPoint) const;
391 395 bool isNull(QLineF* theWrappedObject) const;
392 396 qreal length(QLineF* theWrappedObject) const;
393 397 QLineF normalVector(QLineF* theWrappedObject) const;
394 398 bool __ne__(QLineF* theWrappedObject, const QLineF& d) const;
395 399 QLineF __mul__(QLineF* theWrappedObject, const QMatrix& m);
396 400 QLineF __mul__(QLineF* theWrappedObject, const QTransform& m);
397 401 void writeTo(QLineF* theWrappedObject, QDataStream& arg__1);
398 402 bool __eq__(QLineF* theWrappedObject, const QLineF& d) const;
399 403 void readFrom(QLineF* theWrappedObject, QDataStream& arg__1);
400 404 QPointF p1(QLineF* theWrappedObject) const;
401 405 QPointF p2(QLineF* theWrappedObject) const;
402 406 QPointF pointAt(QLineF* theWrappedObject, qreal t) const;
403 407 void setAngle(QLineF* theWrappedObject, qreal angle);
404 408 void setLength(QLineF* theWrappedObject, qreal len);
405 409 void setLine(QLineF* theWrappedObject, qreal x1, qreal y1, qreal x2, qreal y2);
406 410 void setP1(QLineF* theWrappedObject, const QPointF& p1);
407 411 void setP2(QLineF* theWrappedObject, const QPointF& p2);
408 412 void setPoints(QLineF* theWrappedObject, const QPointF& p1, const QPointF& p2);
409 413 QLine toLine(QLineF* theWrappedObject) const;
410 414 void translate(QLineF* theWrappedObject, const QPointF& p);
411 415 void translate(QLineF* theWrappedObject, qreal dx, qreal dy);
412 416 QLineF translated(QLineF* theWrappedObject, const QPointF& p) const;
413 417 QLineF translated(QLineF* theWrappedObject, qreal dx, qreal dy) const;
414 418 QLineF unitVector(QLineF* theWrappedObject) const;
415 419 qreal x1(QLineF* theWrappedObject) const;
416 420 qreal x2(QLineF* theWrappedObject) const;
417 421 qreal y1(QLineF* theWrappedObject) const;
418 422 qreal y2(QLineF* theWrappedObject) const;
419 423 QString py_toString(QLineF*);
420 424 bool __nonzero__(QLineF* obj) { return !obj->isNull(); }
421 425 };
422 426
423 427
424 428
425 429
426 430
427 431 class PythonQtWrapper_QLocale : public QObject
428 432 { Q_OBJECT
429 433 public:
430 434 Q_ENUMS(MeasurementSystem NumberOption QuotationStyle FormatType CurrencySymbolFormat Script Country Language )
431 435 Q_FLAGS(NumberOptions )
432 436 enum MeasurementSystem{
433 437 MetricSystem = QLocale::MetricSystem, ImperialSystem = QLocale::ImperialSystem};
434 438 enum NumberOption{
435 439 OmitGroupSeparator = QLocale::OmitGroupSeparator, RejectGroupSeparator = QLocale::RejectGroupSeparator};
436 440 enum QuotationStyle{
437 441 StandardQuotation = QLocale::StandardQuotation, AlternateQuotation = QLocale::AlternateQuotation};
438 442 enum FormatType{
439 443 LongFormat = QLocale::LongFormat, ShortFormat = QLocale::ShortFormat, NarrowFormat = QLocale::NarrowFormat};
440 444 enum CurrencySymbolFormat{
441 445 CurrencyIsoCode = QLocale::CurrencyIsoCode, CurrencySymbol = QLocale::CurrencySymbol, CurrencyDisplayName = QLocale::CurrencyDisplayName};
442 446 enum Script{
443 447 AnyScript = QLocale::AnyScript, ArabicScript = QLocale::ArabicScript, CyrillicScript = QLocale::CyrillicScript, DeseretScript = QLocale::DeseretScript, GurmukhiScript = QLocale::GurmukhiScript, SimplifiedHanScript = QLocale::SimplifiedHanScript, TraditionalHanScript = QLocale::TraditionalHanScript, LatinScript = QLocale::LatinScript, MongolianScript = QLocale::MongolianScript, TifinaghScript = QLocale::TifinaghScript, SimplifiedChineseScript = QLocale::SimplifiedChineseScript, TraditionalChineseScript = QLocale::TraditionalChineseScript, LastScript = QLocale::LastScript};
444 448 enum Country{
445 449 AnyCountry = QLocale::AnyCountry, Afghanistan = QLocale::Afghanistan, Albania = QLocale::Albania, Algeria = QLocale::Algeria, AmericanSamoa = QLocale::AmericanSamoa, Andorra = QLocale::Andorra, Angola = QLocale::Angola, Anguilla = QLocale::Anguilla, Antarctica = QLocale::Antarctica, AntiguaAndBarbuda = QLocale::AntiguaAndBarbuda, Argentina = QLocale::Argentina, Armenia = QLocale::Armenia, Aruba = QLocale::Aruba, Australia = QLocale::Australia, Austria = QLocale::Austria, Azerbaijan = QLocale::Azerbaijan, Bahamas = QLocale::Bahamas, Bahrain = QLocale::Bahrain, Bangladesh = QLocale::Bangladesh, Barbados = QLocale::Barbados, Belarus = QLocale::Belarus, Belgium = QLocale::Belgium, Belize = QLocale::Belize, Benin = QLocale::Benin, Bermuda = QLocale::Bermuda, Bhutan = QLocale::Bhutan, Bolivia = QLocale::Bolivia, BosniaAndHerzegowina = QLocale::BosniaAndHerzegowina, Botswana = QLocale::Botswana, BouvetIsland = QLocale::BouvetIsland, Brazil = QLocale::Brazil, BritishIndianOceanTerritory = QLocale::BritishIndianOceanTerritory, BruneiDarussalam = QLocale::BruneiDarussalam, Bulgaria = QLocale::Bulgaria, BurkinaFaso = QLocale::BurkinaFaso, Burundi = QLocale::Burundi, Cambodia = QLocale::Cambodia, Cameroon = QLocale::Cameroon, Canada = QLocale::Canada, CapeVerde = QLocale::CapeVerde, CaymanIslands = QLocale::CaymanIslands, CentralAfricanRepublic = QLocale::CentralAfricanRepublic, Chad = QLocale::Chad, Chile = QLocale::Chile, China = QLocale::China, ChristmasIsland = QLocale::ChristmasIsland, CocosIslands = QLocale::CocosIslands, Colombia = QLocale::Colombia, Comoros = QLocale::Comoros, DemocraticRepublicOfCongo = QLocale::DemocraticRepublicOfCongo, PeoplesRepublicOfCongo = QLocale::PeoplesRepublicOfCongo, CookIslands = QLocale::CookIslands, CostaRica = QLocale::CostaRica, IvoryCoast = QLocale::IvoryCoast, Croatia = QLocale::Croatia, Cuba = QLocale::Cuba, Cyprus = QLocale::Cyprus, CzechRepublic = QLocale::CzechRepublic, Denmark = QLocale::Denmark, Djibouti = QLocale::Djibouti, Dominica = QLocale::Dominica, DominicanRepublic = QLocale::DominicanRepublic, EastTimor = QLocale::EastTimor, Ecuador = QLocale::Ecuador, Egypt = QLocale::Egypt, ElSalvador = QLocale::ElSalvador, EquatorialGuinea = QLocale::EquatorialGuinea, Eritrea = QLocale::Eritrea, Estonia = QLocale::Estonia, Ethiopia = QLocale::Ethiopia, FalklandIslands = QLocale::FalklandIslands, FaroeIslands = QLocale::FaroeIslands, FijiCountry = QLocale::FijiCountry, Finland = QLocale::Finland, France = QLocale::France, MetropolitanFrance = QLocale::MetropolitanFrance, FrenchGuiana = QLocale::FrenchGuiana, FrenchPolynesia = QLocale::FrenchPolynesia, FrenchSouthernTerritories = QLocale::FrenchSouthernTerritories, Gabon = QLocale::Gabon, Gambia = QLocale::Gambia, Georgia = QLocale::Georgia, Germany = QLocale::Germany, Ghana = QLocale::Ghana, Gibraltar = QLocale::Gibraltar, Greece = QLocale::Greece, Greenland = QLocale::Greenland, Grenada = QLocale::Grenada, Guadeloupe = QLocale::Guadeloupe, Guam = QLocale::Guam, Guatemala = QLocale::Guatemala, Guinea = QLocale::Guinea, GuineaBissau = QLocale::GuineaBissau, Guyana = QLocale::Guyana, Haiti = QLocale::Haiti, HeardAndMcDonaldIslands = QLocale::HeardAndMcDonaldIslands, Honduras = QLocale::Honduras, HongKong = QLocale::HongKong, Hungary = QLocale::Hungary, Iceland = QLocale::Iceland, India = QLocale::India, Indonesia = QLocale::Indonesia, Iran = QLocale::Iran, Iraq = QLocale::Iraq, Ireland = QLocale::Ireland, Israel = QLocale::Israel, Italy = QLocale::Italy, Jamaica = QLocale::Jamaica, Japan = QLocale::Japan, Jordan = QLocale::Jordan, Kazakhstan = QLocale::Kazakhstan, Kenya = QLocale::Kenya, Kiribati = QLocale::Kiribati, DemocraticRepublicOfKorea = QLocale::DemocraticRepublicOfKorea, RepublicOfKorea = QLocale::RepublicOfKorea, Kuwait = QLocale::Kuwait, Kyrgyzstan = QLocale::Kyrgyzstan, Lao = QLocale::Lao, Latvia = QLocale::Latvia, Lebanon = QLocale::Lebanon, Lesotho = QLocale::Lesotho, Liberia = QLocale::Liberia, LibyanArabJamahiriya = QLocale::LibyanArabJamahiriya, Liechtenstein = QLocale::Liechtenstein, Lithuania = QLocale::Lithuania, Luxembourg = QLocale::Luxembourg, Macau = QLocale::Macau, Macedonia = QLocale::Macedonia, Madagascar = QLocale::Madagascar, Malawi = QLocale::Malawi, Malaysia = QLocale::Malaysia, Maldives = QLocale::Maldives, Mali = QLocale::Mali, Malta = QLocale::Malta, MarshallIslands = QLocale::MarshallIslands, Martinique = QLocale::Martinique, Mauritania = QLocale::Mauritania, Mauritius = QLocale::Mauritius, Mayotte = QLocale::Mayotte, Mexico = QLocale::Mexico, Micronesia = QLocale::Micronesia, Moldova = QLocale::Moldova, Monaco = QLocale::Monaco, Mongolia = QLocale::Mongolia, Montserrat = QLocale::Montserrat, Morocco = QLocale::Morocco, Mozambique = QLocale::Mozambique, Myanmar = QLocale::Myanmar, Namibia = QLocale::Namibia, NauruCountry = QLocale::NauruCountry, Nepal = QLocale::Nepal, Netherlands = QLocale::Netherlands, NetherlandsAntilles = QLocale::NetherlandsAntilles, NewCaledonia = QLocale::NewCaledonia, NewZealand = QLocale::NewZealand, Nicaragua = QLocale::Nicaragua, Niger = QLocale::Niger, Nigeria = QLocale::Nigeria, Niue = QLocale::Niue, NorfolkIsland = QLocale::NorfolkIsland, NorthernMarianaIslands = QLocale::NorthernMarianaIslands, Norway = QLocale::Norway, Oman = QLocale::Oman, Pakistan = QLocale::Pakistan, Palau = QLocale::Palau, PalestinianTerritory = QLocale::PalestinianTerritory, Panama = QLocale::Panama, PapuaNewGuinea = QLocale::PapuaNewGuinea, Paraguay = QLocale::Paraguay, Peru = QLocale::Peru, Philippines = QLocale::Philippines, Pitcairn = QLocale::Pitcairn, Poland = QLocale::Poland, Portugal = QLocale::Portugal, PuertoRico = QLocale::PuertoRico, Qatar = QLocale::Qatar, Reunion = QLocale::Reunion, Romania = QLocale::Romania, RussianFederation = QLocale::RussianFederation, Rwanda = QLocale::Rwanda, SaintKittsAndNevis = QLocale::SaintKittsAndNevis, StLucia = QLocale::StLucia, StVincentAndTheGrenadines = QLocale::StVincentAndTheGrenadines, Samoa = QLocale::Samoa, SanMarino = QLocale::SanMarino, SaoTomeAndPrincipe = QLocale::SaoTomeAndPrincipe, SaudiArabia = QLocale::SaudiArabia, Senegal = QLocale::Senegal, Seychelles = QLocale::Seychelles, SierraLeone = QLocale::SierraLeone, Singapore = QLocale::Singapore, Slovakia = QLocale::Slovakia, Slovenia = QLocale::Slovenia, SolomonIslands = QLocale::SolomonIslands, Somalia = QLocale::Somalia, SouthAfrica = QLocale::SouthAfrica, SouthGeorgiaAndTheSouthSandwichIslands = QLocale::SouthGeorgiaAndTheSouthSandwichIslands, Spain = QLocale::Spain, SriLanka = QLocale::SriLanka, StHelena = QLocale::StHelena, StPierreAndMiquelon = QLocale::StPierreAndMiquelon, Sudan = QLocale::Sudan, Suriname = QLocale::Suriname, SvalbardAndJanMayenIslands = QLocale::SvalbardAndJanMayenIslands, Swaziland = QLocale::Swaziland, Sweden = QLocale::Sweden, Switzerland = QLocale::Switzerland, SyrianArabRepublic = QLocale::SyrianArabRepublic, Taiwan = QLocale::Taiwan, Tajikistan = QLocale::Tajikistan, Tanzania = QLocale::Tanzania, Thailand = QLocale::Thailand, Togo = QLocale::Togo, Tokelau = QLocale::Tokelau, TongaCountry = QLocale::TongaCountry, TrinidadAndTobago = QLocale::TrinidadAndTobago, Tunisia = QLocale::Tunisia, Turkey = QLocale::Turkey, Turkmenistan = QLocale::Turkmenistan, TurksAndCaicosIslands = QLocale::TurksAndCaicosIslands, Tuvalu = QLocale::Tuvalu, Uganda = QLocale::Uganda, Ukraine = QLocale::Ukraine, UnitedArabEmirates = QLocale::UnitedArabEmirates, UnitedKingdom = QLocale::UnitedKingdom, UnitedStates = QLocale::UnitedStates, UnitedStatesMinorOutlyingIslands = QLocale::UnitedStatesMinorOutlyingIslands, Uruguay = QLocale::Uruguay, Uzbekistan = QLocale::Uzbekistan, Vanuatu = QLocale::Vanuatu, VaticanCityState = QLocale::VaticanCityState, Venezuela = QLocale::Venezuela, VietNam = QLocale::VietNam, BritishVirginIslands = QLocale::BritishVirginIslands, USVirginIslands = QLocale::USVirginIslands, WallisAndFutunaIslands = QLocale::WallisAndFutunaIslands, WesternSahara = QLocale::WesternSahara, Yemen = QLocale::Yemen, Yugoslavia = QLocale::Yugoslavia, Zambia = QLocale::Zambia, Zimbabwe = QLocale::Zimbabwe, SerbiaAndMontenegro = QLocale::SerbiaAndMontenegro, Montenegro = QLocale::Montenegro, Serbia = QLocale::Serbia, SaintBarthelemy = QLocale::SaintBarthelemy, SaintMartin = QLocale::SaintMartin, LatinAmericaAndTheCaribbean = QLocale::LatinAmericaAndTheCaribbean, LastCountry = QLocale::LastCountry};
446 450 enum Language{
447 451 AnyLanguage = QLocale::AnyLanguage, C = QLocale::C, Abkhazian = QLocale::Abkhazian, Afan = QLocale::Afan, Afar = QLocale::Afar, Afrikaans = QLocale::Afrikaans, Albanian = QLocale::Albanian, Amharic = QLocale::Amharic, Arabic = QLocale::Arabic, Armenian = QLocale::Armenian, Assamese = QLocale::Assamese, Aymara = QLocale::Aymara, Azerbaijani = QLocale::Azerbaijani, Bashkir = QLocale::Bashkir, Basque = QLocale::Basque, Bengali = QLocale::Bengali, Bhutani = QLocale::Bhutani, Bihari = QLocale::Bihari, Bislama = QLocale::Bislama, Breton = QLocale::Breton, Bulgarian = QLocale::Bulgarian, Burmese = QLocale::Burmese, Byelorussian = QLocale::Byelorussian, Cambodian = QLocale::Cambodian, Catalan = QLocale::Catalan, Chinese = QLocale::Chinese, Corsican = QLocale::Corsican, Croatian = QLocale::Croatian, Czech = QLocale::Czech, Danish = QLocale::Danish, Dutch = QLocale::Dutch, English = QLocale::English, Esperanto = QLocale::Esperanto, Estonian = QLocale::Estonian, Faroese = QLocale::Faroese, FijiLanguage = QLocale::FijiLanguage, Finnish = QLocale::Finnish, French = QLocale::French, Frisian = QLocale::Frisian, Gaelic = QLocale::Gaelic, Galician = QLocale::Galician, Georgian = QLocale::Georgian, German = QLocale::German, Greek = QLocale::Greek, Greenlandic = QLocale::Greenlandic, Guarani = QLocale::Guarani, Gujarati = QLocale::Gujarati, Hausa = QLocale::Hausa, Hebrew = QLocale::Hebrew, Hindi = QLocale::Hindi, Hungarian = QLocale::Hungarian, Icelandic = QLocale::Icelandic, Indonesian = QLocale::Indonesian, Interlingua = QLocale::Interlingua, Interlingue = QLocale::Interlingue, Inuktitut = QLocale::Inuktitut, Inupiak = QLocale::Inupiak, Irish = QLocale::Irish, Italian = QLocale::Italian, Japanese = QLocale::Japanese, Javanese = QLocale::Javanese, Kannada = QLocale::Kannada, Kashmiri = QLocale::Kashmiri, Kazakh = QLocale::Kazakh, Kinyarwanda = QLocale::Kinyarwanda, Kirghiz = QLocale::Kirghiz, Korean = QLocale::Korean, Kurdish = QLocale::Kurdish, Kurundi = QLocale::Kurundi, Laothian = QLocale::Laothian, Latin = QLocale::Latin, Latvian = QLocale::Latvian, Lingala = QLocale::Lingala, Lithuanian = QLocale::Lithuanian, Macedonian = QLocale::Macedonian, Malagasy = QLocale::Malagasy, Malay = QLocale::Malay, Malayalam = QLocale::Malayalam, Maltese = QLocale::Maltese, Maori = QLocale::Maori, Marathi = QLocale::Marathi, Moldavian = QLocale::Moldavian, Mongolian = QLocale::Mongolian, NauruLanguage = QLocale::NauruLanguage, Nepali = QLocale::Nepali, Norwegian = QLocale::Norwegian, Occitan = QLocale::Occitan, Oriya = QLocale::Oriya, Pashto = QLocale::Pashto, Persian = QLocale::Persian, Polish = QLocale::Polish, Portuguese = QLocale::Portuguese, Punjabi = QLocale::Punjabi, Quechua = QLocale::Quechua, RhaetoRomance = QLocale::RhaetoRomance, Romanian = QLocale::Romanian, Russian = QLocale::Russian, Samoan = QLocale::Samoan, Sangho = QLocale::Sangho, Sanskrit = QLocale::Sanskrit, Serbian = QLocale::Serbian, SerboCroatian = QLocale::SerboCroatian, Sesotho = QLocale::Sesotho, Setswana = QLocale::Setswana, Shona = QLocale::Shona, Sindhi = QLocale::Sindhi, Singhalese = QLocale::Singhalese, Siswati = QLocale::Siswati, Slovak = QLocale::Slovak, Slovenian = QLocale::Slovenian, Somali = QLocale::Somali, Spanish = QLocale::Spanish, Sundanese = QLocale::Sundanese, Swahili = QLocale::Swahili, Swedish = QLocale::Swedish, Tagalog = QLocale::Tagalog, Tajik = QLocale::Tajik, Tamil = QLocale::Tamil, Tatar = QLocale::Tatar, Telugu = QLocale::Telugu, Thai = QLocale::Thai, Tibetan = QLocale::Tibetan, Tigrinya = QLocale::Tigrinya, TongaLanguage = QLocale::TongaLanguage, Tsonga = QLocale::Tsonga, Turkish = QLocale::Turkish, Turkmen = QLocale::Turkmen, Twi = QLocale::Twi, Uigur = QLocale::Uigur, Ukrainian = QLocale::Ukrainian, Urdu = QLocale::Urdu, Uzbek = QLocale::Uzbek, Vietnamese = QLocale::Vietnamese, Volapuk = QLocale::Volapuk, Welsh = QLocale::Welsh, Wolof = QLocale::Wolof, Xhosa = QLocale::Xhosa, Yiddish = QLocale::Yiddish, Yoruba = QLocale::Yoruba, Zhuang = QLocale::Zhuang, Zulu = QLocale::Zulu, Nynorsk = QLocale::Nynorsk, Bosnian = QLocale::Bosnian, Divehi = QLocale::Divehi, Manx = QLocale::Manx, Cornish = QLocale::Cornish, Akan = QLocale::Akan, Konkani = QLocale::Konkani, Ga = QLocale::Ga, Igbo = QLocale::Igbo, Kamba = QLocale::Kamba, Syriac = QLocale::Syriac, Blin = QLocale::Blin, Geez = QLocale::Geez, Koro = QLocale::Koro, Sidamo = QLocale::Sidamo, Atsam = QLocale::Atsam, Tigre = QLocale::Tigre, Jju = QLocale::Jju, Friulian = QLocale::Friulian, Venda = QLocale::Venda, Ewe = QLocale::Ewe, Walamo = QLocale::Walamo, Hawaiian = QLocale::Hawaiian, Tyap = QLocale::Tyap, Chewa = QLocale::Chewa, Filipino = QLocale::Filipino, SwissGerman = QLocale::SwissGerman, SichuanYi = QLocale::SichuanYi, Kpelle = QLocale::Kpelle, LowGerman = QLocale::LowGerman, SouthNdebele = QLocale::SouthNdebele, NorthernSotho = QLocale::NorthernSotho, NorthernSami = QLocale::NorthernSami, Taroko = QLocale::Taroko, Gusii = QLocale::Gusii, Taita = QLocale::Taita, Fulah = QLocale::Fulah, Kikuyu = QLocale::Kikuyu, Samburu = QLocale::Samburu, Sena = QLocale::Sena, NorthNdebele = QLocale::NorthNdebele, Rombo = QLocale::Rombo, Tachelhit = QLocale::Tachelhit, Kabyle = QLocale::Kabyle, Nyankole = QLocale::Nyankole, Bena = QLocale::Bena, Vunjo = QLocale::Vunjo, Bambara = QLocale::Bambara, Embu = QLocale::Embu, Cherokee = QLocale::Cherokee, Morisyen = QLocale::Morisyen, Makonde = QLocale::Makonde, Langi = QLocale::Langi, Ganda = QLocale::Ganda, Bemba = QLocale::Bemba, Kabuverdianu = QLocale::Kabuverdianu, Meru = QLocale::Meru, Kalenjin = QLocale::Kalenjin, Nama = QLocale::Nama, Machame = QLocale::Machame, Colognian = QLocale::Colognian, Masai = QLocale::Masai, Soga = QLocale::Soga, Luyia = QLocale::Luyia, Asu = QLocale::Asu, Teso = QLocale::Teso, Saho = QLocale::Saho, KoyraChiini = QLocale::KoyraChiini, Rwa = QLocale::Rwa, Luo = QLocale::Luo, Chiga = QLocale::Chiga, CentralMoroccoTamazight = QLocale::CentralMoroccoTamazight, KoyraboroSenni = QLocale::KoyraboroSenni, Shambala = QLocale::Shambala, NorwegianBokmal = QLocale::NorwegianBokmal, NorwegianNynorsk = QLocale::NorwegianNynorsk, LastLanguage = QLocale::LastLanguage};
448 452 Q_DECLARE_FLAGS(NumberOptions, NumberOption)
449 453 public Q_SLOTS:
450 454 QLocale* new_QLocale();
451 455 QLocale* new_QLocale(QLocale::Language language, QLocale::Country country = QLocale::AnyCountry);
452 456 QLocale* new_QLocale(QLocale::Language language, QLocale::Script script, QLocale::Country country);
453 457 QLocale* new_QLocale(const QLocale& other);
454 458 QLocale* new_QLocale(const QString& name);
455 459 void delete_QLocale(QLocale* obj) { delete obj; }
456 460 QString amText(QLocale* theWrappedObject) const;
457 461 QString bcp47Name(QLocale* theWrappedObject) const;
458 462 QLocale static_QLocale_c();
459 463 QList<QLocale::Country > static_QLocale_countriesForLanguage(QLocale::Language lang);
460 464 QLocale::Country country(QLocale* theWrappedObject) const;
461 465 QString static_QLocale_countryToString(QLocale::Country country);
462 466 QString createSeparatedList(QLocale* theWrappedObject, const QStringList& strl) const;
463 467 QString currencySymbol(QLocale* theWrappedObject, QLocale::CurrencySymbolFormat arg__1 = QLocale::CurrencySymbol) const;
464 468 QString dateFormat(QLocale* theWrappedObject, QLocale::FormatType format = QLocale::LongFormat) const;
465 469 QString dateTimeFormat(QLocale* theWrappedObject, QLocale::FormatType format = QLocale::LongFormat) const;
466 470 QString dayName(QLocale* theWrappedObject, int arg__1, QLocale::FormatType format = QLocale::LongFormat) const;
467 471 QChar decimalPoint(QLocale* theWrappedObject) const;
468 472 QChar exponential(QLocale* theWrappedObject) const;
469 473 Qt::DayOfWeek firstDayOfWeek(QLocale* theWrappedObject) const;
470 474 QChar groupSeparator(QLocale* theWrappedObject) const;
471 475 QLocale::Language language(QLocale* theWrappedObject) const;
472 476 QString static_QLocale_languageToString(QLocale::Language language);
473 477 QList<QLocale > static_QLocale_matchingLocales(QLocale::Language language, QLocale::Script script, QLocale::Country country);
474 478 QLocale::MeasurementSystem measurementSystem(QLocale* theWrappedObject) const;
475 479 QString monthName(QLocale* theWrappedObject, int arg__1, QLocale::FormatType format = QLocale::LongFormat) const;
476 480 QString name(QLocale* theWrappedObject) const;
477 481 QString nativeCountryName(QLocale* theWrappedObject) const;
478 482 QString nativeLanguageName(QLocale* theWrappedObject) const;
479 483 QChar negativeSign(QLocale* theWrappedObject) const;
480 484 QLocale::NumberOptions numberOptions(QLocale* theWrappedObject) const;
481 485 bool __ne__(QLocale* theWrappedObject, const QLocale& other) const;
482 486 void writeTo(QLocale* theWrappedObject, QDataStream& arg__1);
483 487 bool __eq__(QLocale* theWrappedObject, const QLocale& other) const;
484 488 void readFrom(QLocale* theWrappedObject, QDataStream& arg__1);
485 489 QChar percent(QLocale* theWrappedObject) const;
486 490 QString pmText(QLocale* theWrappedObject) const;
487 491 QChar positiveSign(QLocale* theWrappedObject) const;
488 492 QString quoteString(QLocale* theWrappedObject, const QString& str, QLocale::QuotationStyle style = QLocale::StandardQuotation) const;
489 493 QString quoteString(QLocale* theWrappedObject, const QStringRef& str, QLocale::QuotationStyle style = QLocale::StandardQuotation) const;
490 494 QLocale::Script script(QLocale* theWrappedObject) const;
491 495 QString static_QLocale_scriptToString(QLocale::Script script);
492 496 void static_QLocale_setDefault(const QLocale& locale);
493 497 void setNumberOptions(QLocale* theWrappedObject, QLocale::NumberOptions options);
494 498 QString standaloneDayName(QLocale* theWrappedObject, int arg__1, QLocale::FormatType format = QLocale::LongFormat) const;
495 499 QString standaloneMonthName(QLocale* theWrappedObject, int arg__1, QLocale::FormatType format = QLocale::LongFormat) const;
496 500 QLocale static_QLocale_system();
497 501 Qt::LayoutDirection textDirection(QLocale* theWrappedObject) const;
498 502 QString timeFormat(QLocale* theWrappedObject, QLocale::FormatType format = QLocale::LongFormat) const;
499 503 QString toCurrencyString(QLocale* theWrappedObject, double arg__1, const QString& symbol = QString()) const;
500 504 QString toCurrencyString(QLocale* theWrappedObject, float arg__1, const QString& symbol = QString()) const;
501 505 QString toCurrencyString(QLocale* theWrappedObject, int arg__1, const QString& symbol = QString()) const;
502 506 QString toCurrencyString(QLocale* theWrappedObject, qlonglong arg__1, const QString& symbol = QString()) const;
503 507 QString toCurrencyString(QLocale* theWrappedObject, qulonglong arg__1, const QString& symbol = QString()) const;
504 508 QString toCurrencyString(QLocale* theWrappedObject, short arg__1, const QString& symbol = QString()) const;
505 509 QString toCurrencyString(QLocale* theWrappedObject, uint arg__1, const QString& symbol = QString()) const;
506 510 QString toCurrencyString(QLocale* theWrappedObject, ushort arg__1, const QString& symbol = QString()) const;
507 511 QDate toDate(QLocale* theWrappedObject, const QString& string, QLocale::FormatType arg__2 = QLocale::LongFormat) const;
508 512 QDate toDate(QLocale* theWrappedObject, const QString& string, const QString& format) const;
509 513 QDateTime toDateTime(QLocale* theWrappedObject, const QString& string, QLocale::FormatType format = QLocale::LongFormat) const;
510 514 QDateTime toDateTime(QLocale* theWrappedObject, const QString& string, const QString& format) const;
511 515 double toDouble(QLocale* theWrappedObject, const QString& s, bool* ok = 0) const;
512 516 float toFloat(QLocale* theWrappedObject, const QString& s, bool* ok = 0) const;
513 517 int toInt(QLocale* theWrappedObject, const QString& s, bool* ok = 0, int base = 0) const;
514 518 qlonglong toLongLong(QLocale* theWrappedObject, const QString& s, bool* ok = 0, int base = 0) const;
515 519 QString toLower(QLocale* theWrappedObject, const QString& str) const;
516 520 short toShort(QLocale* theWrappedObject, const QString& s, bool* ok = 0, int base = 0) const;
517 521 QString toString(QLocale* theWrappedObject, const QDate& date, QLocale::FormatType format = QLocale::LongFormat) const;
518 522 QString toString(QLocale* theWrappedObject, const QDate& date, const QString& formatStr) const;
519 523 QString toString(QLocale* theWrappedObject, const QDateTime& dateTime, QLocale::FormatType format = QLocale::LongFormat) const;
520 524 QString toString(QLocale* theWrappedObject, const QDateTime& dateTime, const QString& format) const;
521 525 QString toString(QLocale* theWrappedObject, const QTime& time, QLocale::FormatType format = QLocale::LongFormat) const;
522 526 QString toString(QLocale* theWrappedObject, const QTime& time, const QString& formatStr) const;
523 527 QString toString(QLocale* theWrappedObject, double i, char f = 'g', int prec = 6) const;
524 528 QString toString(QLocale* theWrappedObject, float i, char f = 'g', int prec = 6) const;
525 529 QString toString(QLocale* theWrappedObject, int i) const;
526 530 QString toString(QLocale* theWrappedObject, qlonglong i) const;
527 531 QString toString(QLocale* theWrappedObject, qulonglong i) const;
528 532 QString toString(QLocale* theWrappedObject, short i) const;
529 533 QString toString(QLocale* theWrappedObject, ushort i) const;
530 534 QTime toTime(QLocale* theWrappedObject, const QString& string, QLocale::FormatType arg__2 = QLocale::LongFormat) const;
531 535 QTime toTime(QLocale* theWrappedObject, const QString& string, const QString& format) const;
532 536 ushort toUShort(QLocale* theWrappedObject, const QString& s, bool* ok = 0, int base = 0) const;
533 537 QString toUpper(QLocale* theWrappedObject, const QString& str) const;
534 538 QStringList uiLanguages(QLocale* theWrappedObject) const;
535 539 QList<Qt::DayOfWeek > weekdays(QLocale* theWrappedObject) const;
536 540 QChar zeroDigit(QLocale* theWrappedObject) const;
537 541 };
538 542
539 543
540 544
541 545
542 546
543 547 class PythonQtWrapper_QPoint : public QObject
544 548 { Q_OBJECT
545 549 public:
546 550 public Q_SLOTS:
547 551 QPoint* new_QPoint();
548 552 QPoint* new_QPoint(int xpos, int ypos);
549 553 QPoint* new_QPoint(const QPoint& other) {
550 554 QPoint* a = new QPoint();
551 555 *((QPoint*)a) = other;
552 556 return a; }
553 557 void delete_QPoint(QPoint* obj) { delete obj; }
554 558 bool isNull(QPoint* theWrappedObject) const;
555 559 int manhattanLength(QPoint* theWrappedObject) const;
556 560 QPoint __mul__(QPoint* theWrappedObject, const QMatrix& m);
557 561 QPoint __mul__(QPoint* theWrappedObject, const QMatrix4x4& matrix);
558 562 QPoint __mul__(QPoint* theWrappedObject, const QTransform& m);
559 563 const QPoint __mul__(QPoint* theWrappedObject, double c);
560 564 const QPoint __mul__(QPoint* theWrappedObject, float c);
561 565 const QPoint __mul__(QPoint* theWrappedObject, int c);
562 566 QPoint* __imul__(QPoint* theWrappedObject, double c);
563 567 QPoint* __imul__(QPoint* theWrappedObject, float c);
564 568 QPoint* __imul__(QPoint* theWrappedObject, int c);
565 569 const QPoint __add__(QPoint* theWrappedObject, const QPoint& p2);
566 570 QPoint* __iadd__(QPoint* theWrappedObject, const QPoint& p);
567 571 const QPoint __sub__(QPoint* theWrappedObject, const QPoint& p2);
568 572 QPoint* __isub__(QPoint* theWrappedObject, const QPoint& p);
569 573 const QPoint __div__(QPoint* theWrappedObject, qreal c);
570 574 QPoint* __idiv__(QPoint* theWrappedObject, qreal c);
571 575 void writeTo(QPoint* theWrappedObject, QDataStream& arg__1);
572 576 bool __eq__(QPoint* theWrappedObject, const QPoint& p2);
573 577 void readFrom(QPoint* theWrappedObject, QDataStream& arg__1);
574 578 void setX(QPoint* theWrappedObject, int x);
575 579 void setY(QPoint* theWrappedObject, int y);
576 580 int x(QPoint* theWrappedObject) const;
577 581 int y(QPoint* theWrappedObject) const;
578 582 QString py_toString(QPoint*);
579 583 bool __nonzero__(QPoint* obj) { return !obj->isNull(); }
580 584 };
581 585
582 586
583 587
584 588
585 589
586 590 class PythonQtWrapper_QPointF : public QObject
587 591 { Q_OBJECT
588 592 public:
589 593 public Q_SLOTS:
590 594 QPointF* new_QPointF();
591 595 QPointF* new_QPointF(const QPoint& p);
592 596 QPointF* new_QPointF(qreal xpos, qreal ypos);
593 597 QPointF* new_QPointF(const QPointF& other) {
594 598 QPointF* a = new QPointF();
595 599 *((QPointF*)a) = other;
596 600 return a; }
597 601 void delete_QPointF(QPointF* obj) { delete obj; }
598 602 bool isNull(QPointF* theWrappedObject) const;
599 603 qreal manhattanLength(QPointF* theWrappedObject) const;
600 604 QPointF __mul__(QPointF* theWrappedObject, const QMatrix& m);
601 605 QPointF __mul__(QPointF* theWrappedObject, const QMatrix4x4& matrix);
602 606 QPointF __mul__(QPointF* theWrappedObject, const QTransform& m);
603 607 const QPointF __mul__(QPointF* theWrappedObject, qreal c);
604 608 QPointF* __imul__(QPointF* theWrappedObject, qreal c);
605 609 const QPointF __add__(QPointF* theWrappedObject, const QPointF& p2);
606 610 QPointF* __iadd__(QPointF* theWrappedObject, const QPointF& p);
607 611 const QPointF __sub__(QPointF* theWrappedObject, const QPointF& p2);
608 612 QPointF* __isub__(QPointF* theWrappedObject, const QPointF& p);
609 613 const QPointF __div__(QPointF* theWrappedObject, qreal c);
610 614 QPointF* __idiv__(QPointF* theWrappedObject, qreal c);
611 615 void writeTo(QPointF* theWrappedObject, QDataStream& arg__1);
612 616 bool __eq__(QPointF* theWrappedObject, const QPointF& p2);
613 617 void readFrom(QPointF* theWrappedObject, QDataStream& arg__1);
614 618 void setX(QPointF* theWrappedObject, qreal x);
615 619 void setY(QPointF* theWrappedObject, qreal y);
616 620 QPoint toPoint(QPointF* theWrappedObject) const;
617 621 qreal x(QPointF* theWrappedObject) const;
618 622 qreal y(QPointF* theWrappedObject) const;
619 623 QString py_toString(QPointF*);
620 624 bool __nonzero__(QPointF* obj) { return !obj->isNull(); }
621 625 };
622 626
623 627
624 628
625 629
626 630
627 631 class PythonQtWrapper_QRect : public QObject
628 632 { Q_OBJECT
629 633 public:
630 634 public Q_SLOTS:
631 635 QRect* new_QRect();
632 636 QRect* new_QRect(const QPoint& topleft, const QPoint& bottomright);
633 637 QRect* new_QRect(const QPoint& topleft, const QSize& size);
634 638 QRect* new_QRect(int left, int top, int width, int height);
635 639 QRect* new_QRect(const QRect& other) {
636 640 QRect* a = new QRect();
637 641 *((QRect*)a) = other;
638 642 return a; }
639 643 void delete_QRect(QRect* obj) { delete obj; }
640 644 void adjust(QRect* theWrappedObject, int x1, int y1, int x2, int y2);
641 645 QRect adjusted(QRect* theWrappedObject, int x1, int y1, int x2, int y2) const;
642 646 int bottom(QRect* theWrappedObject) const;
643 647 QPoint bottomLeft(QRect* theWrappedObject) const;
644 648 QPoint bottomRight(QRect* theWrappedObject) const;
645 649 QPoint center(QRect* theWrappedObject) const;
646 650 bool contains(QRect* theWrappedObject, const QPoint& p, bool proper = false) const;
647 651 bool contains(QRect* theWrappedObject, const QRect& r, bool proper = false) const;
648 652 bool contains(QRect* theWrappedObject, int x, int y) const;
649 653 bool contains(QRect* theWrappedObject, int x, int y, bool proper) const;
650 654 int height(QRect* theWrappedObject) const;
651 655 QRect intersected(QRect* theWrappedObject, const QRect& other) const;
652 656 bool intersects(QRect* theWrappedObject, const QRect& r) const;
653 657 bool isEmpty(QRect* theWrappedObject) const;
654 658 bool isNull(QRect* theWrappedObject) const;
655 659 bool isValid(QRect* theWrappedObject) const;
656 660 int left(QRect* theWrappedObject) const;
657 661 void moveBottom(QRect* theWrappedObject, int pos);
658 662 void moveBottomLeft(QRect* theWrappedObject, const QPoint& p);
659 663 void moveBottomRight(QRect* theWrappedObject, const QPoint& p);
660 664 void moveCenter(QRect* theWrappedObject, const QPoint& p);
661 665 void moveLeft(QRect* theWrappedObject, int pos);
662 666 void moveRight(QRect* theWrappedObject, int pos);
663 667 void moveTo(QRect* theWrappedObject, const QPoint& p);
664 668 void moveTo(QRect* theWrappedObject, int x, int t);
665 669 void moveTop(QRect* theWrappedObject, int pos);
666 670 void moveTopLeft(QRect* theWrappedObject, const QPoint& p);
667 671 void moveTopRight(QRect* theWrappedObject, const QPoint& p);
668 672 QRect normalized(QRect* theWrappedObject) const;
669 673 QRect __and__(QRect* theWrappedObject, const QRect& r) const;
670 674 QRect* __iand__(QRect* theWrappedObject, const QRect& r);
671 675 void writeTo(QRect* theWrappedObject, QDataStream& arg__1);
672 676 bool __eq__(QRect* theWrappedObject, const QRect& arg__2);
673 677 void readFrom(QRect* theWrappedObject, QDataStream& arg__1);
674 678 QRect __or__(QRect* theWrappedObject, const QRect& r) const;
675 679 QRect* __ior__(QRect* theWrappedObject, const QRect& r);
676 680 int right(QRect* theWrappedObject) const;
677 681 void setBottom(QRect* theWrappedObject, int pos);
678 682 void setBottomLeft(QRect* theWrappedObject, const QPoint& p);
679 683 void setBottomRight(QRect* theWrappedObject, const QPoint& p);
680 684 void setCoords(QRect* theWrappedObject, int x1, int y1, int x2, int y2);
681 685 void setHeight(QRect* theWrappedObject, int h);
682 686 void setLeft(QRect* theWrappedObject, int pos);
683 687 void setRect(QRect* theWrappedObject, int x, int y, int w, int h);
684 688 void setRight(QRect* theWrappedObject, int pos);
685 689 void setSize(QRect* theWrappedObject, const QSize& s);
686 690 void setTop(QRect* theWrappedObject, int pos);
687 691 void setTopLeft(QRect* theWrappedObject, const QPoint& p);
688 692 void setTopRight(QRect* theWrappedObject, const QPoint& p);
689 693 void setWidth(QRect* theWrappedObject, int w);
690 694 void setX(QRect* theWrappedObject, int x);
691 695 void setY(QRect* theWrappedObject, int y);
692 696 QSize size(QRect* theWrappedObject) const;
693 697 int top(QRect* theWrappedObject) const;
694 698 QPoint topLeft(QRect* theWrappedObject) const;
695 699 QPoint topRight(QRect* theWrappedObject) const;
696 700 void translate(QRect* theWrappedObject, const QPoint& p);
697 701 void translate(QRect* theWrappedObject, int dx, int dy);
698 702 QRect translated(QRect* theWrappedObject, const QPoint& p) const;
699 703 QRect translated(QRect* theWrappedObject, int dx, int dy) const;
700 704 QRect united(QRect* theWrappedObject, const QRect& other) const;
701 705 int width(QRect* theWrappedObject) const;
702 706 int x(QRect* theWrappedObject) const;
703 707 int y(QRect* theWrappedObject) const;
704 708 QString py_toString(QRect*);
705 709 bool __nonzero__(QRect* obj) { return !obj->isNull(); }
706 710 };
707 711
708 712
709 713
710 714
711 715
712 716 class PythonQtWrapper_QRectF : public QObject
713 717 { Q_OBJECT
714 718 public:
715 719 public Q_SLOTS:
716 720 QRectF* new_QRectF();
717 721 QRectF* new_QRectF(const QPointF& topleft, const QPointF& bottomRight);
718 722 QRectF* new_QRectF(const QPointF& topleft, const QSizeF& size);
719 723 QRectF* new_QRectF(const QRect& rect);
720 724 QRectF* new_QRectF(qreal left, qreal top, qreal width, qreal height);
721 725 QRectF* new_QRectF(const QRectF& other) {
722 726 QRectF* a = new QRectF();
723 727 *((QRectF*)a) = other;
724 728 return a; }
725 729 void delete_QRectF(QRectF* obj) { delete obj; }
726 730 void adjust(QRectF* theWrappedObject, qreal x1, qreal y1, qreal x2, qreal y2);
727 731 QRectF adjusted(QRectF* theWrappedObject, qreal x1, qreal y1, qreal x2, qreal y2) const;
728 732 qreal bottom(QRectF* theWrappedObject) const;
729 733 QPointF bottomLeft(QRectF* theWrappedObject) const;
730 734 QPointF bottomRight(QRectF* theWrappedObject) const;
731 735 QPointF center(QRectF* theWrappedObject) const;
732 736 bool contains(QRectF* theWrappedObject, const QPointF& p) const;
733 737 bool contains(QRectF* theWrappedObject, const QRectF& r) const;
734 738 bool contains(QRectF* theWrappedObject, qreal x, qreal y) const;
735 739 void getCoords(QRectF* theWrappedObject, qreal* x1, qreal* y1, qreal* x2, qreal* y2) const;
736 740 void getRect(QRectF* theWrappedObject, qreal* x, qreal* y, qreal* w, qreal* h) const;
737 741 qreal height(QRectF* theWrappedObject) const;
738 742 QRectF intersected(QRectF* theWrappedObject, const QRectF& other) const;
739 743 bool intersects(QRectF* theWrappedObject, const QRectF& r) const;
740 744 bool isEmpty(QRectF* theWrappedObject) const;
741 745 bool isNull(QRectF* theWrappedObject) const;
742 746 bool isValid(QRectF* theWrappedObject) const;
743 747 qreal left(QRectF* theWrappedObject) const;
744 748 void moveBottom(QRectF* theWrappedObject, qreal pos);
745 749 void moveBottomLeft(QRectF* theWrappedObject, const QPointF& p);
746 750 void moveBottomRight(QRectF* theWrappedObject, const QPointF& p);
747 751 void moveCenter(QRectF* theWrappedObject, const QPointF& p);
748 752 void moveLeft(QRectF* theWrappedObject, qreal pos);
749 753 void moveRight(QRectF* theWrappedObject, qreal pos);
750 754 void moveTo(QRectF* theWrappedObject, const QPointF& p);
751 755 void moveTo(QRectF* theWrappedObject, qreal x, qreal t);
752 756 void moveTop(QRectF* theWrappedObject, qreal pos);
753 757 void moveTopLeft(QRectF* theWrappedObject, const QPointF& p);
754 758 void moveTopRight(QRectF* theWrappedObject, const QPointF& p);
755 759 QRectF normalized(QRectF* theWrappedObject) const;
756 760 QRectF __and__(QRectF* theWrappedObject, const QRectF& r) const;
757 761 QRectF* __iand__(QRectF* theWrappedObject, const QRectF& r);
758 762 void writeTo(QRectF* theWrappedObject, QDataStream& arg__1);
759 763 bool __eq__(QRectF* theWrappedObject, const QRectF& arg__2);
760 764 void readFrom(QRectF* theWrappedObject, QDataStream& arg__1);
761 765 QRectF __or__(QRectF* theWrappedObject, const QRectF& r) const;
762 766 QRectF* __ior__(QRectF* theWrappedObject, const QRectF& r);
763 767 qreal right(QRectF* theWrappedObject) const;
764 768 void setBottom(QRectF* theWrappedObject, qreal pos);
765 769 void setBottomLeft(QRectF* theWrappedObject, const QPointF& p);
766 770 void setBottomRight(QRectF* theWrappedObject, const QPointF& p);
767 771 void setCoords(QRectF* theWrappedObject, qreal x1, qreal y1, qreal x2, qreal y2);
768 772 void setHeight(QRectF* theWrappedObject, qreal h);
769 773 void setLeft(QRectF* theWrappedObject, qreal pos);
770 774 void setRect(QRectF* theWrappedObject, qreal x, qreal y, qreal w, qreal h);
771 775 void setRight(QRectF* theWrappedObject, qreal pos);
772 776 void setSize(QRectF* theWrappedObject, const QSizeF& s);
773 777 void setTop(QRectF* theWrappedObject, qreal pos);
774 778 void setTopLeft(QRectF* theWrappedObject, const QPointF& p);
775 779 void setTopRight(QRectF* theWrappedObject, const QPointF& p);
776 780 void setWidth(QRectF* theWrappedObject, qreal w);
777 781 void setX(QRectF* theWrappedObject, qreal pos);
778 782 void setY(QRectF* theWrappedObject, qreal pos);
779 783 QSizeF size(QRectF* theWrappedObject) const;
780 784 QRect toAlignedRect(QRectF* theWrappedObject) const;
781 785 QRect toRect(QRectF* theWrappedObject) const;
782 786 qreal top(QRectF* theWrappedObject) const;
783 787 QPointF topLeft(QRectF* theWrappedObject) const;
784 788 QPointF topRight(QRectF* theWrappedObject) const;
785 789 void translate(QRectF* theWrappedObject, const QPointF& p);
786 790 void translate(QRectF* theWrappedObject, qreal dx, qreal dy);
787 791 QRectF translated(QRectF* theWrappedObject, const QPointF& p) const;
788 792 QRectF translated(QRectF* theWrappedObject, qreal dx, qreal dy) const;
789 793 QRectF united(QRectF* theWrappedObject, const QRectF& other) const;
790 794 qreal width(QRectF* theWrappedObject) const;
791 795 qreal x(QRectF* theWrappedObject) const;
792 796 qreal y(QRectF* theWrappedObject) const;
793 797 QString py_toString(QRectF*);
794 798 bool __nonzero__(QRectF* obj) { return !obj->isNull(); }
795 799 };
796 800
797 801
798 802
799 803
800 804
801 805 class PythonQtWrapper_QRegExp : public QObject
802 806 { Q_OBJECT
803 807 public:
804 808 Q_ENUMS(PatternSyntax CaretMode )
805 809 enum PatternSyntax{
806 810 RegExp = QRegExp::RegExp, Wildcard = QRegExp::Wildcard, FixedString = QRegExp::FixedString, RegExp2 = QRegExp::RegExp2, WildcardUnix = QRegExp::WildcardUnix, W3CXmlSchema11 = QRegExp::W3CXmlSchema11};
807 811 enum CaretMode{
808 812 CaretAtZero = QRegExp::CaretAtZero, CaretAtOffset = QRegExp::CaretAtOffset, CaretWontMatch = QRegExp::CaretWontMatch};
809 813 public Q_SLOTS:
810 814 QRegExp* new_QRegExp();
811 815 QRegExp* new_QRegExp(const QRegExp& rx);
812 816 QRegExp* new_QRegExp(const QString& pattern, Qt::CaseSensitivity cs = Qt::CaseSensitive, QRegExp::PatternSyntax syntax = QRegExp::RegExp);
813 817 void delete_QRegExp(QRegExp* obj) { delete obj; }
814 818 QString cap(QRegExp* theWrappedObject, int nth = 0);
815 819 int captureCount(QRegExp* theWrappedObject) const;
816 820 QStringList capturedTexts(QRegExp* theWrappedObject);
817 821 Qt::CaseSensitivity caseSensitivity(QRegExp* theWrappedObject) const;
818 822 QString errorString(QRegExp* theWrappedObject);
819 823 QString static_QRegExp_escape(const QString& str);
820 824 bool exactMatch(QRegExp* theWrappedObject, const QString& str) const;
821 825 int indexIn(QRegExp* theWrappedObject, const QString& str, int offset = 0, QRegExp::CaretMode caretMode = QRegExp::CaretAtZero) const;
822 826 bool isEmpty(QRegExp* theWrappedObject) const;
823 827 bool isMinimal(QRegExp* theWrappedObject) const;
824 828 bool isValid(QRegExp* theWrappedObject) const;
825 829 int lastIndexIn(QRegExp* theWrappedObject, const QString& str, int offset = -1, QRegExp::CaretMode caretMode = QRegExp::CaretAtZero) const;
826 830 int matchedLength(QRegExp* theWrappedObject) const;
827 831 int numCaptures(QRegExp* theWrappedObject) const;
828 832 bool __ne__(QRegExp* theWrappedObject, const QRegExp& rx) const;
829 833 void writeTo(QRegExp* theWrappedObject, QDataStream& out);
830 834 bool __eq__(QRegExp* theWrappedObject, const QRegExp& rx) const;
831 835 void readFrom(QRegExp* theWrappedObject, QDataStream& in);
832 836 QString pattern(QRegExp* theWrappedObject) const;
833 837 QRegExp::PatternSyntax patternSyntax(QRegExp* theWrappedObject) const;
834 838 int pos(QRegExp* theWrappedObject, int nth = 0);
835 839 void setCaseSensitivity(QRegExp* theWrappedObject, Qt::CaseSensitivity cs);
836 840 void setMinimal(QRegExp* theWrappedObject, bool minimal);
837 841 void setPattern(QRegExp* theWrappedObject, const QString& pattern);
838 842 void setPatternSyntax(QRegExp* theWrappedObject, QRegExp::PatternSyntax syntax);
839 843 void swap(QRegExp* theWrappedObject, QRegExp& other);
840 844 };
841 845
842 846
843 847
844 848
845 849
846 850 class PythonQtWrapper_QSize : public QObject
847 851 { Q_OBJECT
848 852 public:
849 853 public Q_SLOTS:
850 854 QSize* new_QSize();
851 855 QSize* new_QSize(int w, int h);
852 856 QSize* new_QSize(const QSize& other) {
853 857 QSize* a = new QSize();
854 858 *((QSize*)a) = other;
855 859 return a; }
856 860 void delete_QSize(QSize* obj) { delete obj; }
857 861 QSize boundedTo(QSize* theWrappedObject, const QSize& arg__1) const;
858 862 QSize expandedTo(QSize* theWrappedObject, const QSize& arg__1) const;
859 863 int height(QSize* theWrappedObject) const;
860 864 bool isEmpty(QSize* theWrappedObject) const;
861 865 bool isNull(QSize* theWrappedObject) const;
862 866 bool isValid(QSize* theWrappedObject) const;
863 867 const QSize __mul__(QSize* theWrappedObject, qreal c);
864 868 QSize* __imul__(QSize* theWrappedObject, qreal c);
865 869 const QSize __add__(QSize* theWrappedObject, const QSize& s2);
866 870 QSize* __iadd__(QSize* theWrappedObject, const QSize& arg__1);
867 871 const QSize __sub__(QSize* theWrappedObject, const QSize& s2);
868 872 QSize* __isub__(QSize* theWrappedObject, const QSize& arg__1);
869 873 const QSize __div__(QSize* theWrappedObject, qreal c);
870 874 QSize* __idiv__(QSize* theWrappedObject, qreal c);
871 875 void writeTo(QSize* theWrappedObject, QDataStream& arg__1);
872 876 bool __eq__(QSize* theWrappedObject, const QSize& s2);
873 877 void readFrom(QSize* theWrappedObject, QDataStream& arg__1);
874 878 void scale(QSize* theWrappedObject, const QSize& s, Qt::AspectRatioMode mode);
875 879 void scale(QSize* theWrappedObject, int w, int h, Qt::AspectRatioMode mode);
876 880 void setHeight(QSize* theWrappedObject, int h);
877 881 void setWidth(QSize* theWrappedObject, int w);
878 882 void transpose(QSize* theWrappedObject);
879 883 int width(QSize* theWrappedObject) const;
880 884 QString py_toString(QSize*);
881 885 bool __nonzero__(QSize* obj) { return !obj->isNull(); }
882 886 };
883 887
884 888
885 889
886 890
887 891
888 892 class PythonQtWrapper_QSizeF : public QObject
889 893 { Q_OBJECT
890 894 public:
891 895 public Q_SLOTS:
892 896 QSizeF* new_QSizeF();
893 897 QSizeF* new_QSizeF(const QSize& sz);
894 898 QSizeF* new_QSizeF(qreal w, qreal h);
895 899 QSizeF* new_QSizeF(const QSizeF& other) {
896 900 QSizeF* a = new QSizeF();
897 901 *((QSizeF*)a) = other;
898 902 return a; }
899 903 void delete_QSizeF(QSizeF* obj) { delete obj; }
900 904 QSizeF boundedTo(QSizeF* theWrappedObject, const QSizeF& arg__1) const;
901 905 QSizeF expandedTo(QSizeF* theWrappedObject, const QSizeF& arg__1) const;
902 906 qreal height(QSizeF* theWrappedObject) const;
903 907 bool isEmpty(QSizeF* theWrappedObject) const;
904 908 bool isNull(QSizeF* theWrappedObject) const;
905 909 bool isValid(QSizeF* theWrappedObject) const;
906 910 const QSizeF __mul__(QSizeF* theWrappedObject, qreal c);
907 911 QSizeF* __imul__(QSizeF* theWrappedObject, qreal c);
908 912 const QSizeF __add__(QSizeF* theWrappedObject, const QSizeF& s2);
909 913 QSizeF* __iadd__(QSizeF* theWrappedObject, const QSizeF& arg__1);
910 914 const QSizeF __sub__(QSizeF* theWrappedObject, const QSizeF& s2);
911 915 QSizeF* __isub__(QSizeF* theWrappedObject, const QSizeF& arg__1);
912 916 const QSizeF __div__(QSizeF* theWrappedObject, qreal c);
913 917 QSizeF* __idiv__(QSizeF* theWrappedObject, qreal c);
914 918 void writeTo(QSizeF* theWrappedObject, QDataStream& arg__1);
915 919 bool __eq__(QSizeF* theWrappedObject, const QSizeF& s2);
916 920 void readFrom(QSizeF* theWrappedObject, QDataStream& arg__1);
917 921 void scale(QSizeF* theWrappedObject, const QSizeF& s, Qt::AspectRatioMode mode);
918 922 void scale(QSizeF* theWrappedObject, qreal w, qreal h, Qt::AspectRatioMode mode);
919 923 void setHeight(QSizeF* theWrappedObject, qreal h);
920 924 void setWidth(QSizeF* theWrappedObject, qreal w);
921 925 QSize toSize(QSizeF* theWrappedObject) const;
922 926 void transpose(QSizeF* theWrappedObject);
923 927 qreal width(QSizeF* theWrappedObject) const;
924 928 QString py_toString(QSizeF*);
925 929 bool __nonzero__(QSizeF* obj) { return !obj->isNull(); }
926 930 };
927 931
928 932
929 933
930 934
931 935
932 936 class PythonQtWrapper_QTime : public QObject
933 937 { Q_OBJECT
934 938 public:
935 939 public Q_SLOTS:
936 940 QTime* new_QTime();
937 941 QTime* new_QTime(int h, int m, int s = 0, int ms = 0);
938 942 QTime* new_QTime(const QTime& other) {
939 943 QTime* a = new QTime();
940 944 *((QTime*)a) = other;
941 945 return a; }
942 946 void delete_QTime(QTime* obj) { delete obj; }
943 947 QTime addMSecs(QTime* theWrappedObject, int ms) const;
944 948 QTime addSecs(QTime* theWrappedObject, int secs) const;
945 949 QTime static_QTime_currentTime();
946 950 int elapsed(QTime* theWrappedObject) const;
947 951 QTime static_QTime_fromString(const QString& s, Qt::DateFormat f = Qt::TextDate);
948 952 QTime static_QTime_fromString(const QString& s, const QString& format);
949 953 int hour(QTime* theWrappedObject) const;
950 954 bool isNull(QTime* theWrappedObject) const;
951 955 bool isValid(QTime* theWrappedObject) const;
952 956 bool static_QTime_isValid(int h, int m, int s, int ms = 0);
953 957 int minute(QTime* theWrappedObject) const;
954 958 int msec(QTime* theWrappedObject) const;
955 959 int msecsTo(QTime* theWrappedObject, const QTime& arg__1) const;
956 960 bool __ne__(QTime* theWrappedObject, const QTime& other) const;
957 961 bool __lt__(QTime* theWrappedObject, const QTime& other) const;
958 962 void writeTo(QTime* theWrappedObject, QDataStream& arg__1);
959 963 bool __le__(QTime* theWrappedObject, const QTime& other) const;
960 964 bool __eq__(QTime* theWrappedObject, const QTime& other) const;
961 965 bool __gt__(QTime* theWrappedObject, const QTime& other) const;
962 966 bool __ge__(QTime* theWrappedObject, const QTime& other) const;
963 967 void readFrom(QTime* theWrappedObject, QDataStream& arg__1);
964 968 int restart(QTime* theWrappedObject);
965 969 int second(QTime* theWrappedObject) const;
966 970 int secsTo(QTime* theWrappedObject, const QTime& arg__1) const;
967 971 bool setHMS(QTime* theWrappedObject, int h, int m, int s, int ms = 0);
968 972 void start(QTime* theWrappedObject);
969 973 QString toString(QTime* theWrappedObject, Qt::DateFormat f = Qt::TextDate) const;
970 974 QString toString(QTime* theWrappedObject, const QString& format) const;
971 975 QString py_toString(QTime*);
972 976 bool __nonzero__(QTime* obj) { return !obj->isNull(); }
973 977 };
974 978
975 979
976 980
977 981
978 982
979 983 class PythonQtWrapper_QUrl : public QObject
980 984 { Q_OBJECT
981 985 public:
982 986 Q_ENUMS(ParsingMode FormattingOption )
983 987 Q_FLAGS(FormattingOptions )
984 988 enum ParsingMode{
985 989 TolerantMode = QUrl::TolerantMode, StrictMode = QUrl::StrictMode};
986 990 enum FormattingOption{
987 991 None = QUrl::None, RemoveScheme = QUrl::RemoveScheme, RemovePassword = QUrl::RemovePassword, RemoveUserInfo = QUrl::RemoveUserInfo, RemovePort = QUrl::RemovePort, RemoveAuthority = QUrl::RemoveAuthority, RemovePath = QUrl::RemovePath, RemoveQuery = QUrl::RemoveQuery, RemoveFragment = QUrl::RemoveFragment, StripTrailingSlash = QUrl::StripTrailingSlash};
988 992 Q_DECLARE_FLAGS(FormattingOptions, FormattingOption)
989 993 public Q_SLOTS:
990 994 QUrl* new_QUrl();
991 995 QUrl* new_QUrl(const QString& url);
992 996 QUrl* new_QUrl(const QString& url, QUrl::ParsingMode mode);
993 997 QUrl* new_QUrl(const QUrl& copy);
994 998 void delete_QUrl(QUrl* obj) { delete obj; }
995 999 void addEncodedQueryItem(QUrl* theWrappedObject, const QByteArray& key, const QByteArray& value);
996 1000 void addQueryItem(QUrl* theWrappedObject, const QString& key, const QString& value);
997 1001 QList<QByteArray > allEncodedQueryItemValues(QUrl* theWrappedObject, const QByteArray& key) const;
998 1002 QStringList allQueryItemValues(QUrl* theWrappedObject, const QString& key) const;
999 1003 QString authority(QUrl* theWrappedObject) const;
1000 1004 void clear(QUrl* theWrappedObject);
1001 1005 QByteArray encodedFragment(QUrl* theWrappedObject) const;
1002 1006 QByteArray encodedHost(QUrl* theWrappedObject) const;
1003 1007 QByteArray encodedPassword(QUrl* theWrappedObject) const;
1004 1008 QByteArray encodedPath(QUrl* theWrappedObject) const;
1005 1009 QByteArray encodedQuery(QUrl* theWrappedObject) const;
1006 1010 QByteArray encodedQueryItemValue(QUrl* theWrappedObject, const QByteArray& key) const;
1007 1011 QList<QPair<QByteArray , QByteArray > > encodedQueryItems(QUrl* theWrappedObject) const;
1008 1012 QByteArray encodedUserName(QUrl* theWrappedObject) const;
1009 1013 QString errorString(QUrl* theWrappedObject) const;
1010 1014 QString fragment(QUrl* theWrappedObject) const;
1011 1015 QString static_QUrl_fromAce(const QByteArray& arg__1);
1012 1016 QUrl static_QUrl_fromEncoded(const QByteArray& url);
1013 1017 QUrl static_QUrl_fromEncoded(const QByteArray& url, QUrl::ParsingMode mode);
1014 1018 QUrl static_QUrl_fromLocalFile(const QString& localfile);
1015 1019 QString static_QUrl_fromPercentEncoding(const QByteArray& arg__1);
1016 1020 QUrl static_QUrl_fromUserInput(const QString& userInput);
1017 1021 bool hasEncodedQueryItem(QUrl* theWrappedObject, const QByteArray& key) const;
1018 1022 bool hasFragment(QUrl* theWrappedObject) const;
1019 1023 bool hasQuery(QUrl* theWrappedObject) const;
1020 1024 bool hasQueryItem(QUrl* theWrappedObject, const QString& key) const;
1021 1025 QString host(QUrl* theWrappedObject) const;
1022 1026 QStringList static_QUrl_idnWhitelist();
1023 1027 bool isEmpty(QUrl* theWrappedObject) const;
1024 1028 bool isLocalFile(QUrl* theWrappedObject) const;
1025 1029 bool isParentOf(QUrl* theWrappedObject, const QUrl& url) const;
1026 1030 bool isRelative(QUrl* theWrappedObject) const;
1027 1031 bool isValid(QUrl* theWrappedObject) const;
1028 1032 bool __ne__(QUrl* theWrappedObject, const QUrl& url) const;
1029 1033 bool __lt__(QUrl* theWrappedObject, const QUrl& url) const;
1030 1034 void writeTo(QUrl* theWrappedObject, QDataStream& arg__1);
1031 1035 bool __eq__(QUrl* theWrappedObject, const QUrl& url) const;
1032 1036 void readFrom(QUrl* theWrappedObject, QDataStream& arg__1);
1033 1037 QString password(QUrl* theWrappedObject) const;
1034 1038 QString path(QUrl* theWrappedObject) const;
1035 1039 int port(QUrl* theWrappedObject) const;
1036 1040 int port(QUrl* theWrappedObject, int defaultPort) const;
1037 1041 QString queryItemValue(QUrl* theWrappedObject, const QString& key) const;
1038 1042 QList<QPair<QString , QString > > queryItems(QUrl* theWrappedObject) const;
1039 1043 char queryPairDelimiter(QUrl* theWrappedObject) const;
1040 1044 char queryValueDelimiter(QUrl* theWrappedObject) const;
1041 1045 void removeAllEncodedQueryItems(QUrl* theWrappedObject, const QByteArray& key);
1042 1046 void removeAllQueryItems(QUrl* theWrappedObject, const QString& key);
1043 1047 void removeEncodedQueryItem(QUrl* theWrappedObject, const QByteArray& key);
1044 1048 void removeQueryItem(QUrl* theWrappedObject, const QString& key);
1045 1049 QUrl resolved(QUrl* theWrappedObject, const QUrl& relative) const;
1046 1050 QString scheme(QUrl* theWrappedObject) const;
1047 1051 void setAuthority(QUrl* theWrappedObject, const QString& authority);
1048 1052 void setEncodedFragment(QUrl* theWrappedObject, const QByteArray& fragment);
1049 1053 void setEncodedHost(QUrl* theWrappedObject, const QByteArray& host);
1050 1054 void setEncodedPassword(QUrl* theWrappedObject, const QByteArray& password);
1051 1055 void setEncodedPath(QUrl* theWrappedObject, const QByteArray& path);
1052 1056 void setEncodedQuery(QUrl* theWrappedObject, const QByteArray& query);
1053 1057 void setEncodedQueryItems(QUrl* theWrappedObject, const QList<QPair<QByteArray , QByteArray > >& query);
1054 1058 void setEncodedUrl(QUrl* theWrappedObject, const QByteArray& url);
1055 1059 void setEncodedUrl(QUrl* theWrappedObject, const QByteArray& url, QUrl::ParsingMode mode);
1056 1060 void setEncodedUserName(QUrl* theWrappedObject, const QByteArray& userName);
1057 1061 void setFragment(QUrl* theWrappedObject, const QString& fragment);
1058 1062 void setHost(QUrl* theWrappedObject, const QString& host);
1059 1063 void static_QUrl_setIdnWhitelist(const QStringList& arg__1);
1060 1064 void setPassword(QUrl* theWrappedObject, const QString& password);
1061 1065 void setPath(QUrl* theWrappedObject, const QString& path);
1062 1066 void setPort(QUrl* theWrappedObject, int port);
1063 1067 void setQueryDelimiters(QUrl* theWrappedObject, char valueDelimiter, char pairDelimiter);
1064 1068 void setQueryItems(QUrl* theWrappedObject, const QList<QPair<QString , QString > >& query);
1065 1069 void setScheme(QUrl* theWrappedObject, const QString& scheme);
1066 1070 void setUrl(QUrl* theWrappedObject, const QString& url);
1067 1071 void setUrl(QUrl* theWrappedObject, const QString& url, QUrl::ParsingMode mode);
1068 1072 void setUserInfo(QUrl* theWrappedObject, const QString& userInfo);
1069 1073 void setUserName(QUrl* theWrappedObject, const QString& userName);
1070 1074 void swap(QUrl* theWrappedObject, QUrl& other);
1071 1075 QByteArray static_QUrl_toAce(const QString& arg__1);
1072 1076 QByteArray toEncoded(QUrl* theWrappedObject, QUrl::FormattingOptions options = QUrl::None) const;
1073 1077 QString toLocalFile(QUrl* theWrappedObject) const;
1074 1078 QByteArray static_QUrl_toPercentEncoding(const QString& arg__1, const QByteArray& exclude = QByteArray(), const QByteArray& include = QByteArray());
1075 1079 QString toString(QUrl* theWrappedObject, QUrl::FormattingOptions options = QUrl::None) const;
1076 1080 QString topLevelDomain(QUrl* theWrappedObject) const;
1077 1081 QString userInfo(QUrl* theWrappedObject) const;
1078 1082 QString userName(QUrl* theWrappedObject) const;
1079 1083 QString py_toString(QUrl*);
1080 1084 };
1081 1085
1082 1086
1083 1087
1084 1088
1085 1089
1086 1090 class PythonQtWrapper_Qt : public QObject
1087 1091 { Q_OBJECT
1088 1092 public:
1089 1093 Q_ENUMS(ShortcutContext CheckState FocusPolicy GestureType DropAction WindowType DateFormat TextFormat PenJoinStyle GestureFlag CaseSensitivity EventPriority ImageConversionFlag CursorMoveStyle GestureState BGMode ConnectionType ToolBarArea CoordinateSystem SizeMode FocusReason TileRule WhiteSpaceMode AspectRatioMode SizeHint AlignmentFlag ContextMenuPolicy DockWidgetArea UIEffect AnchorPoint GlobalColor KeyboardModifier NavigationMode ItemDataRole ScrollBarPolicy InputMethodHint AnchorAttribute WindowModality SortOrder PenStyle ItemFlag Axis TransformationMode WindowFrameSection HitTestAccuracy CursorShape ItemSelectionMode Orientation InputMethodQuery TimeSpec ArrowType FillRule MaskMode WindowState ToolBarAreaSizes Corner DayOfWeek ClipOperation LayoutDirection ToolButtonStyle DockWidgetAreaSizes Key ApplicationAttribute TextFlag BrushStyle WidgetAttribute TouchPointState TextInteractionFlag MouseButton MatchFlag PenCapStyle TextElideMode )
1090 1094 Q_FLAGS(DropActions WindowFlags GestureFlags ImageConversionFlags ToolBarAreas Alignment DockWidgetAreas KeyboardModifiers InputMethodHints ItemFlags Orientations WindowStates TouchPointStates TextInteractionFlags MouseButtons MatchFlags )
1091 1095 enum ShortcutContext{
1092 1096 WidgetShortcut = Qt::WidgetShortcut, WindowShortcut = Qt::WindowShortcut, ApplicationShortcut = Qt::ApplicationShortcut, WidgetWithChildrenShortcut = Qt::WidgetWithChildrenShortcut};
1093 1097 enum CheckState{
1094 1098 Unchecked = Qt::Unchecked, PartiallyChecked = Qt::PartiallyChecked, Checked = Qt::Checked};
1095 1099 enum FocusPolicy{
1096 1100 NoFocus = Qt::NoFocus, TabFocus = Qt::TabFocus, ClickFocus = Qt::ClickFocus, StrongFocus = Qt::StrongFocus, WheelFocus = Qt::WheelFocus};
1097 1101 enum GestureType{
1098 1102 TapGesture = Qt::TapGesture, TapAndHoldGesture = Qt::TapAndHoldGesture, PanGesture = Qt::PanGesture, PinchGesture = Qt::PinchGesture, SwipeGesture = Qt::SwipeGesture, CustomGesture = Qt::CustomGesture, LastGestureType = Qt::LastGestureType};
1099 1103 enum DropAction{
1100 1104 CopyAction = Qt::CopyAction, MoveAction = Qt::MoveAction, LinkAction = Qt::LinkAction, ActionMask = Qt::ActionMask, TargetMoveAction = Qt::TargetMoveAction, IgnoreAction = Qt::IgnoreAction};
1101 1105 enum WindowType{
1102 1106 Widget = Qt::Widget, Window = Qt::Window, Dialog = Qt::Dialog, Sheet = Qt::Sheet, Drawer = Qt::Drawer, Popup = Qt::Popup, Tool = Qt::Tool, ToolTip = Qt::ToolTip, SplashScreen = Qt::SplashScreen, Desktop = Qt::Desktop, SubWindow = Qt::SubWindow, WindowType_Mask = Qt::WindowType_Mask, MSWindowsFixedSizeDialogHint = Qt::MSWindowsFixedSizeDialogHint, MSWindowsOwnDC = Qt::MSWindowsOwnDC, X11BypassWindowManagerHint = Qt::X11BypassWindowManagerHint, FramelessWindowHint = Qt::FramelessWindowHint, WindowTitleHint = Qt::WindowTitleHint, WindowSystemMenuHint = Qt::WindowSystemMenuHint, WindowMinimizeButtonHint = Qt::WindowMinimizeButtonHint, WindowMaximizeButtonHint = Qt::WindowMaximizeButtonHint, WindowMinMaxButtonsHint = Qt::WindowMinMaxButtonsHint, WindowContextHelpButtonHint = Qt::WindowContextHelpButtonHint, WindowShadeButtonHint = Qt::WindowShadeButtonHint, WindowStaysOnTopHint = Qt::WindowStaysOnTopHint, CustomizeWindowHint = Qt::CustomizeWindowHint, WindowStaysOnBottomHint = Qt::WindowStaysOnBottomHint, WindowCloseButtonHint = Qt::WindowCloseButtonHint, MacWindowToolBarButtonHint = Qt::MacWindowToolBarButtonHint, BypassGraphicsProxyWidget = Qt::BypassGraphicsProxyWidget, WindowOkButtonHint = Qt::WindowOkButtonHint, WindowCancelButtonHint = Qt::WindowCancelButtonHint, WindowSoftkeysVisibleHint = Qt::WindowSoftkeysVisibleHint, WindowSoftkeysRespondHint = Qt::WindowSoftkeysRespondHint};
1103 1107 enum DateFormat{
1104 1108 TextDate = Qt::TextDate, ISODate = Qt::ISODate, SystemLocaleDate = Qt::SystemLocaleDate, LocalDate = Qt::LocalDate, LocaleDate = Qt::LocaleDate, SystemLocaleShortDate = Qt::SystemLocaleShortDate, SystemLocaleLongDate = Qt::SystemLocaleLongDate, DefaultLocaleShortDate = Qt::DefaultLocaleShortDate, DefaultLocaleLongDate = Qt::DefaultLocaleLongDate};
1105 1109 enum TextFormat{
1106 1110 PlainText = Qt::PlainText, RichText = Qt::RichText, AutoText = Qt::AutoText, LogText = Qt::LogText};
1107 1111 enum PenJoinStyle{
1108 1112 MiterJoin = Qt::MiterJoin, BevelJoin = Qt::BevelJoin, RoundJoin = Qt::RoundJoin, SvgMiterJoin = Qt::SvgMiterJoin, MPenJoinStyle = Qt::MPenJoinStyle};
1109 1113 enum GestureFlag{
1110 1114 DontStartGestureOnChildren = Qt::DontStartGestureOnChildren, ReceivePartialGestures = Qt::ReceivePartialGestures, IgnoredGesturesPropagateToParent = Qt::IgnoredGesturesPropagateToParent};
1111 1115 enum CaseSensitivity{
1112 1116 CaseInsensitive = Qt::CaseInsensitive, CaseSensitive = Qt::CaseSensitive};
1113 1117 enum EventPriority{
1114 1118 HighEventPriority = Qt::HighEventPriority, NormalEventPriority = Qt::NormalEventPriority, LowEventPriority = Qt::LowEventPriority};
1115 1119 enum ImageConversionFlag{
1116 1120 ColorMode_Mask = Qt::ColorMode_Mask, AutoColor = Qt::AutoColor, ColorOnly = Qt::ColorOnly, MonoOnly = Qt::MonoOnly, AlphaDither_Mask = Qt::AlphaDither_Mask, ThresholdAlphaDither = Qt::ThresholdAlphaDither, OrderedAlphaDither = Qt::OrderedAlphaDither, DiffuseAlphaDither = Qt::DiffuseAlphaDither, NoAlpha = Qt::NoAlpha, Dither_Mask = Qt::Dither_Mask, DiffuseDither = Qt::DiffuseDither, OrderedDither = Qt::OrderedDither, ThresholdDither = Qt::ThresholdDither, DitherMode_Mask = Qt::DitherMode_Mask, AutoDither = Qt::AutoDither, PreferDither = Qt::PreferDither, AvoidDither = Qt::AvoidDither, NoOpaqueDetection = Qt::NoOpaqueDetection, NoFormatConversion = Qt::NoFormatConversion};
1117 1121 enum CursorMoveStyle{
1118 1122 LogicalMoveStyle = Qt::LogicalMoveStyle, VisualMoveStyle = Qt::VisualMoveStyle};
1119 1123 enum GestureState{
1120 1124 NoGesture = Qt::NoGesture, GestureStarted = Qt::GestureStarted, GestureUpdated = Qt::GestureUpdated, GestureFinished = Qt::GestureFinished, GestureCanceled = Qt::GestureCanceled};
1121 1125 enum BGMode{
1122 1126 TransparentMode = Qt::TransparentMode, OpaqueMode = Qt::OpaqueMode};
1123 1127 enum ConnectionType{
1124 1128 AutoConnection = Qt::AutoConnection, DirectConnection = Qt::DirectConnection, QueuedConnection = Qt::QueuedConnection, AutoCompatConnection = Qt::AutoCompatConnection, BlockingQueuedConnection = Qt::BlockingQueuedConnection, UniqueConnection = Qt::UniqueConnection};
1125 1129 enum ToolBarArea{
1126 1130 LeftToolBarArea = Qt::LeftToolBarArea, RightToolBarArea = Qt::RightToolBarArea, TopToolBarArea = Qt::TopToolBarArea, BottomToolBarArea = Qt::BottomToolBarArea, ToolBarArea_Mask = Qt::ToolBarArea_Mask, AllToolBarAreas = Qt::AllToolBarAreas, NoToolBarArea = Qt::NoToolBarArea};
1127 1131 enum CoordinateSystem{
1128 1132 DeviceCoordinates = Qt::DeviceCoordinates, LogicalCoordinates = Qt::LogicalCoordinates};
1129 1133 enum SizeMode{
1130 1134 AbsoluteSize = Qt::AbsoluteSize, RelativeSize = Qt::RelativeSize};
1131 1135 enum FocusReason{
1132 1136 MouseFocusReason = Qt::MouseFocusReason, TabFocusReason = Qt::TabFocusReason, BacktabFocusReason = Qt::BacktabFocusReason, ActiveWindowFocusReason = Qt::ActiveWindowFocusReason, PopupFocusReason = Qt::PopupFocusReason, ShortcutFocusReason = Qt::ShortcutFocusReason, MenuBarFocusReason = Qt::MenuBarFocusReason, OtherFocusReason = Qt::OtherFocusReason, NoFocusReason = Qt::NoFocusReason};
1133 1137 enum TileRule{
1134 1138 StretchTile = Qt::StretchTile, RepeatTile = Qt::RepeatTile, RoundTile = Qt::RoundTile};
1135 1139 enum WhiteSpaceMode{
1136 1140 WhiteSpaceNormal = Qt::WhiteSpaceNormal, WhiteSpacePre = Qt::WhiteSpacePre, WhiteSpaceNoWrap = Qt::WhiteSpaceNoWrap, WhiteSpaceModeUndefined = Qt::WhiteSpaceModeUndefined};
1137 1141 enum AspectRatioMode{
1138 1142 IgnoreAspectRatio = Qt::IgnoreAspectRatio, KeepAspectRatio = Qt::KeepAspectRatio, KeepAspectRatioByExpanding = Qt::KeepAspectRatioByExpanding};
1139 1143 enum SizeHint{
1140 1144 MinimumSize = Qt::MinimumSize, PreferredSize = Qt::PreferredSize, MaximumSize = Qt::MaximumSize, MinimumDescent = Qt::MinimumDescent, NSizeHints = Qt::NSizeHints};
1141 1145 enum AlignmentFlag{
1142 1146 AlignLeft = Qt::AlignLeft, AlignLeading = Qt::AlignLeading, AlignRight = Qt::AlignRight, AlignTrailing = Qt::AlignTrailing, AlignHCenter = Qt::AlignHCenter, AlignJustify = Qt::AlignJustify, AlignAbsolute = Qt::AlignAbsolute, AlignHorizontal_Mask = Qt::AlignHorizontal_Mask, AlignTop = Qt::AlignTop, AlignBottom = Qt::AlignBottom, AlignVCenter = Qt::AlignVCenter, AlignVertical_Mask = Qt::AlignVertical_Mask, AlignCenter = Qt::AlignCenter};
1143 1147 enum ContextMenuPolicy{
1144 1148 NoContextMenu = Qt::NoContextMenu, DefaultContextMenu = Qt::DefaultContextMenu, ActionsContextMenu = Qt::ActionsContextMenu, CustomContextMenu = Qt::CustomContextMenu, PreventContextMenu = Qt::PreventContextMenu};
1145 1149 enum DockWidgetArea{
1146 1150 LeftDockWidgetArea = Qt::LeftDockWidgetArea, RightDockWidgetArea = Qt::RightDockWidgetArea, TopDockWidgetArea = Qt::TopDockWidgetArea, BottomDockWidgetArea = Qt::BottomDockWidgetArea, DockWidgetArea_Mask = Qt::DockWidgetArea_Mask, AllDockWidgetAreas = Qt::AllDockWidgetAreas, NoDockWidgetArea = Qt::NoDockWidgetArea};
1147 1151 enum UIEffect{
1148 1152 UI_General = Qt::UI_General, UI_AnimateMenu = Qt::UI_AnimateMenu, UI_FadeMenu = Qt::UI_FadeMenu, UI_AnimateCombo = Qt::UI_AnimateCombo, UI_AnimateTooltip = Qt::UI_AnimateTooltip, UI_FadeTooltip = Qt::UI_FadeTooltip, UI_AnimateToolBox = Qt::UI_AnimateToolBox};
1149 1153 enum AnchorPoint{
1150 1154 AnchorLeft = Qt::AnchorLeft, AnchorHorizontalCenter = Qt::AnchorHorizontalCenter, AnchorRight = Qt::AnchorRight, AnchorTop = Qt::AnchorTop, AnchorVerticalCenter = Qt::AnchorVerticalCenter, AnchorBottom = Qt::AnchorBottom};
1151 1155 enum GlobalColor{
1152 1156 color0 = Qt::color0, color1 = Qt::color1, black = Qt::black, white = Qt::white, darkGray = Qt::darkGray, gray = Qt::gray, lightGray = Qt::lightGray, red = Qt::red, green = Qt::green, blue = Qt::blue, cyan = Qt::cyan, magenta = Qt::magenta, yellow = Qt::yellow, darkRed = Qt::darkRed, darkGreen = Qt::darkGreen, darkBlue = Qt::darkBlue, darkCyan = Qt::darkCyan, darkMagenta = Qt::darkMagenta, darkYellow = Qt::darkYellow, transparent = Qt::transparent};
1153 1157 enum KeyboardModifier{
1154 1158 NoModifier = Qt::NoModifier, ShiftModifier = Qt::ShiftModifier, ControlModifier = Qt::ControlModifier, AltModifier = Qt::AltModifier, MetaModifier = Qt::MetaModifier, KeypadModifier = Qt::KeypadModifier, GroupSwitchModifier = Qt::GroupSwitchModifier, KeyboardModifierMask = Qt::KeyboardModifierMask};
1155 1159 enum NavigationMode{
1156 1160 NavigationModeNone = Qt::NavigationModeNone, NavigationModeKeypadTabOrder = Qt::NavigationModeKeypadTabOrder, NavigationModeKeypadDirectional = Qt::NavigationModeKeypadDirectional, NavigationModeCursorAuto = Qt::NavigationModeCursorAuto, NavigationModeCursorForceVisible = Qt::NavigationModeCursorForceVisible};
1157 1161 enum ItemDataRole{
1158 1162 DisplayRole = Qt::DisplayRole, DecorationRole = Qt::DecorationRole, EditRole = Qt::EditRole, ToolTipRole = Qt::ToolTipRole, StatusTipRole = Qt::StatusTipRole, WhatsThisRole = Qt::WhatsThisRole, FontRole = Qt::FontRole, TextAlignmentRole = Qt::TextAlignmentRole, BackgroundColorRole = Qt::BackgroundColorRole, BackgroundRole = Qt::BackgroundRole, TextColorRole = Qt::TextColorRole, ForegroundRole = Qt::ForegroundRole, CheckStateRole = Qt::CheckStateRole, AccessibleTextRole = Qt::AccessibleTextRole, AccessibleDescriptionRole = Qt::AccessibleDescriptionRole, SizeHintRole = Qt::SizeHintRole, InitialSortOrderRole = Qt::InitialSortOrderRole, DisplayPropertyRole = Qt::DisplayPropertyRole, DecorationPropertyRole = Qt::DecorationPropertyRole, ToolTipPropertyRole = Qt::ToolTipPropertyRole, StatusTipPropertyRole = Qt::StatusTipPropertyRole, WhatsThisPropertyRole = Qt::WhatsThisPropertyRole, UserRole = Qt::UserRole};
1159 1163 enum ScrollBarPolicy{
1160 1164 ScrollBarAsNeeded = Qt::ScrollBarAsNeeded, ScrollBarAlwaysOff = Qt::ScrollBarAlwaysOff, ScrollBarAlwaysOn = Qt::ScrollBarAlwaysOn};
1161 1165 enum InputMethodHint{
1162 1166 ImhNone = Qt::ImhNone, ImhHiddenText = Qt::ImhHiddenText, ImhNoAutoUppercase = Qt::ImhNoAutoUppercase, ImhPreferNumbers = Qt::ImhPreferNumbers, ImhPreferUppercase = Qt::ImhPreferUppercase, ImhPreferLowercase = Qt::ImhPreferLowercase, ImhNoPredictiveText = Qt::ImhNoPredictiveText, ImhDigitsOnly = Qt::ImhDigitsOnly, ImhFormattedNumbersOnly = Qt::ImhFormattedNumbersOnly, ImhUppercaseOnly = Qt::ImhUppercaseOnly, ImhLowercaseOnly = Qt::ImhLowercaseOnly, ImhDialableCharactersOnly = Qt::ImhDialableCharactersOnly, ImhEmailCharactersOnly = Qt::ImhEmailCharactersOnly, ImhUrlCharactersOnly = Qt::ImhUrlCharactersOnly, ImhExclusiveInputMask = Qt::ImhExclusiveInputMask};
1163 1167 enum AnchorAttribute{
1164 1168 AnchorName = Qt::AnchorName, AnchorHref = Qt::AnchorHref};
1165 1169 enum WindowModality{
1166 1170 NonModal = Qt::NonModal, WindowModal = Qt::WindowModal, ApplicationModal = Qt::ApplicationModal};
1167 1171 enum SortOrder{
1168 1172 AscendingOrder = Qt::AscendingOrder, DescendingOrder = Qt::DescendingOrder};
1169 1173 enum PenStyle{
1170 1174 NoPen = Qt::NoPen, SolidLine = Qt::SolidLine, DashLine = Qt::DashLine, DotLine = Qt::DotLine, DashDotLine = Qt::DashDotLine, DashDotDotLine = Qt::DashDotDotLine, CustomDashLine = Qt::CustomDashLine, MPenStyle = Qt::MPenStyle};
1171 1175 enum ItemFlag{
1172 1176 NoItemFlags = Qt::NoItemFlags, ItemIsSelectable = Qt::ItemIsSelectable, ItemIsEditable = Qt::ItemIsEditable, ItemIsDragEnabled = Qt::ItemIsDragEnabled, ItemIsDropEnabled = Qt::ItemIsDropEnabled, ItemIsUserCheckable = Qt::ItemIsUserCheckable, ItemIsEnabled = Qt::ItemIsEnabled, ItemIsTristate = Qt::ItemIsTristate};
1173 1177 enum Axis{
1174 1178 XAxis = Qt::XAxis, YAxis = Qt::YAxis, ZAxis = Qt::ZAxis};
1175 1179 enum TransformationMode{
1176 1180 FastTransformation = Qt::FastTransformation, SmoothTransformation = Qt::SmoothTransformation};
1177 1181 enum WindowFrameSection{
1178 1182 NoSection = Qt::NoSection, LeftSection = Qt::LeftSection, TopLeftSection = Qt::TopLeftSection, TopSection = Qt::TopSection, TopRightSection = Qt::TopRightSection, RightSection = Qt::RightSection, BottomRightSection = Qt::BottomRightSection, BottomSection = Qt::BottomSection, BottomLeftSection = Qt::BottomLeftSection, TitleBarArea = Qt::TitleBarArea};
1179 1183 enum HitTestAccuracy{
1180 1184 ExactHit = Qt::ExactHit, FuzzyHit = Qt::FuzzyHit};
1181 1185 enum CursorShape{
1182 1186 ArrowCursor = Qt::ArrowCursor, UpArrowCursor = Qt::UpArrowCursor, CrossCursor = Qt::CrossCursor, WaitCursor = Qt::WaitCursor, IBeamCursor = Qt::IBeamCursor, SizeVerCursor = Qt::SizeVerCursor, SizeHorCursor = Qt::SizeHorCursor, SizeBDiagCursor = Qt::SizeBDiagCursor, SizeFDiagCursor = Qt::SizeFDiagCursor, SizeAllCursor = Qt::SizeAllCursor, BlankCursor = Qt::BlankCursor, SplitVCursor = Qt::SplitVCursor, SplitHCursor = Qt::SplitHCursor, PointingHandCursor = Qt::PointingHandCursor, ForbiddenCursor = Qt::ForbiddenCursor, WhatsThisCursor = Qt::WhatsThisCursor, BusyCursor = Qt::BusyCursor, OpenHandCursor = Qt::OpenHandCursor, ClosedHandCursor = Qt::ClosedHandCursor, DragCopyCursor = Qt::DragCopyCursor, DragMoveCursor = Qt::DragMoveCursor, DragLinkCursor = Qt::DragLinkCursor, LastCursor = Qt::LastCursor, BitmapCursor = Qt::BitmapCursor, CustomCursor = Qt::CustomCursor};
1183 1187 enum ItemSelectionMode{
1184 1188 ContainsItemShape = Qt::ContainsItemShape, IntersectsItemShape = Qt::IntersectsItemShape, ContainsItemBoundingRect = Qt::ContainsItemBoundingRect, IntersectsItemBoundingRect = Qt::IntersectsItemBoundingRect};
1185 1189 enum Orientation{
1186 1190 Horizontal = Qt::Horizontal, Vertical = Qt::Vertical};
1187 1191 enum InputMethodQuery{
1188 1192 ImMicroFocus = Qt::ImMicroFocus, ImFont = Qt::ImFont, ImCursorPosition = Qt::ImCursorPosition, ImSurroundingText = Qt::ImSurroundingText, ImCurrentSelection = Qt::ImCurrentSelection, ImMaximumTextLength = Qt::ImMaximumTextLength, ImAnchorPosition = Qt::ImAnchorPosition};
1189 1193 enum TimeSpec{
1190 1194 LocalTime = Qt::LocalTime, UTC = Qt::UTC, OffsetFromUTC = Qt::OffsetFromUTC};
1191 1195 enum ArrowType{
1192 1196 NoArrow = Qt::NoArrow, UpArrow = Qt::UpArrow, DownArrow = Qt::DownArrow, LeftArrow = Qt::LeftArrow, RightArrow = Qt::RightArrow};
1193 1197 enum FillRule{
1194 1198 OddEvenFill = Qt::OddEvenFill, WindingFill = Qt::WindingFill};
1195 1199 enum MaskMode{
1196 1200 MaskInColor = Qt::MaskInColor, MaskOutColor = Qt::MaskOutColor};
1197 1201 enum WindowState{
1198 1202 WindowNoState = Qt::WindowNoState, WindowMinimized = Qt::WindowMinimized, WindowMaximized = Qt::WindowMaximized, WindowFullScreen = Qt::WindowFullScreen, WindowActive = Qt::WindowActive};
1199 1203 enum ToolBarAreaSizes{
1200 1204 NToolBarAreas = Qt::NToolBarAreas};
1201 1205 enum Corner{
1202 1206 TopLeftCorner = Qt::TopLeftCorner, TopRightCorner = Qt::TopRightCorner, BottomLeftCorner = Qt::BottomLeftCorner, BottomRightCorner = Qt::BottomRightCorner};
1203 1207 enum DayOfWeek{
1204 1208 Monday = Qt::Monday, Tuesday = Qt::Tuesday, Wednesday = Qt::Wednesday, Thursday = Qt::Thursday, Friday = Qt::Friday, Saturday = Qt::Saturday, Sunday = Qt::Sunday};
1205 1209 enum ClipOperation{
1206 1210 NoClip = Qt::NoClip, ReplaceClip = Qt::ReplaceClip, IntersectClip = Qt::IntersectClip, UniteClip = Qt::UniteClip};
1207 1211 enum LayoutDirection{
1208 1212 LeftToRight = Qt::LeftToRight, RightToLeft = Qt::RightToLeft, LayoutDirectionAuto = Qt::LayoutDirectionAuto};
1209 1213 enum ToolButtonStyle{
1210 1214 ToolButtonIconOnly = Qt::ToolButtonIconOnly, ToolButtonTextOnly = Qt::ToolButtonTextOnly, ToolButtonTextBesideIcon = Qt::ToolButtonTextBesideIcon, ToolButtonTextUnderIcon = Qt::ToolButtonTextUnderIcon, ToolButtonFollowStyle = Qt::ToolButtonFollowStyle};
1211 1215 enum DockWidgetAreaSizes{
1212 1216 NDockWidgetAreas = Qt::NDockWidgetAreas};
1213 1217 enum Key{
1214 1218 Key_Escape = Qt::Key_Escape, Key_Tab = Qt::Key_Tab, Key_Backtab = Qt::Key_Backtab, Key_Backspace = Qt::Key_Backspace, Key_Return = Qt::Key_Return, Key_Enter = Qt::Key_Enter, Key_Insert = Qt::Key_Insert, Key_Delete = Qt::Key_Delete, Key_Pause = Qt::Key_Pause, Key_Print = Qt::Key_Print, Key_SysReq = Qt::Key_SysReq, Key_Clear = Qt::Key_Clear, Key_Home = Qt::Key_Home, Key_End = Qt::Key_End, Key_Left = Qt::Key_Left, Key_Up = Qt::Key_Up, Key_Right = Qt::Key_Right, Key_Down = Qt::Key_Down, Key_PageUp = Qt::Key_PageUp, Key_PageDown = Qt::Key_PageDown, Key_Shift = Qt::Key_Shift, Key_Control = Qt::Key_Control, Key_Meta = Qt::Key_Meta, Key_Alt = Qt::Key_Alt, Key_CapsLock = Qt::Key_CapsLock, Key_NumLock = Qt::Key_NumLock, Key_ScrollLock = Qt::Key_ScrollLock, Key_F1 = Qt::Key_F1, Key_F2 = Qt::Key_F2, Key_F3 = Qt::Key_F3, Key_F4 = Qt::Key_F4, Key_F5 = Qt::Key_F5, Key_F6 = Qt::Key_F6, Key_F7 = Qt::Key_F7, Key_F8 = Qt::Key_F8, Key_F9 = Qt::Key_F9, Key_F10 = Qt::Key_F10, Key_F11 = Qt::Key_F11, Key_F12 = Qt::Key_F12, Key_F13 = Qt::Key_F13, Key_F14 = Qt::Key_F14, Key_F15 = Qt::Key_F15, Key_F16 = Qt::Key_F16, Key_F17 = Qt::Key_F17, Key_F18 = Qt::Key_F18, Key_F19 = Qt::Key_F19, Key_F20 = Qt::Key_F20, Key_F21 = Qt::Key_F21, Key_F22 = Qt::Key_F22, Key_F23 = Qt::Key_F23, Key_F24 = Qt::Key_F24, Key_F25 = Qt::Key_F25, Key_F26 = Qt::Key_F26, Key_F27 = Qt::Key_F27, Key_F28 = Qt::Key_F28, Key_F29 = Qt::Key_F29, Key_F30 = Qt::Key_F30, Key_F31 = Qt::Key_F31, Key_F32 = Qt::Key_F32, Key_F33 = Qt::Key_F33, Key_F34 = Qt::Key_F34, Key_F35 = Qt::Key_F35, Key_Super_L = Qt::Key_Super_L, Key_Super_R = Qt::Key_Super_R, Key_Menu = Qt::Key_Menu, Key_Hyper_L = Qt::Key_Hyper_L, Key_Hyper_R = Qt::Key_Hyper_R, Key_Help = Qt::Key_Help, Key_Direction_L = Qt::Key_Direction_L, Key_Direction_R = Qt::Key_Direction_R, Key_Space = Qt::Key_Space, Key_Any = Qt::Key_Any, Key_Exclam = Qt::Key_Exclam, Key_QuoteDbl = Qt::Key_QuoteDbl, Key_NumberSign = Qt::Key_NumberSign, Key_Dollar = Qt::Key_Dollar, Key_Percent = Qt::Key_Percent, Key_Ampersand = Qt::Key_Ampersand, Key_Apostrophe = Qt::Key_Apostrophe, Key_ParenLeft = Qt::Key_ParenLeft, Key_ParenRight = Qt::Key_ParenRight, Key_Asterisk = Qt::Key_Asterisk, Key_Plus = Qt::Key_Plus, Key_Comma = Qt::Key_Comma, Key_Minus = Qt::Key_Minus, Key_Period = Qt::Key_Period, Key_Slash = Qt::Key_Slash, Key_0 = Qt::Key_0, Key_1 = Qt::Key_1, Key_2 = Qt::Key_2, Key_3 = Qt::Key_3, Key_4 = Qt::Key_4, Key_5 = Qt::Key_5, Key_6 = Qt::Key_6, Key_7 = Qt::Key_7, Key_8 = Qt::Key_8, Key_9 = Qt::Key_9, Key_Colon = Qt::Key_Colon, Key_Semicolon = Qt::Key_Semicolon, Key_Less = Qt::Key_Less, Key_Equal = Qt::Key_Equal, Key_Greater = Qt::Key_Greater, Key_Question = Qt::Key_Question, Key_At = Qt::Key_At, Key_A = Qt::Key_A, Key_B = Qt::Key_B, Key_C = Qt::Key_C, Key_D = Qt::Key_D, Key_E = Qt::Key_E, Key_F = Qt::Key_F, Key_G = Qt::Key_G, Key_H = Qt::Key_H, Key_I = Qt::Key_I, Key_J = Qt::Key_J, Key_K = Qt::Key_K, Key_L = Qt::Key_L, Key_M = Qt::Key_M, Key_N = Qt::Key_N, Key_O = Qt::Key_O, Key_P = Qt::Key_P, Key_Q = Qt::Key_Q, Key_R = Qt::Key_R, Key_S = Qt::Key_S, Key_T = Qt::Key_T, Key_U = Qt::Key_U, Key_V = Qt::Key_V, Key_W = Qt::Key_W, Key_X = Qt::Key_X, Key_Y = Qt::Key_Y, Key_Z = Qt::Key_Z, Key_BracketLeft = Qt::Key_BracketLeft, Key_Backslash = Qt::Key_Backslash, Key_BracketRight = Qt::Key_BracketRight, Key_AsciiCircum = Qt::Key_AsciiCircum, Key_Underscore = Qt::Key_Underscore, Key_QuoteLeft = Qt::Key_QuoteLeft, Key_BraceLeft = Qt::Key_BraceLeft, Key_Bar = Qt::Key_Bar, Key_BraceRight = Qt::Key_BraceRight, Key_AsciiTilde = Qt::Key_AsciiTilde, Key_nobreakspace = Qt::Key_nobreakspace, Key_exclamdown = Qt::Key_exclamdown, Key_cent = Qt::Key_cent, Key_sterling = Qt::Key_sterling, Key_currency = Qt::Key_currency, Key_yen = Qt::Key_yen, Key_brokenbar = Qt::Key_brokenbar, Key_section = Qt::Key_section, Key_diaeresis = Qt::Key_diaeresis, Key_copyright = Qt::Key_copyright, Key_ordfeminine = Qt::Key_ordfeminine, Key_guillemotleft = Qt::Key_guillemotleft, Key_notsign = Qt::Key_notsign, Key_hyphen = Qt::Key_hyphen, Key_registered = Qt::Key_registered, Key_macron = Qt::Key_macron, Key_degree = Qt::Key_degree, Key_plusminus = Qt::Key_plusminus, Key_twosuperior = Qt::Key_twosuperior, Key_threesuperior = Qt::Key_threesuperior, Key_acute = Qt::Key_acute, Key_mu = Qt::Key_mu, Key_paragraph = Qt::Key_paragraph, Key_periodcentered = Qt::Key_periodcentered, Key_cedilla = Qt::Key_cedilla, Key_onesuperior = Qt::Key_onesuperior, Key_masculine = Qt::Key_masculine, Key_guillemotright = Qt::Key_guillemotright, Key_onequarter = Qt::Key_onequarter, Key_onehalf = Qt::Key_onehalf, Key_threequarters = Qt::Key_threequarters, Key_questiondown = Qt::Key_questiondown, Key_Agrave = Qt::Key_Agrave, Key_Aacute = Qt::Key_Aacute, Key_Acircumflex = Qt::Key_Acircumflex, Key_Atilde = Qt::Key_Atilde, Key_Adiaeresis = Qt::Key_Adiaeresis, Key_Aring = Qt::Key_Aring, Key_AE = Qt::Key_AE, Key_Ccedilla = Qt::Key_Ccedilla, Key_Egrave = Qt::Key_Egrave, Key_Eacute = Qt::Key_Eacute, Key_Ecircumflex = Qt::Key_Ecircumflex, Key_Ediaeresis = Qt::Key_Ediaeresis, Key_Igrave = Qt::Key_Igrave, Key_Iacute = Qt::Key_Iacute, Key_Icircumflex = Qt::Key_Icircumflex, Key_Idiaeresis = Qt::Key_Idiaeresis, Key_ETH = Qt::Key_ETH, Key_Ntilde = Qt::Key_Ntilde, Key_Ograve = Qt::Key_Ograve, Key_Oacute = Qt::Key_Oacute, Key_Ocircumflex = Qt::Key_Ocircumflex, Key_Otilde = Qt::Key_Otilde, Key_Odiaeresis = Qt::Key_Odiaeresis, Key_multiply = Qt::Key_multiply, Key_Ooblique = Qt::Key_Ooblique, Key_Ugrave = Qt::Key_Ugrave, Key_Uacute = Qt::Key_Uacute, Key_Ucircumflex = Qt::Key_Ucircumflex, Key_Udiaeresis = Qt::Key_Udiaeresis, Key_Yacute = Qt::Key_Yacute, Key_THORN = Qt::Key_THORN, Key_ssharp = Qt::Key_ssharp, Key_division = Qt::Key_division, Key_ydiaeresis = Qt::Key_ydiaeresis, Key_AltGr = Qt::Key_AltGr, Key_Multi_key = Qt::Key_Multi_key, Key_Codeinput = Qt::Key_Codeinput, Key_SingleCandidate = Qt::Key_SingleCandidate, Key_MultipleCandidate = Qt::Key_MultipleCandidate, Key_PreviousCandidate = Qt::Key_PreviousCandidate, Key_Mode_switch = Qt::Key_Mode_switch, Key_Kanji = Qt::Key_Kanji, Key_Muhenkan = Qt::Key_Muhenkan, Key_Henkan = Qt::Key_Henkan, Key_Romaji = Qt::Key_Romaji, Key_Hiragana = Qt::Key_Hiragana, Key_Katakana = Qt::Key_Katakana, Key_Hiragana_Katakana = Qt::Key_Hiragana_Katakana, Key_Zenkaku = Qt::Key_Zenkaku, Key_Hankaku = Qt::Key_Hankaku, Key_Zenkaku_Hankaku = Qt::Key_Zenkaku_Hankaku, Key_Touroku = Qt::Key_Touroku, Key_Massyo = Qt::Key_Massyo, Key_Kana_Lock = Qt::Key_Kana_Lock, Key_Kana_Shift = Qt::Key_Kana_Shift, Key_Eisu_Shift = Qt::Key_Eisu_Shift, Key_Eisu_toggle = Qt::Key_Eisu_toggle, Key_Hangul = Qt::Key_Hangul, Key_Hangul_Start = Qt::Key_Hangul_Start, Key_Hangul_End = Qt::Key_Hangul_End, Key_Hangul_Hanja = Qt::Key_Hangul_Hanja, Key_Hangul_Jamo = Qt::Key_Hangul_Jamo, Key_Hangul_Romaja = Qt::Key_Hangul_Romaja, Key_Hangul_Jeonja = Qt::Key_Hangul_Jeonja, Key_Hangul_Banja = Qt::Key_Hangul_Banja, Key_Hangul_PreHanja = Qt::Key_Hangul_PreHanja, Key_Hangul_PostHanja = Qt::Key_Hangul_PostHanja, Key_Hangul_Special = Qt::Key_Hangul_Special, Key_Dead_Grave = Qt::Key_Dead_Grave, Key_Dead_Acute = Qt::Key_Dead_Acute, Key_Dead_Circumflex = Qt::Key_Dead_Circumflex, Key_Dead_Tilde = Qt::Key_Dead_Tilde, Key_Dead_Macron = Qt::Key_Dead_Macron, Key_Dead_Breve = Qt::Key_Dead_Breve, Key_Dead_Abovedot = Qt::Key_Dead_Abovedot, Key_Dead_Diaeresis = Qt::Key_Dead_Diaeresis, Key_Dead_Abovering = Qt::Key_Dead_Abovering, Key_Dead_Doubleacute = Qt::Key_Dead_Doubleacute, Key_Dead_Caron = Qt::Key_Dead_Caron, Key_Dead_Cedilla = Qt::Key_Dead_Cedilla, Key_Dead_Ogonek = Qt::Key_Dead_Ogonek, Key_Dead_Iota = Qt::Key_Dead_Iota, Key_Dead_Voiced_Sound = Qt::Key_Dead_Voiced_Sound, Key_Dead_Semivoiced_Sound = Qt::Key_Dead_Semivoiced_Sound, Key_Dead_Belowdot = Qt::Key_Dead_Belowdot, Key_Dead_Hook = Qt::Key_Dead_Hook, Key_Dead_Horn = Qt::Key_Dead_Horn, Key_Back = Qt::Key_Back, Key_Forward = Qt::Key_Forward, Key_Stop = Qt::Key_Stop, Key_Refresh = Qt::Key_Refresh, Key_VolumeDown = Qt::Key_VolumeDown, Key_VolumeMute = Qt::Key_VolumeMute, Key_VolumeUp = Qt::Key_VolumeUp, Key_BassBoost = Qt::Key_BassBoost, Key_BassUp = Qt::Key_BassUp, Key_BassDown = Qt::Key_BassDown, Key_TrebleUp = Qt::Key_TrebleUp, Key_TrebleDown = Qt::Key_TrebleDown, Key_MediaPlay = Qt::Key_MediaPlay, Key_MediaStop = Qt::Key_MediaStop, Key_MediaPrevious = Qt::Key_MediaPrevious, Key_MediaNext = Qt::Key_MediaNext, Key_MediaRecord = Qt::Key_MediaRecord, Key_MediaPause = Qt::Key_MediaPause, Key_MediaTogglePlayPause = Qt::Key_MediaTogglePlayPause, Key_HomePage = Qt::Key_HomePage, Key_Favorites = Qt::Key_Favorites, Key_Search = Qt::Key_Search, Key_Standby = Qt::Key_Standby, Key_OpenUrl = Qt::Key_OpenUrl, Key_LaunchMail = Qt::Key_LaunchMail, Key_LaunchMedia = Qt::Key_LaunchMedia, Key_Launch0 = Qt::Key_Launch0, Key_Launch1 = Qt::Key_Launch1, Key_Launch2 = Qt::Key_Launch2, Key_Launch3 = Qt::Key_Launch3, Key_Launch4 = Qt::Key_Launch4, Key_Launch5 = Qt::Key_Launch5, Key_Launch6 = Qt::Key_Launch6, Key_Launch7 = Qt::Key_Launch7, Key_Launch8 = Qt::Key_Launch8, Key_Launch9 = Qt::Key_Launch9, Key_LaunchA = Qt::Key_LaunchA, Key_LaunchB = Qt::Key_LaunchB, Key_LaunchC = Qt::Key_LaunchC, Key_LaunchD = Qt::Key_LaunchD, Key_LaunchE = Qt::Key_LaunchE, Key_LaunchF = Qt::Key_LaunchF, Key_MonBrightnessUp = Qt::Key_MonBrightnessUp, Key_MonBrightnessDown = Qt::Key_MonBrightnessDown, Key_KeyboardLightOnOff = Qt::Key_KeyboardLightOnOff, Key_KeyboardBrightnessUp = Qt::Key_KeyboardBrightnessUp, Key_KeyboardBrightnessDown = Qt::Key_KeyboardBrightnessDown, Key_PowerOff = Qt::Key_PowerOff, Key_WakeUp = Qt::Key_WakeUp, Key_Eject = Qt::Key_Eject, Key_ScreenSaver = Qt::Key_ScreenSaver, Key_WWW = Qt::Key_WWW, Key_Memo = Qt::Key_Memo, Key_LightBulb = Qt::Key_LightBulb, Key_Shop = Qt::Key_Shop, Key_History = Qt::Key_History, Key_AddFavorite = Qt::Key_AddFavorite, Key_HotLinks = Qt::Key_HotLinks, Key_BrightnessAdjust = Qt::Key_BrightnessAdjust, Key_Finance = Qt::Key_Finance, Key_Community = Qt::Key_Community, Key_AudioRewind = Qt::Key_AudioRewind, Key_BackForward = Qt::Key_BackForward, Key_ApplicationLeft = Qt::Key_ApplicationLeft, Key_ApplicationRight = Qt::Key_ApplicationRight, Key_Book = Qt::Key_Book, Key_CD = Qt::Key_CD, Key_Calculator = Qt::Key_Calculator, Key_ToDoList = Qt::Key_ToDoList, Key_ClearGrab = Qt::Key_ClearGrab, Key_Close = Qt::Key_Close, Key_Copy = Qt::Key_Copy, Key_Cut = Qt::Key_Cut, Key_Display = Qt::Key_Display, Key_DOS = Qt::Key_DOS, Key_Documents = Qt::Key_Documents, Key_Excel = Qt::Key_Excel, Key_Explorer = Qt::Key_Explorer, Key_Game = Qt::Key_Game, Key_Go = Qt::Key_Go, Key_iTouch = Qt::Key_iTouch, Key_LogOff = Qt::Key_LogOff, Key_Market = Qt::Key_Market, Key_Meeting = Qt::Key_Meeting, Key_MenuKB = Qt::Key_MenuKB, Key_MenuPB = Qt::Key_MenuPB, Key_MySites = Qt::Key_MySites, Key_News = Qt::Key_News, Key_OfficeHome = Qt::Key_OfficeHome, Key_Option = Qt::Key_Option, Key_Paste = Qt::Key_Paste, Key_Phone = Qt::Key_Phone, Key_Calendar = Qt::Key_Calendar, Key_Reply = Qt::Key_Reply, Key_Reload = Qt::Key_Reload, Key_RotateWindows = Qt::Key_RotateWindows, Key_RotationPB = Qt::Key_RotationPB, Key_RotationKB = Qt::Key_RotationKB, Key_Save = Qt::Key_Save, Key_Send = Qt::Key_Send, Key_Spell = Qt::Key_Spell, Key_SplitScreen = Qt::Key_SplitScreen, Key_Support = Qt::Key_Support, Key_TaskPane = Qt::Key_TaskPane, Key_Terminal = Qt::Key_Terminal, Key_Tools = Qt::Key_Tools, Key_Travel = Qt::Key_Travel, Key_Video = Qt::Key_Video, Key_Word = Qt::Key_Word, Key_Xfer = Qt::Key_Xfer, Key_ZoomIn = Qt::Key_ZoomIn, Key_ZoomOut = Qt::Key_ZoomOut, Key_Away = Qt::Key_Away, Key_Messenger = Qt::Key_Messenger, Key_WebCam = Qt::Key_WebCam, Key_MailForward = Qt::Key_MailForward, Key_Pictures = Qt::Key_Pictures, Key_Music = Qt::Key_Music, Key_Battery = Qt::Key_Battery, Key_Bluetooth = Qt::Key_Bluetooth, Key_WLAN = Qt::Key_WLAN, Key_UWB = Qt::Key_UWB, Key_AudioForward = Qt::Key_AudioForward, Key_AudioRepeat = Qt::Key_AudioRepeat, Key_AudioRandomPlay = Qt::Key_AudioRandomPlay, Key_Subtitle = Qt::Key_Subtitle, Key_AudioCycleTrack = Qt::Key_AudioCycleTrack, Key_Time = Qt::Key_Time, Key_Hibernate = Qt::Key_Hibernate, Key_View = Qt::Key_View, Key_TopMenu = Qt::Key_TopMenu, Key_PowerDown = Qt::Key_PowerDown, Key_Suspend = Qt::Key_Suspend, Key_ContrastAdjust = Qt::Key_ContrastAdjust, Key_LaunchG = Qt::Key_LaunchG, Key_LaunchH = Qt::Key_LaunchH, Key_MediaLast = Qt::Key_MediaLast, Key_Select = Qt::Key_Select, Key_Yes = Qt::Key_Yes, Key_No = Qt::Key_No, Key_Cancel = Qt::Key_Cancel, Key_Printer = Qt::Key_Printer, Key_Execute = Qt::Key_Execute, Key_Sleep = Qt::Key_Sleep, Key_Play = Qt::Key_Play, Key_Zoom = Qt::Key_Zoom, Key_Context1 = Qt::Key_Context1, Key_Context2 = Qt::Key_Context2, Key_Context3 = Qt::Key_Context3, Key_Context4 = Qt::Key_Context4, Key_Call = Qt::Key_Call, Key_Hangup = Qt::Key_Hangup, Key_Flip = Qt::Key_Flip, Key_ToggleCallHangup = Qt::Key_ToggleCallHangup, Key_VoiceDial = Qt::Key_VoiceDial, Key_LastNumberRedial = Qt::Key_LastNumberRedial, Key_Camera = Qt::Key_Camera, Key_CameraFocus = Qt::Key_CameraFocus, Key_unknown = Qt::Key_unknown};
1215 1219 enum ApplicationAttribute{
1216 1220 AA_ImmediateWidgetCreation = Qt::AA_ImmediateWidgetCreation, AA_MSWindowsUseDirect3DByDefault = Qt::AA_MSWindowsUseDirect3DByDefault, AA_DontShowIconsInMenus = Qt::AA_DontShowIconsInMenus, AA_NativeWindows = Qt::AA_NativeWindows, AA_DontCreateNativeWidgetSiblings = Qt::AA_DontCreateNativeWidgetSiblings, AA_MacPluginApplication = Qt::AA_MacPluginApplication, AA_DontUseNativeMenuBar = Qt::AA_DontUseNativeMenuBar, AA_MacDontSwapCtrlAndMeta = Qt::AA_MacDontSwapCtrlAndMeta, AA_S60DontConstructApplicationPanes = Qt::AA_S60DontConstructApplicationPanes, AA_S60DisablePartialScreenInputMode = Qt::AA_S60DisablePartialScreenInputMode, AA_X11InitThreads = Qt::AA_X11InitThreads, AA_CaptureMultimediaKeys = Qt::AA_CaptureMultimediaKeys, AA_AttributeCount = Qt::AA_AttributeCount};
1217 1221 enum TextFlag{
1218 1222 TextSingleLine = Qt::TextSingleLine, TextDontClip = Qt::TextDontClip, TextExpandTabs = Qt::TextExpandTabs, TextShowMnemonic = Qt::TextShowMnemonic, TextWordWrap = Qt::TextWordWrap, TextWrapAnywhere = Qt::TextWrapAnywhere, TextDontPrint = Qt::TextDontPrint, TextIncludeTrailingSpaces = Qt::TextIncludeTrailingSpaces, TextHideMnemonic = Qt::TextHideMnemonic, TextJustificationForced = Qt::TextJustificationForced, TextForceLeftToRight = Qt::TextForceLeftToRight, TextForceRightToLeft = Qt::TextForceRightToLeft, TextLongestVariant = Qt::TextLongestVariant, TextBypassShaping = Qt::TextBypassShaping};
1219 1223 enum BrushStyle{
1220 1224 NoBrush = Qt::NoBrush, SolidPattern = Qt::SolidPattern, Dense1Pattern = Qt::Dense1Pattern, Dense2Pattern = Qt::Dense2Pattern, Dense3Pattern = Qt::Dense3Pattern, Dense4Pattern = Qt::Dense4Pattern, Dense5Pattern = Qt::Dense5Pattern, Dense6Pattern = Qt::Dense6Pattern, Dense7Pattern = Qt::Dense7Pattern, HorPattern = Qt::HorPattern, VerPattern = Qt::VerPattern, CrossPattern = Qt::CrossPattern, BDiagPattern = Qt::BDiagPattern, FDiagPattern = Qt::FDiagPattern, DiagCrossPattern = Qt::DiagCrossPattern, LinearGradientPattern = Qt::LinearGradientPattern, RadialGradientPattern = Qt::RadialGradientPattern, ConicalGradientPattern = Qt::ConicalGradientPattern, TexturePattern = Qt::TexturePattern};
1221 1225 enum WidgetAttribute{
1222 1226 WA_Disabled = Qt::WA_Disabled, WA_UnderMouse = Qt::WA_UnderMouse, WA_MouseTracking = Qt::WA_MouseTracking, WA_ContentsPropagated = Qt::WA_ContentsPropagated, WA_OpaquePaintEvent = Qt::WA_OpaquePaintEvent, WA_NoBackground = Qt::WA_NoBackground, WA_StaticContents = Qt::WA_StaticContents, WA_LaidOut = Qt::WA_LaidOut, WA_PaintOnScreen = Qt::WA_PaintOnScreen, WA_NoSystemBackground = Qt::WA_NoSystemBackground, WA_UpdatesDisabled = Qt::WA_UpdatesDisabled, WA_Mapped = Qt::WA_Mapped, WA_MacNoClickThrough = Qt::WA_MacNoClickThrough, WA_PaintOutsidePaintEvent = Qt::WA_PaintOutsidePaintEvent, WA_InputMethodEnabled = Qt::WA_InputMethodEnabled, WA_WState_Visible = Qt::WA_WState_Visible, WA_WState_Hidden = Qt::WA_WState_Hidden, WA_ForceDisabled = Qt::WA_ForceDisabled, WA_KeyCompression = Qt::WA_KeyCompression, WA_PendingMoveEvent = Qt::WA_PendingMoveEvent, WA_PendingResizeEvent = Qt::WA_PendingResizeEvent, WA_SetPalette = Qt::WA_SetPalette, WA_SetFont = Qt::WA_SetFont, WA_SetCursor = Qt::WA_SetCursor, WA_NoChildEventsFromChildren = Qt::WA_NoChildEventsFromChildren, WA_WindowModified = Qt::WA_WindowModified, WA_Resized = Qt::WA_Resized, WA_Moved = Qt::WA_Moved, WA_PendingUpdate = Qt::WA_PendingUpdate, WA_InvalidSize = Qt::WA_InvalidSize, WA_MacBrushedMetal = Qt::WA_MacBrushedMetal, WA_MacMetalStyle = Qt::WA_MacMetalStyle, WA_CustomWhatsThis = Qt::WA_CustomWhatsThis, WA_LayoutOnEntireRect = Qt::WA_LayoutOnEntireRect, WA_OutsideWSRange = Qt::WA_OutsideWSRange, WA_GrabbedShortcut = Qt::WA_GrabbedShortcut, WA_TransparentForMouseEvents = Qt::WA_TransparentForMouseEvents, WA_PaintUnclipped = Qt::WA_PaintUnclipped, WA_SetWindowIcon = Qt::WA_SetWindowIcon, WA_NoMouseReplay = Qt::WA_NoMouseReplay, WA_DeleteOnClose = Qt::WA_DeleteOnClose, WA_RightToLeft = Qt::WA_RightToLeft, WA_SetLayoutDirection = Qt::WA_SetLayoutDirection, WA_NoChildEventsForParent = Qt::WA_NoChildEventsForParent, WA_ForceUpdatesDisabled = Qt::WA_ForceUpdatesDisabled, WA_WState_Created = Qt::WA_WState_Created, WA_WState_CompressKeys = Qt::WA_WState_CompressKeys, WA_WState_InPaintEvent = Qt::WA_WState_InPaintEvent, WA_WState_Reparented = Qt::WA_WState_Reparented, WA_WState_ConfigPending = Qt::WA_WState_ConfigPending, WA_WState_Polished = Qt::WA_WState_Polished, WA_WState_DND = Qt::WA_WState_DND, WA_WState_OwnSizePolicy = Qt::WA_WState_OwnSizePolicy, WA_WState_ExplicitShowHide = Qt::WA_WState_ExplicitShowHide, WA_ShowModal = Qt::WA_ShowModal, WA_MouseNoMask = Qt::WA_MouseNoMask, WA_GroupLeader = Qt::WA_GroupLeader, WA_NoMousePropagation = Qt::WA_NoMousePropagation, WA_Hover = Qt::WA_Hover, WA_InputMethodTransparent = Qt::WA_InputMethodTransparent, WA_QuitOnClose = Qt::WA_QuitOnClose, WA_KeyboardFocusChange = Qt::WA_KeyboardFocusChange, WA_AcceptDrops = Qt::WA_AcceptDrops, WA_DropSiteRegistered = Qt::WA_DropSiteRegistered, WA_ForceAcceptDrops = Qt::WA_ForceAcceptDrops, WA_WindowPropagation = Qt::WA_WindowPropagation, WA_NoX11EventCompression = Qt::WA_NoX11EventCompression, WA_TintedBackground = Qt::WA_TintedBackground, WA_X11OpenGLOverlay = Qt::WA_X11OpenGLOverlay, WA_AlwaysShowToolTips = Qt::WA_AlwaysShowToolTips, WA_MacOpaqueSizeGrip = Qt::WA_MacOpaqueSizeGrip, WA_SetStyle = Qt::WA_SetStyle, WA_SetLocale = Qt::WA_SetLocale, WA_MacShowFocusRect = Qt::WA_MacShowFocusRect, WA_MacNormalSize = Qt::WA_MacNormalSize, WA_MacSmallSize = Qt::WA_MacSmallSize, WA_MacMiniSize = Qt::WA_MacMiniSize, WA_LayoutUsesWidgetRect = Qt::WA_LayoutUsesWidgetRect, WA_StyledBackground = Qt::WA_StyledBackground, WA_MSWindowsUseDirect3D = Qt::WA_MSWindowsUseDirect3D, WA_CanHostQMdiSubWindowTitleBar = Qt::WA_CanHostQMdiSubWindowTitleBar, WA_MacAlwaysShowToolWindow = Qt::WA_MacAlwaysShowToolWindow, WA_StyleSheet = Qt::WA_StyleSheet, WA_ShowWithoutActivating = Qt::WA_ShowWithoutActivating, WA_X11BypassTransientForHint = Qt::WA_X11BypassTransientForHint, WA_NativeWindow = Qt::WA_NativeWindow, WA_DontCreateNativeAncestors = Qt::WA_DontCreateNativeAncestors, WA_MacVariableSize = Qt::WA_MacVariableSize, WA_DontShowOnScreen = Qt::WA_DontShowOnScreen, WA_X11NetWmWindowTypeDesktop = Qt::WA_X11NetWmWindowTypeDesktop, WA_X11NetWmWindowTypeDock = Qt::WA_X11NetWmWindowTypeDock, WA_X11NetWmWindowTypeToolBar = Qt::WA_X11NetWmWindowTypeToolBar, WA_X11NetWmWindowTypeMenu = Qt::WA_X11NetWmWindowTypeMenu, WA_X11NetWmWindowTypeUtility = Qt::WA_X11NetWmWindowTypeUtility, WA_X11NetWmWindowTypeSplash = Qt::WA_X11NetWmWindowTypeSplash, WA_X11NetWmWindowTypeDialog = Qt::WA_X11NetWmWindowTypeDialog, WA_X11NetWmWindowTypeDropDownMenu = Qt::WA_X11NetWmWindowTypeDropDownMenu, WA_X11NetWmWindowTypePopupMenu = Qt::WA_X11NetWmWindowTypePopupMenu, WA_X11NetWmWindowTypeToolTip = Qt::WA_X11NetWmWindowTypeToolTip, WA_X11NetWmWindowTypeNotification = Qt::WA_X11NetWmWindowTypeNotification, WA_X11NetWmWindowTypeCombo = Qt::WA_X11NetWmWindowTypeCombo, WA_X11NetWmWindowTypeDND = Qt::WA_X11NetWmWindowTypeDND, WA_MacFrameworkScaled = Qt::WA_MacFrameworkScaled, WA_SetWindowModality = Qt::WA_SetWindowModality, WA_WState_WindowOpacitySet = Qt::WA_WState_WindowOpacitySet, WA_TranslucentBackground = Qt::WA_TranslucentBackground, WA_AcceptTouchEvents = Qt::WA_AcceptTouchEvents, WA_WState_AcceptedTouchBeginEvent = Qt::WA_WState_AcceptedTouchBeginEvent, WA_TouchPadAcceptSingleTouchEvents = Qt::WA_TouchPadAcceptSingleTouchEvents, WA_MergeSoftkeys = Qt::WA_MergeSoftkeys, WA_MergeSoftkeysRecursively = Qt::WA_MergeSoftkeysRecursively, WA_LockPortraitOrientation = Qt::WA_LockPortraitOrientation, WA_LockLandscapeOrientation = Qt::WA_LockLandscapeOrientation, WA_AutoOrientation = Qt::WA_AutoOrientation, WA_X11DoNotAcceptFocus = Qt::WA_X11DoNotAcceptFocus, WA_SymbianNoSystemRotation = Qt::WA_SymbianNoSystemRotation, WA_MacNoShadow = Qt::WA_MacNoShadow, WA_AttributeCount = Qt::WA_AttributeCount};
1223 1227 enum TouchPointState{
1224 1228 TouchPointPressed = Qt::TouchPointPressed, TouchPointMoved = Qt::TouchPointMoved, TouchPointStationary = Qt::TouchPointStationary, TouchPointReleased = Qt::TouchPointReleased, TouchPointStateMask = Qt::TouchPointStateMask, TouchPointPrimary = Qt::TouchPointPrimary};
1225 1229 enum TextInteractionFlag{
1226 1230 NoTextInteraction = Qt::NoTextInteraction, TextSelectableByMouse = Qt::TextSelectableByMouse, TextSelectableByKeyboard = Qt::TextSelectableByKeyboard, LinksAccessibleByMouse = Qt::LinksAccessibleByMouse, LinksAccessibleByKeyboard = Qt::LinksAccessibleByKeyboard, TextEditable = Qt::TextEditable, TextEditorInteraction = Qt::TextEditorInteraction, TextBrowserInteraction = Qt::TextBrowserInteraction};
1227 1231 enum MouseButton{
1228 1232 NoButton = Qt::NoButton, LeftButton = Qt::LeftButton, RightButton = Qt::RightButton, MidButton = Qt::MidButton, MiddleButton = Qt::MiddleButton, XButton1 = Qt::XButton1, XButton2 = Qt::XButton2, MouseButtonMask = Qt::MouseButtonMask};
1229 1233 enum MatchFlag{
1230 1234 MatchExactly = Qt::MatchExactly, MatchContains = Qt::MatchContains, MatchStartsWith = Qt::MatchStartsWith, MatchEndsWith = Qt::MatchEndsWith, MatchRegExp = Qt::MatchRegExp, MatchWildcard = Qt::MatchWildcard, MatchFixedString = Qt::MatchFixedString, MatchCaseSensitive = Qt::MatchCaseSensitive, MatchWrap = Qt::MatchWrap, MatchRecursive = Qt::MatchRecursive};
1231 1235 enum PenCapStyle{
1232 1236 FlatCap = Qt::FlatCap, SquareCap = Qt::SquareCap, RoundCap = Qt::RoundCap, MPenCapStyle = Qt::MPenCapStyle};
1233 1237 enum TextElideMode{
1234 1238 ElideLeft = Qt::ElideLeft, ElideRight = Qt::ElideRight, ElideMiddle = Qt::ElideMiddle, ElideNone = Qt::ElideNone};
1235 1239 Q_DECLARE_FLAGS(DropActions, DropAction)
1236 1240 Q_DECLARE_FLAGS(WindowFlags, WindowType)
1237 1241 Q_DECLARE_FLAGS(GestureFlags, GestureFlag)
1238 1242 Q_DECLARE_FLAGS(ImageConversionFlags, ImageConversionFlag)
1239 1243 Q_DECLARE_FLAGS(ToolBarAreas, ToolBarArea)
1240 1244 Q_DECLARE_FLAGS(Alignment, AlignmentFlag)
1241 1245 Q_DECLARE_FLAGS(DockWidgetAreas, DockWidgetArea)
1242 1246 Q_DECLARE_FLAGS(KeyboardModifiers, KeyboardModifier)
1243 1247 Q_DECLARE_FLAGS(InputMethodHints, InputMethodHint)
1244 1248 Q_DECLARE_FLAGS(ItemFlags, ItemFlag)
1245 1249 Q_DECLARE_FLAGS(Orientations, Orientation)
1246 1250 Q_DECLARE_FLAGS(WindowStates, WindowState)
1247 1251 Q_DECLARE_FLAGS(TouchPointStates, TouchPointState)
1248 1252 Q_DECLARE_FLAGS(TextInteractionFlags, TextInteractionFlag)
1249 1253 Q_DECLARE_FLAGS(MouseButtons, MouseButton)
1250 1254 Q_DECLARE_FLAGS(MatchFlags, MatchFlag)
1251 1255 public Q_SLOTS:
1252 1256 QTextCodec* static_Qt_codecForHtml(const QByteArray& ba);
1253 1257 QString static_Qt_convertFromPlainText(const QString& plain, Qt::WhiteSpaceMode mode = Qt::WhiteSpacePre);
1254 1258 QString static_Qt_escape(const QString& plain);
1255 1259 bool static_Qt_mightBeRichText(const QString& arg__1);
1256 1260 };
1257 1261
1258 1262
@@ -1,41 +1,40
1 1 project(PythonQtGenerator)
2 2
3 3 # straight qmake port
4 4 SET(HEADERS)
5 5 SET(SOURCES)
6 6 SET(QT)
7 7 SET(RESOURCES)
8 8 SET(INCLUDEPATH)
9 9 SET(DEFINES)
10 10
11 SET(GENERATORPATH ${CMAKE_CURRENT_SOURCE_DIR})
12 include(${GENERATORPATH}/generator_50.cmake)
11 include(${CMAKE_CURRENT_SOURCE_DIR}/generator_50.cmake)
13 12
14 13 LIST(APPEND HEADERS
15 14 #generatorscript.h
16 15 generatorsetqtscript.h
17 16 metaqtscriptbuilder.h
18 17 metaqtscript.h
19 18 shellgenerator.h
20 19 shellimplgenerator.h
21 20 shellheadergenerator.h
22 21 setupgenerator.h
23 22 )
24 23
25 24 LIST(APPEND SOURCES
26 25 generatorsetqtscript.cpp
27 26 metaqtscriptbuilder.cpp
28 27 metaqtscript.cpp
29 28 shellgenerator.cpp
30 29 shellimplgenerator.cpp
31 30 shellheadergenerator.cpp
32 31 setupgenerator.cpp
33 32 )
34 33
35 34 include_directories(${INCLUDEPATH})
36 35 add_definitions(${DEFINITIONS})
37 36 qt_add_resources(GEN_QRC ${RESOURCES})
38 37 qt_wrap_cpp(GEN_MOC ${HEADERS})
39 38
40 39 add_executable(pythonqt_generator ${SOURCES} ${GEN_QRC} ${GEN_MOC})
41 40 qt_use_modules(pythonqt_generator ${QT})
@@ -1,44 +1,47
1 1
2 IF(NOT GENERATORPATH)
3 SET(GENERATORPATH ${CMAKE_CURRENT_LIST_DIR})
4 ENDIF()
5
2 6 LIST(APPEND INCLUDEPATH ${GENERATORPATH})
3 7 LIST(APPEND INCLUDEPATH ${GENERATORPATH}/.)
4 8 LIST(APPEND INCLUDEPATH ${GENERATORPATH}/../common)
5 9
6 10 LIST(APPEND RESOURCES ${GENERATORPATH}/generator.qrc)
7 11
8 SET(RXXPATH ${GENERATORPATH}/parser)
9 include(${RXXPATH}/rxx.cmake)
10 include(${RXXPATH}/rpp/rpp.cmake)
12 include(${GENERATORPATH}/parser/rxx.cmake)
13 include(${GENERATORPATH}/parser/rpp/rpp.cmake)
11 14
12 15 LIST(APPEND HEADERS
13 16 ${GENERATORPATH}/generator.h
14 17 ${GENERATORPATH}/main.h
15 18 ${GENERATORPATH}/reporthandler.h
16 19 ${GENERATORPATH}/typeparser.h
17 20 ${GENERATORPATH}/typesystem.h
18 21 ${GENERATORPATH}/asttoxml.h
19 22 ${GENERATORPATH}/fileout.h
20 23 ${GENERATORPATH}/generatorset.h
21 24 ${GENERATORPATH}/metajava.h
22 25 ${GENERATORPATH}/customtypes.h
23 26 ${GENERATORPATH}/abstractmetabuilder.h
24 27 ${GENERATORPATH}/abstractmetalang.h
25 28 ${GENERATORPATH}/prigenerator.h
26 29 )
27 30
28 31 LIST(APPEND SOURCES
29 32 ${GENERATORPATH}/generator.cpp
30 33 ${GENERATORPATH}/main.cpp
31 34 ${GENERATORPATH}/reporthandler.cpp
32 35 ${GENERATORPATH}/typeparser.cpp
33 36 ${GENERATORPATH}/typesystem.cpp
34 37 ${GENERATORPATH}/asttoxml.cpp
35 38 ${GENERATORPATH}/fileout.cpp
36 39 ${GENERATORPATH}/generatorset.cpp
37 40 ${GENERATORPATH}/metajava.cpp
38 41 ${GENERATORPATH}/customtypes.cpp
39 42 ${GENERATORPATH}/abstractmetabuilder.cpp
40 43 ${GENERATORPATH}/abstractmetalang.cpp
41 44 ${GENERATORPATH}/prigenerator.cpp
42 45 )
43 46
44 47 LIST(APPEND QT Core Xml)
@@ -1,50 +1,55
1
2 IF(NOT RXXPATH)
3 SET(RXXPATH ${CMAKE_CURRENT_LIST_DIR})
4 ENDIF()
5
1 6 LIST(APPEND INCLUDEPATH ${RXXPATH})
2 7
3 8 LIST(APPEND DEFINES -DRXX_ALLOCATOR_INIT_0)
4 9
5 10 LIST(APPEND HEADERS
6 11 ${RXXPATH}/ast.h
7 12 ${RXXPATH}/lexer.h
8 13 ${RXXPATH}/list.h
9 14 ${RXXPATH}/parser.h
10 15 ${RXXPATH}/rxx_allocator.h
11 16 ${RXXPATH}/rpp-allocator.h
12 17 ${RXXPATH}/smallobject.h
13 18 ${RXXPATH}/tokens.h
14 19 ${RXXPATH}/symbol.h
15 20 ${RXXPATH}/control.h
16 21 ${RXXPATH}/visitor.h
17 22 ${RXXPATH}/default_visitor.h
18 23 ${RXXPATH}/dumptree.h
19 24 ${RXXPATH}/binder.h
20 25 ${RXXPATH}/codemodel.h
21 26 ${RXXPATH}/codemodel_pointer.h
22 27 ${RXXPATH}/codemodel_fwd.h
23 28 ${RXXPATH}/type_compiler.h
24 29 ${RXXPATH}/name_compiler.h
25 30 ${RXXPATH}/declarator_compiler.h
26 31 ${RXXPATH}/class_compiler.h
27 32 ${RXXPATH}/codemodel_finder.h
28 33 ${RXXPATH}/compiler_utils.h
29 34 )
30 35
31 36 LIST(APPEND SOURCES
32 37 ${RXXPATH}/ast.cpp
33 38 ${RXXPATH}/lexer.cpp
34 39 ${RXXPATH}/list.cpp
35 40 ${RXXPATH}/parser.cpp
36 41 ${RXXPATH}/smallobject.cpp
37 42 ${RXXPATH}/control.cpp
38 43 ${RXXPATH}/visitor.cpp
39 44 ${RXXPATH}/default_visitor.cpp
40 45 ${RXXPATH}/dumptree.cpp
41 46 ${RXXPATH}/tokens.cpp
42 47 ${RXXPATH}/binder.cpp
43 48 ${RXXPATH}/codemodel.cpp
44 49 ${RXXPATH}/type_compiler.cpp
45 50 ${RXXPATH}/name_compiler.cpp
46 51 ${RXXPATH}/declarator_compiler.cpp
47 52 ${RXXPATH}/class_compiler.cpp
48 53 ${RXXPATH}/codemodel_finder.cpp
49 54 ${RXXPATH}/compiler_utils.cpp
50 55 ) No newline at end of file
@@ -1,113 +1,110
1 1 project(PythonQt_Core)
2 2 cmake_minimum_required(VERSION 2.8.10)
3 3
4 4 #-----------------------------------------------------------------------------
5 5 # Sources
6 6
7 7 set(SOURCES
8 8 PythonQtClassInfo.cpp
9 9 PythonQtClassWrapper.cpp
10 10 PythonQtConversion.cpp
11 11 PythonQt.cpp
12 12 PythonQtImporter.cpp
13 13 PythonQtInstanceWrapper.cpp
14 14 PythonQtMethodInfo.cpp
15 15 PythonQtMisc.cpp
16 16 PythonQtObjectPtr.cpp
17 17 PythonQtQFileImporter.cpp
18 18 PythonQtSignalReceiver.cpp
19 19 PythonQtSlot.cpp
20 20 PythonQtSignal.cpp
21 21 PythonQtStdDecorators.cpp
22 22 PythonQtStdIn.cpp
23 23 PythonQtStdOut.cpp
24 24 gui/PythonQtScriptingConsole.cpp
25 25
26 26 ../generated_cpp${generated_cpp_suffix}/PythonQt_QtBindings.cpp
27 27
28 28 ../generated_cpp${generated_cpp_suffix}/com_trolltech_qt_core_builtin/com_trolltech_qt_core_builtin0.cpp
29 29 ../generated_cpp${generated_cpp_suffix}/com_trolltech_qt_core_builtin/com_trolltech_qt_core_builtin_init.cpp
30 30 ../generated_cpp${generated_cpp_suffix}/com_trolltech_qt_gui_builtin/com_trolltech_qt_gui_builtin0.cpp
31 31 ../generated_cpp${generated_cpp_suffix}/com_trolltech_qt_gui_builtin/com_trolltech_qt_gui_builtin_init.cpp
32 32 )
33 33
34 34 #-----------------------------------------------------------------------------
35 35 # List headers. This is list is used for the install command.
36 36
37 37 set(HEADERS
38 38 PythonQtClassInfo.h
39 39 PythonQtClassWrapper.h
40 40 PythonQtConversion.h
41 41 PythonQtCppWrapperFactory.h
42 42 PythonQtDoc.h
43 43 PythonQt.h
44 44 PythonQtImporter.h
45 45 PythonQtImportFileInterface.h
46 46 PythonQtInstanceWrapper.h
47 47 PythonQtMethodInfo.h
48 48 PythonQtMisc.h
49 49 PythonQtObjectPtr.h
50 50 PythonQtQFileImporter.h
51 51 PythonQtSignalReceiver.h
52 52 PythonQtSlot.h
53 53 PythonQtSignal.h
54 54 PythonQtStdDecorators.h
55 55 PythonQtStdIn.h
56 56 PythonQtStdOut.h
57 57 PythonQtSystem.h
58 58 PythonQtVariants.h
59 59 PythonQtPythonInclude.h
60 60 ../generated_cpp${generated_cpp_suffix}/PythonQt_QtBindings.h
61 61 )
62 62
63 63 #-----------------------------------------------------------------------------
64 64 # Headers that should run through moc
65 65
66 66 set(SOURCES_MOC
67 67 PythonQt.h
68 68 PythonQtSignalReceiver.h
69 69 PythonQtStdDecorators.h
70 70 gui/PythonQtScriptingConsole.h
71 71
72 72 ../generated_cpp${generated_cpp_suffix}/com_trolltech_qt_core_builtin/com_trolltech_qt_core_builtin0.h
73 73 ../generated_cpp${generated_cpp_suffix}/com_trolltech_qt_gui_builtin/com_trolltech_qt_gui_builtin0.h
74 74 )
75 75
76 76 #-----------------------------------------------------------------------------
77 77 # Resources
78 78 set(SOURCES_QRC )
79 79
80 80 #-----------------------------------------------------------------------------
81 # Do wrapping
82 qt_wrap_cpp(GEN_MOC ${SOURCES_MOC})
83 qt_add_resources(GEN_QRC ${SOURCES_QRC})
84
85 #-----------------------------------------------------------------------------
86 81 # Build the library
82 set(PythonQt ${PythonQt_LibraryName}${PythonQt_LibrarySuffix} CACHE INTERNAL "")
87 83
88 84 include_directories(${CMAKE_CURRENT_SOURCE_DIR})
89 85
90 #add_definitions(-DQT_NO_KEYWORDS) # recent python versions use them :(
86 qt_wrap_cpp(GEN_MOC ${SOURCES_MOC})
87 qt_add_resources(GEN_QRC ${SOURCES_QRC})
91 88
92 add_library(PythonQt SHARED ${SOURCES} ${GEN_MOC} ${GEN_QRC} ${HEADERS})
89 add_library(${PythonQt} SHARED ${SOURCES} ${GEN_MOC} ${GEN_QRC} ${HEADERS})
93 90 if(PythonQt_Qt5)
94 qt_use_modules(PythonQt Core Gui Widgets)
91 qt_use_modules(${PythonQt} Core Gui Widgets)
95 92 else()
96 qt_use_modules(PythonQt Core Gui)
93 qt_use_modules(${PythonQt} Core Gui)
97 94 endif()
98 target_link_libraries(PythonQt ${PYTHON_LIBRARIES})
95 target_link_libraries(${PythonQt} ${PYTHON_LIBRARIES})
99 96
100 97 #
101 98 # That should solve linkage error on Mac when the project is used in a superbuild setup
102 99 # See http://blog.onesadcookie.com/2008/01/installname-magic.html
103 100 #
104 set_target_properties(PythonQt PROPERTIES INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib")
101 set_target_properties(${PythonQt} PROPERTIES INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib")
105 102
106 103 #-----------------------------------------------------------------------------
107 104 # Install library (on windows, put the dll in 'bin' and the archive in 'lib')
108 105
109 install(TARGETS PythonQt
106 install(TARGETS ${PythonQt}
110 107 RUNTIME DESTINATION bin
111 108 LIBRARY DESTINATION lib
112 109 ARCHIVE DESTINATION lib)
113 110 install(FILES ${headers} DESTINATION include/PythonQt)
@@ -1,844 +1,844
1 1 /*
2 2 *
3 3 * Copyright (C) 2010 MeVis Medical Solutions AG All Rights Reserved.
4 4 *
5 5 * This library is free software; you can redistribute it and/or
6 6 * modify it under the terms of the GNU Lesser General Public
7 7 * License as published by the Free Software Foundation; either
8 8 * version 2.1 of the License, or (at your option) any later version.
9 9 *
10 10 * This library is distributed in the hope that it will be useful,
11 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 13 * Lesser General Public License for more details.
14 14 *
15 15 * Further, this software is distributed without any warranty that it is
16 16 * free of the rightful claim of any third person regarding infringement
17 17 * or the like. Any license provided herein, whether implied or
18 18 * otherwise, applies only to this software file. Patent licenses, if
19 19 * any, provided herein do not apply to combinations of this program with
20 20 * other software, or any other product whatsoever.
21 21 *
22 22 * You should have received a copy of the GNU Lesser General Public
23 23 * License along with this library; if not, write to the Free Software
24 24 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25 25 *
26 26 * Contact information: MeVis Medical Solutions AG, Universitaetsallee 29,
27 27 * 28359 Bremen, Germany or:
28 28 *
29 29 * http://www.mevis.de
30 30 *
31 31 */
32 32
33 33 //----------------------------------------------------------------------------------
34 34 /*!
35 35 // \file PythonQtInstanceWrapper.cpp
36 36 // \author Florian Link
37 37 // \author Last changed by $Author: florian $
38 38 // \date 2006-05
39 39 */
40 40 //----------------------------------------------------------------------------------
41 41
42 42 #include "PythonQtInstanceWrapper.h"
43 43 #include <QObject>
44 44 #include "PythonQt.h"
45 45 #include "PythonQtSlot.h"
46 46 #include "PythonQtSignal.h"
47 47 #include "PythonQtClassInfo.h"
48 48 #include "PythonQtConversion.h"
49 49 #include "PythonQtClassWrapper.h"
50 50
51 51 PythonQtClassInfo* PythonQtInstanceWrapperStruct::classInfo()
52 52 {
53 53 // take the class info from our type object
54 54 return ((PythonQtClassWrapper*)Py_TYPE(this))->_classInfo;
55 55 }
56 56
57 57 static void PythonQtInstanceWrapper_deleteObject(PythonQtInstanceWrapper* self, bool force = false) {
58 58
59 59 // is this a C++ wrapper?
60 60 if (self->_wrappedPtr) {
61 61 //mlabDebugConst("Python","c++ wrapper removed " << self->_wrappedPtr << " " << self->_obj->className() << " " << self->classInfo()->wrappedClassName().latin1());
62 62
63 63 PythonQt::priv()->removeWrapperPointer(self->_wrappedPtr);
64 64 // we own our qobject, so we delete it now:
65 65 delete self->_obj;
66 66 self->_obj = NULL;
67 67 if (force || self->_ownedByPythonQt) {
68 68 int type = self->classInfo()->metaTypeId();
69 69 if (self->_useQMetaTypeDestroy && type>=0) {
70 70 // use QMetaType to destroy the object
71 71 QMetaType::destroy(type, self->_wrappedPtr);
72 72 } else {
73 73 PythonQtSlotInfo* slot = self->classInfo()->destructor();
74 74 if (slot) {
75 75 void* args[2];
76 76 args[0] = NULL;
77 77 args[1] = &self->_wrappedPtr;
78 78 slot->decorator()->qt_metacall(QMetaObject::InvokeMetaMethod, slot->slotIndex(), args);
79 79 self->_wrappedPtr = NULL;
80 80 } else {
81 81 if (type>=0) {
82 82 // use QMetaType to destroy the object
83 83 QMetaType::destroy(type, self->_wrappedPtr);
84 84 } else {
85 85 // TODO: warn about not being able to destroy the object?
86 86 }
87 87 }
88 88 }
89 89 }
90 90 } else {
91 91 //mlabDebugConst("Python","qobject wrapper removed " << self->_obj->className() << " " << self->classInfo()->wrappedClassName().latin1());
92 92 if (self->_objPointerCopy) {
93 93 PythonQt::priv()->removeWrapperPointer(self->_objPointerCopy);
94 94 }
95 95 if (self->_obj) {
96 96 if (force || self->_ownedByPythonQt) {
97 97 if (force || !self->_obj->parent()) {
98 98 delete self->_obj;
99 99 }
100 100 } else {
101 101 if (self->_obj->parent()==NULL) {
102 102 // tell someone who is interested that the qobject is no longer wrapped, if it has no parent
103 103 PythonQt::qObjectNoLongerWrappedCB(self->_obj);
104 104 }
105 105 }
106 106 }
107 107 }
108 108 self->_obj = NULL;
109 109 }
110 110
111 111 static void PythonQtInstanceWrapper_dealloc(PythonQtInstanceWrapper* self)
112 112 {
113 113 PythonQtInstanceWrapper_deleteObject(self);
114 114 self->_obj.~QPointer<QObject>();
115 115 Py_TYPE(self)->tp_free((PyObject*)self);
116 116 }
117 117
118 118 static PyObject* PythonQtInstanceWrapper_new(PyTypeObject *type, PyObject * /*args*/, PyObject * /*kwds*/)
119 119 {
120 120 //PythonQtClassWrapper *classType = (PythonQtClassWrapper*)type;
121 121 PythonQtInstanceWrapper *self;
122 122 static PyObject* emptyTuple = NULL;
123 123 if (emptyTuple==NULL) {
124 124 emptyTuple = PyTuple_New(0);
125 125 }
126 126
127 127 self = (PythonQtInstanceWrapper*)PyBaseObject_Type.tp_new(type, emptyTuple, NULL);
128 128
129 129 if (self != NULL) {
130 130 new (&self->_obj) QPointer<QObject>();
131 131 self->_wrappedPtr = NULL;
132 132 self->_ownedByPythonQt = false;
133 133 self->_useQMetaTypeDestroy = false;
134 134 self->_isShellInstance = false;
135 135 }
136 136 return (PyObject *)self;
137 137 }
138 138
139 139 int PythonQtInstanceWrapper_init(PythonQtInstanceWrapper * self, PyObject * args, PyObject * kwds)
140 140 {
141 141 if (args == PythonQtPrivate::dummyTuple()) {
142 142 // we are called from the internal PythonQt API, so our data will be filled later on...
143 143 return 0;
144 144 }
145 145
146 146 // we are called from python, try to construct our object
147 147 if (self->classInfo()->constructors()) {
148 148 void* directCPPPointer = NULL;
149 149 PythonQtSlotFunction_CallImpl(self->classInfo(), NULL, self->classInfo()->constructors(), args, kwds, NULL, &directCPPPointer);
150 150 if (PyErr_Occurred()) {
151 151 return -1;
152 152 }
153 153 if (directCPPPointer) {
154 154 // change ownershipflag to be owned by PythonQt
155 155 self->_ownedByPythonQt = true;
156 156 self->_useQMetaTypeDestroy = false;
157 157 if (self->classInfo()->isCPPWrapper()) {
158 158 self->_wrappedPtr = directCPPPointer;
159 159 // TODO xxx: if there is a wrapper factory, we might want to generate a wrapper for our class?!
160 160 } else {
161 161 self->setQObject((QObject*)directCPPPointer);
162 162 }
163 163 // register with PythonQt
164 164 PythonQt::priv()->addWrapperPointer(directCPPPointer, self);
165 165
166 166 PythonQtShellSetInstanceWrapperCB* cb = self->classInfo()->shellSetInstanceWrapperCB();
167 167 if (cb) {
168 168 // if we are a derived python class, we set the wrapper
169 169 // to activate the shell class, otherwise we just ignore that it is a shell...
170 170 // we detect it be checking if the type does not have PythonQtInstanceWrapper_Type as direct base class,
171 171 // which is the case for all non-python derived types
172 172 if (((PyObject*)self)->ob_type->tp_base != &PythonQtInstanceWrapper_Type) {
173 173 // set the wrapper and remember that we have a shell instance!
174 174 (*cb)(directCPPPointer, self);
175 175 self->_isShellInstance = true;
176 176 }
177 177 }
178 178 }
179 179 } else {
180 180 QString error = QString("No constructors available for ") + self->classInfo()->className();
181 181 PyErr_SetString(PyExc_ValueError, error.toLatin1().data());
182 182 return -1;
183 183 }
184 184 return 0;
185 185 }
186 186
187 187 static PyObject *PythonQtInstanceWrapper_richcompare(PythonQtInstanceWrapper* wrapper, PyObject* other, int code)
188 188 {
189 189 bool validPtrs = false;
190 190 bool areSamePtrs = false;
191 191 if (PyObject_TypeCheck((PyObject*)wrapper, &PythonQtInstanceWrapper_Type)) {
192 192 if (PyObject_TypeCheck(other, &PythonQtInstanceWrapper_Type)) {
193 193 validPtrs = true;
194 194 PythonQtInstanceWrapper* w1 = wrapper;
195 195 PythonQtInstanceWrapper* w2 = (PythonQtInstanceWrapper*)other;
196 196 // check pointers directly
197 197 if (w1->_wrappedPtr != NULL) {
198 198 if (w1->_wrappedPtr == w2->_wrappedPtr) {
199 199 areSamePtrs = true;
200 200 }
201 201 } else if (w1->_obj == w2->_obj) {
202 202 areSamePtrs = true;
203 203 }
204 204 } else if (other == Py_None) {
205 205 validPtrs = true;
206 206 if (wrapper->_obj || wrapper->_wrappedPtr) {
207 207 areSamePtrs = false;
208 208 } else {
209 209 areSamePtrs = true;
210 210 }
211 211 }
212 212 }
213 213
214 214 if ((wrapper->classInfo()->typeSlots() & PythonQt::Type_RichCompare) == 0) {
215 215 // shortcut if richcompare is not supported:
216 216 if (validPtrs && code == Py_EQ) {
217 217 return PythonQtConv::GetPyBool(areSamePtrs);
218 218 } else if (validPtrs && code == Py_NE) {
219 219 return PythonQtConv::GetPyBool(!areSamePtrs);
220 220 }
221 221 Py_INCREF(Py_NotImplemented);
222 222 return Py_NotImplemented;
223 223 }
224 224
225 225 QByteArray memberName;
226 226 switch (code) {
227 227 case Py_LT:
228 228 {
229 229 static QByteArray name = "__lt__";
230 230 memberName = name;
231 231 }
232 232 break;
233 233
234 234 case Py_LE:
235 235 {
236 236 static QByteArray name = "__le__";
237 237 memberName = name;
238 238 }
239 239 break;
240 240
241 241 case Py_EQ:
242 242 {
243 243 static QByteArray name = "__eq__";
244 244 memberName = name;
245 245 }
246 246 break;
247 247
248 248 case Py_NE:
249 249 {
250 250 static QByteArray name = "__ne__";
251 251 memberName = name;
252 252 }
253 253 break;
254 254
255 255 case Py_GT:
256 256 {
257 257 static QByteArray name = "__gt__";
258 258 memberName = name;
259 259 }
260 260 break;
261 261
262 262 case Py_GE:
263 263 {
264 264 static QByteArray name = "__ge__";
265 265 memberName = name;
266 266 }
267 267 break;
268 268 }
269 269
270 270 PythonQtMemberInfo opSlot = wrapper->classInfo()->member(memberName);
271 271 if (opSlot._type == PythonQtMemberInfo::Slot) {
272 272 // TODO get rid of tuple
273 273 PyObject* args = PyTuple_New(1);
274 274 Py_INCREF(other);
275 275 PyTuple_SET_ITEM(args, 0, other);
276 276 PyObject* result = PythonQtSlotFunction_CallImpl(wrapper->classInfo(), wrapper->_obj, opSlot._slot, args, NULL, wrapper->_wrappedPtr);
277 277 Py_DECREF(args);
278 278 return result;
279 279 } else {
280 280 // not implemented, let python try something else!
281 281 Py_INCREF(Py_NotImplemented);
282 282 return Py_NotImplemented;
283 283 }
284 284 }
285 285
286 286
287 287 static PyObject *PythonQtInstanceWrapper_classname(PythonQtInstanceWrapper* obj)
288 288 {
289 289 #ifdef PY3K
290 290 return PyUnicode_FromString(Py_TYPE(obj)->tp_name);
291 291 #else
292 292 return PyString_FromString(Py_TYPE(obj)->tp_name);
293 293 #endif
294 294 }
295 295
296 296 PyObject *PythonQtInstanceWrapper_inherits(PythonQtInstanceWrapper* obj, PyObject *args)
297 297 {
298 298 char *name = NULL;
299 299 if (!PyArg_ParseTuple(args, "s:PythonQtInstanceWrapper.inherits",&name)) {
300 300 return NULL;
301 301 }
302 302 return PythonQtConv::GetPyBool(obj->classInfo()->inherits(name));
303 303 }
304 304
305 305 static PyObject *PythonQtInstanceWrapper_help(PythonQtInstanceWrapper* obj)
306 306 {
307 307 return PythonQt::self()->helpCalled(obj->classInfo());
308 308 }
309 309
310 310 PyObject *PythonQtInstanceWrapper_delete(PythonQtInstanceWrapper * self)
311 311 {
312 312 PythonQtInstanceWrapper_deleteObject(self, true);
313 313 Py_INCREF(Py_None);
314 314 return Py_None;
315 315 }
316 316
317 317
318 318 static PyMethodDef PythonQtInstanceWrapper_methods[] = {
319 319 {"className", (PyCFunction)PythonQtInstanceWrapper_classname, METH_NOARGS,
320 320 "Return the classname of the object"
321 321 },
322 322 {"inherits", (PyCFunction)PythonQtInstanceWrapper_inherits, METH_VARARGS,
323 323 "Returns if the class inherits or is of given type name"
324 324 },
325 325 {"help", (PyCFunction)PythonQtInstanceWrapper_help, METH_NOARGS,
326 326 "Shows the help of available methods for this class"
327 327 },
328 328 {"delete", (PyCFunction)PythonQtInstanceWrapper_delete, METH_NOARGS,
329 329 "Deletes the C++ object (at your own risk, my friend!)"
330 330 },
331 331 {NULL, NULL, 0, NULL} /* Sentinel */
332 332 };
333 333
334 334
335 335 static PyObject *PythonQtInstanceWrapper_getattro(PyObject *obj,PyObject *name)
336 336 {
337 337 const char *attributeName;
338 338 PythonQtInstanceWrapper *wrapper = (PythonQtInstanceWrapper *)obj;
339 339
340 340 #ifdef PY3K
341 341 if ((attributeName = PyUnicode_AsUTF8(name)) == NULL) {
342 342 #else
343 343 if ((attributeName = PyString_AsString(name)) == NULL) {
344 344 #endif
345 345 return NULL;
346 346 }
347 347
348 348 if (qstrcmp(attributeName, "__dict__")==0) {
349 349 PyObject* dict = PyBaseObject_Type.tp_getattro(obj, name);
350 350 dict = PyDict_Copy(dict);
351 351
352 352 if (wrapper->_obj) {
353 353 // only the properties are missing, the rest is already available from
354 354 // PythonQtClassWrapper...
355 355 QStringList l = wrapper->classInfo()->propertyList();
356 356 Q_FOREACH (QString name, l) {
357 357 PyObject* o = PyObject_GetAttrString(obj, name.toLatin1().data());
358 358 if (o) {
359 359 PyDict_SetItemString(dict, name.toLatin1().data(), o);
360 360 Py_DECREF(o);
361 361 } else {
362 362 std::cerr << "PythonQtInstanceWrapper: something is wrong, could not get attribute " << name.toLatin1().data();
363 363 }
364 364 }
365 365
366 366 QList<QByteArray> dynamicProps = wrapper->_obj->dynamicPropertyNames();
367 367 Q_FOREACH (QByteArray name, dynamicProps) {
368 368 PyObject* o = PyObject_GetAttrString(obj, name.data());
369 369 if (o) {
370 370 PyDict_SetItemString(dict, name.data(), o);
371 371 Py_DECREF(o);
372 372 } else {
373 373 std::cerr << "PythonQtInstanceWrapper: dynamic property could not be read " << name.data();
374 374 }
375 375 }
376 376 }
377 377 // Note: we do not put children into the dict, is would look confusing?!
378 378 return dict;
379 379 }
380 380
381 381 // first look in super, to return derived methods from base object first
382 382 PyObject* superAttr = PyBaseObject_Type.tp_getattro(obj, name);
383 383 if (superAttr) {
384 384 return superAttr;
385 385 }
386 386 PyErr_Clear();
387 387
388 388 // mlabDebugConst("Python","get " << attributeName);
389 389
390 390 PythonQtMemberInfo member = wrapper->classInfo()->member(attributeName);
391 391 switch (member._type) {
392 392 case PythonQtMemberInfo::Property:
393 393 if (wrapper->_obj) {
394 394 if (member._property.userType() != QVariant::Invalid) {
395 395
396 396 PythonQt::ProfilingCB* profilingCB = PythonQt::priv()->profilingCB();
397 397 if (profilingCB) {
398 398 QString methodName = "getProperty(";
399 399 methodName += attributeName;
400 400 methodName += ")";
401 401 profilingCB(PythonQt::Enter, wrapper->_obj->metaObject()->className(), methodName.toLatin1());
402 402 }
403 403
404 404 PyObject* value = PythonQtConv::QVariantToPyObject(member._property.read(wrapper->_obj));
405 405
406 406 if (profilingCB) {
407 407 profilingCB(PythonQt::Leave, NULL, NULL);
408 408 }
409 409
410 410 return value;
411 411
412 412 } else {
413 413 Py_INCREF(Py_None);
414 414 return Py_None;
415 415 }
416 416 } else {
417 417 QString error = QString("Trying to read property '") + attributeName + "' from a destroyed " + wrapper->classInfo()->className() + " object";
418 418 PyErr_SetString(PyExc_ValueError, error.toLatin1().data());
419 419 return NULL;
420 420 }
421 421 break;
422 422 case PythonQtMemberInfo::Slot:
423 423 return PythonQtSlotFunction_New(member._slot, obj, NULL);
424 424 break;
425 425 case PythonQtMemberInfo::Signal:
426 426 return PythonQtSignalFunction_New(member._slot, obj, NULL);
427 427 break;
428 428 case PythonQtMemberInfo::EnumValue:
429 429 {
430 430 PyObject* enumValue = member._enumValue;
431 431 Py_INCREF(enumValue);
432 432 return enumValue;
433 433 }
434 434 break;
435 435 case PythonQtMemberInfo::EnumWrapper:
436 436 {
437 437 PyObject* enumWrapper = member._enumWrapper;
438 438 Py_INCREF(enumWrapper);
439 439 return enumWrapper;
440 440 }
441 441 break;
442 442 case PythonQtMemberInfo::NotFound:
443 443 {
444 444 static const QByteArray getterString("py_get_");
445 445 // check for a getter slot
446 446 PythonQtMemberInfo member = wrapper->classInfo()->member(getterString + attributeName);
447 447 if (member._type == PythonQtMemberInfo::Slot) {
448 448 return PythonQtSlotFunction_CallImpl(wrapper->classInfo(), wrapper->_obj, member._slot, NULL, NULL, wrapper->_wrappedPtr);
449 449 }
450 450
451 451 // handle dynamic properties
452 452 if (wrapper->_obj) {
453 453 QVariant v = wrapper->_obj->property(attributeName);
454 454 if (v.isValid()) {
455 455 return PythonQtConv::QVariantToPyObject(v);
456 456 }
457 457 }
458 458 }
459 459 break;
460 460 default:
461 461 // is an invalid type, go on
462 462 break;
463 463 }
464 464
465 465 // look for the internal methods (className(), help())
466 466 #ifdef PY3K
467 467 PyObject* internalMethod = PyObject_GenericGetAttr(obj, name);
468 468 #else
469 469 PyObject* internalMethod = Py_FindMethod( PythonQtInstanceWrapper_methods, obj, (char*)attributeName);
470 470 #endif
471 471 if (internalMethod) {
472 472 return internalMethod;
473 473 }
474 474 PyErr_Clear();
475 475
476 476 if (wrapper->_obj) {
477 477 // look for a child
478 478 QObjectList children = wrapper->_obj->children();
479 479 for (int i = 0; i < children.count(); i++) {
480 480 QObject *child = children.at(i);
481 481 if (child->objectName() == attributeName) {
482 482 return PythonQt::priv()->wrapQObject(child);
483 483 }
484 484 }
485 485 }
486 486
487 487 QString error = QString(wrapper->classInfo()->className()) + " has no attribute named '" + QString(attributeName) + "'";
488 488 PyErr_SetString(PyExc_AttributeError, error.toLatin1().data());
489 489 return NULL;
490 490 }
491 491
492 492 static int PythonQtInstanceWrapper_setattro(PyObject *obj,PyObject *name,PyObject *value)
493 493 {
494 494 QString error;
495 495 const char *attributeName;
496 496 PythonQtInstanceWrapper *wrapper = (PythonQtInstanceWrapper *)obj;
497 497
498 498 #ifdef PY3K
499 499 if ((attributeName = PyUnicode_AsUTF8(name)) == NULL)
500 500 #else
501 501 if ((attributeName = PyString_AsString(name)) == NULL)
502 502 #endif
503 503 return -1;
504 504
505 505 PythonQtMemberInfo member = wrapper->classInfo()->member(attributeName);
506 506 if (member._type == PythonQtMemberInfo::Property) {
507 507
508 508 if (!wrapper->_obj) {
509 509 error = QString("Trying to set property '") + attributeName + "' on a destroyed " + wrapper->classInfo()->className() + " object";
510 510 PyErr_SetString(PyExc_AttributeError, error.toLatin1().data());
511 511 return -1;
512 512 }
513 513
514 514 QMetaProperty prop = member._property;
515 515 if (prop.isWritable()) {
516 516 QVariant v;
517 517 if (prop.isEnumType()) {
518 518 // this will give us either a string or an int, everything else will probably be an error
519 519 v = PythonQtConv::PyObjToQVariant(value);
520 520 } else {
521 521 int t = prop.userType();
522 522 v = PythonQtConv::PyObjToQVariant(value, t);
523 523 }
524 524 bool success = false;
525 525 if (v.isValid()) {
526 526 PythonQt::ProfilingCB* profilingCB = PythonQt::priv()->profilingCB();
527 527 if (profilingCB) {
528 528 QString methodName = "setProperty(";
529 529 methodName += attributeName;
530 530 methodName += ")";
531 531 profilingCB(PythonQt::Enter, wrapper->_obj->metaObject()->className(), methodName.toLatin1());
532 532 }
533 533
534 534 success = prop.write(wrapper->_obj, v);
535 535
536 536 if (profilingCB) {
537 537 profilingCB(PythonQt::Leave, NULL, NULL);
538 538 }
539 539 }
540 540 if (success) {
541 541 return 0;
542 542 } else {
543 543 error = QString("Property '") + attributeName + "' of type '" +
544 544 prop.typeName() + "' does not accept an object of type "
545 545 + QString(value->ob_type->tp_name) + " (" + PythonQtConv::PyObjGetRepresentation(value) + ")";
546 546 }
547 547 } else {
548 548 error = QString("Property '") + attributeName + "' of " + obj->ob_type->tp_name + " object is not writable";
549 549 }
550 550 } else if (member._type == PythonQtMemberInfo::Slot) {
551 551 error = QString("Slot '") + attributeName + "' can not be overwritten on " + obj->ob_type->tp_name + " object";
552 552 } else if (member._type == PythonQtMemberInfo::Signal) {
553 553 error = QString("Signal '") + attributeName + "' can not be overwritten on " + obj->ob_type->tp_name + " object";
554 554 } else if (member._type == PythonQtMemberInfo::EnumValue) {
555 555 error = QString("EnumValue '") + attributeName + "' can not be overwritten on " + obj->ob_type->tp_name + " object";
556 556 } else if (member._type == PythonQtMemberInfo::EnumWrapper) {
557 557 error = QString("Enum '") + attributeName + "' can not be overwritten on " + obj->ob_type->tp_name + " object";
558 558 } else if (member._type == PythonQtMemberInfo::NotFound) {
559 559 // check for a setter slot
560 560 static const QByteArray setterString("py_set_");
561 561 PythonQtMemberInfo setter = wrapper->classInfo()->member(setterString + attributeName);
562 562 if (setter._type == PythonQtMemberInfo::Slot) {
563 563 // call the setter and ignore the result value
564 564 void* result;
565 565 PyObject* args = PyTuple_New(1);
566 566 Py_INCREF(value);
567 567 PyTuple_SET_ITEM(args, 0, value);
568 568 PythonQtSlotFunction_CallImpl(wrapper->classInfo(), wrapper->_obj, setter._slot, args, NULL, wrapper->_wrappedPtr, &result);
569 569 Py_DECREF(args);
570 570 return 0;
571 571 }
572 572
573 573 // handle dynamic properties
574 574 if (wrapper->_obj) {
575 575 QVariant prop = wrapper->_obj->property(attributeName);
576 576 if (prop.isValid()) {
577 577 QVariant v = PythonQtConv::PyObjToQVariant(value);
578 578 if (v.isValid()) {
579 579 wrapper->_obj->setProperty(attributeName, v);
580 580 return 0;
581 581 } else {
582 582 error = QString("Dynamic property '") + attributeName + "' does not accept an object of type "
583 583 + QString(value->ob_type->tp_name) + " (" + PythonQtConv::PyObjGetRepresentation(value) + ")";
584 584 PyErr_SetString(PyExc_AttributeError, error.toLatin1().data());
585 585 return -1;
586 586 }
587 587 }
588 588 }
589 589
590 590 // if we are a derived python class, we allow setting attributes.
591 591 // if we are a direct CPP wrapper, we do NOT allow it, since
592 592 // it would be confusing to allow it because a wrapper will go away when it is not seen by python anymore
593 593 // and when it is recreated from a CPP pointer the attributes are gone...
594 594 if (obj->ob_type->tp_base != &PythonQtInstanceWrapper_Type) {
595 595 return PyBaseObject_Type.tp_setattro(obj,name,value);
596 596 } else {
597 597 error = QString("'") + attributeName + "' does not exist on " + obj->ob_type->tp_name + " and creating new attributes on C++ objects is not allowed";
598 598 }
599 599 }
600 600
601 601 PyErr_SetString(PyExc_AttributeError, error.toLatin1().data());
602 602 return -1;
603 603 }
604 604
605 605 static QString getStringFromObject(PythonQtInstanceWrapper* wrapper) {
606 606 QString result;
607 607 if (wrapper->_wrappedPtr) {
608 608 // first try some manually string conversions for some variants
609 609 int metaid = wrapper->classInfo()->metaTypeId();
610 610 result = PythonQtConv::CPPObjectToString(metaid, wrapper->_wrappedPtr);
611 611 if (!result.isEmpty()) {
612 612 return result;
613 613 }
614 614 }
615 615 if (wrapper->_wrappedPtr || wrapper->_obj) {
616 616 // next, try to call py_toString
617 617 PythonQtMemberInfo info = wrapper->classInfo()->member("py_toString");
618 618 if (info._type == PythonQtMemberInfo::Slot) {
619 619 PyObject* resultObj = PythonQtSlotFunction_CallImpl(wrapper->classInfo(), wrapper->_obj, info._slot, NULL, NULL, wrapper->_wrappedPtr);
620 620 if (resultObj) {
621 621 // TODO this is one conversion too much, would be nicer to call the slot directly...
622 622 result = PythonQtConv::PyObjGetString(resultObj);
623 623 Py_DECREF(resultObj);
624 624 }
625 625 }
626 626 }
627 627 return result;
628 628 }
629 629
630 630 static PyObject * PythonQtInstanceWrapper_str(PyObject * obj)
631 631 {
632 632 PythonQtInstanceWrapper* wrapper = (PythonQtInstanceWrapper*)obj;
633 633
634 634 // QByteArray should be directly returned as a str
635 635 if (wrapper->classInfo()->metaTypeId()==QVariant::ByteArray) {
636 636 QByteArray* b = (QByteArray*) wrapper->_wrappedPtr;
637 637 if (b->data()) {
638 638 #ifdef PY3K
639 639 return PyUnicode_FromStringAndSize(b->data(), b->size());
640 640 #else
641 641 return PyString_FromStringAndSize(b->data(), b->size());
642 642 #endif
643 643 } else {
644 644 #ifdef PY3K
645 645 return PyUnicode_New(0, 0);
646 646 #else
647 647 return PyString_FromString("");
648 648 #endif
649 649 }
650 650 }
651 651
652 652 const char* typeName = obj->ob_type->tp_name;
653 653 QObject *qobj = wrapper->_obj;
654 654 QString str = getStringFromObject(wrapper);
655 655 if (!str.isEmpty()) {
656 656 #ifdef PY3K
657 657 return PyUnicode_FromFormat("%s", str.toLatin1().constData());
658 658 #else
659 659 return PyString_FromFormat("%s", str.toLatin1().constData());
660 660 #endif
661 661 }
662 662 if (wrapper->_wrappedPtr) {
663 663 if (wrapper->_obj) {
664 664 #ifdef PY3K
665 return PyUnicode_FromFormat("%s (C++ Object %p wrapped by %s %p)", typeName, wrapper->_wrappedPtr, wrapper->_obj->metaObject()->className(), qobj);
665 return PyUnicode_FromFormat("<%s C++ Object at %p wrapped by %s at %p>", typeName, wrapper->_wrappedPtr, wrapper->_obj->metaObject()->className(), qobj);
666 666 #else
667 667 return PyString_FromFormat("%s (C++ Object %p wrapped by %s %p)", typeName, wrapper->_wrappedPtr, wrapper->_obj->metaObject()->className(), qobj);
668 668 #endif
669 669 } else {
670 670 #ifdef PY3K
671 return PyUnicode_FromFormat("%s (C++ Object %p)", typeName, wrapper->_wrappedPtr);
671 return PyUnicode_FromFormat("<%s C++ Object at %p>", typeName, wrapper->_wrappedPtr);
672 672 #else
673 673 return PyString_FromFormat("%s (C++ Object %p)", typeName, wrapper->_wrappedPtr);
674 674 #endif
675 675 }
676 676 } else {
677 677 #ifdef PY3K
678 return PyUnicode_FromFormat("%s (QObject %p)", typeName, qobj);
678 return PyUnicode_FromFormat("<%s QObject at %p>", typeName, qobj);
679 679 #else
680 680 return PyString_FromFormat("%s (QObject %p)", typeName, qobj);
681 681 #endif
682 682 }
683 683 }
684 684
685 685 static PyObject * PythonQtInstanceWrapper_repr(PyObject * obj)
686 686 {
687 687 PythonQtInstanceWrapper* wrapper = (PythonQtInstanceWrapper*)obj;
688 688 const char* typeName = obj->ob_type->tp_name;
689 689
690 690 QObject *qobj = wrapper->_obj;
691 691 QString str = getStringFromObject(wrapper);
692 692 if (!str.isEmpty()) {
693 693 if (str.startsWith(typeName)) {
694 694 #ifdef PY3K
695 695 return PyUnicode_FromFormat("%s", str.toLatin1().constData());
696 696 #else
697 697 return PyString_FromFormat("%s", str.toLatin1().constData());
698 698 #endif
699 699 } else {
700 700 #ifdef PY3K
701 return PyUnicode_FromFormat("%s (%s, at: %p)", typeName, str.toLatin1().constData(), wrapper->_wrappedPtr ? wrapper->_wrappedPtr : qobj);
701 return PyUnicode_FromFormat("<%s %s at %p>", typeName, str.toLatin1().constData(), wrapper->_wrappedPtr ? wrapper->_wrappedPtr : qobj);
702 702 #else
703 703 return PyString_FromFormat("%s (%s, at: %p)", typeName, str.toLatin1().constData(), wrapper->_wrappedPtr ? wrapper->_wrappedPtr : qobj);
704 704 #endif
705 705 }
706 706 }
707 707 if (wrapper->_wrappedPtr) {
708 708 if (wrapper->_obj) {
709 709 #ifdef PY3K
710 return PyUnicode_FromFormat("%s (C++ object at: %p wrapped by %s at: %p)", typeName, wrapper->_wrappedPtr, wrapper->_obj->metaObject()->className(), qobj);
710 return PyUnicode_FromFormat("<%s C++ object at %p wrapped by %s at %p>", typeName, wrapper->_wrappedPtr, wrapper->_obj->metaObject()->className(), qobj);
711 711 #else
712 712 return PyString_FromFormat("%s (C++ object at: %p wrapped by %s at: %p)", typeName, wrapper->_wrappedPtr, wrapper->_obj->metaObject()->className(), qobj);
713 713 #endif
714 714 } else {
715 715 #ifdef PY3K
716 return PyUnicode_FromFormat("%s (C++ object at: %p)", typeName, wrapper->_wrappedPtr);
716 return PyUnicode_FromFormat("<%s C++ object at %p>", typeName, wrapper->_wrappedPtr);
717 717 #else
718 718 return PyString_FromFormat("%s (C++ object at: %p)", typeName, wrapper->_wrappedPtr);
719 719 #endif
720 720 }
721 721 } else {
722 722 #ifdef PY3K
723 return PyUnicode_FromFormat("%s (%s at: %p)", typeName, wrapper->classInfo()->className(), qobj);
723 return PyUnicode_FromFormat("<%s %s at %p>", typeName, wrapper->classInfo()->className(), qobj);
724 724 #else
725 725 return PyString_FromFormat("%s (%s at: %p)", typeName, wrapper->classInfo()->className(), qobj);
726 726 #endif
727 727 }
728 728 }
729 729
730 730 static int PythonQtInstanceWrapper_builtin_nonzero(PyObject *obj)
731 731 {
732 732 PythonQtInstanceWrapper* wrapper = (PythonQtInstanceWrapper*)obj;
733 733 return (wrapper->_wrappedPtr == NULL && wrapper->_obj == NULL)?0:1;
734 734 }
735 735
736 736
737 737 static long PythonQtInstanceWrapper_hash(PythonQtInstanceWrapper *obj)
738 738 {
739 739 if (obj->_wrappedPtr != NULL) {
740 740 return reinterpret_cast<long>(obj->_wrappedPtr);
741 741 } else {
742 742 QObject* qobj = obj->_obj; // get pointer from QPointer wrapper
743 743 return reinterpret_cast<long>(qobj);
744 744 }
745 745 }
746 746
747 747
748 748
749 749 // we override nb_nonzero, so that one can do 'if' expressions to test for a NULL ptr
750 750 static PyNumberMethods PythonQtInstanceWrapper_as_number = {
751 751 0, /* nb_add */
752 752 0, /* nb_subtract */
753 753 0, /* nb_multiply */
754 754 #ifndef PY3K
755 755 0, /* nb_divide */
756 756 #endif
757 757 0, /* nb_remainder */
758 758 0, /* nb_divmod */
759 759 0, /* nb_power */
760 760 0, /* nb_negative */
761 761 0, /* nb_positive */
762 762 0, /* nb_absolute */
763 763 PythonQtInstanceWrapper_builtin_nonzero, /* nb_nonzero / nb_bool in Py3K */
764 764 0, /* nb_invert */
765 765 0, /* nb_lshift */
766 766 0, /* nb_rshift */
767 767 0, /* nb_and */
768 768 0, /* nb_xor */
769 769 0, /* nb_or */
770 770 #ifndef PY3K
771 771 0, /* nb_coerce */
772 772 #endif
773 773 0, /* nb_int */
774 774 0, /* nb_long / nb_reserved in Py3K */
775 775 0, /* nb_float */
776 776 #ifndef PY3K
777 777 0, /* nb_oct */
778 778 0, /* nb_hex */
779 779 #endif
780 780 0, /* nb_inplace_add */
781 781 0, /* nb_inplace_subtract */
782 782 0, /* nb_inplace_multiply */
783 783 #ifndef PY3K
784 784 0, /* nb_inplace_divide */
785 785 #endif
786 786 0, /* nb_inplace_remainder */
787 787 0, /* nb_inplace_power */
788 788 0, /* nb_inplace_lshift */
789 789 0, /* nb_inplace_rshift */
790 790 0, /* nb_inplace_and */
791 791 0, /* nb_inplace_xor */
792 792 0, /* nb_inplace_or */
793 793 0, /* nb_floor_divide */
794 794 0, /* nb_true_divide */
795 795 0, /* nb_inplace_floor_divide */
796 796 0, /* nb_inplace_true_divide */
797 797 #ifdef PY3K
798 798 0, /* nb_index in Py3K */
799 799 #endif
800 800 };
801 801
802 802 PyTypeObject PythonQtInstanceWrapper_Type = {
803 803 PyVarObject_HEAD_INIT(&PythonQtClassWrapper_Type, 0)
804 804 "PythonQt.PythonQtInstanceWrapper", /*tp_name*/
805 805 sizeof(PythonQtInstanceWrapper), /*tp_basicsize*/
806 806 0, /*tp_itemsize*/
807 807 (destructor)PythonQtInstanceWrapper_dealloc, /*tp_dealloc*/
808 808 0, /*tp_print*/
809 809 0, /*tp_getattr*/
810 810 0, /*tp_setattr*/
811 811 0, /*tp_compare*/
812 812 PythonQtInstanceWrapper_repr, /*tp_repr*/
813 813 &PythonQtInstanceWrapper_as_number, /*tp_as_number*/
814 814 0, /*tp_as_sequence*/
815 815 0, /*tp_as_mapping*/
816 816 (hashfunc)PythonQtInstanceWrapper_hash, /*tp_hash */
817 817 0, /*tp_call*/
818 818 PythonQtInstanceWrapper_str, /*tp_str*/
819 819 PythonQtInstanceWrapper_getattro, /*tp_getattro*/
820 820 PythonQtInstanceWrapper_setattro, /*tp_setattro*/
821 821 0, /*tp_as_buffer*/
822 822 Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE /*| Py_TPFLAGS_CHECKTYPES FIXME Py_TPFLAGS_CHECKTYPES removal */, /*tp_flags*/
823 823 "PythonQtInstanceWrapper object", /* tp_doc */
824 824 0, /* tp_traverse */
825 825 0, /* tp_clear */
826 826 (richcmpfunc)PythonQtInstanceWrapper_richcompare, /* tp_richcompare */
827 827 0, /* tp_weaklistoffset */
828 828 0, /* tp_iter */
829 829 0, /* tp_iternext */
830 830 PythonQtInstanceWrapper_methods, /* tp_methods */
831 831 0, /* tp_members */
832 832 0, /* tp_getset */
833 833 0, /* tp_base */
834 834 0, /* tp_dict */
835 835 0, /* tp_descr_get */
836 836 0, /* tp_descr_set */
837 837 0, /* tp_dictoffset */
838 838 (initproc)PythonQtInstanceWrapper_init, /* tp_init */
839 839 0, /* tp_alloc */
840 840 PythonQtInstanceWrapper_new, /* tp_new */
841 841 };
842 842
843 843 //-------------------------------------------------------
844 844
@@ -1,26 +1,26
1 1 # PythonQt Tests
2 2 # must be included from PythonQt main CMakeLists
3 3
4 4 project(PythonQt_Tests)
5 5
6 6 SET(HEADERS
7 7 PythonQtTests.h
8 8 )
9 9
10 10 SET(SOURCES
11 11 PythonQtTestMain.cpp
12 12 PythonQtTests.cpp
13 13 )
14 14
15 15 include_directories(../src)
16 16
17 17 qt_wrap_cpp(GEN_HEADERS ${HEADERS})
18 18
19 19 add_executable(PythonQtTest ${SOURCES} ${GEN_HEADERS})
20 20 if(PythonQt_Qt5)
21 21 qt_use_modules(PythonQtTest Test Gui Widgets)
22 22 else()
23 23 qt_use_modules(PythonQtTest Test Gui)
24 24 endif()
25 get_property(PythonQt_lib TARGET PythonQt PROPERTY LOCATION)
25 get_property(PythonQt_lib TARGET ${PythonQt} PROPERTY LOCATION)
26 26 target_link_libraries(PythonQtTest ${PythonQt_lib} ${PYTHON_LIBRARIES})
General Comments 0
You need to be logged in to leave comments. Login now