From: <ai...@us...> - 2009-06-22 21:01:17
|
Revision: 10060 http://plplot.svn.sourceforge.net/plplot/?rev=10060&view=rev Author: airwin Date: 2009-06-22 21:00:30 +0000 (Mon, 22 Jun 2009) Log Message: ----------- Move pyqt4 directory to bindings/qt_gui since it depends on the creation of the plplotqt library that is created in qt_gui. Change names where appropriate from pyqt to pyqt4. Modified Paths: -------------- trunk/bindings/python/CMakeLists.txt trunk/bindings/qt_gui/CMakeLists.txt trunk/bindings/qt_gui/pyqt4/config.py Added Paths: ----------- trunk/bindings/qt_gui/pyqt4/ trunk/bindings/qt_gui/pyqt4/CMakeLists.txt trunk/bindings/qt_gui/pyqt4/plplot_pyqt4.sip Removed Paths: ------------- trunk/bindings/python/pyqt4/ trunk/bindings/qt_gui/pyqt4/CMakeLists.txt trunk/bindings/qt_gui/pyqt4/plplot_pyqt.sip Modified: trunk/bindings/python/CMakeLists.txt =================================================================== --- trunk/bindings/python/CMakeLists.txt 2009-06-22 20:15:51 UTC (rev 10059) +++ trunk/bindings/python/CMakeLists.txt 2009-06-22 21:00:30 UTC (rev 10060) @@ -115,6 +115,4 @@ DESTINATION ${PYTHON_INSTDIR} ) -add_subdirectory(pyqt4) - endif(ENABLE_python) Modified: trunk/bindings/qt_gui/CMakeLists.txt =================================================================== --- trunk/bindings/qt_gui/CMakeLists.txt 2009-06-22 20:15:51 UTC (rev 10059) +++ trunk/bindings/qt_gui/CMakeLists.txt 2009-06-22 21:00:30 UTC (rev 10060) @@ -18,7 +18,7 @@ # along with PLplot; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -if(PLD_extqt) +if(ENABLE_qt) include_directories( ${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/lib/qsastime @@ -176,4 +176,6 @@ ) install(FILES ${PC_CONFIGURED_FILE} DESTINATION ${PKG_CONFIG_DIR}) endif(PKG_CONFIG_EXECUTABLE) -endif(PLD_extqt) + + add_subdirectory(pyqt4) +endif(ENABLE_qt) Property changes on: trunk/bindings/qt_gui/pyqt4 ___________________________________________________________________ Added: svn:mergeinfo + Deleted: trunk/bindings/qt_gui/pyqt4/CMakeLists.txt =================================================================== --- trunk/bindings/python/pyqt4/CMakeLists.txt 2009-06-15 21:45:13 UTC (rev 10045) +++ trunk/bindings/qt_gui/pyqt4/CMakeLists.txt 2009-06-22 21:00:30 UTC (rev 10060) @@ -1,81 +0,0 @@ -# bindings/python/CMakeLists.txt -### Process this file with cmake to produce Makefile -### -# Copyright (C) 2009 Hazen Babcock -# -# This file is part of PLplot. -# -# PLplot is free software; you can redistribute it and/or modify -# it under the terms of the GNU Library General Public License as published -# by the Free Software Foundation; version 2 of the License. -# -# PLplot is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Library General Public License for more details. -# -# You should have received a copy of the GNU Library General Public License -# along with PLplot; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - -if(ENABLE_pyqt4) - #message(" ENABLE_pyqt4") - file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/pyqt4_config) - - set(PYQT4_CONFIG_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/pyqt4_config) - - add_custom_command( - OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/config.py.in - COMMAND ${CMAKE_COMMAND} -E touch ${PYQT4_CONFIG_DIRECTORY}/config.py.in - COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/plplot_pyqt.sip ${PYQT4_CONFIG_DIRECTORY}/. - COMMAND python ${CMAKE_CURRENT_SOURCE_DIR}/config.py - WORKING_DIRECTORY ${PYQT4_CONFIG_DIRECTORY}/ - DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/config.py ${CMAKE_CURRENT_SOURCE_DIR}/plplot_pyqt.sip - ) - add_custom_target(generate_pyqt_source - DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/config.py.in - ) - - set_source_files_properties( - ${PYQT4_CONFIG_DIRECTORY}/sipAPIplplot_pyqt.h - ${PYQT4_CONFIG_DIRECTORY}/sipplplot_pyqtcmodule.cpp - ${PYQT4_CONFIG_DIRECTORY}/sipplplot_pyqtQtExtWidget.cpp - ${PYQT4_CONFIG_DIRECTORY}/sipplplot_pyqtQtPLDriver.cpp - ${PYQT4_CONFIG_DIRECTORY}/sipplplot_pyqtQtPLWidget.cpp - PROPERTIES GENERATED ON - ) - - add_library( - plplot_pyqt - MODULE - ${PYQT4_CONFIG_DIRECTORY}/sipplplot_pyqtcmodule.cpp - ${PYQT4_CONFIG_DIRECTORY}/sipplplot_pyqtQtExtWidget.cpp - ${PYQT4_CONFIG_DIRECTORY}/sipplplot_pyqtQtPLDriver.cpp - ${PYQT4_CONFIG_DIRECTORY}/sipplplot_pyqtQtPLWidget.cpp - ) - - set_target_properties(plplot_pyqt PROPERTIES PREFIX "") - - if(ENABLE_DYNDRIVERS) -# include_directories( -# ${CMAKE_BINARY_DIR}/drivers -# ) - get_target_property(qt_LOCATION qt LOCATION) - - target_link_libraries( - plplot_pyqt - ${qt_location} - plplot${LIB_TAG} - ${QT_LIBRARIES} - ) - endif(ENABLE_DYNDRIVERS) - - #message(${PYTHON_INSTDIR}) - - install( - TARGETS plplot_pyqt - LIBRARY - DESTINATION ${PYTHON_INSTDIR} - ) - -endif(ENABLE_pyqt4) Copied: trunk/bindings/qt_gui/pyqt4/CMakeLists.txt (from rev 10050, trunk/bindings/python/pyqt4/CMakeLists.txt) =================================================================== --- trunk/bindings/qt_gui/pyqt4/CMakeLists.txt (rev 0) +++ trunk/bindings/qt_gui/pyqt4/CMakeLists.txt 2009-06-22 21:00:30 UTC (rev 10060) @@ -0,0 +1,110 @@ +# bindings/python/CMakeLists.txt +### Process this file with cmake to produce Makefile +### +# Copyright (C) 2009 Hazen Babcock +# Copyright (C) 2009 Alan W. Irwin +# +# This file is part of PLplot. +# +# PLplot is free software; you can redistribute it and/or modify +# it under the terms of the GNU Library General Public License as published +# by the Free Software Foundation; version 2 of the License. +# +# PLplot is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public License +# along with PLplot; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +if(ENABLE_pyqt4) + #message(" ENABLE_pyqt4") + file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/pyqt4_config) + + set(PYQT4_CONFIG_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/pyqt4_config) + + add_custom_command( + OUTPUT ${PYQT4_CONFIG_DIRECTORY}/config.py.in + COMMAND ${CMAKE_COMMAND} -E touch ${PYQT4_CONFIG_DIRECTORY}/config.py.in + COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/plplot_pyqt4.sip ${PYQT4_CONFIG_DIRECTORY}/plplot_pyqt4.sip + COMMAND python ${CMAKE_CURRENT_SOURCE_DIR}/config.py + WORKING_DIRECTORY ${PYQT4_CONFIG_DIRECTORY}/ + DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/config.py + ${CMAKE_CURRENT_SOURCE_DIR}/plplot_pyqt4.sip + ) + add_custom_target(generate_pyqt4_source + DEPENDS ${PYQT4_CONFIG_DIRECTORY}/config.py.in + ) + + set_source_files_properties( + ${PYQT4_CONFIG_DIRECTORY}/sipAPIplplot_pyqt.h + PROPERTIES + GENERATED ON + ) + + set(plplot_pyqt4_SRC + ${PYQT4_CONFIG_DIRECTORY}/sipplplot_pyqtcmodule.cpp + ${PYQT4_CONFIG_DIRECTORY}/sipplplot_pyqtQtExtWidget.cpp + ${PYQT4_CONFIG_DIRECTORY}/sipplplot_pyqtQtPLDriver.cpp + ${PYQT4_CONFIG_DIRECTORY}/sipplplot_pyqtQtPLWidget.cpp + ) + set_source_files_properties( + ${plplot_pyqt4_SRC} + PROPERTIES + GENERATED ON + COMPILE_FLAGS "-DUSINGDLL" + ) + + # Assume sip.h can be found in PYTHON_INCLUDE_PATH + include_directories( + ${CMAKE_SOURCE_DIR}/drivers + ${CMAKE_SOURCE_DIR}/include + ${CMAKE_SOURCE_DIR}/lib/qsastime + ${CMAKE_BINARY_DIR} + ${CMAKE_BINARY_DIR}/include + ${PYTHON_INCLUDE_PATH} + ) + + add_library( + plplot_pyqt4 + MODULE + ${plplot_pyqt4_SRC} + ) + + set_target_properties(plplot_pyqt4 PROPERTIES PREFIX "") + + target_link_libraries( + plplot_pyqt4 + plplotqt${LIB_TAG} + plplot${LIB_TAG} + ${QT_LIBRARIES} + ${PYTHON_LIBRARIES} + ) + add_dependencies(plplot_pyqt4 generate_pyqt4_source) + + if(USE_RPATH) + set_target_properties( + plplot_pyqt4 + PROPERTIES + INSTALL_RPATH "${LIB_INSTALL_RPATH}" + INSTALL_NAME_DIR "${PYTHON_INSTDIR}" + ) + else(USE_RPATH) + set_target_properties( + plplot_pyqt4 + PROPERTIES + INSTALL_NAME_DIR "${PYTHON_INSTDIR}" + ) + endif(USE_RPATH) + + #message(${PYTHON_INSTDIR}) + + install( + TARGETS plplot_pyqt4 + LIBRARY + DESTINATION ${PYTHON_INSTDIR} + ) + +endif(ENABLE_pyqt4) Modified: trunk/bindings/qt_gui/pyqt4/config.py =================================================================== --- trunk/bindings/python/pyqt4/config.py 2009-06-15 21:45:13 UTC (rev 10045) +++ trunk/bindings/qt_gui/pyqt4/config.py 2009-06-22 21:00:30 UTC (rev 10060) @@ -4,7 +4,7 @@ # The name of the SIP build file generated by SIP and used by the build # system. -build_file = "plplot_pyqt.sbf" +build_file = "plplot_pyqt4.sbf" # Get the PyQt configuration information. config = pyqtconfig.Configuration() @@ -16,15 +16,15 @@ # Run SIP to generate the code. Note that we tell SIP where to find the qt # module's specification files using the -I flag. -os.system(" ".join([config.sip_bin, "-c", ".", "-b", build_file, "-I", config.pyqt_sip_dir, qt_sip_flags, "plplot_pyqt.sip"])) +os.system(" ".join([config.sip_bin, "-c", ".", "-b", build_file, "-I", config.pyqt_sip_dir, qt_sip_flags, "plplot_pyqt4.sip"])) # We are going to install the SIP specification file for this module and # its configuration module. installs = [] -installs.append(["plplot_pyqt.sip", os.path.join(config.default_sip_dir, "plplot_pyqt")]) +installs.append(["plplot_pyqt4.sip", os.path.join(config.default_sip_dir, "plplot_pyqt4")]) -installs.append(["plplot_pyqtconfig.py", config.default_mod_dir]) +installs.append(["plplot_pyqt4config.py", config.default_mod_dir]) # Create the Makefile. The QtModuleMakefile class provided by the # pyqtconfig module takes care of all the extra preprocessor, compiler and @@ -38,7 +38,7 @@ # Add the library we are wrapping. The name doesn't include any platform # specific prefixes or extensions (e.g. the "lib" prefix on UNIX, or the # ".dll" extension on Windows). -makefile.extra_libs = ["plplotd", "qt"] +makefile.extra_libs = ["plplotd", "plplotqtd"] # Generate the Makefile itself. makefile.generate() @@ -60,4 +60,4 @@ # This creates the qtermwidgetconfig.py module from the qtermwidgetconfig.py.in # template and the dictionary. -sipconfig.create_config_module("plplot_pyqtconfig.py", "config.py.in", content) +sipconfig.create_config_module("plplot_pyqt4config.py", "config.py.in", content) Deleted: trunk/bindings/qt_gui/pyqt4/plplot_pyqt.sip =================================================================== --- trunk/bindings/python/pyqt4/plplot_pyqt.sip 2009-06-15 21:45:13 UTC (rev 10045) +++ trunk/bindings/qt_gui/pyqt4/plplot_pyqt.sip 2009-06-22 21:00:30 UTC (rev 10060) @@ -1,60 +0,0 @@ - -%Module plplot_pyqt 0 - -%Import QtCore/QtCoremod.sip -%Import QtGui/QtGuimod.sip - -class QtPLDriver { - -%TypeHeaderCode -#include "plplot/qt.h" -%End - - public: - QtPLDriver(int i_iWidth=QT_DEFAULT_X, int i_iHeight=QT_DEFAULT_Y); - virtual ~QtPLDriver(); -}; - -class QtPLWidget: QWidget, QtPLDriver { - -%TypeHeaderCode -#include "plplot/qt.h" -%End - - public: - QtPLWidget(int i_iWidth=QT_DEFAULT_X, int i_iHeight=QT_DEFAULT_Y, QWidget* parent=0); - virtual ~QtPLWidget(); - - void clearWidget(); - - protected: - void mouseReleaseEvent(QMouseEvent *event); - void keyPressEvent(QKeyEvent *event); - void closeEvent(QCloseEvent *event); - void nextPage(); - void resizeEvent(QResizeEvent *); - void paintEvent(QPaintEvent *); - void getPlotParameters(double &io_dXFact, double &io_dYFact, double &io_dXOffset, double &io_dYOffset); -}; - -class QtExtWidget: QtPLWidget { - -%TypeHeaderCode -#include "plplot/qt.h" -%End - - public: - QtExtWidget(int i_iWidth=QT_DEFAULT_X, int i_iHeight=QT_DEFAULT_Y, QWidget* parent=0); - virtual ~QtExtWidget(); - - void captureMousePlotCoords(double *x, double *y); - void mouseMoveEvent(QMouseEvent *event); - void mousePressEvent(QMouseEvent *event); - void mouseReleaseEvent(QMouseEvent *event); - - protected: - void paintEvent(QPaintEvent *event); -}; - -void plsetqtdev(QtExtWidget* widget); -void plfreeqtdev(); Copied: trunk/bindings/qt_gui/pyqt4/plplot_pyqt4.sip (from rev 10048, trunk/bindings/python/pyqt4/plplot_pyqt.sip) =================================================================== --- trunk/bindings/qt_gui/pyqt4/plplot_pyqt4.sip (rev 0) +++ trunk/bindings/qt_gui/pyqt4/plplot_pyqt4.sip 2009-06-22 21:00:30 UTC (rev 10060) @@ -0,0 +1,60 @@ + +%Module plplot_pyqt 0 + +%Import QtCore/QtCoremod.sip +%Import QtGui/QtGuimod.sip + +class QtPLDriver { + +%TypeHeaderCode +#include "qt.h" +%End + + public: + QtPLDriver(int i_iWidth=QT_DEFAULT_X, int i_iHeight=QT_DEFAULT_Y); + virtual ~QtPLDriver(); +}; + +class QtPLWidget: QWidget, QtPLDriver { + +%TypeHeaderCode +#include "qt.h" +%End + + public: + QtPLWidget(int i_iWidth=QT_DEFAULT_X, int i_iHeight=QT_DEFAULT_Y, QWidget* parent=0); + virtual ~QtPLWidget(); + + void clearWidget(); + + protected: + void mouseReleaseEvent(QMouseEvent *event); + void keyPressEvent(QKeyEvent *event); + void closeEvent(QCloseEvent *event); + void nextPage(); + void resizeEvent(QResizeEvent *); + void paintEvent(QPaintEvent *); + void getPlotParameters(double &io_dXFact, double &io_dYFact, double &io_dXOffset, double &io_dYOffset); +}; + +class QtExtWidget: QtPLWidget { + +%TypeHeaderCode +#include "qt.h" +%End + + public: + QtExtWidget(int i_iWidth=QT_DEFAULT_X, int i_iHeight=QT_DEFAULT_Y, QWidget* parent=0); + virtual ~QtExtWidget(); + + void captureMousePlotCoords(double *x, double *y); + void mouseMoveEvent(QMouseEvent *event); + void mousePressEvent(QMouseEvent *event); + void mouseReleaseEvent(QMouseEvent *event); + + protected: + void paintEvent(QPaintEvent *event); +}; + +void plsetqtdev(QtExtWidget* widget); +void plfreeqtdev(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |