aboutsummaryrefslogtreecommitdiffstats
path: root/PySide
diff options
context:
space:
mode:
authorHugo Parente Lima <hugo.lima@openbossa.org>2010-05-24 16:30:53 -0300
committerHugo Parente Lima <hugo.lima@openbossa.org>2010-05-24 17:28:48 -0300
commitfbc43d942a6ff0dc5ef2e1446bb96ed6bee7d35c (patch)
tree2aa01a221feb7317e4c634d63b2ec7ed4b404aab /PySide
parent92a07a7a15394b3f0a01004988d6025e7c8f1e9e (diff)
Initial bindings for QtDeclarative module.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org> Renato Araújo <renato.filho@openbossa.org>
Diffstat (limited to 'PySide')
-rw-r--r--PySide/CMakeLists.txt16
-rw-r--r--PySide/QtDeclarative/CMakeLists.txt59
-rw-r--r--PySide/QtDeclarative/typesystem_declarative.xml33
-rw-r--r--PySide/global.h.in1
4 files changed, 108 insertions, 1 deletions
diff --git a/PySide/CMakeLists.txt b/PySide/CMakeLists.txt
index e44c693a1..23e2dc4dc 100644
--- a/PySide/CMakeLists.txt
+++ b/PySide/CMakeLists.txt
@@ -51,7 +51,7 @@ if (NOT QT_QTMULTIMEDIA_FOUND AND ${QTVERSION} VERSION_GREATER 4.5.9)
endif()
endif ()
-# Try to find QtMaemo5 this need be before QtGui for enable some flags on that
+# Try to find QtMaemo5 - it has to be done before QtGui to enable some QtMaemo5 flags
# TODO: Remove this hack when cmake support QtMaemo5 module
if (NOT QT_QTMAEMO5_FOUND AND ${QTVERSION} VERSION_GREATER 4.5.9)
find_path(QT_QTMAEMO5_INCLUDE_DIR QtMaemo5
@@ -65,6 +65,19 @@ if (NOT QT_QTMAEMO5_FOUND AND ${QTVERSION} VERSION_GREATER 4.5.9)
endif()
endif ()
+# Try to find QtDeclarative
+# TODO: Remove this hack when cmake support QtDeclarative module
+if (NOT QT_QTDECLARATIVE_FOUND AND ${QTVERSION} VERSION_GREATER 4.6.0)
+ find_path(QT_QTDECLARATIVE_INCLUDE_DIR QtDeclarative
+ PATHS ${QT_HEADERS_DIR}/QtDeclarative
+ ${QT_LIBRARY_DIR}/QtDeclarative.framework/Headers
+ NO_DEFAULT_PATH)
+ find_library(QT_QTDECLARATIVE_LIBRARY QtDeclarative PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
+ if (QT_QTDECLARATIVE_INCLUDE_DIR AND QT_QTDECLARATIVE_LIBRARY)
+ set(QT_QTDECLARATIVE_FOUND ON)
+ endif()
+endif ()
+
HAS_QT_MODULE(QT_QTCORE_FOUND QtCore)
HAS_QT_MODULE(QT_QTGUI_FOUND QtGui)
HAS_QT_MODULE(QT_QTNETWORK_FOUND QtNetwork)
@@ -82,3 +95,4 @@ HAS_QT_MODULE(QT_QTSCRIPT_FOUND QtScript)
HAS_QT_MODULE(QT_QTSCRIPTTOOLS_FOUND QtScriptTools)
HAS_QT_MODULE(QT_QTMULTIMEDIA_FOUND QtMultimedia)
HAS_QT_MODULE(QT_PHONON_FOUND phonon)
+HAS_QT_MODULE(QT_QTDECLARATIVE_FOUND QtDeclarative)
diff --git a/PySide/QtDeclarative/CMakeLists.txt b/PySide/QtDeclarative/CMakeLists.txt
new file mode 100644
index 000000000..587e3b5e6
--- /dev/null
+++ b/PySide/QtDeclarative/CMakeLists.txt
@@ -0,0 +1,59 @@
+project(QtDeclarative)
+
+set(QtDeclarative_SRC
+${CMAKE_CURRENT_BINARY_DIR}/PySide/QtDeclarative/qdeclarativecomponent_wrapper.cpp
+${CMAKE_CURRENT_BINARY_DIR}/PySide/QtDeclarative/qdeclarativecontext_wrapper.cpp
+${CMAKE_CURRENT_BINARY_DIR}/PySide/QtDeclarative/qdeclarativeengine_wrapper.cpp
+${CMAKE_CURRENT_BINARY_DIR}/PySide/QtDeclarative/qdeclarativeerror_wrapper.cpp
+${CMAKE_CURRENT_BINARY_DIR}/PySide/QtDeclarative/qdeclarativeexpression_wrapper.cpp
+${CMAKE_CURRENT_BINARY_DIR}/PySide/QtDeclarative/qdeclarativeextensionplugin_wrapper.cpp
+${CMAKE_CURRENT_BINARY_DIR}/PySide/QtDeclarative/qdeclarativeimageprovider_wrapper.cpp
+${CMAKE_CURRENT_BINARY_DIR}/PySide/QtDeclarative/qdeclarativeitem_wrapper.cpp
+${CMAKE_CURRENT_BINARY_DIR}/PySide/QtDeclarative/qdeclarativelistreference_wrapper.cpp
+${CMAKE_CURRENT_BINARY_DIR}/PySide/QtDeclarative/qdeclarativenetworkaccessmanagerfactory_wrapper.cpp
+${CMAKE_CURRENT_BINARY_DIR}/PySide/QtDeclarative/qdeclarativeparserstatus_wrapper.cpp
+${CMAKE_CURRENT_BINARY_DIR}/PySide/QtDeclarative/qdeclarativepropertymap_wrapper.cpp
+${CMAKE_CURRENT_BINARY_DIR}/PySide/QtDeclarative/qdeclarativepropertyvaluesource_wrapper.cpp
+${CMAKE_CURRENT_BINARY_DIR}/PySide/QtDeclarative/qdeclarativeproperty_wrapper.cpp
+${CMAKE_CURRENT_BINARY_DIR}/PySide/QtDeclarative/qdeclarativescriptstring_wrapper.cpp
+${CMAKE_CURRENT_BINARY_DIR}/PySide/QtDeclarative/qdeclarativeview_wrapper.cpp
+${CMAKE_CURRENT_BINARY_DIR}/PySide/QtDeclarative/qtdeclarative_module_wrapper.cpp
+)
+
+execute_generator(declarative QtDeclarative_SRC "${CMAKE_CURRENT_BINARY_DIR}:${QtCore_SOURCE_DIR}:${QtGui_BINARY_DIR}:${QtGui_SOURCE_DIR}:${QtDeclarative_SOURCE_DIR}:${QtNetwork_SOURCE_DIR}:${QtNetwork_BINARY_DIR}")
+
+include_directories(${CMAKE_CURRENT_SOURCE_DIR}
+ ${QT_QTCORE_INCLUDE_DIR}
+ ${QT_QTGUI_INCLUDE_DIR}
+ ${QT_QTNETWORK_INCLUDE_DIR}
+ ${QT_QTDECLARATIVE_INCLUDE_DIR}
+ ${PYTHON_INCLUDE_PATH}
+ ${SHIBOKEN_INCLUDE_DIR}
+ ${libpyside_SOURCE_DIR}
+ ${QtGui_BINARY_DIR}/PySide/QtGui/
+ ${QtCore_BINARY_DIR}/PySide/QtCore/
+ ${QtNetwork_BINARY_DIR}/PySide/QtNetwork/
+ ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtDeclarative)
+add_library(QtDeclarative MODULE ${QtDeclarative_SRC})
+set_target_properties(QtDeclarative PROPERTIES PREFIX "")
+target_link_libraries(QtDeclarative
+ pyside
+ ${PYTHON_LIBRARIES}
+ ${QT_QTCORE_LIBRARY}
+ ${QT_QTGUI_LIBRARY}
+ ${QT_QTNETWORK_LIBRARY}
+ ${QT_QTSCRIPT_LIBRARY}
+ ${QT_QTSVG_LIBRARY}
+ ${QT_QTSQL_LIBRARY}
+ ${QT_QTXMLPATTERNS_LIBRARY}
+ ${QT_QTOPENGL_LIBRARY}
+ ${QT_QTDECLARATIVE_LIBRARY})
+add_dependencies(QtDeclarative QtGui)
+add_dependencies(QtDeclarative QtNetwork)
+
+# install
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/QtDeclarative${CMAKE_DEBUG_POSTFIX}.so
+ DESTINATION ${SITE_PACKAGE}/PySide)
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtDeclarative/pyside_qtdeclarative_python.h
+ DESTINATION include/PySide/QtDeclarative/)
+
diff --git a/PySide/QtDeclarative/typesystem_declarative.xml b/PySide/QtDeclarative/typesystem_declarative.xml
new file mode 100644
index 000000000..5770109be
--- /dev/null
+++ b/PySide/QtDeclarative/typesystem_declarative.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0"?>
+<typesystem package="PySide.QtDeclarative">
+ <load-typesystem name="typesystem_core.xml" generate="no"/>
+ <load-typesystem name="typesystem_network.xml" generate="no"/>
+ <load-typesystem name="typesystem_gui.xml" generate="no"/>
+
+ <object-type name="QDeclarativeComponent" />
+ <enum-type name="QDeclarativeComponent::Status" />
+ <object-type name="QDeclarativeContext" />
+ <object-type name="QDeclarativeEngine" />
+ <enum-type name="QDeclarativeEngine::ObjectOwnership" />
+ <value-type name="QDeclarativeError" />
+ <object-type name="QDeclarativeExpression" />
+ <object-type name="QDeclarativeExtensionPlugin" />
+ <object-type name="QDeclarativeImageProvider" />
+ <object-type name="QDeclarativeItem" />
+ <enum-type name="QDeclarativeItem::TransformOrigin" />
+
+ <value-type name="QDeclarativeListReference" />
+ <object-type name="QDeclarativeNetworkAccessManagerFactory" />
+ <object-type name="QDeclarativeParserStatus" />
+
+ <value-type name="QDeclarativeProperty" />
+ <enum-type name="QDeclarativeProperty::PropertyTypeCategory" />
+ <enum-type name="QDeclarativeProperty::Type" />
+
+ <object-type name="QDeclarativePropertyMap" />
+ <object-type name="QDeclarativePropertyValueSource" />
+ <value-type name="QDeclarativeScriptString" />
+ <object-type name="QDeclarativeView" />
+ <enum-type name="QDeclarativeView::ResizeMode" />
+ <enum-type name="QDeclarativeView::Status" />
+</typesystem>
diff --git a/PySide/global.h.in b/PySide/global.h.in
index bd7cf0e43..c9c8ba8f2 100644
--- a/PySide/global.h.in
+++ b/PySide/global.h.in
@@ -359,6 +359,7 @@ QT_END_HEADER
#include <QtScriptTools/QtScriptTools>
#include <QtMultimedia/QtMultimedia>
#include <QtMaemo5/QtMaemo5>
+#include <QtDeclarative/QtDeclarative>
// QT_GUI_LIB must be defined to QSqlRelationalDelegate become visible
#define QT_GUI_LIB