Skip to content
Permalink
Browse files
support custom widgets in PYQT4_WRAP_UI
  • Loading branch information
jef-n committed May 22, 2014
1 parent 442a3c1 commit 581e67ebda9a0c5b5c0195c12fd39b39fb5be8f6
Showing with 25 additions and 2 deletions.
  1. +10 −1 cmake/PyQt4Macros.cmake
  2. +5 −0 scripts/pyuic4-wrapper.bat
  3. +10 −0 scripts/pyuic4-wrapper.sh
  4. +0 −1 src/ui/qgsvectorlayerpropertiesbase.ui
@@ -22,12 +22,21 @@ ENDIF(NOT PYUIC4_PROGRAM)

# Adapted from QT4_WRAP_UI
MACRO(PYQT4_WRAP_UI outfiles )
IF(WIN32)
SET(PYUIC4_WRAPPER "${CMAKE_SOURCE_DIR}/scripts/pyuic4-wrapper.bat")
SET(PYUIC4_WRAPPER_PATH "${QGIS_OUTPUT_DIRECTORY}/bin/${CMAKE_BUILD_TYPE}")
ELSE(WIN32)
# TODO osx
SET(PYUIC4_WRAPPER "${CMAKE_SOURCE_DIR}/scripts/pyuic4-wrapper.sh")
SET(PYUIC4_WRAPPER_PATH "${QGIS_OUTPUT_DIRECTORY}/lib")
ENDIF(WIN32)

FOREACH(it ${ARGN})
GET_FILENAME_COMPONENT(outfile ${it} NAME_WE)
GET_FILENAME_COMPONENT(infile ${it} ABSOLUTE)
SET(outfile ${CMAKE_CURRENT_BINARY_DIR}/ui_${outfile}.py)
ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
COMMAND ${PYUIC4_PROGRAM} ${infile} -o ${outfile}
COMMAND ${PYUIC4_WRAPPER} "${PYUIC4_PROGRAM}" "${PYUIC4_WRAPPER_PATH}" "${QGIS_OUTPUT_DIRECTORY}/python" ${infile} -o ${outfile}
MAIN_DEPENDENCY ${infile}
)
SET(${outfiles} ${${outfiles}} ${outfile})
@@ -0,0 +1,5 @@
@echo off
set PYUIC4=%1
set PATH=%2;%PATH%
set PYTHONPATH=%3;%PYTHONPATH%
%PYUIC4% %4 %5 %6 %7 %8 %9
@@ -0,0 +1,10 @@
#!/bin/sh

PYUIC4=$1
LD_LIBRARY_PATH=$2:$LD_LIBRARY_PATH
PYTHONPATH=$3:$PYTHONPATH
shift 3

export LD_LIBRARY_PATH PYTHONPATH

$PYUIC4 $@
@@ -528,7 +528,6 @@
</layout>
<zorder>txtSubsetSQL</zorder>
<zorder>pbnQueryBuilder</zorder>
<zorder>collapseButton</zorder>
</widget>
</item>
<item>

0 comments on commit 581e67e

Please sign in to comment.