diff --git a/.clang-format b/.clang-format deleted file mode 100644 index c8a92dc59..000000000 --- a/.clang-format +++ /dev/null @@ -1,156 +0,0 @@ -Language: Cpp -IndentWidth: 2 -UseTab: Never -ColumnLimit: 120 -SortIncludes: false -AccessModifierOffset: -2 -ReflowComments: false -ConstructorInitializerIndentWidth: 2 -ContinuationIndentWidth: 2 -AllowShortFunctionsOnASingleLine: Inline -BreakBeforeBraces: Custom -BraceWrapping: - AfterExternBlock: true - AfterClass: true - AfterFunction: true - AfterNamespace: false - AfterEnum: false - AfterCaseLabel: true - AfterControlStatement: MultiLine - AfterStruct: false - AfterUnion: false - BeforeLambdaBody: false - BeforeElse: false - BeforeCatch: false - BeforeWhile: false - IndentBraces: false - SplitEmptyFunction: true - SplitEmptyRecord: false - SplitEmptyNamespace: true -PPIndentWidth: 2 -FixNamespaceComments: false -IndentPPDirectives: BeforeHash -SpaceBeforeParens: Custom -SpaceBeforeParensOptions: - AfterControlStatements: true - AfterForeachMacros: true - AfterFunctionDefinitionName: false - AfterFunctionDeclarationName: false - AfterIfMacros: true - AfterOverloadedOperator: false - AfterRequiresInClause: false - AfterRequiresInExpression: false - BeforeNonEmptyParentheses: false -SpaceAfterCStyleCast: false -SpaceAfterLogicalNot: false -SpaceAfterTemplateKeyword: false -SpaceAroundPointerQualifiers: Default -SpaceBeforeAssignmentOperators: true -SpaceBeforeCaseColon: false -SpaceBeforeCpp11BracedList: true -SpaceBeforeCtorInitializerColon: true -SpaceBeforeInheritanceColon: true -SpaceBeforeRangeBasedForLoopColon: true -SpaceBeforeSquareBrackets: false -SpaceInEmptyBlock: false -SpaceInEmptyParentheses: false -SpacesBeforeTrailingComments: 1 -SpacesInAngles: Never -SpacesInConditionalStatement: false -SpacesInContainerLiterals: true -SpacesInCStyleCastParentheses: false -SpacesInLineCommentPrefix: - Minimum: 1 - Maximum: -1 -IndentCaseBlocks: false -IndentCaseLabels: false -AlignAfterOpenBracket: DontAlign -BreakConstructorInitializers: BeforeComma -AlwaysBreakTemplateDeclarations: true -NamespaceIndentation: None -AlignArrayOfStructures: None -AlignConsecutiveAssignments: - Enabled: false - AcrossEmptyLines: false - AcrossComments: false - AlignCompound: false - PadOperators: false -AlignConsecutiveBitFields: - Enabled: false - AcrossEmptyLines: false - AcrossComments: false - AlignCompound: false - PadOperators: false -AlignConsecutiveDeclarations: - Enabled: false - AcrossEmptyLines: false - AcrossComments: false - AlignCompound: false - PadOperators: false -AlignConsecutiveMacros: - Enabled: false - AcrossEmptyLines: true - AcrossComments: false - AlignCompound: false - PadOperators: false -AlignEscapedNewlines: DontAlign -AlignOperands: Align -AlignTrailingComments: true -AllowAllArgumentsOnNextLine: false -AllowAllParametersOfDeclarationOnNextLine: true -AllowShortBlocksOnASingleLine: Empty -AllowShortCaseLabelsOnASingleLine: false -AllowShortEnumsOnASingleLine: true -AllowShortIfStatementsOnASingleLine: Never -AllowShortLambdasOnASingleLine: All -AllowShortLoopsOnASingleLine: false -AlwaysBreakAfterDefinitionReturnType: None -AlwaysBreakAfterReturnType: None -AlwaysBreakBeforeMultilineStrings: false -BinPackArguments: true -BinPackParameters: true -BitFieldColonSpacing: After -BreakBeforeBinaryOperators: NonAssignment -BreakBeforeConceptDeclarations: Always -BreakBeforeTernaryOperators: true -BreakInheritanceList: BeforeColon -BreakStringLiterals: true -CompactNamespaces: false -Cpp11BracedListStyle: true -PointerAlignment: Left -QualifierAlignment: Leave -ReferenceAlignment: Pointer -DerivePointerAlignment: false -DisableFormat: false -EmptyLineAfterAccessModifier: Leave -MaxEmptyLinesToKeep: 1 -EmptyLineBeforeAccessModifier: LogicalBlock -ExperimentalAutoDetectBinPacking: false -ForEachMacros: - - foreach - - Q_FOREACH -StatementAttributeLikeMacros: - - Q_EMIT -StatementMacros: - - Q_UNUSED - - QT_REQUIRE_VERSION - - Q_OBJECT - - PyObject_HEAD -IndentAccessModifiers: false -IndentExternBlock: AfterExternBlock -IndentGotoLabels: true -IndentRequiresClause: true -IndentWrappedFunctionNames: false -InsertBraces: false -InsertTrailingCommas: None -KeepEmptyLinesAtTheStartOfBlocks: true -LambdaBodyIndentation: OuterScope -PackConstructorInitializers: BinPack -RemoveBracesLLVM: false -RequiresClausePosition: OwnLine -SeparateDefinitionBlocks: Leave -ShortNamespaceLines: 1 -SortUsingDeclarations: false -SpacesInParentheses: false -SpacesInSquareBrackets: false -Standard: Latest diff --git a/.github/dependabot.yml b/.github/dependabot.yml deleted file mode 100644 index 7a968a8de..000000000 --- a/.github/dependabot.yml +++ /dev/null @@ -1,6 +0,0 @@ -version: 2 -updates: -- package-ecosystem: github-actions - directory: "/" - schedule: - interval: monthly diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100644 index d6ebf189e..000000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -1,428 +0,0 @@ -name: Build - -on: - push: - branches: - - main - pull_request: - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -defaults: - run: - shell: bash - -jobs: - ubuntu: - strategy: - fail-fast: false - matrix: - container_version: - - '22.04' - - '24.04' - runs-on: ubuntu-latest - container: ubuntu:${{ matrix.container_version }} - steps: - - name: Install Qt - run: | - apt-get update - DEBIAN_FRONTEND=noninteractive apt-get install -y --force-yes \ - build-essential \ - python3 \ - python3-dev \ - libpython3-dev \ - qtbase5-dev \ - qtbase5-private-dev \ - qt5-qmake \ - qtbase5-dev-tools \ - qttools5-dev \ - qtdeclarative5-dev \ - libqt5svg5* \ - libqt5xmlpatterns5* \ - libqt5multimedia5* \ - libqt5multimediawidgets5* \ - libqt5qml5* \ - libqt5quickwidgets5* \ - qtmultimedia5-dev - apt-get clean - - - name: Checkout PythonQt - uses: actions/checkout@v6 - - - name: Ccache - uses: hendrikmuhs/ccache-action@v1.2.22 - with: - key: ${{ runner.os }}-ubuntu-${{ matrix.container_version }} - evict-old-files: 'job' - - - name: Build PythonQt (generator_only) - run: | - export QT_SELECT=qt5 - echo ======= SYSTEM INFO ======== - uname -a; gcc --version | grep "gcc"; qmake --version - echo ============================ - qmake -r PythonQt.pro CONFIG+=ccache CONFIG+=release CONFIG+=force_debug_info \ - CONFIG+=sanitizer CONFIG+=sanitize_undefined CONFIG+=sanitize_address \ - CONFIG+=generator_only - make -j $(nproc) - - - name: Generate Wrappers - run: | - # workaround to allow to find the Qt include dirs for installed standard qt packages - mkdir /usr/include/qt5; ln -s /usr/include/x86_64-linux-gnu/qt5 /usr/include/qt5/include - export QTDIR=/usr/include/qt5 - UBSAN_OPTIONS="halt_on_error=1" ASAN_OPTIONS="detect_leaks=0:detect_stack_use_after_return=1:fast_unwind_on_malloc=0" \ - ./generator/pythonqt_generator \ - --output-directory=. - - - name: Build PythonQt (exclude_generator) - run: | - export QT_SELECT=qt5 - echo ======= SYSTEM INFO ======== - uname -a; gcc --version | grep "gcc"; python3 --version; qmake --version - echo ============================ - qmake -r PythonQt.pro CONFIG+=ccache CONFIG+=release CONFIG+=force_debug_info \ - CONFIG+=sanitizer CONFIG+=sanitize_undefined CONFIG+=sanitize_address \ - CONFIG+=exclude_generator \ - PYTHON_VERSION=$(python3 --version | cut -d " " -f 2 | cut -d "." -f1,2) \ - PYTHON_DIR=$(which python3 | xargs dirname | xargs dirname) - make -j $(nproc) - PYTHONDEVMODE=1 PYTHONASYNCIODEBUG=1 PYTHONWARNINGS=error PYTHONMALLOC=malloc_debug \ - UBSAN_OPTIONS="halt_on_error=1" ASAN_OPTIONS="detect_leaks=0:detect_stack_use_after_return=1:fast_unwind_on_malloc=0" \ - make check TESTARGS="-platform offscreen" - - - name: Run memory tests with sanitizers - run: | - QT_VERSION_FULL=$(qmake -query QT_VERSION) - if [[ "$QT_VERSION_FULL" == 5.12* ]]; then - echo "leak:QPlatformIntegrationFactory::create" >> $PWD/lsan.supp - export LSAN_OPTIONS="suppressions=$PWD/lsan.supp" - fi - PYTHONDEVMODE=1 PYTHONASYNCIODEBUG=1 PYTHONWARNINGS=error PYTHONMALLOC=malloc_debug \ - UBSAN_OPTIONS="halt_on_error=1" ASAN_OPTIONS="detect_leaks=1:detect_stack_use_after_return=1:fast_unwind_on_malloc=0" \ - PYTHONQT_RUN_ONLY_MEMORY_TESTS=1 \ - make check TESTARGS="-platform minimal" - - - name: Run cleanup tests with sanitizers - run: | - # CPython 3.12 only: suppress its known interned-unicode leak that - # shows up as allocations via PyUnicode_New (python/cpython#113190). - # Fixed in 3.13 (python/cpython#113601), so we scope this to 3.12. - PYVER=$(python3 -c 'import sys; print(".".join(map(str, sys.version_info[:2])))') - if [[ "$PYVER" == "3.12" ]]; then - echo "leak:PyUnicode_New" >> $PWD/lsan.supp - export LSAN_OPTIONS="suppressions=$PWD/lsan.supp" - fi - PYTHONDEVMODE=1 PYTHONASYNCIODEBUG=1 PYTHONWARNINGS=error PYTHONMALLOC=malloc_debug \ - UBSAN_OPTIONS="halt_on_error=1" ASAN_OPTIONS="detect_leaks=1:detect_stack_use_after_return=1:fast_unwind_on_malloc=0" \ - PYTHONQT_RUN_ONLY_CLEANUP_TESTS=1 \ - PYTHONQT_DISABLE_ASYNCIO=1 \ - make check TESTARGS="-platform minimal" - - - name: Upload Wrappers - uses: actions/upload-artifact@v7 - with: - name: wrappers_ubuntu_${{ matrix.container_version }} - path: generated_cpp - if-no-files-found: error - - oldschool: - strategy: - fail-fast: false - matrix: - container_os: ['rockylinux'] - container_os_version: ['9'] - configuration: ['debug', 'release'] - runs-on: ubuntu-latest - container: '${{ matrix.container_os }}:${{ matrix.container_os_version }}' - steps: - - name: Install Qt - run: | - yum update -y - yum groupinstall "Development Tools" -y - yum install -y \ - which \ - python-devel \ - qt5-qtbase-* \ - qt5-qttools* \ - qt5-qtsvg \ - qt5-qtxmlpatterns \ - qt5-qtmultimedia \ - qt5-qt3d \ - qt5-*-devel - - - name: Checkout PythonQt - uses: actions/checkout@v6 - - - name: Build PythonQt (generator_only) - run: | - export QT_SELECT=qt5 - echo ======= SYSTEM INFO ======== - uname -a; gcc --version | grep "gcc"; qmake-qt5 --version - echo ============================ - qmake-qt5 -r PythonQt.pro CONFIG+=${{ matrix.configuration }} \ - CONFIG+=generator_only - make -j $(nproc) - - - name: Generate Wrappers - run: | - export QTDIR=/usr/include/qt5 - # Specify "/usr/include" so that header "bits/wordsize.h" included from "qconfig.h" is found. - # See https://git.rockylinux.org/staging/rpms/qt5-qtbase/-/blob/r8/SOURCES/qconfig-multilib.h - ./generator/pythonqt_generator \ - --include-paths=/usr/include \ - --output-directory=. - - - name: Build PythonQt (exclude_generator) - run: | - export QT_SELECT=qt5 - echo ======= SYSTEM INFO ======== - which python 2>/dev/null && export PYTHON_VERSION_SUFFIX= || export PYTHON_VERSION_SUFFIX=3 - uname -a; gcc --version | grep "gcc"; python${PYTHON_VERSION_SUFFIX} --version; qmake-qt5 --version - echo ============================ - export PYTHON_VERSION_SHORT=`python${PYTHON_VERSION_SUFFIX} --version | cut -d " " -f 2 | cut -d "." -f1,2` - if [[ `echo ${PYTHON_VERSION_SHORT} | wc -w` = 0 ]]; then export PYTHON_VERSION_SHORT=2.7; fi - export PYTHON_DIR=`which python${PYTHON_VERSION_SUFFIX} | xargs dirname | xargs dirname` - echo PYTHON_VERSION_SHORT=${PYTHON_VERSION_SHORT} - echo PYTHON_DIR=${PYTHON_DIR} - qmake-qt5 -r PythonQt.pro CONFIG+=${{ matrix.configuration }} \ - CONFIG+=exclude_generator \ - "PYTHON_VERSION=${PYTHON_VERSION_SHORT}" "PYTHON_DIR=${PYTHON_DIR}" - make -j $(nproc) && \ - PYTHONDEVMODE=1 PYTHONASYNCIODEBUG=1 PYTHONWARNINGS=error PYTHONMALLOC=malloc_debug \ - make check TESTARGS="-platform offscreen" - - - name: Upload Wrappers - uses: actions/upload-artifact@v7 - with: - name: wrappers_${{ matrix.container_os }}-${{ matrix.container_os_version }}_${{ matrix.configuration }} - path: generated_cpp - if-no-files-found: error - - macOS: - strategy: - fail-fast: false - matrix: - macos-version: ['latest'] - python-version: ['3.9'] - qt-version: ['5.9.*'] - configuration: ['release','debug'] - include: - - macos-version: 'latest' - python-version: '3.11' - qt-version: '5.12.*' - configuration: 'debug' - runs-on: macos-${{ matrix.macos-version }} - steps: - - name: Install Qt - uses: jurplel/install-qt-action@v4 - with: - version: ${{ matrix.qt-version }} - host: 'mac' - target: 'desktop' - arch: 'clang_64' - modules: 'qtscript' - archives: 'qtmultimedia qtmacextras qtbase qttools' - - - name: Setup Python ${{ matrix.python-version }} - uses: actions/setup-python@v6 - with: - python-version: '${{ matrix.python-version }}' - - - name: Checkout PythonQt - uses: actions/checkout@v6 - - - name: Ccache - uses: hendrikmuhs/ccache-action@v1.2.22 - with: - key: ${{ runner.os }}-${{ matrix.qt-version }} - evict-old-files: 'job' - - - name: Detect exact versions - id : versions - run : | - set -eu - PYTHON_VERSION_FULL=$(python --version 2>&1 | cut -f 2 -d ' ') - PYTHON_VERSION_SHORT=$(cut -f 1,2 -d . <<< $PYTHON_VERSION_FULL) - QT_VERSION_FULL=$($QT_ROOT_DIR/bin/qmake -query QT_VERSION) - QT_VERSION_SHORT=$(cut -f 1,2 -d . <<< $QT_VERSION_FULL) - MACOS_VERSION_FULL=$(sw_vers -productVersion) - MACOS_VERSION_SHORT=$(cut -f 1,2 -d . <<< $MACOS_VERSION_FULL) - - echo "PYTHON_VERSION_FULL=$PYTHON_VERSION_FULL" | tee -a $GITHUB_OUTPUT - echo "PYTHON_VERSION_SHORT=$PYTHON_VERSION_SHORT" | tee -a $GITHUB_OUTPUT - echo "QT_VERSION_FULL=$QT_VERSION_FULL" | tee -a $GITHUB_OUTPUT - echo "QT_VERSION_SHORT=$QT_VERSION_SHORT" | tee -a $GITHUB_OUTPUT - echo "MACOS_VERSION_FULL=$MACOS_VERSION_FULL" | tee -a $GITHUB_OUTPUT - echo "MACOS_VERSION_SHORT=$MACOS_VERSION_SHORT" | tee -a $GITHUB_OUTPUT - - - name: Build PythonQt (generator_only) - run: | - set -ue - echo ======= SYSTEM INFO ======== - uname -a; gcc --version | head -n 1; qmake --version - echo ============================ - qmake CONFIG+=ccache CONFIG+=${{ matrix.configuration }} CONFIG+=sanitizer CONFIG+=sanitize_undefined CONFIG+=sanitize_address \ - CONFIG+=generator_only \ - -r PythonQt.pro - make -j $(nproc) - - - name: Generate Wrappers - run: | - UBSAN_OPTIONS="halt_on_error=1" ASAN_OPTIONS="detect_leaks=0:detect_stack_use_after_return=1:fast_unwind_on_malloc=0" \ - ./generator/pythonqt_generator \ - --output-directory=. - - - name: Build PythonQt (exclude_generator) - run: | - set -ue - echo ======= SYSTEM INFO ======== - uname -a; gcc --version | head -n 1; python --version; qmake --version - echo ============================ - PYTHON_VERSION_MAJOR=$(cut -d . -f1 <<< ${{ steps.versions.outputs.PYTHON_VERSION_SHORT }}) - for i in "python${{ steps.versions.outputs.PYTHON_VERSION_SHORT }}-embed" "python${{ steps.versions.outputs.PYTHON_VERSION_SHORT }}" \ - "python${PYTHON_VERSION_MAJOR}-embed" "python${PYTHON_VERSION_MAJOR}" - do if pkg-config --exists "$i"; then PYTHON_PKGCONFIG_NAME="$i"; break; fi; done - qmake CONFIG+=ccache CONFIG+=${{ matrix.configuration }} CONFIG+=sanitizer CONFIG+=sanitize_undefined CONFIG+=sanitize_address \ - CONFIG+=exclude_generator \ - PYTHON_VERSION=${{ steps.versions.outputs.PYTHON_VERSION_SHORT }} \ - PYTHON_DIR="$pythonLocation" \ - PKGCONFIG+=$PYTHON_PKGCONFIG_NAME \ - -r PythonQt.pro - make -j $(nproc) - PYTHONDEVMODE=1 PYTHONASYNCIODEBUG=1 PYTHONWARNINGS=error PYTHONMALLOC=malloc_debug \ - UBSAN_OPTIONS="halt_on_error=1" ASAN_OPTIONS="detect_leaks=0:detect_stack_use_after_return=1:fast_unwind_on_malloc=0" \ - make check TESTARGS="-platform offscreen" - - - name: Upload Wrappers - if: ${{ contains(matrix.configuration, 'release') }} - uses: actions/upload-artifact@v7 - with: - name: wrappers_macos${{ steps.versions.outputs.MACOS_VERSION_SHORT }}_qt${{ steps.versions.outputs.QT_VERSION_SHORT }} - path: generated_cpp - if-no-files-found: error - - windows: - strategy: - fail-fast: false - matrix: - qt-arch: ['win64_mingw73'] - python-version: ['3.10'] - qt-version: ['5.12.*'] - python-arch: ['x64'] - pythonqtall-config: [''] -# msvc-toolset: ['14.0'] - include: - - qt-arch: 'win64_msvc2017_64' - python-version: '3.6' - python-arch: 'x64' - qt-version: '5.11.*' -# msvc-toolset: '14.16' - - - qt-arch: 'win64_msvc2019_64' - python-version: '3.13' - python-arch: 'x64' - qt-version: '5.15.*' - pythonqtall-config: 'PythonQtCore PythonQtGui PythonQtMultimedia' - - - qt-arch: 'win32_mingw53' - python-version: '3.6' - python-arch: 'x86' - qt-version: '5.11.*' - -#Either MSVC2015 is sick or Qt5.9 is buggy :( -#Main problem is QBasicMutex with default ctor, that (by no means) is missing in dll-export of QtCore, but linker tries to find it -# - qt-arch: 'win32_msvc2015' -# python-version: '2.7' -# python-arch: 'x86' -# qt-version: '5.9.*' -# pythonqtall-config: 'PythonQtCore PythonQtGui PythonQtMultimedia' - - runs-on: windows-latest - steps: - - - name: Checkout PythonQt - uses: actions/checkout@v6 - - - name: Reset PATH - uses: egor-tensin/cleanup-path@v5 - - - name: Install MSVC++ - uses: ilammy/msvc-dev-cmd@v1 - if: ${{ contains(matrix.qt-arch, 'msvc') }} - with: - arch: amd64${{ contains(matrix.python-arch, 'x86') && '_x86' || '' }} - - - name: Install Qt - uses: jurplel/install-qt-action@v4 - with: - version: ${{ matrix.qt-version }} - host: 'windows' - target: 'desktop' - arch: ${{ matrix.qt-arch }} - modules: 'qtscript' - archives: 'qtwinextras qtmultimedia qtbase' - tools: ${{ contains(matrix.qt-arch, 'mingw') && format('tools_mingw,qt.tools.{0}0', matrix.qt-arch) || '' }} - - - name: Setup Python ${{ matrix.python-version }} - uses: actions/setup-python@v6 - with: - python-version: '${{ matrix.python-version }}' - architecture: ${{ matrix.python-arch }} - - - name: Detect exact versions - shell: bash - id: versions - run: | - set -eu - QT_VERSION_FULL=$("$QT_ROOT_DIR/bin/qmake" -query QT_VERSION) - QT_VERSION_SHORT=$(cut -f 1,2 -d . <<< $QT_VERSION_FULL) - PYTHON_VERSION_FULL=$(python --version 2>&1 | cut -f 2 -d ' ') - PYTHON_VERSION_SHORT=$(cut -f 1,2 -d . <<< $PYTHON_VERSION_FULL) - echo "QT_VERSION_FULL=$QT_VERSION_FULL" | tee -a $GITHUB_OUTPUT - echo "QT_VERSION_SHORT=$QT_VERSION_SHORT" | tee -a $GITHUB_OUTPUT - echo "PYTHON_VERSION_SHORT=$PYTHON_VERSION_SHORT" | tee -a $GITHUB_OUTPUT - - - name: Build PythonQt (generator_only) - shell: cmd - run: | - qmake -query - qmake CONFIG+=release CONFIG-=debug_and_release CONFIG-=debug_and_release_target ^ - CONFIG+=generator_only ^ - PythonQt.pro - mingw32-make -j 2 ^ - || set CL=/MP && nmake - - - name: Generate Wrappers - shell: cmd - run: | - set QTDIR=%QT_ROOT_DIR% - generator\pythonqt_generator ^ - --output-directory=. - - - name: Build PythonQt (exclude_generator) - shell: cmd - run: | - qmake -query - python --version - set PYTHONQTALL_CONFIG=${{ matrix.pythonqtall-config }} - qmake CONFIG+=release CONFIG-=debug_and_release CONFIG-=debug_and_release_target ^ - CONFIG+=exclude_generator ^ - "PYTHON_PATH=%pythonLocation%" ^ - "PYTHON_VERSION=${{ steps.versions.outputs.PYTHON_VERSION_SHORT }}" ^ - PythonQt.pro - set PYTHONDEVMODE=1 - set PYTHONASYNCIODEBUG=1 - set PYTHONWARNINGS=error - mingw32-make -j 2 && mingw32-make check "TESTARGS=-platform offscreen" ^ - || set CL=/MP && nmake && nmake check "TESTARGS=-platform offscreen" - - - name: Upload Wrappers - if: (matrix.pythonqtall-config || '') == '' - uses: actions/upload-artifact@v7 - with: - name: wrappers_${{ matrix.qt-arch }}_${{ steps.versions.outputs.QT_VERSION_SHORT }} - path: generated_cpp - if-no-files-found: error diff --git a/.github/workflows/build_latest.yml b/.github/workflows/build_latest.yml deleted file mode 100644 index 864f11c31..000000000 --- a/.github/workflows/build_latest.yml +++ /dev/null @@ -1,132 +0,0 @@ -name: Check generated_cpp - -on: - push: - branches: - - main - pull_request: - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -defaults: - run: - shell: bash - -jobs: - build: - strategy: - fail-fast: false - matrix: - os: ['ubuntu', 'windows'] - qt-version: [ '5.12.*', '5.15.*', '6.10.*' ] - python-version: [ '3.12' ] - runs-on: ${{ matrix.os }}-latest - steps: - - - name: Install MSVC - if: ${{ matrix.os == 'windows' }} - uses: ilammy/msvc-dev-cmd@v1 - with: - arch: amd64 - - - name: Install Qt ${{matrix.qt-version}} - uses: jurplel/install-qt-action@v4 - with: - version: ${{ matrix.qt-version }} - modules: ${{startsWith(matrix.qt-version, '6') && 'qt5compat qtscxml qtpositioning qtwebchannel qtmultimedia qtwebengine' || '' }} - arch: ${{ (matrix.os == 'ubuntu' && (startsWith(matrix.qt-version, '5') && 'gcc_64' || 'linux_gcc_64')) || startsWith(matrix.qt-version, '5.12') && 'win64_msvc2017_64' || startsWith(matrix.qt-version, '6') && 'win64_msvc2022_64' || 'win64_msvc2019_64' }} - - - name: Setup Python ${{ matrix.python-version }} - uses: actions/setup-python@v6 - with: - python-version: '${{ matrix.python-version }}' - - - name: Checkout PythonQt - uses: actions/checkout@v6 - - - name: Ccache - uses: hendrikmuhs/ccache-action@v1.2.22 - with: - key: ${{ runner.os }}-${{ matrix.qt-version }} - evict-old-files: 'job' - if: ${{ matrix.os == 'ubuntu' }} - - - name: Set environment - id: setenv - run: | - QT_VERSION_MAJOR=$(cut -f 1 -d . <<< "${{matrix.qt-version}}") - echo "QT_VERSION_MAJOR=$QT_VERSION_MAJOR" >> $GITHUB_ENV - QT_VERSION_SHORT=$(cut -f 1,2 -d . <<< "${{matrix.qt-version}}") - echo "QT_VERSION_SHORT=$QT_VERSION_SHORT" >> $GITHUB_OUTPUT - PYTHON_VERSION_FULL=$(python --version 2>&1 | cut -f 2 -d ' ') - PYTHON_VERSION_SHORT=$(cut -f 1,2 -d . <<< $PYTHON_VERSION_FULL) - echo "PYTHON_VERSION_SHORT=$PYTHON_VERSION_SHORT" >> $GITHUB_OUTPUT - echo "$pythonLocation/bin" >> $GITHUB_PATH - - - name: Build generator Ubuntu - shell: bash - if: ${{ matrix.os == 'ubuntu' }} - run: | - cd generator - qmake -r generator.pro CONFIG+=ccache CONFIG+=release CONFIG-=debug_and_release CONFIG+=force_debug_info \ - CONFIG+=sanitizer CONFIG+=sanitize_undefined CONFIG+=sanitize_address - make -j $(nproc) - - - name: Build generator Windows - shell: cmd - if: ${{ matrix.os == 'windows' }} - run: | - cd generator - qmake CONFIG+=release CONFIG-=debug_and_release CONFIG-=debug_and_release_target generator.pro - nmake - - - name: Generate Wrappers - shell: bash - run: | - QTDIR="$QT_ROOT_DIR" \ - UBSAN_OPTIONS="halt_on_error=1" \ - ASAN_OPTIONS="detect_leaks=0:detect_stack_use_after_return=1:fast_unwind_on_malloc=0" \ - ./generator/pythonqt_generator \ - --output-directory=. - - - name: Upload Wrappers - uses: actions/upload-artifact@v7 - with: - name: wrappers_${{ matrix.os }}_${{ steps.setenv.outputs.QT_VERSION_SHORT }} - path: generated_cpp - if-no-files-found: error - - - name: Build PythonQt Ubuntu (exclude_generator) - if: ${{ matrix.os == 'ubuntu' }} - run: | - echo ======= SYSTEM INFO ======== - uname -a; gcc --version | grep "gcc"; python3 --version; qmake --version - echo ============================ - qmake -r PythonQt.pro CONFIG+=ccache CONFIG+=release CONFIG+=force_debug_info \ - CONFIG+=sanitizer CONFIG+=sanitize_undefined CONFIG+=sanitize_address \ - CONFIG+=exclude_generator \ - PYTHON_VERSION=$(python3 --version | cut -d " " -f 2 | cut -d "." -f1,2) \ - PYTHON_DIR=$(which python3 | xargs dirname | xargs dirname) - make -j $(nproc) - PYTHONDEVMODE=1 PYTHONASYNCIODEBUG=1 PYTHONWARNINGS=error PYTHONMALLOC=malloc_debug \ - UBSAN_OPTIONS="halt_on_error=1" ASAN_OPTIONS="detect_leaks=0:detect_stack_use_after_return=1:fast_unwind_on_malloc=0" \ - make check TESTARGS="-platform offscreen" - - - name: Build PythonQt Windows (exclude_generator) - shell: cmd - if: ${{ matrix.os == 'windows' }} - run: | - qmake -query - python --version - qmake CONFIG+=release CONFIG-=debug_and_release CONFIG-=debug_and_release_target ^ - CONFIG+=exclude_generator ^ - "PYTHONQTALL_CONFIG=${{ matrix.pythonqtall-config }}" ^ - "PYTHON_PATH=%pythonLocation%" ^ - "PYTHON_VERSION=${{ steps.setenv.outputs.PYTHON_VERSION_SHORT }}" ^ - PythonQt.pro - set PYTHONDEVMODE=1 - set PYTHONASYNCIODEBUG=1 - set PYTHONWARNINGS=error - nmake && nmake check "TESTARGS=-platform offscreen" diff --git a/.github/workflows/builddocs.yml b/.github/workflows/builddocs.yml deleted file mode 100644 index c7ae5c1cf..000000000 --- a/.github/workflows/builddocs.yml +++ /dev/null @@ -1,32 +0,0 @@ -name: Build and Deploy Documentation - -on: - push: - branches: - - main - -defaults: - run: - shell: bash - -jobs: - build_docs: - runs-on: ubuntu-latest - steps: - - name: Checkout main - uses: actions/checkout@v6 - - - name: Install Doxygen - run: sudo apt-get install doxygen graphviz -y - - - name: Build documentation - run: | - cd doxygen - doxygen - touch html/.nojekyll - cd .. - - - name: Deploy to GitHub Pages - uses: JamesIves/github-pages-deploy-action@v4 - with: - folder: doxygen/html diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 167bcc960..000000000 --- a/.gitignore +++ /dev/null @@ -1,116 +0,0 @@ -# Compiled Object files -*.slo -*.lo -*.o -*.obj -*.pdb -*.cbt - -# Precompiled Headers -*.gch -*.pch - -# Compiled Dynamic libraries -*.so -*.dylib -*.dll - -# Compiled Static libraries -*.lai -*.la -*.a -*.lib - -# Executables -*.exe -*.out -*.app - -# Qt -object_script.*.Release -object_script.*.Debug -*_plugin_import.cpp -/.qmake.cache -/.qmake.stash -*.pro.user -*.pro.user.* -*.qbs.user -*.qbs.user.* -*.moc -moc_*.cpp -moc_*.h -qrc_*.cpp -ui_*.h -*.qmlc -*.jsc -Makefile* -*build-* -*resource.rc -*.FileListAbsolute.txt - -# CMake -CMakeLists.txt.user -CMakeLists.txt.user* -CMakeCache.txt -CMakeFiles -CMakeScripts -Testing -Makefile -cmake_install.cmake -install_manifest.txt -compile_commands.json -CTestTestfile.cmake -_deps - -# QtCreator -*.autosave -*.qmlproject.user -*.qmlproject.user.* -compile_commands.json -*creator.user* - -# macOS/Windows -.DS_Store -Thumbs.db -*.lnk - -# patch/diff -*.orig -*.rej -*.patch -*.diff - -# vim -*~ - -# Visual Studio Code -.vscode/* - -*.tlog - - -# JetBrains tools -.idea/* - -# Doxygen -doxygen/html/* -doxygen.log - -# Backup files -*.bak -generated_cpp -generator/.vs -*.log -*.sln -*.vcxproj -*.filters -*.user -*.stash -*.tmp -generate.bat -generator/release - -/.vs/ -*/.vs -*/debug/* -*/release/* diff --git a/.nojekyll b/.nojekyll new file mode 100644 index 000000000..e69de29bb diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml deleted file mode 100644 index 39f8b5e42..000000000 --- a/.pre-commit-config.yaml +++ /dev/null @@ -1,14 +0,0 @@ -repos: - - repo: https://github.com/pre-commit/mirrors-clang-format - rev: "v22.1.3" - hooks: - - id: clang-format - - - - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v6.0.0 - hooks: - - id: check-case-conflict - - id: check-merge-conflict - - id: trailing-whitespace - - id: mixed-line-ending diff --git a/.vimrc b/.vimrc deleted file mode 100644 index d5a9f893c..000000000 --- a/.vimrc +++ /dev/null @@ -1 +0,0 @@ -set expandtab diff --git a/Building.html b/Building.html new file mode 100644 index 000000000..f48a3124c --- /dev/null +++ b/Building.html @@ -0,0 +1,89 @@ + + +
+ + + + +|
+ PythonQt
+
+ |
+
PythonQt requires at least Qt 5.0 and Python 2.7.x or Python 3.6 (or higher). To compile PythonQt, you will need a python developer installation which includes Python's header files and the python2x.[lib | dll | so | dynlib]. The recommended way to build PythonQt is to use the QMake-based *.pro file. The build scripts are currently set to use Python 3.10 by default. You may need to tweak the build/python.prf file to set the correct Python includes and libs on your system.
+On Windows, the (non-source) Python Windows installer can be used. Make sure that you use the same compiler as the one that your Python distribution is built with. If you want to use another compiler, you will need to build Python yourself, using your compiler.
+To build PythonQt, you need to set the environment variable PYTHON_PATH to point to the root dir of the python installation and PYTHON_VERSION should state the used Python version.
+When using the prebuild Python installer, this will be:
+When using the python sources, this will be something like:
+To build all, do the following (after setting the above variables):
+This should build everything. If Python can not be linked or include files can not be found, you probably need to tweak build/python.prf
+The tests and examples are located in PythonQt/lib.
+When using a Python distribution, the debug build typically does not work because the pythonxx_d.lib/.dll are not provided. You can tweak linking of the debug build to the release Python version, but this typically requires patching pyconfig.h and removing Py_DEBUG and linker pragmas (google for it!).
+On Linux, you need to install a Python-dev package. If Python can not be linked or include files can not be found, you probably need to tweak build/python.prf
+To build PythonQt, just do a:
+The tests and examples are located in PythonQt/lib. You should add PythonQt/lib to your LD_LIBRARY_PATH so that the runtime linker can find the *.so files.
+On Mac, Python is installed as a Framework, so you should not need to install it. To build PythonQt, just do a:
+There is a unit test that tests most features of PythonQt, see the tests subdirectory for details.
+|
+ PythonQt
+
+ |
+
The main interface to PythonQt is the PythonQt singleton. PythonQt needs to be initialized via PythonQt::init() once. Afterwards you communicate with the singleton via PythonQt::self(). PythonQt offers a complete Qt binding, which needs to be enabled via PythonQt_QtAll::init().
+The following table shows the mapping between Python and Qt objects:
| Qt/C++ | Python |
|---|---|
| bool | bool |
| double | float |
| float | float |
| char/uchar,int/uint,short,ushort,QChar | integer |
| long | integer |
| ulong,longlong,ulonglong | long |
| QString (1) | unicode string |
| QByteArray (2) | QByteArray wrapper (3) |
| char* | str |
| QStringList | tuple of unicode strings |
| QVariantList | tuple of objects |
| QVariantMap | dict of objects |
| QVariant | depends on type (4) |
| QSize, QRect and all other standard Qt QVariants | variant wrapper that supports complete API of the respective Qt classes |
| OwnRegisteredMetaType | C++ wrapper, optionally with additional information/wrapping provided by registerCPPClass() |
| QList<AnyObject*> | converts to a list of CPP wrappers |
| QVector<AnyObject*> | converts to a list of CPP wrappers |
| EnumType | Enum wrapper derived from python integer |
| QObject (and derived classes) | QObject wrapper |
| C++ object | CPP wrapper, either wrapped via PythonQtCppWrapperFactory or just decorated with decorators |
| PyObject | PyObject (5) |
All Qt QVariant types are implemented, PythonQt supports the complete Qt API for these objects.
+All classes derived from QObject are automatically wrapped with a python wrapper class when they become visible to the Python interpreter. This can happen via
It is important that you call PythonQt::registerClass() for any QObject derived class that may become visible to Python, except when you add it via PythonQt::addObject(). This will register the complete parent hierachy of the registered class, so that when you register e.g. a QPushButton, QWidget will be registered as well (and all intermediate parents).
+From Python, you can talk to the returned QObjects in a natural way by calling their slots and receiving the return values. You can also read/write all properties of the objects as if they where normal python properties.
+In addition to this, the wrapped objects support
The below example shows how to connect signals in Python:
+And this example shows how you can define your own signals and slots:
+You can create dedicated wrapper QObjects for any C++ class. This is done by deriving from PythonQtCppWrapperFactory and adding your factory via addWrapperFactory(). Whenever PythonQt encounters a CPP pointer (e.g. on a slot or signal) and it does not known it as a QObject derived class, it will create a generic CPP wrapper. So even unknown C++ objects can be passed through Python. If the wrapper factory supports the CPP class, a QObject wrapper will be created for each instance that enters Python. An alternative to a complete wrapper via the wrapper factory are decorators, see Decorator slots
+For each known C++ class, PythonQt provides a Python class. These classes are visible inside of the "PythonQt" python module or in subpackages if a package is given when the class is registered.
+A Meta class supports:
+From within Python, you can import the module "PythonQt" to access these classes and the Qt namespace.
+PythonQt introduces a new generic approach to extend any wrapped QObject or CPP object with
+The idea behind decorators is that we wanted to make it as easy as possible to extend wrapped objects. Since we already have an implementation for invoking any Qt Slot from Python, it looked promising to use this approach for the extension of wrapped objects as well. This avoids that the PythonQt user needs to care about how Python arguments are mapped from/to Qt when he wants to create static methods, constructors and additional member functions.
+The basic idea about decorators is to create a QObject derived class that implements slots which take one of the above roles (e.g. constructor, destructor etc.) via a naming convention. These slots are then assigned to other classes via the naming convention.
+The below example shows all kinds of decorators in action:
+After you have registered an instance of the above ExampleDecorator, you can do the following from Python (all these calls are mapped to the above decorator slots):
+In PythonQt, each wrapped C++ object is either owned by Python or C++. When an object is created via a Python constructor, it is owned by Python by default. When an object is returned from a C++ API (e.g. a slot), it is owned by C++ by default. Since the Qt API contains various APIs that pass the ownership from/to other C++ objects, PythonQt needs to keep track of such API calls. This is archieved by annotating arguments and return values in wrapper slots with magic templates:
+ +These annotation templates work for since C++ pointer types. In addition to that, they work for QList<AnyObject*>, to pass the ownership for each object in the list.
+Examples:
|
+ PythonQt
+
+ |
+
You can download the source code or alternatively you can get the latest version from the git repository.
+|
+ PythonQt
+
+ |
+
Examples are available in the examples directory. The PyScriptingConsole implements a simple interactive scripting console that shows how to script a simple application. The PyLauncher application can be used to run arbitrary PythonQt scripts given on the commandline.
+The following shows a simple example on how to integrate PythonQt into your Qt application:
+|
+ PythonQt
+
+ |
+
The following are the built-in features of the PythonQt library:
+import replacement, so that Python scripts can be e.g. signed/verified before they are executed (PythonQtImportFileInterface)PythonQt offers the additional PythonQt_QtAll library which wraps the complete Qt API, including all C++ classes and all non-slots on QObject derived classes. This offers the following features:
+PythonQt supports:
The last working Qt4 version is available at svn branches/Qt4LastWorkingVersion or you can download the PythonQt 3.0 release. The current git main branch no longer supports Qt4, since we started to make use of some Qt5-only features.
+|
+ PythonQt
+
+ |
+
PythonQt is distributed under the LGPL 2.1 license. It can be used in commercial applications when following the LGPL 2.1 obligations.
+The build system of PythonQt makes use of a modified version of the LGPL'ed QtScript generator, located in the "generator" directory.
+See https://code.qt.io/cgit/qt-labs/qtscriptgenerator.git for details on the original project. Thanks a lot to the QtJambi guys and the QtScript Generator project for the C++ parser and Qt typesystem files!
+The PythonQt wrappers generated by the generator located in the "generated_cpp" directory are free to be used without any licensing restrictions.
+The generated wrappers are pre-generated and checked-in for 5.0, 5.3, 5.4, 5.6 and 5.11, so you only need to build and run the generator when you want to build additional wrappers or you want to upgrade/downgrade to another Qt version. You may use the generator to generate C++ bindings for your own C++ classes (e.g., to make them inheritable in Python), but this is currently not documented and involves creating your own typesystem files.
+|
+ PythonQt
+
+ |
+
Go to the source code of this file.
++Classes | |
| struct | PythonQtBoolResultObject |
| defines a python object that stores a single bool More... | |
+Macros | |
| #define | PythonQtBoolResult_Check(op) (Py_TYPE(op) == &PythonQtBoolResult_Type) |
+Variables | |
| PYTHONQT_EXPORT PyTypeObject | PythonQtBoolResult_Type |
| #define PythonQtBoolResult_Check | +( | ++ | op | ) | +(Py_TYPE(op) == &PythonQtBoolResult_Type) | +
Definition at line 51 of file PythonQtBoolResult.h.
+ +
+
|
+ +extern | +
|
+ PythonQt
+
+ |
+
|
+ PythonQt
+
+ |
+
#include "PythonQtPythonInclude.h"#include "PythonQt.h"#include <QMetaObject>#include <QMetaMethod>#include <QHash>#include <QByteArray>#include <QList>Go to the source code of this file.
++Classes | |
| struct | PythonQtDynamicClassInfo |
| struct | PythonQtMemberInfo |
| class | PythonQtClassInfo |
| a class that stores all required information about a Qt object (and an optional associated C++ class name) More... | |
| struct | PythonQtClassInfo::ParentClassInfo |
| store information about parent classes More... | |
|
+ PythonQt
+
+ |
+
|
+ PythonQt
+
+ |
+
#include "PythonQtPythonInclude.h"#include "PythonQtSystem.h"#include "structmember.h"#include "methodobject.h"#include "compile.h"#include <QString>Go to the source code of this file.
++Classes | |
| struct | PythonQtClassWrapper |
+Variables | |
| PYTHONQT_EXPORT PyTypeObject | PythonQtClassWrapper_Type |
| the type of the PythonQt class wrapper objects | |
+
|
+ +extern | +
the type of the PythonQt class wrapper objects
+ +|
+ PythonQt
+
+ |
+
|
+ PythonQt
+
+ |
+
#include "PythonQtPythonInclude.h"#include "PythonQt.h"#include "PythonQtMisc.h"#include "PythonQtClassInfo.h"#include "PythonQtMethodInfo.h"#include <QList>#include <vector>Go to the source code of this file.
++Classes | |
| class | PythonQtConv |
| a static class that offers methods for type conversion More... | |
+Typedefs | |
| typedef PyObject * | PythonQtConvertMetaTypeToPythonCB(const void *inObject, int metaTypeId) |
| typedef bool | PythonQtConvertPythonToMetaTypeCB(PyObject *inObject, void *outObject, int metaTypeId, bool strict) |
| typedef QVariant | PythonQtConvertPythonSequenceToQVariantListCB(PyObject *inObject) |
| #define PythonQtRegisterIntegerMapConverter | +( | ++ | type, | +
| + | + | + | innertype | +
| + | ) | ++ |
Definition at line 83 of file PythonQtConversion.h.
+| #define PythonQtRegisterListTemplateConverter | +( | ++ | type, | +
| + | + | + | innertype | +
| + | ) | ++ |
Definition at line 58 of file PythonQtConversion.h.
+| #define PythonQtRegisterListTemplateConverterForKnownClass | +( | ++ | type, | +
| + | + | + | innertype | +
| + | ) | ++ |
Definition at line 67 of file PythonQtConversion.h.
+| #define PythonQtRegisterListTemplateQPairConverter | +( | ++ | listtype, | +
| + | + | + | type1, | +
| + | + | + | type2 | +
| + | ) | ++ |
Definition at line 92 of file PythonQtConversion.h.
+Definition at line 76 of file PythonQtConversion.h.
+Definition at line 102 of file PythonQtConversion.h.
+ +Definition at line 107 of file PythonQtConversion.h.
+ +| typedef PyObject * PythonQtConvertMetaTypeToPythonCB(const void *inObject, int metaTypeId) | +
Definition at line 54 of file PythonQtConversion.h.
+ +Definition at line 56 of file PythonQtConversion.h.
+ +| typedef bool PythonQtConvertPythonToMetaTypeCB(PyObject *inObject, void *outObject, int metaTypeId, bool strict) | +
Definition at line 55 of file PythonQtConversion.h.
+ +| PyObject * PythonQtConvertIntegerMapToPython | +( | +const void * | +inMap, | +
| + | + | int | +metaTypeId | +
| + | ) | ++ |
Definition at line 524 of file PythonQtConversion.h.
+References PythonQtConv::convertQtValueToPythonInternal(), PythonQtMethodInfo::getInnerTemplateTypeName(), PythonQtUtils::metaTypeIdFromTypeName(), PythonQtConvertPairToPython(), and PythonQtUtils::typeNameFromMetaTypeId().
+ +| PyObject * PythonQtConvertListOfKnownClassToPythonList | +( | +const void * | +inList, | +
| + | + | int | +metaTypeId | +
| + | ) | ++ |
Definition at line 328 of file PythonQtConversion.h.
+References PythonQtInstanceWrapper::_ownedByPythonQt, PythonQtClassInfo::className(), PythonQtPrivate::getClassInfo(), PythonQtMethodInfo::getInnerListTypeName(), PythonQt::priv(), PythonQtUtils::typeNameFromMetaTypeId(), and PythonQtPrivate::wrapPtr().
+ +| PyObject * PythonQtConvertListOfPairToPythonList | +( | +const void * | +inList, | +
| + | + | int | +metaTypeId | +
| + | ) | ++ |
Definition at line 467 of file PythonQtConversion.h.
+References PythonQtMethodInfo::getInnerTemplateMetaType(), PythonQtConvertPairToPython(), and PythonQtUtils::typeNameFromMetaTypeId().
+ +| PyObject * PythonQtConvertListOfValueTypeToPythonList | +( | +const void * | +inList, | +
| + | + | int | +metaTypeId | +
| + | ) | ++ |
Definition at line 273 of file PythonQtConversion.h.
+References PythonQtConv::convertQtValueToPythonInternal(), PythonQtMethodInfo::getInnerTemplateMetaType(), and PythonQtUtils::typeNameFromMetaTypeId().
+ +| PyObject * PythonQtConvertPairToPython | +( | +const void * | +inPair, | +
| + | + | int | +metaTypeId | +
| + | ) | ++ |
Definition at line 394 of file PythonQtConversion.h.
+References PythonQtConv::convertQtValueToPythonInternal(), PythonQtMethodInfo::getInnerTemplateTypeName(), PythonQtUtils::metaTypeIdFromTypeName(), and PythonQtUtils::typeNameFromMetaTypeId().
+ +Referenced by PythonQtInstanceWrapper::classInfo(), PythonQtWrapper_QMetaObject::classInfo(), PythonQtWrapper_QMetaObject::classInfoCount(), PythonQtWrapper_QMetaObject::classInfoOffset(), PythonQtStdDecorators::connect(), PythonQtWrapper_QMetaObject::constructor(), PythonQtWrapper_QMetaObject::constructorCount(), PythonQtInstanceWrapper::dynamicClassInfo(), PythonQtWrapper_QMetaObject::enumerator(), PythonQtWrapper_QMetaObject::enumeratorCount(), PythonQtWrapper_QMetaObject::enumeratorOffset(), PythonQtArgumentFrame::establishPersistentPtr(), PythonQtArgumentFrame::establishPersistentViewPtr(), PythonQtWrapper_QMetaObject::getClassName(), PythonQtWrapper_QMetaObject::indexOfClassInfo(), PythonQtWrapper_QMetaObject::indexOfConstructor(), PythonQtWrapper_QMetaObject::indexOfEnumerator(), PythonQtWrapper_QMetaObject::indexOfMethod(), PythonQtWrapper_QMetaObject::indexOfProperty(), PythonQtWrapper_QMetaObject::indexOfSignal(), PythonQtWrapper_QMetaObject::indexOfSlot(), PythonQtUtils::isPythonClassType(), PythonQtWrapper_QMetaObject::method(), PythonQtWrapper_QMetaObject::methodCount(), PythonQtUtils::methodName(), PythonQtWrapper_QMetaObject::methodOffset(), PythonQtObjectPtr::operator!=(), PythonQtSafeObjectPtr::operator!=(), PythonQtObjectPtr::operator!=(), PythonQtSafeObjectPtr::operator!=(), PythonQtObjectPtr::operator=(), PythonQtSafeObjectPtr::operator=(), PythonQtSafeObjectPtr::operator=(), PythonQtObjectPtr::operator=(), PythonQtObjectPtr::operator=(), PythonQtSafeObjectPtr::operator=(), PythonQtSafeObjectPtr::operator=(), PythonQtObjectPtr::operator=(), PythonQtSafeObjectPtr::operator=(), PythonQtObjectPtr::operator==(), PythonQtSafeObjectPtr::operator==(), PythonQtObjectPtr::operator==(), PythonQtSafeObjectPtr::operator==(), PythonQtInstanceWrapper::passOwnershipToCPP(), PythonQtInstanceWrapper::passOwnershipToPython(), PythonQtWrapper_QMetaObject::property(), PythonQtWrapper_QMetaObject::propertyCount(), PythonQtWrapper_QMetaObject::propertyOffset(), PythonQtConvertIntegerMapToPython(), PythonQtConvertListOfPairToPythonList(), PythonQtConvertPythonListToListOfPair(), PythonQtConvertPythonToIntegerMap(), PythonQtMethodInfo::PythonQtMethodInfo(), PythonQtObjectPtr::PythonQtObjectPtr(), PythonQtObjectPtr::PythonQtObjectPtr(), PythonQtSafeObjectPtr::PythonQtSafeObjectPtr(), PythonQtSafeObjectPtr::PythonQtSafeObjectPtr(), PythonQtSafeObjectPtr::PythonQtSafeObjectPtr(), PythonQtSignalTarget::PythonQtSignalTarget(), PythonQtSlotInfo::PythonQtSlotInfo(), PythonQtSlotInfo::PythonQtSlotInfo(), PythonQtThreadStateSaver::restore(), PythonQtThreadStateSaver::save(), PythonQtSlotInfo::setNextInfo(), PythonQtUtils::signature(), PythonQtWrapper_QMetaObject::static_QMetaObject_checkConnectArgs(), PythonQtStdDecorators::static_QObject_connect(), PythonQtStdDecorators::static_QObject_connect(), PythonQtStdDecorators::static_QObject_disconnect(), PythonQtStdDecorators::static_QObject_disconnect(), PythonQtStdDecorators::static_Qt_qAbs(), PythonQtStdDecorators::static_Qt_qBound(), PythonQtStdDecorators::static_Qt_qCritical(), PythonQtStdDecorators::static_Qt_qDebug(), PythonQtStdDecorators::static_Qt_qFatal(), PythonQtStdDecorators::static_Qt_qFuzzyCompare(), PythonQtStdDecorators::static_Qt_qMax(), PythonQtStdDecorators::static_Qt_qMin(), PythonQtStdDecorators::static_Qt_qrand(), PythonQtStdDecorators::static_Qt_qRound(), PythonQtStdDecorators::static_Qt_qRound64(), PythonQtStdDecorators::static_Qt_qsrand(), PythonQtStdDecorators::static_Qt_qVersion(), PythonQtStdDecorators::static_Qt_qWarning(), PythonQtStdDecorators::static_Qt_SIGNAL(), PythonQtStdDecorators::static_Qt_SLOT(), PythonQtWrapper_QMetaObject::superClass(), PythonQtObjectPtr::takeObject(), PythonQtSafeObjectPtr::takeObject(), PythonQtUtils::typeName(), PythonQtUtils::typeNameFromMetaTypeId(), and PythonQtWrapper_QMetaObject::userProperty().
+ +| bool PythonQtConvertPythonListToListOfKnownClass | +( | +PyObject * | +obj, | +
| + | + | void * | +outList, | +
| + | + | int | +metaTypeId, | +
| + | + | bool | ++ |
| + | ) | ++ |
Definition at line 351 of file PythonQtConversion.h.
+References PythonQtConv::castWrapperTo(), PythonQtClassInfo::className(), PythonQtPrivate::getClassInfo(), PythonQtMethodInfo::getInnerListTypeName(), PythonQt::priv(), PythonQtInstanceWrapper_Type, and PythonQtUtils::typeNameFromMetaTypeId().
+ +| bool PythonQtConvertPythonListToListOfPair | +( | +PyObject * | +obj, | +
| + | + | void * | +outList, | +
| + | + | int | +metaTypeId, | +
| + | + | bool | ++ |
| + | ) | ++ |
Definition at line 488 of file PythonQtConversion.h.
+References PythonQtMethodInfo::getInnerTemplateMetaType(), PythonQtConvertPairToPython(), and PythonQtUtils::typeNameFromMetaTypeId().
+ +| bool PythonQtConvertPythonListToListOfValueType | +( | +PyObject * | +obj, | +
| + | + | void * | +outList, | +
| + | + | int | +metaTypeId, | +
| + | + | bool | ++ |
| + | ) | ++ |
Definition at line 292 of file PythonQtConversion.h.
+References PythonQtMethodInfo::getInnerTemplateMetaType(), PythonQtConv::PyObjToQVariant(), and PythonQtUtils::typeNameFromMetaTypeId().
+ +| bool PythonQtConvertPythonToIntegerMap | +( | +PyObject * | +val, | +
| + | + | void * | +outMap, | +
| + | + | int | +metaTypeId, | +
| + | + | bool | ++ |
| + | ) | ++ |
Definition at line 554 of file PythonQtConversion.h.
+References PythonQtMethodInfo::getInnerTemplateTypeName(), PythonQtUtils::metaTypeIdFromTypeName(), PythonQtConv::PyObjGetInt(), PythonQtConv::PyObjToQVariant(), PythonQtConvertPairToPython(), and PythonQtUtils::typeNameFromMetaTypeId().
+ +| bool PythonQtConvertPythonToPair | +( | +PyObject * | +obj, | +
| + | + | void * | +outPair, | +
| + | + | int | +metaTypeId, | +
| + | + | bool | ++ |
| + | ) | ++ |
Definition at line 417 of file PythonQtConversion.h.
+References PythonQtMethodInfo::getInnerTemplateTypeName(), PythonQtUtils::metaTypeIdFromTypeName(), PythonQtConv::PyObjToQVariant(), and PythonQtUtils::typeNameFromMetaTypeId().
+ +|
+ PythonQt
+
+ |
+
|
+ PythonQt
+
+ |
+
#include "PythonQtPythonInclude.h"#include "PythonQtSystem.h"#include <QObject>#include <QByteArray>Go to the source code of this file.
++Classes | |
| class | PythonQtCppWrapperFactory |
| Factory interface for C++ classes that can be wrapped by QObject objects. More... | |
| class | PythonQtForeignWrapperFactory |
|
+ PythonQt
+
+ |
+
|
+ PythonQt
+
+ |
+
|
+ PythonQt
+
+ |
+
|
+ PythonQt
+
+ |
+
#include "PythonQtPythonInclude.h"#include <QDateTime>#include <QString>#include <QByteArray>Go to the source code of this file.
++Classes | |
| class | PythonQtImportFileInterface |
|
+ PythonQt
+
+ |
+
|
+ PythonQt
+
+ |
+
#include "PythonQtPythonInclude.h"#include "compile.h"#include "marshal.h"#include "osdefs.h"#include "structmember.h"#include <ctime>#include <qobject.h>#include <qstring.h>Go to the source code of this file.
++Classes | |
| struct | PythonQtImporter |
| defines a python object that stores a Qt slot info More... | |
| class | PythonQtImport |
| implements importing of python files into PythonQt More... | |
| struct | PythonQtImport::ModuleInfo |
|
+ PythonQt
+
+ |
+
|
+ PythonQt
+
+ |
+
#include "PythonQtPythonInclude.h"#include "PythonQtSystem.h"#include "PythonQtClassWrapper.h"#include <QPointer>#include "structmember.h"#include "methodobject.h"#include "compile.h"Go to the source code of this file.
++Classes | |
| struct | PythonQtInstanceWrapper |
| a Python wrapper object for Qt objects and C++ objects (that are themselves wrapped by wrapper QObjects) More... | |
+Functions | |
| int | PythonQtInstanceWrapper_init (PythonQtInstanceWrapper *self, PyObject *args, PyObject *kwds) |
| PyObject * | PythonQtInstanceWrapper_delete (PythonQtInstanceWrapper *self) |
+Variables | |
| PYTHONQT_EXPORT PyTypeObject | PythonQtInstanceWrapper_Type |
| PyObject * PythonQtInstanceWrapper_delete | +( | +PythonQtInstanceWrapper * | +self | ) | ++ |
| int PythonQtInstanceWrapper_init | +( | +PythonQtInstanceWrapper * | +self, | +
| + | + | PyObject * | +args, | +
| + | + | PyObject * | +kwds | +
| + | ) | ++ |
+
|
+ +extern | +
Referenced by PythonQtConvertPythonListToListOfKnownClass().
+ +|
+ PythonQt
+
+ |
+
|
+ PythonQt
+
+ |
+
#include "PythonQtPythonInclude.h"#include "PythonQtSystem.h"#include <QByteArray>#include <QHash>#include <QList>#include <QMetaMethod>Go to the source code of this file.
++Classes | |
| class | PythonQtMethodInfo |
| stores information about a specific signal/slot/method More... | |
| struct | PythonQtMethodInfo::ParameterInfo |
| stores various informations about a parameter/type name More... | |
| class | PythonQtSlotInfo |
| stores information about a slot, including a next pointer to overloaded slots More... | |
+Typedefs | |
| typedef struct _object | PyObject |
Definition at line 55 of file PythonQtMethodInfo.h.
+ +|
+ PythonQt
+
+ |
+
|
+ PythonQt
+
+ |
+
Go to the source code of this file.
++Classes | |
| class | PythonQtArgumentFrame |
| Stores C++ arguments for a qt_metacall (which are created when converting data from Python to C++) More... | |
+Macros | |
| #define | PYTHONQT_MAX_ARGS 32 |
| #define | PythonQtArgumentFrame_ADD_VALUE(store, type, value, ptr) |
| #define | PythonQtArgumentFrame_ADD_VALUE_IF_NEEDED(alreadyAllocatedPtr, store, type, value, ptr) |
| #define | PythonQtArgumentFrame_ADD_VARIANT_VALUE(store, value, ptr) |
| #define | PythonQtArgumentFrame_ADD_VARIANT_VALUE_BY_ID(store, id, ptr) PythonQtArgumentFrame_ADD_VARIANT_VALUE(store, QVariant::Type(id), ptr) |
| #define | PythonQtArgumentFrame_ADD_VARIANT_VALUE_IF_NEEDED(alreadyAllocatedPtr, store, value, ptr) |
| #define | PythonQtArgumentFrame_ADD_VARIANT_VALUE_BY_ID_IF_NEEDED(alreadyAllocatedPtr, store, id, ptr) PythonQtArgumentFrame_ADD_VARIANT_VALUE_IF_NEEDED(alreadyAllocatedPtr, store, QVariant::Type(id), ptr) |
| #define PYTHONQT_MAX_ARGS 32 | +
Definition at line 49 of file PythonQtMisc.h.
+ +| #define PythonQtArgumentFrame_ADD_VALUE | +( | ++ | store, | +
| + | + | + | type, | +
| + | + | + | value, | +
| + | + | + | ptr | +
| + | ) | ++ |
Definition at line 51 of file PythonQtMisc.h.
+ +| #define PythonQtArgumentFrame_ADD_VALUE_IF_NEEDED | +( | ++ | alreadyAllocatedPtr, | +
| + | + | + | store, | +
| + | + | + | type, | +
| + | + | + | value, | +
| + | + | + | ptr | +
| + | ) | ++ |
| #define PythonQtArgumentFrame_ADD_VARIANT_VALUE_BY_ID | +( | ++ | store, | +
| + | + | + | id, | +
| + | + | + | ptr | +
| + | ) | +PythonQtArgumentFrame_ADD_VARIANT_VALUE(store, QVariant::Type(id), ptr) | +
Definition at line 79 of file PythonQtMisc.h.
+ +| #define PythonQtArgumentFrame_ADD_VARIANT_VALUE_BY_ID_IF_NEEDED | +( | ++ | alreadyAllocatedPtr, | +
| + | + | + | store, | +
| + | + | + | id, | +
| + | + | + | ptr | +
| + | ) | +PythonQtArgumentFrame_ADD_VARIANT_VALUE_IF_NEEDED(alreadyAllocatedPtr, store, QVariant::Type(id), ptr) | +
Definition at line 98 of file PythonQtMisc.h.
+ +| #define PythonQtArgumentFrame_ADD_VARIANT_VALUE_IF_NEEDED | +( | ++ | alreadyAllocatedPtr, | +
| + | + | + | store, | +
| + | + | + | value, | +
| + | + | + | ptr | +
| + | ) | ++ |
Definition at line 84 of file PythonQtMisc.h.
+|
+ PythonQt
+
+ |
+
|
+ PythonQt
+
+ |
+
#include "PythonQtPythonInclude.h"#include "PythonQtSystem.h"#include "PythonQtThreadSupport.h"#include <QVariant>#include <QVariantList>#include <QVariantMap>Go to the source code of this file.
++Classes | |
| class | PythonQtObjectPtr |
| a smart pointer that stores a PyObject pointer and that handles reference counting automatically More... | |
| class | PythonQtSafeObjectPtr |
| a smart pointer that stores a PyObject pointer and that handles reference counting automatically More... | |
|
+ PythonQt
+
+ |
+
|
+ PythonQt
+
+ |
+
#include "PythonQtPythonInclude.h"#include "PythonQtSystem.h"#include <QByteArray>#include <QList>#include <structmember.h>Go to the source code of this file.
++Classes | |
| struct | PythonQtPropertyData |
| struct | PythonQtProperty |
+Macros | |
| #define | PythonQtProperty_Check(op) (Py_TYPE(op) == &PythonQtProperty_Type) |
+Variables | |
| PYTHONQT_EXPORT PyTypeObject | PythonQtProperty_Type |
| #define PythonQtProperty_Check | +( | ++ | op | ) | +(Py_TYPE(op) == &PythonQtProperty_Type) | +
Definition at line 44 of file PythonQtProperty.h.
+ +
+
|
+ +extern | +
|
+ PythonQt
+
+ |
+
|
+ PythonQt
+
+ |
+
#include <Python.h>|
+ PythonQt
+
+ |
+
|
+ PythonQt
+
+ |
+
Go to the source code of this file.
++Classes | |
| class | PythonQtQFileImporter |
| default importer implementation using QFile to load python code More... | |
|
+ PythonQt
+
+ |
+
|
+ PythonQt
+
+ |
+
Go to the source code of this file.
++Classes | |
| class | PythonQtSignalTarget |
| stores information about a signal target More... | |
| class | PythonQtSignalReceiverBase |
| base class for signal receivers More... | |
| class | PythonQtSignalReceiver |
| receives all signals for one QObject More... | |
|
+ PythonQt
+
+ |
+
|
+ PythonQt
+
+ |
+
Go to the source code of this file.
++Classes | |
| struct | PythonQtDynamicSignalInfo |
| struct | PythonQtSignalFunctionObject |
| defines a python object that stores a Qt signal info More... | |
+Macros | |
| #define | PythonQtSignalFunction_Check(op) (Py_TYPE(op) == &PythonQtSignalFunction_Type) |
+Functions | |
| PyObject * | PythonQtSignalFunction_New (PythonQtSlotInfo *, PyObject *, PyObject *) |
+Variables | |
| PYTHONQT_EXPORT PyTypeObject | PythonQtSignalFunction_Type |
| #define PythonQtSignalFunction_Check | +( | ++ | op | ) | +(Py_TYPE(op) == &PythonQtSignalFunction_Type) | +
Definition at line 54 of file PythonQtSignal.h.
+ +| PyObject * PythonQtSignalFunction_New | +( | +PythonQtSlotInfo * | +, | +
| + | + | PyObject * | +, | +
| + | + | PyObject * | ++ |
| + | ) | ++ |
+
|
+ +extern | +
|
+ PythonQt
+
+ |
+
|
+ PythonQt
+
+ |
+
#include "PythonQtPythonInclude.h"#include "PythonQtSystem.h"#include <QByteArray>#include <QList>#include <structmember.h>Go to the source code of this file.
++Classes | |
| struct | PythonQtSlotDecorator |
+Macros | |
| #define | PythonQtSlotDecorator_Check(op) (Py_TYPE(op) == &PythonQtSlotDecorator_Type) |
+Variables | |
| PYTHONQT_EXPORT PyTypeObject | PythonQtSlotDecorator_Type |
| #define PythonQtSlotDecorator_Check | +( | ++ | op | ) | +(Py_TYPE(op) == &PythonQtSlotDecorator_Type) | +
Definition at line 44 of file PythonQtSlotDecorator.h.
+ +
+
|
+ +extern | +
|
+ PythonQt
+
+ |
+
|
+ PythonQt
+
+ |
+
Go to the source code of this file.
++Classes | |
| struct | PythonQtSlotFunctionObject |
| defines a python object that stores a Qt slot info More... | |
+Macros | |
| #define | PythonQtSlotFunction_Check(op) (Py_TYPE(op) == &PythonQtSlotFunction_Type) |
| #define | PythonQtSlotFunction_GET_SELF(func) (((PythonQtSlotFunctionObject*)func)->m_self) |
+Enumerations | |
| enum | PythonQtPassThisOwnershipType { IgnoreOwnership +, PassOwnershipToCPP +, PassOwnershipToPython + } |
+Functions | |
| PythonQtSlotInfo * | PythonQtSlotFunction_GetSlotInfo (PyObject *) |
| PyObject * | PythonQtSlotFunction_GetSelf (PyObject *) |
| PyObject * | PythonQtSlotFunction_Call (PyObject *, PyObject *, PyObject *) |
| PyObject * | PythonQtSlotFunction_CallImpl (PythonQtClassInfo *classInfo, QObject *objectToCall, PythonQtSlotInfo *info, PyObject *args, PyObject *kw, void *firstArg=nullptr, void **directReturnValuePointer=nullptr, PythonQtPassThisOwnershipType *passThisOwnershipToCPP=nullptr) |
| PyObject * | PythonQtSlotFunction_New (PythonQtSlotInfo *, PyObject *, PyObject *) |
| PyObject * | PythonQtMemberFunction_Call (PythonQtSlotInfo *info, PyObject *m_self, PyObject *args, PyObject *kw) |
| PyObject * | PythonQtMemberFunction_parameterTypes (PythonQtSlotInfo *theInfo) |
| PyObject * | PythonQtMemberFunction_parameterNames (PythonQtSlotInfo *theInfo) |
| PyObject * | PythonQtMemberFunction_typeName (PythonQtSlotInfo *theInfo) |
+Variables | |
| PYTHONQT_EXPORT PyTypeObject | PythonQtSlotFunction_Type |
| #define PythonQtSlotFunction_Check | +( | ++ | op | ) | +(Py_TYPE(op) == &PythonQtSlotFunction_Type) | +
Definition at line 56 of file PythonQtSlot.h.
+ +| #define PythonQtSlotFunction_GET_SELF | +( | ++ | func | ) | +(((PythonQtSlotFunctionObject*)func)->m_self) | +
Definition at line 63 of file PythonQtSlot.h.
+ +| enum PythonQtPassThisOwnershipType | +
| Enumerator | |
|---|---|
| IgnoreOwnership | |
| PassOwnershipToCPP | |
| PassOwnershipToPython | |
Definition at line 52 of file PythonQtSlot.h.
+| PyObject * PythonQtMemberFunction_Call | +( | +PythonQtSlotInfo * | +info, | +
| + | + | PyObject * | +m_self, | +
| + | + | PyObject * | +args, | +
| + | + | PyObject * | +kw | +
| + | ) | ++ |
| PyObject * PythonQtMemberFunction_parameterNames | +( | +PythonQtSlotInfo * | +theInfo | ) | ++ |
| PyObject * PythonQtMemberFunction_parameterTypes | +( | +PythonQtSlotInfo * | +theInfo | ) | ++ |
| PyObject * PythonQtMemberFunction_typeName | +( | +PythonQtSlotInfo * | +theInfo | ) | ++ |
| PyObject * PythonQtSlotFunction_Call | +( | +PyObject * | +, | +
| + | + | PyObject * | +, | +
| + | + | PyObject * | ++ |
| + | ) | ++ |
| PyObject * PythonQtSlotFunction_CallImpl | +( | +PythonQtClassInfo * | +classInfo, | +
| + | + | QObject * | +objectToCall, | +
| + | + | PythonQtSlotInfo * | +info, | +
| + | + | PyObject * | +args, | +
| + | + | PyObject * | +kw, | +
| + | + | void * | +firstArg = nullptr, |
+
| + | + | void ** | +directReturnValuePointer = nullptr, |
+
| + | + | PythonQtPassThisOwnershipType * | +passThisOwnershipToCPP = nullptr |
+
| + | ) | ++ |
| PythonQtSlotInfo * PythonQtSlotFunction_GetSlotInfo | +( | +PyObject * | +) | ++ |
| PyObject * PythonQtSlotFunction_New | +( | +PythonQtSlotInfo * | +, | +
| + | + | PyObject * | +, | +
| + | + | PyObject * | ++ |
| + | ) | ++ |
+
|
+ +extern | +
|
+ PythonQt
+
+ |
+
|
+ PythonQt
+
+ |
+
#include "PythonQtPythonInclude.h"#include "PythonQt.h"#include <QObject>#include <QVariantList>#include <QTextDocument>#include <QColor>#include <QDateTime>#include <QDate>#include <QTime>#include <QTimer>#include <QImage>#include <QMetaMethod>#include <QMetaEnum>#include <QMetaProperty>#include <QRandomGenerator>Go to the source code of this file.
++Classes | |
| class | PythonQtStdDecorators |
| class | PythonQtSingleShotTimer |
| class | PythonQtWrapper_QMetaObject |
| class | PythonQtConfigAPI |
| Some methods to set properties of PythonQt from Python. More... | |
| class | PythonQtDebugAPI |
| Some helper methods that allow testing of the ownership. More... | |
|
+ PythonQt
+
+ |
+
|
+ PythonQt
+
+ |
+
Go to the source code of this file.
++Classes | |
| struct | PythonQtStdInRedirect |
| declares the stdin redirection class More... | |
+Typedefs | |
| typedef QString | PythonQtInputChangedCB(void *callData) |
| declares the callback that is called from the write() function | |
+Variables | |
| PyTypeObject | PythonQtStdInRedirectType |
| declares the type of the stdout redirection class | |
declares the callback that is called from the write() function
+ +Definition at line 53 of file PythonQtStdIn.h.
+ +
+
|
+ +extern | +
declares the type of the stdout redirection class
+ +|
+ PythonQt
+
+ |
+
|
+ PythonQt
+
+ |
+
Go to the source code of this file.
++Classes | |
| struct | PythonQtStdOutRedirect |
| declares the stdout redirection class More... | |
+Typedefs | |
| typedef void | PythonQtOutputChangedCB(const QString &str) |
| declares the callback that is called from the write() function | |
+Variables | |
| PyTypeObject | PythonQtStdOutRedirectType |
| declares the type of the stdout redirection class | |
declares the callback that is called from the write() function
+ +Definition at line 54 of file PythonQtStdOut.h.
+ +
+
|
+ +extern | +
declares the type of the stdout redirection class
+ +|
+ PythonQt
+
+ |
+
|
+ PythonQt
+
+ |
+
Go to the source code of this file.
++Macros | |
| #define | PYTHONQT_EXPORT |
| #define PYTHONQT_EXPORT | +
Definition at line 55 of file PythonQtSystem.h.
+ +|
+ PythonQt
+
+ |
+
|
+ PythonQt
+
+ |
+
Go to the source code of this file.
++Classes | |
| class | PythonQtGILScope |
| class | PythonQtThreadStateSaver |
Definition in file PythonQtThreadSupport.h.
+| #define PYTHONQT_ALLOW_THREADS_SCOPE PythonQtThreadStateSaver internal_pythonqt_savethread; | +
Definition at line 99 of file PythonQtThreadSupport.h.
+ +| #define PYTHONQT_ALLOW_THREADS_SUPPORT | +
Definition at line 50 of file PythonQtThreadSupport.h.
+ +| #define PYTHONQT_FULL_THREAD_SUPPORT | +
Definition at line 46 of file PythonQtThreadSupport.h.
+ +| #define PYTHONQT_GIL_SCOPE PythonQtGILScope internal_pythonqt_gilscope; | +
Definition at line 55 of file PythonQtThreadSupport.h.
+ +| #define PYTHONQT_GIL_SUPPORT | +
Definition at line 49 of file PythonQtThreadSupport.h.
+ +|
+ PythonQt
+
+ |
+
|
+ PythonQt
+
+ |
+
#include "PythonQtPythonInclude.h"#include "PythonQtSystem.h"#include <QByteArray>#include <QMetaMethod>#include <QMetaType>Go to the source code of this file.
++Namespaces | |
| namespace | PythonQtUtils |
+Functions | |
| QByteArray | PythonQtUtils::signature (const QMetaMethod &method) |
| QByteArray | PythonQtUtils::methodName (const QMetaMethod &method) |
| QByteArray | PythonQtUtils::typeName (const QMetaMethod &method) |
| bool | PythonQtUtils::isPythonClassType (PyObject *obj) |
| Returns of the python object is a class type. | |
| int | PythonQtUtils::metaTypeIdFromTypeName (const QByteArray &className) |
| Returns the meta type ID from a type name. | |
| const char * | PythonQtUtils::typeNameFromMetaTypeId (int metaTypeId) |
| Returns the type name from a meta type ID. | |
|
+ PythonQt
+
+ |
+
|
+ PythonQt
+
+ |
+
#include <QBitArray>#include <QDate>#include <QTime>#include <QDateTime>#include <QUrl>#include <QLocale>#include <QRect>#include <QRectF>#include <QLine>#include <QLineF>#include <QPoint>#include <QPointF>#include <QRegularExpression>#include <QFont>#include <QBitmap>#include <QBrush>#include <QColor>#include <QPalette>#include <QIcon>#include <QImage>#include <QPolygon>#include <QRegion>#include <QCursor>#include <QSizePolicy>#include <QKeySequence>#include <QPen>#include <QTextLength>#include <QTextFormat>#include <QMatrix>Go to the source code of this file.
+|
+ PythonQt
+
+ |
+
|
+ PythonQt
+
+ |
+
#include "PythonQtPythonInclude.h"#include "PythonQtUtils.h"#include "PythonQtSystem.h"#include "PythonQtInstanceWrapper.h"#include "PythonQtClassWrapper.h"#include "PythonQtSlot.h"#include "PythonQtObjectPtr.h"#include "PythonQtStdIn.h"#include "PythonQtThreadSupport.h"#include <QObject>#include <QVariant>#include <QList>#include <QHash>#include <QByteArray>#include <QStringList>#include <QtDebug>#include <iostream>Go to the source code of this file.
++Classes | |
| class | PythonQtPassOwnershipToCPP< T > |
| class | PythonQtPassOwnershipToPython< T > |
| class | PythonQtNewOwnerOfThis< T > |
| class | PythonQt |
| The main interface to the Python Qt binding, realized as a singleton. More... | |
| class | PythonQtPrivate |
| internal PythonQt details More... | |
+Macros | |
| #define | QStringToPythonConstCharPointer(arg) ((arg).toUtf8().constData()) |
| Helper define to convert from QString to Python C-API. | |
| #define | QStringToPythonCharPointer(arg) ((arg).toUtf8().data()) |
| #define | QStringToPythonEncoding(arg) ((arg).toUtf8()) |
+Typedefs | |
| typedef void | PythonQtVoidPtrCB(void *object) |
| typedef void | PythonQtQObjectWrappedCB(QObject *object) |
| typedef void | PythonQtQObjectNoLongerWrappedCB(QObject *object) |
| typedef void * | PythonQtPolymorphicHandlerCB(const void *ptr, const char **class_name) |
| typedef QString | PythonQtQObjectMissingAttributeCB(QObject *object, const QString &attribute) |
| typedef void | PythonQtShellSetInstanceWrapperCB(void *object, PythonQtInstanceWrapper *wrapper) |
| typedef QObject * | PythonQtQObjectCreatorFunctionCB() |
| callback to create a QObject lazily | |
+Functions | |
| template<class T > | |
| void | PythonQtSetInstanceWrapperOnShell (void *object, PythonQtInstanceWrapper *wrapper) |
| template<class T1 , class T2 > | |
| int | PythonQtUpcastingOffset () |
| returns the offset that needs to be added to upcast an object of type T1 to T2 | |
| template<class T > | |
| QObject * | PythonQtCreateObject () |
| helper template to create a derived QObject class | |
Definition at line 166 of file PythonQt.h.
+ +Helper define to convert from QString to Python C-API.
+ +Definition at line 165 of file PythonQt.h.
+ +Definition at line 167 of file PythonQt.h.
+ +Definition at line 75 of file PythonQt.h.
+ +| typedef QObject * PythonQtQObjectCreatorFunctionCB() | +
callback to create a QObject lazily
+ +Definition at line 155 of file PythonQt.h.
+ +| typedef QString PythonQtQObjectMissingAttributeCB(QObject *object, const QString &attribute) | +
Definition at line 76 of file PythonQt.h.
+ +Definition at line 74 of file PythonQt.h.
+ +Definition at line 73 of file PythonQt.h.
+ +| typedef void PythonQtShellSetInstanceWrapperCB(void *object, PythonQtInstanceWrapper *wrapper) | +
Definition at line 78 of file PythonQt.h.
+ +Definition at line 72 of file PythonQt.h.
+ +helper template to create a derived QObject class
+ +Definition at line 159 of file PythonQt.h.
+| void PythonQtSetInstanceWrapperOnShell | +( | +void * | +object, | +
| + | + | PythonQtInstanceWrapper * | +wrapper | +
| + | ) | ++ |
Definition at line 81 of file PythonQt.h.
+ +returns the offset that needs to be added to upcast an object of type T1 to T2
+ +Definition at line 148 of file PythonQt.h.
+ +|
+ PythonQt
+
+ |
+
|
+ PythonQt
+
+ |
+
| CPythonQt | The main interface to the Python Qt binding, realized as a singleton |
| CPythonQtArgumentFrame | Stores C++ arguments for a qt_metacall (which are created when converting data from Python to C++) |
| CPythonQtBoolResultObject | Defines a python object that stores a single bool |
| ▼CPythonQtClassInfo | Class that stores all required information about a Qt object (and an optional associated C++ class name) |
| CParentClassInfo | Store information about parent classes |
| CPythonQtClassWrapper | |
| CPythonQtConfigAPI | Some methods to set properties of PythonQt from Python |
| CPythonQtConv | Static class that offers methods for type conversion |
| CPythonQtCppWrapperFactory | Factory interface for C++ classes that can be wrapped by QObject objects |
| CPythonQtDebugAPI | Some helper methods that allow testing of the ownership |
| CPythonQtDynamicClassInfo | |
| CPythonQtDynamicSignalInfo | |
| CPythonQtForeignWrapperFactory | |
| CPythonQtGILScope | |
| ▼CPythonQtImport | Implements importing of python files into PythonQt |
| CModuleInfo | |
| CPythonQtImporter | Defines a python object that stores a Qt slot info |
| CPythonQtImportFileInterface | |
| CPythonQtInstanceWrapper | Python wrapper object for Qt objects and C++ objects (that are themselves wrapped by wrapper QObjects) |
| CPythonQtMemberInfo | |
| ▼CPythonQtMethodInfo | Stores information about a specific signal/slot/method |
| CParameterInfo | Stores various informations about a parameter/type name |
| CPythonQtNewOwnerOfThis | |
| CPythonQtObjectPtr | Smart pointer that stores a PyObject pointer and that handles reference counting automatically |
| CPythonQtPassOwnershipToCPP | |
| CPythonQtPassOwnershipToPython | |
| CPythonQtPrivate | Internal PythonQt details |
| CPythonQtProperty | |
| CPythonQtPropertyData | |
| CPythonQtQFileImporter | Default importer implementation using QFile to load python code |
| CPythonQtSafeObjectPtr | Smart pointer that stores a PyObject pointer and that handles reference counting automatically |
| CPythonQtSignalFunctionObject | Defines a python object that stores a Qt signal info |
| CPythonQtSignalReceiver | Receives all signals for one QObject |
| CPythonQtSignalReceiverBase | Base class for signal receivers |
| CPythonQtSignalTarget | Stores information about a signal target |
| CPythonQtSingleShotTimer | |
| CPythonQtSlotDecorator | |
| CPythonQtSlotFunctionObject | Defines a python object that stores a Qt slot info |
| CPythonQtSlotInfo | Stores information about a slot, including a next pointer to overloaded slots |
| CPythonQtStdDecorators | |
| CPythonQtStdInRedirect | Declares the stdin redirection class |
| CPythonQtStdOutRedirect | Declares the stdout redirection class |
| CPythonQtThreadStateSaver | |
| CPythonQtWrapper_QMetaObject |
|
+ PythonQt
+
+ |
+
This is the complete list of members for PythonQt, including all inherited members.
+| addClassDecorators(QObject *o) | PythonQt | |
| addDecorators(QObject *o) | PythonQt | |
| addInstanceDecorators(QObject *o) | PythonQt | |
| addObject(PyObject *object, const QString &name, QObject *qObject) | PythonQt | |
| addParentClass(const char *typeName, const char *parentTypeName, int upcastingOffset=0) | PythonQt | |
| addPolymorphicHandler(const char *typeName, PythonQtPolymorphicHandlerCB *cb) | PythonQt | |
| addSignalHandler(QObject *obj, const char *signal, PyObject *module, const QString &objectname) | PythonQt | |
| addSignalHandler(QObject *obj, const char *signal, PyObject *receiver) | PythonQt | |
| addSysPath(const QString &path) | PythonQt | |
| addVariable(PyObject *object, const QString &name, const QVariant &v) | PythonQt | |
| addWrapperFactory(PythonQtCppWrapperFactory *factory) | PythonQt | |
| addWrapperFactory(PythonQtForeignWrapperFactory *factory) | PythonQt | |
| Anything enum value | PythonQt | |
| call(PyObject *object, const QString &callable, const QVariantList &args=QVariantList(), const QVariantMap &kwargs=QVariantMap()) | PythonQt | |
| call(PyObject *callable, const QVariantList &args=QVariantList(), const QVariantMap &kwargs=QVariantMap()) | PythonQt | |
| callAndReturnPyObject(PyObject *callable, const QVariantList &args=QVariantList(), const QVariantMap &kwargs=QVariantMap()) | PythonQt | |
| CallOverloads enum value | PythonQt | |
| Class enum value | PythonQt | |
| cleanup() | PythonQt | static |
| clearError() | PythonQt | |
| clearNotFoundCachedMembers() | PythonQt | |
| createModuleFromFile(const QString &name, const QString &filename) | PythonQt | |
| createModuleFromScript(const QString &name, const QString &script=QString()) | PythonQt | |
| createUniqueModule() | PythonQt | |
| Enter enum value | PythonQt | |
| evalCode(PyObject *object, PyObject *pycode) | PythonQt | |
| evalFile(PyObject *object, const QString &filename) | PythonQt | |
| evalScript(PyObject *object, const QString &script, int start=Py_file_input) | PythonQt | |
| evalScript(const QString &script, PyObject *globals, PyObject *locals, int start) | PythonQt | |
| ExternalHelp enum value | PythonQt | |
| Function enum value | PythonQt | |
| getImporterIgnorePaths() | PythonQt | |
| getMainModule() | PythonQt | |
| getNativeVariable(PyObject *object, const QString &name) | PythonQt | |
| getReturnTypeOfWrappedMethod(PyObject *module, const QString &objectname) | PythonQt | |
| getReturnTypeOfWrappedMethod(const QString &typeName, const QString &methodName) | PythonQt | |
| getVariable(PyObject *object, const QString &name) | PythonQt | |
| hadError() const | PythonQt | |
| handleError(bool printStack=true) | PythonQt | |
| helpCalled(PythonQtClassInfo *info) | PythonQt | |
| IgnoreSiteModule enum value | PythonQt | |
| importInterface() | PythonQt | static |
| importModule(const QString &name) | PythonQt | |
| init(int flags=IgnoreSiteModule|RedirectStdOut, const QByteArray &pythonQtModuleName=QByteArray()) | PythonQt | static |
| InitFlags enum name | PythonQt | |
| installDefaultImporter() | PythonQt | inline |
| introspection(PyObject *object, const QString &objectname, ObjectType type) | PythonQt | |
| introspectObject(PyObject *object, ObjectType type) | PythonQt | |
| introspectType(const QString &typeName, ObjectType type) | PythonQt | |
| Leave enum value | PythonQt | |
| lookupCallable(PyObject *object, const QString &name) | PythonQt | |
| lookupObject(PyObject *module, const QString &name) | PythonQt | |
| Module enum value | PythonQt | |
| ObjectType enum name | PythonQt | |
| overwriteSysPath(const QStringList &paths) | PythonQt | |
| parseFile(const QString &filename) | PythonQt | |
| parseFileWithPythonLoaders(const QString &filename) | PythonQt | |
| priv() | PythonQt | inlinestatic |
| ProfilingCallbackState enum name | PythonQt | |
| ProfilingCB typedef | PythonQt | |
| PythonAlreadyInitialized enum value | PythonQt | |
| pythonHelpRequest(const QByteArray &cppClassName) | PythonQt | signal |
| pythonStdErr(const QString &str) | PythonQt | signal |
| pythonStdOut(const QString &str) | PythonQt | signal |
| qObjectMissingAttributeCallback(QObject *o, const QString &attribute) | PythonQt | static |
| qObjectNoLongerWrappedCB(QObject *o) | PythonQt | static |
| RedirectStdOut enum value | PythonQt | |
| redirectStdOutCallbackEnabled() const | PythonQt | |
| registerClass(const QMetaObject *metaobject, const char *package=nullptr, PythonQtQObjectCreatorFunctionCB *wrapperCreator=nullptr, PythonQtShellSetInstanceWrapperCB *shell=nullptr) | PythonQt | |
| registerCPPClass(const char *typeName, const char *parentTypeName=nullptr, const char *package=nullptr, PythonQtQObjectCreatorFunctionCB *wrapperCreator=nullptr, PythonQtShellSetInstanceWrapperCB *shell=nullptr) | PythonQt | |
| registerQObjectClassNames(const QStringList &names) | PythonQt | |
| removeSignalHandler(QObject *obj, const char *signal, PyObject *module, const QString &objectname) | PythonQt | |
| removeSignalHandler(QObject *obj, const char *signal, PyObject *receiver) | PythonQt | |
| removeSignalHandlers() | PythonQt | |
| removeVariable(PyObject *module, const QString &name) | PythonQt | |
| removeWrapperFactory(PythonQtCppWrapperFactory *factory) | PythonQt | |
| removeWrapperFactory(PythonQtForeignWrapperFactory *factory) | PythonQt | |
| self() | PythonQt | static |
| setEnableThreadSupport(bool flag) | PythonQt | static |
| setImporter(PythonQtImportFileInterface *importInterface) | PythonQt | |
| setImporterIgnorePaths(const QStringList &paths) | PythonQt | |
| setModuleImportPath(PyObject *module, const QStringList &paths) | PythonQt | |
| setProfilingCallback(ProfilingCB *cb) | PythonQt | |
| setQObjectMissingAttributeCallback(PythonQtQObjectMissingAttributeCB *cb) | PythonQt | |
| setQObjectNoLongerWrappedCallback(PythonQtQObjectNoLongerWrappedCB *cb) | PythonQt | |
| setQObjectWrappedCallback(PythonQtQObjectWrappedCB *cb) | PythonQt | |
| setRedirectStdInCallback(PythonQtInputChangedCB *callback, void *callbackData=nullptr) | PythonQt | |
| setRedirectStdInCallbackEnabled(bool enabled) | PythonQt | |
| setRedirectStdOutCallbackEnabled(bool enabled) | PythonQt | |
| setSystemExitExceptionHandlerEnabled(bool value) | PythonQt | |
| systemExitExceptionHandlerEnabled() const | PythonQt | |
| systemExitExceptionRaised(int exitCode) | PythonQt | signal |
| Type_Add enum value | PythonQt | |
| Type_And enum value | PythonQt | |
| Type_Divide enum value | PythonQt | |
| Type_EnterExit enum value | PythonQt | |
| Type_InplaceAdd enum value | PythonQt | |
| Type_InplaceAnd enum value | PythonQt | |
| Type_InplaceDivide enum value | PythonQt | |
| Type_InplaceLShift enum value | PythonQt | |
| Type_InplaceMod enum value | PythonQt | |
| Type_InplaceMultiply enum value | PythonQt | |
| Type_InplaceOr enum value | PythonQt | |
| Type_InplaceRShift enum value | PythonQt | |
| Type_InplaceSubtract enum value | PythonQt | |
| Type_InplaceXor enum value | PythonQt | |
| Type_Invert enum value | PythonQt | |
| Type_Length enum value | PythonQt | |
| Type_LShift enum value | PythonQt | |
| Type_MappingGetItem enum value | PythonQt | |
| Type_MappingSetItem enum value | PythonQt | |
| Type_Mod enum value | PythonQt | |
| Type_Multiply enum value | PythonQt | |
| Type_NonZero enum value | PythonQt | |
| Type_Or enum value | PythonQt | |
| Type_RichCompare enum value | PythonQt | |
| Type_RShift enum value | PythonQt | |
| Type_Subtract enum value | PythonQt | |
| Type_Xor enum value | PythonQt | |
| TypeSlots enum name | PythonQt | |
| Variable enum value | PythonQt |
|
+ PythonQt
+
+ |
+
The main interface to the Python Qt binding, realized as a singleton. + More...
+ +#include <PythonQt.h>
+ +Public Types | |
| enum | InitFlags { RedirectStdOut = 1 +, IgnoreSiteModule = 2 +, ExternalHelp = 4 +, PythonAlreadyInitialized = 8 + } |
| flags that can be passed to PythonQt::init() More... | |
| enum | TypeSlots { + Type_Add = 1 +, Type_Subtract = 1 << 1 +, Type_Multiply = 1 << 2 +, Type_Divide = 1 << 3 +, + Type_Mod = 1 << 4 +, Type_And = 1 << 5 +, Type_Or = 1 << 6 +, Type_Xor = 1 << 7 +, + Type_LShift = 1 << 8 +, Type_RShift = 1 << 9 +, Type_InplaceAdd = 1 << 10 +, Type_InplaceSubtract = 1 << 11 +, + Type_InplaceMultiply = 1 << 12 +, Type_InplaceDivide = 1 << 13 +, Type_InplaceMod = 1 << 14 +, Type_InplaceAnd = 1 << 15 +, + Type_InplaceOr = 1 << 16 +, Type_InplaceXor = 1 << 17 +, Type_InplaceLShift = 1 << 18 +, Type_InplaceRShift = 1 << 19 +, + Type_Length = 1 << 20 +, Type_MappingSetItem = 1 << 21 +, Type_MappingGetItem = 1 << 22 +, Type_EnterExit = 1 << 23 +, + Type_Invert = 1 << 29 +, Type_RichCompare = 1 << 30 +, Type_NonZero = 1 << 31 + + } |
| flags that tell PythonQt which operators to expect on the registered type More... | |
| enum | ProfilingCallbackState { Enter = 1 +, Leave = 2 + } |
| enum for profiling callback More... | |
| typedef void | ProfilingCB(ProfilingCallbackState state, const char *className, const char *methodName, PyObject *args) |
+Public Member Functions | |
Standard input handling | |
| void | setRedirectStdInCallback (PythonQtInputChangedCB *callback, void *callbackData=nullptr) |
| void | setRedirectStdInCallbackEnabled (bool enabled) |
Standard output handling | |
| bool | redirectStdOutCallbackEnabled () const |
| return true if std out/err redirection is enabled. | |
| void | setRedirectStdOutCallbackEnabled (bool enabled) |
| enable or disable std out/err redirection to pythonStdOut() and pythonStdErr() signals. | |
Modules | |
| PythonQtObjectPtr | getMainModule () |
| get the main module of python | |
| PythonQtObjectPtr | importModule (const QString &name) |
| PythonQtObjectPtr | createModuleFromFile (const QString &name, const QString &filename) |
| PythonQtObjectPtr | createModuleFromScript (const QString &name, const QString &script=QString()) |
| PythonQtObjectPtr | createUniqueModule () |
Importing/Paths | |
| void | overwriteSysPath (const QStringList &paths) |
| overwrite the python sys path (call this directly after PythonQt::init() if you want to change the std python sys path) | |
| void | addSysPath (const QString &path) |
| prepend a path to sys.path to allow importing from it | |
| void | setModuleImportPath (PyObject *module, const QStringList &paths) |
| sets the path list of a module to the given list (important for local imports) | |
Registering Classes | |
| void | registerClass (const QMetaObject *metaobject, const char *package=nullptr, PythonQtQObjectCreatorFunctionCB *wrapperCreator=nullptr, PythonQtShellSetInstanceWrapperCB *shell=nullptr) |
| registers a QObject derived class to PythonQt (this is implicitly called by addObject as well) | |
| void | registerCPPClass (const char *typeName, const char *parentTypeName=nullptr, const char *package=nullptr, PythonQtQObjectCreatorFunctionCB *wrapperCreator=nullptr, PythonQtShellSetInstanceWrapperCB *shell=nullptr) |
| void | registerQObjectClassNames (const QStringList &names) |
| bool | addParentClass (const char *typeName, const char *parentTypeName, int upcastingOffset=0) |
| void | addPolymorphicHandler (const char *typeName, PythonQtPolymorphicHandlerCB *cb) |
| add a handler for polymorphic downcasting | |
Script Parsing and Evaluation | |
| PythonQtObjectPtr | parseFile (const QString &filename) |
| parses the given file (using PythonQt's own import mechanism) and returns the python code object, this can then be used to call evalCode() | |
| PythonQtObjectPtr | parseFileWithPythonLoaders (const QString &filename) |
| QVariant | evalCode (PyObject *object, PyObject *pycode) |
| QVariant | evalScript (PyObject *object, const QString &script, int start=Py_file_input) |
| evaluates the given script code and returns the result value | |
| QVariant | evalScript (const QString &script, PyObject *globals, PyObject *locals, int start) |
| evaluates the given script code in context of given globals and locals and returns the result value | |
| void | evalFile (PyObject *object, const QString &filename) |
| evaluates the given script code from file | |
Signal Handlers | |
| bool | addSignalHandler (QObject *obj, const char *signal, PyObject *module, const QString &objectname) |
add a signal handler to the given signal of obj and connect it to a callable objectname in module | |
| bool | removeSignalHandler (QObject *obj, const char *signal, PyObject *module, const QString &objectname) |
remove a signal handler from the given signal of obj | |
| bool | addSignalHandler (QObject *obj, const char *signal, PyObject *receiver) |
add a signal handler to the given signal of obj and connect it to a callable receiver | |
| bool | removeSignalHandler (QObject *obj, const char *signal, PyObject *receiver) |
remove a signal handler from the given signal of obj | |
| void | removeSignalHandlers () |
| globally removes all signal handlers (connections between QObjects and Python). | |
Variable access | |
| void | addObject (PyObject *object, const QString &name, QObject *qObject) |
add the given qObject to the python object as a variable with name (it can be removed via clearVariable) | |
| void | addVariable (PyObject *object, const QString &name, const QVariant &v) |
| add the given variable to the object | |
| void | removeVariable (PyObject *module, const QString &name) |
| remove the given variable | |
| QVariant | getVariable (PyObject *object, const QString &name) |
get the variable with the name of the object, returns an invalid QVariant on error | |
| QVariant | getNativeVariable (PyObject *object, const QString &name) |
get the variable with the name of the object as QVariant of type PythonQtObjectPtr, returns an invalid QVariant on error | |
| QStringList | introspection (PyObject *object, const QString &objectname, ObjectType type) |
read vars etc. in scope of an object, optional looking inside of an object objectname | |
| QStringList | introspectObject (PyObject *object, ObjectType type) |
read vars etc. in scope of the given object | |
| QStringList | introspectType (const QString &typeName, ObjectType type) |
| PythonQtObjectPtr | lookupCallable (PyObject *object, const QString &name) |
| QString | getReturnTypeOfWrappedMethod (PyObject *module, const QString &objectname) |
returns the return type of the method of a wrapped c++ object referenced by objectname | |
| QString | getReturnTypeOfWrappedMethod (const QString &typeName, const QString &methodName) |
returns the return type of the method methodName of a wrapped c++ type referenced by typeName | |
Calling Python Objects | |
| QVariant | call (PyObject *object, const QString &callable, const QVariantList &args=QVariantList(), const QVariantMap &kwargs=QVariantMap()) |
call the given python callable in the scope of object, returns the result converted to a QVariant | |
| QVariant | call (PyObject *callable, const QVariantList &args=QVariantList(), const QVariantMap &kwargs=QVariantMap()) |
| call the given python object, returns the result converted to a QVariant | |
| PyObject * | callAndReturnPyObject (PyObject *callable, const QVariantList &args=QVariantList(), const QVariantMap &kwargs=QVariantMap()) |
| call the given python object, returns the result as new PyObject | |
Decorations, Constructors, Wrappers... | |
| void | addInstanceDecorators (QObject *o) |
| void | addClassDecorators (QObject *o) |
| void | addDecorators (QObject *o) |
| this will add the object both as class and instance decorator (ownership is passed to PythonQt) | |
| void | addWrapperFactory (PythonQtCppWrapperFactory *factory) |
| add the given factory to PythonQt (ownership stays with caller) | |
| void | addWrapperFactory (PythonQtForeignWrapperFactory *factory) |
| add the given factory to PythonQt (ownership stays with caller) | |
| void | removeWrapperFactory (PythonQtCppWrapperFactory *factory) |
| remove the wrapper factory | |
| void | removeWrapperFactory (PythonQtForeignWrapperFactory *factory) |
| remove the wrapper factory | |
Singleton Initialization | |
| enum | ObjectType { + Class +, Function +, Variable +, Module +, + Anything +, CallOverloads + + } |
| defines the object types for introspection More... | |
| static void | init (int flags=IgnoreSiteModule|RedirectStdOut, const QByteArray &pythonQtModuleName=QByteArray()) |
| static void | cleanup () |
| cleanup of the singleton | |
| static PythonQt * | self () |
| get the singleton instance | |
Other Stuff | |
| static PythonQtPrivate * | priv () |
| get access to internal data (should not be used on the public API, but is used by some C functions) | |
| static void | qObjectNoLongerWrappedCB (QObject *o) |
| call the callback if it is set | |
| static QString | qObjectMissingAttributeCallback (QObject *o, const QString &attribute) |
| call the callback if it is set | |
| static void | setEnableThreadSupport (bool flag) |
| void | clearNotFoundCachedMembers () |
| bool | handleError (bool printStack=true) |
| bool | hadError () const |
| return true if handleError() has been called and an error occurred. | |
| void | clearError () |
| void | setSystemExitExceptionHandlerEnabled (bool value) |
| bool | systemExitExceptionHandlerEnabled () const |
| void | setQObjectWrappedCallback (PythonQtQObjectWrappedCB *cb) |
| set a callback that is called when a QObject with parent == NULL is wrapped by PythonQt | |
| void | setQObjectNoLongerWrappedCallback (PythonQtQObjectNoLongerWrappedCB *cb) |
| set a callback that is called when a QObject with parent == NULL is no longer wrapped by PythonQt | |
| void | setQObjectMissingAttributeCallback (PythonQtQObjectMissingAttributeCB *cb) |
| set a callback that is called when a QObject does not have a specific attribute. | |
| PyObject * | helpCalled (PythonQtClassInfo *info) |
| called by internal help methods | |
| PythonQtObjectPtr | lookupObject (PyObject *module, const QString &name) |
| void | setProfilingCallback (ProfilingCB *cb) |
| sets a callback that is called before and after function calls for profiling | |
| void | pythonStdOut (const QString &str) |
| emitted when python outputs something to stdout (and redirection is turned on) | |
| void | pythonStdErr (const QString &str) |
| emitted when python outputs something to stderr (and redirection is turned on) | |
| void | pythonHelpRequest (const QByteArray &cppClassName) |
emitted when help() is called on a PythonQt object and ExternalHelp is enabled | |
| void | systemExitExceptionRaised (int exitCode) |
Custom Importer | |
| static PythonQtImportFileInterface * | importInterface () |
| get access to the file importer (if set) | |
| void | setImporter (PythonQtImportFileInterface *importInterface) |
| void | installDefaultImporter () |
| void | setImporterIgnorePaths (const QStringList &paths) |
| set paths that the importer should ignore | |
| const QStringList & | getImporterIgnorePaths () |
| get paths that the importer should ignore | |
The main interface to the Python Qt binding, realized as a singleton.
+Use PythonQt::init() to initialize the singleton and PythonQt::self() to access it. While there can be only one PythonQt instance, you can have any number of Python context to do scripting in. One possibility is to use createModuleFromFile(), createModuleFromScript() or createUniqueModule() to get a context that is separated from the other contexts. Alternatively you can use Python dicts as contexts for script evaluation, but you will need to populate the dict with the builtins instance to have all Pythons available when running code in the scope of a dict.
+ +Definition at line 178 of file PythonQt.h.
+| typedef void PythonQt::ProfilingCB(ProfilingCallbackState state, const char *className, const char *methodName, PyObject *args) | +
callback for profiling. className and methodName are only passed when state == Enter, otherwise they are NULL.
+ +Definition at line 234 of file PythonQt.h.
+ +| enum PythonQt::InitFlags | +
flags that can be passed to PythonQt::init()
+| Enumerator | |
|---|---|
| RedirectStdOut | < sets if the std out/err is redirected to pythonStdOut() and pythonStdErr() signals + |
| IgnoreSiteModule | < sets if Python should ignore the site module + |
| ExternalHelp | < sets if help() calls on PythonQt modules are forwarded to the pythonHelpRequest() signal + |
| PythonAlreadyInitialized | < sets that PythonQt should not can PyInitialize, since it is already done + |
Definition at line 186 of file PythonQt.h.
+| enum PythonQt::ObjectType | +
defines the object types for introspection
+| Enumerator | |
|---|---|
| Class | |
| Function | |
| Variable | |
| Module | |
| Anything | |
| CallOverloads | |
Definition at line 254 of file PythonQt.h.
+| enum PythonQt::ProfilingCallbackState | +
enum for profiling callback
+| Enumerator | |
|---|---|
| Enter | |
| Leave | |
Definition at line 230 of file PythonQt.h.
+| enum PythonQt::TypeSlots | +
flags that tell PythonQt which operators to expect on the registered type
+Definition at line 194 of file PythonQt.h.
+| void PythonQt::addClassDecorators | +( | +QObject * | +o | ) | ++ |
add an object whose slots will be used as decorator slots for class objects (ownership is passed to PythonQt)
+The slots need to follow the following convention:
This will add:
| void PythonQt::addDecorators | +( | +QObject * | +o | ) | ++ |
this will add the object both as class and instance decorator (ownership is passed to PythonQt)
+ +| void PythonQt::addInstanceDecorators | +( | +QObject * | +o | ) | ++ |
add an object whose slots will be used as decorator slots for other QObjects or CPP classes. The slots need to follow the convention that the first argument is a pointer to the wrapped object. (ownership is passed to PythonQt)
+Example:
+A slot with the signature
+will extend QWidget instances (and derived classes) with a "bool doSomething(int a)" slot that will be called with the concrete instance as first argument. So in Python you can now e.g. call
+without QWidget really having this method. This allows to easily make normal methods of Qt classes callable by forwarding them with such decorator slots or to make CPP classes (which are not derived from QObject) callable from Python.
+ +| void PythonQt::addObject | +( | +PyObject * | +object, | +
| + | + | const QString & | +name, | +
| + | + | QObject * | +qObject | +
| + | ) | ++ |
add the given qObject to the python object as a variable with name (it can be removed via clearVariable)
| bool PythonQt::addParentClass | +( | +const char * | +typeName, | +
| + | + | const char * | +parentTypeName, | +
| + | + | int | +upcastingOffset = 0 |
+
| + | ) | ++ |
add a parent class relation to the given typeName, the upcastingOffset is needed for multiple inheritance and can be calculated using PythonQtUpcastingOffset<type,parentType>(), which also verifies that type is really derived from parentType. Returns false if the typeName was not yet registered.
| void PythonQt::addPolymorphicHandler | +( | +const char * | +typeName, | +
| + | + | PythonQtPolymorphicHandlerCB * | +cb | +
| + | ) | ++ |
add a handler for polymorphic downcasting
+ +| bool PythonQt::addSignalHandler | +( | +QObject * | +obj, | +
| + | + | const char * | +signal, | +
| + | + | PyObject * | +module, | +
| + | + | const QString & | +objectname | +
| + | ) | ++ |
add a signal handler to the given signal of obj and connect it to a callable objectname in module
| bool PythonQt::addSignalHandler | +( | +QObject * | +obj, | +
| + | + | const char * | +signal, | +
| + | + | PyObject * | +receiver | +
| + | ) | ++ |
add a signal handler to the given signal of obj and connect it to a callable receiver
prepend a path to sys.path to allow importing from it
+ +| void PythonQt::addVariable | +( | +PyObject * | +object, | +
| + | + | const QString & | +name, | +
| + | + | const QVariant & | +v | +
| + | ) | ++ |
add the given variable to the object
+ +| void PythonQt::addWrapperFactory | +( | +PythonQtCppWrapperFactory * | +factory | ) | ++ |
add the given factory to PythonQt (ownership stays with caller)
+ +| void PythonQt::addWrapperFactory | +( | +PythonQtForeignWrapperFactory * | +factory | ) | ++ |
add the given factory to PythonQt (ownership stays with caller)
+ +| QVariant PythonQt::call | +( | +PyObject * | +callable, | +
| + | + | const QVariantList & | +args = QVariantList(), |
+
| + | + | const QVariantMap & | +kwargs = QVariantMap() |
+
| + | ) | ++ |
call the given python object, returns the result converted to a QVariant
+ +| QVariant PythonQt::call | +( | +PyObject * | +object, | +
| + | + | const QString & | +callable, | +
| + | + | const QVariantList & | +args = QVariantList(), |
+
| + | + | const QVariantMap & | +kwargs = QVariantMap() |
+
| + | ) | ++ |
call the given python callable in the scope of object, returns the result converted to a QVariant
| PyObject * PythonQt::callAndReturnPyObject | +( | +PyObject * | +callable, | +
| + | + | const QVariantList & | +args = QVariantList(), |
+
| + | + | const QVariantMap & | +kwargs = QVariantMap() |
+
| + | ) | ++ |
call the given python object, returns the result as new PyObject
+ +cleanup of the singleton
+ +| void PythonQt::clearError | +( | +) | ++ |
reset error flag. After calling this, hadError() will return false.
| void PythonQt::clearNotFoundCachedMembers | +( | +) | ++ |
clear all NotFound entries on all class infos, to ensure that newly loaded wrappers can add methods even when the object was wrapped by PythonQt before the wrapper was loaded
+ +| PythonQtObjectPtr PythonQt::createModuleFromFile | +( | +const QString & | +name, | +
| + | + | const QString & | +filename | +
| + | ) | ++ |
creates the new module name and evaluates the given file in the context of that module If the script is empty, the module contains no initial code. You can use evalScript/evalCode to add code to a module later on. The user needs to make sure that the name is unique in the python module dictionary.
| PythonQtObjectPtr PythonQt::createModuleFromScript | +( | +const QString & | +name, | +
| + | + | const QString & | +script = QString() |
+
| + | ) | ++ |
creates the new module name and evaluates the given script in the context of that module. If the script is empty, the module contains no initial code. You can use evalScript/evalCode to add code to a module later on. The user needs to make sure that the name is unique in the python module dictionary.
| PythonQtObjectPtr PythonQt::createUniqueModule | +( | +) | ++ |
create a uniquely named module, you can use evalFile or evalScript to populate the module with script code
+ +| QVariant PythonQt::evalCode | +( | +PyObject * | +object, | +
| + | + | PyObject * | +pycode | +
| + | ) | ++ |
evaluates the given code and returns the result value (use Py_Compile etc. to create pycode from string) If pycode is NULL, a python error is printed.
+ +| void PythonQt::evalFile | +( | +PyObject * | +object, | +
| + | + | const QString & | +filename | +
| + | ) | ++ |
evaluates the given script code from file
+ +| QVariant PythonQt::evalScript | +( | +const QString & | +script, | +
| + | + | PyObject * | +globals, | +
| + | + | PyObject * | +locals, | +
| + | + | int | +start | +
| + | ) | ++ |
evaluates the given script code in context of given globals and locals and returns the result value
+ +| QVariant PythonQt::evalScript | +( | +PyObject * | +object, | +
| + | + | const QString & | +script, | +
| + | + | int | +start = Py_file_input |
+
| + | ) | ++ |
evaluates the given script code and returns the result value
+ +| const QStringList & PythonQt::getImporterIgnorePaths | +( | +) | ++ |
get paths that the importer should ignore
+ +| PythonQtObjectPtr PythonQt::getMainModule | +( | +) | ++ |
get the main module of python
+ +| QVariant PythonQt::getNativeVariable | +( | +PyObject * | +object, | +
| + | + | const QString & | +name | +
| + | ) | ++ |
get the variable with the name of the object as QVariant of type PythonQtObjectPtr, returns an invalid QVariant on error
| QString PythonQt::getReturnTypeOfWrappedMethod | +( | +const QString & | +typeName, | +
| + | + | const QString & | +methodName | +
| + | ) | ++ |
returns the return type of the method methodName of a wrapped c++ type referenced by typeName
| QString PythonQt::getReturnTypeOfWrappedMethod | +( | +PyObject * | +module, | +
| + | + | const QString & | +objectname | +
| + | ) | ++ |
returns the return type of the method of a wrapped c++ object referenced by objectname
| QVariant PythonQt::getVariable | +( | +PyObject * | +object, | +
| + | + | const QString & | +name | +
| + | ) | ++ |
get the variable with the name of the object, returns an invalid QVariant on error
| bool PythonQt::hadError | +( | +) | +const | +
return true if handleError() has been called and an error occurred.
+ +handle a python error, call this when a python function fails. If no error occurred, it returns false. The error is currently just output to the python stderr, future version might implement better trace printing
+ +| PyObject * PythonQt::helpCalled | +( | +PythonQtClassInfo * | +info | ) | ++ |
called by internal help methods
+ +
+
|
+ +static | +
get access to the file importer (if set)
+ +| PythonQtObjectPtr PythonQt::importModule | +( | +const QString & | +name | ) | ++ |
import the given module and return a reference to it (useful to import e.g. "sys" and call something on it) If a module is already imported, this returns the already imported module.
+ +
+
|
+ +static | +
initialize the python qt binding (flags are a or combination of PythonQt::InitFlags), if pythonQtModuleName is given it defines the name of the python module that PythonQt will add, otherwise "PythonQt" is used. This can be used to e.g. pass in PySide or PyQt4 to make it more compatible.
+
|
+ +inline | +
this installs the default QFile importer (which effectively does a setImporter(NULL)) (without calling setImporter or installDefaultImporter at least once, the default python import mechanism is in place) the default importer allows to import files from anywhere QFile can read from, including the Qt resource system using ":". Keep in mind that you need to extend "sys.path" with ":" to be able to import from the Qt resources.
+ +Definition at line 554 of file PythonQt.h.
+| QStringList PythonQt::introspection | +( | +PyObject * | +object, | +
| + | + | const QString & | +objectname, | +
| + | + | ObjectType | +type | +
| + | ) | ++ |
read vars etc. in scope of an object, optional looking inside of an object objectname
| QStringList PythonQt::introspectObject | +( | +PyObject * | +object, | +
| + | + | ObjectType | +type | +
| + | ) | ++ |
read vars etc. in scope of the given object
| QStringList PythonQt::introspectType | +( | +const QString & | +typeName, | +
| + | + | ObjectType | +type | +
| + | ) | ++ |
read vars etc. in scope of the type object called typename. First the typename of the form module.type is split into module and type. Then the module is looked up in sys.modules. If the module or type is not found there, then the type is looked up in the builtin module.
| PythonQtObjectPtr PythonQt::lookupCallable | +( | +PyObject * | +object, | +
| + | + | const QString & | +name | +
| + | ) | ++ |
returns the found callable object or NULL
| PythonQtObjectPtr PythonQt::lookupObject | +( | +PyObject * | +module, | +
| + | + | const QString & | +name | +
| + | ) | ++ |
returns the found object or NULL
| void PythonQt::overwriteSysPath | +( | +const QStringList & | +paths | ) | ++ |
overwrite the python sys path (call this directly after PythonQt::init() if you want to change the std python sys path)
+ +| PythonQtObjectPtr PythonQt::parseFile | +( | +const QString & | +filename | ) | ++ |
parses the given file (using PythonQt's own import mechanism) and returns the python code object, this can then be used to call evalCode()
+ +| PythonQtObjectPtr PythonQt::parseFileWithPythonLoaders | +( | +const QString & | +filename | ) | ++ |
Parses the given file and returns the python code object, this can then be used to call evalCode() It uses Python's importlib machinery to load the file's code and supports source and sourceless loading and generation of cache files.
+ +
+
|
+ +inlinestatic | +
get access to internal data (should not be used on the public API, but is used by some C functions)
+ +Definition at line 572 of file PythonQt.h.
+Referenced by PythonQtConvertListOfKnownClassToPythonList(), and PythonQtConvertPythonListToListOfKnownClass().
+ +
+
|
+ +signal | +
emitted when help() is called on a PythonQt object and ExternalHelp is enabled
emitted when python outputs something to stderr (and redirection is turned on)
+ +emitted when python outputs something to stdout (and redirection is turned on)
+ +
+
|
+ +static | +
call the callback if it is set
+ +
+
|
+ +static | +
call the callback if it is set
+ +| bool PythonQt::redirectStdOutCallbackEnabled | +( | +) | +const | +
return true if std out/err redirection is enabled.
+ +| void PythonQt::registerClass | +( | +const QMetaObject * | +metaobject, | +
| + | + | const char * | +package = nullptr, |
+
| + | + | PythonQtQObjectCreatorFunctionCB * | +wrapperCreator = nullptr, |
+
| + | + | PythonQtShellSetInstanceWrapperCB * | +shell = nullptr |
+
| + | ) | ++ |
registers a QObject derived class to PythonQt (this is implicitly called by addObject as well)
+ +| void PythonQt::registerCPPClass | +( | +const char * | +typeName, | +
| + | + | const char * | +parentTypeName = nullptr, |
+
| + | + | const char * | +package = nullptr, |
+
| + | + | PythonQtQObjectCreatorFunctionCB * | +wrapperCreator = nullptr, |
+
| + | + | PythonQtShellSetInstanceWrapperCB * | +shell = nullptr |
+
| + | ) | ++ |
add a wrapper object for the given QMetaType typeName, also does an addClassDecorators() to add constructors for variants (ownership of wrapper is passed to PythonQt)
+Make sure that you have done a qRegisterMetaType first, if typeName is a user type!
+This will add a wrapper object that is used to make calls to the given classname typeName. All slots that take a pointer to typeName as the first argument will be callable from Python on a variant object that contains such a type.
| void PythonQt::registerQObjectClassNames | +( | +const QStringList & | +names | ) | ++ |
as an alternative to registerClass, you can tell PythonQt the names of QObject derived classes and it will register the classes when it first sees a pointer to such a derived class
+ +| bool PythonQt::removeSignalHandler | +( | +QObject * | +obj, | +
| + | + | const char * | +signal, | +
| + | + | PyObject * | +module, | +
| + | + | const QString & | +objectname | +
| + | ) | ++ |
remove a signal handler from the given signal of obj
| bool PythonQt::removeSignalHandler | +( | +QObject * | +obj, | +
| + | + | const char * | +signal, | +
| + | + | PyObject * | +receiver | +
| + | ) | ++ |
remove a signal handler from the given signal of obj
| void PythonQt::removeSignalHandlers | +( | +) | ++ |
globally removes all signal handlers (connections between QObjects and Python).
+ +| void PythonQt::removeVariable | +( | +PyObject * | +module, | +
| + | + | const QString & | +name | +
| + | ) | ++ |
remove the given variable
+ +| void PythonQt::removeWrapperFactory | +( | +PythonQtCppWrapperFactory * | +factory | ) | ++ |
remove the wrapper factory
+ +| void PythonQt::removeWrapperFactory | +( | +PythonQtForeignWrapperFactory * | +factory | ) | ++ |
remove the wrapper factory
+ +get the singleton instance
+ +Enable GIL and thread state handling (turned off by default). If you want to use Python threading, you have to call this with true early in your main thread, before you launch any threads in Python. It can be called before or after PythonQt::init().
+ +| void PythonQt::setImporter | +( | +PythonQtImportFileInterface * | +importInterface | ) | ++ |
replace the internal import implementation and use the supplied interface to load files (both py and pyc files) (this method should be called directly after initialization of init() and before calling overwriteSysPath(). On the first call to this method, it will install a generic PythonQt importer in Pythons "path_hooks". This is not reversible, so even setting setImporter(NULL) afterwards will keep the custom PythonQt importer with a QFile default import interface. Subsequent python import calls will make use of the passed importInterface which forwards all import calls to the given importInterface. Passing NULL will install a default QFile importer. (importInterface ownership stays with caller)
| void PythonQt::setImporterIgnorePaths | +( | +const QStringList & | +paths | ) | ++ |
set paths that the importer should ignore
+ +| void PythonQt::setModuleImportPath | +( | +PyObject * | +module, | +
| + | + | const QStringList & | +paths | +
| + | ) | ++ |
sets the path list of a module to the given list (important for local imports)
+ +| void PythonQt::setProfilingCallback | +( | +ProfilingCB * | +cb | ) | ++ |
sets a callback that is called before and after function calls for profiling
+ +| void PythonQt::setQObjectMissingAttributeCallback | +( | +PythonQtQObjectMissingAttributeCB * | +cb | ) | ++ |
set a callback that is called when a QObject does not have a specific attribute.
+ +| void PythonQt::setQObjectNoLongerWrappedCallback | +( | +PythonQtQObjectNoLongerWrappedCB * | +cb | ) | ++ |
set a callback that is called when a QObject with parent == NULL is no longer wrapped by PythonQt
+ +| void PythonQt::setQObjectWrappedCallback | +( | +PythonQtQObjectWrappedCB * | +cb | ) | ++ |
set a callback that is called when a QObject with parent == NULL is wrapped by PythonQt
+ +| void PythonQt::setRedirectStdInCallback | +( | +PythonQtInputChangedCB * | +callback, | +
| + | + | void * | +callbackData = nullptr |
+
| + | ) | ++ |
Overwrite default handling of stdin using a custom callback. It internally backup the original 'sys.stdin' into 'sys.pythonqt_original_stdin'
+ +Enable or disable stdin custom callback. It resets 'sys.stdin' using either 'sys.pythonqt_stdin' or 'sys.pythonqt_original_stdin'
+ +enable or disable std out/err redirection to pythonStdOut() and pythonStdErr() signals.
+ +if set to true, the systemExitExceptionRaised signal will be emitted if exception SystemExit is caught
| bool PythonQt::systemExitExceptionHandlerEnabled | +( | +) | +const | +
return true if SystemExit exception is handled by PythonQt
+ +emitted when both custom SystemExit exception handler is enabled and a SystemExit exception is raised.
+ +|
+ PythonQt
+
+ |
+
This is the complete list of members for PythonQtArgumentFrame, including all inherited members.
+| cleanupFreeList() | PythonQtArgumentFrame | static |
| deleteFrame(PythonQtArgumentFrame *frame) | PythonQtArgumentFrame | static |
| establishPersistentPtr(void *alreadyAllocatedPtr, const Class &value) | PythonQtArgumentFrame | inline |
| establishPersistentViewPtr(void *alreadyAllocatedPtr, const Class &value) | PythonQtArgumentFrame | inline |
| newFrame() | PythonQtArgumentFrame | static |
| nextPODPtr() | PythonQtArgumentFrame | |
| nextVariantPtr() | PythonQtArgumentFrame | |
| reset() | PythonQtArgumentFrame |
|
+ PythonQt
+
+ |
+
Stores C++ arguments for a qt_metacall (which are created when converting data from Python to C++) + More...
+ +#include <PythonQtMisc.h>
+Public Member Functions | |
| void | reset () |
| Resets the pod and variant argument lists to empty lists. | |
| QVariant * | nextVariantPtr () |
| Get next pointer to a variant. | |
| quint64 * | nextPODPtr () |
| Get next pointer to a POD. | |
| template<typename Class > | |
| void * | establishPersistentPtr (void *alreadyAllocatedPtr, const Class &value) |
| template<typename Class , typename ViewClass > | |
| void * | establishPersistentViewPtr (void *alreadyAllocatedPtr, const Class &value) |
+Static Public Member Functions | |
| static PythonQtArgumentFrame * | newFrame () |
| Create a new (empty) frame (which is typically reused from a freelist) | |
| static void | deleteFrame (PythonQtArgumentFrame *frame) |
| Frees the frame (resetting it and putting it back to the freelist) | |
| static void | cleanupFreeList () |
| Frees all PythonQtArgumentFrame frames that are stored. | |
Stores C++ arguments for a qt_metacall (which are created when converting data from Python to C++)
+ +Definition at line 104 of file PythonQtMisc.h.
+Frees all PythonQtArgumentFrame frames that are stored.
+ +
+
|
+ +static | +
Frees the frame (resetting it and putting it back to the freelist)
+ +
+
|
+ +inline | +
Definition at line 125 of file PythonQtMisc.h.
+References nextVariantPtr(), and PythonQtConvertPairToPython().
+ +
+
|
+ +inline | +
Definition at line 138 of file PythonQtMisc.h.
+References nextVariantPtr(), and PythonQtConvertPairToPython().
+ +
+
|
+ +static | +
Create a new (empty) frame (which is typically reused from a freelist)
+ +| quint64 * PythonQtArgumentFrame::nextPODPtr | +( | +) | ++ |
Get next pointer to a POD.
+ +| QVariant * PythonQtArgumentFrame::nextVariantPtr | +( | +) | ++ |
Get next pointer to a variant.
+ +Referenced by establishPersistentPtr(), and establishPersistentViewPtr().
+ +| void PythonQtArgumentFrame::reset | +( | +) | ++ |
Resets the pod and variant argument lists to empty lists.
+ +|
+ PythonQt
+
+ |
+
This is the complete list of members for PythonQtClassInfo, including all inherited members.
+|
+ PythonQt
+
+ |
+
a class that stores all required information about a Qt object (and an optional associated C++ class name) + More...
+ +#include <PythonQtClassInfo.h>
+Classes | |
| struct | ParentClassInfo |
| store information about parent classes More... | |
+Public Member Functions | |
| PythonQtClassInfo () | |
| ~PythonQtClassInfo () | |
| void | setupQObject (const QMetaObject *meta) |
| setup as a QObject, taking the meta object as meta information about the QObject | |
| void | setupCPPObject (const QByteArray &classname) |
| setup as a CPP (non-QObject), taking the classname | |
| void | setTypeSlots (int typeSlots) |
| set the type capabilities | |
| int | typeSlots () const |
| get the type capabilities | |
| PythonQtMemberInfo | member (const char *member) |
| get the Python method definition for a given slot name (without return type and signature) | |
| PythonQtSlotInfo * | constructors () |
| get access to the constructor slot (which may be overloaded if there are multiple constructors) | |
| PythonQtSlotInfo * | destructor () |
| get access to the destructor slot | |
| void | addConstructor (PythonQtSlotInfo *info) |
| add a constructor, ownership is passed to classinfo | |
| void | setDestructor (PythonQtSlotInfo *info) |
| set a destructor, ownership is passed to classinfo | |
| void | addDecoratorSlot (PythonQtSlotInfo *info) |
| add a decorator slot, ownership is passed to classinfo | |
| void | addNestedClass (PythonQtClassInfo *info) |
| add a nested class, so that it can be shown as outer class member | |
| const QByteArray & | className () const |
| get the classname (either of the QObject or of the wrapped CPP object) | |
| QByteArray | unscopedClassName () const |
| get the unscoped classname (without ParentClass::) for nested classes | |
| bool | isQObject () |
| returns if the QObject | |
| bool | isCPPWrapper () |
| returns if the class is a CPP wrapper | |
| const QMetaObject * | metaObject () |
| get the meta object | |
| void | setMetaObject (const QMetaObject *meta) |
| set the meta object, this will reset the caching | |
| bool | inherits (const char *classname) |
| returns if this class inherits from the given classname | |
| bool | inherits (PythonQtClassInfo *info) |
| returns if this class inherits from the given classinfo | |
| void * | castTo (void *ptr, const char *classname) |
| QString | help () |
| get help string for the metaobject | |
| QStringList | propertyList () |
| get list of all properties (on QObjects only, otherwise the list is empty) | |
| QStringList | memberList () |
| get list of all members (excluding properties, which can be listed with propertyList()) | |
| int | metaTypeId () |
| get the meta type id of this class (only valid for isCPPWrapper() == true) | |
| void | setDecoratorProvider (PythonQtQObjectCreatorFunctionCB *cb) |
| set an additional decorator provider that offers additional decorator slots for this class | |
| QObject * | decorator () |
| get the decorator qobject instance | |
| void | addParentClass (const ParentClassInfo &info) |
| add the parent class info of a CPP object | |
| void | setPythonQtClassWrapper (PyObject *obj) |
| set the associated PythonQtClassWrapper (which handles instance creation of this type) | |
| PyObject * | pythonQtClassWrapper () |
| get the associated PythonQtClassWrapper (which handles instance creation of this type) | |
| void | setShellSetInstanceWrapperCB (PythonQtShellSetInstanceWrapperCB *cb) |
| set the shell set instance wrapper cb | |
| PythonQtShellSetInstanceWrapperCB * | shellSetInstanceWrapperCB () |
| get the shell set instance wrapper cb | |
| void | addPolymorphicHandler (PythonQtPolymorphicHandlerCB *cb) |
| add a handler for polymorphic downcasting | |
| void * | castDownIfPossible (void *ptr, PythonQtClassInfo **resultClassInfo) |
| cast the pointer down in the class hierarchy if a polymorphic handler allows to do that | |
| void | clearNotFoundCachedMembers () |
| clear all members that where cached as "NotFound" | |
| const QList< PythonQtClassInfo * > & | nestedClasses () |
| get nested classes | |
| PyObject * | copyObject (void *cppObject) |
| PythonQtSlotInfo * | getCopyConstructor () |
| Get the copy constructor for this class. | |
| void | setReferenceCounting (PythonQtVoidPtrCB *refCB, PythonQtVoidPtrCB *unrefCB) |
| Sets reference counting callbacks for this class and all its subclasses. | |
| PythonQtVoidPtrCB * | referenceCountingRefCB () |
| Returns the ref counting CB, if there is any. | |
| PythonQtVoidPtrCB * | referenceCountingUnrefCB () |
| Returns the unref counting CB, if there is any. | |
| PyObject * | getPythonTypeForProperty (const QString &name) |
| PythonQtClassInfo * | getClassInfoForProperty (const QString &name) |
| Returns the class info for given property, if available. | |
| bool | supportsRichCompare () |
+Static Public Member Functions | |
| static PyObject * | findEnumWrapper (const QByteArray &name, PythonQtClassInfo *localScope, bool *isLocalEnum=nullptr) |
| returns if the localScope has an enum of that type name or if the enum contains a :: scope, if that class contails the enum | |
| static QByteArray | escapeReservedNames (const QByteArray &name) |
| static void | addGlobalNamespaceWrapper (PythonQtClassInfo *namespaceWrapper) |
| Add a wrapper that contains global enums. | |
| static void | clearGlobalNamespaceWrappers () |
a class that stores all required information about a Qt object (and an optional associated C++ class name)
+for fast lookup of slots when calling the object from Python
+ +Definition at line 88 of file PythonQtClassInfo.h.
+| PythonQtClassInfo::PythonQtClassInfo | +( | +) | ++ |
| PythonQtClassInfo::~PythonQtClassInfo | +( | +) | ++ |
| void PythonQtClassInfo::addConstructor | +( | +PythonQtSlotInfo * | +info | ) | ++ |
add a constructor, ownership is passed to classinfo
+ +| void PythonQtClassInfo::addDecoratorSlot | +( | +PythonQtSlotInfo * | +info | ) | ++ |
add a decorator slot, ownership is passed to classinfo
+ +
+
|
+ +static | +
Add a wrapper that contains global enums.
+ +| void PythonQtClassInfo::addNestedClass | +( | +PythonQtClassInfo * | +info | ) | ++ |
add a nested class, so that it can be shown as outer class member
+ +
+
|
+ +inline | +
add the parent class info of a CPP object
+ +Definition at line 185 of file PythonQtClassInfo.h.
+
+
|
+ +inline | +
add a handler for polymorphic downcasting
+ +Definition at line 200 of file PythonQtClassInfo.h.
+| void * PythonQtClassInfo::castDownIfPossible | +( | +void * | +ptr, | +
| + | + | PythonQtClassInfo ** | +resultClassInfo | +
| + | ) | ++ |
cast the pointer down in the class hierarchy if a polymorphic handler allows to do that
+ +| void * PythonQtClassInfo::castTo | +( | +void * | +ptr, | +
| + | + | const char * | +classname | +
| + | ) | ++ |
casts the given ptr to an object of type classname, returns the new pointer which might be different to ptr due to C++ multiple inheritance (if the cast is not possible or if ptr is NULL, NULL is returned)
| const QByteArray & PythonQtClassInfo::className | +( | +) | +const | +
get the classname (either of the QObject or of the wrapped CPP object)
+ +Referenced by PythonQtConvertListOfKnownClassToPythonList(), and PythonQtConvertPythonListToListOfKnownClass().
+ +
+
|
+ +static | +
Clear the registry of global-namespace wrappers (used for top-level enums). Must be called before destroying PythonQtClassInfo instances and before a fresh init.
+ +| void PythonQtClassInfo::clearNotFoundCachedMembers | +( | +) | ++ |
clear all members that where cached as "NotFound"
+ +| PythonQtSlotInfo * PythonQtClassInfo::constructors | +( | +) | ++ |
get access to the constructor slot (which may be overloaded if there are multiple constructors)
+ +Create a copy of the given C++ object (which is known to be of a derived class), wrapped by Python and owned by PythonQt. This will downcast if possible and return a copy of the down casted object. This either requires a copy constructor on the class or it needs to be registered as a meta type.
+ +| QObject * PythonQtClassInfo::decorator | +( | +) | ++ |
get the decorator qobject instance
+ +| PythonQtSlotInfo * PythonQtClassInfo::destructor | +( | +) | ++ |
get access to the destructor slot
+ +
+
|
+ +static | +
Sometimes enum values use a reserved name in Python. In this case replace it with something that is not reserved
+ +
+
|
+ +static | +
returns if the localScope has an enum of that type name or if the enum contains a :: scope, if that class contails the enum
+ +| PythonQtClassInfo * PythonQtClassInfo::getClassInfoForProperty | +( | +const QString & | +name | ) | ++ |
Returns the class info for given property, if available.
+ +| PythonQtSlotInfo * PythonQtClassInfo::getCopyConstructor | +( | +) | ++ |
Get the copy constructor for this class.
+ +Returns the Python type object for a given property. (the returned object does not get an extra reference count)
+ +| QString PythonQtClassInfo::help | +( | +) | ++ |
get help string for the metaobject
+ +returns if this class inherits from the given classname
+ +| bool PythonQtClassInfo::inherits | +( | +PythonQtClassInfo * | +info | ) | ++ |
returns if this class inherits from the given classinfo
+ +
+
|
+ +inline | +
returns if the class is a CPP wrapper
+ +Definition at line 147 of file PythonQtClassInfo.h.
+
+
|
+ +inline | +
returns if the QObject
+ +Definition at line 144 of file PythonQtClassInfo.h.
+| PythonQtMemberInfo PythonQtClassInfo::member | +( | +const char * | +member | ) | ++ |
get the Python method definition for a given slot name (without return type and signature)
+ +| QStringList PythonQtClassInfo::memberList | +( | +) | ++ |
get list of all members (excluding properties, which can be listed with propertyList())
+ +
+
|
+ +inline | +
get the meta object
+ +Definition at line 150 of file PythonQtClassInfo.h.
+
+
|
+ +inline | +
get the meta type id of this class (only valid for isCPPWrapper() == true)
+ +Definition at line 176 of file PythonQtClassInfo.h.
+
+
|
+ +inline | +
get nested classes
+ +Definition at line 212 of file PythonQtClassInfo.h.
+| QStringList PythonQtClassInfo::propertyList | +( | +) | ++ |
get list of all properties (on QObjects only, otherwise the list is empty)
+ +
+
|
+ +inline | +
get the associated PythonQtClassWrapper (which handles instance creation of this type)
+ +Definition at line 191 of file PythonQtClassInfo.h.
+| PythonQtVoidPtrCB * PythonQtClassInfo::referenceCountingRefCB | +( | +) | ++ |
Returns the ref counting CB, if there is any.
+ +| PythonQtVoidPtrCB * PythonQtClassInfo::referenceCountingUnrefCB | +( | +) | ++ |
Returns the unref counting CB, if there is any.
+ +| void PythonQtClassInfo::setDecoratorProvider | +( | +PythonQtQObjectCreatorFunctionCB * | +cb | ) | ++ |
set an additional decorator provider that offers additional decorator slots for this class
+ +| void PythonQtClassInfo::setDestructor | +( | +PythonQtSlotInfo * | +info | ) | ++ |
set a destructor, ownership is passed to classinfo
+ +| void PythonQtClassInfo::setMetaObject | +( | +const QMetaObject * | +meta | ) | ++ |
set the meta object, this will reset the caching
+ +
+
|
+ +inline | +
set the associated PythonQtClassWrapper (which handles instance creation of this type)
+ +Definition at line 188 of file PythonQtClassInfo.h.
+| void PythonQtClassInfo::setReferenceCounting | +( | +PythonQtVoidPtrCB * | +refCB, | +
| + | + | PythonQtVoidPtrCB * | +unrefCB | +
| + | ) | ++ |
Sets reference counting callbacks for this class and all its subclasses.
+ +
+
|
+ +inline | +
set the shell set instance wrapper cb
+ +Definition at line 194 of file PythonQtClassInfo.h.
+set the type capabilities
+ +Definition at line 112 of file PythonQtClassInfo.h.
+| void PythonQtClassInfo::setupCPPObject | +( | +const QByteArray & | +classname | ) | ++ |
setup as a CPP (non-QObject), taking the classname
+ +| void PythonQtClassInfo::setupQObject | +( | +const QMetaObject * | +meta | ) | ++ |
setup as a QObject, taking the meta object as meta information about the QObject
+ +
+
|
+ +inline | +
get the shell set instance wrapper cb
+ +Definition at line 197 of file PythonQtClassInfo.h.
+| bool PythonQtClassInfo::supportsRichCompare | +( | +) | ++ |
Returns if the class supports rich compare. This tests for eq, ne, lt, le, gt, ge slots and if any of the slots is present it returns true and modifies the _typeSlots with Type_RichCompare. The result is cached internally.
+ +
+
|
+ +inline | +
get the type capabilities
+ +Definition at line 114 of file PythonQtClassInfo.h.
+| QByteArray PythonQtClassInfo::unscopedClassName | +( | +) | +const | +
get the unscoped classname (without ParentClass::) for nested classes
+ +|
+ PythonQt
+
+ |
+
This is the complete list of members for PythonQtConfigAPI, including all inherited members.
+| PythonQtConfigAPI(QObject *parent) | PythonQtConfigAPI | inline |
| setTaskDoneCallback(PyObject *object) | PythonQtConfigAPI | slot |
|
+ PythonQt
+
+ |
+
Some methods to set properties of PythonQt from Python. + More...
+ +#include <PythonQtStdDecorators.h>
+ +Public Slots | |
| void | setTaskDoneCallback (PyObject *object) |
+Public Member Functions | |
| PythonQtConfigAPI (QObject *parent) | |
Some methods to set properties of PythonQt from Python.
+ +Definition at line 225 of file PythonQtStdDecorators.h.
+
+
|
+ +inline | +
Definition at line 229 of file PythonQtStdDecorators.h.
+
+
|
+ +slot | +
Set a callable that is used as the argument for the add_done_callback for the Task/Future created when, e.g., an async function is connected to signal.
+ +|
+ PythonQt
+
+ |
+
This is the complete list of members for PythonQtConv, including all inherited members.
+| _metaTypeToPythonConverters | PythonQtConv | protectedstatic |
| _pythonSequenceToQVariantListCB | PythonQtConv | protectedstatic |
| _pythonToMetaTypeConverters | PythonQtConv | protectedstatic |
| castWrapperTo(PythonQtInstanceWrapper *wrapper, const QByteArray &className, bool &ok) | PythonQtConv | static |
| convertFromPythonQtObjectPtr(const void *inObject, int) | PythonQtConv | static |
| convertFromPythonQtSafeObjectPtr(const void *inObject, int) | PythonQtConv | static |
| convertFromQListOfPythonQtObjectPtr(const void *inObject, int) | PythonQtConv | static |
| convertFromStringRef(const void *inObject, int) | PythonQtConv | static |
| ConvertPythonListToQListOfPointerType(PyObject *obj, QList< void * > *list, const PythonQtMethodInfo::ParameterInfo &info, bool strict) | PythonQtConv | protectedstatic |
| ConvertPythonToQt(const PythonQtMethodInfo::ParameterInfo &info, PyObject *obj, bool strict, PythonQtClassInfo *classInfo, void *alreadyAllocatedCPPObject, PythonQtArgumentFrame *frame=nullptr) | PythonQtConv | static |
| ConvertQListOfPointerTypeToPythonList(QList< void * > *list, const PythonQtMethodInfo::ParameterInfo &info) | PythonQtConv | protectedstatic |
| ConvertQtValueToPython(const PythonQtMethodInfo::ParameterInfo &info, const void *data) | PythonQtConv | static |
| convertQtValueToPythonInternal(int type, const void *data) | PythonQtConv | static |
| convertToPythonQtObjectPtr(PyObject *obj, void *outPtr, int, bool) | PythonQtConv | static |
| convertToPythonQtSafeObjectPtr(PyObject *obj, void *outPtr, int, bool) | PythonQtConv | static |
| convertToQListOfPythonQtObjectPtr(PyObject *obj, void *outList, int, bool) | PythonQtConv | static |
| CPPObjectToString(int type, const void *data) | PythonQtConv | static |
| createCopyFromMetaType(int type, const void *object) | PythonQtConv | static |
| CreateQtReturnValue(const PythonQtMethodInfo::ParameterInfo &info, PythonQtArgumentFrame *frame) | PythonQtConv | static |
| getCPPTypeName(PyObject *type) | PythonQtConv | static |
| GetPyBool(bool val) | PythonQtConv | static |
| handlePythonToQtAutoConversion(int typeId, PyObject *obj, void *alreadyAllocatedCPPObject, PythonQtArgumentFrame *frame) | PythonQtConv | protectedstatic |
| isStringType(PyTypeObject *type) | PythonQtConv | static |
| mapToPython(const Map &m) | PythonQtConv | protectedstatic |
| PyObjGetBool(PyObject *val, bool strict, bool &ok) | PythonQtConv | static |
| PyObjGetBytes(PyObject *val, bool strict, bool &ok) | PythonQtConv | static |
| PyObjGetBytesAllowString(PyObject *val, bool strict, bool &ok) | PythonQtConv | static |
| PyObjGetDouble(PyObject *val, bool strict, bool &ok) | PythonQtConv | static |
| PyObjGetInt(PyObject *val, bool strict, bool &ok) | PythonQtConv | static |
| PyObjGetLongLong(PyObject *val, bool strict, bool &ok) | PythonQtConv | static |
| PyObjGetRepresentation(PyObject *val) | PythonQtConv | static |
| PyObjGetString(PyObject *val) | PythonQtConv | inlinestatic |
| PyObjGetString(PyObject *val, bool strict, bool &ok) | PythonQtConv | static |
| PyObjGetULongLong(PyObject *val, bool strict, bool &ok) | PythonQtConv | static |
| PyObjToQVariant(PyObject *val, int type=-1) | PythonQtConv | static |
| PyObjToStringList(PyObject *val, bool strict, bool &ok) | PythonQtConv | static |
| pythonToMapVariant(PyObject *val, QVariant &result) | PythonQtConv | protectedstatic |
| QStringListToPyList(const QStringList &list) | PythonQtConv | static |
| QStringListToPyObject(const QStringList &list) | PythonQtConv | static |
| QStringToPyObject(const QString &str) | PythonQtConv | static |
| QVariantHashToPyObject(const QVariantHash &m) | PythonQtConv | static |
| QVariantListToPyObject(const QVariantList &l) | PythonQtConv | static |
| QVariantMapToPyObject(const QVariantMap &m) | PythonQtConv | static |
| QVariantToPyObject(const QVariant &v) | PythonQtConv | static |
| registerMetaTypeToPythonConverter(int metaTypeId, PythonQtConvertMetaTypeToPythonCB *cb) | PythonQtConv | inlinestatic |
| registerPythonToMetaTypeConverter(int metaTypeId, PythonQtConvertPythonToMetaTypeCB *cb) | PythonQtConv | inlinestatic |
| registerStringViewTypes() | PythonQtConv | static |
| setPythonSequenceToQVariantListCallback(PythonQtConvertPythonSequenceToQVariantListCB *cb) | PythonQtConv | inlinestatic |
| stringRefTypeId | PythonQtConv | protectedstatic |
|
+ PythonQt
+
+ |
+
a static class that offers methods for type conversion + More...
+ +#include <PythonQtConversion.h>
+Static Protected Member Functions | |
| static void * | handlePythonToQtAutoConversion (int typeId, PyObject *obj, void *alreadyAllocatedCPPObject, PythonQtArgumentFrame *frame) |
| handle automatic conversion of some special types (QColor, QBrush, ...) | |
| static PyObject * | ConvertQListOfPointerTypeToPythonList (QList< void * > *list, const PythonQtMethodInfo::ParameterInfo &info) |
| converts the list of pointers of given type to Python | |
| static bool | ConvertPythonListToQListOfPointerType (PyObject *obj, QList< void * > *list, const PythonQtMethodInfo::ParameterInfo &info, bool strict) |
tries to convert the python object to a QList of pointers to type objects, returns true on success | |
| template<typename Map > | |
| static void | pythonToMapVariant (PyObject *val, QVariant &result) |
| helper template method for conversion from Python to QVariantMap/Hash | |
| template<typename Map > | |
| static PyObject * | mapToPython (const Map &m) |
| helper template function for QVariantMapToPyObject/QVariantHashToPyObject | |
+Static Protected Attributes | |
| static QHash< int, PythonQtConvertMetaTypeToPythonCB * > | _metaTypeToPythonConverters |
| static QHash< int, PythonQtConvertPythonToMetaTypeCB * > | _pythonToMetaTypeConverters |
| static PythonQtConvertPythonSequenceToQVariantListCB * | _pythonSequenceToQVariantListCB |
| static int | stringRefTypeId |
a static class that offers methods for type conversion
+ +Definition at line 113 of file PythonQtConversion.h.
+
+
|
+ +static | +
cast wrapper to given className if possible
+ +Referenced by PythonQtConvertPythonListToListOfKnownClass().
+ +
+
|
+ +static | +
+
|
+ +static | +
+
|
+ +static | +
+
|
+ +static | +
+
|
+ +staticprotected | +
tries to convert the python object to a QList of pointers to type objects, returns true on success
+
|
+ +static | +
convert python object to Qt (according to the given parameter) and if the conversion should be strict (classInfo is currently not used anymore) If an alreadyAllocatedCPPObject is used it must have the same type as given by info.typeId
+ +
+
|
+ +staticprotected | +
converts the list of pointers of given type to Python
+ +
+
|
+ +static | +
converts the Qt parameter given in data, interpreting it as a info parameter, into a Python object,
+
|
+ +static | +
converts the Qt parameter given in data, interpreting it as a type registered qvariant/meta type, into a Python object,
Referenced by PythonQtConvertIntegerMapToPython(), PythonQtConvertListOfValueTypeToPythonList(), and PythonQtConvertPairToPython().
+ +
+
|
+ +static | +
+
|
+ +static | +
+
|
+ +static | +
+
|
+ +static | +
get human readable string from CPP object (when the metatype is known)
+ +
+
|
+ +static | +
creates a copy of given object, using the QMetaType
+ +
+
|
+ +static | +
creates a data storage for the passed parameter type and returns a void pointer to be set as arg[0] of qt_metacall
+ +
+
|
+ +static | +
Returns the name of the equivalent CPP type (for signals and slots)
+ +get a ref counted True or False Python object
+ +
+
|
+ +staticprotected | +
handle automatic conversion of some special types (QColor, QBrush, ...)
+ +
+
|
+ +static | +
Returns if the given object is a string (or unicode string)
+ +
+
|
+ +staticprotected | +
helper template function for QVariantMapToPyObject/QVariantHashToPyObject
+ +
+
|
+ +static | +
get bool from py object
+ +
+
|
+ +static | +
get bytes from py object
+ +
+
|
+ +static | +
get bytes from py object, also allows Python string
+ +
+
|
+ +static | +
get double from py object
+ +
+
|
+ +static | +
get int from py object
+ +Referenced by PythonQtConvertPythonToIntegerMap().
+ +
+
|
+ +static | +
get int64 from py object
+ +
+
|
+ +static | +
get string representation of py object
+ +
+
|
+ +inlinestatic | +
get string value from py object
+ +Definition at line 145 of file PythonQtConversion.h.
+
+
|
+ +static | +
get string value from py object
+ +
+
|
+ +static | +
get int64 from py object
+ +
+
|
+ +static | +
convert python object to qvariant, if type is given it will try to create a qvariant of that type, otherwise it will guess from the python type
+ +Referenced by PythonQtConvertPythonListToListOfValueType(), PythonQtConvertPythonToIntegerMap(), and PythonQtConvertPythonToPair().
+ +
+
|
+ +static | +
create a string list from python sequence
+ +
+
|
+ +staticprotected | +
helper template method for conversion from Python to QVariantMap/Hash
+ +
+
|
+ +static | +
converts QStringList to Python list
+ +
+
|
+ +static | +
converts QStringList to Python tuple
+ +
+
|
+ +static | +
converts QString to Python string (unicode!)
+ +
+
|
+ +static | +
+
|
+ +static | +
+
|
+ +static | +
+
|
+ +static | +
convert QVariant from PyObject
+ +
+
|
+ +inlinestatic | +
register a converter callback from cpp to python for given metatype
+ +Definition at line 192 of file PythonQtConversion.h.
+
+
|
+ +inlinestatic | +
register a converter callback from python to cpp for given metatype
+ +Definition at line 186 of file PythonQtConversion.h.
+Register QStringView like types, that need to be handled specially.
+ +
+
|
+ +inlinestatic | +
set a callback that is called when a Python sequence should be converted to a QVariantList to allow special conversion.
+ +Definition at line 199 of file PythonQtConversion.h.
+
+
|
+ +staticprotected | +
Definition at line 241 of file PythonQtConversion.h.
+ +
+
|
+ +staticprotected | +
Definition at line 243 of file PythonQtConversion.h.
+ +
+
|
+ +staticprotected | +
Definition at line 242 of file PythonQtConversion.h.
+ +
+
|
+ +staticprotected | +
Definition at line 264 of file PythonQtConversion.h.
+ +|
+ PythonQt
+
+ |
+
This is the complete list of members for PythonQtCppWrapperFactory, including all inherited members.
+| create(const QByteArray &classname, void *ptr)=0 | PythonQtCppWrapperFactory | pure virtual |
| PythonQtCppWrapperFactory() | PythonQtCppWrapperFactory | inline |
| ~PythonQtCppWrapperFactory() | PythonQtCppWrapperFactory | inlinevirtual |
|
+ PythonQt
+
+ |
+
Factory interface for C++ classes that can be wrapped by QObject objects. + More...
+ +#include <PythonQtCppWrapperFactory.h>
+Public Member Functions | |
| PythonQtCppWrapperFactory () | |
| virtual | ~PythonQtCppWrapperFactory () |
| virtual QObject * | create (const QByteArray &classname, void *ptr)=0 |
| create a wrapper for the given object | |
Factory interface for C++ classes that can be wrapped by QObject objects.
+To create your own factory, derive PythonQtCppWrapperFactory and implement the create() method. A factory can be added to PythonQt by PythonQt::addCppWrapperFactory().
+ +Definition at line 56 of file PythonQtCppWrapperFactory.h.
+
+
|
+ +inline | +
Definition at line 60 of file PythonQtCppWrapperFactory.h.
+
+
|
+ +inlinevirtual | +
Definition at line 61 of file PythonQtCppWrapperFactory.h.
+
+
|
+ +pure virtual | +
create a wrapper for the given object
+ +|
+ PythonQt
+
+ |
+
This is the complete list of members for PythonQtDebugAPI, including all inherited members.
+| hasExtraShellRefCount(PyObject *object) | PythonQtDebugAPI | slot |
| isDerivedShellInstance(PyObject *object) | PythonQtDebugAPI | slot |
| isOwnedByPython(PyObject *object) | PythonQtDebugAPI | slot |
| isPythonQtClassWrapper(PyObject *object) | PythonQtDebugAPI | slot |
| isPythonQtInstanceWrapper(PyObject *object) | PythonQtDebugAPI | slot |
| passOwnershipToCPP(PyObject *object) | PythonQtDebugAPI | slot |
| passOwnershipToPython(PyObject *object) | PythonQtDebugAPI | slot |
| PythonQtDebugAPI(QObject *parent) | PythonQtDebugAPI | inline |
|
+ PythonQt
+
+ |
+
Some helper methods that allow testing of the ownership. + More...
+ +#include <PythonQtStdDecorators.h>
+ +Public Slots | |
| bool | isOwnedByPython (PyObject *object) |
| Returns if the C++ object is owned by PythonQt and will be deleted when the reference goes away. | |
| bool | isDerivedShellInstance (PyObject *object) |
| Returns if the C++ object is an instance of a Python class that derives a C++ class. | |
| bool | hasExtraShellRefCount (PyObject *object) |
| Returns if the shell instance has an extra ref count from the C++ side. | |
| bool | passOwnershipToCPP (PyObject *object) |
| Pass the ownership of the given object to CPP (so that it will not be deleted by Python if the reference goes away) | |
| bool | passOwnershipToPython (PyObject *object) |
| Pass the ownership of the given object to Python (so that the C++ object will be deleted when the Python reference goes away) | |
| bool | isPythonQtInstanceWrapper (PyObject *object) |
| Returns if the given object is a PythonQt instance wrapper (or derived class) | |
| bool | isPythonQtClassWrapper (PyObject *object) |
| Returns if the given object is a PythonQt class wrapper (or derived class) | |
+Public Member Functions | |
| PythonQtDebugAPI (QObject *parent) | |
Some helper methods that allow testing of the ownership.
+ +Definition at line 239 of file PythonQtStdDecorators.h.
+
+
|
+ +inline | +
Definition at line 243 of file PythonQtStdDecorators.h.
+
+
|
+ +slot | +
Returns if the shell instance has an extra ref count from the C++ side.
+ +
+
|
+ +slot | +
Returns if the C++ object is an instance of a Python class that derives a C++ class.
+ +Returns if the C++ object is owned by PythonQt and will be deleted when the reference goes away.
+ +
+
|
+ +slot | +
Returns if the given object is a PythonQt class wrapper (or derived class)
+ +
+
|
+ +slot | +
Returns if the given object is a PythonQt instance wrapper (or derived class)
+ +
+
|
+ +slot | +
Pass the ownership of the given object to CPP (so that it will not be deleted by Python if the reference goes away)
+ +
+
|
+ +slot | +
Pass the ownership of the given object to Python (so that the C++ object will be deleted when the Python reference goes away)
+ +|
+ PythonQt
+
+ |
+
This is the complete list of members for PythonQtForeignWrapperFactory, including all inherited members.
+| PythonQtForeignWrapperFactory() | PythonQtForeignWrapperFactory | inline |
| unwrap(const QByteArray &classname, PyObject *object)=0 | PythonQtForeignWrapperFactory | pure virtual |
| wrap(const QByteArray &classname, void *ptr)=0 | PythonQtForeignWrapperFactory | pure virtual |
| ~PythonQtForeignWrapperFactory() | PythonQtForeignWrapperFactory | inlinevirtual |
|
+ PythonQt
+
+ |
+
#include <PythonQtCppWrapperFactory.h>
+Public Member Functions | |
| PythonQtForeignWrapperFactory () | |
| virtual | ~PythonQtForeignWrapperFactory () |
| virtual PyObject * | wrap (const QByteArray &classname, void *ptr)=0 |
| virtual void * | unwrap (const QByteArray &classname, PyObject *object)=0 |
Factory interface for C++ classes that can be mapped directly from/to Python with other means than PythonQt/QObjects.
+ +Definition at line 69 of file PythonQtCppWrapperFactory.h.
+
+
|
+ +inline | +
Definition at line 73 of file PythonQtCppWrapperFactory.h.
+
+
|
+ +inlinevirtual | +
Definition at line 74 of file PythonQtCppWrapperFactory.h.
+
+
|
+ +pure virtual | +
unwrap the given object to a C++ object of type classname if possible Return NULL otherwise.
+
|
+ +pure virtual | +
create a Python object (with new reference count), wrapping the given ptr as class of type classname Return NULL (and not Py_None) if the object could not be wrapped.
|
+ PythonQt
+
+ |
+
This is the complete list of members for PythonQtGILScope, including all inherited members.
+| isGILScopeEnabled() | PythonQtGILScope | static |
| PythonQtGILScope() | PythonQtGILScope | |
| release() | PythonQtGILScope | |
| setGILScopeEnabled(bool flag) | PythonQtGILScope | static |
| ~PythonQtGILScope() | PythonQtGILScope |
|
+ PythonQt
+
+ |
+
#include <PythonQtThreadSupport.h>
+Public Member Functions | |
| PythonQtGILScope () | |
| ~PythonQtGILScope () | |
| void | release () |
+Static Public Member Functions | |
| static void | setGILScopeEnabled (bool flag) |
| static bool | isGILScopeEnabled () |
| Check if GIL scopes are enabled. | |
Ensures/releases the Python GIL An instance of this class can be used to allow access to the Python API from C++ code.
+ +Definition at line 60 of file PythonQtThreadSupport.h.
+| PythonQtGILScope::PythonQtGILScope | +( | +) | ++ |
| PythonQtGILScope::~PythonQtGILScope | +( | +) | ++ |
Check if GIL scopes are enabled.
+ +| void PythonQtGILScope::release | +( | +) | ++ |
+
|
+ +static | +
This allows to globally enable/disable the GIL scopes. Make sure to only call this early in the PythonQt setup, or when you are holding the GIL.
+ +|
+ PythonQt
+
+ |
+
This is the complete list of members for PythonQtImport, including all inherited members.
+| compileSource(const QString &path, const QByteArray &data) | PythonQtImport | static |
| getCacheFilename(const QString &sourceFile, bool isOptimizedFilename) | PythonQtImport | static |
| getCodeFromData(const QString &path, int isbytecode=0, int ispackage=0, time_t mtime=0) | PythonQtImport | static |
| getCodeFromPyc(const QString &file) | PythonQtImport | static |
| getLong(unsigned char *buf) | PythonQtImport | static |
| getModuleCode(PythonQtImporter *self, const char *fullname, QString &modpath, QString &cachemodpath) | PythonQtImport | static |
| getModuleInfo(PythonQtImporter *self, const QString &fullname) | PythonQtImport | static |
| getMTimeOfSource(const QString &path) | PythonQtImport | static |
| getSourceFilename(const QString &cacheFile) | PythonQtImport | static |
| getSubName(const QString &str) | PythonQtImport | static |
| init() | PythonQtImport | static |
| MI_MODULE enum value | PythonQtImport | |
| MI_NOT_FOUND enum value | PythonQtImport | |
| MI_PACKAGE enum value | PythonQtImport | |
| MI_SHAREDLIBRARY enum value | PythonQtImport | |
| ModuleType enum name | PythonQtImport | |
| replaceExtension(const QString &str, const QString &ext) | PythonQtImport | static |
| unmarshalCode(const QString &path, const QByteArray &data, time_t mtime) | PythonQtImport | static |
| writeCompiledModule(PyCodeObject *co, const QString &filename, long mtime, long sourceSize) | PythonQtImport | static |
|
+ PythonQt
+
+ |
+
implements importing of python files into PythonQt + More...
+ +#include <PythonQtImporter.h>
+Classes | |
| struct | ModuleInfo |
+Public Types | |
| enum | ModuleType { MI_NOT_FOUND +, MI_MODULE +, MI_PACKAGE +, MI_SHAREDLIBRARY + } |
+Static Public Member Functions | |
| static void | init () |
| initialize | |
| static void | writeCompiledModule (PyCodeObject *co, const QString &filename, long mtime, long sourceSize) |
| writes the python code to disk, marshalling and writing the time stamp | |
| static PyObject * | unmarshalCode (const QString &path, const QByteArray &data, time_t mtime) |
| static PyObject * | compileSource (const QString &path, const QByteArray &data) |
| static PyObject * | getCodeFromData (const QString &path, int isbytecode=0, int ispackage=0, time_t mtime=0) |
| static PyObject * | getModuleCode (PythonQtImporter *self, const char *fullname, QString &modpath, QString &cachemodpath) |
| static PyObject * | getCodeFromPyc (const QString &file) |
| gets the compiled code for the given *.py file if there is a valid pyc file, otherwise compiles the file and writes the pyc | |
| static ModuleInfo | getModuleInfo (PythonQtImporter *self, const QString &fullname) |
| Return if module exists and is a package or a module. | |
| static QString | getSubName (const QString &str) |
| get the last name of a dot chain (first.second.last) | |
| static long | getLong (unsigned char *buf) |
| static time_t | getMTimeOfSource (const QString &path) |
| get time stamp of file | |
| static QString | replaceExtension (const QString &str, const QString &ext) |
| replace extension of file | |
| static QString | getCacheFilename (const QString &sourceFile, bool isOptimizedFilename) |
| Returns the filename of the cache file for the given source file, e.g. test.pyc for test.py. | |
| static QString | getSourceFilename (const QString &cacheFile) |
| Returns the filename of the source file for the given cache file, e.g. test.py for test.pyc. | |
implements importing of python files into PythonQt
+also compiles/marshalls/unmarshalls py/pyc files and handles time stamps correctly
+ +Definition at line 65 of file PythonQtImporter.h.
+| enum PythonQtImport::ModuleType | +
| Enumerator | |
|---|---|
| MI_NOT_FOUND | |
| MI_MODULE | |
| MI_PACKAGE | |
| MI_SHAREDLIBRARY | |
Definition at line 69 of file PythonQtImporter.h.
+
+
|
+ +static | +
Given a string buffer containing Python source code, compile it return and return a code object as a new reference.
+ +
+
|
+ +static | +
Returns the filename of the cache file for the given source file, e.g. test.pyc for test.py.
+ +
+
|
+ +static | +
Return the code object for the module named by 'fullname' from the Zip archive as a new reference.
+ +
+
|
+ +static | +
gets the compiled code for the given *.py file if there is a valid pyc file, otherwise compiles the file and writes the pyc
+ +
+
|
+ +static | +
Given a buffer, return the long that is represented by the first 4 bytes, encoded as little endian. This partially reimplements marshal.c:r_long()
+ +
+
|
+ +static | +
Get the code object associated with the module specified by 'fullname'. In Python3, modpath will always be the path to the *.py file and cachemodpath the path to the *.pyc file (if it exists).
+ +
+
|
+ +static | +
Return if module exists and is a package or a module.
+ +
+
|
+ +static | +
get time stamp of file
+ +
+
|
+ +static | +
Returns the filename of the source file for the given cache file, e.g. test.py for test.pyc.
+ +
+
|
+ +static | +
get the last name of a dot chain (first.second.last)
+ +
+
|
+ +static | +
replace extension of file
+ +
+
|
+ +static | +
Given the contents of a .py[co] file in a buffer, unmarshal the data and return the code object. Return None if it the magic word doesn't match (we do this instead of raising an exception as we fall back to .py if available and we don't want to mask other errors). Returns a new reference.
+ +
+
|
+ +static | +
writes the python code to disk, marshalling and writing the time stamp
+ +|
+ PythonQt
+
+ |
+
This is the complete list of members for PythonQtImportFileInterface, including all inherited members.
+| exists(const QString &filename)=0 | PythonQtImportFileInterface | pure virtual |
| ignoreUpdatedPythonSourceFiles() | PythonQtImportFileInterface | inlinevirtual |
| importedModule(const QString &) | PythonQtImportFileInterface | inlinevirtual |
| isEggArchive(const QString &filename)=0 | PythonQtImportFileInterface | pure virtual |
| lastModifiedDate(const QString &filename)=0 | PythonQtImportFileInterface | pure virtual |
| PythonQtImportFileInterface() | PythonQtImportFileInterface | inline |
| readFileAsBytes(const QString &filename)=0 | PythonQtImportFileInterface | pure virtual |
| readSourceFile(const QString &filename, bool &ok)=0 | PythonQtImportFileInterface | pure virtual |
| ~PythonQtImportFileInterface() | PythonQtImportFileInterface | inlinevirtual |
|
+ PythonQt
+
+ |
+
#include <PythonQtImportFileInterface.h>
+
++Public Member Functions | |
| virtual | ~PythonQtImportFileInterface () |
| PythonQtImportFileInterface () | |
| virtual QByteArray | readFileAsBytes (const QString &filename)=0 |
| read the given file as byte array, without doing any linefeed translations | |
| virtual QByteArray | readSourceFile (const QString &filename, bool &ok)=0 |
| virtual bool | exists (const QString &filename)=0 |
| returns if the file exists | |
| virtual bool | isEggArchive (const QString &filename)=0 |
| virtual QDateTime | lastModifiedDate (const QString &filename)=0 |
| get the last modified data of a file | |
| virtual bool | ignoreUpdatedPythonSourceFiles () |
| virtual void | importedModule (const QString &) |
Defines an abstract interface to file access for the Python import statement. see PythonQt::setImporter()
+ +Definition at line 52 of file PythonQtImportFileInterface.h.
+
+
|
+ +inlinevirtual | +
Definition at line 57 of file PythonQtImportFileInterface.h.
+
+
|
+ +inline | +
Definition at line 58 of file PythonQtImportFileInterface.h.
+
+
|
+ +pure virtual | +
returns if the file exists
+ +Implemented in PythonQtQFileImporter.
+ +
+
|
+ +inlinevirtual | +
indicates that *.py files which are newer than their corresponding *.pyc files are ignored
+ +Definition at line 79 of file PythonQtImportFileInterface.h.
+
+
|
+ +inlinevirtual | +
called by PythonQt after successful import to allow recording of imports
+ +Definition at line 83 of file PythonQtImportFileInterface.h.
+
+
|
+ +pure virtual | +
returns true if the given file is an egg archive (e.g. zip). If the egg is a directory then false is returned.
+ +Implemented in PythonQtQFileImporter.
+ +
+
|
+ +pure virtual | +
get the last modified data of a file
+ +Implemented in PythonQtQFileImporter.
+ +
+
|
+ +pure virtual | +
read the given file as byte array, without doing any linefeed translations
+ +Implemented in PythonQtQFileImporter.
+ +
+
|
+ +pure virtual | +
read a source file, expects a readable Python text file with translated line feeds. If the file can not be load OR it can not be verified, ok is set to false
+ +Implemented in PythonQtQFileImporter.
+ +|
+ PythonQt
+
+ |
+
This is the complete list of members for PythonQtMethodInfo, including all inherited members.
+|
+ PythonQt
+
+ |
+
stores information about a specific signal/slot/method + More...
+ +#include <PythonQtMethodInfo.h>
+
++Classes | |
| struct | ParameterInfo |
| stores various informations about a parameter/type name More... | |
+Public Types | |
| enum | ParameterType { Unknown = -1 +, Variant = -2 + } |
+Public Member Functions | |
| PythonQtMethodInfo () | |
| ~PythonQtMethodInfo () | |
| PythonQtMethodInfo (const QMetaMethod &meta, PythonQtClassInfo *classInfo) | |
| PythonQtMethodInfo (const QByteArray &typeName, const QList< QByteArray > &args) | |
| PythonQtMethodInfo (const PythonQtMethodInfo &other) | |
| int | parameterCount () const |
| returns the number of parameters including the return value | |
| const QList< ParameterInfo > & | parameters () const |
| get the parameter infos | |
| bool | shouldAllowThreads () const |
+Static Public Member Functions | |
| static const PythonQtMethodInfo * | getCachedMethodInfo (const QMetaMethod &method, PythonQtClassInfo *classInfo) |
| static const PythonQtMethodInfo * | getCachedMethodInfoFromArgumentList (int numArgs, const char **args) |
| get the cached method info using the passed in list of return value and arguments, return value needs to be passed as first arg | |
| static void | cleanupCachedMethodInfos () |
| cleanup the cache | |
| static int | nameToType (const char *name) |
| returns the id for the given type (using an internal dictionary) | |
| static void | addParameterTypeAlias (const QByteArray &alias, const QByteArray &name) |
| add an alias for a typename, e.g. QObjectList and QList<QObject*>. | |
| static void | fillParameterInfo (ParameterInfo &type, const QByteArray &name, PythonQtClassInfo *classInfo=nullptr) |
| fill the parameter info for the given type name | |
| static const ParameterInfo & | getParameterInfoForMetaType (int type) |
| returns a parameter info for the given metatype (and creates and caches one if it is not yet present) | |
| static int | getInnerTemplateMetaType (const QByteArray &typeName) |
| returns the inner type id of a simple template of the form SomeObject<InnerType> | |
| static QByteArray | getInnerTemplateTypeName (const QByteArray &typeName) |
| returns the inner type name of a simple template of the form SomeObject<InnerType> | |
| static QByteArray | getInnerListTypeName (const QByteArray &typeName) |
| returns the inner type name of a simple template or the typename without appended "List". | |
+Protected Member Functions | |
| void | setupAllowThreads () |
+Protected Attributes | |
| QList< ParameterInfo > | _parameters |
| bool | _shouldAllowThreads |
+Static Protected Attributes | |
| static QHash< QByteArray, int > | _parameterTypeDict |
| static QHash< QByteArray, QByteArray > | _parameterNameAliases |
| static QHash< QByteArray, PythonQtMethodInfo * > | _cachedSignatures |
| stores the cached signatures of methods to speedup mapping from Qt to Python types | |
| static QHash< int, ParameterInfo > | _cachedParameterInfos |
stores information about a specific signal/slot/method
+ +Definition at line 58 of file PythonQtMethodInfo.h.
+| enum PythonQtMethodInfo::ParameterType | +
+
|
+ +inline | +
Definition at line 79 of file PythonQtMethodInfo.h.
+
+
|
+ +inline | +
Definition at line 80 of file PythonQtMethodInfo.h.
+| PythonQtMethodInfo::PythonQtMethodInfo | +( | +const QMetaMethod & | +meta, | +
| + | + | PythonQtClassInfo * | +classInfo | +
| + | ) | ++ |
| PythonQtMethodInfo::PythonQtMethodInfo | +( | +const QByteArray & | +typeName, | +
| + | + | const QList< QByteArray > & | +args | +
| + | ) | ++ |
+
|
+ +inline | +
Definition at line 83 of file PythonQtMethodInfo.h.
+References PythonQtConvertPairToPython().
+ +
+
|
+ +static | +
add an alias for a typename, e.g. QObjectList and QList<QObject*>.
+ +
+
|
+ +static | +
cleanup the cache
+ +
+
|
+ +static | +
fill the parameter info for the given type name
+ +
+
|
+ +static | +
returns the method info of the signature, uses a cache internally to speed up multiple requests for the same method, classInfo is passed to allow local enum resolution (if NULL is passed, no local enums are recognized)
+ +
+
|
+ +static | +
get the cached method info using the passed in list of return value and arguments, return value needs to be passed as first arg
+ +
+
|
+ +static | +
returns the inner type name of a simple template or the typename without appended "List".
+ +Referenced by PythonQtConvertListOfKnownClassToPythonList(), and PythonQtConvertPythonListToListOfKnownClass().
+ +
+
|
+ +static | +
returns the inner type id of a simple template of the form SomeObject<InnerType>
+ +Referenced by PythonQtConvertListOfPairToPythonList(), PythonQtConvertListOfValueTypeToPythonList(), PythonQtConvertPythonListToListOfPair(), and PythonQtConvertPythonListToListOfValueType().
+ +
+
|
+ +static | +
returns the inner type name of a simple template of the form SomeObject<InnerType>
+ +Referenced by PythonQtConvertIntegerMapToPython(), PythonQtConvertPairToPython(), PythonQtConvertPythonToIntegerMap(), and PythonQtConvertPythonToPair().
+ +
+
|
+ +static | +
returns a parameter info for the given metatype (and creates and caches one if it is not yet present)
+ +
+
|
+ +static | +
returns the id for the given type (using an internal dictionary)
+ +
+
|
+ +inline | +
returns the number of parameters including the return value
+ +Definition at line 100 of file PythonQtMethodInfo.h.
+
+
|
+ +inline | +
+
|
+ +protected | +
+
|
+ +inline | +
returns if the GIL should be released when calling this method. This is the default, but it will return false if any of the parameters is a PythonQtObjectPtr or PyObject*.
+ +Definition at line 129 of file PythonQtMethodInfo.h.
+
+
|
+ +staticprotected | +
Definition at line 140 of file PythonQtMethodInfo.h.
+ +
+
|
+ +staticprotected | +
stores the cached signatures of methods to speedup mapping from Qt to Python types
+ +Definition at line 138 of file PythonQtMethodInfo.h.
+ +
+
|
+ +staticprotected | +
Definition at line 135 of file PythonQtMethodInfo.h.
+ +
+
|
+ +protected | +
Definition at line 142 of file PythonQtMethodInfo.h.
+ +Referenced by PythonQtSlotInfo::PythonQtSlotInfo().
+ +
+
|
+ +staticprotected | +
Definition at line 134 of file PythonQtMethodInfo.h.
+ +
+
|
+ +protected | +
Definition at line 143 of file PythonQtMethodInfo.h.
+ +|
+ PythonQt
+
+ |
+
This is the complete list of members for PythonQtNewOwnerOfThis< T >, including all inherited members.
+| _t | PythonQtNewOwnerOfThis< T > | |
| operator T() const | PythonQtNewOwnerOfThis< T > | inline |
| PythonQtNewOwnerOfThis(const T &t) | PythonQtNewOwnerOfThis< T > | inline |
|
+ PythonQt
+
+ |
+
#include <PythonQt.h>
+Public Member Functions | |
| PythonQtNewOwnerOfThis (const T &t) | |
| Allow conversion from T to PythonQtNewOwnerOfThis<T> | |
| operator T () const | |
| Allow conversion from PythonQtNewOwnerOfThis<T> to T. | |
+Public Attributes | |
| T | _t |
Helper template that allows to pass the ownership of a C++ instance between C++ and Python (it is used as a slot return type or parameter type so that it can be detected by the PythonQt slot calling code).
+ +Definition at line 130 of file PythonQt.h.
+
+
|
+ +inline | +
Allow conversion from T to PythonQtNewOwnerOfThis<T>
+ +Definition at line 134 of file PythonQt.h.
+
+
|
+ +inline | +
Allow conversion from PythonQtNewOwnerOfThis<T> to T.
+ +Definition at line 139 of file PythonQt.h.
+References PythonQtNewOwnerOfThis< T >::_t.
+ +| T PythonQtNewOwnerOfThis< T >::_t | +
Stored value. This is important so that it has the same memory layout as a pointer if T is a pointer type (which is the typical use case for this class).
+ +Definition at line 143 of file PythonQt.h.
+ +Referenced by PythonQtNewOwnerOfThis< T >::operator T().
+ +|
+ PythonQt
+
+ |
+
This is the complete list of members for PythonQtObjectPtr, including all inherited members.
+| addObject(const QString &name, QObject *object) | PythonQtObjectPtr | |
| addVariable(const QString &name, const QVariant &v) | PythonQtObjectPtr | |
| call(const QString &callable, const QVariantList &args=QVariantList(), const QVariantMap &kwargs=QVariantMap()) | PythonQtObjectPtr | |
| call(const QVariantList &args=QVariantList(), const QVariantMap &kwargs=QVariantMap()) | PythonQtObjectPtr | |
| evalCode(PyObject *pycode) | PythonQtObjectPtr | |
| evalFile(const QString &filename) | PythonQtObjectPtr | |
| evalScript(const QString &script, int start=Py_file_input) | PythonQtObjectPtr | |
| fromVariant(const QVariant &variant) | PythonQtObjectPtr | |
| getVariable(const QString &name) | PythonQtObjectPtr | |
| isNull() const | PythonQtObjectPtr | inline |
| object() const | PythonQtObjectPtr | inline |
| operator PyObject *() const | PythonQtObjectPtr | inline |
| operator!=(const PythonQtObjectPtr &p) const | PythonQtObjectPtr | inline |
| operator!=(PyObject *p) const | PythonQtObjectPtr | inline |
| operator*() const | PythonQtObjectPtr | inline |
| operator->() const | PythonQtObjectPtr | inline |
| operator=(const PythonQtObjectPtr &p) | PythonQtObjectPtr | inline |
| operator=(PythonQtObjectPtr &&p) noexcept | PythonQtObjectPtr | inline |
| operator=(PythonQtSafeObjectPtr &&p) | PythonQtObjectPtr | |
| operator=(PyObject *o) | PythonQtObjectPtr | inline |
| operator=(const QVariant &variant) | PythonQtObjectPtr | inline |
| operator==(const PythonQtObjectPtr &p) const | PythonQtObjectPtr | inline |
| operator==(PyObject *p) const | PythonQtObjectPtr | inline |
| PythonQtObjectPtr() | PythonQtObjectPtr | inline |
| PythonQtObjectPtr(const PythonQtObjectPtr &p) | PythonQtObjectPtr | inline |
| PythonQtObjectPtr(PythonQtObjectPtr &&p) noexcept | PythonQtObjectPtr | inline |
| PythonQtObjectPtr(PythonQtSafeObjectPtr &&p) | PythonQtObjectPtr | |
| PythonQtObjectPtr(const QVariant &variant) | PythonQtObjectPtr | inline |
| PythonQtObjectPtr(PyObject *o) | PythonQtObjectPtr | |
| removeVariable(const QString &name) | PythonQtObjectPtr | |
| setNewRef(PyObject *o) | PythonQtObjectPtr | |
| setObject(PyObject *o) | PythonQtObjectPtr | protected |
| takeObject() | PythonQtObjectPtr | inline |
| toLocalVariant() | PythonQtObjectPtr | |
| toVariant() | PythonQtObjectPtr | |
| ~PythonQtObjectPtr() | PythonQtObjectPtr |
|
+ PythonQt
+
+ |
+
a smart pointer that stores a PyObject pointer and that handles reference counting automatically + More...
+ +#include <PythonQtObjectPtr.h>
+Public Member Functions | |
| PythonQtObjectPtr () | |
| PythonQtObjectPtr (const PythonQtObjectPtr &p) | |
| PythonQtObjectPtr (PythonQtObjectPtr &&p) noexcept | |
| rvalue copy constructor, does not need any incref/decref. | |
| PythonQtObjectPtr (PythonQtSafeObjectPtr &&p) | |
| rvalue copy constructor, does not need any incref/decref. | |
| PythonQtObjectPtr (const QVariant &variant) | |
| If the given variant holds a PythonQtObjectPtr, extract the value from it and hold onto the reference. This results in an increment of the reference count. | |
| PythonQtObjectPtr (PyObject *o) | |
| ~PythonQtObjectPtr () | |
| bool | fromVariant (const QVariant &variant) |
| If the given variant holds a PythonQtObjectPtr, extract the value from it and hold onto the reference. This results in an increment of the reference count. | |
| QVariant | toVariant () |
| Returns a PythonQtSafeObjectPtr as a QVariant. It does not return a PythonQtObjectPtr, because that would be unsafe regarding the GIL. | |
| QVariant | toLocalVariant () |
| Returns a PythonQtObjectPtr as a QVariant. Only use this when you know that the variant is only used locally and not stored outside of the current GIL scope. | |
| PythonQtObjectPtr & | operator= (const PythonQtObjectPtr &p) |
| PythonQtObjectPtr & | operator= (PythonQtObjectPtr &&p) noexcept |
| rvalue assignment operator that steals the reference from p | |
| PythonQtObjectPtr & | operator= (PythonQtSafeObjectPtr &&p) |
| rvalue assignment operator that steals the reference from p | |
| PythonQtObjectPtr & | operator= (PyObject *o) |
| PythonQtObjectPtr & | operator= (const QVariant &variant) |
| bool | operator== (const PythonQtObjectPtr &p) const |
| bool | operator!= (const PythonQtObjectPtr &p) const |
| bool | operator== (PyObject *p) const |
| bool | operator!= (PyObject *p) const |
| bool | isNull () const |
| PyObject * | operator-> () const |
| PyObject & | operator* () const |
| operator PyObject * () const | |
| void | setNewRef (PyObject *o) |
| sets the object and passes the ownership (stealing the reference, in Python slang) | |
| PyObject * | object () const |
| QVariant | evalScript (const QString &script, int start=Py_file_input) |
| evaluates the given script code in the context of this object and returns the result value | |
| QVariant | evalCode (PyObject *pycode) |
| void | evalFile (const QString &filename) |
| evaluates the given code in the context | |
| void | addObject (const QString &name, QObject *object) |
add the given object to the module as a variable with name (it can be removed via clearVariable) | |
| void | addVariable (const QString &name, const QVariant &v) |
| add the given variable to the module | |
| void | removeVariable (const QString &name) |
| remove the given variable | |
| QVariant | getVariable (const QString &name) |
get the variable with the name of the module, returns an invalid QVariant on error | |
| QVariant | call (const QString &callable, const QVariantList &args=QVariantList(), const QVariantMap &kwargs=QVariantMap()) |
| call the given python object (in the scope of the current object), returns the result converted to a QVariant | |
| QVariant | call (const QVariantList &args=QVariantList(), const QVariantMap &kwargs=QVariantMap()) |
| call the contained python object directly, returns the result converted to a QVariant | |
| PyObject * | takeObject () |
+Protected Member Functions | |
| void | setObject (PyObject *o) |
a smart pointer that stores a PyObject pointer and that handles reference counting automatically
+ +Definition at line 56 of file PythonQtObjectPtr.h.
+
+
|
+ +inline | +
Definition at line 59 of file PythonQtObjectPtr.h.
+
+
|
+ +inline | +
Definition at line 64 of file PythonQtObjectPtr.h.
+References PythonQtConvertPairToPython().
+ +
+
|
+ +inlinenoexcept | +
rvalue copy constructor, does not need any incref/decref.
+ +Definition at line 71 of file PythonQtObjectPtr.h.
+ +| PythonQtObjectPtr::PythonQtObjectPtr | +( | +PythonQtSafeObjectPtr && | +p | ) | ++ |
rvalue copy constructor, does not need any incref/decref.
+ +
+
|
+ +inline | +
If the given variant holds a PythonQtObjectPtr, extract the value from it and hold onto the reference. This results in an increment of the reference count.
+ +Definition at line 80 of file PythonQtObjectPtr.h.
+References PythonQtConvertPairToPython().
+ +| PythonQtObjectPtr::PythonQtObjectPtr | +( | +PyObject * | +o | ) | ++ |
| PythonQtObjectPtr::~PythonQtObjectPtr | +( | +) | ++ |
| void PythonQtObjectPtr::addObject | +( | +const QString & | +name, | +
| + | + | QObject * | +object | +
| + | ) | ++ |
add the given object to the module as a variable with name (it can be removed via clearVariable)
| void PythonQtObjectPtr::addVariable | +( | +const QString & | +name, | +
| + | + | const QVariant & | +v | +
| + | ) | ++ |
add the given variable to the module
+ +| QVariant PythonQtObjectPtr::call | +( | +const QString & | +callable, | +
| + | + | const QVariantList & | +args = QVariantList(), |
+
| + | + | const QVariantMap & | +kwargs = QVariantMap() |
+
| + | ) | ++ |
call the given python object (in the scope of the current object), returns the result converted to a QVariant
+ +| QVariant PythonQtObjectPtr::call | +( | +const QVariantList & | +args = QVariantList(), |
+
| + | + | const QVariantMap & | +kwargs = QVariantMap() |
+
| + | ) | ++ |
call the contained python object directly, returns the result converted to a QVariant
+ +evaluates the given code and returns the result value (use Py_Compile etc. to create pycode from string) If pycode is NULL, a python error is printed.
+ +evaluates the given code in the context
+ +| QVariant PythonQtObjectPtr::evalScript | +( | +const QString & | +script, | +
| + | + | int | +start = Py_file_input |
+
| + | ) | ++ |
evaluates the given script code in the context of this object and returns the result value
+ +If the given variant holds a PythonQtObjectPtr, extract the value from it and hold onto the reference. This results in an increment of the reference count.
+ +get the variable with the name of the module, returns an invalid QVariant on error
+
|
+ +inline | +
Definition at line 138 of file PythonQtObjectPtr.h.
+
+
|
+ +inline | +
Definition at line 149 of file PythonQtObjectPtr.h.
+
+
|
+ +inline | +
Definition at line 144 of file PythonQtObjectPtr.h.
+
+
|
+ +inline | +
Definition at line 132 of file PythonQtObjectPtr.h.
+References PythonQtConvertPairToPython().
+ +Definition at line 136 of file PythonQtObjectPtr.h.
+ +References PythonQtConvertPairToPython().
+ +
+
|
+ +inline | +
Definition at line 142 of file PythonQtObjectPtr.h.
+
+
|
+ +inline | +
Definition at line 140 of file PythonQtObjectPtr.h.
+
+
|
+ +inline | +
Definition at line 99 of file PythonQtObjectPtr.h.
+ +References PythonQtConvertPairToPython().
+ +
+
|
+ +inline | +
Definition at line 124 of file PythonQtObjectPtr.h.
+ +References PythonQtConvertPairToPython().
+ +
+
|
+ +inline | +
Definition at line 118 of file PythonQtObjectPtr.h.
+ +References PythonQtConvertPairToPython().
+ +
+
|
+ +inlinenoexcept | +
rvalue assignment operator that steals the reference from p
+ +Definition at line 106 of file PythonQtObjectPtr.h.
+ +References PythonQtConvertPairToPython().
+ +| PythonQtObjectPtr & PythonQtObjectPtr::operator= | +( | +PythonQtSafeObjectPtr && | +p | ) | ++ |
rvalue assignment operator that steals the reference from p
+ +
+
|
+ +inline | +
Definition at line 130 of file PythonQtObjectPtr.h.
+ +References PythonQtConvertPairToPython().
+ +Definition at line 134 of file PythonQtObjectPtr.h.
+ +References PythonQtConvertPairToPython().
+ +remove the given variable
+ +sets the object and passes the ownership (stealing the reference, in Python slang)
+ +
+
|
+ +inline | +
takes the object from the pointer, leaving the pointer empty. the caller has to take care about the decref of the taken object!
+ +Definition at line 182 of file PythonQtObjectPtr.h.
+References PythonQtConvertPairToPython().
+ +| QVariant PythonQtObjectPtr::toLocalVariant | +( | +) | ++ |
Returns a PythonQtObjectPtr as a QVariant. Only use this when you know that the variant is only used locally and not stored outside of the current GIL scope.
+ +| QVariant PythonQtObjectPtr::toVariant | +( | +) | ++ |
Returns a PythonQtSafeObjectPtr as a QVariant. It does not return a PythonQtObjectPtr, because that would be unsafe regarding the GIL.
+ +|
+ PythonQt
+
+ |
+
This is the complete list of members for PythonQtPassOwnershipToCPP< T >, including all inherited members.
+| _t | PythonQtPassOwnershipToCPP< T > | |
| operator T() const | PythonQtPassOwnershipToCPP< T > | inline |
| PythonQtPassOwnershipToCPP(const T &t) | PythonQtPassOwnershipToCPP< T > | inline |
|
+ PythonQt
+
+ |
+
#include <PythonQt.h>
+Public Member Functions | |
| PythonQtPassOwnershipToCPP (const T &t) | |
| Allow conversion from T to PythonQtPassOwnershipToCPP<T> | |
| operator T () const | |
| Allow conversion from PythonQtPassOwnershipToCPP<T> to T. | |
+Public Attributes | |
| T | _t |
Helper template that allows to pass the ownership of a C++ instance between C++ and Python (it is used as a slot return type or parameter type so that it can be detected by the PythonQt slot calling code).
+ +Definition at line 90 of file PythonQt.h.
+
+
|
+ +inline | +
Allow conversion from T to PythonQtPassOwnershipToCPP<T>
+ +Definition at line 94 of file PythonQt.h.
+
+
|
+ +inline | +
Allow conversion from PythonQtPassOwnershipToCPP<T> to T.
+ +Definition at line 99 of file PythonQt.h.
+References PythonQtPassOwnershipToCPP< T >::_t.
+ +| T PythonQtPassOwnershipToCPP< T >::_t | +
Stored value. This is important so that it has the same memory layout as a pointer if T is a pointer type (which is the typical use case for this class).
+ +Definition at line 103 of file PythonQt.h.
+ +Referenced by PythonQtPassOwnershipToCPP< T >::operator T().
+ +|
+ PythonQt
+
+ |
+
This is the complete list of members for PythonQtPassOwnershipToPython< T >, including all inherited members.
+| _t | PythonQtPassOwnershipToPython< T > | |
| operator T() const | PythonQtPassOwnershipToPython< T > | inline |
| PythonQtPassOwnershipToPython(const T &t) | PythonQtPassOwnershipToPython< T > | inline |
|
+ PythonQt
+
+ |
+
#include <PythonQt.h>
+Public Member Functions | |
| PythonQtPassOwnershipToPython (const T &t) | |
| Allow conversion from T to PythonQtPassOwnershipToPython<T> | |
| operator T () const | |
| Allow conversion from PythonQtPassOwnershipToPython<T> to T. | |
+Public Attributes | |
| T | _t |
Helper template that allows to pass the ownership of a C++ instance between C++ and Python (it is used as a slot return type or parameter type so that it can be detected by the PythonQt slot calling code).
+ +Definition at line 110 of file PythonQt.h.
+
+
|
+ +inline | +
Allow conversion from T to PythonQtPassOwnershipToPython<T>
+ +Definition at line 114 of file PythonQt.h.
+
+
|
+ +inline | +
Allow conversion from PythonQtPassOwnershipToPython<T> to T.
+ +Definition at line 119 of file PythonQt.h.
+References PythonQtPassOwnershipToPython< T >::_t.
+ +| T PythonQtPassOwnershipToPython< T >::_t | +
Stored value. This is important so that it has the same memory layout as a pointer if T is a pointer type (which is the typical use case for this class).
+ +Definition at line 123 of file PythonQt.h.
+ +Referenced by PythonQtPassOwnershipToPython< T >::operator T().
+ +|
+ PythonQt
+
+ |
+
This is the complete list of members for PythonQtPrivate, including all inherited members.
+| addDecorators(QObject *o, int decoTypes) | PythonQtPrivate | |
| addParentClass(const char *typeName, const char *parentTypeName, int upcastingOffset) | PythonQtPrivate | |
| addPolymorphicHandler(const char *typeName, PythonQtPolymorphicHandlerCB *cb) | PythonQtPrivate | |
| addWrapperPointer(void *obj, PythonQtInstanceWrapper *wrapper) | PythonQtPrivate | |
| AllDecorators enum value | PythonQtPrivate | |
| buildDynamicMetaObject(PythonQtClassWrapper *type, const QMetaObject *prototypeMetaObject) | PythonQtPrivate | |
| callMethodInPython(QMetaMethod &method, PythonQtInstanceWrapper *wrapper, void **args) | PythonQtPrivate | |
| checkAndRunCoroutine(const PythonQtObjectPtr &object) | PythonQtPrivate | |
| ConstructorDecorator enum value | PythonQtPrivate | |
| createAsyncioFuture() | PythonQtPrivate | |
| createEnumValueInstance(PyObject *enumType, unsigned int enumValue) | PythonQtPrivate | static |
| createModule(const QString &name, PyObject *pycode) | PythonQtPrivate | |
| createNewPythonQtClassWrapper(PythonQtClassInfo *info, PyObject *module, const QByteArray &pythonClassName) | PythonQtPrivate | |
| createNewPythonQtEnumWrapper(const char *enumName, PyObject *parentObject) | PythonQtPrivate | static |
| createNewPythonQtInstanceWrapper(QObject *obj, PythonQtClassInfo *info, void *wrappedPtr=nullptr) | PythonQtPrivate | |
| currentClassInfoForClassWrapperCreation() | PythonQtPrivate | |
| DecoratorTypes enum name | PythonQtPrivate | |
| DestructorDecorator enum value | PythonQtPrivate | |
| dummyTuple() | PythonQtPrivate | static |
| getClassInfo(const QMetaObject *meta) | PythonQtPrivate | |
| getClassInfo(const QByteArray &className) | PythonQtPrivate | |
| getDynamicMetaObject(PythonQtInstanceWrapper *wrapper, const QMetaObject *prototypeMetaObject) | PythonQtPrivate | |
| getSignature(PyObject *object) | PythonQtPrivate | |
| handleMetaCall(QObject *object, PythonQtInstanceWrapper *wrapper, QMetaObject::Call call, int id, void **args) | PythonQtPrivate | |
| handleVirtualOverloadReturnError(const char *signature, const PythonQtMethodInfo *methodInfo, PyObject *result) | PythonQtPrivate | |
| InstanceDecorator enum value | PythonQtPrivate | |
| isMethodDescriptor(PyObject *object) const | PythonQtPrivate | |
| isPythonQtAnyObjectPtrMetaId(int id) | PythonQtPrivate | inline |
| isPythonQtObjectPtrMetaId(int id) | PythonQtPrivate | inline |
| isPythonQtSafeObjectPtrMetaId(int id) | PythonQtPrivate | inline |
| lookupClassInfoAndCreateIfNotPresent(const char *typeName) | PythonQtPrivate | |
| profilingCB() const | PythonQtPrivate | inline |
| PythonQt | PythonQtPrivate | friend |
| pythonQtModule() const | PythonQtPrivate | inline |
| PythonQtPrivate() | PythonQtPrivate | |
| registerClass(const QMetaObject *metaobject, const char *package=nullptr, PythonQtQObjectCreatorFunctionCB *wrapperCreator=nullptr, PythonQtShellSetInstanceWrapperCB *shell=nullptr, PyObject *module=nullptr, int typeSlots=0) | PythonQtPrivate | |
| registerCPPClass(const char *typeName, const char *parentTypeName=nullptr, const char *package=nullptr, PythonQtQObjectCreatorFunctionCB *wrapperCreator=nullptr, PythonQtShellSetInstanceWrapperCB *shell=nullptr, PyObject *module=nullptr, int typeSlots=0) | PythonQtPrivate | |
| registerGlobalNamespace(const char *typeName, const char *package, PythonQtQObjectCreatorFunctionCB *wrapperCreator, const QMetaObject &metaObject, PyObject *module=nullptr) | PythonQtPrivate | |
| registerLazyClass(const QByteArray &name, const QByteArray &moduleToImport) | PythonQtPrivate | |
| registerQObjectClassNames(const QStringList &names) | PythonQtPrivate | |
| removeSignalEmitter(QObject *obj) | PythonQtPrivate | |
| removeWrapperPointer(void *obj) | PythonQtPrivate | |
| setTaskDoneCallback(const PythonQtObjectPtr &callable) | PythonQtPrivate | |
| setupDynamicMetaObjectChain(PythonQtClassWrapper *type, const QMetaObject *prototypeMetaObject) | PythonQtPrivate | |
| sharedLibrarySuffixes() | PythonQtPrivate | inline |
| shellClassDeleted(void *shellClass) | PythonQtPrivate | |
| StaticDecorator enum value | PythonQtPrivate | |
| unwrapForeignWrapper(const QByteArray &classname, PyObject *obj) | PythonQtPrivate | |
| wrapMemoryAsBuffer(const void *data, Py_ssize_t size) | PythonQtPrivate | static |
| wrapMemoryAsBuffer(void *data, Py_ssize_t size) | PythonQtPrivate | static |
| wrapPtr(void *ptr, const QByteArray &name, bool passOwnership=false) | PythonQtPrivate | |
| wrapQObject(QObject *obj) | PythonQtPrivate | |
| ~PythonQtPrivate() override | PythonQtPrivate |
|
+ PythonQt
+
+ |
+
internal PythonQt details + More...
+ +#include <PythonQt.h>
+ +Public Types | |
| enum | DecoratorTypes { + StaticDecorator = 1 +, ConstructorDecorator = 2 +, DestructorDecorator = 4 +, InstanceDecorator = 8 +, + AllDecorators = 0xffff + + } |
+Public Member Functions | |
| PythonQtPrivate () | |
| ~PythonQtPrivate () override | |
| void | setTaskDoneCallback (const PythonQtObjectPtr &callable) |
| PythonQtObjectPtr | checkAndRunCoroutine (const PythonQtObjectPtr &object) |
| Runs the given coroutine (via asyncio), returns a scheduled task if it object is a coroutine. | |
| PythonQtObjectPtr | createAsyncioFuture () |
| Creates a new asyncio.Future object. | |
| const QStringList & | sharedLibrarySuffixes () |
| get the suffixes that are used for shared libraries | |
| bool | isPythonQtObjectPtrMetaId (int id) |
| returns if the id is the id for PythonQtObjectPtr | |
| bool | isPythonQtSafeObjectPtrMetaId (int id) |
| returns if the id is the id for PythonQtSafeObjectPtr | |
| bool | isPythonQtAnyObjectPtrMetaId (int id) |
| returns if the id is either PythonQtObjectPtr or PythonQtSafeObjectPtr | |
| void | addWrapperPointer (void *obj, PythonQtInstanceWrapper *wrapper) |
| add the wrapper pointer (for reuse if the same obj appears while wrapper still exists) | |
| void | removeWrapperPointer (void *obj) |
| remove the wrapper ptr again | |
| void | shellClassDeleted (void *shellClass) |
| called by destructor of shells to allow invalidation of the Python wrapper | |
| void * | unwrapForeignWrapper (const QByteArray &classname, PyObject *obj) |
| try to unwrap the given object to a C++ pointer using the foreign wrapper factories | |
| bool | addParentClass (const char *typeName, const char *parentTypeName, int upcastingOffset) |
| add parent class relation | |
| void | addPolymorphicHandler (const char *typeName, PythonQtPolymorphicHandlerCB *cb) |
| add a handler for polymorphic downcasting | |
| PythonQtClassInfo * | lookupClassInfoAndCreateIfNotPresent (const char *typeName) |
| lookup existing classinfo and return new if not yet present | |
| void | removeSignalEmitter (QObject *obj) |
| called when a signal emitting QObject is destroyed to remove the signal handler from the hash map | |
| PyObject * | wrapQObject (QObject *obj) |
| wrap the given QObject into a Python object (or return existing wrapper!) | |
| PyObject * | wrapPtr (void *ptr, const QByteArray &name, bool passOwnership=false) |
| void | registerClass (const QMetaObject *metaobject, const char *package=nullptr, PythonQtQObjectCreatorFunctionCB *wrapperCreator=nullptr, PythonQtShellSetInstanceWrapperCB *shell=nullptr, PyObject *module=nullptr, int typeSlots=0) |
| registers a QObject derived class to PythonQt (this is implicitly called by addObject as well) | |
| void | registerCPPClass (const char *typeName, const char *parentTypeName=nullptr, const char *package=nullptr, PythonQtQObjectCreatorFunctionCB *wrapperCreator=nullptr, PythonQtShellSetInstanceWrapperCB *shell=nullptr, PyObject *module=nullptr, int typeSlots=0) |
| void | registerGlobalNamespace (const char *typeName, const char *package, PythonQtQObjectCreatorFunctionCB *wrapperCreator, const QMetaObject &metaObject, PyObject *module=nullptr) |
| Same as above, but all enums of the created wrapper will also be added to the given package and to the "Qt" package. | |
| void | registerQObjectClassNames (const QStringList &names) |
| void | addDecorators (QObject *o, int decoTypes) |
| add a decorator object | |
| PythonQtClassWrapper * | createNewPythonQtClassWrapper (PythonQtClassInfo *info, PyObject *module, const QByteArray &pythonClassName) |
| helper method that creates a PythonQtClassWrapper object (returns a new reference) | |
| PythonQtInstanceWrapper * | createNewPythonQtInstanceWrapper (QObject *obj, PythonQtClassInfo *info, void *wrappedPtr=nullptr) |
| helper method that creates a PythonQtInstanceWrapper object and registers it in the object map | |
| PythonQtClassInfo * | getClassInfo (const QMetaObject *meta) |
| get the class info for a meta object (if available) | |
| PythonQtClassInfo * | getClassInfo (const QByteArray &className) |
| get the class info for a meta object (if available) | |
| void | registerLazyClass (const QByteArray &name, const QByteArray &moduleToImport) |
| PythonQtObjectPtr | createModule (const QString &name, PyObject *pycode) |
| creates the new module from the given pycode | |
| PythonQtClassInfo * | currentClassInfoForClassWrapperCreation () |
| get the current class info (for the next PythonQtClassWrapper that is created) and reset it to NULL again | |
| void | handleVirtualOverloadReturnError (const char *signature, const PythonQtMethodInfo *methodInfo, PyObject *result) |
| called by virtual overloads when a python return value can not be converted to the required Qt type | |
| PythonQtObjectPtr | pythonQtModule () const |
| get access to the PythonQt module | |
| PythonQt::ProfilingCB * | profilingCB () const |
| returns the profiling callback, which may be NULL | |
| QString | getSignature (PyObject *object) |
| determines the signature of the given callable object (similar as pydoc) | |
| bool | isMethodDescriptor (PyObject *object) const |
| returns true if the object is a method descriptor (same as inspect.ismethoddescriptor() in inspect.py) | |
| const QMetaObject * | getDynamicMetaObject (PythonQtInstanceWrapper *wrapper, const QMetaObject *prototypeMetaObject) |
| get the dynamic meta object for the given wrapper. It will contain the signals/slots that have been added in Python | |
| const QMetaObject * | setupDynamicMetaObjectChain (PythonQtClassWrapper *type, const QMetaObject *prototypeMetaObject) |
| recursively creates the dynamic meta object chain down to the Qt class wrapper. | |
| const QMetaObject * | buildDynamicMetaObject (PythonQtClassWrapper *type, const QMetaObject *prototypeMetaObject) |
| builds and returns the dynamic meta object for the given type, derived from prototypeMetaObject. | |
| int | handleMetaCall (QObject *object, PythonQtInstanceWrapper *wrapper, QMetaObject::Call call, int id, void **args) |
| redirected from shell classes, tries to call the given meta call on the Python wrapper. | |
| void | callMethodInPython (QMetaMethod &method, PythonQtInstanceWrapper *wrapper, void **args) |
| calls the given method on Python function with same name. | |
+Static Public Member Functions | |
| static PyObject * | wrapMemoryAsBuffer (const void *data, Py_ssize_t size) |
| create a read-only buffer object from the given memory | |
| static PyObject * | wrapMemoryAsBuffer (void *data, Py_ssize_t size) |
| create a read-write buffer object from the given memory | |
| static PyObject * | createEnumValueInstance (PyObject *enumType, unsigned int enumValue) |
| create a new instance of the given enum type with given value (returns a new reference) | |
| static PyObject * | createNewPythonQtEnumWrapper (const char *enumName, PyObject *parentObject) |
| helper that creates a new int derived class that represents the enum of the given name (returns a new reference) | |
| static PyObject * | dummyTuple () |
| the dummy tuple (which is empty and may be used to detected that a wrapper is called from internal wrapper creation | |
+Friends | |
| class | PythonQt |
internal PythonQt details
+ +Definition at line 672 of file PythonQt.h.
+| enum PythonQtPrivate::DecoratorTypes | +
| Enumerator | |
|---|---|
| StaticDecorator | |
| ConstructorDecorator | |
| DestructorDecorator | |
| InstanceDecorator | |
| AllDecorators | |
Definition at line 681 of file PythonQt.h.
+| PythonQtPrivate::PythonQtPrivate | +( | +) | ++ |
+
|
+ +override | +
| void PythonQtPrivate::addDecorators | +( | +QObject * | +o, | +
| + | + | int | +decoTypes | +
| + | ) | ++ |
add a decorator object
+ +| bool PythonQtPrivate::addParentClass | +( | +const char * | +typeName, | +
| + | + | const char * | +parentTypeName, | +
| + | + | int | +upcastingOffset | +
| + | ) | ++ |
add parent class relation
+ +| void PythonQtPrivate::addPolymorphicHandler | +( | +const char * | +typeName, | +
| + | + | PythonQtPolymorphicHandlerCB * | +cb | +
| + | ) | ++ |
add a handler for polymorphic downcasting
+ +| void PythonQtPrivate::addWrapperPointer | +( | +void * | +obj, | +
| + | + | PythonQtInstanceWrapper * | +wrapper | +
| + | ) | ++ |
add the wrapper pointer (for reuse if the same obj appears while wrapper still exists)
+ +| const QMetaObject * PythonQtPrivate::buildDynamicMetaObject | +( | +PythonQtClassWrapper * | +type, | +
| + | + | const QMetaObject * | +prototypeMetaObject | +
| + | ) | ++ |
builds and returns the dynamic meta object for the given type, derived from prototypeMetaObject.
+ +| void PythonQtPrivate::callMethodInPython | +( | +QMetaMethod & | +method, | +
| + | + | PythonQtInstanceWrapper * | +wrapper, | +
| + | + | void ** | +args | +
| + | ) | ++ |
calls the given method on Python function with same name.
+ +| PythonQtObjectPtr PythonQtPrivate::checkAndRunCoroutine | +( | +const PythonQtObjectPtr & | +object | ) | ++ |
Runs the given coroutine (via asyncio), returns a scheduled task if it object is a coroutine.
+ +| PythonQtObjectPtr PythonQtPrivate::createAsyncioFuture | +( | +) | ++ |
Creates a new asyncio.Future object.
+ +
+
|
+ +static | +
create a new instance of the given enum type with given value (returns a new reference)
+ +| PythonQtObjectPtr PythonQtPrivate::createModule | +( | +const QString & | +name, | +
| + | + | PyObject * | +pycode | +
| + | ) | ++ |
creates the new module from the given pycode
+ +| PythonQtClassWrapper * PythonQtPrivate::createNewPythonQtClassWrapper | +( | +PythonQtClassInfo * | +info, | +
| + | + | PyObject * | +module, | +
| + | + | const QByteArray & | +pythonClassName | +
| + | ) | ++ |
helper method that creates a PythonQtClassWrapper object (returns a new reference)
+ +
+
|
+ +static | +
helper that creates a new int derived class that represents the enum of the given name (returns a new reference)
+ +| PythonQtInstanceWrapper * PythonQtPrivate::createNewPythonQtInstanceWrapper | +( | +QObject * | +obj, | +
| + | + | PythonQtClassInfo * | +info, | +
| + | + | void * | +wrappedPtr = nullptr |
+
| + | ) | ++ |
helper method that creates a PythonQtInstanceWrapper object and registers it in the object map
+ +| PythonQtClassInfo * PythonQtPrivate::currentClassInfoForClassWrapperCreation | +( | +) | ++ |
get the current class info (for the next PythonQtClassWrapper that is created) and reset it to NULL again
+ +the dummy tuple (which is empty and may be used to detected that a wrapper is called from internal wrapper creation
+ +| PythonQtClassInfo * PythonQtPrivate::getClassInfo | +( | +const QByteArray & | +className | ) | ++ |
get the class info for a meta object (if available)
+ +| PythonQtClassInfo * PythonQtPrivate::getClassInfo | +( | +const QMetaObject * | +meta | ) | ++ |
get the class info for a meta object (if available)
+ +Referenced by PythonQtConvertListOfKnownClassToPythonList(), and PythonQtConvertPythonListToListOfKnownClass().
+ +| const QMetaObject * PythonQtPrivate::getDynamicMetaObject | +( | +PythonQtInstanceWrapper * | +wrapper, | +
| + | + | const QMetaObject * | +prototypeMetaObject | +
| + | ) | ++ |
get the dynamic meta object for the given wrapper. It will contain the signals/slots that have been added in Python
+ +determines the signature of the given callable object (similar as pydoc)
+ +| int PythonQtPrivate::handleMetaCall | +( | +QObject * | +object, | +
| + | + | PythonQtInstanceWrapper * | +wrapper, | +
| + | + | QMetaObject::Call | +call, | +
| + | + | int | +id, | +
| + | + | void ** | +args | +
| + | ) | ++ |
redirected from shell classes, tries to call the given meta call on the Python wrapper.
+ +| void PythonQtPrivate::handleVirtualOverloadReturnError | +( | +const char * | +signature, | +
| + | + | const PythonQtMethodInfo * | +methodInfo, | +
| + | + | PyObject * | +result | +
| + | ) | ++ |
called by virtual overloads when a python return value can not be converted to the required Qt type
+ +returns true if the object is a method descriptor (same as inspect.ismethoddescriptor() in inspect.py)
+ +
+
|
+ +inline | +
returns if the id is either PythonQtObjectPtr or PythonQtSafeObjectPtr
+ +Definition at line 707 of file PythonQt.h.
+returns if the id is the id for PythonQtObjectPtr
+ +Definition at line 703 of file PythonQt.h.
+
+
|
+ +inline | +
returns if the id is the id for PythonQtSafeObjectPtr
+ +Definition at line 705 of file PythonQt.h.
+| PythonQtClassInfo * PythonQtPrivate::lookupClassInfoAndCreateIfNotPresent | +( | +const char * | +typeName | ) | ++ |
lookup existing classinfo and return new if not yet present
+ +
+
|
+ +inline | +
returns the profiling callback, which may be NULL
+ +Definition at line 819 of file PythonQt.h.
+
+
|
+ +inline | +
get access to the PythonQt module
+ +Definition at line 816 of file PythonQt.h.
+| void PythonQtPrivate::registerClass | +( | +const QMetaObject * | +metaobject, | +
| + | + | const char * | +package = nullptr, |
+
| + | + | PythonQtQObjectCreatorFunctionCB * | +wrapperCreator = nullptr, |
+
| + | + | PythonQtShellSetInstanceWrapperCB * | +shell = nullptr, |
+
| + | + | PyObject * | +module = nullptr, |
+
| + | + | int | +typeSlots = 0 |
+
| + | ) | ++ |
registers a QObject derived class to PythonQt (this is implicitly called by addObject as well)
+ +| void PythonQtPrivate::registerCPPClass | +( | +const char * | +typeName, | +
| + | + | const char * | +parentTypeName = nullptr, |
+
| + | + | const char * | +package = nullptr, |
+
| + | + | PythonQtQObjectCreatorFunctionCB * | +wrapperCreator = nullptr, |
+
| + | + | PythonQtShellSetInstanceWrapperCB * | +shell = nullptr, |
+
| + | + | PyObject * | +module = nullptr, |
+
| + | + | int | +typeSlots = 0 |
+
| + | ) | ++ |
add a wrapper object for the given QMetaType typeName, also does an addClassDecorators() to add constructors for variants (ownership of wrapper is passed to PythonQt)
+Make sure that you have done a qRegisterMetaType first, if typeName is a user type!
+This will add a wrapper object that is used to make calls to the given classname typeName. All slots that take a pointer to typeName as the first argument will be callable from Python on a variant object that contains such a type.
| void PythonQtPrivate::registerGlobalNamespace | +( | +const char * | +typeName, | +
| + | + | const char * | +package, | +
| + | + | PythonQtQObjectCreatorFunctionCB * | +wrapperCreator, | +
| + | + | const QMetaObject & | +metaObject, | +
| + | + | PyObject * | +module = nullptr |
+
| + | ) | ++ |
Same as above, but all enums of the created wrapper will also be added to the given package and to the "Qt" package.
+ +| void PythonQtPrivate::registerLazyClass | +( | +const QByteArray & | +name, | +
| + | + | const QByteArray & | +moduleToImport | +
| + | ) | ++ |
register a class name that causes lazy loading of the moduleToImport when PythonQt encounters the type
+ +| void PythonQtPrivate::registerQObjectClassNames | +( | +const QStringList & | +names | ) | ++ |
as an alternative to registerClass, you can tell PythonQt the names of QObject derived classes and it will register the classes when it first sees a pointer to such a derived class
+ +| void PythonQtPrivate::removeSignalEmitter | +( | +QObject * | +obj | ) | ++ |
called when a signal emitting QObject is destroyed to remove the signal handler from the hash map
+ +remove the wrapper ptr again
+ +| void PythonQtPrivate::setTaskDoneCallback | +( | +const PythonQtObjectPtr & | +callable | ) | ++ |
Set a callable that is used as the argument for the add_done_callback for the Task created by checkAndRunCoroutine
+ +| const QMetaObject * PythonQtPrivate::setupDynamicMetaObjectChain | +( | +PythonQtClassWrapper * | +type, | +
| + | + | const QMetaObject * | +prototypeMetaObject | +
| + | ) | ++ |
recursively creates the dynamic meta object chain down to the Qt class wrapper.
+ +
+
|
+ +inline | +
get the suffixes that are used for shared libraries
+ +Definition at line 700 of file PythonQt.h.
+called by destructor of shells to allow invalidation of the Python wrapper
+ +| void * PythonQtPrivate::unwrapForeignWrapper | +( | +const QByteArray & | +classname, | +
| + | + | PyObject * | +obj | +
| + | ) | ++ |
try to unwrap the given object to a C++ pointer using the foreign wrapper factories
+ +
+
|
+ +static | +
create a read-only buffer object from the given memory
+ +
+
|
+ +static | +
create a read-write buffer object from the given memory
+ +| PyObject * PythonQtPrivate::wrapPtr | +( | +void * | +ptr, | +
| + | + | const QByteArray & | +name, | +
| + | + | bool | +passOwnership = false |
+
| + | ) | ++ |
wrap the given ptr into a Python object (or return existing wrapper!) if there is a known QObject of that name or a known wrapper in the factory. If passOwnership == true, the ownership is passed to PythonQt, so the object will be deleted by PythonQt when the Python wrapper goes away.
+ +Referenced by PythonQtConvertListOfKnownClassToPythonList().
+ +| PyObject * PythonQtPrivate::wrapQObject | +( | +QObject * | +obj | ) | ++ |
wrap the given QObject into a Python object (or return existing wrapper!)
+ +Definition at line 917 of file PythonQt.h.
+ +|
+ PythonQt
+
+ |
+
This is the complete list of members for PythonQtQFileImporter, including all inherited members.
+| exists(const QString &filename) override | PythonQtQFileImporter | virtual |
| ignoreUpdatedPythonSourceFiles() | PythonQtImportFileInterface | inlinevirtual |
| importedModule(const QString &) | PythonQtImportFileInterface | inlinevirtual |
| isEggArchive(const QString &filename) override | PythonQtQFileImporter | virtual |
| lastModifiedDate(const QString &filename) override | PythonQtQFileImporter | virtual |
| PythonQtImportFileInterface() | PythonQtImportFileInterface | inline |
| PythonQtQFileImporter() | PythonQtQFileImporter | |
| readFileAsBytes(const QString &filename) override | PythonQtQFileImporter | virtual |
| readSourceFile(const QString &filename, bool &ok) override | PythonQtQFileImporter | virtual |
| ~PythonQtImportFileInterface() | PythonQtImportFileInterface | inlinevirtual |
| ~PythonQtQFileImporter() override | PythonQtQFileImporter |
|
+ PythonQt
+
+ |
+
default importer implementation using QFile to load python code + More...
+ +#include <PythonQtQFileImporter.h>
+
++Public Member Functions | |
| PythonQtQFileImporter () | |
| ~PythonQtQFileImporter () override | |
| QByteArray | readFileAsBytes (const QString &filename) override |
| read the given file as byte array, without doing any linefeed translations | |
| QByteArray | readSourceFile (const QString &filename, bool &ok) override |
| bool | exists (const QString &filename) override |
| returns if the file exists | |
| bool | isEggArchive (const QString &filename) override |
| QDateTime | lastModifiedDate (const QString &filename) override |
| get the last modified data of a file | |
Public Member Functions inherited from PythonQtImportFileInterface | |
| virtual | ~PythonQtImportFileInterface () |
| PythonQtImportFileInterface () | |
| virtual bool | ignoreUpdatedPythonSourceFiles () |
| virtual void | importedModule (const QString &) |
default importer implementation using QFile to load python code
+ +Definition at line 49 of file PythonQtQFileImporter.h.
+| PythonQtQFileImporter::PythonQtQFileImporter | +( | +) | ++ |
+
|
+ +override | +
+
|
+ +overridevirtual | +
returns if the file exists
+ +Implements PythonQtImportFileInterface.
+ +
+
|
+ +overridevirtual | +
returns true if the given file is an egg archive (e.g. zip). If the egg is a directory then false is returned.
+ +Implements PythonQtImportFileInterface.
+ +
+
|
+ +overridevirtual | +
get the last modified data of a file
+ +Implements PythonQtImportFileInterface.
+ +
+
|
+ +overridevirtual | +
read the given file as byte array, without doing any linefeed translations
+ +Implements PythonQtImportFileInterface.
+ +
+
|
+ +overridevirtual | +
read a source file, expects a readable Python text file with translated line feeds. If the file can not be load OR it can not be verified, ok is set to false
+ +Implements PythonQtImportFileInterface.
+ +|
+ PythonQt
+
+ |
+
This is the complete list of members for PythonQtSafeObjectPtr, including all inherited members.
+|
+ PythonQt
+
+ |
+
a smart pointer that stores a PyObject pointer and that handles reference counting automatically + More...
+ +#include <PythonQtObjectPtr.h>
+Protected Member Functions | |
| void | setObject (PyObject *o) |
| void | setObjectUnsafe (PyObject *o) |
a smart pointer that stores a PyObject pointer and that handles reference counting automatically
+ +Definition at line 198 of file PythonQtObjectPtr.h.
+
+
|
+ +inline | +
Definition at line 201 of file PythonQtObjectPtr.h.
+
+
|
+ +inline | +
Definition at line 206 of file PythonQtObjectPtr.h.
+References PythonQtConvertPairToPython().
+ +
+
|
+ +inline | +
Definition at line 212 of file PythonQtObjectPtr.h.
+ +References PythonQtConvertPairToPython().
+ +
+
|
+ +inlinenoexcept | +
rvalue copy constructor, does not need any incref/decref.
+ +Definition at line 219 of file PythonQtObjectPtr.h.
+ +References PythonQtConvertPairToPython().
+ +
+
|
+ +inline | +
rvalue copy constructor, does not need any incref/decref.
+ +Definition at line 226 of file PythonQtObjectPtr.h.
+ +| PythonQtSafeObjectPtr::PythonQtSafeObjectPtr | +( | +PyObject * | +o | ) | ++ |
| PythonQtSafeObjectPtr::~PythonQtSafeObjectPtr | +( | +) | ++ |
+
|
+ +inline | +
Definition at line 282 of file PythonQtObjectPtr.h.
+
+
|
+ +inline | +
Definition at line 290 of file PythonQtObjectPtr.h.
+
+
|
+ +inline | +
Definition at line 288 of file PythonQtObjectPtr.h.
+
+
|
+ +inline | +
Definition at line 276 of file PythonQtObjectPtr.h.
+References PythonQtConvertPairToPython().
+ +
+
|
+ +inline | +
Definition at line 280 of file PythonQtObjectPtr.h.
+ +References PythonQtConvertPairToPython().
+ +
+
|
+ +inline | +
Definition at line 286 of file PythonQtObjectPtr.h.
+
+
|
+ +inline | +
Definition at line 284 of file PythonQtObjectPtr.h.
+
+
|
+ +inline | +
Definition at line 241 of file PythonQtObjectPtr.h.
+References PythonQtConvertPairToPython().
+ +
+
|
+ +inline | +
Definition at line 235 of file PythonQtObjectPtr.h.
+ +References PythonQtConvertPairToPython().
+ +
+
|
+ +inline | +
Definition at line 268 of file PythonQtObjectPtr.h.
+ +References PythonQtConvertPairToPython().
+ +
+
|
+ +inline | +
rvalue assignment operator that steals the reference from p
+ +Definition at line 259 of file PythonQtObjectPtr.h.
+ +References PythonQtConvertPairToPython().
+ +
+
|
+ +inlinenoexcept | +
rvalue assignment operator that steals the reference from p
+ +Definition at line 248 of file PythonQtObjectPtr.h.
+ +References PythonQtConvertPairToPython().
+ +
+
|
+ +inline | +
Definition at line 274 of file PythonQtObjectPtr.h.
+ +References PythonQtConvertPairToPython().
+ +
+
|
+ +inline | +
Definition at line 278 of file PythonQtObjectPtr.h.
+ +References PythonQtConvertPairToPython().
+ +
+
|
+ +protected | +
+
|
+ +inline | +
takes the object from the pointer, leaving the pointer empty. the caller has to take care about the decref of the taken object!
+ +Definition at line 294 of file PythonQtObjectPtr.h.
+References PythonQtConvertPairToPython().
+ +|
+ PythonQt
+
+ |
+
This is the complete list of members for PythonQtSignalReceiver, including all inherited members.
+| addSignalHandler(const char *signal, PyObject *callable) | PythonQtSignalReceiver | |
| PythonQtSignalReceiver(QObject *obj) | PythonQtSignalReceiver | |
| PythonQtSignalReceiverBase(QObject *obj) | PythonQtSignalReceiverBase | inline |
| qt_metacall(QMetaObject::Call c, int id, void **arguments) override | PythonQtSignalReceiver | |
| removeSignalHandler(const char *signal, PyObject *callable=nullptr) | PythonQtSignalReceiver | |
| ~PythonQtSignalReceiver() override | PythonQtSignalReceiver |
|
+ PythonQt
+
+ |
+
receives all signals for one QObject + More...
+ +#include <PythonQtSignalReceiver.h>
+
++Public Member Functions | |
| PythonQtSignalReceiver (QObject *obj) | |
| ~PythonQtSignalReceiver () override | |
| bool | addSignalHandler (const char *signal, PyObject *callable) |
| add a signal handler | |
| bool | removeSignalHandler (const char *signal, PyObject *callable=nullptr) |
| remove a signal handler for given callable (or all callables on that signal if callable is NULL) | |
| int | qt_metacall (QMetaObject::Call c, int id, void **arguments) override |
| we implement this method to simulate a number of slots that match the ids in _targets | |
Public Member Functions inherited from PythonQtSignalReceiverBase | |
| PythonQtSignalReceiverBase (QObject *obj) | |
receives all signals for one QObject
+we derive from our base but do not declare the QObject macro because we want to reimplement qt_metacall only.
+ +Definition at line 116 of file PythonQtSignalReceiver.h.
+| PythonQtSignalReceiver::PythonQtSignalReceiver | +( | +QObject * | +obj | ) | ++ |
+
|
+ +override | +
| bool PythonQtSignalReceiver::addSignalHandler | +( | +const char * | +signal, | +
| + | + | PyObject * | +callable | +
| + | ) | ++ |
add a signal handler
+ +
+
|
+ +override | +
we implement this method to simulate a number of slots that match the ids in _targets
+ +| bool PythonQtSignalReceiver::removeSignalHandler | +( | +const char * | +signal, | +
| + | + | PyObject * | +callable = nullptr |
+
| + | ) | ++ |
remove a signal handler for given callable (or all callables on that signal if callable is NULL)
+ +|
+ PythonQt
+
+ |
+
This is the complete list of members for PythonQtSignalReceiverBase, including all inherited members.
+| PythonQtSignalReceiverBase(QObject *obj) | PythonQtSignalReceiverBase | inline |
|
+ PythonQt
+
+ |
+
base class for signal receivers + More...
+ +#include <PythonQtSignalReceiver.h>
+
++Public Member Functions | |
| PythonQtSignalReceiverBase (QObject *obj) | |
base class for signal receivers
+ +Definition at line 105 of file PythonQtSignalReceiver.h.
+
+
|
+ +inline | +
Definition at line 109 of file PythonQtSignalReceiver.h.
+|
+ PythonQt
+
+ |
+
This is the complete list of members for PythonQtSignalTarget, including all inherited members.
+| call(void **arguments) const | PythonQtSignalTarget | |
| call(PyObject *callable, const PythonQtMethodInfo *methodInfo, void **arguments, bool skipFirstArgumentOfMethodInfo=false) | PythonQtSignalTarget | static |
| isSame(int signalId, PyObject *callable) const | PythonQtSignalTarget | |
| methodInfo() const | PythonQtSignalTarget | inline |
| PythonQtSignalTarget() | PythonQtSignalTarget | inline |
| PythonQtSignalTarget(int signalId, const PythonQtMethodInfo *methodInfo, int slotId, PyObject *callable) | PythonQtSignalTarget | inline |
| signalId() const | PythonQtSignalTarget | inline |
| slotId() const | PythonQtSignalTarget | inline |
| ~PythonQtSignalTarget() | PythonQtSignalTarget | inline |
|
+ PythonQt
+
+ |
+
stores information about a signal target + More...
+ +#include <PythonQtSignalReceiver.h>
+Public Member Functions | |
| PythonQtSignalTarget () | |
| PythonQtSignalTarget (int signalId, const PythonQtMethodInfo *methodInfo, int slotId, PyObject *callable) | |
| ~PythonQtSignalTarget () | |
| int | signalId () const |
| get the id of the original signal | |
| int | slotId () const |
| get the id that was assigned to this simulated slot | |
| const PythonQtMethodInfo * | methodInfo () const |
| get the signals parameter info | |
| void | call (void **arguments) const |
| call the python callable with the given arguments (as defined in methodInfo) | |
| bool | isSame (int signalId, PyObject *callable) const |
| check if it is the same signal target | |
+Static Public Member Functions | |
| static PyObject * | call (PyObject *callable, const PythonQtMethodInfo *methodInfo, void **arguments, bool skipFirstArgumentOfMethodInfo=false) |
| call the given callable with arguments described by PythonQtMethodInfo, returns a new reference as result value (or NULL) | |
stores information about a signal target
+copy construction and assignment works fine with the C++ standard behavior and are thus not implemented
+ +Definition at line 56 of file PythonQtSignalReceiver.h.
+
+
|
+ +inline | +
Definition at line 59 of file PythonQtSignalReceiver.h.
+
+
|
+ +inline | +
Definition at line 66 of file PythonQtSignalReceiver.h.
+References PythonQtConvertPairToPython().
+ +
+
|
+ +inline | +
Definition at line 74 of file PythonQtSignalReceiver.h.
+
+
|
+ +static | +
call the given callable with arguments described by PythonQtMethodInfo, returns a new reference as result value (or NULL)
+ +call the python callable with the given arguments (as defined in methodInfo)
+ +| bool PythonQtSignalTarget::isSame | +( | +int | +signalId, | +
| + | + | PyObject * | +callable | +
| + | ) | +const | +
check if it is the same signal target
+ +
+
|
+ +inline | +
get the signals parameter info
+ +Definition at line 83 of file PythonQtSignalReceiver.h.
+
+
|
+ +inline | +
get the id of the original signal
+ +Definition at line 77 of file PythonQtSignalReceiver.h.
+
+
|
+ +inline | +
get the id that was assigned to this simulated slot
+ +Definition at line 80 of file PythonQtSignalReceiver.h.
+|
+ PythonQt
+
+ |
+
This is the complete list of members for PythonQtSingleShotTimer, including all inherited members.
+| PythonQtSingleShotTimer(int msec, const PythonQtObjectPtr &callable) | PythonQtSingleShotTimer | |
| slotTimeout() | PythonQtSingleShotTimer | slot |
| ~PythonQtSingleShotTimer() override | PythonQtSingleShotTimer |
|
+ PythonQt
+
+ |
+
#include <PythonQtStdDecorators.h>
+ +Public Slots | |
| void | slotTimeout () |
+Public Member Functions | |
| PythonQtSingleShotTimer (int msec, const PythonQtObjectPtr &callable) | |
| ~PythonQtSingleShotTimer () override | |
Definition at line 161 of file PythonQtStdDecorators.h.
+| PythonQtSingleShotTimer::PythonQtSingleShotTimer | +( | +int | +msec, | +
| + | + | const PythonQtObjectPtr & | +callable | +
| + | ) | ++ |
+
|
+ +override | +
+
|
+ +slot | +
|
+ PythonQt
+
+ |
+
This is the complete list of members for PythonQtSlotInfo, including all inherited members.
+|
+ PythonQt
+
+ |
+
stores information about a slot, including a next pointer to overloaded slots + More...
+ +#include <PythonQtMethodInfo.h>
+
++Public Types | |
| enum | Type { MemberSlot +, InstanceDecorator +, ClassDecorator + } |
Public Types inherited from PythonQtMethodInfo | |
| enum | ParameterType { Unknown = -1 +, Variant = -2 + } |
+Static Public Member Functions | |
| static void | invokeQtMethod (QObject *obj, PythonQtSlotInfo *slot, void **argList) |
| Invoke the given slot on obj, save/restore thread state if needed. | |
| static void | setGlobalShouldAllowThreads (bool flag) |
| Sets if calling slots should release the GIL to allow other Python threads while being inside of C++. | |
| static bool | getGlobalShouldAllowThreads () |
| Returns if calling slots should release the GIL to allow Python threads while being inside of C++. | |
Static Public Member Functions inherited from PythonQtMethodInfo | |
| static const PythonQtMethodInfo * | getCachedMethodInfo (const QMetaMethod &method, PythonQtClassInfo *classInfo) |
| static const PythonQtMethodInfo * | getCachedMethodInfoFromArgumentList (int numArgs, const char **args) |
| get the cached method info using the passed in list of return value and arguments, return value needs to be passed as first arg | |
| static void | cleanupCachedMethodInfos () |
| cleanup the cache | |
| static int | nameToType (const char *name) |
| returns the id for the given type (using an internal dictionary) | |
| static void | addParameterTypeAlias (const QByteArray &alias, const QByteArray &name) |
| add an alias for a typename, e.g. QObjectList and QList<QObject*>. | |
| static void | fillParameterInfo (ParameterInfo &type, const QByteArray &name, PythonQtClassInfo *classInfo=nullptr) |
| fill the parameter info for the given type name | |
| static const ParameterInfo & | getParameterInfoForMetaType (int type) |
| returns a parameter info for the given metatype (and creates and caches one if it is not yet present) | |
| static int | getInnerTemplateMetaType (const QByteArray &typeName) |
| returns the inner type id of a simple template of the form SomeObject<InnerType> | |
| static QByteArray | getInnerTemplateTypeName (const QByteArray &typeName) |
| returns the inner type name of a simple template of the form SomeObject<InnerType> | |
| static QByteArray | getInnerListTypeName (const QByteArray &typeName) |
| returns the inner type name of a simple template or the typename without appended "List". | |
+Additional Inherited Members | |
Protected Member Functions inherited from PythonQtMethodInfo | |
| void | setupAllowThreads () |
Protected Attributes inherited from PythonQtMethodInfo | |
| QList< ParameterInfo > | _parameters |
| bool | _shouldAllowThreads |
Static Protected Attributes inherited from PythonQtMethodInfo | |
| static QHash< QByteArray, int > | _parameterTypeDict |
| static QHash< QByteArray, QByteArray > | _parameterNameAliases |
| static QHash< QByteArray, PythonQtMethodInfo * > | _cachedSignatures |
| stores the cached signatures of methods to speedup mapping from Qt to Python types | |
| static QHash< int, ParameterInfo > | _cachedParameterInfos |
stores information about a slot, including a next pointer to overloaded slots
+ +Definition at line 147 of file PythonQtMethodInfo.h.
+| enum PythonQtSlotInfo::Type | +
| Enumerator | |
|---|---|
| MemberSlot | |
| InstanceDecorator | |
| ClassDecorator | |
Definition at line 150 of file PythonQtMethodInfo.h.
+
+
|
+ +inline | +
Definition at line 152 of file PythonQtMethodInfo.h.
+References PythonQtMethodInfo::_parameters, and PythonQtConvertPairToPython().
+ +
+
|
+ +inline | +
Definition at line 165 of file PythonQtMethodInfo.h.
+References PythonQtConvertPairToPython().
+ +| QList< ParameterInfo > PythonQtSlotInfo::arguments | +( | +) | +const | +
get the parameter infos for the arguments, without return type and instance decorator.
+ +
+
|
+ +inline | +
Definition at line 207 of file PythonQtMethodInfo.h.
+| void PythonQtSlotInfo::deleteOverloadsAndThis | +( | +) | ++ |
| QString PythonQtSlotInfo::fullSignature | +( | +bool | +skipReturnValue = false, |
+
| + | + | int | +optionalArgsIndex = -1 |
+
| + | ) | +const | +
get the full signature including return type
+ +
+
|
+ +static | +
Returns if calling slots should release the GIL to allow Python threads while being inside of C++.
+ +| QByteArray PythonQtSlotInfo::getImplementingClassName | +( | +) | +const | +
Returns the class name that originally implements this method, regardless where the wrapper is located/implemented.
+ +
+
|
+ +static | +
Invoke the given slot on obj, save/restore thread state if needed.
+ +
+
|
+ +inline | +
returns if the slot is a constructor slot
+ +Definition at line 205 of file PythonQtMethodInfo.h.
+
+
|
+ +inline | +
returns if the slot is a decorator slot
+ +Definition at line 202 of file PythonQtMethodInfo.h.
+
+
|
+ +inline | +
Definition at line 186 of file PythonQtMethodInfo.h.
+
+
|
+ +inline | +
get next overloaded slot (which has the same name)
+ +Definition at line 196 of file PythonQtMethodInfo.h.
+| QStringList PythonQtSlotInfo::overloads | +( | +bool | +skipReturnValue = false | ) | +const | +
gets a list of all overload signatures. Signatures which only differ because of default values are joined using "[]" to indicate the optional arguments.
+ +
+
|
+ +static | +
Sets if calling slots should release the GIL to allow other Python threads while being inside of C++.
+ +
+
|
+ +inline | +
set the next overloaded slot
+ +Definition at line 199 of file PythonQtMethodInfo.h.
+References PythonQtConvertPairToPython().
+ +
+
|
+ +inline | +
Definition at line 188 of file PythonQtMethodInfo.h.
+| QByteArray PythonQtSlotInfo::signature | +( | +) | +const | +
get the Qt signature of the slot
+ +
+
|
+ +inline | +
get the index of the slot (needed for qt_metacall)
+ +Definition at line 193 of file PythonQtMethodInfo.h.
+| QByteArray PythonQtSlotInfo::slotName | +( | +bool | +removeDecorators = false | ) | +const | +
get the short slot name
+ +
+
|
+ +inline | +
Definition at line 190 of file PythonQtMethodInfo.h.
+|
+ PythonQt
+
+ |
+
This is the complete list of members for PythonQtStdDecorators, including all inherited members.
+| children(QObject *o) | PythonQtStdDecorators | slot |
| connect(QObject *sender, const QByteArray &signal, PyObject *callable) | PythonQtStdDecorators | slot |
| connect(QObject *sender, const QByteArray &signal, QObject *receiver, const QByteArray &slot, Qt::ConnectionType type=Qt::AutoConnection) | PythonQtStdDecorators | slot |
| connect(QObject *receiver, QObject *sender, const QByteArray &signal, const QByteArray &slot, Qt::ConnectionType type=Qt::AutoConnection) | PythonQtStdDecorators | inlineslot |
| disconnect(QObject *sender, const QByteArray &signal, PyObject *callable=nullptr) | PythonQtStdDecorators | slot |
| disconnect(QObject *sender, const QByteArray &signal, QObject *receiver, const QByteArray &slot) | PythonQtStdDecorators | slot |
| findChild(QObject *parent, PyObject *type, const QString &name=QString()) | PythonQtStdDecorators | slot |
| findChildren(QObject *parent, PyObject *type, const QString &name=QString()) | PythonQtStdDecorators | slot |
| findChildren(QObject *parent, PyObject *type, const QRegularExpression ®Exp) | PythonQtStdDecorators | slot |
| metaObject(QObject *obj) | PythonQtStdDecorators | slot |
| parent(QObject *o) | PythonQtStdDecorators | slot |
| property(QObject *o, const char *name) | PythonQtStdDecorators | slot |
| setParent(QObject *o, PythonQtNewOwnerOfThis< QObject * > parent) | PythonQtStdDecorators | slot |
| setProperty(QObject *o, const char *name, const QVariant &value) | PythonQtStdDecorators | slot |
| static_QObject_connect(QObject *sender, const QByteArray &signal, PyObject *callable) | PythonQtStdDecorators | inlineslot |
| static_QObject_connect(QObject *sender, const QByteArray &signal, QObject *receiver, const QByteArray &slot, Qt::ConnectionType type=Qt::AutoConnection) | PythonQtStdDecorators | inlineslot |
| static_QObject_disconnect(QObject *sender, const QByteArray &signal, PyObject *callable=nullptr) | PythonQtStdDecorators | inlineslot |
| static_QObject_disconnect(QObject *sender, const QByteArray &signal, QObject *receiver, const QByteArray &slot) | PythonQtStdDecorators | inlineslot |
| static_Qt_qAbs(double a) | PythonQtStdDecorators | inlineslot |
| static_Qt_qBound(double a, double b, double c) | PythonQtStdDecorators | inlineslot |
| static_Qt_qCritical(const QByteArray &msg) | PythonQtStdDecorators | inlineslot |
| static_Qt_qDebug(const QByteArray &msg) | PythonQtStdDecorators | inlineslot |
| static_Qt_qFatal(const QByteArray &msg) | PythonQtStdDecorators | inlineslot |
| static_Qt_qFuzzyCompare(double a, double b) | PythonQtStdDecorators | inlineslot |
| static_Qt_qMax(double a, double b) | PythonQtStdDecorators | inlineslot |
| static_Qt_qMin(double a, double b) | PythonQtStdDecorators | inlineslot |
| static_Qt_qrand() | PythonQtStdDecorators | inlineslot |
| static_Qt_qRound(double a) | PythonQtStdDecorators | inlineslot |
| static_Qt_qRound64(double a) | PythonQtStdDecorators | inlineslot |
| static_Qt_qsrand(uint a) | PythonQtStdDecorators | inlineslot |
| static_Qt_qVersion() | PythonQtStdDecorators | inlineslot |
| static_Qt_qWarning(const QByteArray &msg) | PythonQtStdDecorators | inlineslot |
| static_Qt_SIGNAL(const QString &s) | PythonQtStdDecorators | inlineslot |
| static_Qt_SLOT(const QString &s) | PythonQtStdDecorators | inlineslot |
| static_QTimer_singleShot(int msec, PyObject *callable) | PythonQtStdDecorators | slot |
| tr(QObject *obj, const QString &text, const QString &ambig=QString(), int n=-1) | PythonQtStdDecorators | slot |
|
+ PythonQt
+
+ |
+
#include <PythonQtStdDecorators.h>
+ Definition at line 65 of file PythonQtStdDecorators.h.
+
+
|
+ +slot | +
+
|
+ +inlineslot | +
Definition at line 73 of file PythonQtStdDecorators.h.
+References PythonQtConvertPairToPython().
+ +
+
|
+ +slot | +
+
|
+ +slot | +
+
|
+ +slot | +
+
|
+ +slot | +
+
|
+ +slot | +
+
|
+ +slot | +
+
|
+ +slot | +
+
|
+ +slot | +
+
|
+ +slot | +
+
|
+ +slot | +
+
|
+ +slot | +
+
|
+ +slot | +
+
|
+ +inlineslot | +
Definition at line 78 of file PythonQtStdDecorators.h.
+ +References PythonQtConvertPairToPython().
+ +
+
|
+ +inlineslot | +
Definition at line 82 of file PythonQtStdDecorators.h.
+ +References PythonQtConvertPairToPython().
+ +
+
|
+ +inlineslot | +
Definition at line 89 of file PythonQtStdDecorators.h.
+References PythonQtConvertPairToPython().
+ +
+
|
+ +inlineslot | +
Definition at line 93 of file PythonQtStdDecorators.h.
+ +References PythonQtConvertPairToPython().
+ +
+
|
+ +inlineslot | +
Definition at line 111 of file PythonQtStdDecorators.h.
+ +References PythonQtConvertPairToPython().
+ +
+
|
+ +inlineslot | +
Definition at line 112 of file PythonQtStdDecorators.h.
+ +References PythonQtConvertPairToPython().
+ +
+
|
+ +inlineslot | +
Definition at line 117 of file PythonQtStdDecorators.h.
+ +References PythonQtConvertPairToPython().
+ +
+
|
+ +inlineslot | +
Definition at line 113 of file PythonQtStdDecorators.h.
+ +References PythonQtConvertPairToPython().
+ +
+
|
+ +inlineslot | +
Definition at line 119 of file PythonQtStdDecorators.h.
+ +References PythonQtConvertPairToPython().
+ +
+
|
+ +inlineslot | +
Definition at line 121 of file PythonQtStdDecorators.h.
+References PythonQtConvertPairToPython().
+ +
+
|
+ +inlineslot | +
Definition at line 122 of file PythonQtStdDecorators.h.
+ +References PythonQtConvertPairToPython().
+ +
+
|
+ +inlineslot | +
Definition at line 123 of file PythonQtStdDecorators.h.
+ +References PythonQtConvertPairToPython().
+ +
+
|
+ +inlineslot | +
Definition at line 128 of file PythonQtStdDecorators.h.
+References PythonQtConvertPairToPython().
+ +
+
|
+ +inlineslot | +
Definition at line 124 of file PythonQtStdDecorators.h.
+ +References PythonQtConvertPairToPython().
+ +
+
|
+ +inlineslot | +
Definition at line 125 of file PythonQtStdDecorators.h.
+ +References PythonQtConvertPairToPython().
+ +
+
|
+ +inlineslot | +
Definition at line 137 of file PythonQtStdDecorators.h.
+References PythonQtConvertPairToPython().
+ +
+
|
+ +inlineslot | +
Definition at line 126 of file PythonQtStdDecorators.h.
+References PythonQtConvertPairToPython().
+ +
+
|
+ +inlineslot | +
Definition at line 115 of file PythonQtStdDecorators.h.
+ +References PythonQtConvertPairToPython().
+ +
+
|
+ +inlineslot | +
Definition at line 148 of file PythonQtStdDecorators.h.
+ +References PythonQtConvertPairToPython().
+ +
+
|
+ +inlineslot | +
Definition at line 149 of file PythonQtStdDecorators.h.
+ +References PythonQtConvertPairToPython().
+ +
+
|
+ +slot | +
+
|
+ +slot | +
|
+ PythonQt
+
+ |
+
This is the complete list of members for PythonQtThreadStateSaver, including all inherited members.
+| PythonQtThreadStateSaver() | PythonQtThreadStateSaver | inline |
| restore() | PythonQtThreadStateSaver | inline |
| save() | PythonQtThreadStateSaver | inline |
| ~PythonQtThreadStateSaver() | PythonQtThreadStateSaver | inline |
|
+ PythonQt
+
+ |
+
#include <PythonQtThreadSupport.h>
+Public Member Functions | |
| PythonQtThreadStateSaver () | |
| ~PythonQtThreadStateSaver () | |
| void | save () |
| void | restore () |
This class wraps the Python save/restore thread state API. It can be used to allow other Python threads to run when entering C++ code from Python code.
+ +Definition at line 104 of file PythonQtThreadSupport.h.
+
+
|
+ +inline | +
Definition at line 108 of file PythonQtThreadSupport.h.
+References save().
+ +
+
|
+ +inline | +
Definition at line 110 of file PythonQtThreadSupport.h.
+References restore().
+ +
+
|
+ +inline | +
Definition at line 114 of file PythonQtThreadSupport.h.
+References PythonQtConvertPairToPython().
+ +Referenced by ~PythonQtThreadStateSaver().
+ +
+
|
+ +inline | +
Definition at line 112 of file PythonQtThreadSupport.h.
+References PythonQtConvertPairToPython().
+ +Referenced by PythonQtThreadStateSaver().
+ +|
+ PythonQt
+
+ |
+
This is the complete list of members for PythonQtWrapper_QMetaObject, including all inherited members.
+| classInfo(QMetaObject *obj, int index) const | PythonQtWrapper_QMetaObject | inlineslot |
| classInfoCount(QMetaObject *obj) const | PythonQtWrapper_QMetaObject | inlineslot |
| classInfoOffset(QMetaObject *obj) const | PythonQtWrapper_QMetaObject | inlineslot |
| constructor(QMetaObject *obj, int index) const | PythonQtWrapper_QMetaObject | inlineslot |
| constructorCount(QMetaObject *obj) const | PythonQtWrapper_QMetaObject | inlineslot |
| enumerator(QMetaObject *obj, int index) const | PythonQtWrapper_QMetaObject | inlineslot |
| enumeratorCount(QMetaObject *obj) const | PythonQtWrapper_QMetaObject | inlineslot |
| enumeratorOffset(QMetaObject *obj) const | PythonQtWrapper_QMetaObject | inlineslot |
| getClassName(QMetaObject *obj) const | PythonQtWrapper_QMetaObject | inlineslot |
| indexOfClassInfo(QMetaObject *obj, const char *name) const | PythonQtWrapper_QMetaObject | inlineslot |
| indexOfConstructor(QMetaObject *obj, const char *constructor) const | PythonQtWrapper_QMetaObject | inlineslot |
| indexOfEnumerator(QMetaObject *obj, const char *name) const | PythonQtWrapper_QMetaObject | inlineslot |
| indexOfMethod(QMetaObject *obj, const char *method) const | PythonQtWrapper_QMetaObject | inlineslot |
| indexOfProperty(QMetaObject *obj, const char *name) const | PythonQtWrapper_QMetaObject | inlineslot |
| indexOfSignal(QMetaObject *obj, const char *signal) const | PythonQtWrapper_QMetaObject | inlineslot |
| indexOfSlot(QMetaObject *obj, const char *slot) const | PythonQtWrapper_QMetaObject | inlineslot |
| method(QMetaObject *obj, int index) const | PythonQtWrapper_QMetaObject | inlineslot |
| methodCount(QMetaObject *obj) const | PythonQtWrapper_QMetaObject | inlineslot |
| methodOffset(QMetaObject *obj) const | PythonQtWrapper_QMetaObject | inlineslot |
| property(QMetaObject *obj, int index) const | PythonQtWrapper_QMetaObject | inlineslot |
| propertyCount(QMetaObject *obj) const | PythonQtWrapper_QMetaObject | inlineslot |
| propertyOffset(QMetaObject *obj) const | PythonQtWrapper_QMetaObject | inlineslot |
| static_QMetaObject_checkConnectArgs(const char *signal, const char *method) | PythonQtWrapper_QMetaObject | inlineslot |
| static_QMetaObject_normalizedSignature(const char *method) | PythonQtWrapper_QMetaObject | inlineslot |
| static_QMetaObject_normalizedType(const char *type) | PythonQtWrapper_QMetaObject | inlineslot |
| superClass(QMetaObject *obj) const | PythonQtWrapper_QMetaObject | inlineslot |
| userProperty(QMetaObject *obj) const | PythonQtWrapper_QMetaObject | inlineslot |
|
+ PythonQt
+
+ |
+
#include <PythonQtStdDecorators.h>
+ Definition at line 175 of file PythonQtStdDecorators.h.
+
+
|
+ +inlineslot | +
Definition at line 210 of file PythonQtStdDecorators.h.
+References PythonQtConvertPairToPython().
+ +
+
|
+ +inlineslot | +
Definition at line 193 of file PythonQtStdDecorators.h.
+References PythonQtConvertPairToPython().
+ +
+
|
+ +inlineslot | +
Definition at line 187 of file PythonQtStdDecorators.h.
+References PythonQtConvertPairToPython().
+ +
+
|
+ +inlineslot | +
Definition at line 206 of file PythonQtStdDecorators.h.
+References PythonQtConvertPairToPython().
+ +Referenced by indexOfConstructor().
+ +
+
|
+ +inlineslot | +
Definition at line 189 of file PythonQtStdDecorators.h.
+References PythonQtConvertPairToPython().
+ +
+
|
+ +inlineslot | +
Definition at line 208 of file PythonQtStdDecorators.h.
+References PythonQtConvertPairToPython().
+ +
+
|
+ +inlineslot | +
Definition at line 191 of file PythonQtStdDecorators.h.
+References PythonQtConvertPairToPython().
+ +
+
|
+ +inlineslot | +
Definition at line 185 of file PythonQtStdDecorators.h.
+References PythonQtConvertPairToPython().
+ +
+
|
+ +inlineslot | +
Definition at line 181 of file PythonQtStdDecorators.h.
+References PythonQtConvertPairToPython().
+ +
+
|
+ +inlineslot | +
Definition at line 204 of file PythonQtStdDecorators.h.
+References PythonQtConvertPairToPython().
+ +
+
|
+ +inlineslot | +
Definition at line 195 of file PythonQtStdDecorators.h.
+References constructor(), and PythonQtConvertPairToPython().
+ +
+
|
+ +inlineslot | +
Definition at line 202 of file PythonQtStdDecorators.h.
+References PythonQtConvertPairToPython().
+ +
+
|
+ +inlineslot | +
Definition at line 199 of file PythonQtStdDecorators.h.
+References method(), and PythonQtConvertPairToPython().
+ +
+
|
+ +inlineslot | +
Definition at line 203 of file PythonQtStdDecorators.h.
+References PythonQtConvertPairToPython().
+ +
+
|
+ +inlineslot | +
Definition at line 200 of file PythonQtStdDecorators.h.
+ +References PythonQtConvertPairToPython().
+ +
+
|
+ +inlineslot | +
Definition at line 201 of file PythonQtStdDecorators.h.
+ +References PythonQtConvertPairToPython().
+ +
+
|
+ +inlineslot | +
Definition at line 207 of file PythonQtStdDecorators.h.
+References PythonQtConvertPairToPython().
+ +Referenced by indexOfMethod(), static_QMetaObject_checkConnectArgs(), and static_QMetaObject_normalizedSignature().
+ +
+
|
+ +inlineslot | +
Definition at line 190 of file PythonQtStdDecorators.h.
+References PythonQtConvertPairToPython().
+ +
+
|
+ +inlineslot | +
Definition at line 184 of file PythonQtStdDecorators.h.
+References PythonQtConvertPairToPython().
+ +
+
|
+ +inlineslot | +
Definition at line 209 of file PythonQtStdDecorators.h.
+References PythonQtConvertPairToPython().
+ +
+
|
+ +inlineslot | +
Definition at line 192 of file PythonQtStdDecorators.h.
+References PythonQtConvertPairToPython().
+ +
+
|
+ +inlineslot | +
Definition at line 186 of file PythonQtStdDecorators.h.
+References PythonQtConvertPairToPython().
+ +
+
|
+ +inlineslot | +
Definition at line 213 of file PythonQtStdDecorators.h.
+ +References method(), and PythonQtConvertPairToPython().
+ +
+
|
+ +inlineslot | +
Definition at line 217 of file PythonQtStdDecorators.h.
+ +References method().
+ +
+
|
+ +inlineslot | +
Definition at line 221 of file PythonQtStdDecorators.h.
+
+
|
+ +inlineslot | +
Definition at line 182 of file PythonQtStdDecorators.h.
+References PythonQtConvertPairToPython().
+ +
+
|
+ +inlineslot | +
Definition at line 211 of file PythonQtStdDecorators.h.
+References PythonQtConvertPairToPython().
+ +|
+ PythonQt
+
+ |
+
|
+ PythonQt
+
+ |
+
+Files | |
| PythonQt.h | |
| PythonQtBoolResult.h | |
| PythonQtClassInfo.h | |
| PythonQtClassWrapper.h | |
| PythonQtConversion.h | |
| PythonQtCppWrapperFactory.h | |
| PythonQtDoc.h | |
| PythonQtImporter.h | |
| PythonQtImportFileInterface.h | |
| PythonQtInstanceWrapper.h | |
| PythonQtMethodInfo.h | |
| PythonQtMisc.h | |
| PythonQtObjectPtr.h | |
| PythonQtProperty.h | |
| PythonQtPythonInclude.h | |
| PythonQtQFileImporter.h | |
| PythonQtSignal.h | |
| PythonQtSignalReceiver.h | |
| PythonQtSlot.h | |
| PythonQtSlotDecorator.h | |
| PythonQtStdDecorators.h | |
| PythonQtStdIn.h | |
| PythonQtStdOut.h | |
| PythonQtSystem.h | |
| PythonQtThreadSupport.h | |
| PythonQtUtils.h | |
| PythonQtVariants.h | |