aboutsummaryrefslogtreecommitdiffstats
path: root/PySide
diff options
context:
space:
mode:
authorHugo Parente Lima <hugo.lima@openbossa.org>2010-04-09 16:23:07 -0300
committerHugo Parente Lima <hugo.lima@openbossa.org>2010-04-09 18:18:17 -0300
commit9498ae46122f3f89e7aa44e50099be847c58ec2c (patch)
treee667b5f9ce201a6d813c8ce5f83bf933e51cc4d6 /PySide
parent965a16322bade4098b8fe187296e62b746d6b590 (diff)
Initial bindings for QtHelp
Reviewer: Renato Araújo <renato.filho@openbossa.org> Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
Diffstat (limited to 'PySide')
-rw-r--r--PySide/CMakeLists.txt2
-rw-r--r--PySide/QtHelp/CMakeLists.txt48
-rw-r--r--PySide/QtHelp/typesystem_help.xml36
3 files changed, 86 insertions, 0 deletions
diff --git a/PySide/CMakeLists.txt b/PySide/CMakeLists.txt
index 3b3de3359..b9b9d60c1 100644
--- a/PySide/CMakeLists.txt
+++ b/PySide/CMakeLists.txt
@@ -44,3 +44,5 @@ HAS_QT_MODULE(QT_QTTEST_FOUND QtTest)
HAS_QT_MODULE(QT_QTOPENGL_FOUND QtOpenGL)
HAS_QT_MODULE(QT_QTSQL_FOUND QtSql)
HAS_QT_MODULE(QT_QTUITOOLS_FOUND QtUiTools)
+HAS_QT_MODULE(QT_QTHELP_FOUND QtHelp)
+
diff --git a/PySide/QtHelp/CMakeLists.txt b/PySide/QtHelp/CMakeLists.txt
new file mode 100644
index 000000000..fd27ab553
--- /dev/null
+++ b/PySide/QtHelp/CMakeLists.txt
@@ -0,0 +1,48 @@
+project(QtHelp)
+
+set(QtHelp_SRC
+ ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtHelp/qhelpcontentitem_wrapper.cpp
+ ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtHelp/qhelpcontentmodel_wrapper.cpp
+ ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtHelp/qhelpcontentwidget_wrapper.cpp
+ ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtHelp/qhelpenginecore_wrapper.cpp
+ ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtHelp/qhelpengine_wrapper.cpp
+ ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtHelp/qhelpindexmodel_wrapper.cpp
+ ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtHelp/qhelpindexwidget_wrapper.cpp
+ ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtHelp/qhelpsearchengine_wrapper.cpp
+ ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtHelp/qhelpsearchquerywidget_wrapper.cpp
+ ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtHelp/qhelpsearchquery_wrapper.cpp
+ ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtHelp/qhelpsearchresultwidget_wrapper.cpp
+ ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtHelp/qthelp_module_wrapper.cpp
+)
+
+execute_generator(help QtHelp_SRC "${CMAKE_CURRENT_BINARY_DIR}:${QtCore_SOURCE_DIR}:${QtGui_BINARY_DIR}:${QtGui_SOURCE_DIR}:${QtHelp_SOURCE_DIR}")
+
+include_directories(${CMAKE_CURRENT_SOURCE_DIR}
+ ${QT_QTCORE_INCLUDE_DIR}
+ ${QT_QTGUI_INCLUDE_DIR}
+ ${QT_QTHELP_INCLUDE_DIR}
+ ${PYTHON_INCLUDE_PATH}
+ ${SHIBOKEN_INCLUDE_DIR}
+ ${libpyside_SOURCE_DIR}
+ ${QtGui_BINARY_DIR}/PySide/QtGui/
+ ${QtCore_BINARY_DIR}/PySide/QtCore/
+ ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtHelp)
+add_library(QtHelp MODULE ${QtHelp_SRC})
+
+set_target_properties(QtHelp PROPERTIES PREFIX "")
+
+target_link_libraries(QtHelp
+ pyside
+ ${PYTHON_LIBRARIES}
+ ${QT_QTCORE_LIBRARY}
+ ${QT_QTGUI_LIBRARY}
+ ${QT_QTHELP_LIBRARY})
+add_dependencies(QtHelp QtGui)
+
+# install
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/QtHelp.so
+ DESTINATION ${SITE_PACKAGE}/PySide)
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtHelp/pyside_qthelp_python.h
+ DESTINATION include/PySide/QtHelp/)
+
+
diff --git a/PySide/QtHelp/typesystem_help.xml b/PySide/QtHelp/typesystem_help.xml
new file mode 100644
index 000000000..fecd3fbcd
--- /dev/null
+++ b/PySide/QtHelp/typesystem_help.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+
+<typesystem package="PySide.QtHelp">
+ <load-typesystem name="typesystem_gui.xml" generate="no" />
+
+ <enum-type name="QHelpSearchQuery::FieldName"/>
+
+ <value-type name="QHelpContentItem">
+ <modify-function signature="child(int) const">
+ <modify-argument index="return">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="parent() const">
+ <modify-argument index="return">
+ <define-ownership owner="target"/>
+ </modify-argument>
+ </modify-function>
+ </value-type>
+ <object-type name="QHelpContentModel">
+ <modify-function signature="contentItemAt(const QModelIndex &amp;) const">
+ <modify-argument index="return">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ </object-type>
+ <object-type name="QHelpContentWidget"/>
+ <object-type name="QHelpEngine" />
+ <object-type name="QHelpEngineCore"/>
+ <object-type name="QHelpIndexModel" />
+ <object-type name="QHelpIndexWidget"/>
+ <object-type name="QHelpSearchEngine"/>
+ <value-type name="QHelpSearchQuery"/>
+ <object-type name="QHelpSearchQueryWidget"/>
+ <object-type name="QHelpSearchResultWidget"/>
+</typesystem>