diff -Nru uranium-3.3.0/cmake/UraniumTests.cmake uranium-4.4.1/cmake/UraniumTests.cmake --- uranium-3.3.0/cmake/UraniumTests.cmake 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/cmake/UraniumTests.cmake 2019-11-19 10:50:46.000000000 +0000 @@ -1,6 +1,11 @@ +# Copyright (c) 2018 Ultimaker B.V. +# Uranium is released under the terms of the LGPLv3 or higher. + enable_testing() include(CMakeParseArguments) +add_custom_target(test-verbose COMMAND ${CMAKE_CTEST_COMMAND} --verbose) + function(uranium_add_test) set(_single_args NAME DIRECTORY PYTHONPATH) cmake_parse_arguments("" "" "${_single_args}" "" ${ARGN}) @@ -43,3 +48,9 @@ uranium_add_test(NAME pytest-${_plugin_name} DIRECTORY ${_plugin_directory} PYTHONPATH "${CMAKE_SOURCE_DIR}|${_plugin_directory}") endif() endforeach() + +#Add code style test. +add_test( + NAME "code-style" + COMMAND ${PYTHON_EXECUTABLE} run_mypy.py WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} +) \ No newline at end of file diff -Nru uranium-3.3.0/CMakeLists.txt uranium-4.4.1/CMakeLists.txt --- uranium-3.3.0/CMakeLists.txt 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/CMakeLists.txt 2019-11-19 10:50:46.000000000 +0000 @@ -16,7 +16,7 @@ # Note that we use exit 0 here to not mark the build as a failure on check failure # In addition, the specified pylint configuration uses the spellchecker plugin. This required python-enchant to be installed. add_custom_target(check) -add_custom_command(TARGET check POST_BUILD COMMAND "PYTHONPATH=${CMAKE_SOURCE_DIR}" ${PYTHON_EXECUTABLE} -m pylint --rcfile=${CMAKE_SOURCE_DIR}/pylint.cfg UM --msg-template=\"{path}:{line}: [{msg_id}({symbol}), {obj}] {msg}\" > ${CMAKE_BINARY_DIR}/pylint.log || exit 0 WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}) +add_custom_command(TARGET check POST_BUILD COMMAND "PYTHONPATH=${CMAKE_SOURCE_DIR}" ${PYTHON_EXECUTABLE} -m pylint --rcfile=${CMAKE_SOURCE_DIR}/pylint.cfg UM --msg-template=\"{path}:{line}: [{msg_id}({symbol}) , {obj}] {msg}\" > ${CMAKE_BINARY_DIR}/pylint.log || exit 0 WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}) # # Check using Mypy add_custom_target(typecheck) diff -Nru uranium-3.3.0/create_plugin.py uranium-4.4.1/create_plugin.py --- uranium-3.3.0/create_plugin.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/create_plugin.py 1970-01-01 00:00:00.000000000 +0000 @@ -1,50 +0,0 @@ -import argparse -import os.path -import zipfile - -def checkValidPlugin(path): - # A plugin must be a folder - if not os.path.isdir(path): - return False - - # A plugin must contain an __init__.py - if not os.path.isfile(os.path.join(path, "__init__.py")): - return False - - # .. and a plugin must contain an plugin.json! - if not os.path.isfile(os.path.join(path, "plugin.json")): - return False - - return True - -def zipDirectory(path, zip_handle): - # zip_handle is zipfile handle - for root, dirs, files in os.walk(path): - for file in files: - filename = os.path.join(root, file) - if os.path.isfile(filename) and not file.startswith(".git") and ".git" not in root: - _, extension = os.path.splitext(filename) - if extension not in excluded_extentions: - zip_handle.write(os.path.join(root, file), os.path.relpath(os.path.join(root, file), os.path.join(path, '..'))) - -excluded_extentions = [".pyc"] - -if __name__ == "__main__": - parser = argparse.ArgumentParser() - parser.add_argument("plugin_location", type = str, help = "Location of plugin folder") - args = parser.parse_args() - - full_plugin_path = os.path.join(os.getcwd(), args.plugin_location) - - if not checkValidPlugin(full_plugin_path): - print("Provided plug-in location is not a valid plug-in folder.") - exit() - - plugin_name = os.path.basename(os.path.normpath(full_plugin_path)) - plugin_file_location = plugin_name + ".umplugin" - with zipfile.ZipFile(plugin_file_location, "w") as plugin_zip: - # Ensure that the root folder is created correctly. We need to tell zip to not compress the folder! - subdirectory = zipfile.ZipInfo(plugin_name + "/") - plugin_zip.writestr(subdirectory, "", compress_type = zipfile.ZIP_STORED) #Writing an empty string creates the directory. - zipDirectory(full_plugin_path, plugin_zip) - print("Done!") \ No newline at end of file diff -Nru uranium-3.3.0/debian/changelog uranium-4.4.1/debian/changelog --- uranium-3.3.0/debian/changelog 2019-12-11 07:34:40.000000000 +0000 +++ uranium-4.4.1/debian/changelog 2020-01-28 09:47:52.000000000 +0000 @@ -1,3 +1,11 @@ +uranium (4.4.1-1) unstable; urgency=medium + + * Team upload. + * New upstream version. + * Remove obsolete X-Python3-Version field. + + -- Christoph Berg Tue, 28 Jan 2020 10:47:52 +0100 + uranium (3.3.0-2) unstable; urgency=medium [ Gregor Riepl ] diff -Nru uranium-3.3.0/debian/control uranium-4.4.1/debian/control --- uranium-3.3.0/debian/control 2019-12-11 07:34:40.000000000 +0000 +++ uranium-4.4.1/debian/control 2020-01-28 09:46:04.000000000 +0000 @@ -10,7 +10,6 @@ python3-pyqt5, Standards-Version: 4.1.4 Section: python -X-Python3-Version: >= 3.5 Homepage: https://github.com/Ultimaker/Uranium Vcs-Browser: https://salsa.debian.org/3dprinting-team/uranium Vcs-Git: https://salsa.debian.org/3dprinting-team/uranium.git diff -Nru uranium-3.3.0/debian/salsa-ci.yml uranium-4.4.1/debian/salsa-ci.yml --- uranium-3.3.0/debian/salsa-ci.yml 2019-12-11 07:34:40.000000000 +0000 +++ uranium-4.4.1/debian/salsa-ci.yml 2020-01-28 09:47:26.000000000 +0000 @@ -1,4 +1,6 @@ ---- include: - https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/salsa-ci.yml - https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/pipeline-jobs.yml + +reprotest: + extends: .test-reprotest-diffoscope diff -Nru uranium-3.3.0/debian/tests/control uranium-4.4.1/debian/tests/control --- uranium-3.3.0/debian/tests/control 1970-01-01 00:00:00.000000000 +0000 +++ uranium-4.4.1/debian/tests/control 2020-01-28 09:46:04.000000000 +0000 @@ -0,0 +1,2 @@ +Test-Command: for py in $(py3versions -r 2>/dev/null) ; do cd "$AUTOPKGTEST_TMP" ; echo "Testing with $py:" ; $py -c "import UM.Version; print(UM.Version)" ; done +Depends: @ diff -Nru uranium-3.3.0/docker/build.sh uranium-4.4.1/docker/build.sh --- uranium-3.3.0/docker/build.sh 1970-01-01 00:00:00.000000000 +0000 +++ uranium-4.4.1/docker/build.sh 2019-11-19 10:50:46.000000000 +0000 @@ -0,0 +1,24 @@ +#!/usr/bin/env bash + +# Abort at the first error. +set -e + +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" +PROJECT_DIR="$( cd "${SCRIPT_DIR}/.." && pwd )" + +# Make sure that environment variables are set properly +source /opt/rh/devtoolset-7/enable +export PATH="${CURA_BUILD_ENV_PATH}/bin:${PATH}" +export PKG_CONFIG_PATH="${CURA_BUILD_ENV_PATH}/lib/pkgconfig:${PKG_CONFIG_PATH}" + +cd "${PROJECT_DIR}" + +mkdir build +cd build +cmake3 \ + -DCMAKE_BUILD_TYPE=Debug \ + -DCMAKE_PREFIX_PATH="${CURA_BUILD_ENV_PATH}" \ + -DBUILD_TESTS=ON \ + .. +make +ctest3 --output-on-failure -T Test diff -Nru uranium-3.3.0/docs/mainpage.md uranium-4.4.1/docs/mainpage.md --- uranium-3.3.0/docs/mainpage.md 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/docs/mainpage.md 2019-11-19 10:50:46.000000000 +0000 @@ -3,8 +3,8 @@ This is the documentation for the Uranium Framework. -[High Level Overview](docs/overview.md) +[High Level Overview](overview.md) -[Rendering](docs/rendering.md) +[Rendering](rendering.md) -[Translations](docs/translations.md) +[Translations](translations.md) diff -Nru uranium-3.3.0/docs/overview.md uranium-4.4.1/docs/overview.md --- uranium-3.3.0/docs/overview.md 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/docs/overview.md 2019-11-19 10:50:46.000000000 +0000 @@ -48,7 +48,7 @@ [Logger]: \ref Cura#Logger#Logger [StorageDevice]: \ref Cura#StorageDevice#StorageDevice [Tool]: \ref Cura#Tool#Tool -[plugins]: docs/plugins.md +[plugins]: plugins.md Backend ------- diff -Nru uranium-3.3.0/examples/definition_query/query.py uranium-4.4.1/examples/definition_query/query.py --- uranium-3.3.0/examples/definition_query/query.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/examples/definition_query/query.py 2019-11-19 10:50:46.000000000 +0000 @@ -33,7 +33,7 @@ SettingDefinition.addSettingType("extruder", None, str, Validator) definition = DefinitionContainer(os.path.basename(file_path)) -with open(file_path) as f: +with open(file_path, encoding = "utf-8") as f: definition.deserialize(f.read()) query = json.loads(sys.argv[2]) diff -Nru uranium-3.3.0/examples/definition_viewer/DefinitionTreeModel.py uranium-4.4.1/examples/definition_viewer/DefinitionTreeModel.py --- uranium-3.3.0/examples/definition_viewer/DefinitionTreeModel.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/examples/definition_viewer/DefinitionTreeModel.py 2019-11-19 10:50:46.000000000 +0000 @@ -1,4 +1,4 @@ -# Copyright (c) 2016 Ultimaker B.V. +# Copyright (c) 2018 Ultimaker B.V. # Uranium is released under the terms of the LGPLv3 or higher. from PyQt5.QtCore import Qt, QAbstractItemModel, QModelIndex, QVariant, pyqtProperty, pyqtSignal, pyqtSlot @@ -77,7 +77,7 @@ return self.createIndex(row, 0, parent) - def rowCount(self, parent = QModelIndex()): + def count(self, parent = QModelIndex()): if not self._container: return 0 diff -Nru uranium-3.3.0/examples/definition_viewer/main.py uranium-4.4.1/examples/definition_viewer/main.py --- uranium-3.3.0/examples/definition_viewer/main.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/examples/definition_viewer/main.py 2019-11-19 10:50:46.000000000 +0000 @@ -31,7 +31,7 @@ UM.Resources.Resources.addSearchPath(dirname) UM.Resources.Resources.addSearchPath(os.path.realpath(os.path.join(dirname, ".."))) - with open(file_path.toLocalFile()) as data: + with open(file_path.toLocalFile(), encoding = "utf-8") as data: definition.deserialize(data.read()) self._metadata = dict(definition.metaData) diff -Nru uranium-3.3.0/.gitignore uranium-4.4.1/.gitignore --- uranium-3.3.0/.gitignore 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/.gitignore 2019-11-19 10:50:46.000000000 +0000 @@ -16,6 +16,7 @@ resources/i18n/en_US resources/i18n/x-test resources/i18n/en_7S +.mypy_cache # JUnit junit.xml @@ -45,6 +46,7 @@ #Test results. tests/Settings/instances/machine_settings_with_overrides_test.cfg tests/Settings/profiles/simple_machine_with_overrides_test.cfg +.pytest_cache/ #MacOS .DS_Store diff -Nru uranium-3.3.0/.gitlab-ci.yml uranium-4.4.1/.gitlab-ci.yml --- uranium-3.3.0/.gitlab-ci.yml 1970-01-01 00:00:00.000000000 +0000 +++ uranium-4.4.1/.gitlab-ci.yml 2019-11-19 10:50:46.000000000 +0000 @@ -0,0 +1,16 @@ +stages: + - build + +build and test linux: + stage: build + image: + name: registry.gitlab.com/ultimaker/cura/cura-build-environment:centos7 + tags: + - cura + - docker + - linux + script: + - docker/build.sh + artifacts: + paths: + - build diff -Nru uranium-3.3.0/Jenkinsfile uranium-4.4.1/Jenkinsfile --- uranium-3.3.0/Jenkinsfile 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/Jenkinsfile 2019-11-19 10:50:46.000000000 +0000 @@ -26,10 +26,23 @@ // Try and run the unit tests. If this stage fails, we consider the build to be "unstable". stage('Unit Test') { - try { - make 'test' - } catch(e) { - currentBuild.result = "UNSTABLE" + if (isUnix()) { + // For Linux + try { + sh 'make CTEST_OUTPUT_ON_FAILURE=TRUE test' + } catch(e) + { + currentBuild.result = "UNSTABLE" + } + } + else { + // For Windows + try { + // This also does code style checks. + bat 'ctest -V' + } catch(e) { + currentBuild.result = "UNSTABLE" + } } } diff -Nru uranium-3.3.0/plugins/ConsoleLogger/ConsoleLogger.py uranium-4.4.1/plugins/ConsoleLogger/ConsoleLogger.py --- uranium-3.3.0/plugins/ConsoleLogger/ConsoleLogger.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/plugins/ConsoleLogger/ConsoleLogger.py 2019-11-19 10:50:46.000000000 +0000 @@ -2,6 +2,7 @@ # Uranium is released under the terms of the LGPLv3 or higher. from UM.Logger import LogOutput +from typing import Set import logging @@ -15,32 +16,38 @@ 'CRITICAL': 'red,bg_white', }, ) -except: +except ImportError: # ModuleNotFoundError was new for 3.6 and we're still on 3.5 from logging import Formatter logging_formatter = Formatter("%(asctime)s - %(levelname)s - %(message)s") + class ConsoleLogger(LogOutput): - def __init__(self): + def __init__(self) -> None: super().__init__() - self._logger = logging.getLogger(self._name) #Create python logger + self._logger = logging.getLogger(self._name) # Create python logger self._logger.setLevel(logging.DEBUG) stream_handler = logging.StreamHandler() # Log to stream stream_handler.setFormatter(logging_formatter) self._logger.addHandler(stream_handler) + self._show_once = set() # type: Set[str] ## Log the message to console - # \param log_type "e" (error) , "i"(info), "d"(debug) or "w"(warning) + # \param log_type "e" (error), "i"(info), "d"(debug), "w"(warning) or "c"(critical) (can postfix with "_once") # \param message String containing message to be logged - def log(self, log_type, message): - if(log_type == "w"): # Warning + def log(self, log_type: str, message: str) -> None: + if log_type == "w": # Warning self._logger.warning(message) - elif(log_type == "i"): # Info + elif log_type == "i": # Info self._logger.info(message) - elif(log_type == "e"): # Error + elif log_type == "e": # Error self._logger.error(message) - elif(log_type == "d"): + elif log_type == "d": self._logger.debug(message) - elif(log_type == "c"): + elif log_type == "c": self._logger.critical(message) + elif log_type.endswith("_once"): + if message not in self._show_once: + self._show_once.add(message) + self.log(log_type[0], message) else: print("Unable to log. Received unknown type %s" % log_type) diff -Nru uranium-3.3.0/plugins/ConsoleLogger/__init__.py uranium-4.4.1/plugins/ConsoleLogger/__init__.py --- uranium-3.3.0/plugins/ConsoleLogger/__init__.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/plugins/ConsoleLogger/__init__.py 2019-11-19 10:50:46.000000000 +0000 @@ -4,9 +4,6 @@ #Shoopdawoop from . import ConsoleLogger -from UM.i18n import i18nCatalog -i18n_catalog = i18nCatalog("uranium") - def getMetaData(): return {} diff -Nru uranium-3.3.0/plugins/ConsoleLogger/plugin.json uranium-4.4.1/plugins/ConsoleLogger/plugin.json --- uranium-3.3.0/plugins/ConsoleLogger/plugin.json 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/plugins/ConsoleLogger/plugin.json 2019-11-19 10:50:46.000000000 +0000 @@ -1,8 +1,8 @@ { "name": "Console Logger", "author": "Ultimaker B.V.", - "version": "1.0.0", + "version": "1.0.1", "description": "Outputs log information to the console.", - "api": 4, + "api": "7.0", "i18n-catalog": "uranium" } diff -Nru uranium-3.3.0/plugins/FileHandlers/OBJReader/__init__.py uranium-4.4.1/plugins/FileHandlers/OBJReader/__init__.py --- uranium-3.3.0/plugins/FileHandlers/OBJReader/__init__.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/plugins/FileHandlers/OBJReader/__init__.py 2019-11-19 10:50:46.000000000 +0000 @@ -17,5 +17,6 @@ ] } + def register(app): - return { "mesh_reader": OBJReader.OBJReader() } + return {"mesh_reader": OBJReader.OBJReader()} diff -Nru uranium-3.3.0/plugins/FileHandlers/OBJReader/OBJReader.py uranium-4.4.1/plugins/FileHandlers/OBJReader/OBJReader.py --- uranium-3.3.0/plugins/FileHandlers/OBJReader/OBJReader.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/plugins/FileHandlers/OBJReader/OBJReader.py 2019-11-19 10:50:46.000000000 +0000 @@ -1,4 +1,4 @@ -# Copyright (c) 2017 Ultimaker B.V. +# Copyright (c) 2018 Ultimaker B.V. # Copyright (c) 2013 David Braam # Uranium is released under the terms of the LGPLv3 or higher. @@ -12,11 +12,11 @@ class OBJReader(MeshReader): - def __init__(self): - super(OBJReader, self).__init__() + def __init__(self) -> None: + super().__init__() self._supported_extensions = [".obj"] - def read(self, file_name): + def _read(self, file_name): scene_node = None extension = os.path.splitext(file_name)[1] @@ -29,7 +29,7 @@ mesh_builder = MeshBuilder() mesh_builder.setFileName(file_name) - f = open(file_name, "rt") + f = open(file_name, "rt", encoding = "utf-8") for line in f: parts = line.split() if len(parts) < 1: @@ -55,7 +55,6 @@ mesh_builder.reserveVertexCount(3 * len(face_list)) num_vertices = len(vertex_list) - num_normals = len(normal_list) for face in face_list: # Substract 1 from index, as obj starts counting at 1 instead of 0 @@ -93,13 +92,13 @@ else: mesh_builder.addFaceByPoints(vertex_list[i][0], vertex_list[i][1], vertex_list[i][2], vertex_list[j][0], vertex_list[j][1], vertex_list[j][2], vertex_list[k][0], vertex_list[k][1], vertex_list[k][2]) - if ui != -1: + if ui != -1 and len(uv_list) > ui: mesh_builder.setVertexUVCoordinates(mesh_builder.getVertexCount() - 3, uv_list[ui][0], uv_list[ui][1]) - if uj != -1: + if uj != -1 and len(uv_list) > uj: mesh_builder.setVertexUVCoordinates(mesh_builder.getVertexCount() - 2, uv_list[uj][0], uv_list[uj][1]) - if uk != -1: + if uk != -1 and len(uv_list) > uk: mesh_builder.setVertexUVCoordinates(mesh_builder.getVertexCount() - 1, uv_list[uk][0], uv_list[uk][1]) Job.yieldThread() diff -Nru uranium-3.3.0/plugins/FileHandlers/OBJReader/plugin.json uranium-4.4.1/plugins/FileHandlers/OBJReader/plugin.json --- uranium-3.3.0/plugins/FileHandlers/OBJReader/plugin.json 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/plugins/FileHandlers/OBJReader/plugin.json 2019-11-19 10:50:46.000000000 +0000 @@ -1,8 +1,8 @@ { "name": "Wavefront OBJ Reader", "author": "Ultimaker B.V.", - "version": "1.0.0", + "version": "1.0.1", "description": "Makes it possible to read Wavefront OBJ files.", - "api": 4, + "api": "7.0", "i18n-catalog": "uranium" } diff -Nru uranium-3.3.0/plugins/FileHandlers/OBJReader/tests/TestOBJReader.py uranium-4.4.1/plugins/FileHandlers/OBJReader/tests/TestOBJReader.py --- uranium-3.3.0/plugins/FileHandlers/OBJReader/tests/TestOBJReader.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/plugins/FileHandlers/OBJReader/tests/TestOBJReader.py 2019-11-19 10:50:46.000000000 +0000 @@ -1,13 +1,18 @@ import os.path +import sys +sys.path.append(os.path.join(os.path.dirname(os.path.abspath(__file__)), "..")) +from unittest.mock import patch import OBJReader test_path = os.path.join(os.path.dirname(OBJReader.__file__), "tests") + def test_readOBJ(): reader = OBJReader.OBJReader() sphere_file = os.path.join(test_path, "sphere.obj") - result = reader.read(sphere_file) + with patch("UM.Application.Application.getInstance"): + result = reader.read(sphere_file) assert result # It must return a node assert result.getMeshData() # It should have mesh data diff -Nru uranium-3.3.0/plugins/FileHandlers/OBJWriter/OBJWriter.py uranium-4.4.1/plugins/FileHandlers/OBJWriter/OBJWriter.py --- uranium-3.3.0/plugins/FileHandlers/OBJWriter/OBJWriter.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/plugins/FileHandlers/OBJWriter/OBJWriter.py 2019-11-19 10:50:46.000000000 +0000 @@ -1,13 +1,14 @@ -# Copyright (c) 2016 Ultimaker B.V. +# Copyright (c) 2018 Ultimaker B.V. # Copyright (c) 2013 David Braam # Uranium is released under the terms of the LGPLv3 or higher. +from UM.Logger import Logger from UM.Mesh.MeshWriter import MeshWriter -from UM.Scene.Iterator.BreadthFirstIterator import BreadthFirstIterator -from UM.Scene.SceneNode import SceneNode import time -import struct + +from UM.i18n import i18nCatalog +catalog = i18nCatalog("uranium") class OBJWriter(MeshWriter): ## Writes the specified nodes to a stream in the OBJ format. @@ -18,11 +19,15 @@ # The OBJ format only supports text mode. def write(self, stream, nodes, mode = MeshWriter.OutputMode.TextMode): if mode != MeshWriter.OutputMode.TextMode: + Logger.log("e", "OBJWriter does not support non-text mode.") + self.setInformation(catalog.i18nc("@error:not supported", "OBJWriter does not support non-text mode.")) return False try: MeshWriter._meshNodes(nodes).__next__() except StopIteration: + Logger.log("e", "There is no mesh to write.") + self.setInformation(catalog.i18nc("@error:no mesh", "There is no mesh to write.")) return False #Don't write files without mesh data. stream.write("# URANIUM OBJ EXPORT {0}\n".format(time.strftime("%a %d %b %Y %H:%M:%S"))) diff -Nru uranium-3.3.0/plugins/FileHandlers/OBJWriter/plugin.json uranium-4.4.1/plugins/FileHandlers/OBJWriter/plugin.json --- uranium-3.3.0/plugins/FileHandlers/OBJWriter/plugin.json 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/plugins/FileHandlers/OBJWriter/plugin.json 2019-11-19 10:50:46.000000000 +0000 @@ -1,8 +1,8 @@ { "name": "Wavefront OBJ Writer", "author": "Ultimaker B.V.", - "version": "1.0.0", + "version": "1.0.1", "description": "Makes it possible to write Wavefront OBJ files.", - "api": 4, + "api": "7.0", "i18n-catalog": "uranium" } diff -Nru uranium-3.3.0/plugins/FileHandlers/STLReader/__init__.py uranium-4.4.1/plugins/FileHandlers/STLReader/__init__.py --- uranium-3.3.0/plugins/FileHandlers/STLReader/__init__.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/plugins/FileHandlers/STLReader/__init__.py 2019-11-19 10:50:46.000000000 +0000 @@ -16,5 +16,6 @@ ] } + def register(app): - return { "mesh_reader": STLReader.STLReader() } + return {"mesh_reader": STLReader.STLReader()} diff -Nru uranium-3.3.0/plugins/FileHandlers/STLReader/plugin.json uranium-4.4.1/plugins/FileHandlers/STLReader/plugin.json --- uranium-3.3.0/plugins/FileHandlers/STLReader/plugin.json 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/plugins/FileHandlers/STLReader/plugin.json 2019-11-19 10:50:46.000000000 +0000 @@ -1,8 +1,8 @@ { "name": "STL Reader", "author": "Ultimaker B.V.", - "version": "1.0.0", + "version": "1.0.1", "description": "Provides support for reading STL files.", - "api": 4, + "api": "7.0", "i18n-catalog": "uranium" } diff -Nru uranium-3.3.0/plugins/FileHandlers/STLReader/STLReader.py uranium-4.4.1/plugins/FileHandlers/STLReader/STLReader.py --- uranium-3.3.0/plugins/FileHandlers/STLReader/STLReader.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/plugins/FileHandlers/STLReader/STLReader.py 2019-11-19 10:50:46.000000000 +0000 @@ -7,6 +7,7 @@ from UM.Logger import Logger from UM.Scene.SceneNode import SceneNode from UM.Job import Job +from UM.MimeTypeDatabase import MimeTypeDatabase, MimeType import os import struct @@ -25,19 +26,36 @@ Logger.log("w", "Could not find numpy-stl, falling back to slower code.") # We have our own fallback code. + class STLReader(MeshReader): - def __init__(self): - super(STLReader, self).__init__() + def __init__(self) -> None: + super().__init__() + + MimeTypeDatabase.addMimeType( + MimeType( + name = "model/stl", + comment = "Uranium STL File", + suffixes = ["stl"] + ) + ) self._supported_extensions = [".stl"] def load_file(self, file_name, mesh_builder, _use_numpystl = False): + file_read = False if _use_numpystl: - self._loadWithNumpySTL(file_name, mesh_builder) - else: + Logger.log("i", "Using NumPy-STL to load STL data.") + try: + self._loadWithNumpySTL(file_name, mesh_builder) + file_read = True + except: + Logger.logException("e", "Reading file failed with Numpy-STL!") + + if not file_read: + Logger.log("i", "Using legacy code to load STL data.") f = open(file_name, "rb") if not self._loadBinary(mesh_builder, f): f.close() - f = open(file_name, "rt") + f = open(file_name, "rt", encoding = "utf-8") try: self._loadAscii(mesh_builder, f) except UnicodeDecodeError: @@ -49,7 +67,7 @@ mesh_builder.setFileName(file_name) ## Decide if we need to use ascii or binary in order to read file - def read(self, file_name): + def _read(self, file_name): mesh_builder = MeshBuilder() scene_node = SceneNode() @@ -84,7 +102,7 @@ array[:, [frm, to]] = array[:, [to, frm]] def _loadWithNumpySTL(self, file_name, mesh_builder): - for loaded_data in stl.mesh.Mesh.from_multi_file(file_name): + for loaded_data in stl.mesh.Mesh.from_multi_file(file_name, mode=stl.stl.Mode.AUTOMATIC): vertices = numpy.resize(loaded_data.points.flatten(), (int(loaded_data.points.size / 3), 3)) # Invert values of second column @@ -96,7 +114,7 @@ mesh_builder.addVertices(vertices) # Private - ## Load the STL data from file by consdering the data as ascii. + ## Load the STL data from file by considering the data as ascii. # \param mesh The MeshData object where the data is written to. # \param f The file handle def _loadAscii(self, mesh_builder, f): diff -Nru uranium-3.3.0/plugins/FileHandlers/STLReader/tests/TestStlReader.py uranium-4.4.1/plugins/FileHandlers/STLReader/tests/TestStlReader.py --- uranium-3.3.0/plugins/FileHandlers/STLReader/tests/TestStlReader.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/plugins/FileHandlers/STLReader/tests/TestStlReader.py 2019-11-19 10:50:46.000000000 +0000 @@ -1,29 +1,36 @@ import os.path +import sys +sys.path.append(os.path.join(os.path.dirname(os.path.abspath(__file__)), "..")) +from unittest.mock import patch import STLReader from UM.Mesh.MeshBuilder import MeshBuilder test_path = os.path.join(os.path.dirname(STLReader.__file__), "tests") + def test_readASCII(): reader = STLReader.STLReader() ascii_path = os.path.join(test_path, "simpleTestCubeASCII.stl") - result = reader.read(ascii_path) + with patch("UM.Application.Application.getInstance"): + result = reader.read(ascii_path) assert result if STLReader.use_numpystl: - # If the system the test runs on supporst numpy stl, we should also check the non numpy stl option. - f = open(ascii_path, "rt") + # If the system the test runs on supports numpy stl, we should also check the non numpy stl option. + f = open(ascii_path, "rt", encoding = "utf-8") mesh_builder = MeshBuilder() reader._loadAscii(mesh_builder, f) mesh_builder.calculateNormals(fast=True) assert mesh_builder.getVertexCount() != 0 + def test_readBinary(): reader = STLReader.STLReader() binary_path = os.path.join(test_path, "simpleTestCubeBinary.stl") - result = reader.read(binary_path) + with patch("UM.Application.Application.getInstance"): + result = reader.read(binary_path) if STLReader.use_numpystl: # If the system the test runs on supporst numpy stl, we should also check the non numpy stl option. diff -Nru uranium-3.3.0/plugins/FileHandlers/STLWriter/__init__.py uranium-4.4.1/plugins/FileHandlers/STLWriter/__init__.py --- uranium-3.3.0/plugins/FileHandlers/STLWriter/__init__.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/plugins/FileHandlers/STLWriter/__init__.py 2019-11-19 10:50:46.000000000 +0000 @@ -1,4 +1,4 @@ -# Copyright (c) 2015 Ultimaker B.V. +# Copyright (c) 2018 Ultimaker B.V. # Uranium is released under the terms of the LGPLv3 or higher. from . import STLWriter @@ -11,13 +11,13 @@ "mesh_writer": { "output": [ { - "mime_type": "application/x-stl-ascii", + "mime_type": "model/x.stl-ascii", "mode": STLWriter.STLWriter.OutputMode.TextMode, "extension": "stl", "description": i18n_catalog.i18nc("@item:inlistbox", "STL File (ASCII)") }, { - "mime_type": "application/x-stl-binary", + "mime_type": "model/x.stl-binary", "mode": STLWriter.STLWriter.OutputMode.BinaryMode, "extension": "stl", "description": i18n_catalog.i18nc("@item:inlistbox", "STL File (Binary)") diff -Nru uranium-3.3.0/plugins/FileHandlers/STLWriter/plugin.json uranium-4.4.1/plugins/FileHandlers/STLWriter/plugin.json --- uranium-3.3.0/plugins/FileHandlers/STLWriter/plugin.json 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/plugins/FileHandlers/STLWriter/plugin.json 2019-11-19 10:50:46.000000000 +0000 @@ -1,8 +1,8 @@ { "name": "STL Writer", "author": "Ultimaker B.V.", - "version": "1.0.0", + "version": "1.0.1", "description": "Provides support for writing STL files.", - "api": 4, + "api": "7.0", "i18n-catalog": "uranium" } diff -Nru uranium-3.3.0/plugins/FileHandlers/STLWriter/STLWriter.py uranium-4.4.1/plugins/FileHandlers/STLWriter/STLWriter.py --- uranium-3.3.0/plugins/FileHandlers/STLWriter/STLWriter.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/plugins/FileHandlers/STLWriter/STLWriter.py 2019-11-19 10:50:46.000000000 +0000 @@ -8,6 +8,9 @@ import time import struct +from UM.i18n import i18nCatalog +catalog = i18nCatalog("uranium") + class STLWriter(MeshWriter): ## Write the specified sequence of nodes to a stream in the STL format. # @@ -19,9 +22,10 @@ def write(self, stream, nodes, mode = MeshWriter.OutputMode.TextMode): try: MeshWriter._meshNodes(nodes).__next__() - except: + except StopIteration: Logger.log("e", "There is no mesh to write.") - return False #Don't try to write a file if there is no mesh. + self.setInformation(catalog.i18nc("@error:no mesh", "There is no mesh to write.")) + return False # Don't try to write a file if there is no mesh. if mode == MeshWriter.OutputMode.TextMode: self._writeAscii(stream, MeshWriter._meshNodes(nodes)) @@ -29,6 +33,7 @@ self._writeBinary(stream, MeshWriter._meshNodes(nodes)) else: Logger.log("e", "Unsupported output mode writing STL to stream") + self.setInformation(catalog.i18nc("@error:not supported", "Unsupported output mode writing STL to stream.")) return False return True diff -Nru uranium-3.3.0/plugins/FileLogger/FileLogger.py uranium-4.4.1/plugins/FileLogger/FileLogger.py --- uranium-3.3.0/plugins/FileLogger/FileLogger.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/plugins/FileLogger/FileLogger.py 2019-11-19 10:50:46.000000000 +0000 @@ -3,23 +3,26 @@ from UM.Logger import LogOutput from UM.Resources import Resources +from UM.VersionUpgradeManager import VersionUpgradeManager +from typing import Set import logging -import sys -import os.path + class FileLogger(LogOutput): - def __init__(self, file_name): + def __init__(self, file_name: str) -> None: super().__init__() - self._logger = logging.getLogger(self._name) # Create python logger + self._logger = logging.getLogger(self._name) # Create python logger self._logger.setLevel(logging.DEBUG) + self._show_once = set() # type: Set[str] # Do not try to save to the app dir as it may not be writeable or may not be the right # location to save the log file. Instead, try and save in the settings location since # that should be writeable. self.setFileName(Resources.getStoragePath(Resources.Resources, file_name)) + VersionUpgradeManager.getInstance().registerIgnoredFile(file_name) - def setFileName(self, file_name): + def setFileName(self, file_name: str) -> None: if ".log" in file_name: file_handler = logging.FileHandler(file_name, encoding = "utf-8") format_handler = logging.Formatter("%(asctime)s - %(levelname)s - %(message)s") @@ -29,9 +32,9 @@ pass # TODO, add handling ## Log message to file. - # \param log_type "e" (error) , "i"(info), "d"(debug) or "w"(warning) + # \param log_type "e" (error), "i"(info), "d"(debug), "w"(warning) or "c"(critical) (can postfix with "_once") # \param message String containing message to be logged - def log(self, log_type, message): + def log(self, log_type: str, message: str) -> None: if log_type == "w": # Warning self._logger.warning(message) elif log_type == "i": # Info @@ -42,5 +45,9 @@ self._logger.debug(message) elif log_type == "c": # Critical self._logger.critical(message) + elif log_type.endswith("_once"): + if message not in self._show_once: + self._show_once.add(message) + self.log(log_type[0], message) else: print("Unable to log. Received unknown type %s" % log_type) diff -Nru uranium-3.3.0/plugins/FileLogger/__init__.py uranium-4.4.1/plugins/FileLogger/__init__.py --- uranium-3.3.0/plugins/FileLogger/__init__.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/plugins/FileLogger/__init__.py 2019-11-19 10:50:46.000000000 +0000 @@ -4,8 +4,6 @@ #Shoopdawoop from . import FileLogger -from UM.i18n import i18nCatalog -i18n_catalog = i18nCatalog("uranium") def getMetaData(): return { diff -Nru uranium-3.3.0/plugins/FileLogger/plugin.json uranium-4.4.1/plugins/FileLogger/plugin.json --- uranium-3.3.0/plugins/FileLogger/plugin.json 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/plugins/FileLogger/plugin.json 2019-11-19 10:50:46.000000000 +0000 @@ -1,8 +1,8 @@ { "name": "File Logger", "author": "Ultimaker B.V.", - "version": "1.0.0", + "version": "1.0.1", "description": "Outputs log information to a file in your settings folder.", - "api": 4, + "api": "7.0", "i18n-catalog": "uranium" } diff -Nru uranium-3.3.0/plugins/LocalContainerProvider/LocalContainerProvider.py uranium-4.4.1/plugins/LocalContainerProvider/LocalContainerProvider.py --- uranium-3.3.0/plugins/LocalContainerProvider/LocalContainerProvider.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/plugins/LocalContainerProvider/LocalContainerProvider.py 2019-11-19 10:50:46.000000000 +0000 @@ -1,13 +1,14 @@ -# Copyright (c) 2017 Ultimaker B.V. +# Copyright (c) 2018 Ultimaker B.V. # Uranium is released under the terms of the LGPLv3 or higher. import os # For getting the IDs from a filename. import pickle # For caching definitions. import re # To detect back-up files in the ".../old/#/..." folders. -from typing import Any, Dict, Iterable, Optional +from typing import Any, Dict, Iterable, Optional, Set, Type import urllib.parse # For interpreting escape characters using unquote_plus. from UM.Application import Application # To get the current version for finding the cache directory. +from UM.ConfigurationErrorMessage import ConfigurationErrorMessage from UM.Settings.ContainerRegistry import ContainerRegistry # To get the resource types for containers. from UM.Logger import Logger from UM.MimeTypeDatabase import MimeTypeDatabase, MimeType # To get the type of container we're loading. @@ -30,11 +31,14 @@ def __init__(self): super().__init__() - self._application = Application.getInstance() - self._id_to_path = {} # type: Dict[str, str] #Translates container IDs to the path to where the file is located self._id_to_mime = {} # type: Dict[str, MimeType] #Translates container IDs to their MIME type. + self._is_read_only_cache = {} # type: Dict[str, bool] + + def getContainerFilePathById(self, container_id: str) -> Optional[str]: + return self._id_to_path.get(container_id) + ## Gets the IDs of all local containers. # # \return A sequence of all container IDs. @@ -44,31 +48,32 @@ return self._id_to_path.keys() def loadContainer(self, container_id: str) -> "ContainerInterface": - #First get the actual (base) ID of the path we're going to read. - file_path = self._id_to_path[container_id] #Raises KeyError if container ID does not exist in the (cache of the) files. + # First get the actual (base) ID of the path we're going to read. + file_path = self._id_to_path[container_id] # Raises KeyError if container ID does not exist in the (cache of the) files. base_id = self._pathToId(file_path) if not base_id: raise Exception("The file where container {container_id} supposedly comes from is not a container file.".format(container_id = container_id)) - Logger.log("d", "Loading container {container_id}".format(container_id = base_id)) + container = None # type: Optional[ContainerInterface] + container_class = ContainerRegistry.mime_type_map[self._id_to_mime[base_id].name] - if issubclass(container_class, DefinitionContainer): #We may need to load these from the definition cache. + if issubclass(container_class, DefinitionContainer): # We may need to load these from the definition cache. container = self._loadCachedDefinition(container_id) - if container: #Yes, it was cached! + if container: # Yes, it was cached! return container - #Not cached, so load by deserialising. - container = container_class(base_id, parent = self._application) #Construct the container! + # Not cached, so load by deserialising. + container = container_class(base_id) with open(file_path, "r", encoding = "utf-8") as f: container.deserialize(f.read()) container.setPath(file_path) - if issubclass(container_class, DefinitionContainer): + if isinstance(container, DefinitionContainer): self._saveCachedDefinition(container) if base_id == container_id: return container - #If we're not requesting the base ID, the sub-container must have been side loaded. + # If we're not requesting the base ID, the sub-container must have been side loaded. return ContainerRegistry.getInstance().findContainers(id = container_id)[0] ## Find out where to save a container and save it there @@ -82,6 +87,9 @@ return mime_type = ContainerRegistry.getMimeTypeForContainer(type(container)) + if mime_type is None: + Logger.log("w", "Failed to get MIME type for container type [%s]", type(container)) + return file_name = urllib.parse.quote_plus(container.getId()) + "." + mime_type.preferredSuffix container_type = container.getMetaDataEntry("type") resource_types = ContainerRegistry.getInstance().getResourceTypes() @@ -92,12 +100,21 @@ container.setPath(path) # Register it internally as being saved self._id_to_path[container.getId()] = path - self._id_to_mime[container.getId()] = self._pathToMime(path) + mime = self._pathToMime(path) + if mime is not None: + self._id_to_mime[container.getId()] = mime + else: + Logger.log("e", "Failed to find MIME type for container ID [%s] with path [%s]", container.getId(), path) + base_file = container.getMetaData().get("base_file") if base_file: for container_md in ContainerRegistry.getInstance().findContainersMetadata(base_file = base_file): self._id_to_path[container_md["id"]] = path - self._id_to_mime[container_md["id"]] = self._pathToMime(path) + mime = self._pathToMime(path) + if mime is not None: + self._id_to_mime[container_md["id"]] = mime + else: + Logger.log("e", "Failed to find MIME type for container ID [%s] with path [%s]", container.getId(), path) else: Logger.log("w", "Dirty container [%s] is not saved because the resource type is unknown in ContainerRegistry", container_type) @@ -106,24 +123,26 @@ # \param container_id The ID of the container to load the metadata of. # \return The metadata of the specified container, or ``None`` if the # metadata failed to load. - def loadMetadata(self, container_id: str) -> Optional[Dict[str, Any]]: + def loadMetadata(self, container_id: str) -> Dict[str, Any]: registry = ContainerRegistry.getInstance() if container_id in registry.metadata: return registry.metadata[container_id] - filename = self._id_to_path[container_id] #Raises KeyError if container ID does not exist in the (cache of the) files! + filename = self._id_to_path[container_id] # Raises KeyError if container ID does not exist in the (cache of the) files! clazz = ContainerRegistry.mime_type_map[self._id_to_mime[container_id].name] - requested_metadata = None + requested_metadata = {} # type: Dict[str, Any] try: with open(filename, "r", encoding = "utf-8") as f: result_metadatas = clazz.deserializeMetadata(f.read(), container_id) #pylint: disable=no-member except IOError as e: Logger.log("e", "Unable to load metadata from file {filename}: {error_msg}".format(filename = filename, error_msg = str(e))) - raise RuntimeError("Unable to load metadata from file {filename}: {error_msg}".format(filename = filename, error_msg = str(e))) + ConfigurationErrorMessage.getInstance().addFaultyContainers(container_id) + return {} except Exception as e: Logger.logException("e", "Unable to deserialize metadata for container {filename}: {container_id}: {error_msg}".format(filename = filename, container_id = container_id, error_msg = str(e))) - raise RuntimeError("Unable to deserialize metadata for container {filename}: {container_id}: {error_msg}".format(filename = filename, container_id = container_id, error_msg = str(e))) + ConfigurationErrorMessage.getInstance().addFaultyContainers(container_id) + return {} for metadata in result_metadatas: if "id" not in metadata: @@ -131,10 +150,10 @@ continue if metadata["id"] == container_id: requested_metadata = metadata - #Side-load the metadata into the registry if we get multiple containers. - if metadata["id"] not in registry.metadata: #This wouldn't get loaded normally. + # Side-load the metadata into the registry if we get multiple containers. + if metadata["id"] not in registry.metadata: # This wouldn't get loaded normally. self._id_to_path[metadata["id"]] = filename - self._id_to_mime[metadata["id"]] = self._id_to_mime[container_id] #Assume that they only return one MIME type. + self._id_to_mime[metadata["id"]] = self._id_to_mime[container_id] # Assume that they only return one MIME type. registry.metadata[metadata["id"]] = metadata registry.source_provider[metadata["id"]] = self return requested_metadata @@ -144,8 +163,10 @@ # A container can only be modified if it is stored in the data directory. # \return Whether the specified container is read-only. def isReadOnly(self, container_id: str) -> bool: + if container_id in self._is_read_only_cache: + return self._is_read_only_cache[container_id] storage_path = os.path.realpath(Resources.getDataStoragePath()) - file_path = self._id_to_path[container_id] #If KeyError: We don't know this ID. + file_path = self._id_to_path[container_id] # If KeyError: We don't know this ID. # The container is read-only if file_path is not a subdirectory of storage_path. if Platform.isWindows(): @@ -154,9 +175,10 @@ try: result = os.path.commonpath([storage_path, os.path.realpath(file_path)]) != storage_path except ValueError: - result = False + result = True else: result = os.path.commonpath([storage_path, os.path.realpath(file_path)]) != storage_path + self._is_read_only_cache[container_id] = result return result ## Remove or unregister an id. @@ -175,6 +197,7 @@ # path. try: if os.path.isfile(path_to_delete): + Logger.log("i", "Deleting file {filepath}.".format(filepath = path_to_delete)) os.remove(path_to_delete) except Exception: Logger.log("w", "Tried to delete file [%s], but it failed", path_to_delete) @@ -190,12 +213,12 @@ def _loadCachedDefinition(self, definition_id) -> Optional[DefinitionContainer]: definition_path = self._id_to_path[definition_id] try: - cache_path = Resources.getPath(Resources.Cache, "definitions", self._application.getVersion(), definition_id) + cache_path = Resources.getPath(Resources.Cache, "definitions", Application.getInstance().getVersion(), definition_id) cache_mtime = os.path.getmtime(cache_path) definition_mtime = os.path.getmtime(definition_path) - except FileNotFoundError: #Cache doesn't exist yet. + except FileNotFoundError: # Cache doesn't exist yet. return None - except PermissionError: #No read permission. + except PermissionError: # No read permission. return None if definition_mtime > cache_mtime: @@ -215,7 +238,7 @@ if os.path.getmtime(file_path) > cache_mtime: return None except FileNotFoundError: - return None #Cache for parent doesn't exist yet. + return None # Cache for parent doesn't exist yet. return definition @@ -226,7 +249,7 @@ # # \param definition The definition container to store. def _saveCachedDefinition(self, definition: DefinitionContainer) -> None: - cache_path = Resources.getStoragePath(Resources.Cache, "definitions", self._application.getVersion(), definition.id) + cache_path = Resources.getStoragePath(Resources.Cache, "definitions", Application.getInstance().getVersion(), definition.id) # Ensure the cache path exists. try: @@ -256,7 +279,7 @@ old_file_expression = re.compile(r"\{sep}old\{sep}\d+\{sep}".format(sep = os.sep)) # To detect files that are back-ups. Matches on .../old/#/... - all_resources = set() + all_resources = set() # type: Set[str] for resource_type in ContainerRegistry.getInstance().getResourceTypes().values(): all_resources |= set(Resources.getAllResourcesOfType(resource_type)) # Remove duplicates, since the Resources only finds resources by their directories. for filename in all_resources: @@ -275,7 +298,8 @@ ## Converts a file path to the MIME type of the container it represents. # # \return The MIME type or None if it's not a container. - def _pathToMime(self, path) -> Optional[MimeType]: + @staticmethod + def _pathToMime(path: str) -> Optional[MimeType]: try: mime = MimeTypeDatabase.getMimeTypeForFile(path) except MimeTypeDatabase.MimeTypeNotFoundError: @@ -286,7 +310,10 @@ return mime ## Converts a file path to the ID of the container it represents. - def _pathToId(self, path) -> Optional[str]: - mime = self._pathToMime(path) + @staticmethod + def _pathToId(path: str) -> Optional[str]: + result = None + mime = LocalContainerProvider._pathToMime(path) if mime: - return urllib.parse.unquote_plus(self._pathToMime(path).stripExtension(os.path.basename(path))) + result = urllib.parse.unquote_plus(mime.stripExtension(os.path.basename(path))) + return result diff -Nru uranium-3.3.0/plugins/LocalContainerProvider/plugin.json uranium-4.4.1/plugins/LocalContainerProvider/plugin.json --- uranium-3.3.0/plugins/LocalContainerProvider/plugin.json 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/plugins/LocalContainerProvider/plugin.json 2019-11-19 10:50:46.000000000 +0000 @@ -1,8 +1,8 @@ { "name": "Local Container Provider", "author": "Ultimaker B.V.", - "version": "1.0.0", + "version": "1.0.1", "description": "Provides built-in setting containers that come with the installation of the application.", - "api": 4, + "api": "7.0", "i18n-catalog": "uranium" } diff -Nru uranium-3.3.0/plugins/LocalFileOutputDevice/__init__.py uranium-4.4.1/plugins/LocalFileOutputDevice/__init__.py --- uranium-3.3.0/plugins/LocalFileOutputDevice/__init__.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/plugins/LocalFileOutputDevice/__init__.py 2019-11-19 10:50:46.000000000 +0000 @@ -3,8 +3,6 @@ from . import LocalFileOutputDevicePlugin -from UM.i18n import i18nCatalog -catalog = i18nCatalog("uranium") def getMetaData(): return { diff -Nru uranium-3.3.0/plugins/LocalFileOutputDevice/LocalFileOutputDevicePlugin.py uranium-4.4.1/plugins/LocalFileOutputDevice/LocalFileOutputDevicePlugin.py --- uranium-3.3.0/plugins/LocalFileOutputDevice/LocalFileOutputDevicePlugin.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/plugins/LocalFileOutputDevice/LocalFileOutputDevicePlugin.py 2019-11-19 10:50:46.000000000 +0000 @@ -1,7 +1,7 @@ -# Copyright (c) 2016 Ultimaker B.V. +# Copyright (c) 2018 Ultimaker B.V. # Uranium is released under the terms of the LGPLv3 or higher. -from UM.Preferences import Preferences +from UM.Application import Application from UM.OutputDevice.OutputDevicePlugin import OutputDevicePlugin from .LocalFileOutputDevice import LocalFileOutputDevice @@ -14,8 +14,8 @@ def __init__(self): super().__init__() - Preferences.getInstance().addPreference("local_file/last_used_type", "") - Preferences.getInstance().addPreference("local_file/dialog_save_path", "") + Application.getInstance().getPreferences().addPreference("local_file/last_used_type", "") + Application.getInstance().getPreferences().addPreference("local_file/dialog_save_path", "") def start(self): self.getOutputDeviceManager().addOutputDevice(LocalFileOutputDevice()) diff -Nru uranium-3.3.0/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py uranium-4.4.1/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py --- uranium-3.3.0/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py 2019-11-19 10:50:46.000000000 +0000 @@ -6,10 +6,9 @@ from PyQt5.QtCore import QUrl from PyQt5.QtGui import QDesktopServices -from PyQt5.QtWidgets import QFileDialog, QMessageBox, QLineEdit +from PyQt5.QtWidgets import QFileDialog, QMessageBox from UM.Application import Application -from UM.Preferences import Preferences from UM.Logger import Logger from UM.Mesh.MeshWriter import MeshWriter from UM.FileHandler.WriteFileJob import WriteFileJob @@ -17,13 +16,9 @@ from UM.OutputDevice.OutputDevice import OutputDevice from UM.OutputDevice import OutputDeviceError -from UM.Platform import Platform from UM.i18n import i18nCatalog -# HACK: This class tries to fix double file extensions problems on Mac OS X with the FileDialog. -from .NonNativeFileDialog import NonNativeFileDialog - catalog = i18nCatalog("uranium") @@ -53,7 +48,7 @@ raise OutputDeviceError.DeviceBusyError() # Set up and display file dialog - dialog = NonNativeFileDialog() + dialog = QFileDialog() dialog.setWindowTitle(catalog.i18nc("@title:window", "Save to File")) dialog.setFileMode(QFileDialog.AnyFile) @@ -62,9 +57,6 @@ # Ensure platform never ask for overwrite confirmation since we do this ourselves dialog.setOption(QFileDialog.DontConfirmOverwrite) - # Native File dialog on OS X has issues with double/multiple extension files. - if Platform.isOSX(): - dialog.setOption(QFileDialog.DontUseNativeDialog) if sys.platform == "linux" and "KDE_FULL_SESSION" in os.environ: dialog.setOption(QFileDialog.DontUseNativeDialog) @@ -72,10 +64,11 @@ mime_types = [] selected_filter = None - if "preferred_mimetype" in kwargs and kwargs["preferred_mimetype"] is not None: - preferred_mimetype = kwargs["preferred_mimetype"] + if "preferred_mimetypes" in kwargs and kwargs["preferred_mimetypes"] is not None: + preferred_mimetypes = kwargs["preferred_mimetypes"] else: - preferred_mimetype = Preferences.getInstance().getValue("local_file/last_used_type") + preferred_mimetypes = Application.getInstance().getPreferences().getValue("local_file/last_used_type") + preferred_mimetype_list = preferred_mimetypes.split(";") if not file_handler: file_handler = Application.getInstance().getMeshFileHandler() @@ -86,10 +79,19 @@ if limit_mimetypes: file_types = list(filter(lambda i: i["mime_type"] in limit_mimetypes, file_types)) + file_types = [ft for ft in file_types if not ft["hide_in_file_dialog"]] + if len(file_types) == 0: Logger.log("e", "There are no file types available to write with!") raise OutputDeviceError.WriteRequestFailedError(catalog.i18nc("@info:warning", "There are no file types available to write with!")) + # Find the first available preferred mime type + preferred_mimetype = None + for mime_type in preferred_mimetype_list: + if any(ft["mime_type"] == mime_type for ft in file_types): + preferred_mimetype = mime_type + break + for item in file_types: type_filter = "{0} (*.{1})".format(item["description"], item["extension"]) filters.append(type_filter) @@ -99,6 +101,10 @@ if file_name: file_name += "." + item["extension"] + # CURA-6411: This code needs to be before dialog.selectFile and the filters, because otherwise in macOS (for some reason) the setDirectory call doesn't work. + stored_directory = Application.getInstance().getPreferences().getValue("local_file/dialog_save_path") + dialog.setDirectory(stored_directory) + # Add the file name before adding the extension to the dialog if file_name is not None: dialog.selectFile(file_name) @@ -107,17 +113,14 @@ if selected_filter is not None: dialog.selectNameFilter(selected_filter) - stored_directory = Preferences.getInstance().getValue("local_file/dialog_save_path") - dialog.setDirectory(stored_directory) - if not dialog.exec_(): raise OutputDeviceError.UserCanceledError() save_path = dialog.directory().absolutePath() - Preferences.getInstance().setValue("local_file/dialog_save_path", save_path) + Application.getInstance().getPreferences().setValue("local_file/dialog_save_path", save_path) selected_type = file_types[filters.index(dialog.selectedNameFilter())] - Preferences.getInstance().setValue("local_file/last_used_type", selected_type["mime_type"]) + Application.getInstance().getPreferences().setValue("local_file/last_used_type", selected_type["mime_type"]) # Get file name from file dialog file_name = dialog.selectedFiles()[0] @@ -150,6 +153,7 @@ job = WriteFileJob(file_writer, stream, nodes, mode) job.setFileName(file_name) + job.setAddToRecentFiles(True) # The file will be added into the "recent files" list upon success job.progress.connect(self._onJobProgress) job.finished.connect(self._onWriteJobFinished) diff -Nru uranium-3.3.0/plugins/LocalFileOutputDevice/NonNativeFileDialog.py uranium-4.4.1/plugins/LocalFileOutputDevice/NonNativeFileDialog.py --- uranium-3.3.0/plugins/LocalFileOutputDevice/NonNativeFileDialog.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/plugins/LocalFileOutputDevice/NonNativeFileDialog.py 1970-01-01 00:00:00.000000000 +0000 @@ -1,82 +0,0 @@ -# Copyright (c) 2018 Ultimaker B.V. -# Uranium is released under the terms of the LGPLv3 or higher. -import os - -from PyQt5.QtWidgets import QFileDialog, QLineEdit - -from UM.Platform import Platform - - -# -# HACK: This class tries to fix double file extensions problems on Mac OS X with the FileDialog. -# -class NonNativeFileDialog(QFileDialog): - - def __init__(self, *args): - super().__init__(*args) - - self._previous_extension = "" - # Only do this on OS X - if Platform.isOSX(): - self.filterSelected.connect(self._onFilterChanged) - - def _onFilterChanged(self, selected_filter: str): - if not self.selectedFiles(): - return - - filename = self.selectedFiles()[0] - if not filename: - return - if os.path.isdir(filename): - return - - # Get the selected extension - # The filter string we get here is a MINE extension string which looks like below: - # - "Text File (*.txt)" - # - "JPG Files (*.jpg, *.jpeg)" - # We extract the extension part to for processing double/multi-extension file names. - extension = selected_filter.rsplit(" ", 1)[-1] - extension = extension.strip("()") - extension = extension[2:] # Remove the "*." - extension_parts = extension.split(".") - - # Save the previous extension so we know what to remove if the user change between file types - previous_extension = self._previous_extension.rsplit(" ", 1)[-1] - previous_extension = previous_extension.strip("()") - previous_extension = previous_extension[2:] # Remove the "*." - previous_extension_parts = previous_extension.split(".") - self._previous_extension = selected_filter - - # Get the file name editor - line_editor = self.findChild(QLineEdit) - - base_filename = os.path.basename(filename) - filename_parts = base_filename.split(".") - if len(filename_parts) == 1: - # No extension, add the selected extension to the end - new_base_filename = base_filename + "." + extension - new_filepath = filename[:-len(base_filename)] + new_base_filename - self.selectFile(new_filepath) - line_editor.setText(new_base_filename) - self.update() - return - - current_extension_parts = filename_parts[1:] - new_filepath = filename - new_base_filename = base_filename - if current_extension_parts != extension_parts: - remove_count = 0 - for part in reversed(current_extension_parts): - if part not in extension_parts and part not in previous_extension_parts: - break - remove_count += 1 - new_parts = filename_parts[:1] + current_extension_parts[:len(current_extension_parts) - remove_count] - new_base_filename = ".".join(new_parts + extension_parts) - new_filepath = filename[:len(filename) - len(base_filename)] + new_base_filename - self.selectFile(new_filepath) - line_editor.setText(new_base_filename) - self.update() - - def selectNameFilter(self, p_str): - super().selectNameFilter(p_str) - self._previous_extension = p_str diff -Nru uranium-3.3.0/plugins/LocalFileOutputDevice/plugin.json uranium-4.4.1/plugins/LocalFileOutputDevice/plugin.json --- uranium-3.3.0/plugins/LocalFileOutputDevice/plugin.json 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/plugins/LocalFileOutputDevice/plugin.json 2019-11-19 10:50:46.000000000 +0000 @@ -2,7 +2,7 @@ "name": "Local File Output Device", "description": "Enables saving to local files.", "author": "Ultimaker B.V.", - "version": "1.0.0", - "api": 4, + "version": "1.0.1", + "api": "7.0", "i18n-catalog": "uranium" } diff -Nru uranium-3.3.0/plugins/Tools/CameraTool/CameraTool.py uranium-4.4.1/plugins/Tools/CameraTool/CameraTool.py --- uranium-3.3.0/plugins/Tools/CameraTool/CameraTool.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/plugins/Tools/CameraTool/CameraTool.py 2019-11-19 10:50:46.000000000 +0000 @@ -1,30 +1,32 @@ -# Copyright (c) 2015 Ultimaker B.V. +# Copyright (c) 2018 Ultimaker B.V. # Uranium is released under the terms of the LGPLv3 or higher. +import math +from typing import Optional, Tuple, cast + +from UM.Qt.Bindings.MainWindow import MainWindow +from UM.Qt.QtApplication import QtApplication from UM.Tool import Tool -from UM.Preferences import Preferences from UM.Event import Event, MouseEvent, KeyEvent from UM.Math.Vector import Vector from UM.Math.Matrix import Matrix from UM.Application import Application from PyQt5 import QtCore, QtWidgets -import math - ## Provides the tool to manipulate the camera: moving, zooming and rotating # # Note that zooming is performed by moving closer to or further away from the origin ("dolly") # instead of changing the field of view of the camera ("zoom") class CameraTool(Tool): - def __init__(self): + def __init__(self) -> None: super().__init__() self._scene = Application.getInstance().getController().getScene() self._yaw = 0 self._pitch = 0 self._origin = Vector(0, 0, 0) - self._min_zoom = 1 + self._min_zoom = 1.0 self._max_zoom = 2000.0 self._manual_zoom = 200 @@ -32,54 +34,73 @@ self._move = False self._dragged = False - self._shift_is_active = None - self._ctrl_is_active = None - self._space_is_active = None + self._shift_is_active = False + self._ctrl_is_active = False + self._space_is_active = False - self._start_drag = None + self._start_drag = None # type: Optional[Tuple[int, int]] self._start_y = None - self._drag_distance = 0.05 + self._drag_distance = 0.01 - Preferences.getInstance().addPreference("view/invert_zoom", False) - Preferences.getInstance().addPreference("view/zoom_to_mouse", False) - self._invert_zoom = Preferences.getInstance().getValue("view/invert_zoom") - self._zoom_to_mouse = Preferences.getInstance().getValue("view/zoom_to_mouse") - Preferences.getInstance().preferenceChanged.connect(self._onPreferencesChanged) + Application.getInstance().getPreferences().addPreference("view/invert_zoom", False) + Application.getInstance().getPreferences().addPreference("view/zoom_to_mouse", False) + self._invert_zoom = Application.getInstance().getPreferences().getValue("view/invert_zoom") + self._zoom_to_mouse = Application.getInstance().getPreferences().getValue("view/zoom_to_mouse") + Application.getInstance().getPreferences().preferenceChanged.connect(self._onPreferencesChanged) - def _onPreferencesChanged(self, name): + def _onPreferencesChanged(self, name: str) -> None: if name != "view/invert_zoom" and name != "view/zoom_to_mouse": return - self._invert_zoom = Preferences.getInstance().getValue("view/invert_zoom") - self._zoom_to_mouse = Preferences.getInstance().getValue("view/zoom_to_mouse") + self._invert_zoom = Application.getInstance().getPreferences().getValue("view/invert_zoom") + self._zoom_to_mouse = Application.getInstance().getPreferences().getValue("view/zoom_to_mouse") ## Set the minimum and maximum distance from the origin used for "zooming" the camera # - # \param min type(float) distance from the origin when fully zoomed in - # \param max type(float) distance from the origin when fully zoomed out - def setZoomRange(self, min, max): + # \param min distance from the origin when fully zoomed in + # \param max distance from the origin when fully zoomed out + def setZoomRange(self, min: float, max: float) -> None: self._min_zoom = min self._max_zoom = max + self.clipToZoom() + + ## Makes sure that the camera is within the zoom range. + def clipToZoom(self) -> None: + #Clip the camera to the new zoom range. + camera = self._scene.getActiveCamera() + if camera is None: + return + + if camera.isPerspective(): + distance = (camera.getWorldPosition() - self._origin).length() + direction = (camera.getWorldPosition() - self._origin).normalized() + if distance < self._min_zoom: + camera.setPosition(self._origin + direction * self._min_zoom) + if distance > self._max_zoom: + camera.setPosition(self._origin + direction * self._max_zoom) ## Set the point around which the camera rotates # # \param origin type(Vector) origin point - def setOrigin(self, origin): + def setOrigin(self, origin: Vector) -> None: + camera = self._scene.getActiveCamera() + if camera is None: + return translation = origin - self._origin self._origin = origin - self._scene.getActiveCamera().translate(translation) + camera.translate(translation) self._rotateCamera(0.0, 0.0) ## Get the point around which the camera rotates # - # \return type(Vector) origin point - def getOrigin(self): + # \return origin point + def getOrigin(self) -> Vector: return self._origin ## Prepare modifier-key variables on each event # - # \param event type(Event) event passed from event handler - def checkModifierKeys(self, event): + # \param event event passed from event handler + def checkModifierKeys(self, event) -> None: modifiers = QtWidgets.QApplication.keyboardModifiers() self._shift_is_active = (modifiers & QtCore.Qt.ShiftModifier) != QtCore.Qt.NoModifier self._ctrl_is_active = (modifiers & QtCore.Qt.ControlModifier) != QtCore.Qt.NoModifier @@ -93,31 +114,32 @@ ## Check if the event warrants a call off the _moveCamera method # - # \param event type(Event) event passed from event handler + # \param event event passed from event handler # \return type(boolean) - def moveEvent(self, event): + def moveEvent(self, event) -> bool: if MouseEvent.MiddleButton in event.buttons: # mousewheel return True elif MouseEvent.LeftButton in event.buttons and self._shift_is_active is True: # shift -> leftbutton return True elif MouseEvent.RightButton in event.buttons and self._shift_is_active is True: # shift -> rightbutton return True + return False ## Check if the event warrants a call off the _rotateCamera method # - # \param event type(Event) event passed from event handler + # \param event event passed from event handler # \return type(boolean) - def rotateEvent(self, event): + def rotateEvent(self, event) -> bool: if MouseEvent.RightButton in event.buttons: # rightbutton return True elif MouseEvent.LeftButton in event.buttons and self._space_is_active is True: # shift -> leftbutton return True + return False ## Calls the zoomaction method for the mousewheel event, mouseMoveEvent (in combo with alt or space) and when the plus or minus keys are used # - # \param event type(Event) event passed from event handler - # \return type(boolean) - def initiateZoom(self, event): + # \param event event passed from event handler + def initiateZoom(self, event) -> bool: if event.type is event.MousePressEvent: return False elif event.type is Event.MouseMoveEvent and self._space_is_active is False: #space -> mousemove @@ -140,19 +162,19 @@ elif event.key == KeyEvent.PlusKey or event.key == KeyEvent.EqualKey: # same story as the minus and underscore key: it checks for both the plus and equal key (so you won't have to do shift -> equal, to use the plus-key) self._zoomCamera(self._manual_zoom) return True + return False - ## Rotate camera around origin + ## Rotate camera around origin. # - # \param angle type(int) rotation angle - def rotateCam(self, x, y): + # \param x Angle by which the camera should be rotated horizontally. + # \param y Angle by which the camera should be rotated vertically. + def rotateCamera(self, x: float, y: float) -> None: temp_x = x / 180 temp_y = y / 180 self._rotateCamera(temp_x, temp_y) ## Handle mouse and keyboard events - # - # \param event type(Event) - def event(self, event): + def event(self, event) -> bool: self.checkModifierKeys(event) # Handle mouse- and keyboard-initiated zoom-events self.initiateZoom(event) @@ -170,18 +192,18 @@ # Handle mouse-initiated rotate- and move-events if event.type is Event.MousePressEvent: - if self.moveEvent(event) == True: + if self.moveEvent(event): self._move = True self._start_drag = (event.x, event.y) - return False - elif self.rotateEvent(event) == True: + return True + elif self.rotateEvent(event): self._rotate = True self._start_drag = (event.x, event.y) return True elif event.type is Event.MouseMoveEvent: if self._rotate or self._move: - diff = (event.x - self._start_drag[0], event.y - self._start_drag[1]) + diff = (event.x - self._start_drag[0], event.y - self._start_drag[1]) # type: ignore length_squared = diff[0] * diff[0] + diff[1] * diff[1] if length_squared > (self._drag_distance * self._drag_distance): @@ -208,8 +230,8 @@ ## Move the camera in response to a mouse event. # - # \param event type(Event) event passed from event handler - def _moveCamera(self, event): + # \param event event passed from event handler + def _moveCamera(self, event) -> None: camera = self._scene.getActiveCamera() if not camera or not camera.isEnabled(): return @@ -226,50 +248,65 @@ ## "Zoom" the camera in response to a mouse event. # # Note that the camera field of view is left unaffected, but instead the camera moves closer to the origin - # \param zoom_range type(int) factor by which the distance to the origin is multiplied, multiplied by 1280 - def _zoomCamera(self, zoom_range, event = None): + # \param zoom_range factor by which the distance to the origin is multiplied, multiplied by 1280 + def _zoomCamera(self, zoom_range: float, event: Optional[Event] = None) -> None: camera = self._scene.getActiveCamera() if not camera or not camera.isEnabled(): return + self.clipToZoom() + self._scene.getSceneLock().acquire() + if camera.isPerspective(): + r = (camera.getWorldPosition() - self._origin).length() + delta = r * (zoom_range / 128 / 10.0) + r -= delta + + if self._invert_zoom: + delta *= -1 + + move_vector = Vector(0.0, 0.0, 1.0) + + if event is not None and self._zoom_to_mouse: + viewport_center_x = QtApplication.getInstance().getRenderer().getViewportWidth() / 2 + viewport_center_y = QtApplication.getInstance().getRenderer().getViewportHeight() / 2 + main_window = cast(MainWindow, QtApplication.getInstance().getMainWindow()) + mouse_diff_center_x = viewport_center_x - main_window.mouseX + mouse_diff_center_y = viewport_center_y - main_window.mouseY + + x_component = mouse_diff_center_x / QtApplication.getInstance().getRenderer().getViewportWidth() + y_component = mouse_diff_center_y / QtApplication.getInstance().getRenderer().getViewportHeight() + + move_vector = Vector(x_component, -y_component, 1) + move_vector = move_vector.normalized() + + move_vector = -delta * move_vector + if delta != 0: + if self._min_zoom < r < self._max_zoom: + camera.translate(move_vector) + if self._zoom_to_mouse: + # Set the origin of the camera to the new distance, right in front of the new camera position. + self._origin = (r * Vector(0.0, 0.0, -1.0)).preMultiply(camera.getWorldTransformation()) + else: + amount_of_zoom = zoom_range / 1280 / 10.0 + if self._invert_zoom: + amount_of_zoom *= -1 + new_zoom_factor = camera.getZoomFactor() - amount_of_zoom + + if new_zoom_factor > 1: + camera.setZoomFactor(1) + elif new_zoom_factor < -0.495: + camera.setZoomFactor(-0.495) + else: + camera.setZoomFactor(new_zoom_factor) - r = (camera.getWorldPosition() - self._origin).length() - delta = r * (zoom_range / 128 / 10.0) - r -= delta - - if self._invert_zoom: - delta *= -1 - - move_vector = Vector(0.0, 0.0, 1.0) - - if event is not None and self._zoom_to_mouse: - viewport_center_x = Application.getInstance().getRenderer().getViewportWidth() / 2 - viewport_center_y = Application.getInstance().getRenderer().getViewportHeight() / 2 - - mouse_diff_center_x = viewport_center_x - Application.getInstance().getMainWindow().mouseX - mouse_diff_center_y = viewport_center_y - Application.getInstance().getMainWindow().mouseY - - x_component = mouse_diff_center_x / Application.getInstance().getRenderer().getViewportWidth() - y_component = mouse_diff_center_y / Application.getInstance().getRenderer().getViewportHeight() - - move_vector = Vector(x_component, -y_component, 1) - move_vector = move_vector.normalized() - - move_vector = -delta * move_vector - if delta != 0: - if r > self._min_zoom and r < self._max_zoom: - camera.translate(move_vector) - if self._zoom_to_mouse: - # Set the origin of the camera to the new distance, right in front of the new camera position. - self._origin = (r * Vector(0.0, 0.0, -1.0)).preMultiply(camera.getWorldTransformation()) self._scene.getSceneLock().release() ## Rotate the camera in response to a mouse event. # - # \param x type(int) amount by which the camera should be rotated horizontally, expressed in pixelunits - # \param y type(int) amount by which the camera should be rotated vertically, expressed in pixelunits - def _rotateCamera(self, x, y): + # \param x Amount by which the camera should be rotated horizontally, expressed in pixelunits + # \param y Amount by which the camera should be rotated vertically, expressed in pixelunits + def _rotateCamera(self, x: float, y: float) -> None: camera = self._scene.getActiveCamera() if not camera or not camera.isEnabled(): return diff -Nru uranium-3.3.0/plugins/Tools/CameraTool/__init__.py uranium-4.4.1/plugins/Tools/CameraTool/__init__.py --- uranium-3.3.0/plugins/Tools/CameraTool/__init__.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/plugins/Tools/CameraTool/__init__.py 2019-11-19 10:50:46.000000000 +0000 @@ -3,8 +3,6 @@ from . import CameraTool -from UM.i18n import i18nCatalog -i18n_catalog = i18nCatalog("uranium") def getMetaData(): return { diff -Nru uranium-3.3.0/plugins/Tools/CameraTool/plugin.json uranium-4.4.1/plugins/Tools/CameraTool/plugin.json --- uranium-3.3.0/plugins/Tools/CameraTool/plugin.json 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/plugins/Tools/CameraTool/plugin.json 2019-11-19 10:50:46.000000000 +0000 @@ -1,8 +1,8 @@ { "name": "Camera Tool", "author": "Ultimaker B.V.", - "version": "1.0.0", + "version": "1.0.1", "description": "Provides the tool to manipulate the camera.", - "api": 4, + "api": "7.0", "i18n-catalog": "uranium" } diff -Nru uranium-3.3.0/plugins/Tools/CameraTool/tests/TestCameraTool.py uranium-4.4.1/plugins/Tools/CameraTool/tests/TestCameraTool.py --- uranium-3.3.0/plugins/Tools/CameraTool/tests/TestCameraTool.py 1970-01-01 00:00:00.000000000 +0000 +++ uranium-4.4.1/plugins/Tools/CameraTool/tests/TestCameraTool.py 2019-11-19 10:50:46.000000000 +0000 @@ -0,0 +1,68 @@ + +from unittest.mock import patch, MagicMock +import sys +import os + +from UM.Event import MouseEvent + +sys.path.append(os.path.join(os.path.dirname(os.path.abspath(__file__)), "..")) +from UM.Math.Vector import Vector +import CameraTool +import pytest + + +mocked_scene = MagicMock() + + +def generateMouseEvent(left: bool, middle: bool, right: bool): + event = MagicMock() + event.buttons = [] + if left: + event.buttons.append(MouseEvent.LeftButton) + if middle: + event.buttons.append(MouseEvent.MiddleButton) + if right: + event.buttons.append(MouseEvent.RightButton) + return event + + +@pytest.fixture() +def camera_tool(): + application = MagicMock() + controller = MagicMock() + application.getController = MagicMock(return_value = controller) + controller.getScene = MagicMock(return_value = mocked_scene) + mocked_scene.reset_mock() + with patch("UM.Application.Application.getInstance", MagicMock(return_value = application)): + return CameraTool.CameraTool() + + +def test_setOrigin(camera_tool): + # Isolation, we just want to know it gets called with the right data. + camera_tool._rotateCamera = MagicMock() + camera_tool.setOrigin(Vector(1, 2, 3)) + + assert camera_tool.getOrigin() == Vector(1, 2, 3) + camera_tool._rotateCamera.assert_called_with(0, 0) + + +@pytest.mark.parametrize("event, result", [(generateMouseEvent(True, False, False), False), + (generateMouseEvent(False, True, False), True), + (generateMouseEvent(False, False, True), False), + (generateMouseEvent(True, False, True), False), + (generateMouseEvent(False, False, False), False), + ]) +def test_moveEvent(camera_tool, event, result): + assert camera_tool.moveEvent(event) == result + + +@pytest.mark.parametrize("event, result", [(generateMouseEvent(True, False, False), True), + (generateMouseEvent(False, True, False), True), + (generateMouseEvent(False, False, True), True), + (generateMouseEvent(True, False, True), True), + (generateMouseEvent(False, False, False), False), # Only the no button pressed case should be false + ]) +def test_moveEventShiftActive(camera_tool, event, result): + camera_tool._shift_is_active = True + assert camera_tool.moveEvent(event) == result + diff -Nru uranium-3.3.0/plugins/Tools/MirrorTool/MirrorToolHandle.py uranium-4.4.1/plugins/Tools/MirrorTool/MirrorToolHandle.py --- uranium-3.3.0/plugins/Tools/MirrorTool/MirrorToolHandle.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/plugins/Tools/MirrorTool/MirrorToolHandle.py 2019-11-19 10:50:46.000000000 +0000 @@ -11,6 +11,7 @@ class MirrorToolHandle(ToolHandle): def __init__(self, parent = None): + self._name = "MirrorToolHandle" super().__init__(parent) self._handle_width = 8 self._handle_height = 14 diff -Nru uranium-3.3.0/plugins/Tools/MirrorTool/MirrorTool.py uranium-4.4.1/plugins/Tools/MirrorTool/MirrorTool.py --- uranium-3.3.0/plugins/Tools/MirrorTool/MirrorTool.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/plugins/Tools/MirrorTool/MirrorTool.py 2019-11-19 10:50:46.000000000 +0000 @@ -23,7 +23,7 @@ super().__init__() self._handle = MirrorToolHandle.MirrorToolHandle() - self._shortcut_key = Qt.Key_W + self._shortcut_key = Qt.Key_M self._operation_started = False @@ -54,8 +54,7 @@ self.operationStopped.emit(self) # Perform a mirror operation - if self.getLockedAxis(): - op = None + if self.getLockedAxis() != ToolHandle.NoAxis: if Selection.getCount() == 1: node = Selection.getSelectedObject(0) if self.getLockedAxis() == ToolHandle.XAxis: @@ -70,7 +69,7 @@ else: op = GroupedOperation() - for node in Selection.getAllSelectedObjects(): + for node in self._getSelectedObjectsWithoutSelectedAncestors(): if self.getLockedAxis() == ToolHandle.XAxis: mirror = Vector(-1, 1, 1) elif self.getLockedAxis() == ToolHandle.YAxis: @@ -84,7 +83,7 @@ op.push() - self.setLockedAxis(None) + self.setLockedAxis(ToolHandle.NoAxis) return True return False diff -Nru uranium-3.3.0/plugins/Tools/MirrorTool/plugin.json uranium-4.4.1/plugins/Tools/MirrorTool/plugin.json --- uranium-3.3.0/plugins/Tools/MirrorTool/plugin.json 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/plugins/Tools/MirrorTool/plugin.json 2019-11-19 10:50:46.000000000 +0000 @@ -1,8 +1,8 @@ { "name": "Mirror Tool", "author": "Ultimaker B.V.", - "version": "1.0.0", + "version": "1.0.1", "description": "Provides the Mirror tool.", - "api": 4, + "api": "7.0", "i18n-catalog": "uranium" } diff -Nru uranium-3.3.0/plugins/Tools/RotateTool/plugin.json uranium-4.4.1/plugins/Tools/RotateTool/plugin.json --- uranium-3.3.0/plugins/Tools/RotateTool/plugin.json 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/plugins/Tools/RotateTool/plugin.json 2019-11-19 10:50:46.000000000 +0000 @@ -1,8 +1,8 @@ { "name": "Rotate Tool", "author": "Ultimaker B.V.", - "version": "1.0.0", + "version": "1.0.1", "description": "Provides the Rotate tool.", - "api": 4, + "api": "7.0", "i18n-catalog": "uranium" } diff -Nru uranium-3.3.0/plugins/Tools/RotateTool/RotateToolHandle.py uranium-4.4.1/plugins/Tools/RotateTool/RotateToolHandle.py --- uranium-3.3.0/plugins/Tools/RotateTool/RotateToolHandle.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/plugins/Tools/RotateTool/RotateToolHandle.py 2019-11-19 10:50:46.000000000 +0000 @@ -9,9 +9,12 @@ ## Provides the circular toolhandles for each axis for the rotate tool + class RotateToolHandle(ToolHandle): def __init__(self, parent = None): super().__init__(parent) + + self._name = "RotateToolHandle" self._inner_radius = 40 self._outer_radius = 40.5 self._line_width = 0.5 diff -Nru uranium-3.3.0/plugins/Tools/RotateTool/RotateTool.py uranium-4.4.1/plugins/Tools/RotateTool/RotateTool.py --- uranium-3.3.0/plugins/Tools/RotateTool/RotateTool.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/plugins/Tools/RotateTool/RotateTool.py 2019-11-19 10:50:46.000000000 +0000 @@ -1,6 +1,8 @@ -# Copyright (c) 2015 Ultimaker B.V. +# Copyright (c) 2018 Ultimaker B.V. # Uranium is released under the terms of the LGPLv3 or higher. +from typing import Optional +from UM.Scene.SceneNode import SceneNode from UM.Tool import Tool from UM.Job import Job from UM.Event import Event, MouseEvent, KeyEvent @@ -19,15 +21,24 @@ from UM.Operations.SetTransformOperation import SetTransformOperation from UM.Operations.LayFlatOperation import LayFlatOperation -from . import RotateToolHandle +from UM.Version import Version + +from UM.View.GL.OpenGL import OpenGL +try: + from . import RotateToolHandle +except (ImportError, SystemError): + import RotateToolHandle # type: ignore # This fixes the tests not being able to import. import math import time +from UM.i18n import i18nCatalog +i18n_catalog = i18nCatalog("uranium") + + ## Provides the tool to rotate meshes and groups # # The tool exposes a ToolHint to show the rotation angle of the current operation - class RotateTool(Tool): def __init__(self): super().__init__() @@ -39,15 +50,18 @@ self._angle = None self._angle_update_time = None - self._shortcut_key = Qt.Key_Z + self._shortcut_key = Qt.Key_R self._progress_message = None self._iterations = 0 self._total_iterations = 0 self._rotating = False - self.setExposedProperties("ToolHint", "RotationSnap", "RotationSnapAngle") + self.setExposedProperties("ToolHint", "RotationSnap", "RotationSnapAngle", "SelectFaceSupported", "SelectFaceToLayFlatMode") self._saved_node_positions = [] + self._select_face_mode = False + Selection.selectedFaceChanged.connect(self._onSelectedFaceChanged) + ## Handle mouse and keyboard events # # \param event type(Event) @@ -56,13 +70,11 @@ if event.type == Event.KeyPressEvent and event.key == KeyEvent.ShiftKey: # Snap is toggled when pressing the shift button - self._snap_rotation = (not self._snap_rotation) - self.propertyChanged.emit() + self.setRotationSnap(not self._snap_rotation) if event.type == Event.KeyReleaseEvent and event.key == KeyEvent.ShiftKey: # Snap is "toggled back" when releasing the shift button - self._snap_rotation = (not self._snap_rotation) - self.propertyChanged.emit() + self.setRotationSnap(not self._snap_rotation) if event.type == Event.MousePressEvent and self._controller.getToolsEnabled(): # Start a rotate operation @@ -83,7 +95,7 @@ # Save the current positions of the node, as we want to rotate around their current centres self._saved_node_positions = [] - for node in Selection.getAllSelectedObjects(): + for node in self._getSelectedObjectsWithoutSelectedAncestors(): self._saved_node_positions.append((node, node.getPosition())) if id == ToolHandle.XAxis: @@ -98,7 +110,7 @@ self.setDragStart(event.x, event.y) self._rotating = False self._angle = 0 - + return True if event.type == Event.MouseMoveEvent: # Perform a rotate operation @@ -119,7 +131,7 @@ drag_start = (self.getDragStart() - handle_position).normalized() drag_position = self.getDragPosition(event.x, event.y) if not drag_position: - return + return False drag_end = (drag_position - handle_position).normalized() try: @@ -130,7 +142,7 @@ if self._snap_rotation: angle = int(angle / self._snap_angle) * self._snap_angle if angle == 0: - return + return False rotation = None if self.getLockedAxis() == ToolHandle.XAxis: @@ -155,30 +167,79 @@ self.propertyChanged.emit() # Rotate around the saved centeres of all selected nodes - op = GroupedOperation() - for node, position in self._saved_node_positions: - op.addOperation(RotateOperation(node, rotation, rotate_around_point = position)) - op.push() + if len(self._saved_node_positions) > 1: + op = GroupedOperation() + for node, position in self._saved_node_positions: + op.addOperation(RotateOperation(node, rotation, rotate_around_point = position)) + op.push() + else: + for node, position in self._saved_node_positions: + RotateOperation(node, rotation, rotate_around_point=position).push() self.setDragStart(event.x, event.y) + return True if event.type == Event.MouseReleaseEvent: # Finish a rotate operation if self.getDragPlane(): self.setDragPlane(None) - self.setLockedAxis(None) + self.setLockedAxis(ToolHandle.NoAxis) self._angle = None self.propertyChanged.emit() if self._rotating: self.operationStopped.emit(self) return True + def _onSelectedFaceChanged(self): + if not self._select_face_mode: + return + + self._handle.setEnabled(not Selection.getFaceSelectMode()) + + selected_face = Selection.getSelectedFace() + if not Selection.getSelectedFace() or not (Selection.hasSelection() and Selection.getFaceSelectMode()): + return + + original_node, face_id = selected_face + meshdata = original_node.getMeshDataTransformed() + if not meshdata or face_id < 0: + return + + face_mid, face_normal = meshdata.getFacePlane(face_id) + object_mid = original_node.getBoundingBox().center + rotation_point_vector = Vector(object_mid.x, object_mid.y, face_mid[2]) + face_normal_vector = Vector(face_normal[0], face_normal[1], face_normal[2]) + rotation_quaternion = Quaternion.rotationTo(face_normal_vector.normalized(), Vector(0.0, -1.0, 0.0)) + + operation = GroupedOperation() + current_node = None # type: Optional[SceneNode] + for node in Selection.getAllSelectedObjects(): + current_node = node + parent_node = current_node.getParent() + while parent_node and parent_node.callDecoration("isGroup"): + current_node = parent_node + parent_node = current_node.getParent() + if current_node is None: + return + + rotate_operation = RotateOperation(current_node, rotation_quaternion, rotation_point_vector) + operation.addOperation(rotate_operation) + operation.push() + + # NOTE: We might want to consider unchecking the select-face button afterthe operation is done. + ## Return a formatted angle of the current rotate operation # # \return type(String) fully formatted string showing the angle by which the mesh(es) are rotated def getToolHint(self): return "%d°" % round(math.degrees(self._angle)) if self._angle else None + ## Get whether the select face feature is supported. + # \return True if it is supported, or False otherwise. + def getSelectFaceSupported(self) -> bool: + # Use a dummy postfix, since an equal version with a postfix is considered smaller normally. + return Version(OpenGL.getInstance().getOpenGLVersion()) >= Version("4.1 dummy-postfix") + ## Get the state of the "snap rotation to N-degree increments" option # # \return type(Boolean) @@ -207,11 +268,29 @@ self._snap_angle = angle self.propertyChanged.emit() + ## Wether the rotate tool is in 'Lay flat by face'-Mode. + # + # \return (bool) + def getSelectFaceToLayFlatMode(self) -> bool: + if not Selection.getFaceSelectMode(): + self._select_face_mode = False # .. but not the other way around! + return self._select_face_mode + + ## Set the rotate tool to/from 'Lay flat by face'-Mode. + # + # \param (bool) + def setSelectFaceToLayFlatMode(self, select: bool) -> None: + if select != self._select_face_mode or select != Selection.getFaceSelectMode(): + self._select_face_mode = select + if not select: + Selection.clearFace() + Selection.setFaceSelectMode(self._select_face_mode) + self.propertyChanged.emit() + ## Reset the orientation of the mesh(es) to their original orientation(s) def resetRotation(self): - - for node in Selection.getAllSelectedObjects(): - node.setMirror(Vector(1,1,1)) + for node in self._getSelectedObjectsWithoutSelectedAncestors(): + node.setMirror(Vector(1, 1, 1)) Selection.applyOperation(SetTransformOperation, None, Quaternion(), None) @@ -220,14 +299,13 @@ # Note: The LayFlat functionality is mostly used for 3d printing and should probably be moved into the Cura project def layFlat(self): self.operationStarted.emit(self) - self._progress_message = Message("Laying object flat on buildplate...", lifetime = 0, dismissable = False, title = "Object Rotation") + self._progress_message = Message(i18n_catalog.i18nc("@label", "Laying object flat on buildplate..."), lifetime = 0, dismissable = False, title = i18n_catalog.i18nc("@title", "Object Rotation")) self._progress_message.setProgress(0) self._iterations = 0 self._total_iterations = 0 - for selected_object in Selection.getAllSelectedObjects(): + for selected_object in self._getSelectedObjectsWithoutSelectedAncestors(): self._layObjectFlat(selected_object) - self._progress_message.show() operations = Selection.applyOperation(LayFlatOperation) @@ -241,7 +319,7 @@ ## Lays the given object flat. The given object can be a group or not. def _layObjectFlat(self, selected_object): if not selected_object.callDecoration("isGroup"): - self._total_iterations += len(selected_object.getMeshDataTransformed().getVertices()) * 2 + self._total_iterations += selected_object.getMeshData().getVertexCount() * 2 else: for child in selected_object.getChildren(): self._layObjectFlat(child) @@ -250,9 +328,10 @@ # # Note that the LayFlatOperation rate-limits these callbacks to prevent the UI from being flooded with property change notifications, # \param iterations type(int) number of iterations performed since the last callback - def _layFlatProgress(self, iterations): + def _layFlatProgress(self, iterations: int): self._iterations += iterations - self._progress_message.setProgress(100 * self._iterations / self._total_iterations) + if self._progress_message: + self._progress_message.setProgress(min(100 * (self._iterations / self._total_iterations), 100)) ## Called when the LayFlatJob is done running all of its LayFlatOperations # @@ -264,6 +343,7 @@ self.operationStopped.emit(self) + ## A LayFlatJob bundles multiple LayFlatOperations for multiple selected objects # # The job is executed on its own thread, processing each operation in order, so it does not lock up the GUI. diff -Nru uranium-3.3.0/plugins/Tools/RotateTool/RotateTool.qml uranium-4.4.1/plugins/Tools/RotateTool/RotateTool.qml --- uranium-3.3.0/plugins/Tools/RotateTool/RotateTool.qml 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/plugins/Tools/RotateTool/RotateTool.qml 2019-11-19 10:50:46.000000000 +0000 @@ -1,4 +1,4 @@ -// Copyright (c) 2015 Ultimaker B.V. +// Copyright (c) 2019 Ultimaker B.V. // Uranium is released under the terms of the LGPLv3 or higher. import QtQuick 2.2 @@ -10,7 +10,7 @@ { width: childrenRect.width height: childrenRect.height - UM.I18nCatalog { id: catalog; name:"uranium"} + UM.I18nCatalog { id: catalog; name: "uranium"} Button { id: resetRotationButton @@ -18,12 +18,12 @@ anchors.left: parent.left; //: Reset Rotation tool button - text: catalog.i18nc("@action:button","Reset") + text: catalog.i18nc("@action:button", "Reset") iconSource: UM.Theme.getIcon("rotate_reset"); property bool needBorder: true style: UM.Theme.styles.tool_button; - z: 1 + z: 2 onClicked: UM.ActiveTool.triggerAction("resetRotation"); } @@ -36,17 +36,43 @@ anchors.leftMargin: UM.Theme.getSize("default_margin").width; //: Lay Flat tool button - text: catalog.i18nc("@action:button","Lay flat") + text: catalog.i18nc("@action:button", "Lay flat") iconSource: UM.Theme.getIcon("rotate_layflat"); property bool needBorder: true style: UM.Theme.styles.tool_button; + z: 1 onClicked: UM.ActiveTool.triggerAction("layFlat"); + + // (Not yet:) Alternative 'lay flat' when legacy OpenGL makes selection of a face in an indexed model impossible. + // visible: ! UM.ActiveTool.properties.getValue("SelectFaceSupported"); + } + + Button + { + id: alignFaceButton + + anchors.left: layFlatButton.visible ? layFlatButton.right : resetRotationButton.right; + anchors.leftMargin: UM.Theme.getSize("default_margin").width; + width: visible ? UM.Theme.getIcon("rotate_face_layflat").width : 0; + + text: catalog.i18nc("@action:button", "Select face to align to the build plate") + iconSource: UM.Theme.getIcon("rotate_face_layflat") + property bool needBorder: true + + style: UM.Theme.styles.tool_button; + + enabled: UM.Selection.selectionCount == 1 + checked: UM.ActiveTool.properties.getValue("SelectFaceToLayFlatMode") + onClicked: UM.ActiveTool.setProperty("SelectFaceToLayFlatMode", !checked) + + visible: UM.ActiveTool.properties.getValue("SelectFaceSupported"); } CheckBox { + id: snapRotationCheckbox anchors.left: parent.left; anchors.top: resetRotationButton.bottom; anchors.topMargin: UM.Theme.getSize("default_margin").width; @@ -59,4 +85,18 @@ checked: UM.ActiveTool.properties.getValue("RotationSnap"); onClicked: UM.ActiveTool.setProperty("RotationSnap", checked); } + + Binding + { + target: snapRotationCheckbox + property: "checked" + value: UM.ActiveTool.properties.getValue("RotationSnap") + } + + Binding + { + target: alignFaceButton + property: "checked" + value: UM.ActiveTool.properties.getValue("SelectFaceToLayFlatMode") + } } diff -Nru uranium-3.3.0/plugins/Tools/RotateTool/tests/TestRotateTool.py uranium-4.4.1/plugins/Tools/RotateTool/tests/TestRotateTool.py --- uranium-3.3.0/plugins/Tools/RotateTool/tests/TestRotateTool.py 1970-01-01 00:00:00.000000000 +0000 +++ uranium-4.4.1/plugins/Tools/RotateTool/tests/TestRotateTool.py 2019-11-19 10:50:46.000000000 +0000 @@ -0,0 +1,49 @@ + +from unittest.mock import patch, MagicMock +import sys +import os +import pytest + +sys.path.append(os.path.join(os.path.dirname(os.path.abspath(__file__)), "..")) + +import RotateTool + +mocked_scene = MagicMock() + +@pytest.fixture() +def rotate_tool(): + application = MagicMock() + controller = MagicMock() + application.getController = MagicMock(return_value=controller) + controller.getScene = MagicMock(return_value=mocked_scene) + mocked_scene.reset_mock() + with patch("UM.Application.Application.getInstance", MagicMock(return_value=application)): + return RotateTool.RotateTool() + + +@pytest.mark.parametrize("data", [ + {"attribute": "rotationSnapAngle", "value": 32}, + {"attribute": "rotationSnap", "value": False}, +]) +def test_getAndSet(data, rotate_tool): + # Convert the first letter into a capital + attribute = list(data["attribute"]) + attribute[0] = attribute[0].capitalize() + attribute = "".join(attribute) + + # mock the correct emit + rotate_tool.propertyChanged = MagicMock() + + # Attempt to set the value + getattr(rotate_tool, "set" + attribute)(data["value"]) + + # Check if signal fired. + assert rotate_tool.propertyChanged.emit.call_count == 1 + + # Ensure that the value got set + assert getattr(rotate_tool, "get" + attribute)() == data["value"] + + # Attempt to set the value again + getattr(rotate_tool, "set" + attribute)(data["value"]) + # The signal should not fire again + assert rotate_tool.propertyChanged.emit.call_count == 1 \ No newline at end of file diff -Nru uranium-3.3.0/plugins/Tools/ScaleTool/plugin.json uranium-4.4.1/plugins/Tools/ScaleTool/plugin.json --- uranium-3.3.0/plugins/Tools/ScaleTool/plugin.json 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/plugins/Tools/ScaleTool/plugin.json 2019-11-19 10:50:46.000000000 +0000 @@ -1,8 +1,8 @@ { "name": "Scale Tool", "author": "Ultimaker B.V.", - "version": "1.0.0", + "version": "1.0.1", "description": "Provides the Scale tool.", - "api": 4, + "api": "7.0", "i18n-catalog": "uranium" } diff -Nru uranium-3.3.0/plugins/Tools/ScaleTool/ScaleToolHandle.py uranium-4.4.1/plugins/Tools/ScaleTool/ScaleToolHandle.py --- uranium-3.3.0/plugins/Tools/ScaleTool/ScaleToolHandle.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/plugins/Tools/ScaleTool/ScaleToolHandle.py 2019-11-19 10:50:46.000000000 +0000 @@ -7,10 +7,11 @@ ## Provides the two block-shaped toolhandles connected with a line for each axis for the scale tool + class ScaleToolHandle(ToolHandle): def __init__(self, parent = None): super().__init__(parent) - + self._handle = "ScaleToolHandle" self._line_width = 0.5 self._line_length= 40 self._handle_position = 40 diff -Nru uranium-3.3.0/plugins/Tools/ScaleTool/ScaleTool.py uranium-4.4.1/plugins/Tools/ScaleTool/ScaleTool.py --- uranium-3.3.0/plugins/Tools/ScaleTool/ScaleTool.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/plugins/Tools/ScaleTool/ScaleTool.py 2019-11-19 10:50:46.000000000 +0000 @@ -1,6 +1,7 @@ -# Copyright (c) 2015 Ultimaker B.V. +# Copyright (c) 2019 Ultimaker B.V. # Uranium is released under the terms of the LGPLv3 or higher. -from UM.Benchmark import Benchmark +from typing import List, Tuple, TYPE_CHECKING, Optional + from UM.Tool import Tool from UM.Event import Event, MouseEvent, KeyEvent from UM.Scene.ToolHandle import ToolHandle @@ -13,17 +14,21 @@ from UM.Operations.ScaleOperation import ScaleOperation from UM.Operations.GroupedOperation import GroupedOperation from UM.Operations.SetTransformOperation import SetTransformOperation -from UM.Operations.ScaleToBoundsOperation import ScaleToBoundsOperation from PyQt5.QtCore import Qt -from . import ScaleToolHandle +try: + from . import ScaleToolHandle +except (ImportError, SystemError): + import ScaleToolHandle # type: ignore # This fixes the tests not being able to import. import scipy +if TYPE_CHECKING: + from UM.Scene.SceneNode import SceneNode DIMENSION_TOLERANCE = 0.0001 # Tolerance value used for comparing dimensions from the UI. -## Provides the tool to scale meshes and groups +## Provides the tool to scale meshes and groups class ScaleTool(Tool): def __init__(self): super().__init__() @@ -35,18 +40,17 @@ self._drag_length = 0 - self._maximum_bounds = None self._move_up = True - self._shortcut_key = Qt.Key_A + self._shortcut_key = Qt.Key_S # We use the position of the scale handle when the operation starts. # This is done in order to prevent runaway reactions (drag changes of 100+) self._saved_handle_position = None # for non uniform drag self._scale_sum = 0.0 # a memory for uniform drag with snap scaling - self._last_event = None # for uniform drag + self._last_event = None # type: Optional[Event] # for uniform drag - self._saved_node_positions = [] + self._saved_node_positions = [] # type: List[Tuple[SceneNode, Vector]] self.setExposedProperties( "ScaleSnap", @@ -66,29 +70,27 @@ super().event(event) if event.type == Event.ToolActivateEvent: - for node in Selection.getAllSelectedObjects(): + for node in self._getSelectedObjectsWithoutSelectedAncestors(): node.boundingBoxChanged.connect(self.propertyChanged) if event.type == Event.ToolDeactivateEvent: - for node in Selection.getAllSelectedObjects(): + for node in self._getSelectedObjectsWithoutSelectedAncestors(): node.boundingBoxChanged.disconnect(self.propertyChanged) # Handle modifier keys: Shift toggles snap, Control toggles uniform scaling if event.type == Event.KeyPressEvent: if event.key == KeyEvent.ShiftKey: - self._snap_scale = False - self.propertyChanged.emit() + self.setScaleSnap(not self._snap_scale) + elif event.key == KeyEvent.ControlKey: - self._non_uniform_scale = True - self.propertyChanged.emit() + self.setNonUniformScale(not self._non_uniform_scale) if event.type == Event.KeyReleaseEvent: if event.key == KeyEvent.ShiftKey: - self._snap_scale = True - self.propertyChanged.emit() + self.setScaleSnap(not self._snap_scale) + elif event.key == KeyEvent.ControlKey: - self._non_uniform_scale = False - self.propertyChanged.emit() + self.setNonUniformScale(not self._non_uniform_scale) if event.type == Event.MousePressEvent and self._controller.getToolsEnabled(): # Initialise a scale operation @@ -105,7 +107,7 @@ # Save the current positions of the node, as we want to scale arround their current centres self._saved_node_positions = [] - for node in Selection.getAllSelectedObjects(): + for node in self._getSelectedObjectsWithoutSelectedAncestors(): self._saved_node_positions.append((node, node.getPosition())) self._scale_sum = 0.0 @@ -121,6 +123,7 @@ self.setDragPlane(Plane(Vector(0, 1, 0), self._saved_handle_position.y)) self.setDragStart(event.x, event.y) + return True if event.type == Event.MouseMoveEvent: # Perform a scale operation @@ -129,6 +132,13 @@ drag_position = self.getDragPosition(event.x, event.y) if drag_position: + if self.getLockedAxis() == ToolHandle.XAxis: + drag_position = drag_position.set(y = 0, z = 0) + elif self.getLockedAxis() == ToolHandle.YAxis: + drag_position = drag_position.set(x = 0, z = 0) + elif self.getLockedAxis() == ToolHandle.ZAxis: + drag_position = drag_position.set(x = 0, y = 0) + drag_length = (drag_position - self._saved_handle_position).length() if self._drag_length > 0: drag_change = (drag_length - self._drag_length) / 100 * self._scale_speed @@ -166,10 +176,14 @@ scale_change = scale_change.set(x=scale_factor, y=scale_factor, z=scale_factor) # Scale around the saved centers of all selected nodes - op = GroupedOperation() - for node, position in self._saved_node_positions: - op.addOperation(ScaleOperation(node, scale_change, relative_scale = True, scale_around_point = position)) - op.push() + if len(self._saved_node_positions) > 1: + op = GroupedOperation() + for node, position in self._saved_node_positions: + op.addOperation(ScaleOperation(node, scale_change, relative_scale = True, scale_around_point = position)) + op.push() + else: + for node, position in self._saved_node_positions: + ScaleOperation(node, scale_change, relative_scale = True, scale_around_point = position).push() self._drag_length = (self._saved_handle_position - drag_position).length() else: self.operationStarted.emit(self) @@ -181,7 +195,7 @@ # Finish a scale operation if self.getDragPlane(): self.setDragPlane(None) - self.setLockedAxis(None) + self.setLockedAxis(ToolHandle.NoAxis) self._drag_length = 0 self.operationStopped.emit(self) return True @@ -190,11 +204,6 @@ def resetScale(self): Selection.applyOperation(SetTransformOperation, None, None, Vector(1.0, 1.0, 1.0), Vector(0, 0, 0)) - ## Initialise and start a ScaleToBoundsOperation on the selected objects - def scaleToMax(self): - if hasattr(self.getController().getScene(), "_maximum_bounds"): - Selection.applyOperation(ScaleToBoundsOperation, self.getController().getScene()._maximum_bounds) - ## Get non-uniform scaling flag # # \return scale type(boolean) @@ -295,12 +304,7 @@ else: scale_vector = Vector(scale_factor, scale_factor, scale_factor) - op = GroupedOperation() - for node in Selection.getAllSelectedObjects(): - op.addOperation( - ScaleOperation(node, scale_vector, scale_around_point=node.getWorldPosition())) - op.push() - + self._scaleSelectedNodes(scale_vector) ## Set the height of the selected object(s) by scaling the first selected object to a certain height # # \param height type(float) height in mm @@ -316,11 +320,7 @@ else: scale_vector = Vector(scale_factor, scale_factor, scale_factor) - op = GroupedOperation() - for node in Selection.getAllSelectedObjects(): - op.addOperation( - ScaleOperation(node, scale_vector, scale_around_point=node.getWorldPosition())) - op.push() + self._scaleSelectedNodes(scale_vector) ## Set the depth of the selected object(s) by scaling the first selected object to a certain depth # @@ -337,11 +337,7 @@ else: scale_vector = Vector(scale_factor, scale_factor, scale_factor) - op = GroupedOperation() - for node in Selection.getAllSelectedObjects(): - op.addOperation( - ScaleOperation(node, scale_vector, scale_around_point=node.getWorldPosition())) - op.push() + self._scaleSelectedNodes(scale_vector) ## Set the x-scale of the selected object(s) by scaling the first selected object to a certain factor # @@ -357,11 +353,7 @@ else: scale_vector = Vector(scale_factor, scale_factor, scale_factor) - op = GroupedOperation() - for node in Selection.getAllSelectedObjects(): - op.addOperation( - ScaleOperation(node, scale_vector, scale_around_point=node.getWorldPosition())) - op.push() + self._scaleSelectedNodes(scale_vector) ## Set the y-scale of the selected object(s) by scaling the first selected object to a certain factor # @@ -377,11 +369,7 @@ else: scale_vector = Vector(scale_factor, scale_factor, scale_factor) - op = GroupedOperation() - for node in Selection.getAllSelectedObjects(): - op.addOperation( - ScaleOperation(node, scale_vector, scale_around_point=node.getWorldPosition())) - op.push() + self._scaleSelectedNodes(scale_vector) ## Set the z-scale of the selected object(s) by scaling the first selected object to a certain factor # @@ -397,11 +385,18 @@ else: scale_vector = Vector(scale_factor, scale_factor, scale_factor) - op = GroupedOperation() - for node in Selection.getAllSelectedObjects(): - op.addOperation( - ScaleOperation(node, scale_vector, scale_around_point=node.getWorldPosition())) - op.push() + self._scaleSelectedNodes(scale_vector) + + def _scaleSelectedNodes(self, scale_vector: Vector) -> None: + selected_nodes = self._getSelectedObjectsWithoutSelectedAncestors() + if len(selected_nodes) > 1: + op = GroupedOperation() + for node in selected_nodes: + op.addOperation(ScaleOperation(node, scale_vector, scale_around_point=node.getWorldPosition())) + op.push() + else: + for node in selected_nodes: + ScaleOperation(node, scale_vector, scale_around_point=node.getWorldPosition()).push() ## Convenience function that gives the scale of an object in the coordinate space of the world. # The function might return wrong value if the grouped models are rotated diff -Nru uranium-3.3.0/plugins/Tools/ScaleTool/ScaleTool.qml uranium-4.4.1/plugins/Tools/ScaleTool/ScaleTool.qml --- uranium-3.3.0/plugins/Tools/ScaleTool/ScaleTool.qml 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/plugins/Tools/ScaleTool/ScaleTool.qml 2019-11-19 10:50:46.000000000 +0000 @@ -11,7 +11,7 @@ id: base width: childrenRect.width height: childrenRect.height - UM.I18nCatalog { id: catalog; name:"uranium"} + UM.I18nCatalog { id: catalog; name: "uranium"} // We use properties for the text as doing the bindings indirectly doesn't cause any breaks // Javascripts don't seem to play well with the bindings (and sometimes break em) @@ -41,12 +41,19 @@ if(input) { return input.toFixed(decimals).replace(/\.?0*$/, ""); //Match on periods, if any ( \.? ), followed by any number of zeros ( 0* ), then the end of string ( $ ). - } else + } + else { return 0 } } + function selectTextInTextfield(selected_item) + { + selected_item.selectAll() + selected_item.focus = true + } + Button { id: resetScaleButton @@ -67,7 +74,8 @@ } - Flow { + Flow + { id: checkboxes; anchors.left: resetScaleButton.right; @@ -82,14 +90,15 @@ id: snapScalingCheckbox width: parent.width //Use a width instead of anchors to allow the flow layout to resolve positioning. - text: catalog.i18nc("@option:check", "Snap Scaling") style: UM.Theme.styles.checkbox; checked: UM.ActiveTool.properties.getValue("ScaleSnap"); - onClicked: { + onClicked: + { UM.ActiveTool.setProperty("ScaleSnap", checked); - if (snapScalingCheckbox.checked){ + if (snapScalingCheckbox.checked) + { UM.ActiveTool.setProperty("ScaleX", parseFloat(xPercentage.text) / 100); UM.ActiveTool.setProperty("ScaleY", parseFloat(yPercentage.text) / 100); UM.ActiveTool.setProperty("ScaleZ", parseFloat(zPercentage.text) / 100); @@ -97,17 +106,31 @@ } } + Binding + { + target: snapScalingCheckbox + property: "checked" + value: UM.ActiveTool.properties.getValue("ScaleSnap") + } + CheckBox { - width: parent.width //Use a width instead of anchors to allow the flow layout to resolve positioning. + id: uniformScalingCheckbox + width: parent.width //Use a width instead of anchors to allow the flow layout to resolve positioning. text: catalog.i18nc("@option:check", "Uniform Scaling") style: UM.Theme.styles.checkbox; - checked: !UM.ActiveTool.properties.getValue("NonUniformScale"); onClicked: UM.ActiveTool.setProperty("NonUniformScale", !checked); } + + Binding + { + target: uniformScalingCheckbox + property: "checked" + value: !UM.ActiveTool.properties.getValue("NonUniformScale") + } } Grid @@ -120,33 +143,38 @@ flow: Grid.TopToBottom; spacing: Math.round(UM.Theme.getSize("default_margin").width / 2); - Text + Label { height: UM.Theme.getSize("setting_control").height; text: "X"; font: UM.Theme.getFont("default"); color: UM.Theme.getColor("x_axis"); verticalAlignment: Text.AlignVCenter; + renderType: Text.NativeRendering + width: Math.ceil(contentWidth) //Make sure that the grid cells have an integer width. } - Text + Label { height: UM.Theme.getSize("setting_control").height; text: "Y"; font: UM.Theme.getFont("default"); color: UM.Theme.getColor("z_axis"); // This is intentional. The internal axis are switched. verticalAlignment: Text.AlignVCenter; + renderType: Text.NativeRendering + width: Math.ceil(contentWidth) //Make sure that the grid cells have an integer width. } - Text + Label { height: UM.Theme.getSize("setting_control").height; text: "Z"; font: UM.Theme.getFont("default"); color: UM.Theme.getColor("y_axis"); // This is intentional. The internal axis are switched. verticalAlignment: Text.AlignVCenter; + renderType: Text.NativeRendering + width: Math.ceil(contentWidth) //Make sure that the grid cells have an integer width. } - TextField { id: widthTextField @@ -167,6 +195,8 @@ var modified_text = text.replace(",", ".") // User convenience. We use dots for decimal values UM.ActiveTool.setProperty("ObjectWidth", modified_text); } + Keys.onBacktabPressed: selectTextInTextfield(yPercentage) + Keys.onTabPressed: selectTextInTextfield(xPercentage) } TextField { @@ -188,6 +218,8 @@ var modified_text = text.replace(",", ".") // User convenience. We use dots for decimal values UM.ActiveTool.setProperty("ObjectDepth", modified_text); } + Keys.onBacktabPressed: selectTextInTextfield(xPercentage) + Keys.onTabPressed: selectTextInTextfield(zPercentage) } TextField { @@ -209,6 +241,56 @@ var modified_text = text.replace(",", ".") // User convenience. We use dots for decimal values UM.ActiveTool.setProperty("ObjectHeight", modified_text); } + Keys.onBacktabPressed: selectTextInTextfield(zPercentage) + Keys.onTabPressed: selectTextInTextfield(yPercentage) + } + + // To ensure that the new size after scaling matches is still validate (size cannot be less than 0.1 mm). + // This function checks that by applying the new scale to the original size and checks if the new size is + // valid. If valid, the new size will be returned, otherwise -1 which means not valid. + function validateMinimumSize(newValue, lastValue, currentModelSize) + { + var modifiedText = newValue.replace(",", ".") // User convenience. We use dots for decimal values + var parsedNewValue = parseFloat(modifiedText) + var originalSize = (100 * currentModelSize) / lastValue // model size without scaling + var newSize = (parsedNewValue * originalSize) / 100 + const minAllowedSize = 0.1 // The new size cannot be lower than this value + + if (newSize >= minAllowedSize) + { + return parsedNewValue + } + + return -1 + } + + function evaluateTextChange(text, lastEnteredValue, valueName, scaleName) + { + var currentModelSize = UM.ActiveTool.properties.getValue(valueName); + var parsedValue = textfields.validateMinimumSize(text, lastEnteredValue, currentModelSize); + if (parsedValue > 0 && ! UM.ActiveTool.properties.getValue("NonUniformScale")) + { + var scale = parsedValue / lastEnteredValue; + var x = UM.ActiveTool.properties.getValue("ScaleX") * 100; + var y = UM.ActiveTool.properties.getValue("ScaleY") * 100; + var z = UM.ActiveTool.properties.getValue("ScaleZ") * 100; + var newX = textfields.validateMinimumSize( + (x * scale).toString(), x, UM.ActiveTool.properties.getValue("ObjectWidth")); + var newY = textfields.validateMinimumSize( + (y * scale).toString(), y, UM.ActiveTool.properties.getValue("ObjectHeight")); + var newZ = textfields.validateMinimumSize( + (z * scale).toString(), z, UM.ActiveTool.properties.getValue("ObjectDepth")); + if (newX <= 0 || newY <= 0 || newZ <= 0) + { + parsedValue = -1; + } + } + if (parsedValue > 0) + { + UM.ActiveTool.setProperty(scaleName, parsedValue / 100); + lastEnteredValue = parsedValue; + } // 'else' the value is not valid (the object will become too small) + return lastEnteredValue; } TextField @@ -221,17 +303,14 @@ text: xPercentageText validator: DoubleValidator { - // Validate to 0.1 mm - bottom: 100 * (0.1 / (UM.ActiveTool.properties.getValue("ObjectWidth") / UM.ActiveTool.properties.getValue("ScaleX"))); decimals: 4 locale: "en_US" } - + property var lastEnteredValue: parseFloat(xPercentageText) onEditingFinished: - { - var modified_text = text.replace(",", ".") // User convenience. We use dots for decimal values - UM.ActiveTool.setProperty("ScaleX", parseFloat(modified_text) / 100); - } + lastEnteredValue = textfields.evaluateTextChange(text, lastEnteredValue, "ObjectWidth", "ScaleX") + Keys.onBacktabPressed: selectTextInTextfield(widthTextField) + Keys.onTabPressed: selectTextInTextfield(depthTextField) } TextField { @@ -243,17 +322,14 @@ text: zPercentageText validator: DoubleValidator { - // Validate to 0.1 mm - bottom: 100 * (0.1 / (UM.ActiveTool.properties.getValue("ObjectDepth") / UM.ActiveTool.properties.getValue("ScaleZ"))); decimals: 4 locale: "en_US" } - + property var lastEnteredValue: parseFloat(zPercentageText) onEditingFinished: - { - var modified_text = text.replace(",", ".") // User convenience. We use dots for decimal values - UM.ActiveTool.setProperty("ScaleZ", parseFloat(modified_text) / 100); - } + lastEnteredValue = textfields.evaluateTextChange(text, lastEnteredValue, "ObjectDepth", "ScaleZ") + Keys.onBacktabPressed: selectTextInTextfield(depthTextField) + Keys.onTabPressed: selectTextInTextfield(heightTextField) } TextField { @@ -266,17 +342,14 @@ text: yPercentageText validator: DoubleValidator { - // Validate to 0.1 mm - bottom: 100 * (0.1 / (UM.ActiveTool.properties.getValue("ObjectHeight") / UM.ActiveTool.properties.getValue("ScaleY"))) decimals: 4 locale: "en_US" } - + property var lastEnteredValue: parseFloat(yPercentageText) onEditingFinished: - { - var modified_text = text.replace(",", ".") // User convenience. We use dots for decimal values - UM.ActiveTool.setProperty("ScaleY", parseFloat(modified_text) / 100); - } + lastEnteredValue = textfields.evaluateTextChange(text, lastEnteredValue, "ObjectHeight", "ScaleY") + Keys.onBacktabPressed: selectTextInTextfield(heightTextField) + Keys.onTabPressed: selectTextInTextfield(widthTextField) } diff -Nru uranium-3.3.0/plugins/Tools/ScaleTool/tests/TestScaleTool.py uranium-4.4.1/plugins/Tools/ScaleTool/tests/TestScaleTool.py --- uranium-3.3.0/plugins/Tools/ScaleTool/tests/TestScaleTool.py 1970-01-01 00:00:00.000000000 +0000 +++ uranium-4.4.1/plugins/Tools/ScaleTool/tests/TestScaleTool.py 2019-11-19 10:50:46.000000000 +0000 @@ -0,0 +1,205 @@ + +from unittest.mock import patch, MagicMock +import sys +import os + +from UM.Math.AxisAlignedBox import AxisAlignedBox + +sys.path.append(os.path.join(os.path.dirname(os.path.abspath(__file__)), "..")) +from UM.Math.Vector import Vector +import ScaleTool +import pytest + +mocked_scene = MagicMock() + + +@pytest.fixture() +def scale_tool(): + application = MagicMock() + controller = MagicMock() + application.getController = MagicMock(return_value=controller) + controller.getScene = MagicMock(return_value=mocked_scene) + mocked_scene.reset_mock() + with patch("UM.Application.Application.getInstance", MagicMock(return_value=application)): + return ScaleTool.ScaleTool() + + +@pytest.mark.parametrize("data", [ + {"attribute": "nonUniformScale", "value": True}, + {"attribute": "scaleSnap", "value": True}, +]) +def test_getAndSet(data, scale_tool): + # Convert the first letter into a capital + attribute = list(data["attribute"]) + attribute[0] = attribute[0].capitalize() + attribute = "".join(attribute) + + # mock the correct emit + scale_tool.propertyChanged = MagicMock() + + # Attempt to set the value + getattr(scale_tool, "set" + attribute)(data["value"]) + + # Check if signal fired. + assert scale_tool.propertyChanged.emit.call_count == 1 + + # Ensure that the value got set + assert getattr(scale_tool, "get" + attribute)() == data["value"] + + # Attempt to set the value again + getattr(scale_tool, "set" + attribute)(data["value"]) + # The signal should not fire again + assert scale_tool.propertyChanged.emit.call_count == 1 + + +def createMockedSelectionWithBoundingBox(min_size, max_size): + selection = MagicMock() + node = MagicMock() + binding_box = AxisAlignedBox(min_size, max_size) + node.getBoundingBox = MagicMock(return_value=binding_box) + selection.hasSelection = MagicMock(return_value=True) + selection.getSelectedObject = MagicMock(return_value=node) + return selection + +def createMockedSelectionWithScale(scale): + selection = MagicMock() + node = MagicMock() + node.getScale = MagicMock(return_value=scale) + selection.hasSelection = MagicMock(return_value=True) + selection.getSelectedObject = MagicMock(return_value=node) + return selection + + +def test_objectWidthDepthHeight(scale_tool): + selection = createMockedSelectionWithBoundingBox(Vector(0, 0, 0), Vector(10, 20, 30)) + with patch("ScaleTool.Selection", selection): + assert scale_tool.getObjectWidth() == 10 + assert scale_tool.getObjectHeight() == 20 + assert scale_tool.getObjectDepth() == 30 + + +def test_objectWidthDepthHeight_noSelection(scale_tool): + # If no object is selected, we should get some sane defaults. + selection = MagicMock() + selection.hasSelection = MagicMock(return_value=False) + with patch("ScaleTool.Selection", selection): + assert scale_tool.getObjectWidth() == 0 + assert scale_tool.getObjectHeight() == 0 + assert scale_tool.getObjectDepth() == 0 + + +def test_objectSize(scale_tool): + selection = createMockedSelectionWithScale(Vector(2, 3, 4)) + with patch("ScaleTool.Selection", selection): + assert scale_tool.getScaleX() == 2.0 + assert scale_tool.getScaleY() == 3.0 + assert scale_tool.getScaleZ() == 4.0 + + +def test_objectSize_noSelection(scale_tool): + # If no object is selected, we should get some sane defaults. + selection = MagicMock() + selection.hasSelection = MagicMock(return_value=False) + with patch("ScaleTool.Selection", selection): + assert scale_tool.getScaleX() == 1.0 + assert scale_tool.getScaleY() == 1.0 + assert scale_tool.getScaleZ() == 1.0 + + +def test_setObjectWidth(scale_tool): + selection = createMockedSelectionWithBoundingBox(Vector(0, 0, 0), Vector(10, 10, 10)) + + scale_tool._scaleSelectedNodes = MagicMock() # Not the function under test, so isolate it. + with patch("ScaleTool.Selection", selection): + scale_tool.setObjectWidth(40) + scale_tool._scaleSelectedNodes.assert_called_once_with(Vector(4, 4, 4)) + + # Now try again with non-uniform scaling + scale_tool._scaleSelectedNodes.reset_mock() + with patch("ScaleTool.Selection", selection): + scale_tool.setNonUniformScale(True) + scale_tool.setObjectWidth(40) + scale_tool._scaleSelectedNodes.assert_called_once_with(Vector(4, 1, 1)) + + +def test_setObjectHeight(scale_tool): + selection = createMockedSelectionWithBoundingBox(Vector(0, 0, 0), Vector(20, 20, 20)) + + scale_tool._scaleSelectedNodes = MagicMock() # Not the function under test, so isolate it. + with patch("ScaleTool.Selection", selection): + scale_tool.setObjectHeight(40) + scale_tool._scaleSelectedNodes.assert_called_once_with(Vector(2, 2, 2)) + + # Now try again with non-uniform scaling + scale_tool._scaleSelectedNodes.reset_mock() + with patch("ScaleTool.Selection", selection): + scale_tool.setNonUniformScale(True) + scale_tool.setObjectHeight(40) + scale_tool._scaleSelectedNodes.assert_called_once_with(Vector(1, 2, 1)) + + +def test_setObjectDepth(scale_tool): + selection = createMockedSelectionWithBoundingBox(Vector(0, 0, 0), Vector(30, 30, 30)) + + scale_tool._scaleSelectedNodes = MagicMock() # Not the function under test, so isolate it. + with patch("ScaleTool.Selection", selection): + scale_tool.setObjectDepth(90) + scale_tool._scaleSelectedNodes.assert_called_once_with(Vector(3, 3, 3)) + + # Now try again with non-uniform scaling + scale_tool._scaleSelectedNodes.reset_mock() + with patch("ScaleTool.Selection", selection): + scale_tool.setNonUniformScale(True) + scale_tool.setObjectDepth(90) + scale_tool._scaleSelectedNodes.assert_called_once_with(Vector(1, 1, 3)) + + +def test_setScaleX(scale_tool): + selection = createMockedSelectionWithScale(Vector(1, 1, 1)) + + scale_tool._scaleSelectedNodes = MagicMock() # Not the function under test, so isolate it. + with patch("ScaleTool.Selection", selection): + scale_tool.setScaleX(90) + scale_tool._scaleSelectedNodes.assert_called_once_with(Vector(90, 90, 90)) + + # Now try again with non-uniform scaling + scale_tool._scaleSelectedNodes.reset_mock() + with patch("ScaleTool.Selection", selection): + scale_tool.setNonUniformScale(True) + scale_tool.setScaleX(90) + scale_tool._scaleSelectedNodes.assert_called_once_with(Vector(90, 1, 1)) + + +def test_setScaleY(scale_tool): + selection = createMockedSelectionWithScale(Vector(10, 10, 10)) + + scale_tool._scaleSelectedNodes = MagicMock() # Not the function under test, so isolate it. + with patch("ScaleTool.Selection", selection): + scale_tool.setScaleY(20) + scale_tool._scaleSelectedNodes.assert_called_once_with(Vector(2, 2, 2)) + + # Now try again with non-uniform scaling + scale_tool._scaleSelectedNodes.reset_mock() + with patch("ScaleTool.Selection", selection): + scale_tool.setNonUniformScale(True) + scale_tool.setScaleY(20) + + scale_tool._scaleSelectedNodes.assert_called_once_with(Vector(1, 2, 1)) + + +def test_setScaleZ(scale_tool): + selection = createMockedSelectionWithScale(Vector(10, 10, 10)) + + scale_tool._scaleSelectedNodes = MagicMock() # Not the function under test, so isolate it. + with patch("ScaleTool.Selection", selection): + scale_tool.setScaleZ(5) + scale_tool._scaleSelectedNodes.assert_called_once_with(Vector(0.5, 0.5, 0.5)) + + # Now try again with non-uniform scaling + scale_tool._scaleSelectedNodes.reset_mock() + with patch("ScaleTool.Selection", selection): + scale_tool.setNonUniformScale(True) + scale_tool.setScaleZ(5) + + scale_tool._scaleSelectedNodes.assert_called_once_with(Vector(1, 1, 0.5)) + diff -Nru uranium-3.3.0/plugins/Tools/SelectionTool/__init__.py uranium-4.4.1/plugins/Tools/SelectionTool/__init__.py --- uranium-3.3.0/plugins/Tools/SelectionTool/__init__.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/plugins/Tools/SelectionTool/__init__.py 2019-11-19 10:50:46.000000000 +0000 @@ -3,8 +3,6 @@ from . import SelectionTool -from UM.i18n import i18nCatalog -i18n_catalog = i18nCatalog("uranium") def getMetaData(): return { diff -Nru uranium-3.3.0/plugins/Tools/SelectionTool/plugin.json uranium-4.4.1/plugins/Tools/SelectionTool/plugin.json --- uranium-3.3.0/plugins/Tools/SelectionTool/plugin.json 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/plugins/Tools/SelectionTool/plugin.json 2019-11-19 10:50:46.000000000 +0000 @@ -1,8 +1,8 @@ { "name": "Selection Tool", "author": "Ultimaker B.V.", - "version": "1.0.0", + "version": "1.0.1", "description": "Provides the Selection tool.", - "api": 4, + "api": "7.0", "i18n-catalog": "uranium" } diff -Nru uranium-3.3.0/plugins/Tools/SelectionTool/SelectionTool.py uranium-4.4.1/plugins/Tools/SelectionTool/SelectionTool.py --- uranium-3.3.0/plugins/Tools/SelectionTool/SelectionTool.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/plugins/Tools/SelectionTool/SelectionTool.py 2019-11-19 10:50:46.000000000 +0000 @@ -11,12 +11,12 @@ from PyQt5 import QtCore, QtWidgets + ## Provides the tool to select meshes and groups # # Note that the tool has two implementations for different modes of selection: # Pixel Selection Mode and BoundingBox Selection Mode. Of these two, only Pixel Selection Mode # is in active use. BoundingBox Selection Mode may not be functional. - class SelectionTool(Tool): PixelSelectionMode = 1 BoundingBoxSelectionMode = 2 @@ -30,9 +30,9 @@ self._selection_pass = None self._selection_mode = self.PixelSelectionMode - self._ctrl_is_active = None # Ctrl modifier key is used for sub-selection + self._ctrl_is_active = None # Ctrl modifier key is used for sub-selection self._alt_is_active = None - self._shift_is_active = None # Shift modifier key is used for multi-selection + self._shift_is_active = None # Shift modifier key is used for multi-selection ## Prepare modifier-key variables on each event # @@ -43,7 +43,6 @@ self._ctrl_is_active = modifiers & QtCore.Qt.ControlModifier self._alt_is_active = modifiers & QtCore.Qt.AltModifier - ## Set the selection mode # # The tool has two implementations for different modes of selection: PixelSelectionMode and BoundingboxSelectionMode. @@ -61,10 +60,12 @@ self._selection_pass = self._renderer.getRenderPass("selection") self.checkModifierKeys(event) + #if event.type == MouseEvent.MouseMoveEvent and Selection.getFaceSelectMode(): + # return self._pixelHover(event) if event.type == MouseEvent.MousePressEvent and MouseEvent.LeftButton in event.buttons and self._controller.getToolsEnabled(): # Perform a selection operation if self._selection_mode == self.PixelSelectionMode: - self._pixelSelection(event) + return self._pixelSelection(event) else: self._boundingBoxSelection(event) elif event.type == MouseEvent.MouseReleaseEvent and MouseEvent.LeftButton in event.buttons: @@ -103,49 +104,81 @@ def _pixelSelection(self, event): # Find a node id by looking at a pixel value at the requested location if self._selection_pass: - item_id = self._selection_pass.getIdAtPosition(event.x, event.y) + if Selection.getFaceSelectMode(): + item_id = id(Selection.getSelectedObject(0)) + else: + item_id = self._selection_pass.getIdAtPosition(event.x, event.y) else: Logger.log("w", "Selection pass is None. getRenderPass('selection') returned None") - return + return False if not item_id and not self._shift_is_active: - Selection.clear() - return + if Selection.hasSelection(): + Selection.clearFace() + Selection.clear() + return True + return False # Nothing was selected before and the user didn't click on an object. # Find the scene-node which matches the node-id for node in BreadthFirstIterator(self._scene.getRoot()): - if id(node) == item_id: - if self._isNodeInGroup(node): - is_selected = Selection.isSelected(self._findTopGroupNode(node)) + if id(node) != item_id: + continue + + if self._isNodeInGroup(node): + is_selected = Selection.isSelected(self._findTopGroupNode(node)) + else: + is_selected = Selection.isSelected(node) + + if self._shift_is_active: + if is_selected: + # Deselect the SceneNode and its siblings in a group + if node.getParent(): + if self._ctrl_is_active or not self._isNodeInGroup(node): + Selection.remove(node) + else: + Selection.remove(self._findTopGroupNode(node)) + return True else: - is_selected = Selection.isSelected(node) - if self._shift_is_active: - if is_selected: - # Deselect the scenenode and its sibblings in a group - if node.getParent(): - if self._ctrl_is_active or not self._isNodeInGroup(node): - Selection.remove(node) - else: - Selection.remove(self._findTopGroupNode(node)) + # Select the SceneNode and its siblings in a group + if node.getParent(): + if self._ctrl_is_active or not self._isNodeInGroup(node): + Selection.add(node) + else: + Selection.add(self._findTopGroupNode(node)) + return True + else: + if Selection.getFaceSelectMode(): + face_id = self._selection_pass.getFaceIdAtPosition(event.x, event.y) + if face_id >= 0: + Selection.toggleFace(node, face_id) else: - # Select the scenenode and its sibblings in a group - if node.getParent(): - if self._ctrl_is_active or not self._isNodeInGroup(node): - Selection.add(node) - else: - Selection.add(self._findTopGroupNode(node)) - else: - if not is_selected or Selection.getCount() > 1: - # Select only the scenenode and its sibblings in a group - Selection.clear() - if node.getParent(): - if self._ctrl_is_active or not self._isNodeInGroup(node): - Selection.add(node) - else: - Selection.add(self._findTopGroupNode(node)) - elif self._isNodeInGroup(node) and self._ctrl_is_active: Selection.clear() - Selection.add(node) + Selection.clearFace() + if not is_selected or Selection.getCount() > 1: + # Select only the SceneNode and its siblings in a group + Selection.clear() + if node.getParent(): + if self._ctrl_is_active or not self._isNodeInGroup(node): + Selection.add(node) + else: + Selection.add(self._findTopGroupNode(node)) + return True + elif self._isNodeInGroup(node) and self._ctrl_is_active: + Selection.clear() + Selection.add(node) + return True + + return False + + def _pixelHover(self, event): + if Selection.getFaceSelectMode(): + face_id = self._selection_pass.getFaceIdAtPosition(event.x, event.y) + if face_id >= 0: + Selection.hoverFace(Selection.getSelectedObject(0), face_id) + else: + Selection.clearFace() + return True + return False ## Check whether a node is in a group # diff -Nru uranium-3.3.0/plugins/Tools/TranslateTool/plugin.json uranium-4.4.1/plugins/Tools/TranslateTool/plugin.json --- uranium-3.3.0/plugins/Tools/TranslateTool/plugin.json 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/plugins/Tools/TranslateTool/plugin.json 2019-11-19 10:50:46.000000000 +0000 @@ -1,8 +1,8 @@ { "name": "Move Tool", "author": "Ultimaker B.V.", - "version": "1.0.0", + "version": "1.0.1", "description": "Provides the Move tool.", - "api": 4, + "api": "7.0", "i18n-catalog": "uranium" } diff -Nru uranium-3.3.0/plugins/Tools/TranslateTool/tests/TestTranslateTool.py uranium-4.4.1/plugins/Tools/TranslateTool/tests/TestTranslateTool.py --- uranium-3.3.0/plugins/Tools/TranslateTool/tests/TestTranslateTool.py 1970-01-01 00:00:00.000000000 +0000 +++ uranium-4.4.1/plugins/Tools/TranslateTool/tests/TestTranslateTool.py 2019-11-19 10:50:46.000000000 +0000 @@ -0,0 +1,47 @@ + +from unittest.mock import patch, MagicMock +import sys +import os +import pytest + +sys.path.append(os.path.join(os.path.dirname(os.path.abspath(__file__)), "..")) + +import TranslateTool + +mocked_scene = MagicMock() + +@pytest.fixture() +def translate_tool(): + application = MagicMock() + controller = MagicMock() + application.getController = MagicMock(return_value=controller) + controller.getScene = MagicMock(return_value=mocked_scene) + mocked_scene.reset_mock() + with patch("UM.Application.Application.getInstance", MagicMock(return_value=application)): + return TranslateTool.TranslateTool() + + +def test_getXYZ_no_selection(translate_tool): + assert translate_tool.getX() == 0 + assert translate_tool.getY() == 0 + assert translate_tool.getZ() == 0 + +@pytest.mark.parametrize("input, result", [("12", 12), + ("MONKEY", 0), + ("-2", -2), + ("12.6", 12.6)]) +def test_parseFloat(input, result): + assert TranslateTool.TranslateTool._parseFloat(input) == result + + +def test_setEnabledAxis(translate_tool): + mock_handle = MagicMock() + translate_tool.setHandle(mock_handle) + + translate_tool.setEnabledAxis([1, 2]) + + mock_handle.setEnabledAxis.assert_called_with([1, 2]) + + +def test_getLockPosition_no_selection(translate_tool): + assert not translate_tool.getLockPosition() \ No newline at end of file diff -Nru uranium-3.3.0/plugins/Tools/TranslateTool/TranslateToolHandle.py uranium-4.4.1/plugins/Tools/TranslateTool/TranslateToolHandle.py --- uranium-3.3.0/plugins/Tools/TranslateTool/TranslateToolHandle.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/plugins/Tools/TranslateTool/TranslateToolHandle.py 2019-11-19 10:50:46.000000000 +0000 @@ -1,4 +1,4 @@ -# Copyright (c) 2015 Ultimaker B.V. +# Copyright (c) 2019 Ultimaker B.V. # Uranium is released under the terms of the LGPLv3 or higher. from UM.Scene.ToolHandle import ToolHandle @@ -7,19 +7,20 @@ ## Provides the two block-shaped toolhandles connected with a line for each axis for the translate tool + class TranslateToolHandle(ToolHandle): def __init__(self, parent = None): super().__init__(parent) - + self._name = "TranslateToolHandle" self._enabled_axis = [self.XAxis, self.YAxis, self.ZAxis] self._line_width = 0.5 - self._line_length= 40 + self._line_length = 40 self._handle_position = 40 self._handle_height = 7 self._handle_width = 3 self._active_line_width = 0.8 - self._active_line_length= 40 + self._active_line_length = 40 self._active_handle_position = 40 self._active_handle_height = 9 self._active_handle_width = 7 @@ -37,7 +38,7 @@ width = self._line_width, height = self._line_length, depth = self._line_width, - center = Vector(0, self._handle_position/2, 0), + center = Vector(0, self._handle_position / 2, 0), color = self._y_axis_color ) if self.XAxis in self._enabled_axis: @@ -45,7 +46,7 @@ width = self._line_length, height = self._line_width, depth = self._line_width, - center = Vector(self._handle_position/2, 0, 0), + center = Vector(self._handle_position / 2, 0, 0), color = self._x_axis_color ) @@ -54,7 +55,7 @@ width = self._line_width, height = self._line_width, depth = self._line_length, - center = Vector(0, 0, self._handle_position/2), + center = Vector(0, 0, self._handle_position / 2), color = self._z_axis_color ) @@ -99,7 +100,7 @@ width = self._active_line_width, height = self._active_line_length, depth = self._active_line_width, - center = Vector(0, self._active_handle_position/2, 0), + center = Vector(0, self._active_handle_position / 2, 0), color = self._y_axis_color ) if self.XAxis in self._enabled_axis: @@ -107,7 +108,7 @@ width = self._active_line_length, height = self._active_line_width, depth = self._active_line_width, - center = Vector(self._active_handle_position/2, 0, 0), + center = Vector(self._active_handle_position / 2, 0, 0), color = self._x_axis_color ) @@ -116,7 +117,7 @@ width = self._active_line_width, height = self._active_line_width, depth = self._active_line_length, - center = Vector(0, 0, self._active_handle_position/2), + center = Vector(0, 0, self._active_handle_position / 2), color = self._z_axis_color ) @@ -124,14 +125,6 @@ mb.addCube( width = self._active_handle_width, height = self._active_handle_width, - depth = self._active_handle_width, - center = Vector(0, 0, 0), - color = ToolHandle.AllAxisSelectionColor - ) - - mb.addCube( - width = self._active_handle_width, - height = self._active_handle_width, depth = self._active_handle_width, center = Vector(0, self._active_handle_position, 0), color = ToolHandle.YAxisSelectionColor diff -Nru uranium-3.3.0/plugins/Tools/TranslateTool/TranslateTool.py uranium-4.4.1/plugins/Tools/TranslateTool/TranslateTool.py --- uranium-3.3.0/plugins/Tools/TranslateTool/TranslateTool.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/plugins/Tools/TranslateTool/TranslateTool.py 2019-11-19 10:50:46.000000000 +0000 @@ -1,76 +1,69 @@ -# Copyright (c) 2015 Ultimaker B.V. +# Copyright (c) 2019 Ultimaker B.V. # Uranium is released under the terms of the LGPLv3 or higher. +from PyQt5.QtCore import Qt import time +from typing import cast, List, Optional, Union -from UM.Benchmark import Benchmark -from UM.Tool import Tool from UM.Event import Event, MouseEvent, KeyEvent - from UM.Math.Plane import Plane from UM.Math.Vector import Vector from UM.Math.Float import Float - from UM.Operations.TranslateOperation import TranslateOperation from UM.Operations.GroupedOperation import GroupedOperation - +from UM.Scene.SceneNodeSettings import SceneNodeSettings from UM.Scene.Selection import Selection from UM.Scene.ToolHandle import ToolHandle +from UM.Tool import Tool -from PyQt5.QtCore import Qt - -from . import TranslateToolHandle +try: + from . import TranslateToolHandle +except (ImportError, SystemError): + import TranslateToolHandle # type: ignore # This fixes the tests not being able to import. DIMENSION_TOLERANCE = 0.0001 # Tolerance value used for comparing dimensions from the UI. DIRECTION_TOLERANCE = 0.0001 # Used to check if you're perpendicular on some axis -## Provides the tool to move meshes and groups +## Provides the tool to move meshes and groups. # -# The tool exposes a ToolHint to show the distance of the current operation - -class TranslateToolSettings: - LockPosition = "LockPosition" - - +# The tool exposes a ToolHint to show the distance of the current operation. class TranslateTool(Tool): - def __init__(self): + def __init__(self) -> None: super().__init__() - self._handle = TranslateToolHandle.TranslateToolHandle() + self._handle = TranslateToolHandle.TranslateToolHandle() #type: TranslateToolHandle.TranslateToolHandle #Because for some reason MyPy thinks this variable contains Optional[ToolHandle]. self._enabled_axis = [ToolHandle.XAxis, ToolHandle.YAxis, ToolHandle.ZAxis] self._grid_snap = False self._grid_size = 10 self._moved = False - self._shortcut_key = Qt.Key_Q + self._shortcut_key = Qt.Key_T - self._distance_update_time = None - self._distance = None + self._distance_update_time = None #type: Optional[float] + self._distance = None #type: Optional[Vector] self.setExposedProperties("ToolHint", - "X", - "Y", - "Z", - TranslateToolSettings.LockPosition) + "X", "Y", "Z", + SceneNodeSettings.LockPosition) # Ensure that the properties (X, Y & Z) are updated whenever the selection center is changed. Selection.selectionCenterChanged.connect(self.propertyChanged) + # CURA-5966 Make sure to render whenever objects get selected/deselected. + Selection.selectionChanged.connect(self.propertyChanged) - ## Get the x-location of the selection bounding box center - # - # \param x type(float) location in mm - def getX(self): + ## Get the x-location of the selection bounding box center. + # \return X location in mm. + def getX(self) -> float: if Selection.hasSelection(): return float(Selection.getBoundingBox().center.x) return 0.0 - ## Get the y-location of the selection bounding box center - # - # \param y type(float) location in mm - def getY(self): + ## Get the y-location of the selection bounding box center. + # \return Y location in mm. + def getY(self) -> float: if Selection.hasSelection(): # Note; The switching of z & y is intentional. We display z as up for the user, # But store the data in openGL space. @@ -78,10 +71,10 @@ return 0.0 ## Get the z-location of the selection bounding box bottom - # The bottom is used as opposed to the center, because the biggest usecase is to push the selection into the buildplate - # - # \param z type(float) location in mm - def getZ(self): + # The bottom is used as opposed to the center, because the biggest use + # case is to push the selection into the build plate. + # \return Z location in mm. + def getZ(self) -> float: # We want to display based on the bottom instead of the actual coordinate. if Selection.hasSelection(): # Note; The switching of z & y is intentional. We display z as up for the user, @@ -89,134 +82,153 @@ return float(Selection.getBoundingBox().bottom) return 0.0 - def _parseInt(self, str_value): + @staticmethod + def _parseFloat(str_value: str) -> float: try: parsed_value = float(str_value) except ValueError: parsed_value = float(0) return parsed_value - ## Set the x-location of the selected object(s) by translating relative to the selection bounding box center - # - # \param x type(float) location in mm - def setX(self, x): - Benchmark.start("Moving object in X from {start} to {end}".format(start = self.getX(), end = x)) - parsed_x = self._parseInt(x) + ## Set the x-location of the selected object(s) by translating relative to + # the selection bounding box center. + # \param x Location in mm. + def setX(self, x: str) -> None: + parsed_x = self._parseFloat(x) bounding_box = Selection.getBoundingBox() - op = GroupedOperation() if not Float.fuzzyCompare(parsed_x, float(bounding_box.center.x), DIMENSION_TOLERANCE): - for selected_node in Selection.getAllSelectedObjects(): - world_position = selected_node.getWorldPosition() - new_position = world_position.set(x=parsed_x + (world_position.x - bounding_box.center.x)) - node_op = TranslateOperation(selected_node, new_position, set_position = True) - op.addOperation(node_op) - op.push() + selected_nodes = self._getSelectedObjectsWithoutSelectedAncestors() + if len(selected_nodes) > 1: + op = GroupedOperation() + for selected_node in self._getSelectedObjectsWithoutSelectedAncestors(): + world_position = selected_node.getWorldPosition() + new_position = world_position.set(x = parsed_x + (world_position.x - bounding_box.center.x)) + node_op = TranslateOperation(selected_node, new_position, set_position = True) + op.addOperation(node_op) + op.push() + else: + for selected_node in self._getSelectedObjectsWithoutSelectedAncestors(): + world_position = selected_node.getWorldPosition() + new_position = world_position.set(x = parsed_x + (world_position.x - bounding_box.center.x)) + TranslateOperation(selected_node, new_position, set_position = True).push() + self._controller.toolOperationStopped.emit(self) - ## Set the y-location of the selected object(s) by translating relative to the selection bounding box center - # - # \param y type(float) location in mm - def setY(self, y): - Benchmark.start("Moving object in Y from {start} to {end}".format(start = self.getY(), end = y)) - parsed_y = self._parseInt(y) + ## Set the y-location of the selected object(s) by translating relative to + # the selection bounding box center. + # \param y Location in mm. + def setY(self, y: str) -> None: + parsed_y = self._parseFloat(y) bounding_box = Selection.getBoundingBox() - op = GroupedOperation() if not Float.fuzzyCompare(parsed_y, float(bounding_box.center.z), DIMENSION_TOLERANCE): - for selected_node in Selection.getAllSelectedObjects(): - # Note; The switching of z & y is intentional. We display z as up for the user, - # But store the data in openGL space. - world_position = selected_node.getWorldPosition() - new_position = world_position.set(z=parsed_y + (world_position.z - bounding_box.center.z)) - - node_op = TranslateOperation(selected_node, new_position, set_position = True) - op.addOperation(node_op) - op.push() + selected_nodes = self._getSelectedObjectsWithoutSelectedAncestors() + if len(selected_nodes) > 1: + op = GroupedOperation() + for selected_node in selected_nodes: + # Note; The switching of z & y is intentional. We display z as up for the user, + # But store the data in openGL space. + world_position = selected_node.getWorldPosition() + new_position = world_position.set(z = parsed_y + (world_position.z - bounding_box.center.z)) + node_op = TranslateOperation(selected_node, new_position, set_position = True) + op.addOperation(node_op) + op.push() + else: + for selected_node in selected_nodes: + world_position = selected_node.getWorldPosition() + new_position = world_position.set(z = parsed_y + (world_position.z - bounding_box.center.z)) + TranslateOperation(selected_node, new_position, set_position = True).push() + self._controller.toolOperationStopped.emit(self) - ## Set the y-location of the selected object(s) by translating relative to the selection bounding box bottom - # - # \param z type(float) location in mm - def setZ(self, z): - Benchmark.start("Moving object in Z from {start} to {end}".format(start = self.getZ(), end = z)) - parsed_z = self._parseInt(z) + ## Set the y-location of the selected object(s) by translating relative to + # the selection bounding box bottom. + # \param z Location in mm. + def setZ(self, z: str) -> None: + parsed_z = self._parseFloat(z) bounding_box = Selection.getBoundingBox() - op = GroupedOperation() if not Float.fuzzyCompare(parsed_z, float(bounding_box.bottom), DIMENSION_TOLERANCE): - for selected_node in Selection.getAllSelectedObjects(): - # Note: The switching of z & y is intentional. We display z as up for the user, - # But store the data in openGL space. - world_position = selected_node.getWorldPosition() - new_position = world_position.set(y=parsed_z + (world_position.y - bounding_box.bottom)) - node_op = TranslateOperation(selected_node, new_position, set_position = True) - op.addOperation(node_op) - op.push() + selected_nodes = self._getSelectedObjectsWithoutSelectedAncestors() + if len(selected_nodes) > 1: + op = GroupedOperation() + for selected_node in selected_nodes: + # Note: The switching of z & y is intentional. We display z as up for the user, + # But store the data in openGL space. + world_position = selected_node.getWorldPosition() + new_position = world_position.set(y = parsed_z + (world_position.y - bounding_box.bottom)) + node_op = TranslateOperation(selected_node, new_position, set_position = True) + op.addOperation(node_op) + op.push() + else: + for selected_node in selected_nodes: + world_position = selected_node.getWorldPosition() + new_position = world_position.set(y=parsed_z + (world_position.y - bounding_box.bottom)) + TranslateOperation(selected_node, new_position, set_position=True).push() self._controller.toolOperationStopped.emit(self) ## Set which axis/axes are enabled for the current translate operation # - # \param axis type(list) list of axes (expressed as ToolHandle enum) - def setEnabledAxis(self, axis): + # \param axis List of axes (expressed as ToolHandle enum). + def setEnabledAxis(self, axis: List[int]) -> None: self._enabled_axis = axis self._handle.setEnabledAxis(axis) + ## Set lock setting to the object. This setting will be used to prevent + # model movement on the build plate. + # \param value The setting state. + def setLockPosition(self, value: bool) -> None: + for selected_node in self._getSelectedObjectsWithoutSelectedAncestors(): + selected_node.setSetting(SceneNodeSettings.LockPosition, str(value)) - ## Set lock setting to the object. This setting will be used to prevent model movement on the build plate - # - # \param value type(bool) the setting state - def setLockPosition(self, value): - for selected_node in Selection.getAllSelectedObjects(): - selected_node.setSetting(TranslateToolSettings.LockPosition, value) - - def getLockPosition(self): + def getLockPosition(self) -> Union[str, bool]: total_size = Selection.getCount() false_state_counter = 0 true_state_counter = 0 - if Selection.hasSelection(): - for selected_node in Selection.getAllSelectedObjects(): - - if selected_node.getSetting(TranslateToolSettings.LockPosition, False): - true_state_counter += 1 - else: - false_state_counter +=1 + if not Selection.hasSelection(): + return False - if total_size == false_state_counter: # if no locked positions - return False - elif total_size == true_state_counter: # if all selected objects are locked - return True + for selected_node in self._getSelectedObjectsWithoutSelectedAncestors(): + if selected_node.getSetting(SceneNodeSettings.LockPosition, "False") != "False": + true_state_counter += 1 else: - return "partially" # if at least one is locked - + false_state_counter += 1 - return False + if total_size == false_state_counter: # No locked positions + return False + elif total_size == true_state_counter: # All selected objects are locked + return True + else: + return "partially" # At least one, but not all are locked - ## Handle mouse and keyboard events - # - # \param event type(Event) - def event(self, event): + ## Handle mouse and keyboard events. + # \param event The event to handle. + # \return Whether this event has been caught by this tool (True) or should + # be passed on (False). + def event(self, event: Event) -> bool: super().event(event) # Make sure the displayed values are updated if the bounding box of the selected mesh(es) changes if event.type == Event.ToolActivateEvent: - for node in Selection.getAllSelectedObjects(): + for node in self._getSelectedObjectsWithoutSelectedAncestors(): node.boundingBoxChanged.connect(self.propertyChanged) if event.type == Event.ToolDeactivateEvent: - for node in Selection.getAllSelectedObjects(): + for node in self._getSelectedObjectsWithoutSelectedAncestors(): node.boundingBoxChanged.disconnect(self.propertyChanged) - if event.type == Event.KeyPressEvent and event.key == KeyEvent.ShiftKey: + if event.type == Event.KeyPressEvent and cast(KeyEvent, event).key == KeyEvent.ShiftKey: return False - if event.type == Event.MousePressEvent and self._controller.getToolsEnabled(): # Start a translate operation - if MouseEvent.LeftButton not in event.buttons: + if MouseEvent.LeftButton not in cast(MouseEvent, event).buttons: return False - id = self._selection_pass.getIdAtPosition(event.x, event.y) + if not self._selection_pass: + return False + id = self._selection_pass.getIdAtPosition(cast(MouseEvent, event).x, cast(MouseEvent, event).y) if not id: return False @@ -227,7 +239,10 @@ self._moved = False - camera_direction = self._controller.getScene().getActiveCamera().getPosition().normalized() + camera = self._controller.getScene().getActiveCamera() + if not camera: + return False + camera_direction = camera.getPosition().normalized() abs_x = abs(camera_direction.x) abs_y = abs(camera_direction.y) @@ -251,6 +266,7 @@ self.setLockedAxis(ToolHandle.XAxis) # Do not move y / vertical self.setDragPlane(Plane(plane_vector, 0)) + return True if event.type == Event.MouseMoveEvent: # Perform a translate operation @@ -258,38 +274,47 @@ if not self.getDragPlane(): return False + x = cast(MouseEvent, event).x + y = cast(MouseEvent, event).y + if not self.getDragStart(): - self.setDragStart(event.x, event.y) + self.setDragStart(x, y) return False - drag = self.getDragVector(event.x, event.y) + drag = self.getDragVector(x, y) if drag: if self._grid_snap and drag.length() < self._grid_size: return False if self.getLockedAxis() == ToolHandle.XAxis: - drag = drag.set(y=0, z=0) + drag = drag.set(y = 0, z = 0) elif self.getLockedAxis() == ToolHandle.YAxis: - drag = drag.set(x=0, z=0) + drag = drag.set(x = 0, z = 0) elif self.getLockedAxis() == ToolHandle.ZAxis: - drag = drag.set(x=0, y=0) + drag = drag.set(x = 0, y = 0) if not self._moved: self._moved = True self._distance = Vector(0, 0, 0) self.operationStarted.emit(self) - op = GroupedOperation() - for node in Selection.getAllSelectedObjects(): - - if not node.getSetting(TranslateToolSettings.LockPosition, False): - op.addOperation(TranslateOperation(node, drag)) - - op.push() + selected_nodes = self._getSelectedObjectsWithoutSelectedAncestors() + if len(selected_nodes) > 1: + op = GroupedOperation() + for node in selected_nodes: + if node.getSetting(SceneNodeSettings.LockPosition, "False") == "False": + op.addOperation(TranslateOperation(node, drag)) + op.push() + else: + for node in selected_nodes: + if node.getSetting(SceneNodeSettings.LockPosition, "False") == "False": + TranslateOperation(node, drag).push() + if not self._distance: + self._distance = Vector(0, 0, 0) self._distance += drag - self.setDragStart(event.x, event.y) + self.setDragStart(x, y) # Rate-limit the angle change notification # This is done to prevent the UI from being flooded with property change notifications, @@ -307,15 +332,15 @@ self.operationStopped.emit(self) self._distance = None self.propertyChanged.emit() - self.setLockedAxis(None) + self.setLockedAxis(ToolHandle.NoAxis) self.setDragPlane(None) - self.setDragStart(None, None) + self.setDragStart(cast(MouseEvent, event).x, cast(MouseEvent, event).y) return True return False - ## Return a formatted distance of the current translate operation - # - # \return type(String) fully formatted string showing the distance by which the mesh(es) are dragged - def getToolHint(self): + ## Return a formatted distance of the current translate operation. + # \return Fully formatted string showing the distance by which the + # mesh(es) are dragged. + def getToolHint(self) -> Optional[str]: return "%.2f mm" % self._distance.length() if self._distance else None diff -Nru uranium-3.3.0/plugins/Tools/TranslateTool/TranslateTool.qml uranium-4.4.1/plugins/Tools/TranslateTool/TranslateTool.qml --- uranium-3.3.0/plugins/Tools/TranslateTool/TranslateTool.qml 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/plugins/Tools/TranslateTool/TranslateTool.qml 2019-11-19 10:50:46.000000000 +0000 @@ -11,7 +11,7 @@ id: base width: childrenRect.width height: childrenRect.height - UM.I18nCatalog { id: catalog; name:"uranium"} + UM.I18nCatalog { id: catalog; name: "uranium"} property string xText property string yText @@ -41,6 +41,11 @@ return output; } + function selectTextInTextfield(selected_item){ + selected_item.selectAll() + selected_item.focus = true + } + Grid { id: textfields; @@ -52,31 +57,37 @@ flow: Grid.TopToBottom; spacing: Math.round(UM.Theme.getSize("default_margin").width / 2); - Text + Label { height: UM.Theme.getSize("setting_control").height; text: "X"; font: UM.Theme.getFont("default"); color: UM.Theme.getColor("x_axis"); verticalAlignment: Text.AlignVCenter; + renderType: Text.NativeRendering + width: Math.ceil(contentWidth) //Make sure that the grid cells have an integer width. } - Text + Label { height: UM.Theme.getSize("setting_control").height; text: "Y"; font: UM.Theme.getFont("default"); color: UM.Theme.getColor("z_axis"); // This is intentional. The internal axis are switched. verticalAlignment: Text.AlignVCenter; + renderType: Text.NativeRendering + width: Math.ceil(contentWidth) //Make sure that the grid cells have an integer width. } - Text + Label { height: UM.Theme.getSize("setting_control").height; text: "Z"; font: UM.Theme.getFont("default"); color: UM.Theme.getColor("y_axis"); // This is intentional. The internal axis are switched. verticalAlignment: Text.AlignVCenter; + renderType: Text.NativeRendering + width: Math.ceil(contentWidth) //Make sure that the grid cells have an integer width. } TextField { @@ -97,9 +108,12 @@ var modified_text = text.replace(",", ".") // User convenience. We use dots for decimal values UM.ActiveTool.setProperty("X", modified_text); } + Keys.onBacktabPressed: selectTextInTextfield(zTextField) + Keys.onTabPressed: selectTextInTextfield(yTextField) } TextField { + id: yTextField width: UM.Theme.getSize("setting_control").width; height: UM.Theme.getSize("setting_control").height; property string unit: "mm"; @@ -116,9 +130,12 @@ var modified_text = text.replace(",", ".") // User convenience. We use dots for decimal values UM.ActiveTool.setProperty("Y", modified_text); } + Keys.onBacktabPressed: selectTextInTextfield(xTextField) + Keys.onTabPressed: selectTextInTextfield(zTextField) } TextField { + id: zTextField width: UM.Theme.getSize("setting_control").width; height: UM.Theme.getSize("setting_control").height; property string unit: "mm"; @@ -134,6 +151,8 @@ var modified_text = text.replace(",", ".") // User convenience. We use dots for decimal values UM.ActiveTool.setProperty("Z", modified_text); } + Keys.onBacktabPressed: selectTextInTextfield(yTextField) + Keys.onTabPressed: selectTextInTextfield(xTextField) } } diff -Nru uranium-3.3.0/plugins/UpdateChecker/__init__.py uranium-4.4.1/plugins/UpdateChecker/__init__.py --- uranium-3.3.0/plugins/UpdateChecker/__init__.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/plugins/UpdateChecker/__init__.py 2019-11-19 10:50:46.000000000 +0000 @@ -3,8 +3,6 @@ from . import UpdateChecker -from UM.i18n import i18nCatalog -i18n_catalog = i18nCatalog("uranium") def getMetaData(): return { diff -Nru uranium-3.3.0/plugins/UpdateChecker/plugin.json uranium-4.4.1/plugins/UpdateChecker/plugin.json --- uranium-3.3.0/plugins/UpdateChecker/plugin.json 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/plugins/UpdateChecker/plugin.json 2019-11-19 10:50:46.000000000 +0000 @@ -1,8 +1,8 @@ { "name": "Update Checker", "author": "Ultimaker B.V.", - "version": "1.0.0", + "version": "1.0.1", "description": "Checks for updates of the software.", - "api": 4, + "api": "7.0", "i18n-catalog": "uranium" } diff -Nru uranium-3.3.0/plugins/UpdateChecker/tests/TestUpdateCheckerJob.py uranium-4.4.1/plugins/UpdateChecker/tests/TestUpdateCheckerJob.py --- uranium-3.3.0/plugins/UpdateChecker/tests/TestUpdateCheckerJob.py 1970-01-01 00:00:00.000000000 +0000 +++ uranium-4.4.1/plugins/UpdateChecker/tests/TestUpdateCheckerJob.py 2019-11-19 10:50:46.000000000 +0000 @@ -0,0 +1,40 @@ + +from unittest.mock import patch, MagicMock +import sys +import os + +from UM.Version import Version + +sys.path.append(os.path.join(os.path.dirname(os.path.abspath(__file__)), "..")) +import UpdateCheckerJob +import pytest + + +run_data = [(b'{"TestApplication" : {"testOperatingSystem": {"major": 2, "minor": 0, "revision":0, "url": ""}} }', (Version("2.0.0"), "")), + (b'{"TestApplication" : {"testOperatingSystem": {"major": 1, "minor": 0, "revision":0, "url": ""}} }', None), + (b'{"TestApplication" : {"testOperatingSystem2": {"major": 1, "minor": 0, "revision":0, "url": ""}, "testOperatingSystem": {"major": 2, "minor": 1, "revision":9, "url": "beep"}} }', (Version("2.1.9"), "beep")), + (b'', None) + ] + +@pytest.mark.parametrize("request_result, show_update_called_data", run_data) +def test_run(request_result, show_update_called_data): + job = UpdateCheckerJob.UpdateCheckerJob(url = "blarg") + application = MagicMock() + application.getApplicationName = MagicMock(return_value = "TestApplication") + application.getVersion = MagicMock(return_value = "1.0.0") + + request = MagicMock() + request.read = MagicMock(side_effect = [request_result, b'']) + + platform = MagicMock() + platform.system = MagicMock(return_value = "testOperatingSystem") + job.showUpdate = MagicMock() + with patch("UpdateCheckerJob.platform", platform): + with patch("UpdateCheckerJob.urllib.request.Request"): + with patch("UM.Application.Application.getInstance", MagicMock(return_value = application)): + with patch("UpdateCheckerJob.urllib.request.urlopen", return_value = request): + job.run() + if show_update_called_data is not None: + job.showUpdate.assert_called_once_with(show_update_called_data[0], show_update_called_data[1]) + else: + assert job.showUpdate.call_count == 0 \ No newline at end of file diff -Nru uranium-3.3.0/plugins/UpdateChecker/UpdateCheckerJob.py uranium-4.4.1/plugins/UpdateChecker/UpdateCheckerJob.py --- uranium-3.3.0/plugins/UpdateChecker/UpdateCheckerJob.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/plugins/UpdateChecker/UpdateCheckerJob.py 2019-11-19 10:50:46.000000000 +0000 @@ -1,4 +1,4 @@ -# Copyright (c) 2017 Ultimaker B.V. +# Copyright (c) 2018 Ultimaker B.V. # Uranium is released under the terms of the LGPLv3 or higher. from UM.Application import Application @@ -7,20 +7,24 @@ from UM.Logger import Logger from UM.Job import Job +import ssl import urllib.request import platform import json import codecs +import certifi + from UM.i18n import i18nCatalog i18n_catalog = i18nCatalog("uranium") ## This job checks if there is an update available on the provided URL. class UpdateCheckerJob(Job): - def __init__(self, silent = False, url = None, callback = None, set_download_url_callback = None): + def __init__(self, silent = False, display_same_version = True, url = None, callback = None, set_download_url_callback = None): super().__init__() self.silent = silent + self.display_same_version = display_same_version self._url = url self._callback = callback self._set_download_url_callback = set_download_url_callback @@ -31,13 +35,17 @@ no_new_version = True application_name = Application.getInstance().getApplicationName() + Logger.log("i", "Checking for new version of %s" % application_name) try: headers = {"User-Agent": "%s - %s" % (application_name, Application.getInstance().getVersion())} + # CURA-6698 Create an SSL context and use certifi CA certificates for verification. + context = ssl.SSLContext(protocol = ssl.PROTOCOL_TLSv1_2) + context.load_verify_locations(cafile = certifi.where()) request = urllib.request.Request(self._url, headers = headers) - latest_version_file = urllib.request.urlopen(request) + latest_version_file = urllib.request.urlopen(request, context = context) except Exception as e: - Logger.log("w", "Failed to check for new version: %s" % e) + Logger.logException("w", "Failed to check for new version: %s" % e) if not self.silent: Message(i18n_catalog.i18nc("@info", "Could not access update information."), title = i18n_catalog.i18nc("@info:title", "Version Upgrade") @@ -48,7 +56,7 @@ reader = codecs.getreader("utf-8") data = json.load(reader(latest_version_file)) try: - if Application.getInstance().getVersion() is not "master": + if Application.getInstance().getVersion() != "master": local_version = Version(Application.getInstance().getVersion()) else: if not self.silent: @@ -67,13 +75,13 @@ if platform.system() == os: #TODO: add architecture check newest_version = Version([int(value["major"]), int(value["minor"]), int(value["revision"])]) if local_version < newest_version: + preferences = Application.getInstance().getPreferences() + latest_version_shown = preferences.getValue("info/latest_update_version_shown") + if latest_version_shown == newest_version and not self.display_same_version: + continue # Don't show this update again. The user already clicked it away and doesn't want it again. + preferences.setValue("info/latest_update_version_shown", str(newest_version)) Logger.log("i", "Found a new version of the software. Spawning message") - message = Message(i18n_catalog.i18nc("@info", "A new version is available!"), title = i18n_catalog.i18nc("@info:title", "Version Upgrade")) - message.addAction("download", i18n_catalog.i18nc("@action:button", "Download"), "[no_icon]", "[no_description]") - if self._set_download_url_callback: - self._set_download_url_callback(value["url"]) - message.actionTriggered.connect(self._callback) - message.show() + self.showUpdate(newest_version, value["url"]) no_new_version = False break else: @@ -86,4 +94,23 @@ no_new_version = False # Just to suppress the message below. if no_new_version and not self.silent: - Message(i18n_catalog.i18nc("@info", "No new version was found."), title = i18n_catalog.i18nc("@info:title", "Version Upgrade")).show() \ No newline at end of file + Message(i18n_catalog.i18nc("@info", "No new version was found."), title = i18n_catalog.i18nc("@info:title", "Version Upgrade")).show() + + def showUpdate(self, newest_version: Version, download_url: str) -> None: + application_display_name = Application.getInstance().getApplicationDisplayName().title() + title_message = i18n_catalog.i18nc("@info:status", + "{application_name} {version_number} is available!".format(application_name = application_display_name, version_number = newest_version)) + content_message = i18n_catalog.i18nc("@info:status", + "{application_name} {version_number} provides a better and more reliable printing experience.".format(application_name = application_display_name, version_number = newest_version)) + + message = Message(text = content_message, title = title_message) + message.addAction("download", i18n_catalog.i18nc("@action:button", "Download"), "[no_icon]", "[no_description]") + + message.addAction("new_features", i18n_catalog.i18nc("@action:button", "Learn more"), "[no_icon]", "[no_description]", + button_style = Message.ActionButtonStyle.LINK, + button_align = Message.ActionButtonAlignment.ALIGN_LEFT) + + if self._set_download_url_callback: + self._set_download_url_callback(download_url) + message.actionTriggered.connect(self._callback) + message.show() \ No newline at end of file diff -Nru uranium-3.3.0/plugins/UpdateChecker/UpdateChecker.py uranium-4.4.1/plugins/UpdateChecker/UpdateChecker.py --- uranium-3.3.0/plugins/UpdateChecker/UpdateChecker.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/plugins/UpdateChecker/UpdateChecker.py 2019-11-19 10:50:46.000000000 +0000 @@ -1,11 +1,11 @@ -# Copyright (c) 2017 Ultimaker B.V. +# Copyright (c) 2018 Ultimaker B.V. # Copyright (c) 2013 David Braam # Uranium is released under the terms of the LGPLv3 or higher. from UM.Extension import Extension from UM.i18n import i18nCatalog -from UM.Preferences import Preferences +from UM.Application import Application from PyQt5.QtCore import QUrl from PyQt5.QtGui import QDesktopServices @@ -19,27 +19,35 @@ # The plugin is currently only usable for applications maintained by Ultimaker. But it should be relatively easy # to change it to work for other applications. class UpdateChecker(Extension): - url = "http://software.ultimaker.com/latest.json" + url = "https://software.ultimaker.com/latest.json" def __init__(self): super().__init__() + self.setMenuName(i18n_catalog.i18nc("@item:inmenu", "Update Checker")) self.addMenuItem(i18n_catalog.i18nc("@item:inmenu", "Check for Updates"), self.checkNewVersion) - Preferences.getInstance().addPreference("info/automatic_update_check", True) - if Preferences.getInstance().getValue("info/automatic_update_check"): - self.checkNewVersion(True) + Application.getInstance().getPreferences().addPreference("info/automatic_update_check", True) + if Application.getInstance().getPreferences().getValue("info/automatic_update_check"): + self.checkNewVersion(silent = True, display_same_version = False) self._download_url = None + # Which version was the latest shown in the version upgrade dialog. Don't show these updates twice. + Application.getInstance().getPreferences().addPreference("info/latest_update_version_shown", "0.0.0") + ## Connect with software.ultimaker.com, load latest.json and check version info. # If the version info is higher then the current version, spawn a message to # allow the user to download it. # - # \param silent type(boolean) Suppresses messages other than "new version found" messages. - # This is used when checking for a new version at startup. - def checkNewVersion(self, silent = False): + # \param silent Suppresses messages other than "new version found" + # messages. This is used when checking for a new version at startup. + # \param display_same_version Whether to display the same update message + # twice (True) or suppress the update message if the user has already seen + # the update for a particular version. When manually checking for updates, + # the user wants to display the update even if he's already seen it. + def checkNewVersion(self, silent = False, display_same_version = True): self._download_url = None - job = UpdateCheckerJob(silent, self.url, self._onActionTriggered, self._onSetDownloadUrl) + job = UpdateCheckerJob(silent, display_same_version, self.url, self._onActionTriggered, self._onSetDownloadUrl) job.start() def _onSetDownloadUrl(self, download_url): @@ -53,3 +61,5 @@ if action == "download": if self._download_url is not None: QDesktopServices.openUrl(QUrl(self._download_url)) + elif action == "new_features": + QDesktopServices.openUrl(QUrl(Application.getInstance().change_log_url)) diff -Nru uranium-3.3.0/plugins/Views/SimpleView/plugin.json uranium-4.4.1/plugins/Views/SimpleView/plugin.json --- uranium-3.3.0/plugins/Views/SimpleView/plugin.json 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/plugins/Views/SimpleView/plugin.json 2019-11-19 10:50:46.000000000 +0000 @@ -1,8 +1,8 @@ { "name": "Simple View", "author": "Ultimaker B.V.", - "version": "1.0.0", + "version": "1.0.1", "description": "Provides a simple solid mesh view.", - "api": 4, + "api": "7.0", "i18n-catalog": "uranium" } diff -Nru uranium-3.3.0/README.md uranium-4.4.1/README.md --- uranium-3.3.0/README.md 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/README.md 2019-11-19 10:50:46.000000000 +0000 @@ -10,14 +10,10 @@ Dependencies ------------ -- Python 3 -- Qt 5 with QtQuick 2, QtQuick Controls -- PyQt5 -- Numpy -- Arcus - -Documentation ------------ - -API documentation is available at http://ultimaker.github.io/Uranium/ . -This documentation is updated daily. +- [Qt 5](https://www.qt.io/qt5-10) +- Python 3, with the following modules + - [PyQt5](https://www.riverbankcomputing.com/software/pyqt/download5) + - [Numpy](https://github.com/numpy/numpy) + - [Arcus](https://github.com/Ultimaker/libArcus) + - [Shapely](https://github.com/Toblerity/Shapely) + - [Scipy](https://github.com/scipy/scipy) diff -Nru uranium-3.3.0/resources/bundled_packages/uranium.json uranium-4.4.1/resources/bundled_packages/uranium.json --- uranium-3.3.0/resources/bundled_packages/uranium.json 1970-01-01 00:00:00.000000000 +0000 +++ uranium-4.4.1/resources/bundled_packages/uranium.json 2019-11-19 10:50:46.000000000 +0000 @@ -0,0 +1,274 @@ +{ + "ConsoleLogger": { + "package_info": { + "package_id": "ConsoleLogger", + "package_type": "plugin", + "display_name": "Console Logger", + "description": "Outputs log information to the console.", + "package_version": "1.0.1", + "sdk_version": "7.0", + "website": "https://ultimaker.com", + "author": { + "author_id": "UltimakerPackages", + "display_name": "Ultimaker B.V.", + "email": "plugins@ultimaker.com", + "website": "https://ultimaker.com" + } + } + }, + "OBJReader": { + "package_info": { + "package_id": "OBJReader", + "package_type": "plugin", + "display_name": "Wavefront OBJ Reader", + "description": "Makes it possible to read Wavefront OBJ files.", + "package_version": "1.0.1", + "sdk_version": "7.0", + "website": "https://ultimaker.com", + "author": { + "author_id": "UltimakerPackages", + "display_name": "Ultimaker B.V.", + "email": "plugins@ultimaker.com", + "website": "https://ultimaker.com" + } + } + }, + "OBJWriter": { + "package_info": { + "package_id": "OBJWriter", + "package_type": "plugin", + "display_name": "Wavefront OBJ Writer", + "description": "Makes it possible to write Wavefront OBJ files.", + "package_version": "1.0.1", + "sdk_version": "7.0", + "website": "https://ultimaker.com", + "author": { + "author_id": "UltimakerPackages", + "display_name": "Ultimaker B.V.", + "email": "plugins@ultimaker.com", + "website": "https://ultimaker.com" + } + } + }, + "STLReader": { + "package_info": { + "package_id": "STLReader", + "package_type": "plugin", + "display_name": "STL Reader", + "description": "Provides support for reading STL files.", + "package_version": "1.0.1", + "sdk_version": "7.0", + "website": "https://ultimaker.com", + "author": { + "author_id": "UltimakerPackages", + "display_name": "Ultimaker B.V.", + "email": "plugins@ultimaker.com", + "website": "https://ultimaker.com" + } + } + }, + "STLWriter": { + "package_info": { + "package_id": "STLWriter", + "package_type": "plugin", + "display_name": "STL Writer", + "description": "Provides support for writing STL files.", + "package_version": "1.0.1", + "sdk_version": "7.0", + "website": "https://ultimaker.com", + "author": { + "author_id": "UltimakerPackages", + "display_name": "Ultimaker B.V.", + "email": "plugins@ultimaker.com", + "website": "https://ultimaker.com" + } + } + }, + "FileLogger": { + "package_info": { + "package_id": "FileLogger", + "package_type": "plugin", + "display_name": "File Logger", + "description": "Outputs log information to a file in your settings folder.", + "package_version": "1.0.1", + "sdk_version": "7.0", + "website": "https://ultimaker.com", + "author": { + "author_id": "UltimakerPackages", + "display_name": "Ultimaker B.V.", + "email": "plugins@ultimaker.com", + "website": "https://ultimaker.com" + } + } + }, + "LocalContainerProvider": { + "package_info": { + "package_id": "LocalContainerProvider", + "package_type": "plugin", + "display_name": "Local Container Provider", + "description": "Provides built-in setting containers that come with the installation of the application.", + "package_version": "1.0.1", + "sdk_version": "7.0", + "website": "https://ultimaker.com", + "author": { + "author_id": "UltimakerPackages", + "display_name": "Ultimaker B.V.", + "email": "plugins@ultimaker.com", + "website": "https://ultimaker.com" + } + } + }, + "LocalFileOutputDevice": { + "package_info": { + "package_id": "LocalFileOutputDevice", + "package_type": "plugin", + "display_name": "Local File Output Device", + "description": "Enables saving to local files.", + "package_version": "1.0.1", + "sdk_version": "7.0", + "website": "https://ultimaker.com", + "author": { + "author_id": "UltimakerPackages", + "display_name": "Ultimaker B.V.", + "email": "plugins@ultimaker.com", + "website": "https://ultimaker.com" + } + } + }, + "CameraTool": { + "package_info": { + "package_id": "CameraTool", + "package_type": "plugin", + "display_name": "Camera Tool", + "description": "Provides the tool to manipulate the camera.", + "package_version": "1.0.1", + "sdk_version": "7.0", + "website": "https://ultimaker.com", + "author": { + "author_id": "UltimakerPackages", + "display_name": "Ultimaker B.V.", + "email": "plugins@ultimaker.com", + "website": "https://ultimaker.com" + } + } + }, + "MirrorTool": { + "package_info": { + "package_id": "MirrorTool", + "package_type": "plugin", + "display_name": "Mirror Tool", + "description": "Provides the Mirror tool.", + "package_version": "1.0.1", + "sdk_version": "7.0", + "website": "https://ultimaker.com", + "author": { + "author_id": "UltimakerPackages", + "display_name": "Ultimaker B.V.", + "email": "plugins@ultimaker.com", + "website": "https://ultimaker.com" + } + } + }, + "RotateTool": { + "package_info": { + "package_id": "RotateTool", + "package_type": "plugin", + "display_name": "Rotate Tool", + "description": "Provides the Rotate tool.", + "package_version": "1.0.1", + "sdk_version": "7.0", + "website": "https://ultimaker.com", + "author": { + "author_id": "UltimakerPackages", + "display_name": "Ultimaker B.V.", + "email": "plugins@ultimaker.com", + "website": "https://ultimaker.com" + } + } + }, + "ScaleTool": { + "package_info": { + "package_id": "ScaleTool", + "package_type": "plugin", + "display_name": "Scale Tool", + "description": "Provides the Scale tool.", + "package_version": "1.0.1", + "sdk_version": "7.0", + "website": "https://ultimaker.com", + "author": { + "author_id": "UltimakerPackages", + "display_name": "Ultimaker B.V.", + "email": "plugins@ultimaker.com", + "website": "https://ultimaker.com" + } + } + }, + "SelectionTool": { + "package_info": { + "package_id": "SelectionTool", + "package_type": "plugin", + "display_name": "Selection Tool", + "description": "Provides the Selection tool.", + "package_version": "1.0.1", + "sdk_version": "7.0", + "website": "https://ultimaker.com", + "author": { + "author_id": "UltimakerPackages", + "display_name": "Ultimaker B.V.", + "email": "plugins@ultimaker.com", + "website": "https://ultimaker.com" + } + } + }, + "TranslateTool": { + "package_info": { + "package_id": "TranslateTool", + "package_type": "plugin", + "display_name": "Move Tool", + "description": "Provides the Move tool.", + "package_version": "1.0.1", + "sdk_version": "7.0", + "website": "https://ultimaker.com", + "author": { + "author_id": "UltimakerPackages", + "display_name": "Ultimaker B.V.", + "email": "plugins@ultimaker.com", + "website": "https://ultimaker.com" + } + } + }, + "UpdateChecker": { + "package_info": { + "package_id": "UpdateChecker", + "package_type": "plugin", + "display_name": "Update Checker", + "description": "Checks for updates of the software.", + "package_version": "1.0.1", + "sdk_version": "7.0", + "website": "https://ultimaker.com", + "author": { + "author_id": "UltimakerPackages", + "display_name": "Ultimaker B.V.", + "email": "plugins@ultimaker.com", + "website": "https://ultimaker.com" + } + } + }, + "SimpleView": { + "package_info": { + "package_id": "SimpleView", + "package_type": "plugin", + "display_name": "Simple View", + "description": "Provides a simple solid mesh view.", + "package_version": "1.0.1", + "sdk_version": "7.0", + "website": "https://ultimaker.com", + "author": { + "author_id": "UltimakerPackages", + "display_name": "Ultimaker B.V.", + "email": "plugins@ultimaker.com", + "website": "https://ultimaker.com" + } + } + } +} \ No newline at end of file diff -Nru uranium-3.3.0/resources/i18n/de_DE/uranium.po uranium-4.4.1/resources/i18n/de_DE/uranium.po --- uranium-3.3.0/resources/i18n/de_DE/uranium.po 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/resources/i18n/de_DE/uranium.po 2019-11-19 10:50:46.000000000 +0000 @@ -1,14 +1,14 @@ # Uranium -# Copyright (C) 2018 Ultimaker +# Copyright (C) 2019 Ultimaker B.V. # This file is distributed under the same license as the Uranium package. -# Ruben Dulek , 2018. +# Ruben Dulek , 2019. # msgid "" msgstr "" -"Project-Id-Version: Uranium 3.3\n" +"Project-Id-Version: Uranium 4.4\n" "Report-Msgid-Bugs-To: r.dulek@ultimaker.com\n" -"POT-Creation-Date: 2018-03-29 08:36+0200\n" -"PO-Revision-Date: 2018-04-11 15:55+0100\n" +"POT-Creation-Date: 2019-11-05 13:40+0100\n" +"PO-Revision-Date: 2018-11-06 15:42+0100\n" "Last-Translator: Bothof \n" "Language-Team: German \n" "Language: de_DE\n" @@ -16,6 +16,7 @@ "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Generator: Poedit 2.0.6\n" #: /home/ruben/Projects/Uranium/plugins/Views/SimpleView/__init__.py:12 msgctxt "@item:inmenu" @@ -33,6 +34,17 @@ msgid "Wavefront OBJ File" msgstr "Wavefront OBJ-Datei" +#: /home/ruben/Projects/Uranium/plugins/FileHandlers/OBJWriter/OBJWriter.py:23 +msgctxt "@error:not supported" +msgid "OBJWriter does not support non-text mode." +msgstr "OBJWriter unterstützt keinen Nicht-Textmodus." + +#: /home/ruben/Projects/Uranium/plugins/FileHandlers/OBJWriter/OBJWriter.py:30 +#: /home/ruben/Projects/Uranium/plugins/FileHandlers/STLWriter/STLWriter.py:27 +msgctxt "@error:no mesh" +msgid "There is no mesh to write." +msgstr "Es ist kein Mesh zum Schreiben vorhanden." + #: /home/ruben/Projects/Uranium/plugins/FileHandlers/STLWriter/__init__.py:17 msgctxt "@item:inlistbox" msgid "STL File (ASCII)" @@ -43,80 +55,101 @@ msgid "STL File (Binary)" msgstr "STL-Datei (Binär)" -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:42 +#: /home/ruben/Projects/Uranium/plugins/FileHandlers/STLWriter/STLWriter.py:36 +msgctxt "@error:not supported" +msgid "Unsupported output mode writing STL to stream." +msgstr "Nicht unterstützter Ausgangsmodus schreibt STL in Stream." + +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:50 msgctxt "@info" msgid "Could not access update information." msgstr "Zugriff auf Update-Informationen nicht möglich." -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:43 -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:60 -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:71 -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:89 -#: /home/ruben/Projects/Uranium/UM/VersionUpgradeManager.py:123 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:51 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:68 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:97 +#: /home/ruben/Projects/Uranium/UM/VersionUpgradeManager.py:155 msgctxt "@info:title" msgid "Version Upgrade" msgstr "Versions-Upgrade" -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:55 -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:60 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:63 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:68 msgctxt "@info" msgid "The version you are using does not support checking for updates." msgstr "Die Version, die Sie verwenden, unterstützt die Suche nach Updates nicht." -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:55 -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:178 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:63 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:188 msgctxt "@info:title" msgid "Warning" msgstr "Warnhinweis" -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:71 -msgctxt "@info" -msgid "A new version is available!" -msgstr "Eine neue Version ist verfügbar!" - -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:72 -msgctxt "@action:button" -msgid "Download" -msgstr "Download" - -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:85 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:93 msgctxt "@info" msgid "An error occurred while checking for updates." msgstr "Bei der Suche nach Aktualisierungen ist ein Fehler aufgetreten." -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:85 -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:185 -#: /home/ruben/Projects/Uranium/UM/Qt/Bindings/OutputDeviceManagerProxy.py:128 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:93 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:195 +#: /home/ruben/Projects/Uranium/UM/Qt/Bindings/OutputDeviceManagerProxy.py:141 msgctxt "@info:title" msgid "Error" msgstr "Fehler" -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:89 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:97 msgctxt "@info" msgid "No new version was found." msgstr "Es wurde keine neue Version gefunden." +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:102 +#, python-brace-format +msgctxt "@info:status" +msgid "{application_name} {version_number} is available!" +msgstr "{application_name} {version_number} ist verfügbar!" + +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:104 +#, python-brace-format +msgctxt "@info:status" +msgid "{application_name} {version_number} provides a better and more reliable printing experience." +msgstr "{application_name} {version_number} bietet eine bessere und zuverlässigere Druckerfahrung." + +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:107 +msgctxt "@action:button" +msgid "Download" +msgstr "Download" + +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:109 +msgctxt "@action:button" +msgid "Learn more" +msgstr "Mehr erfahren" + #: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateChecker.py:26 msgctxt "@item:inmenu" +msgid "Update Checker" +msgstr "Update-Prüfer" + +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateChecker.py:27 +msgctxt "@item:inmenu" msgid "Check for Updates" msgstr "Nach Updates suchen" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:33 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:30 msgctxt "@item:inmenu" msgid "Local File" msgstr "Lokale Datei" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:34 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:31 msgctxt "@action:button Preceded by 'Ready to'." msgid "Save to File" msgstr "Speichern in Datei" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:35 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:32 msgctxt "@info:tooltip" msgid "Save to File" msgstr "In Datei speichern" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:56 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:53 msgctxt "@title:window" msgid "Save to File" msgstr "In Datei speichern" @@ -126,67 +159,67 @@ msgid "There are no file types available to write with!" msgstr "Es sind keine Dateitypen zum Schreiben vorhanden!" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:121 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:130 msgctxt "@title:window" msgid "File Already Exists" msgstr "Datei bereits vorhanden" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:121 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:130 #, python-brace-format msgctxt "@label Don't translate the XML tag !" msgid "The file {0} already exists. Are you sure you want to overwrite it?" msgstr "Die Datei {0} ist bereits vorhanden. Soll die Datei wirklich überschrieben werden?" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:150 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:160 #, python-brace-format msgctxt "@info:progress Don't translate the XML tags !" msgid "Saving to {0}" msgstr "Wird gespeichert unter {0}" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:151 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:161 msgctxt "@info:title" msgid "Saving" msgstr "Wird gespeichert" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:159 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:169 #, python-brace-format msgctxt "@info:status Don't translate the XML tags !" msgid "Permission denied when trying to save {0}" msgstr "Beim Versuch {0} zu speichern, wird der Zugriff verweigert" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:162 -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:178 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:172 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:188 #, python-brace-format msgctxt "@info:status Don't translate the XML tags or !" msgid "Could not save to {0}: {1}" msgstr "Konnte nicht als {0} gespeichert werden: {1}" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:172 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:182 #, python-brace-format msgctxt "@info:status Don't translate the XML tags !" msgid "Saved to {0}" msgstr "Wurde als {0} gespeichert" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:172 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:182 msgctxt "@info:title" msgid "File Saved" msgstr "Datei wurde gespeichert" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:173 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:183 msgctxt "@action:button" msgid "Open Folder" msgstr "Ordner öffnen" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:173 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:183 msgctxt "@info:tooltip" msgid "Open the folder containing the file" msgstr "Öffnet den Ordner, der die gespeicherte Datei enthält" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:185 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:195 #, python-brace-format msgctxt "@info:status" msgid "Something went wrong saving to {0}: {1}" -msgstr "Das Speichern unter {0}: {1} hat nicht funktioniert." +msgstr "Das Speichern unter {0}: {1} hat nicht funktioniert" #: /home/ruben/Projects/Uranium/plugins/Tools/ScaleTool/__init__.py:12 msgctxt "@label" @@ -218,6 +251,16 @@ msgid "Rotate Model" msgstr "Modell drehen" +#: /home/ruben/Projects/Uranium/plugins/Tools/RotateTool/RotateTool.py:279 +msgctxt "@label" +msgid "Laying object flat on buildplate..." +msgstr "Objekt flach auf die Druckplatte leben..." + +#: /home/ruben/Projects/Uranium/plugins/Tools/RotateTool/RotateTool.py:279 +msgctxt "@title" +msgid "Object Rotation" +msgstr "Objektdrehung" + #: /home/ruben/Projects/Uranium/plugins/Tools/MirrorTool/__init__.py:12 msgctxt "@label" msgid "Mirror" @@ -235,14 +278,19 @@ "Your configuration seems to be corrupt. Something seems to be wrong with the following profiles:\n" "- {profiles}\n" "Would you like to reset to factory defaults?" -msgstr "Ihre Konfiguration scheint beschädigt zu sein. Offensichtlich liegt ein Fehler bei den folgenden Profilen vor:\n- {profiles}\nMöchten Sie auf die Werkseinstellungen zurücksetzen?" +msgstr "" +"Ihre Konfiguration scheint beschädigt zu sein. Offensichtlich liegt ein Fehler bei den folgenden Profilen vor:\n" +"- {profiles}\n" +"Möchten Sie auf die Werkseinstellungen zurücksetzen?" #: /home/ruben/Projects/Uranium/UM/__init__.py:16 +#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:175 msgctxt "@info:status" msgid "Your configuration seems to be corrupt." msgstr "Ihre Konfiguration scheint beschädigt zu sein." #: /home/ruben/Projects/Uranium/UM/__init__.py:17 +#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:177 msgctxt "@info:title" msgid "Configuration errors" msgstr "Konfigurationsfehler" @@ -252,36 +300,66 @@ msgid "Reset your configuration to factory defaults." msgstr "Setzen Sie Ihre Konfiguration auf die Werkseinstellungen zurück." -#: /home/ruben/Projects/Uranium/UM/Settings/Models/InstanceContainersModel.py:189 -#: /home/ruben/Projects/Uranium/UM/Qt/Bindings/MeshFileHandlerProxy.py:48 -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:655 -#: /home/ruben/Projects/Uranium/UM/FileHandler/FileHandler.py:70 +#: /home/ruben/Projects/Uranium/UM/Settings/Models/InstanceContainersModel.py:181 +#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:708 +#: /home/ruben/Projects/Uranium/UM/FileHandler/FileHandler.py:56 #, python-brace-format msgctxt "@item:inlistbox" msgid "All Supported Types ({0})" msgstr "Alle unterstützten Typen ({0})" -#: /home/ruben/Projects/Uranium/UM/Settings/Models/InstanceContainersModel.py:192 -#: /home/ruben/Projects/Uranium/UM/Qt/Bindings/MeshFileHandlerProxy.py:49 -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:656 -#: /home/ruben/Projects/Uranium/UM/FileHandler/FileHandler.py:71 +#: /home/ruben/Projects/Uranium/UM/Settings/Models/InstanceContainersModel.py:184 +#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:709 +#: /home/ruben/Projects/Uranium/UM/FileHandler/FileHandler.py:57 msgctxt "@item:inlistbox" msgid "All Files (*)" msgstr "Alle Dateien (*)" -#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:108 +#: /home/ruben/Projects/Uranium/UM/PackageManager.py:233 +#, python-brace-format +msgctxt "@error:uninstall" +msgid "" +"There were some errors uninstalling the following packages:\n" +"{packages}" +msgstr "" +"Beim Deinstallieren der folgenden Pakete traten Fehler auf:\n" +"{packages}" + +#: /home/ruben/Projects/Uranium/UM/PackageManager.py:235 +msgctxt "@info:title" +msgid "Uninstalling errors" +msgstr "Fehler beim Deinstallieren" + +#: /home/ruben/Projects/Uranium/UM/PackageManager.py:454 +#, python-brace-format +msgctxt "@error:update" +msgid "" +"There was an error uninstalling the package {package} before installing new version:\n" +"{error}.\n" +"Please try to upgrade again later." +msgstr "" +"Beim Deinstallieren des Pakets {package} vor dem Installieren einer neuen Version trat ein Fehler auf:\n" +"{error}.\n" +"Versuchen Sie später erneut, die Aktualisierung durchzuführen." + +#: /home/ruben/Projects/Uranium/UM/PackageManager.py:457 +msgctxt "@info:title" +msgid "Updating error" +msgstr "Fehler beim Aktualisieren" + +#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:112 #, python-brace-format msgctxt "@label Short days-hours-minutes format. {0} is days, {1} is hours, {2} is minutes" msgid "{0:0>2}d {1:0>2}h {2:0>2}min" -msgstr "{0:0>2}Tag {1:0>2}Stunde {2:0>2}Minute" +msgstr "{0:0>2}T. {1:0>2}St. {2:0>2}Mi." -#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:110 +#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:114 #, python-brace-format msgctxt "@label Short hours-minutes format. {0} is hours, {1} is minutes" msgid "{0:0>2}h {1:0>2}min" -msgstr "{0:0>2}Stunde {1:0>2}Minute" +msgstr "{0:0>2}St. {1:0>2}Mi." -#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:113 +#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:117 #, python-brace-format msgctxt "@label Long duration format. {0} is days" msgid "{0} day" @@ -289,8 +367,8 @@ msgstr[0] "{0} Tag" msgstr[1] "{0} Tage" -#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:113 -#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:115 +#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:117 +#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:119 #, python-brace-format msgctxt "@label Long duration format. {0} is hours" msgid "{0} hour" @@ -298,9 +376,9 @@ msgstr[0] "{0} Stunde" msgstr[1] "{0} Stunden" -#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:113 -#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:115 #: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:117 +#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:119 +#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:121 #, python-brace-format msgctxt "@label Long duration format. {0} is minutes" msgid "{0} minute" @@ -308,150 +386,159 @@ msgstr[0] "{0} Minute" msgstr[1] "{0} Minuten" -#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:112 +#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:159 +msgctxt "@info:progress" +msgid "Initializing package manager..." +msgstr "Paketmanager wird initialisiert ..." + +#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:180 msgctxt "@info:progress" msgid "Loading plugins..." msgstr "Plugins werden geladen..." -#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:119 +#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:187 msgctxt "@info:progress" msgid "Updating configuration..." msgstr "Die Konfiguration wird aktualisiert..." -#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:136 +#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:205 msgctxt "@info:progress" msgid "Loading preferences..." msgstr "Einstellungen werden geladen..." -#: /home/ruben/Projects/Uranium/UM/Mesh/ReadMeshJob.py:65 +#: /home/ruben/Projects/Uranium/UM/Mesh/ReadMeshJob.py:68 #, python-format, python-brace-format msgctxt "@info:status" msgid "Auto scaled object to {0}% of original size" -msgstr "Automatische Skalierung des Objekts auf {0} % der Originalgröße" +msgstr "Automatische Skalierung des Objekts auf {0}% der Originalgröße" -#: /home/ruben/Projects/Uranium/UM/Mesh/ReadMeshJob.py:65 +#: /home/ruben/Projects/Uranium/UM/Mesh/ReadMeshJob.py:68 msgctxt "@info:title" msgid "Scaling Object" msgstr "Objekt-Skalierung" -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:220 +#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:277 msgctxt "@info:status" msgid "" "The plugin has been installed.\n" "Please re-start the application to activate the plugin." -msgstr "Das Plugin wurde installiert. \nStarten Sie die Anwendung bitte neu, um das Plugin zu aktivieren." - -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:231 -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:270 -#, python-brace-format -msgctxt "@info:status" -msgid "" -"Failed to install plugin from {0}:\n" -"{1}" -msgstr "Plugin von {0}:\n{1} konnte nicht installiert werden." - -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:254 -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:259 -#, python-brace-format -msgctxt "@info:status" -msgid "" -"Failed to install the plugin;\n" -"{0}" -msgstr "Die Installation des Plugin war nicht erfolgreich;\n{0}" +msgstr "" +"Das Plugin wurde installiert.\n" +"Starten Sie die Anwendung bitte neu, um das Plugin zu aktivieren." -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:421 +#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:415 #, python-brace-format msgctxt "@info:status" msgid "" "The plugin has been removed.\n" "Please restart {0} to finish uninstall." -msgstr "Das Plugin wurde entfernt.\nBitte starten Sie {0} erneut, um die Deinstallation abzuschließen." - -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:433 -#, python-brace-format -msgctxt "@info:status" -msgid "Failed to uninstall plugin. Plugin will be removed after {0} restarts." -msgstr "Plugin wurde nicht deinstalliert. Das Plugin wird nach {0} Neustarts entfernt." +msgstr "" +"Das Plugin wurde entfernt.\n" +"Bitte starten Sie {0} erneut, um die Deinstallation abzuschließen." -#: /home/ruben/Projects/Uranium/UM/VersionUpgradeManager.py:123 +#: /home/ruben/Projects/Uranium/UM/VersionUpgradeManager.py:155 #, python-brace-format msgctxt "@info:version-upgrade" msgid "A configuration from an older version of {0} was imported." msgstr "Eine Konfiguration einer älteren Version von {0} wurde importiert." -#: /home/ruben/Projects/Uranium/UM/View/GL/OpenGL.py:50 +#: /home/ruben/Projects/Uranium/UM/View/GL/OpenGL.py:58 +#: /home/ruben/Projects/Uranium/UM/View/GL/OpenGL.py:63 msgctxt "@message" msgid "Failed to Initialize OpenGL" -msgstr "OpenGL konnte nicht initialisiert werden." +msgstr "OpenGL konnte nicht initialisiert werden" -#: /home/ruben/Projects/Uranium/UM/View/GL/OpenGL.py:60 +#: /home/ruben/Projects/Uranium/UM/View/GL/OpenGL.py:73 msgctxt "Critical OpenGL Extensions Missing" msgid "Critical OpenGL extensions are missing. This program requires support for Framebuffer Objects. Please check your video card drivers." msgstr "Wichtige OpenGL-Erweiterungen fehlen. Dieses Programm erfordert Support für Framebuffer-Objekte. Überprüfen Sie bitte Ihre Videokartentreiber." -#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:153 +#: /home/ruben/Projects/Uranium/UM/ConfigurationErrorMessage.py:32 +#: /home/ruben/Projects/Uranium/plugins/Tools/ScaleTool/ScaleTool.qml:67 +#: /home/ruben/Projects/Uranium/plugins/Tools/RotateTool/RotateTool.qml:21 +msgctxt "@action:button" +msgid "Reset" +msgstr "Zurücksetzen" + +#: /home/ruben/Projects/Uranium/UM/ConfigurationErrorMessage.py:44 +#, python-brace-format +msgctxt "@info:status" +msgid "" +"Your configuration seems to be corrupt. Something seems to be wrong with the following profiles:\n" +"- {profiles}\n" +" Would you like to reset to factory defaults? Reset will remove all your current printers and profiles." +msgstr "" +"Ihre Konfiguration scheint beschädigt zu sein. Offensichtlich liegt ein Fehler bei den folgenden Profilen vor:\n" +"- {profiles}\n" +" Möchten Sie auf die Werkseinstellungen zurücksetzen? Durch das Zurücksetzen werden all Ihre aktuellen Drucker und Profile entfernt." + +#: /home/ruben/Projects/Uranium/UM/ConfigurationErrorMessage.py:49 +msgctxt "@title:window" +msgid "Reset to factory" +msgstr "Zurücksetzung auf Werkseinstellungen" + +#: /home/ruben/Projects/Uranium/UM/ConfigurationErrorMessage.py:51 +msgctxt "@label" +msgid "Reset will remove all your current printers and profiles! Are you sure you want to reset?" +msgstr "Durch das Zurücksetzen werden alle Ihre aktuellen Drucker und Profile entfernt! Möchten Sie wirklich zurücksetzen?" + +#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:162 #, python-brace-format msgctxt "@info" msgid "Would you like to reload {filename}?" msgstr "Möchten Sie {filename} neu laden?" -#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:154 +#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:163 msgctxt "@info:title" msgid "File has been modified" msgstr "Datei wurde geändert" -#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:155 +#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:164 msgctxt "@action:button" msgid "Reload" msgstr "Neu laden" -#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:155 +#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:164 msgctxt "@action:description" msgid "This will trigger the modified files to reload from disk." msgstr "Damit werden die geänderten Dateien erneut von der Festplatte geladen." -#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:32 +#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:36 #, python-brace-format msgctxt "@info:status Don't translate the XML tag !" msgid "Cannot open files of the type of {0}" -msgstr "Dateien des Typs {0} können nicht geöffnet werden." +msgstr "Dateien des Typs {0} können nicht geöffnet werden" -#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:32 -#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:47 -#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:70 +#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:36 +#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:51 +#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:74 msgctxt "@info:title" msgid "Invalid File" msgstr "Ungültige Datei" -#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:45 -#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:70 +#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:49 +#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:74 #, python-brace-format msgctxt "@info:status Don't translate the XML tag !" msgid "Failed to load {0}" msgstr "Laden von {0} fehlgeschlagen" -#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:54 +#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:59 msgctxt "@info:title" msgid "Loading" msgstr "Wird geladen" -#: /home/ruben/Projects/Uranium/plugins/Tools/ScaleTool/ScaleTool.qml:60 -#: /home/ruben/Projects/Uranium/plugins/Tools/RotateTool/RotateTool.qml:21 -msgctxt "@action:button" -msgid "Reset" -msgstr "Zurücksetzen" - -#: /home/ruben/Projects/Uranium/plugins/Tools/ScaleTool/ScaleTool.qml:86 +#: /home/ruben/Projects/Uranium/plugins/Tools/ScaleTool/ScaleTool.qml:93 msgctxt "@option:check" msgid "Snap Scaling" msgstr "Snap-Skalierung" -#: /home/ruben/Projects/Uranium/plugins/Tools/ScaleTool/ScaleTool.qml:104 +#: /home/ruben/Projects/Uranium/plugins/Tools/ScaleTool/ScaleTool.qml:121 msgctxt "@option:check" msgid "Uniform Scaling" msgstr "Einheitliche Skalierung" -#: /home/ruben/Projects/Uranium/plugins/Tools/TranslateTool/TranslateTool.qml:177 +#: /home/ruben/Projects/Uranium/plugins/Tools/TranslateTool/TranslateTool.qml:196 msgctxt "@option:check" msgid "Lock Model" msgstr "Modell sperren" @@ -461,89 +548,37 @@ msgid "Lay flat" msgstr "Flach" -#: /home/ruben/Projects/Uranium/plugins/Tools/RotateTool/RotateTool.qml:55 +#: /home/ruben/Projects/Uranium/plugins/Tools/RotateTool/RotateTool.qml:60 +msgctxt "@action:button" +msgid "Select face to align to the build plate" +msgstr "Wählen Sie die Fläche aus, die an der Bauplatte ausgerichtet werden soll" + +#: /home/ruben/Projects/Uranium/plugins/Tools/RotateTool/RotateTool.qml:81 msgctxt "@action:checkbox" msgid "Snap Rotation" msgstr "Snap-Drehung" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:19 -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:148 -msgctxt "@title:tab" -msgid "Plugins" -msgstr "Plugins" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:28 -msgctxt "@action:button" -msgid "Install new plugin" -msgstr "Neues Plugin installieren" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:51 -msgctxt "@label" -msgid "You will need to restart the application before changes in plugins have effect." -msgstr "Die Anwendung muss neu gestartet werden, um die Änderungen des Plugins zu übernehmen." - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:87 -msgctxt "@label" -msgid "This plugin is required for the application to run." -msgstr "Dieses Plugin ist für die Ausführung der Anwendung erforderlich." - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:104 -msgctxt "@label" -msgid "Info..." -msgstr "Infos..." - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:122 -msgctxt "@window:title" -msgid "Install Plugin" -msgstr "Plugin installieren" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:131 -msgctxt "@title:window" -msgid "Open file(s)" -msgstr "Datei(en) öffnen" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:165 -msgctxt "@label" -msgid "No text available" -msgstr "Kein Text verfügbar" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:171 -msgctxt "@title:window" -msgid "About %1" -msgstr "Über %1" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:203 -msgctxt "@label" -msgid "Author:" -msgstr "Autor:" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:225 -msgctxt "@label" -msgid "Version:" -msgstr "Version:" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:243 -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:113 -msgctxt "@action:button" -msgid "Close" -msgstr "Schließen" - #: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:18 msgctxt "@title:window" msgid "Preferences" msgstr "Einstellungen" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:106 +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:107 msgctxt "@action:button" msgid "Defaults" msgstr "Standardeinstellungen" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:146 +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:115 +msgctxt "@action:button" +msgid "Close" +msgstr "Schließen" + +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:148 msgctxt "@title:tab" msgid "General" msgstr "Allgemein" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:147 +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:149 msgctxt "@title:tab" msgid "Settings" msgstr "Einstellungen" @@ -553,44 +588,34 @@ msgid "Rename" msgstr "Umbenennen" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/RenameDialog.qml:56 +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/RenameDialog.qml:20 +msgctxt "@info" +msgid "Please provide a new name." +msgstr "Bitte einen neuen Namen eingeben." + +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/RenameDialog.qml:70 #: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Wizard.qml:241 msgctxt "@action:button" msgid "Cancel" msgstr "Abbrechen" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/RenameDialog.qml:60 +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/RenameDialog.qml:75 msgctxt "@action:button" msgid "OK" msgstr "OK" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/SettingVisibilityItem.qml:34 +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/SettingVisibilityItem.qml:32 msgctxt "@item:tooltip" msgid "This setting has been hidden by the active machine and will not be visible." msgstr "Diese Einstellung wurde durch das aktive Gerät ausgeblendet und ist nicht sichtbar." -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/SettingVisibilityItem.qml:51 +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/SettingVisibilityItem.qml:49 msgctxt "@item:tooltip %1 is list of setting names" msgid "This setting has been hidden by the value of %1. Change the value of that setting to make this setting visible." msgid_plural "This setting has been hidden by the values of %1. Change the values of those settings to make this setting visible." msgstr[0] "Diese Einstellung wurde durch den Wert von %1 ausgeblendet. Ändern Sie den Wert dieser Einstellung, um diese Einstellung sichtbar zu machen." msgstr[1] "Diese Einstellung wurde durch die Werte von %1 ausgeblendet. Ändern Sie die Werte dieser Einstellung, um diese Einstellung sichtbar zu machen." -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/SettingVisibilityPage.qml:12 -msgctxt "@title:tab" -msgid "Setting Visibility" -msgstr "Sichtbarkeit einstellen" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/SettingVisibilityPage.qml:42 -msgctxt "@label:textbox" -msgid "Check all" -msgstr "Alle prüfen" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/SettingVisibilityPage.qml:89 -msgctxt "@label:textbox" -msgid "Filter..." -msgstr "Filtern..." - #: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/MachinesPage.qml:12 msgctxt "@title:tab" msgid "Printers" @@ -611,86 +636,6 @@ msgid "Are you sure you wish to remove %1? This cannot be undone!" msgstr "Möchten Sie %1 wirklich entfernen? Dies kann nicht rückgängig gemacht werden!" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:14 -msgctxt "@title:tab" -msgid "Profiles" -msgstr "Profile" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:15 -msgctxt "@label" -msgid "Duplicate" -msgstr "Duplizieren" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:45 -msgctxt "@label %1 is printer name" -msgid "Printer: %1" -msgstr "Drucker: %1" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:83 -msgctxt "@action:button" -msgid "Update \"%1\"" -msgstr "\"%1“ aktualisieren" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:84 -msgctxt "@action:button" -msgid "Update profile" -msgstr "Profil aktualisieren" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:92 -msgctxt "@action:button" -msgid "Discard current changes" -msgstr "Aktuelle Änderungen verwerfen" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:93 -msgctxt "@action:button" -msgid "Reload profile" -msgstr "Profil erneut laden" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:107 -msgctxt "@label" -msgid "Based on" -msgstr "Basierend auf" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:107 -msgctxt "@label" -msgid "Profile type" -msgstr "Profiltyp" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:112 -msgctxt "@label" -msgid "Protected profile" -msgstr "Geschütztes Profil" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:112 -msgctxt "@label" -msgid "Custom profile" -msgstr "Benutzerdefiniertes Profil" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:139 -msgctxt "@action:button" -msgid "Import" -msgstr "Import" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:146 -msgctxt "@action:button" -msgid "Export" -msgstr "Export" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:184 -msgctxt "@window:title" -msgid "Import Profile" -msgstr "Profil importieren" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:192 -msgctxt "@title:window" -msgid "Import Profile" -msgstr "Profil importieren" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:219 -msgctxt "@title:window" -msgid "Export Profile" -msgstr "Profil exportieren" - #: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Wizard.qml:215 msgctxt "@action:button" msgid "Back" @@ -906,6 +851,186 @@ msgid "Mirror Tool" msgstr "Spiegelungstool" +#~ msgctxt "@title:tab" +#~ msgid "Plugins" +#~ msgstr "Plugins" + +#~ msgctxt "@action:button" +#~ msgid "Install new plugin" +#~ msgstr "Neues Plugin installieren" + +#~ msgctxt "@label" +#~ msgid "You will need to restart the application before changes in plugins have effect." +#~ msgstr "Die Anwendung muss neu gestartet werden, um die Änderungen des Plugins zu übernehmen." + +#~ msgctxt "@label" +#~ msgid "This plugin is required for the application to run." +#~ msgstr "Dieses Plugin ist für die Ausführung der Anwendung erforderlich." + +#~ msgctxt "@label" +#~ msgid "Info..." +#~ msgstr "Infos..." + +#~ msgctxt "@window:title" +#~ msgid "Install Plugin" +#~ msgstr "Plugin installieren" + +#~ msgctxt "@title:window" +#~ msgid "Open file(s)" +#~ msgstr "Datei(en) öffnen" + +#~ msgctxt "@label" +#~ msgid "No text available" +#~ msgstr "Kein Text verfügbar" + +#~ msgctxt "@title:window" +#~ msgid "About %1" +#~ msgstr "Über %1" + +#~ msgctxt "@label" +#~ msgid "Author:" +#~ msgstr "Autor:" + +#~ msgctxt "@label" +#~ msgid "Version:" +#~ msgstr "Version:" + +#~ msgctxt "@action:button" +#~ msgid "Learn more about the new features" +#~ msgstr "Erfahren Sie mehr über die neuen Funktionen" + +#~ msgctxt "@info:status" +#~ msgid "Cura {0} is available!" +#~ msgstr "Cura {0} ist verfügbar!" + +#~ msgctxt "@info:status" +#~ msgid "Cura {0} provides better and reliable printing experience." +#~ msgstr "Cura {0} bietet eine bessere und zuverlässige Druckerfahrung." + +#~ msgctxt "@action:button" +#~ msgid "Learn more about new features" +#~ msgstr "Erfahren Sie mehr über neue Funktionen" + +#~ msgctxt "@error:update" +#~ msgid "" +#~ "There was an error uninstalling the package {package} before installingnew version:\n" +#~ "{error}.\n" +#~ "Please try to upgrade again later." +#~ msgstr "" +#~ "Beim Deinstallieren des Pakets {package} vor dem Installieren einer neuen Version trat ein Fehler auf:\n" +#~ "{error}.\n" +#~ "Versuchen Sie später erneut, die Aktualisierung durchzuführen." + +#~ msgctxt "@info:status" +#~ msgid "" +#~ "Your configuration seems to be corrupt. Something seems to be wrong with the following profiles:\n" +#~ "- {profiles}\n" +#~ "Would you like to reset to factory defaults? Reset will remove all your current printers and profiles." +#~ msgstr "" +#~ "Ihre Konfiguration scheint beschädigt zu sein. Offensichtlich liegt ein Fehler bei den folgenden Profilen vor:\n" +#~ "- {profiles}\n" +#~ "Möchten Sie auf die Werkseinstellungen zurücksetzen? Durch das Zurücksetzen werden all Ihre aktuellen Drucker und Profile entfernt." + +#~ msgctxt "@info" +#~ msgid "A new version is available!" +#~ msgstr "Eine neue Version ist verfügbar!" + +#~ msgctxt "@info:status" +#~ msgid "" +#~ "Failed to install plugin from {0}:\n" +#~ "{1}" +#~ msgstr "" +#~ "Plugin von {0}:\n" +#~ "{1} konnte nicht installiert werden." + +#~ msgctxt "@info:status" +#~ msgid "" +#~ "Failed to install the plugin;\n" +#~ "{0}" +#~ msgstr "" +#~ "Die Installation des Plugin war nicht erfolgreich;\n" +#~ "{0}" + +#~ msgctxt "@info:status" +#~ msgid "Failed to uninstall plugin. Plugin will be removed after {0} restarts." +#~ msgstr "Plugin wurde nicht deinstalliert. Das Plugin wird nach {0} Neustarts entfernt." + +#~ msgctxt "@title:tab" +#~ msgid "Setting Visibility" +#~ msgstr "Sichtbarkeit einstellen" + +#~ msgctxt "@label:textbox" +#~ msgid "Check all" +#~ msgstr "Alle prüfen" + +#~ msgctxt "@label:textbox" +#~ msgid "Filter..." +#~ msgstr "Filtern..." + +#~ msgctxt "@title:tab" +#~ msgid "Profiles" +#~ msgstr "Profile" + +#~ msgctxt "@label" +#~ msgid "Duplicate" +#~ msgstr "Duplizieren" + +#~ msgctxt "@label %1 is printer name" +#~ msgid "Printer: %1" +#~ msgstr "Drucker: %1" + +#~ msgctxt "@action:button" +#~ msgid "Update \"%1\"" +#~ msgstr "\"%1“ aktualisieren" + +#~ msgctxt "@action:button" +#~ msgid "Update profile" +#~ msgstr "Profil aktualisieren" + +#~ msgctxt "@action:button" +#~ msgid "Discard current changes" +#~ msgstr "Aktuelle Änderungen verwerfen" + +#~ msgctxt "@action:button" +#~ msgid "Reload profile" +#~ msgstr "Profil erneut laden" + +#~ msgctxt "@label" +#~ msgid "Based on" +#~ msgstr "Basierend auf" + +#~ msgctxt "@label" +#~ msgid "Profile type" +#~ msgstr "Profiltyp" + +#~ msgctxt "@label" +#~ msgid "Protected profile" +#~ msgstr "Geschütztes Profil" + +#~ msgctxt "@label" +#~ msgid "Custom profile" +#~ msgstr "Benutzerdefiniertes Profil" + +#~ msgctxt "@action:button" +#~ msgid "Import" +#~ msgstr "Import" + +#~ msgctxt "@action:button" +#~ msgid "Export" +#~ msgstr "Export" + +#~ msgctxt "@window:title" +#~ msgid "Import Profile" +#~ msgstr "Profil importieren" + +#~ msgctxt "@title:window" +#~ msgid "Import Profile" +#~ msgstr "Profil importieren" + +#~ msgctxt "@title:window" +#~ msgid "Export Profile" +#~ msgstr "Profil exportieren" + #~ msgctxt "@info" #~ msgid "An exception occurred while checking for updates." #~ msgstr "Bei der Suche nach Aktualisierungen ist ein Ausnahmefehler aufgetreten." diff -Nru uranium-3.3.0/resources/i18n/es_ES/uranium.po uranium-4.4.1/resources/i18n/es_ES/uranium.po --- uranium-3.3.0/resources/i18n/es_ES/uranium.po 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/resources/i18n/es_ES/uranium.po 2019-11-19 10:50:46.000000000 +0000 @@ -1,14 +1,14 @@ # Uranium -# Copyright (C) 2018 Ultimaker +# Copyright (C) 2019 Ultimaker B.V. # This file is distributed under the same license as the Uranium package. -# Ruben Dulek , 2017. +# Ruben Dulek , 2019. # msgid "" msgstr "" -"Project-Id-Version: Uranium 3.3\n" +"Project-Id-Version: Uranium 4.4\n" "Report-Msgid-Bugs-To: r.dulek@ultimaker.com\n" -"POT-Creation-Date: 2018-03-29 08:36+0200\n" -"PO-Revision-Date: 2018-04-11 15:55+0100\n" +"POT-Creation-Date: 2019-11-05 13:40+0100\n" +"PO-Revision-Date: 2018-11-06 15:43+0100\n" "Last-Translator: Bothof \n" "Language-Team: Spanish \n" "Language: es_ES\n" @@ -34,6 +34,17 @@ msgid "Wavefront OBJ File" msgstr "Archivo Wavefront OBJ" +#: /home/ruben/Projects/Uranium/plugins/FileHandlers/OBJWriter/OBJWriter.py:23 +msgctxt "@error:not supported" +msgid "OBJWriter does not support non-text mode." +msgstr "OBJWriter no es compatible con el modo sin texto." + +#: /home/ruben/Projects/Uranium/plugins/FileHandlers/OBJWriter/OBJWriter.py:30 +#: /home/ruben/Projects/Uranium/plugins/FileHandlers/STLWriter/STLWriter.py:27 +msgctxt "@error:no mesh" +msgid "There is no mesh to write." +msgstr "No existe malla en la que escribir." + #: /home/ruben/Projects/Uranium/plugins/FileHandlers/STLWriter/__init__.py:17 msgctxt "@item:inlistbox" msgid "STL File (ASCII)" @@ -44,80 +55,101 @@ msgid "STL File (Binary)" msgstr "Archivo STL (binario)" -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:42 +#: /home/ruben/Projects/Uranium/plugins/FileHandlers/STLWriter/STLWriter.py:36 +msgctxt "@error:not supported" +msgid "Unsupported output mode writing STL to stream." +msgstr "Modo de escritura no compatible al tratar de guardar el STL." + +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:50 msgctxt "@info" msgid "Could not access update information." -msgstr "No se pudo acceder a la información actualizada." +msgstr "No se pudo acceder a la información de la actualización." -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:43 -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:60 -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:71 -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:89 -#: /home/ruben/Projects/Uranium/UM/VersionUpgradeManager.py:123 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:51 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:68 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:97 +#: /home/ruben/Projects/Uranium/UM/VersionUpgradeManager.py:155 msgctxt "@info:title" msgid "Version Upgrade" -msgstr "Actualización de la versión" +msgstr "Actualización de versión" -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:55 -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:60 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:63 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:68 msgctxt "@info" msgid "The version you are using does not support checking for updates." msgstr "La versión que utiliza no es compatible con la búsqueda de actualizaciones." -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:55 -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:178 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:63 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:188 msgctxt "@info:title" msgid "Warning" msgstr "Advertencia" -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:71 -msgctxt "@info" -msgid "A new version is available!" -msgstr "¡Nueva versión disponible!" - -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:72 -msgctxt "@action:button" -msgid "Download" -msgstr "Descargar" - -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:85 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:93 msgctxt "@info" msgid "An error occurred while checking for updates." msgstr "Se ha producido un error mientras se comprobaban las actualizaciones." -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:85 -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:185 -#: /home/ruben/Projects/Uranium/UM/Qt/Bindings/OutputDeviceManagerProxy.py:128 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:93 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:195 +#: /home/ruben/Projects/Uranium/UM/Qt/Bindings/OutputDeviceManagerProxy.py:141 msgctxt "@info:title" msgid "Error" msgstr "Error" -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:89 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:97 msgctxt "@info" msgid "No new version was found." msgstr "No se ha encontrado ninguna versión nueva." +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:102 +#, python-brace-format +msgctxt "@info:status" +msgid "{application_name} {version_number} is available!" +msgstr "¡Está disponible {application_name} {version_number}!" + +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:104 +#, python-brace-format +msgctxt "@info:status" +msgid "{application_name} {version_number} provides a better and more reliable printing experience." +msgstr "{application_name} {version_number} ofrece unos resultados de impresión mejores y más fiables." + +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:107 +msgctxt "@action:button" +msgid "Download" +msgstr "Descargar" + +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:109 +msgctxt "@action:button" +msgid "Learn more" +msgstr "Más información" + #: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateChecker.py:26 msgctxt "@item:inmenu" +msgid "Update Checker" +msgstr "Comprobador de actualizaciones" + +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateChecker.py:27 +msgctxt "@item:inmenu" msgid "Check for Updates" msgstr "Buscar actualizaciones" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:33 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:30 msgctxt "@item:inmenu" msgid "Local File" msgstr "Archivo local" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:34 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:31 msgctxt "@action:button Preceded by 'Ready to'." msgid "Save to File" msgstr "Guardar en archivo" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:35 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:32 msgctxt "@info:tooltip" msgid "Save to File" msgstr "Guardar en archivo" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:56 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:53 msgctxt "@title:window" msgid "Save to File" msgstr "Guardar en archivo" @@ -125,69 +157,69 @@ #: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:86 msgctxt "@info:warning" msgid "There are no file types available to write with!" -msgstr "No hay tipos de archivo disponibles con los que escribir." +msgstr "¡No hay tipos de archivo disponibles con los que escribir!" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:121 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:130 msgctxt "@title:window" msgid "File Already Exists" msgstr "El archivo ya existe" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:121 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:130 #, python-brace-format msgctxt "@label Don't translate the XML tag !" msgid "The file {0} already exists. Are you sure you want to overwrite it?" msgstr "El archivo {0} ya existe. ¿Está seguro de que desea sobrescribirlo?" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:150 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:160 #, python-brace-format msgctxt "@info:progress Don't translate the XML tags !" msgid "Saving to {0}" msgstr "Guardar en {0}" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:151 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:161 msgctxt "@info:title" msgid "Saving" msgstr "Guardando" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:159 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:169 #, python-brace-format msgctxt "@info:status Don't translate the XML tags !" msgid "Permission denied when trying to save {0}" msgstr "Permiso denegado al intentar guardar en {0}" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:162 -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:178 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:172 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:188 #, python-brace-format msgctxt "@info:status Don't translate the XML tags or !" msgid "Could not save to {0}: {1}" msgstr "No se pudo guardar en {0}: {1}" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:172 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:182 #, python-brace-format msgctxt "@info:status Don't translate the XML tags !" msgid "Saved to {0}" msgstr "Guardado en {0}" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:172 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:182 msgctxt "@info:title" msgid "File Saved" msgstr "Archivo guardado" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:173 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:183 msgctxt "@action:button" msgid "Open Folder" msgstr "Abrir carpeta" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:173 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:183 msgctxt "@info:tooltip" msgid "Open the folder containing the file" msgstr "Abre la carpeta que contiene el archivo" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:185 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:195 #, python-brace-format msgctxt "@info:status" msgid "Something went wrong saving to {0}: {1}" -msgstr "Se ha producido un error al guardar {0}: {1}." +msgstr "Se ha producido un error al guardar {0}: {1}" #: /home/ruben/Projects/Uranium/plugins/Tools/ScaleTool/__init__.py:12 msgctxt "@label" @@ -219,6 +251,16 @@ msgid "Rotate Model" msgstr "Modelo Rotar" +#: /home/ruben/Projects/Uranium/plugins/Tools/RotateTool/RotateTool.py:279 +msgctxt "@label" +msgid "Laying object flat on buildplate..." +msgstr "Colocando objeto en plano sobre la placa de impresión..." + +#: /home/ruben/Projects/Uranium/plugins/Tools/RotateTool/RotateTool.py:279 +msgctxt "@title" +msgid "Object Rotation" +msgstr "Rotación de objetos" + #: /home/ruben/Projects/Uranium/plugins/Tools/MirrorTool/__init__.py:12 msgctxt "@label" msgid "Mirror" @@ -236,14 +278,19 @@ "Your configuration seems to be corrupt. Something seems to be wrong with the following profiles:\n" "- {profiles}\n" "Would you like to reset to factory defaults?" -msgstr "Parece que la configuración está dañada. Se ha producido un error en los siguientes perfiles:\n- {profiles}\n¿Desea restablecer los valores predeterminados de fábrica?" +msgstr "" +"Parece que la configuración está dañada. Se ha producido un error en los siguientes perfiles:\n" +"- {profiles}\n" +"¿Desea restablecer los valores predeterminados de fábrica?" #: /home/ruben/Projects/Uranium/UM/__init__.py:16 +#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:175 msgctxt "@info:status" msgid "Your configuration seems to be corrupt." msgstr "Parece que la configuración está dañada." #: /home/ruben/Projects/Uranium/UM/__init__.py:17 +#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:177 msgctxt "@info:title" msgid "Configuration errors" msgstr "Errores de configuración" @@ -253,36 +300,66 @@ msgid "Reset your configuration to factory defaults." msgstr "Restablezca la configuración a los valores predeterminados de fábrica." -#: /home/ruben/Projects/Uranium/UM/Settings/Models/InstanceContainersModel.py:189 -#: /home/ruben/Projects/Uranium/UM/Qt/Bindings/MeshFileHandlerProxy.py:48 -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:655 -#: /home/ruben/Projects/Uranium/UM/FileHandler/FileHandler.py:70 +#: /home/ruben/Projects/Uranium/UM/Settings/Models/InstanceContainersModel.py:181 +#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:708 +#: /home/ruben/Projects/Uranium/UM/FileHandler/FileHandler.py:56 #, python-brace-format msgctxt "@item:inlistbox" msgid "All Supported Types ({0})" msgstr "Todos los tipos compatibles ({0})" -#: /home/ruben/Projects/Uranium/UM/Settings/Models/InstanceContainersModel.py:192 -#: /home/ruben/Projects/Uranium/UM/Qt/Bindings/MeshFileHandlerProxy.py:49 -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:656 -#: /home/ruben/Projects/Uranium/UM/FileHandler/FileHandler.py:71 +#: /home/ruben/Projects/Uranium/UM/Settings/Models/InstanceContainersModel.py:184 +#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:709 +#: /home/ruben/Projects/Uranium/UM/FileHandler/FileHandler.py:57 msgctxt "@item:inlistbox" msgid "All Files (*)" msgstr "Todos los archivos (*)" -#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:108 +#: /home/ruben/Projects/Uranium/UM/PackageManager.py:233 +#, python-brace-format +msgctxt "@error:uninstall" +msgid "" +"There were some errors uninstalling the following packages:\n" +"{packages}" +msgstr "" +"Se han producido algunos errores al desinstalar los siguientes paquetes:\n" +"{packages}" + +#: /home/ruben/Projects/Uranium/UM/PackageManager.py:235 +msgctxt "@info:title" +msgid "Uninstalling errors" +msgstr "Errores de desinstalación" + +#: /home/ruben/Projects/Uranium/UM/PackageManager.py:454 +#, python-brace-format +msgctxt "@error:update" +msgid "" +"There was an error uninstalling the package {package} before installing new version:\n" +"{error}.\n" +"Please try to upgrade again later." +msgstr "" +"Se ha producido un error al desinstalar el paquete {package} antes de instalar la nueva versión:\n" +"{error}.\n" +"Vuelva a intentar actualizar más tarde." + +#: /home/ruben/Projects/Uranium/UM/PackageManager.py:457 +msgctxt "@info:title" +msgid "Updating error" +msgstr "Error de actualización" + +#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:112 #, python-brace-format msgctxt "@label Short days-hours-minutes format. {0} is days, {1} is hours, {2} is minutes" msgid "{0:0>2}d {1:0>2}h {2:0>2}min" msgstr "{0:0>2}d {1:0>2}h {2:0>2}min" -#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:110 +#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:114 #, python-brace-format msgctxt "@label Short hours-minutes format. {0} is hours, {1} is minutes" msgid "{0:0>2}h {1:0>2}min" msgstr "{0:0>2}h {1:0>2}min" -#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:113 +#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:117 #, python-brace-format msgctxt "@label Long duration format. {0} is days" msgid "{0} day" @@ -290,8 +367,8 @@ msgstr[0] "{0} día" msgstr[1] "{0} días" -#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:113 -#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:115 +#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:117 +#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:119 #, python-brace-format msgctxt "@label Long duration format. {0} is hours" msgid "{0} hour" @@ -299,9 +376,9 @@ msgstr[0] "{0} hora" msgstr[1] "{0} horas" -#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:113 -#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:115 #: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:117 +#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:119 +#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:121 #, python-brace-format msgctxt "@label Long duration format. {0} is minutes" msgid "{0} minute" @@ -309,242 +386,199 @@ msgstr[0] "{0} minuto" msgstr[1] "{0} minutos" -#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:112 +#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:159 +msgctxt "@info:progress" +msgid "Initializing package manager..." +msgstr "Inicializando el gestor de paquetes...." + +#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:180 msgctxt "@info:progress" msgid "Loading plugins..." msgstr "Cargando complementos..." -#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:119 +#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:187 msgctxt "@info:progress" msgid "Updating configuration..." msgstr "Actualizando configuración..." -#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:136 +#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:205 msgctxt "@info:progress" msgid "Loading preferences..." msgstr "Cargando preferencias..." -#: /home/ruben/Projects/Uranium/UM/Mesh/ReadMeshJob.py:65 +#: /home/ruben/Projects/Uranium/UM/Mesh/ReadMeshJob.py:68 #, python-format, python-brace-format msgctxt "@info:status" msgid "Auto scaled object to {0}% of original size" msgstr "Escalado automático del objeto al {0}% del tamaño original" -#: /home/ruben/Projects/Uranium/UM/Mesh/ReadMeshJob.py:65 +#: /home/ruben/Projects/Uranium/UM/Mesh/ReadMeshJob.py:68 msgctxt "@info:title" msgid "Scaling Object" msgstr "Escalando objeto" -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:220 +#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:277 msgctxt "@info:status" msgid "" "The plugin has been installed.\n" "Please re-start the application to activate the plugin." -msgstr "El complemento se ha instalado.\nReinicie la aplicación para activarlo." - -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:231 -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:270 -#, python-brace-format -msgctxt "@info:status" -msgid "" -"Failed to install plugin from {0}:\n" -"{1}" -msgstr "No se ha podido instalar el complemento desde {0}:\n{1}" - -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:254 -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:259 -#, python-brace-format -msgctxt "@info:status" -msgid "" -"Failed to install the plugin;\n" -"{0}" -msgstr "Se ha producido un error al instalar el complemento;\n{0}" +msgstr "" +"El complemento se ha instalado.\n" +"Reinicie la aplicación para activarlo." -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:421 +#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:415 #, python-brace-format msgctxt "@info:status" msgid "" "The plugin has been removed.\n" "Please restart {0} to finish uninstall." -msgstr "El complemento se ha eliminado.\nPulse «Reiniciar» {0} para finalizar el proceso de desinstalación." - -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:433 -#, python-brace-format -msgctxt "@info:status" -msgid "Failed to uninstall plugin. Plugin will be removed after {0} restarts." -msgstr "Error al instalar el complemento. El complemento se eliminará tras {0} reintentos." +msgstr "" +"El complemento se ha eliminado.\n" +"Pulse «Reiniciar» {0} para finalizar el proceso de desinstalación." -#: /home/ruben/Projects/Uranium/UM/VersionUpgradeManager.py:123 +#: /home/ruben/Projects/Uranium/UM/VersionUpgradeManager.py:155 #, python-brace-format msgctxt "@info:version-upgrade" msgid "A configuration from an older version of {0} was imported." msgstr "Se ha importado una versión anterior de {0}." -#: /home/ruben/Projects/Uranium/UM/View/GL/OpenGL.py:50 +#: /home/ruben/Projects/Uranium/UM/View/GL/OpenGL.py:58 +#: /home/ruben/Projects/Uranium/UM/View/GL/OpenGL.py:63 msgctxt "@message" msgid "Failed to Initialize OpenGL" msgstr "Error al inicializar OpenGL" -#: /home/ruben/Projects/Uranium/UM/View/GL/OpenGL.py:60 +#: /home/ruben/Projects/Uranium/UM/View/GL/OpenGL.py:73 msgctxt "Critical OpenGL Extensions Missing" msgid "Critical OpenGL extensions are missing. This program requires support for Framebuffer Objects. Please check your video card drivers." msgstr "Faltan extensiones críticas de OpenGL. Este programa debe ser compatible con Framebuffer Objects. Compruebe los controladores de las tarjetas de vídeo." -#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:153 +#: /home/ruben/Projects/Uranium/UM/ConfigurationErrorMessage.py:32 +#: /home/ruben/Projects/Uranium/plugins/Tools/ScaleTool/ScaleTool.qml:67 +#: /home/ruben/Projects/Uranium/plugins/Tools/RotateTool/RotateTool.qml:21 +msgctxt "@action:button" +msgid "Reset" +msgstr "Restablecer" + +#: /home/ruben/Projects/Uranium/UM/ConfigurationErrorMessage.py:44 +#, python-brace-format +msgctxt "@info:status" +msgid "" +"Your configuration seems to be corrupt. Something seems to be wrong with the following profiles:\n" +"- {profiles}\n" +" Would you like to reset to factory defaults? Reset will remove all your current printers and profiles." +msgstr "" +"Parece que la configuración está dañada. Se ha producido un error en los siguientes perfiles:\n" +"- {profiles}\n" +" ¿Desea restablecer los valores predeterminados de fábrica? Si los restablece se borrarán sus impresoras y perfiles actuales." + +#: /home/ruben/Projects/Uranium/UM/ConfigurationErrorMessage.py:49 +msgctxt "@title:window" +msgid "Reset to factory" +msgstr "Restablecer los valores fabrica" + +#: /home/ruben/Projects/Uranium/UM/ConfigurationErrorMessage.py:51 +msgctxt "@label" +msgid "Reset will remove all your current printers and profiles! Are you sure you want to reset?" +msgstr "Si los restablece se borrarán sus impresoras y perfiles actuales. ¿Seguro que desea restablecerlos?" + +#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:162 #, python-brace-format msgctxt "@info" msgid "Would you like to reload {filename}?" msgstr "¿Desea volver a cargar {filename}?" -#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:154 +#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:163 msgctxt "@info:title" msgid "File has been modified" -msgstr "Se ha modificado el archivo." +msgstr "Se ha modificado el archivo" -#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:155 +#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:164 msgctxt "@action:button" msgid "Reload" msgstr "Volver a cargar" -#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:155 +#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:164 msgctxt "@action:description" msgid "This will trigger the modified files to reload from disk." msgstr "Los archivos modificados volverán a cargarse desde el disco." -#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:32 +#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:36 #, python-brace-format msgctxt "@info:status Don't translate the XML tag !" msgid "Cannot open files of the type of {0}" -msgstr "No se pueden abrir archivos tipo {0}." +msgstr "No se pueden abrir archivos tipo {0}" -#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:32 -#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:47 -#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:70 +#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:36 +#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:51 +#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:74 msgctxt "@info:title" msgid "Invalid File" msgstr "Archivo no válido" -#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:45 -#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:70 +#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:49 +#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:74 #, python-brace-format msgctxt "@info:status Don't translate the XML tag !" msgid "Failed to load {0}" msgstr "Error al cargar {0}" -#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:54 +#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:59 msgctxt "@info:title" msgid "Loading" msgstr "Cargando" -#: /home/ruben/Projects/Uranium/plugins/Tools/ScaleTool/ScaleTool.qml:60 -#: /home/ruben/Projects/Uranium/plugins/Tools/RotateTool/RotateTool.qml:21 -msgctxt "@action:button" -msgid "Reset" -msgstr "Restablecer" - -#: /home/ruben/Projects/Uranium/plugins/Tools/ScaleTool/ScaleTool.qml:86 +#: /home/ruben/Projects/Uranium/plugins/Tools/ScaleTool/ScaleTool.qml:93 msgctxt "@option:check" msgid "Snap Scaling" msgstr "Ajustar escala" -#: /home/ruben/Projects/Uranium/plugins/Tools/ScaleTool/ScaleTool.qml:104 +#: /home/ruben/Projects/Uranium/plugins/Tools/ScaleTool/ScaleTool.qml:121 msgctxt "@option:check" msgid "Uniform Scaling" msgstr "Escala uniforme" -#: /home/ruben/Projects/Uranium/plugins/Tools/TranslateTool/TranslateTool.qml:177 +#: /home/ruben/Projects/Uranium/plugins/Tools/TranslateTool/TranslateTool.qml:196 msgctxt "@option:check" msgid "Lock Model" -msgstr "Modelo Bloquear" +msgstr "Bloquear Modelo" #: /home/ruben/Projects/Uranium/plugins/Tools/RotateTool/RotateTool.qml:39 msgctxt "@action:button" msgid "Lay flat" msgstr "Aplanar" -#: /home/ruben/Projects/Uranium/plugins/Tools/RotateTool/RotateTool.qml:55 +#: /home/ruben/Projects/Uranium/plugins/Tools/RotateTool/RotateTool.qml:60 +msgctxt "@action:button" +msgid "Select face to align to the build plate" +msgstr "Seleccione la cara del modelo que desea alinear con la placa de impresión" + +#: /home/ruben/Projects/Uranium/plugins/Tools/RotateTool/RotateTool.qml:81 msgctxt "@action:checkbox" msgid "Snap Rotation" msgstr "Ajustar rotación" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:19 -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:148 -msgctxt "@title:tab" -msgid "Plugins" -msgstr "Complementos" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:28 -msgctxt "@action:button" -msgid "Install new plugin" -msgstr "Instalar nuevo complemento" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:51 -msgctxt "@label" -msgid "You will need to restart the application before changes in plugins have effect." -msgstr "Tendrá que reiniciar la aplicación para que los cambios de los complementos tengan efecto." - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:87 -msgctxt "@label" -msgid "This plugin is required for the application to run." -msgstr "Este complemento es necesario para que se ejecute la aplicación." - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:104 -msgctxt "@label" -msgid "Info..." -msgstr "Información..." - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:122 -msgctxt "@window:title" -msgid "Install Plugin" -msgstr "Instalar complemento" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:131 -msgctxt "@title:window" -msgid "Open file(s)" -msgstr "Abrir archivo(s)" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:165 -msgctxt "@label" -msgid "No text available" -msgstr "No hay texto disponible" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:171 -msgctxt "@title:window" -msgid "About %1" -msgstr "Alrededor de %1" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:203 -msgctxt "@label" -msgid "Author:" -msgstr "Autor:" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:225 -msgctxt "@label" -msgid "Version:" -msgstr "Versión:" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:243 -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:113 -msgctxt "@action:button" -msgid "Close" -msgstr "Cerrar" - #: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:18 msgctxt "@title:window" msgid "Preferences" msgstr "Preferencias" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:106 +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:107 msgctxt "@action:button" msgid "Defaults" msgstr "Valores predeterminados" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:146 +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:115 +msgctxt "@action:button" +msgid "Close" +msgstr "Cerrar" + +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:148 msgctxt "@title:tab" msgid "General" msgstr "General" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:147 +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:149 msgctxt "@title:tab" msgid "Settings" msgstr "Ajustes" @@ -554,44 +588,34 @@ msgid "Rename" msgstr "Cambiar nombre" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/RenameDialog.qml:56 +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/RenameDialog.qml:20 +msgctxt "@info" +msgid "Please provide a new name." +msgstr "Introduzca otro nombre." + +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/RenameDialog.qml:70 #: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Wizard.qml:241 msgctxt "@action:button" msgid "Cancel" msgstr "Cancelar" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/RenameDialog.qml:60 +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/RenameDialog.qml:75 msgctxt "@action:button" msgid "OK" msgstr "Aceptar" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/SettingVisibilityItem.qml:34 +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/SettingVisibilityItem.qml:32 msgctxt "@item:tooltip" msgid "This setting has been hidden by the active machine and will not be visible." msgstr "La máquina activa ha ocultado este ajuste y no se verá." -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/SettingVisibilityItem.qml:51 +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/SettingVisibilityItem.qml:49 msgctxt "@item:tooltip %1 is list of setting names" msgid "This setting has been hidden by the value of %1. Change the value of that setting to make this setting visible." msgid_plural "This setting has been hidden by the values of %1. Change the values of those settings to make this setting visible." msgstr[0] "El valor de %1 ha ocultado este ajuste. Cambie el valor para que se muestre el ajuste." msgstr[1] "Los valores de %1 han ocultado este ajuste. Cambie los valores para que muestre el ajuste." -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/SettingVisibilityPage.qml:12 -msgctxt "@title:tab" -msgid "Setting Visibility" -msgstr "Visibilidad de los ajustes" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/SettingVisibilityPage.qml:42 -msgctxt "@label:textbox" -msgid "Check all" -msgstr "Comprobar todo" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/SettingVisibilityPage.qml:89 -msgctxt "@label:textbox" -msgid "Filter..." -msgstr "Filtrar..." - #: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/MachinesPage.qml:12 msgctxt "@title:tab" msgid "Printers" @@ -612,86 +636,6 @@ msgid "Are you sure you wish to remove %1? This cannot be undone!" msgstr "¿Seguro que desea eliminar %1? ¡Esta acción no se puede deshacer!" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:14 -msgctxt "@title:tab" -msgid "Profiles" -msgstr "Perfiles" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:15 -msgctxt "@label" -msgid "Duplicate" -msgstr "Duplicado" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:45 -msgctxt "@label %1 is printer name" -msgid "Printer: %1" -msgstr "Impresora: %1" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:83 -msgctxt "@action:button" -msgid "Update \"%1\"" -msgstr "Actualizar \"%1\"" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:84 -msgctxt "@action:button" -msgid "Update profile" -msgstr "Actualizar perfil" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:92 -msgctxt "@action:button" -msgid "Discard current changes" -msgstr "Descartar cambios actuales" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:93 -msgctxt "@action:button" -msgid "Reload profile" -msgstr "Volver a cargar perfil" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:107 -msgctxt "@label" -msgid "Based on" -msgstr "Basado en" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:107 -msgctxt "@label" -msgid "Profile type" -msgstr "Tipo de perfil" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:112 -msgctxt "@label" -msgid "Protected profile" -msgstr "Perfil protegido" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:112 -msgctxt "@label" -msgid "Custom profile" -msgstr "Perfil personalizado" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:139 -msgctxt "@action:button" -msgid "Import" -msgstr "Importar" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:146 -msgctxt "@action:button" -msgid "Export" -msgstr "Exportar" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:184 -msgctxt "@window:title" -msgid "Import Profile" -msgstr "Importar perfil" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:192 -msgctxt "@title:window" -msgid "Import Profile" -msgstr "Importar perfil" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:219 -msgctxt "@title:window" -msgid "Export Profile" -msgstr "Exportar perfil" - #: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Wizard.qml:215 msgctxt "@action:button" msgid "Back" @@ -907,6 +851,186 @@ msgid "Mirror Tool" msgstr "Herramienta Espejo" +#~ msgctxt "@title:tab" +#~ msgid "Plugins" +#~ msgstr "Complementos" + +#~ msgctxt "@action:button" +#~ msgid "Install new plugin" +#~ msgstr "Instalar nuevo complemento" + +#~ msgctxt "@label" +#~ msgid "You will need to restart the application before changes in plugins have effect." +#~ msgstr "Tendrá que reiniciar la aplicación para que los cambios de los complementos tengan efecto." + +#~ msgctxt "@label" +#~ msgid "This plugin is required for the application to run." +#~ msgstr "Este complemento es necesario para que se ejecute la aplicación." + +#~ msgctxt "@label" +#~ msgid "Info..." +#~ msgstr "Información..." + +#~ msgctxt "@window:title" +#~ msgid "Install Plugin" +#~ msgstr "Instalar complemento" + +#~ msgctxt "@title:window" +#~ msgid "Open file(s)" +#~ msgstr "Abrir archivo(s)" + +#~ msgctxt "@label" +#~ msgid "No text available" +#~ msgstr "No hay texto disponible" + +#~ msgctxt "@title:window" +#~ msgid "About %1" +#~ msgstr "Alrededor de %1" + +#~ msgctxt "@label" +#~ msgid "Author:" +#~ msgstr "Autor:" + +#~ msgctxt "@label" +#~ msgid "Version:" +#~ msgstr "Versión:" + +#~ msgctxt "@action:button" +#~ msgid "Learn more about the new features" +#~ msgstr "Obtenga más información sobre las nuevas características" + +#~ msgctxt "@info:status" +#~ msgid "Cura {0} is available!" +#~ msgstr "Cura {0} está disponible." + +#~ msgctxt "@info:status" +#~ msgid "Cura {0} provides better and reliable printing experience." +#~ msgstr "Cura {0} proporciona una experiencia de impresión mejor y más fiable." + +#~ msgctxt "@action:button" +#~ msgid "Learn more about new features" +#~ msgstr "Obtenga más información sobre las nuevas características" + +#~ msgctxt "@error:update" +#~ msgid "" +#~ "There was an error uninstalling the package {package} before installingnew version:\n" +#~ "{error}.\n" +#~ "Please try to upgrade again later." +#~ msgstr "" +#~ "Se ha producido un error al desinstalar el paquete {package} antes de instalar la nueva versión:\n" +#~ "{error}.\n" +#~ "Vuelva a intentar actualizar más tarde." + +#~ msgctxt "@info:status" +#~ msgid "" +#~ "Your configuration seems to be corrupt. Something seems to be wrong with the following profiles:\n" +#~ "- {profiles}\n" +#~ "Would you like to reset to factory defaults? Reset will remove all your current printers and profiles." +#~ msgstr "" +#~ "Parece que la configuración está dañada. Se ha producido un error en los siguientes perfiles:\n" +#~ "- {profiles}\n" +#~ "¿Desea restablecer los valores predeterminados de fábrica? Si los restablece se borrarán sus impresoras y perfiles actuales." + +#~ msgctxt "@info" +#~ msgid "A new version is available!" +#~ msgstr "¡Nueva versión disponible!" + +#~ msgctxt "@info:status" +#~ msgid "" +#~ "Failed to install plugin from {0}:\n" +#~ "{1}" +#~ msgstr "" +#~ "No se ha podido instalar el complemento desde {0}:\n" +#~ "{1}" + +#~ msgctxt "@info:status" +#~ msgid "" +#~ "Failed to install the plugin;\n" +#~ "{0}" +#~ msgstr "" +#~ "Se ha producido un error al instalar el complemento;\n" +#~ "{0}" + +#~ msgctxt "@info:status" +#~ msgid "Failed to uninstall plugin. Plugin will be removed after {0} restarts." +#~ msgstr "Error al instalar el complemento. El complemento se eliminará tras {0} reintentos." + +#~ msgctxt "@title:tab" +#~ msgid "Setting Visibility" +#~ msgstr "Visibilidad de los ajustes" + +#~ msgctxt "@label:textbox" +#~ msgid "Check all" +#~ msgstr "Comprobar todo" + +#~ msgctxt "@label:textbox" +#~ msgid "Filter..." +#~ msgstr "Filtrar..." + +#~ msgctxt "@title:tab" +#~ msgid "Profiles" +#~ msgstr "Perfiles" + +#~ msgctxt "@label" +#~ msgid "Duplicate" +#~ msgstr "Duplicado" + +#~ msgctxt "@label %1 is printer name" +#~ msgid "Printer: %1" +#~ msgstr "Impresora: %1" + +#~ msgctxt "@action:button" +#~ msgid "Update \"%1\"" +#~ msgstr "Actualizar \"%1\"" + +#~ msgctxt "@action:button" +#~ msgid "Update profile" +#~ msgstr "Actualizar perfil" + +#~ msgctxt "@action:button" +#~ msgid "Discard current changes" +#~ msgstr "Descartar cambios actuales" + +#~ msgctxt "@action:button" +#~ msgid "Reload profile" +#~ msgstr "Volver a cargar perfil" + +#~ msgctxt "@label" +#~ msgid "Based on" +#~ msgstr "Basado en" + +#~ msgctxt "@label" +#~ msgid "Profile type" +#~ msgstr "Tipo de perfil" + +#~ msgctxt "@label" +#~ msgid "Protected profile" +#~ msgstr "Perfil protegido" + +#~ msgctxt "@label" +#~ msgid "Custom profile" +#~ msgstr "Perfil personalizado" + +#~ msgctxt "@action:button" +#~ msgid "Import" +#~ msgstr "Importar" + +#~ msgctxt "@action:button" +#~ msgid "Export" +#~ msgstr "Exportar" + +#~ msgctxt "@window:title" +#~ msgid "Import Profile" +#~ msgstr "Importar perfil" + +#~ msgctxt "@title:window" +#~ msgid "Import Profile" +#~ msgstr "Importar perfil" + +#~ msgctxt "@title:window" +#~ msgid "Export Profile" +#~ msgstr "Exportar perfil" + #~ msgctxt "@info" #~ msgid "An exception occurred while checking for updates." #~ msgstr "Se ha producido una excepción mientras se comprobaban las actualizaciones." diff -Nru uranium-3.3.0/resources/i18n/fi_FI/uranium.po uranium-4.4.1/resources/i18n/fi_FI/uranium.po --- uranium-3.3.0/resources/i18n/fi_FI/uranium.po 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/resources/i18n/fi_FI/uranium.po 2019-11-19 10:50:46.000000000 +0000 @@ -1,13 +1,13 @@ # Uranium -# Copyright (C) 2017 Ultimaker +# Copyright (C) 2019 Ultimaker B.V. # This file is distributed under the same license as the Uranium package. -# Ruben Dulek , 2017. +# Ruben Dulek , 2019. # msgid "" msgstr "" -"Project-Id-Version: Uranium 3.0\n" +"Project-Id-Version: Uranium 4.4\n" "Report-Msgid-Bugs-To: r.dulek@ultimaker.com\n" -"POT-Creation-Date: 2018-03-29 08:36+0200\n" +"POT-Creation-Date: 2019-11-05 13:40+0100\n" "PO-Revision-Date: 2017-09-27 12:27+0200\n" "Last-Translator: Bothof \n" "Language-Team: Finnish \n" @@ -33,6 +33,17 @@ msgid "Wavefront OBJ File" msgstr "Wavefront OBJ -tiedosto" +#: /home/ruben/Projects/Uranium/plugins/FileHandlers/OBJWriter/OBJWriter.py:23 +msgctxt "@error:not supported" +msgid "OBJWriter does not support non-text mode." +msgstr "" + +#: /home/ruben/Projects/Uranium/plugins/FileHandlers/OBJWriter/OBJWriter.py:30 +#: /home/ruben/Projects/Uranium/plugins/FileHandlers/STLWriter/STLWriter.py:27 +msgctxt "@error:no mesh" +msgid "There is no mesh to write." +msgstr "" + #: /home/ruben/Projects/Uranium/plugins/FileHandlers/STLWriter/__init__.py:17 msgctxt "@item:inlistbox" msgid "STL File (ASCII)" @@ -43,80 +54,101 @@ msgid "STL File (Binary)" msgstr "STL-tiedosto (binaari)" -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:42 +#: /home/ruben/Projects/Uranium/plugins/FileHandlers/STLWriter/STLWriter.py:36 +msgctxt "@error:not supported" +msgid "Unsupported output mode writing STL to stream." +msgstr "" + +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:50 msgctxt "@info" msgid "Could not access update information." msgstr "Päivitystietoja ei löytynyt." -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:43 -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:60 -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:71 -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:89 -#: /home/ruben/Projects/Uranium/UM/VersionUpgradeManager.py:123 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:51 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:68 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:97 +#: /home/ruben/Projects/Uranium/UM/VersionUpgradeManager.py:155 msgctxt "@info:title" msgid "Version Upgrade" msgstr "Versiopäivitys" -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:55 -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:60 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:63 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:68 msgctxt "@info" msgid "The version you are using does not support checking for updates." msgstr "Käyttämäsi versio ei tue päivitysten tarkistusta." -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:55 -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:178 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:63 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:188 msgctxt "@info:title" msgid "Warning" msgstr "Varoitus" -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:71 -msgctxt "@info" -msgid "A new version is available!" -msgstr "Uusi versio on saatavilla!" - -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:72 -msgctxt "@action:button" -msgid "Download" -msgstr "Lataa" - -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:85 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:93 msgctxt "@info" msgid "An error occurred while checking for updates." msgstr "" -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:85 -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:185 -#: /home/ruben/Projects/Uranium/UM/Qt/Bindings/OutputDeviceManagerProxy.py:128 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:93 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:195 +#: /home/ruben/Projects/Uranium/UM/Qt/Bindings/OutputDeviceManagerProxy.py:141 msgctxt "@info:title" msgid "Error" msgstr "Virhe" -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:89 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:97 msgctxt "@info" msgid "No new version was found." msgstr "Uutta versiota ei löytynyt." +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:102 +#, python-brace-format +msgctxt "@info:status" +msgid "{application_name} {version_number} is available!" +msgstr "" + +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:104 +#, python-brace-format +msgctxt "@info:status" +msgid "{application_name} {version_number} provides a better and more reliable printing experience." +msgstr "" + +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:107 +msgctxt "@action:button" +msgid "Download" +msgstr "Lataa" + +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:109 +msgctxt "@action:button" +msgid "Learn more" +msgstr "" + #: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateChecker.py:26 msgctxt "@item:inmenu" +msgid "Update Checker" +msgstr "" + +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateChecker.py:27 +msgctxt "@item:inmenu" msgid "Check for Updates" msgstr "Tarkista päivitykset" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:33 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:30 msgctxt "@item:inmenu" msgid "Local File" msgstr "Paikallinen tiedosto" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:34 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:31 msgctxt "@action:button Preceded by 'Ready to'." msgid "Save to File" msgstr "Tallenna tiedostoon" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:35 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:32 msgctxt "@info:tooltip" msgid "Save to File" msgstr "Tallenna tiedostoon" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:56 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:53 msgctxt "@title:window" msgid "Save to File" msgstr "Tallenna tiedostoon" @@ -126,63 +158,63 @@ msgid "There are no file types available to write with!" msgstr "Käytettävissä ei ole tiedostotyyppejä, joilla voidaan kirjoittaa!" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:121 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:130 msgctxt "@title:window" msgid "File Already Exists" msgstr "Tiedosto on jo olemassa" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:121 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:130 #, python-brace-format msgctxt "@label Don't translate the XML tag !" msgid "The file {0} already exists. Are you sure you want to overwrite it?" msgstr "Tiedosto {0} on jo olemassa. Haluatko varmasti kirjoittaa sen päälle?" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:150 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:160 #, python-brace-format msgctxt "@info:progress Don't translate the XML tags !" msgid "Saving to {0}" msgstr "Tallennetaan tiedostoon {0}" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:151 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:161 msgctxt "@info:title" msgid "Saving" msgstr "Tallennetaan" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:159 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:169 #, python-brace-format msgctxt "@info:status Don't translate the XML tags !" msgid "Permission denied when trying to save {0}" msgstr "Lupa evätty yritettäessä tallentaa tiedostoon {0}" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:162 -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:178 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:172 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:188 #, python-brace-format msgctxt "@info:status Don't translate the XML tags or !" msgid "Could not save to {0}: {1}" msgstr "Ei voitu tallentaa tiedostoon {0}: {1}" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:172 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:182 #, python-brace-format msgctxt "@info:status Don't translate the XML tags !" msgid "Saved to {0}" msgstr "Tallennettu tiedostoon {0}" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:172 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:182 msgctxt "@info:title" msgid "File Saved" msgstr "Tiedosto tallennettu" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:173 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:183 msgctxt "@action:button" msgid "Open Folder" msgstr "Avaa kansio" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:173 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:183 msgctxt "@info:tooltip" msgid "Open the folder containing the file" msgstr "Avaa tiedoston sisältävän kansion" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:185 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:195 #, python-brace-format msgctxt "@info:status" msgid "Something went wrong saving to {0}: {1}" @@ -218,6 +250,16 @@ msgid "Rotate Model" msgstr "Pyöritä mallia" +#: /home/ruben/Projects/Uranium/plugins/Tools/RotateTool/RotateTool.py:279 +msgctxt "@label" +msgid "Laying object flat on buildplate..." +msgstr "" + +#: /home/ruben/Projects/Uranium/plugins/Tools/RotateTool/RotateTool.py:279 +msgctxt "@title" +msgid "Object Rotation" +msgstr "" + #: /home/ruben/Projects/Uranium/plugins/Tools/MirrorTool/__init__.py:12 msgctxt "@label" msgid "Mirror" @@ -238,11 +280,13 @@ msgstr "" #: /home/ruben/Projects/Uranium/UM/__init__.py:16 +#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:175 msgctxt "@info:status" msgid "Your configuration seems to be corrupt." msgstr "" #: /home/ruben/Projects/Uranium/UM/__init__.py:17 +#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:177 msgctxt "@info:title" msgid "Configuration errors" msgstr "" @@ -252,36 +296,61 @@ msgid "Reset your configuration to factory defaults." msgstr "" -#: /home/ruben/Projects/Uranium/UM/Settings/Models/InstanceContainersModel.py:189 -#: /home/ruben/Projects/Uranium/UM/Qt/Bindings/MeshFileHandlerProxy.py:48 -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:655 -#: /home/ruben/Projects/Uranium/UM/FileHandler/FileHandler.py:70 +#: /home/ruben/Projects/Uranium/UM/Settings/Models/InstanceContainersModel.py:181 +#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:708 +#: /home/ruben/Projects/Uranium/UM/FileHandler/FileHandler.py:56 #, python-brace-format msgctxt "@item:inlistbox" msgid "All Supported Types ({0})" msgstr "Kaikki tuetut tyypit ({0})" -#: /home/ruben/Projects/Uranium/UM/Settings/Models/InstanceContainersModel.py:192 -#: /home/ruben/Projects/Uranium/UM/Qt/Bindings/MeshFileHandlerProxy.py:49 -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:656 -#: /home/ruben/Projects/Uranium/UM/FileHandler/FileHandler.py:71 +#: /home/ruben/Projects/Uranium/UM/Settings/Models/InstanceContainersModel.py:184 +#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:709 +#: /home/ruben/Projects/Uranium/UM/FileHandler/FileHandler.py:57 msgctxt "@item:inlistbox" msgid "All Files (*)" msgstr "Kaikki tiedostot (*)" -#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:108 +#: /home/ruben/Projects/Uranium/UM/PackageManager.py:233 +#, python-brace-format +msgctxt "@error:uninstall" +msgid "" +"There were some errors uninstalling the following packages:\n" +"{packages}" +msgstr "" + +#: /home/ruben/Projects/Uranium/UM/PackageManager.py:235 +msgctxt "@info:title" +msgid "Uninstalling errors" +msgstr "" + +#: /home/ruben/Projects/Uranium/UM/PackageManager.py:454 +#, python-brace-format +msgctxt "@error:update" +msgid "" +"There was an error uninstalling the package {package} before installing new version:\n" +"{error}.\n" +"Please try to upgrade again later." +msgstr "" + +#: /home/ruben/Projects/Uranium/UM/PackageManager.py:457 +msgctxt "@info:title" +msgid "Updating error" +msgstr "" + +#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:112 #, python-brace-format msgctxt "@label Short days-hours-minutes format. {0} is days, {1} is hours, {2} is minutes" msgid "{0:0>2}d {1:0>2}h {2:0>2}min" msgstr "{0:0>2} p {1:0>2} h {2:0>2} min" -#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:110 +#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:114 #, python-brace-format msgctxt "@label Short hours-minutes format. {0} is hours, {1} is minutes" msgid "{0:0>2}h {1:0>2}min" msgstr "{0:0>2} h {1:0>2} min" -#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:113 +#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:117 #, python-brace-format msgctxt "@label Long duration format. {0} is days" msgid "{0} day" @@ -289,8 +358,8 @@ msgstr[0] "{0} päivä" msgstr[1] "{0} päivää" -#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:113 -#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:115 +#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:117 +#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:119 #, python-brace-format msgctxt "@label Long duration format. {0} is hours" msgid "{0} hour" @@ -298,9 +367,9 @@ msgstr[0] "{0} tunti" msgstr[1] "{0} tuntia" -#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:113 -#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:115 #: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:117 +#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:119 +#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:121 #, python-brace-format msgctxt "@label Long duration format. {0} is minutes" msgid "{0} minute" @@ -308,33 +377,38 @@ msgstr[0] "{0} minuutti" msgstr[1] "{0} minuuttia" -#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:112 +#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:159 +msgctxt "@info:progress" +msgid "Initializing package manager..." +msgstr "" + +#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:180 msgctxt "@info:progress" msgid "Loading plugins..." msgstr "Ladataan lisäosia..." -#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:119 +#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:187 msgctxt "@info:progress" msgid "Updating configuration..." msgstr "Päivitetään määrityksiä..." -#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:136 +#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:205 msgctxt "@info:progress" msgid "Loading preferences..." msgstr "Ladataan lisäasetuksia..." -#: /home/ruben/Projects/Uranium/UM/Mesh/ReadMeshJob.py:65 +#: /home/ruben/Projects/Uranium/UM/Mesh/ReadMeshJob.py:68 #, python-format, python-brace-format msgctxt "@info:status" msgid "Auto scaled object to {0}% of original size" msgstr "Kappale skaalattu automaattisesti {0} %:iin alkuperäisestä koosta" -#: /home/ruben/Projects/Uranium/UM/Mesh/ReadMeshJob.py:65 +#: /home/ruben/Projects/Uranium/UM/Mesh/ReadMeshJob.py:68 msgctxt "@info:title" msgid "Scaling Object" msgstr "Skaalataan kappaletta" -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:220 +#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:277 msgctxt "@info:status" msgid "" "The plugin has been installed.\n" @@ -343,29 +417,7 @@ "Laajennus on asennettu.\n" "Ota laajennus käyttöön käynnistämällä sovellus uudelleen." -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:231 -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:270 -#, python-brace-format -msgctxt "@info:status" -msgid "" -"Failed to install plugin from {0}:\n" -"{1}" -msgstr "" -"Laajennuksen asennus kohteesta {0} epäonnistui:\n" -"{1}" - -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:254 -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:259 -#, python-brace-format -msgctxt "@info:status" -msgid "" -"Failed to install the plugin;\n" -"{0}" -msgstr "" -"Laajennuksen asennus epäonnistui;\n" -"{0}" - -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:421 +#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:415 #, python-brace-format msgctxt "@info:status" msgid "" @@ -373,91 +425,106 @@ "Please restart {0} to finish uninstall." msgstr "" -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:433 -#, python-brace-format -msgctxt "@info:status" -msgid "Failed to uninstall plugin. Plugin will be removed after {0} restarts." -msgstr "" - -#: /home/ruben/Projects/Uranium/UM/VersionUpgradeManager.py:123 +#: /home/ruben/Projects/Uranium/UM/VersionUpgradeManager.py:155 #, python-brace-format msgctxt "@info:version-upgrade" msgid "A configuration from an older version of {0} was imported." msgstr "Aikaisemman {0} -version määritykset tuotiin." -#: /home/ruben/Projects/Uranium/UM/View/GL/OpenGL.py:50 +#: /home/ruben/Projects/Uranium/UM/View/GL/OpenGL.py:58 +#: /home/ruben/Projects/Uranium/UM/View/GL/OpenGL.py:63 msgctxt "@message" msgid "Failed to Initialize OpenGL" msgstr "OpenGL:n alustus epäonnistui" -#: /home/ruben/Projects/Uranium/UM/View/GL/OpenGL.py:60 +#: /home/ruben/Projects/Uranium/UM/View/GL/OpenGL.py:73 msgctxt "Critical OpenGL Extensions Missing" msgid "Critical OpenGL extensions are missing. This program requires support for Framebuffer Objects. Please check your video card drivers." msgstr "Kriittisiä OpenGL-lisäosia puuttuu. Tämä ohjelma vaatii tuen Framebuffer-objekteille. Tarkista näytönohjaimen ajurit." -#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:153 +#: /home/ruben/Projects/Uranium/UM/ConfigurationErrorMessage.py:32 +#: /home/ruben/Projects/Uranium/plugins/Tools/ScaleTool/ScaleTool.qml:67 +#: /home/ruben/Projects/Uranium/plugins/Tools/RotateTool/RotateTool.qml:21 +msgctxt "@action:button" +msgid "Reset" +msgstr "Palauta" + +#: /home/ruben/Projects/Uranium/UM/ConfigurationErrorMessage.py:44 +#, python-brace-format +msgctxt "@info:status" +msgid "" +"Your configuration seems to be corrupt. Something seems to be wrong with the following profiles:\n" +"- {profiles}\n" +" Would you like to reset to factory defaults? Reset will remove all your current printers and profiles." +msgstr "" + +#: /home/ruben/Projects/Uranium/UM/ConfigurationErrorMessage.py:49 +msgctxt "@title:window" +msgid "Reset to factory" +msgstr "" + +#: /home/ruben/Projects/Uranium/UM/ConfigurationErrorMessage.py:51 +msgctxt "@label" +msgid "Reset will remove all your current printers and profiles! Are you sure you want to reset?" +msgstr "" + +#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:162 #, python-brace-format msgctxt "@info" msgid "Would you like to reload {filename}?" msgstr "" -#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:154 +#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:163 msgctxt "@info:title" msgid "File has been modified" msgstr "" -#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:155 +#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:164 msgctxt "@action:button" msgid "Reload" msgstr "" -#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:155 +#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:164 msgctxt "@action:description" msgid "This will trigger the modified files to reload from disk." msgstr "" -#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:32 +#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:36 #, python-brace-format msgctxt "@info:status Don't translate the XML tag !" msgid "Cannot open files of the type of {0}" msgstr "" -#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:32 -#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:47 -#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:70 +#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:36 +#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:51 +#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:74 msgctxt "@info:title" msgid "Invalid File" msgstr "Virheellinen tiedosto" -#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:45 -#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:70 +#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:49 +#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:74 #, python-brace-format msgctxt "@info:status Don't translate the XML tag !" msgid "Failed to load {0}" msgstr "Tiedoston {0} lataaminen epäonnistui" -#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:54 +#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:59 msgctxt "@info:title" msgid "Loading" msgstr "Ladataan" -#: /home/ruben/Projects/Uranium/plugins/Tools/ScaleTool/ScaleTool.qml:60 -#: /home/ruben/Projects/Uranium/plugins/Tools/RotateTool/RotateTool.qml:21 -msgctxt "@action:button" -msgid "Reset" -msgstr "Palauta" - -#: /home/ruben/Projects/Uranium/plugins/Tools/ScaleTool/ScaleTool.qml:86 +#: /home/ruben/Projects/Uranium/plugins/Tools/ScaleTool/ScaleTool.qml:93 msgctxt "@option:check" msgid "Snap Scaling" msgstr "Kohdista skaalaus" -#: /home/ruben/Projects/Uranium/plugins/Tools/ScaleTool/ScaleTool.qml:104 +#: /home/ruben/Projects/Uranium/plugins/Tools/ScaleTool/ScaleTool.qml:121 msgctxt "@option:check" msgid "Uniform Scaling" msgstr "Tasainen skaalaus" -#: /home/ruben/Projects/Uranium/plugins/Tools/TranslateTool/TranslateTool.qml:177 +#: /home/ruben/Projects/Uranium/plugins/Tools/TranslateTool/TranslateTool.qml:196 msgctxt "@option:check" msgid "Lock Model" msgstr "" @@ -467,89 +534,37 @@ msgid "Lay flat" msgstr "Aseta latteaksi" -#: /home/ruben/Projects/Uranium/plugins/Tools/RotateTool/RotateTool.qml:55 +#: /home/ruben/Projects/Uranium/plugins/Tools/RotateTool/RotateTool.qml:60 +msgctxt "@action:button" +msgid "Select face to align to the build plate" +msgstr "" + +#: /home/ruben/Projects/Uranium/plugins/Tools/RotateTool/RotateTool.qml:81 msgctxt "@action:checkbox" msgid "Snap Rotation" msgstr "Kohdista pyöritys" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:19 -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:148 -msgctxt "@title:tab" -msgid "Plugins" -msgstr "Lisäosat" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:28 -msgctxt "@action:button" -msgid "Install new plugin" -msgstr "Asenna uusi laajennus" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:51 -msgctxt "@label" -msgid "You will need to restart the application before changes in plugins have effect." -msgstr "Laajennusten muutokset eivät tule käyttöön ennen kuin olet käynnistänyt sovelluksen uudelleen." - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:87 -msgctxt "@label" -msgid "This plugin is required for the application to run." -msgstr "Sovellus ei toimi ilman tätä laajennusta." - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:104 -msgctxt "@label" -msgid "Info..." -msgstr "Tietoja..." - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:122 -msgctxt "@window:title" -msgid "Install Plugin" -msgstr "Asenna laajennus" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:131 -msgctxt "@title:window" -msgid "Open file(s)" -msgstr "Avaa tiedosto(t)" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:165 -msgctxt "@label" -msgid "No text available" -msgstr "Ei tekstiä saatavilla" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:171 -msgctxt "@title:window" -msgid "About %1" -msgstr "Tietoja: %1" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:203 -msgctxt "@label" -msgid "Author:" -msgstr "Tekijä:" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:225 -msgctxt "@label" -msgid "Version:" -msgstr "Versio:" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:243 -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:113 -msgctxt "@action:button" -msgid "Close" -msgstr "Sulje" - #: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:18 msgctxt "@title:window" msgid "Preferences" msgstr "Lisäasetukset" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:106 +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:107 msgctxt "@action:button" msgid "Defaults" msgstr "Oletusarvot" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:146 +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:115 +msgctxt "@action:button" +msgid "Close" +msgstr "Sulje" + +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:148 msgctxt "@title:tab" msgid "General" msgstr "Yleiset" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:147 +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:149 msgctxt "@title:tab" msgid "Settings" msgstr "Asetukset" @@ -559,44 +574,34 @@ msgid "Rename" msgstr "Nimeä uudelleen" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/RenameDialog.qml:56 +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/RenameDialog.qml:20 +msgctxt "@info" +msgid "Please provide a new name." +msgstr "" + +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/RenameDialog.qml:70 #: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Wizard.qml:241 msgctxt "@action:button" msgid "Cancel" msgstr "Peruuta" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/RenameDialog.qml:60 +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/RenameDialog.qml:75 msgctxt "@action:button" msgid "OK" msgstr "" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/SettingVisibilityItem.qml:34 +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/SettingVisibilityItem.qml:32 msgctxt "@item:tooltip" msgid "This setting has been hidden by the active machine and will not be visible." msgstr "Tämä asetus ei ole näkyvissä, koska aktiivinen laite on piilottanut sen." -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/SettingVisibilityItem.qml:51 +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/SettingVisibilityItem.qml:49 msgctxt "@item:tooltip %1 is list of setting names" msgid "This setting has been hidden by the value of %1. Change the value of that setting to make this setting visible." msgid_plural "This setting has been hidden by the values of %1. Change the values of those settings to make this setting visible." msgstr[0] "Tämä asetus on piilotettu asetuksella %1. Tuo asetus näkyviin muuttamalla kyseisen asetuksen arvoa." msgstr[1] "Tämä asetus on piilotettu asetuksilla %1. Tuo asetus näkyviin muuttamalla kyseisten asetusten arvoja." -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/SettingVisibilityPage.qml:12 -msgctxt "@title:tab" -msgid "Setting Visibility" -msgstr "Näkyvyyden asettaminen" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/SettingVisibilityPage.qml:42 -msgctxt "@label:textbox" -msgid "Check all" -msgstr "Tarkista kaikki" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/SettingVisibilityPage.qml:89 -msgctxt "@label:textbox" -msgid "Filter..." -msgstr "Suodatin..." - #: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/MachinesPage.qml:12 msgctxt "@title:tab" msgid "Printers" @@ -617,86 +622,6 @@ msgid "Are you sure you wish to remove %1? This cannot be undone!" msgstr "Haluatko varmasti poistaa kappaleen %1? Tätä ei voida kumota!" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:14 -msgctxt "@title:tab" -msgid "Profiles" -msgstr "Profiilit" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:15 -msgctxt "@label" -msgid "Duplicate" -msgstr "Monista" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:45 -msgctxt "@label %1 is printer name" -msgid "Printer: %1" -msgstr "Tulostin: %1" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:83 -msgctxt "@action:button" -msgid "Update \"%1\"" -msgstr "Päivitä \"%1\"" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:84 -msgctxt "@action:button" -msgid "Update profile" -msgstr "Päivitä profiili" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:92 -msgctxt "@action:button" -msgid "Discard current changes" -msgstr "Hylkää tehdyt muutokset" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:93 -msgctxt "@action:button" -msgid "Reload profile" -msgstr "Lataa profiili uudelleen" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:107 -msgctxt "@label" -msgid "Based on" -msgstr "Peruste:" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:107 -msgctxt "@label" -msgid "Profile type" -msgstr "Profiilin tyyppi" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:112 -msgctxt "@label" -msgid "Protected profile" -msgstr "Suojattu profiili" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:112 -msgctxt "@label" -msgid "Custom profile" -msgstr "Mukautettu profiili" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:139 -msgctxt "@action:button" -msgid "Import" -msgstr "Tuo" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:146 -msgctxt "@action:button" -msgid "Export" -msgstr "Vie" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:184 -msgctxt "@window:title" -msgid "Import Profile" -msgstr "Profiilin tuonti" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:192 -msgctxt "@title:window" -msgid "Import Profile" -msgstr "Profiilin tuonti" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:219 -msgctxt "@title:window" -msgid "Export Profile" -msgstr "Profiilin vienti" - #: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Wizard.qml:215 msgctxt "@action:button" msgid "Back" @@ -912,6 +837,146 @@ msgid "Mirror Tool" msgstr "Peilaustyökalu" +#~ msgctxt "@title:tab" +#~ msgid "Plugins" +#~ msgstr "Lisäosat" + +#~ msgctxt "@action:button" +#~ msgid "Install new plugin" +#~ msgstr "Asenna uusi laajennus" + +#~ msgctxt "@label" +#~ msgid "You will need to restart the application before changes in plugins have effect." +#~ msgstr "Laajennusten muutokset eivät tule käyttöön ennen kuin olet käynnistänyt sovelluksen uudelleen." + +#~ msgctxt "@label" +#~ msgid "This plugin is required for the application to run." +#~ msgstr "Sovellus ei toimi ilman tätä laajennusta." + +#~ msgctxt "@label" +#~ msgid "Info..." +#~ msgstr "Tietoja..." + +#~ msgctxt "@window:title" +#~ msgid "Install Plugin" +#~ msgstr "Asenna laajennus" + +#~ msgctxt "@title:window" +#~ msgid "Open file(s)" +#~ msgstr "Avaa tiedosto(t)" + +#~ msgctxt "@label" +#~ msgid "No text available" +#~ msgstr "Ei tekstiä saatavilla" + +#~ msgctxt "@title:window" +#~ msgid "About %1" +#~ msgstr "Tietoja: %1" + +#~ msgctxt "@label" +#~ msgid "Author:" +#~ msgstr "Tekijä:" + +#~ msgctxt "@label" +#~ msgid "Version:" +#~ msgstr "Versio:" + +#~ msgctxt "@info" +#~ msgid "A new version is available!" +#~ msgstr "Uusi versio on saatavilla!" + +#~ msgctxt "@info:status" +#~ msgid "" +#~ "Failed to install plugin from {0}:\n" +#~ "{1}" +#~ msgstr "" +#~ "Laajennuksen asennus kohteesta {0} epäonnistui:\n" +#~ "{1}" + +#~ msgctxt "@info:status" +#~ msgid "" +#~ "Failed to install the plugin;\n" +#~ "{0}" +#~ msgstr "" +#~ "Laajennuksen asennus epäonnistui;\n" +#~ "{0}" + +#~ msgctxt "@title:tab" +#~ msgid "Setting Visibility" +#~ msgstr "Näkyvyyden asettaminen" + +#~ msgctxt "@label:textbox" +#~ msgid "Check all" +#~ msgstr "Tarkista kaikki" + +#~ msgctxt "@label:textbox" +#~ msgid "Filter..." +#~ msgstr "Suodatin..." + +#~ msgctxt "@title:tab" +#~ msgid "Profiles" +#~ msgstr "Profiilit" + +#~ msgctxt "@label" +#~ msgid "Duplicate" +#~ msgstr "Monista" + +#~ msgctxt "@label %1 is printer name" +#~ msgid "Printer: %1" +#~ msgstr "Tulostin: %1" + +#~ msgctxt "@action:button" +#~ msgid "Update \"%1\"" +#~ msgstr "Päivitä \"%1\"" + +#~ msgctxt "@action:button" +#~ msgid "Update profile" +#~ msgstr "Päivitä profiili" + +#~ msgctxt "@action:button" +#~ msgid "Discard current changes" +#~ msgstr "Hylkää tehdyt muutokset" + +#~ msgctxt "@action:button" +#~ msgid "Reload profile" +#~ msgstr "Lataa profiili uudelleen" + +#~ msgctxt "@label" +#~ msgid "Based on" +#~ msgstr "Peruste:" + +#~ msgctxt "@label" +#~ msgid "Profile type" +#~ msgstr "Profiilin tyyppi" + +#~ msgctxt "@label" +#~ msgid "Protected profile" +#~ msgstr "Suojattu profiili" + +#~ msgctxt "@label" +#~ msgid "Custom profile" +#~ msgstr "Mukautettu profiili" + +#~ msgctxt "@action:button" +#~ msgid "Import" +#~ msgstr "Tuo" + +#~ msgctxt "@action:button" +#~ msgid "Export" +#~ msgstr "Vie" + +#~ msgctxt "@window:title" +#~ msgid "Import Profile" +#~ msgstr "Profiilin tuonti" + +#~ msgctxt "@title:window" +#~ msgid "Import Profile" +#~ msgstr "Profiilin tuonti" + +#~ msgctxt "@title:window" +#~ msgid "Export Profile" +#~ msgstr "Profiilin vienti" + #~ msgctxt "@info" #~ msgid "An exception occurred while checking for updates." #~ msgstr "Päivitysten tarkistuksen yhteydessä tapahtui poikkeus." diff -Nru uranium-3.3.0/resources/i18n/fr_FR/uranium.po uranium-4.4.1/resources/i18n/fr_FR/uranium.po --- uranium-3.3.0/resources/i18n/fr_FR/uranium.po 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/resources/i18n/fr_FR/uranium.po 2019-11-19 10:50:46.000000000 +0000 @@ -1,14 +1,14 @@ # Uranium -# Copyright (C) 2018 Ultimaker +# Copyright (C) 2019 Ultimaker B.V. # This file is distributed under the same license as the Uranium package. -# Ruben Dulek , 2018. +# Ruben Dulek , 2019. # msgid "" msgstr "" -"Project-Id-Version: Uranium 3.3\n" +"Project-Id-Version: Uranium 4.4\n" "Report-Msgid-Bugs-To: r.dulek@ultimaker.com\n" -"POT-Creation-Date: 2018-03-29 08:36+0200\n" -"PO-Revision-Date: 2018-04-11 15:55+0100\n" +"POT-Creation-Date: 2019-11-05 13:40+0100\n" +"PO-Revision-Date: 2018-11-06 15:44+0100\n" "Last-Translator: Bothof \n" "Language-Team: French \n" "Language: fr_FR\n" @@ -34,6 +34,17 @@ msgid "Wavefront OBJ File" msgstr "Fichier OBJ Wavefront" +#: /home/ruben/Projects/Uranium/plugins/FileHandlers/OBJWriter/OBJWriter.py:23 +msgctxt "@error:not supported" +msgid "OBJWriter does not support non-text mode." +msgstr "OBJWriter ne prend pas en charge le mode non-texte." + +#: /home/ruben/Projects/Uranium/plugins/FileHandlers/OBJWriter/OBJWriter.py:30 +#: /home/ruben/Projects/Uranium/plugins/FileHandlers/STLWriter/STLWriter.py:27 +msgctxt "@error:no mesh" +msgid "There is no mesh to write." +msgstr "Il n'y a pas de maillage à écrire." + #: /home/ruben/Projects/Uranium/plugins/FileHandlers/STLWriter/__init__.py:17 msgctxt "@item:inlistbox" msgid "STL File (ASCII)" @@ -44,80 +55,101 @@ msgid "STL File (Binary)" msgstr "Fichier STL (Binaire)" -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:42 +#: /home/ruben/Projects/Uranium/plugins/FileHandlers/STLWriter/STLWriter.py:36 +msgctxt "@error:not supported" +msgid "Unsupported output mode writing STL to stream." +msgstr "STL écrit en streaming par un mode de sortie non pris en charge." + +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:50 msgctxt "@info" msgid "Could not access update information." msgstr "Impossible d'accéder aux informations de mise à jour." -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:43 -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:60 -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:71 -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:89 -#: /home/ruben/Projects/Uranium/UM/VersionUpgradeManager.py:123 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:51 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:68 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:97 +#: /home/ruben/Projects/Uranium/UM/VersionUpgradeManager.py:155 msgctxt "@info:title" msgid "Version Upgrade" msgstr "Mise à niveau de version" -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:55 -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:60 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:63 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:68 msgctxt "@info" msgid "The version you are using does not support checking for updates." msgstr "La version que vous utilisez ne prend pas en charge la vérification des mises à jour." -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:55 -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:178 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:63 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:188 msgctxt "@info:title" msgid "Warning" msgstr "Avertissement" -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:71 -msgctxt "@info" -msgid "A new version is available!" -msgstr "Une nouvelle version est disponible !" - -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:72 -msgctxt "@action:button" -msgid "Download" -msgstr "Télécharger" - -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:85 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:93 msgctxt "@info" msgid "An error occurred while checking for updates." msgstr "Une erreur s'est produite lors de la recherche de mises à jour." -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:85 -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:185 -#: /home/ruben/Projects/Uranium/UM/Qt/Bindings/OutputDeviceManagerProxy.py:128 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:93 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:195 +#: /home/ruben/Projects/Uranium/UM/Qt/Bindings/OutputDeviceManagerProxy.py:141 msgctxt "@info:title" msgid "Error" msgstr "Erreur" -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:89 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:97 msgctxt "@info" msgid "No new version was found." msgstr "Aucune nouvelle version n'a été trouvée." +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:102 +#, python-brace-format +msgctxt "@info:status" +msgid "{application_name} {version_number} is available!" +msgstr "{application_name} {version_number} est disponible !" + +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:104 +#, python-brace-format +msgctxt "@info:status" +msgid "{application_name} {version_number} provides a better and more reliable printing experience." +msgstr "{application_name} {version_number} offre une expérience d'impression plus agréable et plus fiable." + +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:107 +msgctxt "@action:button" +msgid "Download" +msgstr "Télécharger" + +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:109 +msgctxt "@action:button" +msgid "Learn more" +msgstr "En savoir plus" + #: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateChecker.py:26 msgctxt "@item:inmenu" +msgid "Update Checker" +msgstr "Vérificateur des mises à jour" + +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateChecker.py:27 +msgctxt "@item:inmenu" msgid "Check for Updates" msgstr "Vérifier les mises à jour" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:33 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:30 msgctxt "@item:inmenu" msgid "Local File" msgstr "Fichier local" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:34 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:31 msgctxt "@action:button Preceded by 'Ready to'." msgid "Save to File" msgstr "Enregistrer sous Fichier" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:35 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:32 msgctxt "@info:tooltip" msgid "Save to File" msgstr "Enregistrer sous Fichier" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:56 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:53 msgctxt "@title:window" msgid "Save to File" msgstr "Enregistrer sous Fichier" @@ -127,63 +159,63 @@ msgid "There are no file types available to write with!" msgstr "Aucun type de fichier n'est disponible pour écriture !" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:121 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:130 msgctxt "@title:window" msgid "File Already Exists" msgstr "Le fichier existe déjà" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:121 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:130 #, python-brace-format msgctxt "@label Don't translate the XML tag !" msgid "The file {0} already exists. Are you sure you want to overwrite it?" msgstr "Le fichier {0} existe déjà. Êtes-vous sûr de vouloir le remplacer ?" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:150 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:160 #, python-brace-format msgctxt "@info:progress Don't translate the XML tags !" msgid "Saving to {0}" msgstr "Enregistrement vers {0}" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:151 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:161 msgctxt "@info:title" msgid "Saving" -msgstr "Enregistrement..." +msgstr "Enregistrement" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:159 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:169 #, python-brace-format msgctxt "@info:status Don't translate the XML tags !" msgid "Permission denied when trying to save {0}" msgstr "Permission refusée lors de la tentative d'enregistrement de {0}" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:162 -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:178 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:172 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:188 #, python-brace-format msgctxt "@info:status Don't translate the XML tags or !" msgid "Could not save to {0}: {1}" msgstr "Impossible d'enregistrer {0} : {1}" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:172 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:182 #, python-brace-format msgctxt "@info:status Don't translate the XML tags !" msgid "Saved to {0}" msgstr "Enregistré vers {0}" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:172 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:182 msgctxt "@info:title" msgid "File Saved" msgstr "Fichier enregistré" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:173 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:183 msgctxt "@action:button" msgid "Open Folder" msgstr "Ouvrir le dossier" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:173 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:183 msgctxt "@info:tooltip" msgid "Open the folder containing the file" msgstr "Ouvrir le dossier contenant le fichier" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:185 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:195 #, python-brace-format msgctxt "@info:status" msgid "Something went wrong saving to {0}: {1}" @@ -219,6 +251,16 @@ msgid "Rotate Model" msgstr "Pivoter le modèle" +#: /home/ruben/Projects/Uranium/plugins/Tools/RotateTool/RotateTool.py:279 +msgctxt "@label" +msgid "Laying object flat on buildplate..." +msgstr "Poser l'objet à plat sur la plaque de construction..." + +#: /home/ruben/Projects/Uranium/plugins/Tools/RotateTool/RotateTool.py:279 +msgctxt "@title" +msgid "Object Rotation" +msgstr "Rotation d'objet" + #: /home/ruben/Projects/Uranium/plugins/Tools/MirrorTool/__init__.py:12 msgctxt "@label" msgid "Mirror" @@ -236,14 +278,19 @@ "Your configuration seems to be corrupt. Something seems to be wrong with the following profiles:\n" "- {profiles}\n" "Would you like to reset to factory defaults?" -msgstr "Votre configuration semble corrompue. Il semble y avoir un problème avec les profils suivants :\n- {profiles}\nSouhaitez-vous rétablir les paramètres d'usine ?" +msgstr "" +"Votre configuration semble corrompue. Il semble y avoir un problème avec les profils suivants :\n" +"- {profiles}\n" +"Souhaitez-vous rétablir les paramètres d'usine?" #: /home/ruben/Projects/Uranium/UM/__init__.py:16 +#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:175 msgctxt "@info:status" msgid "Your configuration seems to be corrupt." msgstr "Votre configuration semble corrompue." #: /home/ruben/Projects/Uranium/UM/__init__.py:17 +#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:177 msgctxt "@info:title" msgid "Configuration errors" msgstr "Erreurs de configuration" @@ -253,36 +300,66 @@ msgid "Reset your configuration to factory defaults." msgstr "Réinitialiser votre configuration sur les valeurs d'usine." -#: /home/ruben/Projects/Uranium/UM/Settings/Models/InstanceContainersModel.py:189 -#: /home/ruben/Projects/Uranium/UM/Qt/Bindings/MeshFileHandlerProxy.py:48 -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:655 -#: /home/ruben/Projects/Uranium/UM/FileHandler/FileHandler.py:70 +#: /home/ruben/Projects/Uranium/UM/Settings/Models/InstanceContainersModel.py:181 +#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:708 +#: /home/ruben/Projects/Uranium/UM/FileHandler/FileHandler.py:56 #, python-brace-format msgctxt "@item:inlistbox" msgid "All Supported Types ({0})" msgstr "Tous les types supportés ({0})" -#: /home/ruben/Projects/Uranium/UM/Settings/Models/InstanceContainersModel.py:192 -#: /home/ruben/Projects/Uranium/UM/Qt/Bindings/MeshFileHandlerProxy.py:49 -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:656 -#: /home/ruben/Projects/Uranium/UM/FileHandler/FileHandler.py:71 +#: /home/ruben/Projects/Uranium/UM/Settings/Models/InstanceContainersModel.py:184 +#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:709 +#: /home/ruben/Projects/Uranium/UM/FileHandler/FileHandler.py:57 msgctxt "@item:inlistbox" msgid "All Files (*)" msgstr "Tous les fichiers (*)" -#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:108 +#: /home/ruben/Projects/Uranium/UM/PackageManager.py:233 +#, python-brace-format +msgctxt "@error:uninstall" +msgid "" +"There were some errors uninstalling the following packages:\n" +"{packages}" +msgstr "" +"Des erreurs se sont produites lors de la désinstallation des paquets suivants :\n" +"{packages}" + +#: /home/ruben/Projects/Uranium/UM/PackageManager.py:235 +msgctxt "@info:title" +msgid "Uninstalling errors" +msgstr "Erreurs de désinstallation" + +#: /home/ruben/Projects/Uranium/UM/PackageManager.py:454 +#, python-brace-format +msgctxt "@error:update" +msgid "" +"There was an error uninstalling the package {package} before installing new version:\n" +"{error}.\n" +"Please try to upgrade again later." +msgstr "" +"Il y a eu une erreur lors de la désinstallation du paquet {package} avant d'installer la nouvelle version :\n" +"{error}.\n" +"Veuillez réessayer la mise à jour plus tard." + +#: /home/ruben/Projects/Uranium/UM/PackageManager.py:457 +msgctxt "@info:title" +msgid "Updating error" +msgstr "Erreur de mise à jour" + +#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:112 #, python-brace-format msgctxt "@label Short days-hours-minutes format. {0} is days, {1} is hours, {2} is minutes" msgid "{0:0>2}d {1:0>2}h {2:0>2}min" msgstr "{0:0>2}j {1:0>2}h {2:0>2}min" -#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:110 +#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:114 #, python-brace-format msgctxt "@label Short hours-minutes format. {0} is hours, {1} is minutes" msgid "{0:0>2}h {1:0>2}min" msgstr "{0:0>2}h {1:0>2}min" -#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:113 +#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:117 #, python-brace-format msgctxt "@label Long duration format. {0} is days" msgid "{0} day" @@ -290,8 +367,8 @@ msgstr[0] "{0} jour" msgstr[1] "{0} jours" -#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:113 -#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:115 +#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:117 +#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:119 #, python-brace-format msgctxt "@label Long duration format. {0} is hours" msgid "{0} hour" @@ -299,9 +376,9 @@ msgstr[0] "{0} heure" msgstr[1] "{0} heures" -#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:113 -#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:115 #: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:117 +#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:119 +#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:121 #, python-brace-format msgctxt "@label Long duration format. {0} is minutes" msgid "{0} minute" @@ -309,150 +386,159 @@ msgstr[0] "{0} minute" msgstr[1] "{0} minutes" -#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:112 +#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:159 +msgctxt "@info:progress" +msgid "Initializing package manager..." +msgstr "Initialisation du gestionnaire de paquets..." + +#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:180 msgctxt "@info:progress" msgid "Loading plugins..." msgstr "Chargement des plug-ins..." -#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:119 +#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:187 msgctxt "@info:progress" msgid "Updating configuration..." msgstr "Mise à jour de la configuration..." -#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:136 +#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:205 msgctxt "@info:progress" msgid "Loading preferences..." msgstr "Chargement des préférences..." -#: /home/ruben/Projects/Uranium/UM/Mesh/ReadMeshJob.py:65 +#: /home/ruben/Projects/Uranium/UM/Mesh/ReadMeshJob.py:68 #, python-format, python-brace-format msgctxt "@info:status" msgid "Auto scaled object to {0}% of original size" msgstr "Mise à l'échelle automatique de l'objet à {0}% de sa taille d'origine" -#: /home/ruben/Projects/Uranium/UM/Mesh/ReadMeshJob.py:65 +#: /home/ruben/Projects/Uranium/UM/Mesh/ReadMeshJob.py:68 msgctxt "@info:title" msgid "Scaling Object" -msgstr "Mise à l'échelle de l'objet..." +msgstr "Mise à l'échelle de l'objet" -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:220 +#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:277 msgctxt "@info:status" msgid "" "The plugin has been installed.\n" "Please re-start the application to activate the plugin." -msgstr "Le plug-in a été installé.\nVeuillez redémarrer l'application pour activer le plug-in." - -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:231 -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:270 -#, python-brace-format -msgctxt "@info:status" -msgid "" -"Failed to install plugin from {0}:\n" -"{1}" -msgstr "Échec de l'installation du plug-in de {0} :\n{1}" - -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:254 -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:259 -#, python-brace-format -msgctxt "@info:status" -msgid "" -"Failed to install the plugin;\n" -"{0}" -msgstr "Échec de l'installation du plug-in;\n{0}" +msgstr "" +"Le plug-in a été installé.\n" +"Veuillez redémarrer l'application pour activer le plug-in." -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:421 +#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:415 #, python-brace-format msgctxt "@info:status" msgid "" "The plugin has been removed.\n" "Please restart {0} to finish uninstall." -msgstr "Le plug-in a été supprimé.\nVeuillez redémarrer {0} pour terminer la désinstallation." - -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:433 -#, python-brace-format -msgctxt "@info:status" -msgid "Failed to uninstall plugin. Plugin will be removed after {0} restarts." -msgstr "Échec de la désinstallation du plug-in. Le plug-in sera supprimé après le redémarrage de {0}." +msgstr "" +"Le plug-in a été supprimé.\n" +"Veuillez redémarrer {0} pour terminer la désinstallation." -#: /home/ruben/Projects/Uranium/UM/VersionUpgradeManager.py:123 +#: /home/ruben/Projects/Uranium/UM/VersionUpgradeManager.py:155 #, python-brace-format msgctxt "@info:version-upgrade" msgid "A configuration from an older version of {0} was imported." msgstr "Une configuration d'une ancienne version de {0} a été importée." -#: /home/ruben/Projects/Uranium/UM/View/GL/OpenGL.py:50 +#: /home/ruben/Projects/Uranium/UM/View/GL/OpenGL.py:58 +#: /home/ruben/Projects/Uranium/UM/View/GL/OpenGL.py:63 msgctxt "@message" msgid "Failed to Initialize OpenGL" msgstr "Échec de l'initialisation d'OpenGL" -#: /home/ruben/Projects/Uranium/UM/View/GL/OpenGL.py:60 +#: /home/ruben/Projects/Uranium/UM/View/GL/OpenGL.py:73 msgctxt "Critical OpenGL Extensions Missing" msgid "Critical OpenGL extensions are missing. This program requires support for Framebuffer Objects. Please check your video card drivers." msgstr "Des extensions OpenGL critiques sont absentes. Ce programme nécessite la prise en charge d'objets Framebuffer. Veuillez vérifier les pilotes de votre carte vidéo." -#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:153 +#: /home/ruben/Projects/Uranium/UM/ConfigurationErrorMessage.py:32 +#: /home/ruben/Projects/Uranium/plugins/Tools/ScaleTool/ScaleTool.qml:67 +#: /home/ruben/Projects/Uranium/plugins/Tools/RotateTool/RotateTool.qml:21 +msgctxt "@action:button" +msgid "Reset" +msgstr "Réinitialiser" + +#: /home/ruben/Projects/Uranium/UM/ConfigurationErrorMessage.py:44 +#, python-brace-format +msgctxt "@info:status" +msgid "" +"Your configuration seems to be corrupt. Something seems to be wrong with the following profiles:\n" +"- {profiles}\n" +" Would you like to reset to factory defaults? Reset will remove all your current printers and profiles." +msgstr "" +"Votre configuration semble corrompue. Un problème est survenu avec les profils suivants :\n" +"- {profiles}\n" +" Souhaitez-vous restaurer les paramètres d'usine par défaut ? Cette réinitialisation supprimera toutes vos imprimantes et profils actuels." + +#: /home/ruben/Projects/Uranium/UM/ConfigurationErrorMessage.py:49 +msgctxt "@title:window" +msgid "Reset to factory" +msgstr "Restaurer les paramètres d'usine" + +#: /home/ruben/Projects/Uranium/UM/ConfigurationErrorMessage.py:51 +msgctxt "@label" +msgid "Reset will remove all your current printers and profiles! Are you sure you want to reset?" +msgstr "La réinitialisation supprimera toutes vos imprimantes et profils actuels ! Êtes-vous sûr de vouloir réinitialiser ?" + +#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:162 #, python-brace-format msgctxt "@info" msgid "Would you like to reload {filename}?" msgstr "Voulez-vous recharger {filename} ?" -#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:154 +#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:163 msgctxt "@info:title" msgid "File has been modified" msgstr "Le fichier a été modifié" -#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:155 +#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:164 msgctxt "@action:button" msgid "Reload" msgstr "Recharger" -#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:155 +#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:164 msgctxt "@action:description" msgid "This will trigger the modified files to reload from disk." msgstr "Cela déclenchera le rechargement des fichiers modifiés à partir du disque." -#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:32 +#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:36 #, python-brace-format msgctxt "@info:status Don't translate the XML tag !" msgid "Cannot open files of the type of {0}" msgstr "Impossible d'ouvrir les fichiers de type {0}" -#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:32 -#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:47 -#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:70 +#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:36 +#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:51 +#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:74 msgctxt "@info:title" msgid "Invalid File" msgstr "Fichier non valide" -#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:45 -#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:70 +#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:49 +#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:74 #, python-brace-format msgctxt "@info:status Don't translate the XML tag !" msgid "Failed to load {0}" msgstr "Échec du chargement de {0}" -#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:54 +#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:59 msgctxt "@info:title" msgid "Loading" -msgstr "Chargement..." +msgstr "Chargement" -#: /home/ruben/Projects/Uranium/plugins/Tools/ScaleTool/ScaleTool.qml:60 -#: /home/ruben/Projects/Uranium/plugins/Tools/RotateTool/RotateTool.qml:21 -msgctxt "@action:button" -msgid "Reset" -msgstr "Réinitialiser" - -#: /home/ruben/Projects/Uranium/plugins/Tools/ScaleTool/ScaleTool.qml:86 +#: /home/ruben/Projects/Uranium/plugins/Tools/ScaleTool/ScaleTool.qml:93 msgctxt "@option:check" msgid "Snap Scaling" msgstr "Ajustement de l'échelle simplifié" -#: /home/ruben/Projects/Uranium/plugins/Tools/ScaleTool/ScaleTool.qml:104 +#: /home/ruben/Projects/Uranium/plugins/Tools/ScaleTool/ScaleTool.qml:121 msgctxt "@option:check" msgid "Uniform Scaling" msgstr "Échelle uniforme" -#: /home/ruben/Projects/Uranium/plugins/Tools/TranslateTool/TranslateTool.qml:177 +#: /home/ruben/Projects/Uranium/plugins/Tools/TranslateTool/TranslateTool.qml:196 msgctxt "@option:check" msgid "Lock Model" msgstr "Verrouiller le modèle" @@ -462,89 +548,37 @@ msgid "Lay flat" msgstr "Mettre à plat" -#: /home/ruben/Projects/Uranium/plugins/Tools/RotateTool/RotateTool.qml:55 +#: /home/ruben/Projects/Uranium/plugins/Tools/RotateTool/RotateTool.qml:60 +msgctxt "@action:button" +msgid "Select face to align to the build plate" +msgstr "Sélectionnez la face à aligner sur le plateau de fabrication" + +#: /home/ruben/Projects/Uranium/plugins/Tools/RotateTool/RotateTool.qml:81 msgctxt "@action:checkbox" msgid "Snap Rotation" msgstr "Rotation simplifiée" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:19 -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:148 -msgctxt "@title:tab" -msgid "Plugins" -msgstr "Plug-ins" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:28 -msgctxt "@action:button" -msgid "Install new plugin" -msgstr "Installer un nouveau plug-in" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:51 -msgctxt "@label" -msgid "You will need to restart the application before changes in plugins have effect." -msgstr "Vous devez redémarrer l'application pour que les changements dans les plug-ins prennent effet." - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:87 -msgctxt "@label" -msgid "This plugin is required for the application to run." -msgstr "Ce plug-in est requis pour le fonctionnement de l'application." - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:104 -msgctxt "@label" -msgid "Info..." -msgstr "Info..." - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:122 -msgctxt "@window:title" -msgid "Install Plugin" -msgstr "Installer plug-in" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:131 -msgctxt "@title:window" -msgid "Open file(s)" -msgstr "Ouvrir le(s) fichier(s)" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:165 -msgctxt "@label" -msgid "No text available" -msgstr "Aucun texte disponible" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:171 -msgctxt "@title:window" -msgid "About %1" -msgstr "À propos de %1" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:203 -msgctxt "@label" -msgid "Author:" -msgstr "Auteur :" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:225 -msgctxt "@label" -msgid "Version:" -msgstr "Version :" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:243 -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:113 -msgctxt "@action:button" -msgid "Close" -msgstr "Fermer" - #: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:18 msgctxt "@title:window" msgid "Preferences" msgstr "Préférences" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:106 +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:107 msgctxt "@action:button" msgid "Defaults" msgstr "Rétablir les paramètres par défaut" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:146 +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:115 +msgctxt "@action:button" +msgid "Close" +msgstr "Fermer" + +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:148 msgctxt "@title:tab" msgid "General" msgstr "Général" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:147 +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:149 msgctxt "@title:tab" msgid "Settings" msgstr "Paramètres" @@ -554,44 +588,34 @@ msgid "Rename" msgstr "Renommer" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/RenameDialog.qml:56 +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/RenameDialog.qml:20 +msgctxt "@info" +msgid "Please provide a new name." +msgstr "Veuillez fournir un nouveau nom." + +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/RenameDialog.qml:70 #: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Wizard.qml:241 msgctxt "@action:button" msgid "Cancel" msgstr "Annuler" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/RenameDialog.qml:60 +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/RenameDialog.qml:75 msgctxt "@action:button" msgid "OK" msgstr "OK" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/SettingVisibilityItem.qml:34 +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/SettingVisibilityItem.qml:32 msgctxt "@item:tooltip" msgid "This setting has been hidden by the active machine and will not be visible." msgstr "Ce paramètre a été masqué par la machine active et ne sera pas visible." -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/SettingVisibilityItem.qml:51 +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/SettingVisibilityItem.qml:49 msgctxt "@item:tooltip %1 is list of setting names" msgid "This setting has been hidden by the value of %1. Change the value of that setting to make this setting visible." msgid_plural "This setting has been hidden by the values of %1. Change the values of those settings to make this setting visible." msgstr[0] "Ce paramètre a été masqué par la valeur de %1. Modifiez la valeur de ce paramètre pour le rendre visible." msgstr[1] "Ce paramètre a été masqué par les valeurs de %1. Modifiez les valeurs de ces paramètres pour les rendre visibles." -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/SettingVisibilityPage.qml:12 -msgctxt "@title:tab" -msgid "Setting Visibility" -msgstr "Visibilité des paramètres" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/SettingVisibilityPage.qml:42 -msgctxt "@label:textbox" -msgid "Check all" -msgstr "Vérifier tout" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/SettingVisibilityPage.qml:89 -msgctxt "@label:textbox" -msgid "Filter..." -msgstr "Filtrer..." - #: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/MachinesPage.qml:12 msgctxt "@title:tab" msgid "Printers" @@ -612,86 +636,6 @@ msgid "Are you sure you wish to remove %1? This cannot be undone!" msgstr "Êtes-vous sûr de vouloir supprimer l'objet %1 ? Vous ne pourrez pas revenir en arrière !" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:14 -msgctxt "@title:tab" -msgid "Profiles" -msgstr "Profils" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:15 -msgctxt "@label" -msgid "Duplicate" -msgstr "Dupliquer" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:45 -msgctxt "@label %1 is printer name" -msgid "Printer: %1" -msgstr "Imprimante : %1" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:83 -msgctxt "@action:button" -msgid "Update \"%1\"" -msgstr "Mettre à jour « %1 »" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:84 -msgctxt "@action:button" -msgid "Update profile" -msgstr "Mettre à jour un profil" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:92 -msgctxt "@action:button" -msgid "Discard current changes" -msgstr "Ignorer les modifications actuelles" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:93 -msgctxt "@action:button" -msgid "Reload profile" -msgstr "Recharger un profil" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:107 -msgctxt "@label" -msgid "Based on" -msgstr "Basé sur" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:107 -msgctxt "@label" -msgid "Profile type" -msgstr "Type de profil" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:112 -msgctxt "@label" -msgid "Protected profile" -msgstr "Profil protégé" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:112 -msgctxt "@label" -msgid "Custom profile" -msgstr "Personnaliser le profil" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:139 -msgctxt "@action:button" -msgid "Import" -msgstr "Importer" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:146 -msgctxt "@action:button" -msgid "Export" -msgstr "Exporter" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:184 -msgctxt "@window:title" -msgid "Import Profile" -msgstr "Importer un profil" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:192 -msgctxt "@title:window" -msgid "Import Profile" -msgstr "Importer un profil" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:219 -msgctxt "@title:window" -msgid "Export Profile" -msgstr "Exporter un profil" - #: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Wizard.qml:215 msgctxt "@action:button" msgid "Back" @@ -710,7 +654,7 @@ #: UraniumExampleExtensionPlugin/plugin.json msgctxt "description" msgid "Example extension to instruct people on how to create Uranium extensions." -msgstr "Exemple d'extension pour illustrer la manière de créer des extensions Uranium" +msgstr "Exemple d'extension pour illustrer la manière de créer des extensions Uranium." #: UraniumExampleExtensionPlugin/plugin.json msgctxt "name" @@ -770,7 +714,7 @@ #: FileHandlers/STLWriter/plugin.json msgctxt "description" msgid "Provides support for writing STL files." -msgstr "Permet l'écriture de fichiers STL" +msgstr "Permet l'écriture de fichiers STL." #: FileHandlers/STLWriter/plugin.json msgctxt "name" @@ -790,7 +734,7 @@ #: UraniumExampleToolPlugin/plugin.json msgctxt "description" msgid "Example tool to instruct people on how to create Uranium tools." -msgstr "Exemple d'outil pour illustrer la manière de créer des outils Uranium" +msgstr "Exemple d'outil pour illustrer la manière de créer des outils Uranium." #: UraniumExampleToolPlugin/plugin.json msgctxt "name" @@ -800,7 +744,7 @@ #: UraniumExampleOutputDevicePlugin/plugin.json msgctxt "description" msgid "Example output device to instruct people on how to create Uranium output devices." -msgstr "Exemple de périphérique de sortie pour illustrer la manière de créer des périphériques de sortie Uranium" +msgstr "Exemple de périphérique de sortie pour illustrer la manière de créer des périphériques de sortie Uranium." #: UraniumExampleOutputDevicePlugin/plugin.json msgctxt "name" @@ -820,7 +764,7 @@ #: UraniumExampleFileReaderPlugin/plugin.json msgctxt "description" msgid "Example file reader to instruct people on how to create Uranium file readers." -msgstr "Exemple de lecteur de fichier pour illustrer la manière de créer des lecteurs de fichier Uranium" +msgstr "Exemple de lecteur de fichier pour illustrer la manière de créer des lecteurs de fichier Uranium." #: UraniumExampleFileReaderPlugin/plugin.json msgctxt "name" @@ -907,6 +851,186 @@ msgid "Mirror Tool" msgstr "Outil de symétrie" +#~ msgctxt "@title:tab" +#~ msgid "Plugins" +#~ msgstr "Plug-ins" + +#~ msgctxt "@action:button" +#~ msgid "Install new plugin" +#~ msgstr "Installer un nouveau plug-in" + +#~ msgctxt "@label" +#~ msgid "You will need to restart the application before changes in plugins have effect." +#~ msgstr "Vous devez redémarrer l'application pour que les changements dans les plug-ins prennent effet." + +#~ msgctxt "@label" +#~ msgid "This plugin is required for the application to run." +#~ msgstr "Ce plug-in est requis pour le fonctionnement de l'application." + +#~ msgctxt "@label" +#~ msgid "Info..." +#~ msgstr "Info..." + +#~ msgctxt "@window:title" +#~ msgid "Install Plugin" +#~ msgstr "Installer plug-in" + +#~ msgctxt "@title:window" +#~ msgid "Open file(s)" +#~ msgstr "Ouvrir le(s) fichier(s)" + +#~ msgctxt "@label" +#~ msgid "No text available" +#~ msgstr "Aucun texte disponible" + +#~ msgctxt "@title:window" +#~ msgid "About %1" +#~ msgstr "À propos de %1" + +#~ msgctxt "@label" +#~ msgid "Author:" +#~ msgstr "Auteur :" + +#~ msgctxt "@label" +#~ msgid "Version:" +#~ msgstr "Version :" + +#~ msgctxt "@action:button" +#~ msgid "Learn more about the new features" +#~ msgstr "En savoir plus sur les nouvelles fonctionnalités" + +#~ msgctxt "@info:status" +#~ msgid "Cura {0} is available!" +#~ msgstr "Cura {0} est disponible!" + +#~ msgctxt "@info:status" +#~ msgid "Cura {0} provides better and reliable printing experience." +#~ msgstr "Cura {0} offre une expérience d'impression plus fiable et de meilleure qualité." + +#~ msgctxt "@action:button" +#~ msgid "Learn more about new features" +#~ msgstr "En savoir plus sur les nouvelles fonctionnalités" + +#~ msgctxt "@error:update" +#~ msgid "" +#~ "There was an error uninstalling the package {package} before installingnew version:\n" +#~ "{error}.\n" +#~ "Please try to upgrade again later." +#~ msgstr "" +#~ "Une erreur s'est produite lors de la désinstallation du paquet {package} avant d'installer la nouvelle version :\n" +#~ "{error}.\n" +#~ "Veuillez réessayer la mise à jour plus tard." + +#~ msgctxt "@info:status" +#~ msgid "" +#~ "Your configuration seems to be corrupt. Something seems to be wrong with the following profiles:\n" +#~ "- {profiles}\n" +#~ "Would you like to reset to factory defaults? Reset will remove all your current printers and profiles." +#~ msgstr "" +#~ "Votre configuration semble corrompue. Il semble y avoir un problème avec les profils suivants :\n" +#~ "- {profiles}\n" +#~ "Souhaitez-vous rétablir les paramètres d'usine ? Cela supprimera toutes vos imprimantes et profils actuels." + +#~ msgctxt "@info" +#~ msgid "A new version is available!" +#~ msgstr "Une nouvelle version est disponible !" + +#~ msgctxt "@info:status" +#~ msgid "" +#~ "Failed to install plugin from {0}:\n" +#~ "{1}" +#~ msgstr "" +#~ "Échec de l'installation du plug-in de {0} :\n" +#~ "{1}" + +#~ msgctxt "@info:status" +#~ msgid "" +#~ "Failed to install the plugin;\n" +#~ "{0}" +#~ msgstr "" +#~ "Échec de l'installation du plug-in;\n" +#~ "{0}" + +#~ msgctxt "@info:status" +#~ msgid "Failed to uninstall plugin. Plugin will be removed after {0} restarts." +#~ msgstr "Échec de la désinstallation du plug-in. Le plug-in sera supprimé après le redémarrage de {0}." + +#~ msgctxt "@title:tab" +#~ msgid "Setting Visibility" +#~ msgstr "Visibilité des paramètres" + +#~ msgctxt "@label:textbox" +#~ msgid "Check all" +#~ msgstr "Vérifier tout" + +#~ msgctxt "@label:textbox" +#~ msgid "Filter..." +#~ msgstr "Filtrer..." + +#~ msgctxt "@title:tab" +#~ msgid "Profiles" +#~ msgstr "Profils" + +#~ msgctxt "@label" +#~ msgid "Duplicate" +#~ msgstr "Dupliquer" + +#~ msgctxt "@label %1 is printer name" +#~ msgid "Printer: %1" +#~ msgstr "Imprimante : %1" + +#~ msgctxt "@action:button" +#~ msgid "Update \"%1\"" +#~ msgstr "Mettre à jour « %1 »" + +#~ msgctxt "@action:button" +#~ msgid "Update profile" +#~ msgstr "Mettre à jour un profil" + +#~ msgctxt "@action:button" +#~ msgid "Discard current changes" +#~ msgstr "Ignorer les modifications actuelles" + +#~ msgctxt "@action:button" +#~ msgid "Reload profile" +#~ msgstr "Recharger un profil" + +#~ msgctxt "@label" +#~ msgid "Based on" +#~ msgstr "Basé sur" + +#~ msgctxt "@label" +#~ msgid "Profile type" +#~ msgstr "Type de profil" + +#~ msgctxt "@label" +#~ msgid "Protected profile" +#~ msgstr "Profil protégé" + +#~ msgctxt "@label" +#~ msgid "Custom profile" +#~ msgstr "Personnaliser le profil" + +#~ msgctxt "@action:button" +#~ msgid "Import" +#~ msgstr "Importer" + +#~ msgctxt "@action:button" +#~ msgid "Export" +#~ msgstr "Exporter" + +#~ msgctxt "@window:title" +#~ msgid "Import Profile" +#~ msgstr "Importer un profil" + +#~ msgctxt "@title:window" +#~ msgid "Import Profile" +#~ msgstr "Importer un profil" + +#~ msgctxt "@title:window" +#~ msgid "Export Profile" +#~ msgstr "Exporter un profil" + #~ msgctxt "@info" #~ msgid "An exception occurred while checking for updates." #~ msgstr "Une erreur s'est produite lors de la recherche de mises à jour." diff -Nru uranium-3.3.0/resources/i18n/hu_HU/uranium.po uranium-4.4.1/resources/i18n/hu_HU/uranium.po --- uranium-3.3.0/resources/i18n/hu_HU/uranium.po 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/resources/i18n/hu_HU/uranium.po 2019-11-19 10:50:46.000000000 +0000 @@ -1,13 +1,13 @@ # Uranium -# Copyright (C) 2017 Ultimaker +# Copyright (C) 2019 Ultimaker B.V. # This file is distributed under the same license as the Uranium package. -# Ruben Dulek , 2017. +# Ruben Dulek , 2019. # msgid "" msgstr "" -"Project-Id-Version: Uranium 3.0\n" +"Project-Id-Version: Uranium 4.4\n" "Report-Msgid-Bugs-To: r.dulek@ultimaker.com\n" -"POT-Creation-Date: 2018-03-29 08:36+0200\n" +"POT-Creation-Date: 2019-11-05 13:40+0100\n" "PO-Revision-Date: 2016-12-14 15:39+0100\n" "Last-Translator: None\n" "Language-Team: None\n" @@ -33,6 +33,17 @@ msgid "Wavefront OBJ File" msgstr "" +#: /home/ruben/Projects/Uranium/plugins/FileHandlers/OBJWriter/OBJWriter.py:23 +msgctxt "@error:not supported" +msgid "OBJWriter does not support non-text mode." +msgstr "" + +#: /home/ruben/Projects/Uranium/plugins/FileHandlers/OBJWriter/OBJWriter.py:30 +#: /home/ruben/Projects/Uranium/plugins/FileHandlers/STLWriter/STLWriter.py:27 +msgctxt "@error:no mesh" +msgid "There is no mesh to write." +msgstr "" + #: /home/ruben/Projects/Uranium/plugins/FileHandlers/STLWriter/__init__.py:17 msgctxt "@item:inlistbox" msgid "STL File (ASCII)" @@ -43,80 +54,101 @@ msgid "STL File (Binary)" msgstr "" -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:42 +#: /home/ruben/Projects/Uranium/plugins/FileHandlers/STLWriter/STLWriter.py:36 +msgctxt "@error:not supported" +msgid "Unsupported output mode writing STL to stream." +msgstr "" + +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:50 msgctxt "@info" msgid "Could not access update information." msgstr "" -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:43 -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:60 -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:71 -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:89 -#: /home/ruben/Projects/Uranium/UM/VersionUpgradeManager.py:123 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:51 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:68 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:97 +#: /home/ruben/Projects/Uranium/UM/VersionUpgradeManager.py:155 msgctxt "@info:title" msgid "Version Upgrade" msgstr "" -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:55 -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:60 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:63 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:68 msgctxt "@info" msgid "The version you are using does not support checking for updates." msgstr "" -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:55 -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:178 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:63 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:188 msgctxt "@info:title" msgid "Warning" msgstr "" -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:71 -msgctxt "@info" -msgid "A new version is available!" -msgstr "" - -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:72 -msgctxt "@action:button" -msgid "Download" -msgstr "" - -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:85 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:93 msgctxt "@info" msgid "An error occurred while checking for updates." msgstr "" -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:85 -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:185 -#: /home/ruben/Projects/Uranium/UM/Qt/Bindings/OutputDeviceManagerProxy.py:128 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:93 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:195 +#: /home/ruben/Projects/Uranium/UM/Qt/Bindings/OutputDeviceManagerProxy.py:141 msgctxt "@info:title" msgid "Error" msgstr "" -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:89 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:97 msgctxt "@info" msgid "No new version was found." msgstr "" +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:102 +#, python-brace-format +msgctxt "@info:status" +msgid "{application_name} {version_number} is available!" +msgstr "" + +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:104 +#, python-brace-format +msgctxt "@info:status" +msgid "{application_name} {version_number} provides a better and more reliable printing experience." +msgstr "" + +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:107 +msgctxt "@action:button" +msgid "Download" +msgstr "" + +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:109 +msgctxt "@action:button" +msgid "Learn more" +msgstr "" + #: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateChecker.py:26 msgctxt "@item:inmenu" +msgid "Update Checker" +msgstr "" + +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateChecker.py:27 +msgctxt "@item:inmenu" msgid "Check for Updates" msgstr "" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:33 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:30 msgctxt "@item:inmenu" msgid "Local File" msgstr "" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:34 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:31 msgctxt "@action:button Preceded by 'Ready to'." msgid "Save to File" msgstr "" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:35 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:32 msgctxt "@info:tooltip" msgid "Save to File" msgstr "" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:56 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:53 msgctxt "@title:window" msgid "Save to File" msgstr "" @@ -126,63 +158,63 @@ msgid "There are no file types available to write with!" msgstr "" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:121 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:130 msgctxt "@title:window" msgid "File Already Exists" msgstr "" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:121 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:130 #, python-brace-format msgctxt "@label Don't translate the XML tag !" msgid "The file {0} already exists. Are you sure you want to overwrite it?" msgstr "" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:150 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:160 #, python-brace-format msgctxt "@info:progress Don't translate the XML tags !" msgid "Saving to {0}" msgstr "" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:151 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:161 msgctxt "@info:title" msgid "Saving" msgstr "" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:159 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:169 #, python-brace-format msgctxt "@info:status Don't translate the XML tags !" msgid "Permission denied when trying to save {0}" msgstr "" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:162 -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:178 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:172 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:188 #, python-brace-format msgctxt "@info:status Don't translate the XML tags or !" msgid "Could not save to {0}: {1}" msgstr "" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:172 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:182 #, python-brace-format msgctxt "@info:status Don't translate the XML tags !" msgid "Saved to {0}" msgstr "" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:172 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:182 msgctxt "@info:title" msgid "File Saved" msgstr "" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:173 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:183 msgctxt "@action:button" msgid "Open Folder" msgstr "" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:173 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:183 msgctxt "@info:tooltip" msgid "Open the folder containing the file" msgstr "" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:185 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:195 #, python-brace-format msgctxt "@info:status" msgid "Something went wrong saving to {0}: {1}" @@ -218,6 +250,16 @@ msgid "Rotate Model" msgstr "" +#: /home/ruben/Projects/Uranium/plugins/Tools/RotateTool/RotateTool.py:279 +msgctxt "@label" +msgid "Laying object flat on buildplate..." +msgstr "" + +#: /home/ruben/Projects/Uranium/plugins/Tools/RotateTool/RotateTool.py:279 +msgctxt "@title" +msgid "Object Rotation" +msgstr "" + #: /home/ruben/Projects/Uranium/plugins/Tools/MirrorTool/__init__.py:12 msgctxt "@label" msgid "Mirror" @@ -238,11 +280,13 @@ msgstr "" #: /home/ruben/Projects/Uranium/UM/__init__.py:16 +#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:175 msgctxt "@info:status" msgid "Your configuration seems to be corrupt." msgstr "" #: /home/ruben/Projects/Uranium/UM/__init__.py:17 +#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:177 msgctxt "@info:title" msgid "Configuration errors" msgstr "" @@ -252,36 +296,61 @@ msgid "Reset your configuration to factory defaults." msgstr "" -#: /home/ruben/Projects/Uranium/UM/Settings/Models/InstanceContainersModel.py:189 -#: /home/ruben/Projects/Uranium/UM/Qt/Bindings/MeshFileHandlerProxy.py:48 -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:655 -#: /home/ruben/Projects/Uranium/UM/FileHandler/FileHandler.py:70 +#: /home/ruben/Projects/Uranium/UM/Settings/Models/InstanceContainersModel.py:181 +#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:708 +#: /home/ruben/Projects/Uranium/UM/FileHandler/FileHandler.py:56 #, python-brace-format msgctxt "@item:inlistbox" msgid "All Supported Types ({0})" msgstr "" -#: /home/ruben/Projects/Uranium/UM/Settings/Models/InstanceContainersModel.py:192 -#: /home/ruben/Projects/Uranium/UM/Qt/Bindings/MeshFileHandlerProxy.py:49 -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:656 -#: /home/ruben/Projects/Uranium/UM/FileHandler/FileHandler.py:71 +#: /home/ruben/Projects/Uranium/UM/Settings/Models/InstanceContainersModel.py:184 +#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:709 +#: /home/ruben/Projects/Uranium/UM/FileHandler/FileHandler.py:57 msgctxt "@item:inlistbox" msgid "All Files (*)" msgstr "" -#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:108 +#: /home/ruben/Projects/Uranium/UM/PackageManager.py:233 +#, python-brace-format +msgctxt "@error:uninstall" +msgid "" +"There were some errors uninstalling the following packages:\n" +"{packages}" +msgstr "" + +#: /home/ruben/Projects/Uranium/UM/PackageManager.py:235 +msgctxt "@info:title" +msgid "Uninstalling errors" +msgstr "" + +#: /home/ruben/Projects/Uranium/UM/PackageManager.py:454 +#, python-brace-format +msgctxt "@error:update" +msgid "" +"There was an error uninstalling the package {package} before installing new version:\n" +"{error}.\n" +"Please try to upgrade again later." +msgstr "" + +#: /home/ruben/Projects/Uranium/UM/PackageManager.py:457 +msgctxt "@info:title" +msgid "Updating error" +msgstr "" + +#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:112 #, python-brace-format msgctxt "@label Short days-hours-minutes format. {0} is days, {1} is hours, {2} is minutes" msgid "{0:0>2}d {1:0>2}h {2:0>2}min" msgstr "" -#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:110 +#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:114 #, python-brace-format msgctxt "@label Short hours-minutes format. {0} is hours, {1} is minutes" msgid "{0:0>2}h {1:0>2}min" msgstr "" -#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:113 +#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:117 #, python-brace-format msgctxt "@label Long duration format. {0} is days" msgid "{0} day" @@ -289,8 +358,8 @@ msgstr[0] "" msgstr[1] "" -#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:113 -#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:115 +#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:117 +#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:119 #, python-brace-format msgctxt "@label Long duration format. {0} is hours" msgid "{0} hour" @@ -298,9 +367,9 @@ msgstr[0] "" msgstr[1] "" -#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:113 -#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:115 #: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:117 +#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:119 +#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:121 #, python-brace-format msgctxt "@label Long duration format. {0} is minutes" msgid "{0} minute" @@ -308,58 +377,45 @@ msgstr[0] "" msgstr[1] "" -#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:112 +#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:159 +msgctxt "@info:progress" +msgid "Initializing package manager..." +msgstr "" + +#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:180 msgctxt "@info:progress" msgid "Loading plugins..." msgstr "" -#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:119 +#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:187 msgctxt "@info:progress" msgid "Updating configuration..." msgstr "" -#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:136 +#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:205 msgctxt "@info:progress" msgid "Loading preferences..." msgstr "" -#: /home/ruben/Projects/Uranium/UM/Mesh/ReadMeshJob.py:65 +#: /home/ruben/Projects/Uranium/UM/Mesh/ReadMeshJob.py:68 #, python-format, python-brace-format msgctxt "@info:status" msgid "Auto scaled object to {0}% of original size" msgstr "" -#: /home/ruben/Projects/Uranium/UM/Mesh/ReadMeshJob.py:65 +#: /home/ruben/Projects/Uranium/UM/Mesh/ReadMeshJob.py:68 msgctxt "@info:title" msgid "Scaling Object" msgstr "" -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:220 +#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:277 msgctxt "@info:status" msgid "" "The plugin has been installed.\n" "Please re-start the application to activate the plugin." msgstr "" -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:231 -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:270 -#, python-brace-format -msgctxt "@info:status" -msgid "" -"Failed to install plugin from {0}:\n" -"{1}" -msgstr "" - -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:254 -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:259 -#, python-brace-format -msgctxt "@info:status" -msgid "" -"Failed to install the plugin;\n" -"{0}" -msgstr "" - -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:421 +#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:415 #, python-brace-format msgctxt "@info:status" msgid "" @@ -367,91 +423,106 @@ "Please restart {0} to finish uninstall." msgstr "" -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:433 -#, python-brace-format -msgctxt "@info:status" -msgid "Failed to uninstall plugin. Plugin will be removed after {0} restarts." -msgstr "" - -#: /home/ruben/Projects/Uranium/UM/VersionUpgradeManager.py:123 +#: /home/ruben/Projects/Uranium/UM/VersionUpgradeManager.py:155 #, python-brace-format msgctxt "@info:version-upgrade" msgid "A configuration from an older version of {0} was imported." msgstr "" -#: /home/ruben/Projects/Uranium/UM/View/GL/OpenGL.py:50 +#: /home/ruben/Projects/Uranium/UM/View/GL/OpenGL.py:58 +#: /home/ruben/Projects/Uranium/UM/View/GL/OpenGL.py:63 msgctxt "@message" msgid "Failed to Initialize OpenGL" msgstr "" -#: /home/ruben/Projects/Uranium/UM/View/GL/OpenGL.py:60 +#: /home/ruben/Projects/Uranium/UM/View/GL/OpenGL.py:73 msgctxt "Critical OpenGL Extensions Missing" msgid "Critical OpenGL extensions are missing. This program requires support for Framebuffer Objects. Please check your video card drivers." msgstr "" -#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:153 +#: /home/ruben/Projects/Uranium/UM/ConfigurationErrorMessage.py:32 +#: /home/ruben/Projects/Uranium/plugins/Tools/ScaleTool/ScaleTool.qml:67 +#: /home/ruben/Projects/Uranium/plugins/Tools/RotateTool/RotateTool.qml:21 +msgctxt "@action:button" +msgid "Reset" +msgstr "" + +#: /home/ruben/Projects/Uranium/UM/ConfigurationErrorMessage.py:44 +#, python-brace-format +msgctxt "@info:status" +msgid "" +"Your configuration seems to be corrupt. Something seems to be wrong with the following profiles:\n" +"- {profiles}\n" +" Would you like to reset to factory defaults? Reset will remove all your current printers and profiles." +msgstr "" + +#: /home/ruben/Projects/Uranium/UM/ConfigurationErrorMessage.py:49 +msgctxt "@title:window" +msgid "Reset to factory" +msgstr "" + +#: /home/ruben/Projects/Uranium/UM/ConfigurationErrorMessage.py:51 +msgctxt "@label" +msgid "Reset will remove all your current printers and profiles! Are you sure you want to reset?" +msgstr "" + +#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:162 #, python-brace-format msgctxt "@info" msgid "Would you like to reload {filename}?" msgstr "" -#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:154 +#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:163 msgctxt "@info:title" msgid "File has been modified" msgstr "" -#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:155 +#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:164 msgctxt "@action:button" msgid "Reload" msgstr "" -#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:155 +#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:164 msgctxt "@action:description" msgid "This will trigger the modified files to reload from disk." msgstr "" -#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:32 +#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:36 #, python-brace-format msgctxt "@info:status Don't translate the XML tag !" msgid "Cannot open files of the type of {0}" msgstr "" -#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:32 -#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:47 -#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:70 +#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:36 +#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:51 +#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:74 msgctxt "@info:title" msgid "Invalid File" msgstr "" -#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:45 -#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:70 +#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:49 +#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:74 #, python-brace-format msgctxt "@info:status Don't translate the XML tag !" msgid "Failed to load {0}" msgstr "" -#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:54 +#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:59 msgctxt "@info:title" msgid "Loading" msgstr "" -#: /home/ruben/Projects/Uranium/plugins/Tools/ScaleTool/ScaleTool.qml:60 -#: /home/ruben/Projects/Uranium/plugins/Tools/RotateTool/RotateTool.qml:21 -msgctxt "@action:button" -msgid "Reset" -msgstr "" - -#: /home/ruben/Projects/Uranium/plugins/Tools/ScaleTool/ScaleTool.qml:86 +#: /home/ruben/Projects/Uranium/plugins/Tools/ScaleTool/ScaleTool.qml:93 msgctxt "@option:check" msgid "Snap Scaling" msgstr "" -#: /home/ruben/Projects/Uranium/plugins/Tools/ScaleTool/ScaleTool.qml:104 +#: /home/ruben/Projects/Uranium/plugins/Tools/ScaleTool/ScaleTool.qml:121 msgctxt "@option:check" msgid "Uniform Scaling" msgstr "" -#: /home/ruben/Projects/Uranium/plugins/Tools/TranslateTool/TranslateTool.qml:177 +#: /home/ruben/Projects/Uranium/plugins/Tools/TranslateTool/TranslateTool.qml:196 msgctxt "@option:check" msgid "Lock Model" msgstr "" @@ -461,71 +532,14 @@ msgid "Lay flat" msgstr "" -#: /home/ruben/Projects/Uranium/plugins/Tools/RotateTool/RotateTool.qml:55 -msgctxt "@action:checkbox" -msgid "Snap Rotation" -msgstr "" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:19 -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:148 -msgctxt "@title:tab" -msgid "Plugins" -msgstr "" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:28 +#: /home/ruben/Projects/Uranium/plugins/Tools/RotateTool/RotateTool.qml:60 msgctxt "@action:button" -msgid "Install new plugin" +msgid "Select face to align to the build plate" msgstr "" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:51 -msgctxt "@label" -msgid "You will need to restart the application before changes in plugins have effect." -msgstr "" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:87 -msgctxt "@label" -msgid "This plugin is required for the application to run." -msgstr "" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:104 -msgctxt "@label" -msgid "Info..." -msgstr "" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:122 -msgctxt "@window:title" -msgid "Install Plugin" -msgstr "" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:131 -msgctxt "@title:window" -msgid "Open file(s)" -msgstr "" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:165 -msgctxt "@label" -msgid "No text available" -msgstr "" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:171 -msgctxt "@title:window" -msgid "About %1" -msgstr "" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:203 -msgctxt "@label" -msgid "Author:" -msgstr "" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:225 -msgctxt "@label" -msgid "Version:" -msgstr "" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:243 -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:113 -msgctxt "@action:button" -msgid "Close" +#: /home/ruben/Projects/Uranium/plugins/Tools/RotateTool/RotateTool.qml:81 +msgctxt "@action:checkbox" +msgid "Snap Rotation" msgstr "" #: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:18 @@ -533,17 +547,22 @@ msgid "Preferences" msgstr "" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:106 +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:107 msgctxt "@action:button" msgid "Defaults" msgstr "" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:146 +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:115 +msgctxt "@action:button" +msgid "Close" +msgstr "" + +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:148 msgctxt "@title:tab" msgid "General" msgstr "" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:147 +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:149 msgctxt "@title:tab" msgid "Settings" msgstr "" @@ -553,44 +572,34 @@ msgid "Rename" msgstr "" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/RenameDialog.qml:56 +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/RenameDialog.qml:20 +msgctxt "@info" +msgid "Please provide a new name." +msgstr "" + +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/RenameDialog.qml:70 #: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Wizard.qml:241 msgctxt "@action:button" msgid "Cancel" msgstr "" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/RenameDialog.qml:60 +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/RenameDialog.qml:75 msgctxt "@action:button" msgid "OK" msgstr "" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/SettingVisibilityItem.qml:34 +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/SettingVisibilityItem.qml:32 msgctxt "@item:tooltip" msgid "This setting has been hidden by the active machine and will not be visible." msgstr "" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/SettingVisibilityItem.qml:51 +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/SettingVisibilityItem.qml:49 msgctxt "@item:tooltip %1 is list of setting names" msgid "This setting has been hidden by the value of %1. Change the value of that setting to make this setting visible." msgid_plural "This setting has been hidden by the values of %1. Change the values of those settings to make this setting visible." msgstr[0] "" msgstr[1] "" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/SettingVisibilityPage.qml:12 -msgctxt "@title:tab" -msgid "Setting Visibility" -msgstr "" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/SettingVisibilityPage.qml:42 -msgctxt "@label:textbox" -msgid "Check all" -msgstr "" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/SettingVisibilityPage.qml:89 -msgctxt "@label:textbox" -msgid "Filter..." -msgstr "" - #: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/MachinesPage.qml:12 msgctxt "@title:tab" msgid "Printers" @@ -611,86 +620,6 @@ msgid "Are you sure you wish to remove %1? This cannot be undone!" msgstr "" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:14 -msgctxt "@title:tab" -msgid "Profiles" -msgstr "" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:15 -msgctxt "@label" -msgid "Duplicate" -msgstr "" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:45 -msgctxt "@label %1 is printer name" -msgid "Printer: %1" -msgstr "" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:83 -msgctxt "@action:button" -msgid "Update \"%1\"" -msgstr "" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:84 -msgctxt "@action:button" -msgid "Update profile" -msgstr "" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:92 -msgctxt "@action:button" -msgid "Discard current changes" -msgstr "" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:93 -msgctxt "@action:button" -msgid "Reload profile" -msgstr "" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:107 -msgctxt "@label" -msgid "Based on" -msgstr "" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:107 -msgctxt "@label" -msgid "Profile type" -msgstr "" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:112 -msgctxt "@label" -msgid "Protected profile" -msgstr "" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:112 -msgctxt "@label" -msgid "Custom profile" -msgstr "" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:139 -msgctxt "@action:button" -msgid "Import" -msgstr "" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:146 -msgctxt "@action:button" -msgid "Export" -msgstr "" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:184 -msgctxt "@window:title" -msgid "Import Profile" -msgstr "" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:192 -msgctxt "@title:window" -msgid "Import Profile" -msgstr "" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:219 -msgctxt "@title:window" -msgid "Export Profile" -msgstr "" - #: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Wizard.qml:215 msgctxt "@action:button" msgid "Back" diff -Nru uranium-3.3.0/resources/i18n/it_IT/uranium.po uranium-4.4.1/resources/i18n/it_IT/uranium.po --- uranium-3.3.0/resources/i18n/it_IT/uranium.po 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/resources/i18n/it_IT/uranium.po 2019-11-19 10:50:46.000000000 +0000 @@ -1,14 +1,14 @@ # Uranium -# Copyright (C) 2018 Ultimaker +# Copyright (C) 2019 Ultimaker B.V. # This file is distributed under the same license as the Uranium package. -# Ruben Dulek , 2018. +# Ruben Dulek , 2019. # msgid "" msgstr "" -"Project-Id-Version: Uranium 3.3\n" +"Project-Id-Version: Uranium 4.4\n" "Report-Msgid-Bugs-To: r.dulek@ultimaker.com\n" -"POT-Creation-Date: 2018-03-29 08:36+0200\n" -"PO-Revision-Date: 2018-04-11 15:55+0100\n" +"POT-Creation-Date: 2019-11-05 13:40+0100\n" +"PO-Revision-Date: 2018-10-02 10:55+0100\n" "Last-Translator: Bothof \n" "Language-Team: Crea-3D , Italian \n" "Language: it_IT\n" @@ -33,6 +33,17 @@ msgid "Wavefront OBJ File" msgstr "File Wavefront OBJ" +#: /home/ruben/Projects/Uranium/plugins/FileHandlers/OBJWriter/OBJWriter.py:23 +msgctxt "@error:not supported" +msgid "OBJWriter does not support non-text mode." +msgstr "OBJWriter non supporta la modalità non di testo." + +#: /home/ruben/Projects/Uranium/plugins/FileHandlers/OBJWriter/OBJWriter.py:30 +#: /home/ruben/Projects/Uranium/plugins/FileHandlers/STLWriter/STLWriter.py:27 +msgctxt "@error:no mesh" +msgid "There is no mesh to write." +msgstr "Nessuna maglia da scrivere." + #: /home/ruben/Projects/Uranium/plugins/FileHandlers/STLWriter/__init__.py:17 msgctxt "@item:inlistbox" msgid "STL File (ASCII)" @@ -43,80 +54,101 @@ msgid "STL File (Binary)" msgstr "File STL (Binario)" -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:42 +#: /home/ruben/Projects/Uranium/plugins/FileHandlers/STLWriter/STLWriter.py:36 +msgctxt "@error:not supported" +msgid "Unsupported output mode writing STL to stream." +msgstr "Modalità di uscita non supportata durante la scrittura di STL su stream." + +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:50 msgctxt "@info" msgid "Could not access update information." msgstr "Non è possibile accedere alle informazioni di aggiornamento." -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:43 -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:60 -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:71 -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:89 -#: /home/ruben/Projects/Uranium/UM/VersionUpgradeManager.py:123 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:51 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:68 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:97 +#: /home/ruben/Projects/Uranium/UM/VersionUpgradeManager.py:155 msgctxt "@info:title" msgid "Version Upgrade" msgstr "Aggiornamento versione" -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:55 -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:60 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:63 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:68 msgctxt "@info" msgid "The version you are using does not support checking for updates." msgstr "La versione che stai utilizzando non supporta la verifica della disponibilità di aggiornamenti." -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:55 -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:178 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:63 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:188 msgctxt "@info:title" msgid "Warning" msgstr "Avvertenza" -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:71 -msgctxt "@info" -msgid "A new version is available!" -msgstr "È disponibile una nuova versione!" - -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:72 -msgctxt "@action:button" -msgid "Download" -msgstr "Download" - -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:85 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:93 msgctxt "@info" msgid "An error occurred while checking for updates." msgstr "Si è verificato un errore durante il controllo degli aggiornamenti." -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:85 -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:185 -#: /home/ruben/Projects/Uranium/UM/Qt/Bindings/OutputDeviceManagerProxy.py:128 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:93 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:195 +#: /home/ruben/Projects/Uranium/UM/Qt/Bindings/OutputDeviceManagerProxy.py:141 msgctxt "@info:title" msgid "Error" msgstr "Errore" -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:89 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:97 msgctxt "@info" msgid "No new version was found." msgstr "Non è stata trovata nessuna nuova versione." +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:102 +#, python-brace-format +msgctxt "@info:status" +msgid "{application_name} {version_number} is available!" +msgstr "{application_name} {version_number} è disponibile!" + +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:104 +#, python-brace-format +msgctxt "@info:status" +msgid "{application_name} {version_number} provides a better and more reliable printing experience." +msgstr "{application_name} {version_number} fornisce un’esperienza di stampa migliore e più affidabile." + +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:107 +msgctxt "@action:button" +msgid "Download" +msgstr "Download" + +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:109 +msgctxt "@action:button" +msgid "Learn more" +msgstr "Ulteriori informazioni" + #: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateChecker.py:26 msgctxt "@item:inmenu" +msgid "Update Checker" +msgstr "Controllo aggiornamenti" + +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateChecker.py:27 +msgctxt "@item:inmenu" msgid "Check for Updates" msgstr "Controlla aggiornamenti" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:33 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:30 msgctxt "@item:inmenu" msgid "Local File" msgstr "File locale" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:34 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:31 msgctxt "@action:button Preceded by 'Ready to'." msgid "Save to File" msgstr "Salva su File" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:35 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:32 msgctxt "@info:tooltip" msgid "Save to File" msgstr "Salvare su File" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:56 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:53 msgctxt "@title:window" msgid "Save to File" msgstr "Salva su File" @@ -126,63 +158,63 @@ msgid "There are no file types available to write with!" msgstr "Non ci sono tipi di file disponibili per la scrittura!" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:121 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:130 msgctxt "@title:window" msgid "File Already Exists" msgstr "Il file esiste già" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:121 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:130 #, python-brace-format msgctxt "@label Don't translate the XML tag !" msgid "The file {0} already exists. Are you sure you want to overwrite it?" msgstr "Il file {0} esiste già. Sei sicuro di volerlo sovrascrivere?" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:150 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:160 #, python-brace-format msgctxt "@info:progress Don't translate the XML tags !" msgid "Saving to {0}" msgstr "Salvataggio su {0}" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:151 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:161 msgctxt "@info:title" msgid "Saving" msgstr "Salvataggio in corso" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:159 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:169 #, python-brace-format msgctxt "@info:status Don't translate the XML tags !" msgid "Permission denied when trying to save {0}" msgstr "Autorizzazione negata quando si tenta di salvare {0}" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:162 -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:178 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:172 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:188 #, python-brace-format msgctxt "@info:status Don't translate the XML tags or !" msgid "Could not save to {0}: {1}" msgstr "Impossibile salvare {0}: {1}" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:172 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:182 #, python-brace-format msgctxt "@info:status Don't translate the XML tags !" msgid "Saved to {0}" msgstr "Salvato su {0}" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:172 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:182 msgctxt "@info:title" msgid "File Saved" msgstr "File salvato" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:173 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:183 msgctxt "@action:button" msgid "Open Folder" msgstr "Apri cartella" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:173 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:183 msgctxt "@info:tooltip" msgid "Open the folder containing the file" msgstr "Apri la cartella contenente il file" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:185 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:195 #, python-brace-format msgctxt "@info:status" msgid "Something went wrong saving to {0}: {1}" @@ -218,6 +250,16 @@ msgid "Rotate Model" msgstr "Modello Rotazione" +#: /home/ruben/Projects/Uranium/plugins/Tools/RotateTool/RotateTool.py:279 +msgctxt "@label" +msgid "Laying object flat on buildplate..." +msgstr "Disporre l’oggetto piatto sul piano di stampa..." + +#: /home/ruben/Projects/Uranium/plugins/Tools/RotateTool/RotateTool.py:279 +msgctxt "@title" +msgid "Object Rotation" +msgstr "Rotazione oggetto" + #: /home/ruben/Projects/Uranium/plugins/Tools/MirrorTool/__init__.py:12 msgctxt "@label" msgid "Mirror" @@ -235,14 +277,19 @@ "Your configuration seems to be corrupt. Something seems to be wrong with the following profiles:\n" "- {profiles}\n" "Would you like to reset to factory defaults?" -msgstr "La configurazione sembra essere danneggiata. Qualcosa sembra non funzionare con i seguenti profili:\n- {profiles}\nRipristinare i valori predefiniti in fabbrica?" +msgstr "" +"La configurazione sembra essere danneggiata. Qualcosa sembra non funzionare con i seguenti profili:\n" +"- {profiles}\n" +"Ripristinare i valori predefiniti in fabbrica?" #: /home/ruben/Projects/Uranium/UM/__init__.py:16 +#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:175 msgctxt "@info:status" msgid "Your configuration seems to be corrupt." msgstr "La configurazione sembra essere danneggiata." #: /home/ruben/Projects/Uranium/UM/__init__.py:17 +#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:177 msgctxt "@info:title" msgid "Configuration errors" msgstr "Errori di configurazione" @@ -252,36 +299,66 @@ msgid "Reset your configuration to factory defaults." msgstr "Ripristinare la configurazione ai valori predefiniti in fabbrica." -#: /home/ruben/Projects/Uranium/UM/Settings/Models/InstanceContainersModel.py:189 -#: /home/ruben/Projects/Uranium/UM/Qt/Bindings/MeshFileHandlerProxy.py:48 -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:655 -#: /home/ruben/Projects/Uranium/UM/FileHandler/FileHandler.py:70 +#: /home/ruben/Projects/Uranium/UM/Settings/Models/InstanceContainersModel.py:181 +#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:708 +#: /home/ruben/Projects/Uranium/UM/FileHandler/FileHandler.py:56 #, python-brace-format msgctxt "@item:inlistbox" msgid "All Supported Types ({0})" msgstr "Tutti i tipi supportati ({0})" -#: /home/ruben/Projects/Uranium/UM/Settings/Models/InstanceContainersModel.py:192 -#: /home/ruben/Projects/Uranium/UM/Qt/Bindings/MeshFileHandlerProxy.py:49 -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:656 -#: /home/ruben/Projects/Uranium/UM/FileHandler/FileHandler.py:71 +#: /home/ruben/Projects/Uranium/UM/Settings/Models/InstanceContainersModel.py:184 +#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:709 +#: /home/ruben/Projects/Uranium/UM/FileHandler/FileHandler.py:57 msgctxt "@item:inlistbox" msgid "All Files (*)" msgstr "Tutti i file (*)" -#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:108 +#: /home/ruben/Projects/Uranium/UM/PackageManager.py:233 +#, python-brace-format +msgctxt "@error:uninstall" +msgid "" +"There were some errors uninstalling the following packages:\n" +"{packages}" +msgstr "" +"Si sono verificati alcuni errori durante la disinstallazione dei seguenti pacchetti:\n" +"{packages}" + +#: /home/ruben/Projects/Uranium/UM/PackageManager.py:235 +msgctxt "@info:title" +msgid "Uninstalling errors" +msgstr "Errori di disinstallazione" + +#: /home/ruben/Projects/Uranium/UM/PackageManager.py:454 +#, python-brace-format +msgctxt "@error:update" +msgid "" +"There was an error uninstalling the package {package} before installing new version:\n" +"{error}.\n" +"Please try to upgrade again later." +msgstr "" +"Si è verificato un errore durante la disinstallazione del pacchetto {package} prima di installare la nuova versione:\n" +"{error}.\n" +"Riprovare ad effettuare l’aggiornamento più tardi." + +#: /home/ruben/Projects/Uranium/UM/PackageManager.py:457 +msgctxt "@info:title" +msgid "Updating error" +msgstr "Errore di aggiornamento" + +#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:112 #, python-brace-format msgctxt "@label Short days-hours-minutes format. {0} is days, {1} is hours, {2} is minutes" msgid "{0:0>2}d {1:0>2}h {2:0>2}min" msgstr "{0:0>2}g {1:0>2}h {2:0>2}min" -#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:110 +#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:114 #, python-brace-format msgctxt "@label Short hours-minutes format. {0} is hours, {1} is minutes" msgid "{0:0>2}h {1:0>2}min" msgstr "{0:0>2}h {1:0>2}min" -#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:113 +#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:117 #, python-brace-format msgctxt "@label Long duration format. {0} is days" msgid "{0} day" @@ -289,8 +366,8 @@ msgstr[0] "{0} giorno" msgstr[1] "{0} giorni" -#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:113 -#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:115 +#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:117 +#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:119 #, python-brace-format msgctxt "@label Long duration format. {0} is hours" msgid "{0} hour" @@ -298,9 +375,9 @@ msgstr[0] "{0} ora" msgstr[1] "{0} ore" -#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:113 -#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:115 #: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:117 +#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:119 +#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:121 #, python-brace-format msgctxt "@label Long duration format. {0} is minutes" msgid "{0} minute" @@ -308,150 +385,159 @@ msgstr[0] "{0} minuto" msgstr[1] "{0} minuti" -#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:112 +#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:159 +msgctxt "@info:progress" +msgid "Initializing package manager..." +msgstr "Inizializzazione gestione pacchetti..." + +#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:180 msgctxt "@info:progress" msgid "Loading plugins..." msgstr "Caricamento plugin in corso..." -#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:119 +#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:187 msgctxt "@info:progress" msgid "Updating configuration..." msgstr "Aggiornamento configurazione in corso..." -#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:136 +#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:205 msgctxt "@info:progress" msgid "Loading preferences..." msgstr "Caricamento preferenze in corso..." -#: /home/ruben/Projects/Uranium/UM/Mesh/ReadMeshJob.py:65 +#: /home/ruben/Projects/Uranium/UM/Mesh/ReadMeshJob.py:68 #, python-format, python-brace-format msgctxt "@info:status" msgid "Auto scaled object to {0}% of original size" msgstr "Ridimensionamento automatico dell'oggetto a {0}% della dimensione originale" -#: /home/ruben/Projects/Uranium/UM/Mesh/ReadMeshJob.py:65 +#: /home/ruben/Projects/Uranium/UM/Mesh/ReadMeshJob.py:68 msgctxt "@info:title" msgid "Scaling Object" msgstr "Ridimensionamento Oggetto" -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:220 +#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:277 msgctxt "@info:status" msgid "" "The plugin has been installed.\n" "Please re-start the application to activate the plugin." -msgstr "Il plugin è stato installato.\nRiavviare l'applicazione per attivare il plugin." - -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:231 -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:270 -#, python-brace-format -msgctxt "@info:status" -msgid "" -"Failed to install plugin from {0}:\n" -"{1}" -msgstr "Installazione plugin da {0}:\n{1} non riuscita" - -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:254 -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:259 -#, python-brace-format -msgctxt "@info:status" -msgid "" -"Failed to install the plugin;\n" -"{0}" -msgstr "Installazione del plugin non riuscita;\n{0}" +msgstr "" +"Il plugin è stato installato.\n" +"Riavviare l'applicazione per attivare il plugin." -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:421 +#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:415 #, python-brace-format msgctxt "@info:status" msgid "" "The plugin has been removed.\n" "Please restart {0} to finish uninstall." -msgstr "Il plugin è stato rimosso.\nSi prega di riavviare {0} per completare la disinstallazione." - -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:433 -#, python-brace-format -msgctxt "@info:status" -msgid "Failed to uninstall plugin. Plugin will be removed after {0} restarts." -msgstr "Disinstallazione plugin non riuscita. Il plugin verrà rimosso dopo il riavvio di {0}." +msgstr "" +"Il plugin è stato rimosso.\n" +"Si prega di riavviare {0} per completare la disinstallazione." -#: /home/ruben/Projects/Uranium/UM/VersionUpgradeManager.py:123 +#: /home/ruben/Projects/Uranium/UM/VersionUpgradeManager.py:155 #, python-brace-format msgctxt "@info:version-upgrade" msgid "A configuration from an older version of {0} was imported." msgstr "È stata importata una configurazione da una versione precedente {0}." -#: /home/ruben/Projects/Uranium/UM/View/GL/OpenGL.py:50 +#: /home/ruben/Projects/Uranium/UM/View/GL/OpenGL.py:58 +#: /home/ruben/Projects/Uranium/UM/View/GL/OpenGL.py:63 msgctxt "@message" msgid "Failed to Initialize OpenGL" msgstr "Inizializzazione OpenGL non riuscita" -#: /home/ruben/Projects/Uranium/UM/View/GL/OpenGL.py:60 +#: /home/ruben/Projects/Uranium/UM/View/GL/OpenGL.py:73 msgctxt "Critical OpenGL Extensions Missing" msgid "Critical OpenGL extensions are missing. This program requires support for Framebuffer Objects. Please check your video card drivers." msgstr "Estensioni OpenGL fondamentali assenti. Questo programma richiede supporto per Framebuffer Objects. Si prega di controllare i driver della scheda video." -#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:153 +#: /home/ruben/Projects/Uranium/UM/ConfigurationErrorMessage.py:32 +#: /home/ruben/Projects/Uranium/plugins/Tools/ScaleTool/ScaleTool.qml:67 +#: /home/ruben/Projects/Uranium/plugins/Tools/RotateTool/RotateTool.qml:21 +msgctxt "@action:button" +msgid "Reset" +msgstr "Reset" + +#: /home/ruben/Projects/Uranium/UM/ConfigurationErrorMessage.py:44 +#, python-brace-format +msgctxt "@info:status" +msgid "" +"Your configuration seems to be corrupt. Something seems to be wrong with the following profiles:\n" +"- {profiles}\n" +" Would you like to reset to factory defaults? Reset will remove all your current printers and profiles." +msgstr "" +"La configurazione sembra essere danneggiata. Qualcosa sembra non funzionare con i seguenti profili:\n" +"- {profiles}\n" +" Ripristinare i valori predefiniti in fabbrica? Il ripristino rimuove tutte le stampanti e i profili correnti." + +#: /home/ruben/Projects/Uranium/UM/ConfigurationErrorMessage.py:49 +msgctxt "@title:window" +msgid "Reset to factory" +msgstr "Ripristino delle impostazioni di fabbrica" + +#: /home/ruben/Projects/Uranium/UM/ConfigurationErrorMessage.py:51 +msgctxt "@label" +msgid "Reset will remove all your current printers and profiles! Are you sure you want to reset?" +msgstr "Il ripristino rimuove tutte le stampanti e i profili correnti. Sei sicuro di voler effettuare il ripristino?" + +#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:162 #, python-brace-format msgctxt "@info" msgid "Would you like to reload {filename}?" msgstr "Si desidera ricaricare {filename}?" -#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:154 +#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:163 msgctxt "@info:title" msgid "File has been modified" msgstr "Il file è stato modificato" -#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:155 +#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:164 msgctxt "@action:button" msgid "Reload" msgstr "Ricarica" -#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:155 +#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:164 msgctxt "@action:description" msgid "This will trigger the modified files to reload from disk." msgstr "Attiva i file modificati per la ricarica dal disco." -#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:32 +#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:36 #, python-brace-format msgctxt "@info:status Don't translate the XML tag !" msgid "Cannot open files of the type of {0}" msgstr "Impossibile aprire i file tipo {0}" -#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:32 -#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:47 -#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:70 +#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:36 +#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:51 +#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:74 msgctxt "@info:title" msgid "Invalid File" msgstr "File non valido" -#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:45 -#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:70 +#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:49 +#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:74 #, python-brace-format msgctxt "@info:status Don't translate the XML tag !" msgid "Failed to load {0}" msgstr "Impossibile caricare {0}" -#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:54 +#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:59 msgctxt "@info:title" msgid "Loading" msgstr "Caricamento in corso" -#: /home/ruben/Projects/Uranium/plugins/Tools/ScaleTool/ScaleTool.qml:60 -#: /home/ruben/Projects/Uranium/plugins/Tools/RotateTool/RotateTool.qml:21 -msgctxt "@action:button" -msgid "Reset" -msgstr "Reset" - -#: /home/ruben/Projects/Uranium/plugins/Tools/ScaleTool/ScaleTool.qml:86 +#: /home/ruben/Projects/Uranium/plugins/Tools/ScaleTool/ScaleTool.qml:93 msgctxt "@option:check" msgid "Snap Scaling" msgstr "Ridimensionamento aggancio (Snap)" -#: /home/ruben/Projects/Uranium/plugins/Tools/ScaleTool/ScaleTool.qml:104 +#: /home/ruben/Projects/Uranium/plugins/Tools/ScaleTool/ScaleTool.qml:121 msgctxt "@option:check" msgid "Uniform Scaling" msgstr "Ridimensionamento uniforme" -#: /home/ruben/Projects/Uranium/plugins/Tools/TranslateTool/TranslateTool.qml:177 +#: /home/ruben/Projects/Uranium/plugins/Tools/TranslateTool/TranslateTool.qml:196 msgctxt "@option:check" msgid "Lock Model" msgstr "Blocca modello" @@ -461,89 +547,37 @@ msgid "Lay flat" msgstr "Posiziona in piano" -#: /home/ruben/Projects/Uranium/plugins/Tools/RotateTool/RotateTool.qml:55 +#: /home/ruben/Projects/Uranium/plugins/Tools/RotateTool/RotateTool.qml:60 +msgctxt "@action:button" +msgid "Select face to align to the build plate" +msgstr "Selezionare la superficie da allineare al piano di stampa" + +#: /home/ruben/Projects/Uranium/plugins/Tools/RotateTool/RotateTool.qml:81 msgctxt "@action:checkbox" msgid "Snap Rotation" msgstr "Rotazione di aggancio (Snap)" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:19 -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:148 -msgctxt "@title:tab" -msgid "Plugins" -msgstr "Plugin" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:28 -msgctxt "@action:button" -msgid "Install new plugin" -msgstr "Installa nuovo plugin" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:51 -msgctxt "@label" -msgid "You will need to restart the application before changes in plugins have effect." -msgstr "Riavviare l'applicazione per rendere effettive le modifiche ai plugin." - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:87 -msgctxt "@label" -msgid "This plugin is required for the application to run." -msgstr "Questo plugin è necessario per il funzionamento dell'applicazione." - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:104 -msgctxt "@label" -msgid "Info..." -msgstr "Informazioni..." - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:122 -msgctxt "@window:title" -msgid "Install Plugin" -msgstr "Installa plugin" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:131 -msgctxt "@title:window" -msgid "Open file(s)" -msgstr "Apri file" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:165 -msgctxt "@label" -msgid "No text available" -msgstr "Nessun testo disponibile" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:171 -msgctxt "@title:window" -msgid "About %1" -msgstr "Circa %1" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:203 -msgctxt "@label" -msgid "Author:" -msgstr "Autore:" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:225 -msgctxt "@label" -msgid "Version:" -msgstr "Versione:" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:243 -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:113 -msgctxt "@action:button" -msgid "Close" -msgstr "Chiudi" - #: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:18 msgctxt "@title:window" msgid "Preferences" msgstr "Preferenze" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:106 +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:107 msgctxt "@action:button" msgid "Defaults" msgstr "Valori predefiniti" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:146 +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:115 +msgctxt "@action:button" +msgid "Close" +msgstr "Chiudi" + +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:148 msgctxt "@title:tab" msgid "General" msgstr "Generale" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:147 +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:149 msgctxt "@title:tab" msgid "Settings" msgstr "Impostazioni" @@ -553,44 +587,34 @@ msgid "Rename" msgstr "Rinomina" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/RenameDialog.qml:56 +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/RenameDialog.qml:20 +msgctxt "@info" +msgid "Please provide a new name." +msgstr "Indicare un nuovo nome." + +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/RenameDialog.qml:70 #: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Wizard.qml:241 msgctxt "@action:button" msgid "Cancel" msgstr "Annulla" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/RenameDialog.qml:60 +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/RenameDialog.qml:75 msgctxt "@action:button" msgid "OK" msgstr "OK" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/SettingVisibilityItem.qml:34 +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/SettingVisibilityItem.qml:32 msgctxt "@item:tooltip" msgid "This setting has been hidden by the active machine and will not be visible." msgstr "Questa impostazione è stata nascosta dalla macchina attiva e non sarà visibile." -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/SettingVisibilityItem.qml:51 +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/SettingVisibilityItem.qml:49 msgctxt "@item:tooltip %1 is list of setting names" msgid "This setting has been hidden by the value of %1. Change the value of that setting to make this setting visible." msgid_plural "This setting has been hidden by the values of %1. Change the values of those settings to make this setting visible." msgstr[0] "Questa impostazione è stata nascosta dal valore di %1. Modifica il valore di tale impostazione per rendere visibile l’impostazione." msgstr[1] "Questa impostazione è stata nascosta dai valori di %1. Modifica i valori di tali impostazioni per rendere visibile questa impostazione." -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/SettingVisibilityPage.qml:12 -msgctxt "@title:tab" -msgid "Setting Visibility" -msgstr "Impostazione visibilità" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/SettingVisibilityPage.qml:42 -msgctxt "@label:textbox" -msgid "Check all" -msgstr "Controlla tutto" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/SettingVisibilityPage.qml:89 -msgctxt "@label:textbox" -msgid "Filter..." -msgstr "Filtro..." - #: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/MachinesPage.qml:12 msgctxt "@title:tab" msgid "Printers" @@ -611,86 +635,6 @@ msgid "Are you sure you wish to remove %1? This cannot be undone!" msgstr "Sei sicuro di voler rimuovere %1? Questa operazione non può essere annullata!" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:14 -msgctxt "@title:tab" -msgid "Profiles" -msgstr "Profili" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:15 -msgctxt "@label" -msgid "Duplicate" -msgstr "Duplica" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:45 -msgctxt "@label %1 is printer name" -msgid "Printer: %1" -msgstr "Stampante: %1" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:83 -msgctxt "@action:button" -msgid "Update \"%1\"" -msgstr "Aggiorna \"%1\"" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:84 -msgctxt "@action:button" -msgid "Update profile" -msgstr "Aggiorna profilo" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:92 -msgctxt "@action:button" -msgid "Discard current changes" -msgstr "Elimina le modifiche correnti" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:93 -msgctxt "@action:button" -msgid "Reload profile" -msgstr "Ricarica profilo" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:107 -msgctxt "@label" -msgid "Based on" -msgstr "Basato su" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:107 -msgctxt "@label" -msgid "Profile type" -msgstr "Tipo profilo" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:112 -msgctxt "@label" -msgid "Protected profile" -msgstr "Profilo protetto" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:112 -msgctxt "@label" -msgid "Custom profile" -msgstr "Profilo personalizzato" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:139 -msgctxt "@action:button" -msgid "Import" -msgstr "Importa" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:146 -msgctxt "@action:button" -msgid "Export" -msgstr "Esporta" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:184 -msgctxt "@window:title" -msgid "Import Profile" -msgstr "Importa profilo" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:192 -msgctxt "@title:window" -msgid "Import Profile" -msgstr "Importa profilo" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:219 -msgctxt "@title:window" -msgid "Export Profile" -msgstr "Esporta profilo" - #: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Wizard.qml:215 msgctxt "@action:button" msgid "Back" @@ -906,6 +850,186 @@ msgid "Mirror Tool" msgstr "Strumento immagine speculare" +#~ msgctxt "@title:tab" +#~ msgid "Plugins" +#~ msgstr "Plugin" + +#~ msgctxt "@action:button" +#~ msgid "Install new plugin" +#~ msgstr "Installa nuovo plugin" + +#~ msgctxt "@label" +#~ msgid "You will need to restart the application before changes in plugins have effect." +#~ msgstr "Riavviare l'applicazione per rendere effettive le modifiche ai plugin." + +#~ msgctxt "@label" +#~ msgid "This plugin is required for the application to run." +#~ msgstr "Questo plugin è necessario per il funzionamento dell'applicazione." + +#~ msgctxt "@label" +#~ msgid "Info..." +#~ msgstr "Informazioni..." + +#~ msgctxt "@window:title" +#~ msgid "Install Plugin" +#~ msgstr "Installa plugin" + +#~ msgctxt "@title:window" +#~ msgid "Open file(s)" +#~ msgstr "Apri file" + +#~ msgctxt "@label" +#~ msgid "No text available" +#~ msgstr "Nessun testo disponibile" + +#~ msgctxt "@title:window" +#~ msgid "About %1" +#~ msgstr "Circa %1" + +#~ msgctxt "@label" +#~ msgid "Author:" +#~ msgstr "Autore:" + +#~ msgctxt "@label" +#~ msgid "Version:" +#~ msgstr "Versione:" + +#~ msgctxt "@action:button" +#~ msgid "Learn more about the new features" +#~ msgstr "Per saperne di più sulle nuove funzionalità" + +#~ msgctxt "@info:status" +#~ msgid "Cura {0} is available!" +#~ msgstr "Cura {0} è disponibile!" + +#~ msgctxt "@info:status" +#~ msgid "Cura {0} provides better and reliable printing experience." +#~ msgstr "Cura {0} fornisce un'esperienza di stampa migliore ed affidabile." + +#~ msgctxt "@action:button" +#~ msgid "Learn more about new features" +#~ msgstr "Per saperne di più sulle nuove funzionalità" + +#~ msgctxt "@error:update" +#~ msgid "" +#~ "There was an error uninstalling the package {package} before installingnew version:\n" +#~ "{error}.\n" +#~ "Please try to upgrade again later." +#~ msgstr "" +#~ "Si è verificato un errore durante la disinstallazione del pacchetto {package} prima di installare la nuova versione:\n" +#~ "{error}.\n" +#~ "Riprovare ad effettuare l’aggiornamento più tardi." + +#~ msgctxt "@info:status" +#~ msgid "" +#~ "Your configuration seems to be corrupt. Something seems to be wrong with the following profiles:\n" +#~ "- {profiles}\n" +#~ "Would you like to reset to factory defaults? Reset will remove all your current printers and profiles." +#~ msgstr "" +#~ "La configurazione sembra essere danneggiata. Qualcosa sembra non funzionare con i seguenti profili:\n" +#~ "- {profiles}\n" +#~ "Ripristinare i valori predefiniti in fabbrica? Il ripristino rimuove tutte le stampanti e i profili correnti." + +#~ msgctxt "@info" +#~ msgid "A new version is available!" +#~ msgstr "È disponibile una nuova versione!" + +#~ msgctxt "@info:status" +#~ msgid "" +#~ "Failed to install plugin from {0}:\n" +#~ "{1}" +#~ msgstr "" +#~ "Installazione plugin da {0}:\n" +#~ "{1} non riuscita" + +#~ msgctxt "@info:status" +#~ msgid "" +#~ "Failed to install the plugin;\n" +#~ "{0}" +#~ msgstr "" +#~ "Installazione del plugin non riuscita;\n" +#~ "{0}" + +#~ msgctxt "@info:status" +#~ msgid "Failed to uninstall plugin. Plugin will be removed after {0} restarts." +#~ msgstr "Disinstallazione plugin non riuscita. Il plugin verrà rimosso dopo il riavvio di {0}." + +#~ msgctxt "@title:tab" +#~ msgid "Setting Visibility" +#~ msgstr "Impostazione visibilità" + +#~ msgctxt "@label:textbox" +#~ msgid "Check all" +#~ msgstr "Controlla tutto" + +#~ msgctxt "@label:textbox" +#~ msgid "Filter..." +#~ msgstr "Filtro..." + +#~ msgctxt "@title:tab" +#~ msgid "Profiles" +#~ msgstr "Profili" + +#~ msgctxt "@label" +#~ msgid "Duplicate" +#~ msgstr "Duplica" + +#~ msgctxt "@label %1 is printer name" +#~ msgid "Printer: %1" +#~ msgstr "Stampante: %1" + +#~ msgctxt "@action:button" +#~ msgid "Update \"%1\"" +#~ msgstr "Aggiorna \"%1\"" + +#~ msgctxt "@action:button" +#~ msgid "Update profile" +#~ msgstr "Aggiorna profilo" + +#~ msgctxt "@action:button" +#~ msgid "Discard current changes" +#~ msgstr "Elimina le modifiche correnti" + +#~ msgctxt "@action:button" +#~ msgid "Reload profile" +#~ msgstr "Ricarica profilo" + +#~ msgctxt "@label" +#~ msgid "Based on" +#~ msgstr "Basato su" + +#~ msgctxt "@label" +#~ msgid "Profile type" +#~ msgstr "Tipo profilo" + +#~ msgctxt "@label" +#~ msgid "Protected profile" +#~ msgstr "Profilo protetto" + +#~ msgctxt "@label" +#~ msgid "Custom profile" +#~ msgstr "Profilo personalizzato" + +#~ msgctxt "@action:button" +#~ msgid "Import" +#~ msgstr "Importa" + +#~ msgctxt "@action:button" +#~ msgid "Export" +#~ msgstr "Esporta" + +#~ msgctxt "@window:title" +#~ msgid "Import Profile" +#~ msgstr "Importa profilo" + +#~ msgctxt "@title:window" +#~ msgid "Import Profile" +#~ msgstr "Importa profilo" + +#~ msgctxt "@title:window" +#~ msgid "Export Profile" +#~ msgstr "Esporta profilo" + #~ msgctxt "@info" #~ msgid "An exception occurred while checking for updates." #~ msgstr "Si è verificata un'eccezione durante il controllo degli aggiornamenti." diff -Nru uranium-3.3.0/resources/i18n/ja_JP/uranium.po uranium-4.4.1/resources/i18n/ja_JP/uranium.po --- uranium-3.3.0/resources/i18n/ja_JP/uranium.po 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/resources/i18n/ja_JP/uranium.po 2019-11-19 10:50:46.000000000 +0000 @@ -1,14 +1,14 @@ # Uranium -# Copyright (C) 2018 Ultimaker +# Copyright (C) 2019 Ultimaker B.V. # This file is distributed under the same license as the Uranium package. -# Ruben Dulek , 2018. +# Ruben Dulek , 2019. # msgid "" msgstr "" -"Project-Id-Version: Uranium 3.3\n" +"Project-Id-Version: Uranium 4.4\n" "Report-Msgid-Bugs-To: r.dulek@ultimaker.com\n" -"POT-Creation-Date: 2018-03-29 08:36+0200\n" -"PO-Revision-Date: 2018-04-11 15:55+0100\n" +"POT-Creation-Date: 2019-11-05 13:40+0100\n" +"PO-Revision-Date: 2019-09-23 13:25+0200\n" "Last-Translator: Bothof \n" "Language-Team: Brule , Japanese \n" "Language: ja_JP\n" @@ -16,7 +16,7 @@ "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: Poedit 2.0.4\n" +"X-Generator: Poedit 2.2.1\n" #: /home/ruben/Projects/Uranium/plugins/Views/SimpleView/__init__.py:12 msgctxt "@item:inmenu" @@ -34,6 +34,17 @@ msgid "Wavefront OBJ File" msgstr "ウェーブフロントOBJファイル" +#: /home/ruben/Projects/Uranium/plugins/FileHandlers/OBJWriter/OBJWriter.py:23 +msgctxt "@error:not supported" +msgid "OBJWriter does not support non-text mode." +msgstr "OBJWriter は非テキストモードはサポートしていません。" + +#: /home/ruben/Projects/Uranium/plugins/FileHandlers/OBJWriter/OBJWriter.py:30 +#: /home/ruben/Projects/Uranium/plugins/FileHandlers/STLWriter/STLWriter.py:27 +msgctxt "@error:no mesh" +msgid "There is no mesh to write." +msgstr "書き込むメッシュがありません。" + #: /home/ruben/Projects/Uranium/plugins/FileHandlers/STLWriter/__init__.py:17 msgctxt "@item:inlistbox" msgid "STL File (ASCII)" @@ -44,80 +55,101 @@ msgid "STL File (Binary)" msgstr "STLファイル(バイナリー)" -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:42 +#: /home/ruben/Projects/Uranium/plugins/FileHandlers/STLWriter/STLWriter.py:36 +msgctxt "@error:not supported" +msgid "Unsupported output mode writing STL to stream." +msgstr "サポートされていない出力モードで STL をストリームに書き込んでいます。" + +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:50 msgctxt "@info" msgid "Could not access update information." msgstr "必要なアップデートの情報にアクセスできません。" -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:43 -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:60 -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:71 -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:89 -#: /home/ruben/Projects/Uranium/UM/VersionUpgradeManager.py:123 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:51 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:68 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:97 +#: /home/ruben/Projects/Uranium/UM/VersionUpgradeManager.py:155 msgctxt "@info:title" msgid "Version Upgrade" msgstr "バージョンアップグレード" -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:55 -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:60 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:63 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:68 msgctxt "@info" msgid "The version you are using does not support checking for updates." msgstr "ご使用のバージョンはアップデート更新通知をサポートしていません。" -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:55 -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:178 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:63 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:188 msgctxt "@info:title" msgid "Warning" msgstr "警告" -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:71 -msgctxt "@info" -msgid "A new version is available!" -msgstr "新しいバージョンが利用可能です。" - -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:72 -msgctxt "@action:button" -msgid "Download" -msgstr "ダウンロード" - -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:85 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:93 msgctxt "@info" msgid "An error occurred while checking for updates." msgstr "アップデート確認中にエラーが起こりました。" -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:85 -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:185 -#: /home/ruben/Projects/Uranium/UM/Qt/Bindings/OutputDeviceManagerProxy.py:128 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:93 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:195 +#: /home/ruben/Projects/Uranium/UM/Qt/Bindings/OutputDeviceManagerProxy.py:141 msgctxt "@info:title" msgid "Error" msgstr "エラー" -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:89 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:97 msgctxt "@info" msgid "No new version was found." msgstr "新しいバージョンが見つかりました。" +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:102 +#, python-brace-format +msgctxt "@info:status" +msgid "{application_name} {version_number} is available!" +msgstr "{application_name} {version_number} が利用可能です!" + +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:104 +#, python-brace-format +msgctxt "@info:status" +msgid "{application_name} {version_number} provides a better and more reliable printing experience." +msgstr "{application_name} {version_number} なら、より優れた信頼性の隊かい印刷体験が得られます。" + +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:107 +msgctxt "@action:button" +msgid "Download" +msgstr "ダウンロード" + +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:109 +msgctxt "@action:button" +msgid "Learn more" +msgstr "詳しく見る" + #: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateChecker.py:26 msgctxt "@item:inmenu" +msgid "Update Checker" +msgstr "アップデートチェッカー" + +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateChecker.py:27 +msgctxt "@item:inmenu" msgid "Check for Updates" msgstr "アップデートがあるか確認する" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:33 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:30 msgctxt "@item:inmenu" msgid "Local File" msgstr "ローカルファイル" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:34 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:31 msgctxt "@action:button Preceded by 'Ready to'." msgid "Save to File" msgstr "ファイルに保存する" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:35 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:32 msgctxt "@info:tooltip" msgid "Save to File" msgstr "ファイルに保存する" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:56 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:53 msgctxt "@title:window" msgid "Save to File" msgstr "ファイルに保存する" @@ -127,63 +159,63 @@ msgid "There are no file types available to write with!" msgstr "書き出すために利用可能なファイルがありません!" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:121 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:130 msgctxt "@title:window" msgid "File Already Exists" -msgstr "すでに存在するファイルです。" +msgstr "すでに存在するファイルです" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:121 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:130 #, python-brace-format msgctxt "@label Don't translate the XML tag !" msgid "The file {0} already exists. Are you sure you want to overwrite it?" -msgstr "{0} は既に存在します。ファイルを上書きしますか? " +msgstr "{0} は既に存在します。ファイルを上書きしますか?" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:150 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:160 #, python-brace-format msgctxt "@info:progress Don't translate the XML tags !" msgid "Saving to {0}" msgstr "{0}に保存する" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:151 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:161 msgctxt "@info:title" msgid "Saving" msgstr "保存中" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:159 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:169 #, python-brace-format msgctxt "@info:status Don't translate the XML tags !" msgid "Permission denied when trying to save {0}" -msgstr " {0}保存中に却下されました。" +msgstr "{0}保存中に却下されました" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:162 -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:178 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:172 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:188 #, python-brace-format msgctxt "@info:status Don't translate the XML tags or !" msgid "Could not save to {0}: {1}" msgstr "{0}を保存できませんでした: {1}" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:172 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:182 #, python-brace-format msgctxt "@info:status Don't translate the XML tags !" msgid "Saved to {0}" -msgstr "{0}に保存しました。" +msgstr "{0}に保存しました" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:172 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:182 msgctxt "@info:title" msgid "File Saved" msgstr "ファイル保存" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:173 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:183 msgctxt "@action:button" msgid "Open Folder" msgstr "フォルダーを開く" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:173 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:183 msgctxt "@info:tooltip" msgid "Open the folder containing the file" msgstr "ファイルが入ったフォルダーを開く" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:185 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:195 #, python-brace-format msgctxt "@info:status" msgid "Something went wrong saving to {0}: {1}" @@ -219,6 +251,16 @@ msgid "Rotate Model" msgstr "モデルを回転させる" +#: /home/ruben/Projects/Uranium/plugins/Tools/RotateTool/RotateTool.py:279 +msgctxt "@label" +msgid "Laying object flat on buildplate..." +msgstr "オブジェクトをビルドプレート上に平に並べる…" + +#: /home/ruben/Projects/Uranium/plugins/Tools/RotateTool/RotateTool.py:279 +msgctxt "@title" +msgid "Object Rotation" +msgstr "オブジェクト回転" + #: /home/ruben/Projects/Uranium/plugins/Tools/MirrorTool/__init__.py:12 msgctxt "@label" msgid "Mirror" @@ -236,14 +278,19 @@ "Your configuration seems to be corrupt. Something seems to be wrong with the following profiles:\n" "- {profiles}\n" "Would you like to reset to factory defaults?" -msgstr "構成が破損している可能性があります。以下のプロファイルでエラーが発生しています:\n- {profiles}\n工場出荷状態にリセットしますか?" +msgstr "" +"構成が破損している可能性があります。以下のプロファイルでエラーが発生しています:\n" +"- {profiles}\n" +"工場出荷状態にリセットしますか?" #: /home/ruben/Projects/Uranium/UM/__init__.py:16 +#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:175 msgctxt "@info:status" msgid "Your configuration seems to be corrupt." msgstr "構成が破損している可能性があります。" #: /home/ruben/Projects/Uranium/UM/__init__.py:17 +#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:177 msgctxt "@info:title" msgid "Configuration errors" msgstr "構成エラー" @@ -253,37 +300,67 @@ msgid "Reset your configuration to factory defaults." msgstr "構成を工場出荷状態にリセットします。" -#: /home/ruben/Projects/Uranium/UM/Settings/Models/InstanceContainersModel.py:189 -#: /home/ruben/Projects/Uranium/UM/Qt/Bindings/MeshFileHandlerProxy.py:48 -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:655 -#: /home/ruben/Projects/Uranium/UM/FileHandler/FileHandler.py:70 +#: /home/ruben/Projects/Uranium/UM/Settings/Models/InstanceContainersModel.py:181 +#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:708 +#: /home/ruben/Projects/Uranium/UM/FileHandler/FileHandler.py:56 #, python-brace-format msgctxt "@item:inlistbox" msgid "All Supported Types ({0})" msgstr "すべてのサポートのタイプ ({0})" -#: /home/ruben/Projects/Uranium/UM/Settings/Models/InstanceContainersModel.py:192 -#: /home/ruben/Projects/Uranium/UM/Qt/Bindings/MeshFileHandlerProxy.py:49 -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:656 -#: /home/ruben/Projects/Uranium/UM/FileHandler/FileHandler.py:71 +#: /home/ruben/Projects/Uranium/UM/Settings/Models/InstanceContainersModel.py:184 +#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:709 +#: /home/ruben/Projects/Uranium/UM/FileHandler/FileHandler.py:57 msgctxt "@item:inlistbox" msgid "All Files (*)" msgstr "全てのファイル" -#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:108 +#: /home/ruben/Projects/Uranium/UM/PackageManager.py:233 +#, python-brace-format +msgctxt "@error:uninstall" +msgid "" +"There were some errors uninstalling the following packages:\n" +"{packages}" +msgstr "" +"次のパッケージのアンインストールでエラーが発生しました:\n" +"{packages}" + +#: /home/ruben/Projects/Uranium/UM/PackageManager.py:235 +msgctxt "@info:title" +msgid "Uninstalling errors" +msgstr "アンインストールエラー" + +#: /home/ruben/Projects/Uranium/UM/PackageManager.py:454 +#, python-brace-format +msgctxt "@error:update" +msgid "" +"There was an error uninstalling the package {package} before installing new version:\n" +"{error}.\n" +"Please try to upgrade again later." +msgstr "" +"新しいバージョンをインストールする前に、パッケージ {package} のアンインストールでエラーが発生しました:\n" +"{error}.\n" +"後からアップグレードをやり直してください。" + +#: /home/ruben/Projects/Uranium/UM/PackageManager.py:457 +msgctxt "@info:title" +msgid "Updating error" +msgstr "アップデートエラー" + +#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:112 #, python-brace-format msgctxt "@label Short days-hours-minutes format. {0} is days, {1} is hours, {2} is minutes" msgid "{0:0>2}d {1:0>2}h {2:0>2}min" msgstr "{0:0>2}日 {1:0>2}時間 {2:0>2}分" -#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:110 +#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:114 #, python-brace-format msgctxt "@label Short hours-minutes format. {0} is hours, {1} is minutes" msgid "{0:0>2}h {1:0>2}min" msgstr "{0:0>2}時間 {1:0>2}分" # can’t add japanese text -#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:113 +#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:117 #, python-brace-format msgctxt "@label Long duration format. {0} is days" msgid "{0} day" @@ -291,8 +368,8 @@ msgstr[0] "{0}日" # can’t add japanese texts -#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:113 -#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:115 +#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:117 +#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:119 #, python-brace-format msgctxt "@label Long duration format. {0} is hours" msgid "{0} hour" @@ -300,159 +377,168 @@ msgstr[0] "{0}時間" # can’t add japanese text -#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:113 -#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:115 #: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:117 +#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:119 +#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:121 #, python-brace-format msgctxt "@label Long duration format. {0} is minutes" msgid "{0} minute" msgid_plural "{0} minutes" msgstr[0] "{0}分" -#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:112 +#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:159 +msgctxt "@info:progress" +msgid "Initializing package manager..." +msgstr "パッケージマネージャーを初期化中..." + +#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:180 msgctxt "@info:progress" msgid "Loading plugins..." msgstr "プラグインをロードする…" -#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:119 +#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:187 msgctxt "@info:progress" msgid "Updating configuration..." msgstr "コンフィグレーションをアップデートする…" -#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:136 +#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:205 msgctxt "@info:progress" msgid "Loading preferences..." -msgstr "プレファレンスをロード中" +msgstr "プレファレンスをロード中…" -#: /home/ruben/Projects/Uranium/UM/Mesh/ReadMeshJob.py:65 +#: /home/ruben/Projects/Uranium/UM/Mesh/ReadMeshJob.py:68 #, python-format, python-brace-format msgctxt "@info:status" msgid "Auto scaled object to {0}% of original size" msgstr "自動的に造形物をオリジナルサイズの {0}%にスケールする。" -#: /home/ruben/Projects/Uranium/UM/Mesh/ReadMeshJob.py:65 +#: /home/ruben/Projects/Uranium/UM/Mesh/ReadMeshJob.py:68 msgctxt "@info:title" msgid "Scaling Object" msgstr "造形物をスケールする" -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:220 +#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:277 msgctxt "@info:status" msgid "" "The plugin has been installed.\n" "Please re-start the application to activate the plugin." -msgstr "プラグインがインストールされました。\nアプリケーションを再起動して、プラグインをアクティベートしてください。" - -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:231 -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:270 -#, python-brace-format -msgctxt "@info:status" -msgid "" -"Failed to install plugin from {0}:\n" -"{1}" -msgstr "プラグインのインストールに失敗しました。{0}:\n{1}" - -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:254 -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:259 -#, python-brace-format -msgctxt "@info:status" -msgid "" -"Failed to install the plugin;\n" -"{0}" -msgstr "プラグインのインストールに失敗しました。\n{0}" +msgstr "" +"プラグインがインストールされました。\n" +"アプリケーションを再起動して、プラグインをアクティベートしてください。" -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:421 +#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:415 #, python-brace-format msgctxt "@info:status" msgid "" "The plugin has been removed.\n" "Please restart {0} to finish uninstall." -msgstr "プラグインが外されました。\n{0} を再起動してアンインストールを終了してください。" - -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:433 -#, python-brace-format -msgctxt "@info:status" -msgid "Failed to uninstall plugin. Plugin will be removed after {0} restarts." -msgstr "プラグインのアンインストールに失敗しました。プラグインは {0} を再起動すると削除されます。" +msgstr "" +"プラグインが外されました。\n" +"{0} を再起動してアンインストールを終了してください。" -#: /home/ruben/Projects/Uranium/UM/VersionUpgradeManager.py:123 +#: /home/ruben/Projects/Uranium/UM/VersionUpgradeManager.py:155 #, python-brace-format msgctxt "@info:version-upgrade" msgid "A configuration from an older version of {0} was imported." msgstr "前のバージョン {0} のコンフィグレーションが取り込まれました。" -#: /home/ruben/Projects/Uranium/UM/View/GL/OpenGL.py:50 +#: /home/ruben/Projects/Uranium/UM/View/GL/OpenGL.py:58 +#: /home/ruben/Projects/Uranium/UM/View/GL/OpenGL.py:63 msgctxt "@message" msgid "Failed to Initialize OpenGL" -msgstr "OpenGLの初期化に失敗しました。" +msgstr "OpenGLの初期化に失敗しました" -#: /home/ruben/Projects/Uranium/UM/View/GL/OpenGL.py:60 +#: /home/ruben/Projects/Uranium/UM/View/GL/OpenGL.py:73 msgctxt "Critical OpenGL Extensions Missing" msgid "Critical OpenGL extensions are missing. This program requires support for Framebuffer Objects. Please check your video card drivers." msgstr "重要なOpenGLの拡張子が見つかりません。このプログラムではフレームバファーオブジェクトのサポートが必須です。ビデオカードドライバーをチェックしてください。" -#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:153 +#: /home/ruben/Projects/Uranium/UM/ConfigurationErrorMessage.py:32 +#: /home/ruben/Projects/Uranium/plugins/Tools/ScaleTool/ScaleTool.qml:67 +#: /home/ruben/Projects/Uranium/plugins/Tools/RotateTool/RotateTool.qml:21 +msgctxt "@action:button" +msgid "Reset" +msgstr "リセットする" + +#: /home/ruben/Projects/Uranium/UM/ConfigurationErrorMessage.py:44 +#, python-brace-format +msgctxt "@info:status" +msgid "" +"Your configuration seems to be corrupt. Something seems to be wrong with the following profiles:\n" +"- {profiles}\n" +" Would you like to reset to factory defaults? Reset will remove all your current printers and profiles." +msgstr "" +"構成が破損している可能性があります。以下のプロファイルでエラーが発生しています:\n" +"- {profiles}\n" +"工場出荷状態にリセットしますか?リセットすると使用してるすべてのプリンターおよびプロファイルが削除されます。" + +#: /home/ruben/Projects/Uranium/UM/ConfigurationErrorMessage.py:49 +msgctxt "@title:window" +msgid "Reset to factory" +msgstr "工場リセット" + +#: /home/ruben/Projects/Uranium/UM/ConfigurationErrorMessage.py:51 +msgctxt "@label" +msgid "Reset will remove all your current printers and profiles! Are you sure you want to reset?" +msgstr "リセットすると、現在のプリンターおよびプロファイルがすべて削除されます。本当にリセットしてよろしいですか?" + +#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:162 #, python-brace-format msgctxt "@info" msgid "Would you like to reload {filename}?" msgstr "{filename}を再ロードしますか?" -#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:154 +#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:163 msgctxt "@info:title" msgid "File has been modified" msgstr "ファイルが変更されました" -#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:155 +#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:164 msgctxt "@action:button" msgid "Reload" msgstr "再ロード" -#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:155 +#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:164 msgctxt "@action:description" msgid "This will trigger the modified files to reload from disk." msgstr "これにより変更したファイルをディスクから再ロードします。" -#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:32 +#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:36 #, python-brace-format msgctxt "@info:status Don't translate the XML tag !" msgid "Cannot open files of the type of {0}" msgstr "{0}のファイルタイプは開けません" -#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:32 -#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:47 -#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:70 +#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:36 +#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:51 +#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:74 msgctxt "@info:title" msgid "Invalid File" msgstr "無効なファイル" -#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:45 -#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:70 +#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:49 +#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:74 #, python-brace-format msgctxt "@info:status Don't translate the XML tag !" msgid "Failed to load {0}" -msgstr "{0}を読み込むのに失敗しました。" +msgstr "{0}を読み込むのに失敗しました" -#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:54 +#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:59 msgctxt "@info:title" msgid "Loading" msgstr "読み込み中" -#: /home/ruben/Projects/Uranium/plugins/Tools/ScaleTool/ScaleTool.qml:60 -#: /home/ruben/Projects/Uranium/plugins/Tools/RotateTool/RotateTool.qml:21 -msgctxt "@action:button" -msgid "Reset" -msgstr "リセットする" - -#: /home/ruben/Projects/Uranium/plugins/Tools/ScaleTool/ScaleTool.qml:86 +#: /home/ruben/Projects/Uranium/plugins/Tools/ScaleTool/ScaleTool.qml:93 msgctxt "@option:check" msgid "Snap Scaling" msgstr "スナップスケーリング" -#: /home/ruben/Projects/Uranium/plugins/Tools/ScaleTool/ScaleTool.qml:104 +#: /home/ruben/Projects/Uranium/plugins/Tools/ScaleTool/ScaleTool.qml:121 msgctxt "@option:check" msgid "Uniform Scaling" msgstr "ユニフォームスケーリング" -#: /home/ruben/Projects/Uranium/plugins/Tools/TranslateTool/TranslateTool.qml:177 +#: /home/ruben/Projects/Uranium/plugins/Tools/TranslateTool/TranslateTool.qml:196 msgctxt "@option:check" msgid "Lock Model" msgstr "モデルのロック" @@ -462,89 +548,37 @@ msgid "Lay flat" msgstr "平らに置く" -#: /home/ruben/Projects/Uranium/plugins/Tools/RotateTool/RotateTool.qml:55 +#: /home/ruben/Projects/Uranium/plugins/Tools/RotateTool/RotateTool.qml:60 +msgctxt "@action:button" +msgid "Select face to align to the build plate" +msgstr "ビルドプレートに合わせる面を選択します" + +#: /home/ruben/Projects/Uranium/plugins/Tools/RotateTool/RotateTool.qml:81 msgctxt "@action:checkbox" msgid "Snap Rotation" msgstr "スナップローテーション" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:19 -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:148 -msgctxt "@title:tab" -msgid "Plugins" -msgstr "プラグイン" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:28 -msgctxt "@action:button" -msgid "Install new plugin" -msgstr "新しいプラグインをインストールする" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:51 -msgctxt "@label" -msgid "You will need to restart the application before changes in plugins have effect." -msgstr "プラグインへの変更を有効にするためにアプリケーション再起動する必要があります。" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:87 -msgctxt "@label" -msgid "This plugin is required for the application to run." -msgstr "アプリケーションを稼働させるためにプラグインが必要です。" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:104 -msgctxt "@label" -msgid "Info..." -msgstr "インフォメーション…" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:122 -msgctxt "@window:title" -msgid "Install Plugin" -msgstr "プラグインをインストール" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:131 -msgctxt "@title:window" -msgid "Open file(s)" -msgstr "ファイルを開く" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:165 -msgctxt "@label" -msgid "No text available" -msgstr "利用可能なテキストがありません。" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:171 -msgctxt "@title:window" -msgid "About %1" -msgstr "アバウト%1" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:203 -msgctxt "@label" -msgid "Author:" -msgstr "著者:" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:225 -msgctxt "@label" -msgid "Version:" -msgstr "バージョン:" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:243 -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:113 -msgctxt "@action:button" -msgid "Close" -msgstr "閉める" - #: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:18 msgctxt "@title:window" msgid "Preferences" msgstr "プレファレンス" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:106 +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:107 msgctxt "@action:button" msgid "Defaults" msgstr "デフォルト" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:146 +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:115 +msgctxt "@action:button" +msgid "Close" +msgstr "閉める" + +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:148 msgctxt "@title:tab" msgid "General" msgstr "一般" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:147 +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:149 msgctxt "@title:tab" msgid "Settings" msgstr "設定" @@ -554,44 +588,34 @@ msgid "Rename" msgstr "名前を変える" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/RenameDialog.qml:56 +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/RenameDialog.qml:20 +msgctxt "@info" +msgid "Please provide a new name." +msgstr "新しい名前を入力してください。" + +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/RenameDialog.qml:70 #: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Wizard.qml:241 msgctxt "@action:button" msgid "Cancel" msgstr "キャンセル" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/RenameDialog.qml:60 +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/RenameDialog.qml:75 msgctxt "@action:button" msgid "OK" msgstr "OK" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/SettingVisibilityItem.qml:34 +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/SettingVisibilityItem.qml:32 msgctxt "@item:tooltip" msgid "This setting has been hidden by the active machine and will not be visible." msgstr "この設定がアクティブなプリンターにより非表示になっています、見ることができません。" # can’t add Japanese texts -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/SettingVisibilityItem.qml:51 +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/SettingVisibilityItem.qml:49 msgctxt "@item:tooltip %1 is list of setting names" msgid "This setting has been hidden by the value of %1. Change the value of that setting to make this setting visible." msgid_plural "This setting has been hidden by the values of %1. Change the values of those settings to make this setting visible." msgstr[0] "この設定は %1 の値で非表示になっています。その設定値を変更すると設定の非表示が解除されます。" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/SettingVisibilityPage.qml:12 -msgctxt "@title:tab" -msgid "Setting Visibility" -msgstr "視野設定" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/SettingVisibilityPage.qml:42 -msgctxt "@label:textbox" -msgid "Check all" -msgstr "全てを調べる" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/SettingVisibilityPage.qml:89 -msgctxt "@label:textbox" -msgid "Filter..." -msgstr "フィルター…" - #: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/MachinesPage.qml:12 msgctxt "@title:tab" msgid "Printers" @@ -605,92 +629,12 @@ #: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ConfirmRemoveDialog.qml:16 msgctxt "@title:window" msgid "Confirm Remove" -msgstr "モデルを取り除きました。" +msgstr "モデルを取り除きました" #: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ConfirmRemoveDialog.qml:17 msgctxt "@label (%1 is object name)" msgid "Are you sure you wish to remove %1? This cannot be undone!" -msgstr "%1を取り外しますか?この作業はやり直しが効きません。 " - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:14 -msgctxt "@title:tab" -msgid "Profiles" -msgstr "プロファイル" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:15 -msgctxt "@label" -msgid "Duplicate" -msgstr "複製" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:45 -msgctxt "@label %1 is printer name" -msgid "Printer: %1" -msgstr "プリンター:%1" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:83 -msgctxt "@action:button" -msgid "Update \"%1\"" -msgstr "アップデート “%1”" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:84 -msgctxt "@action:button" -msgid "Update profile" -msgstr "プロファイルをアップデート" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:92 -msgctxt "@action:button" -msgid "Discard current changes" -msgstr "今の変更を破棄する" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:93 -msgctxt "@action:button" -msgid "Reload profile" -msgstr "プロファイルをリロードする" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:107 -msgctxt "@label" -msgid "Based on" -msgstr "ベースにする" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:107 -msgctxt "@label" -msgid "Profile type" -msgstr "プロファイルタイプ" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:112 -msgctxt "@label" -msgid "Protected profile" -msgstr "保護されたプロファイル" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:112 -msgctxt "@label" -msgid "Custom profile" -msgstr "カスタムプロファイル" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:139 -msgctxt "@action:button" -msgid "Import" -msgstr "取り込む" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:146 -msgctxt "@action:button" -msgid "Export" -msgstr "書き出す" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:184 -msgctxt "@window:title" -msgid "Import Profile" -msgstr "プロファイルを取り込む" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:192 -msgctxt "@title:window" -msgid "Import Profile" -msgstr "プロファイルを取り込む" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:219 -msgctxt "@title:window" -msgid "Export Profile" -msgstr "プロファイルを書き出す" +msgstr "%1を取り外しますか?この作業はやり直しが効きません!" #: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Wizard.qml:215 msgctxt "@action:button" @@ -720,7 +664,7 @@ #: Views/SimpleView/plugin.json msgctxt "description" msgid "Provides a simple solid mesh view." -msgstr "シンプルソリッドメッシュビューを供給する" +msgstr "シンプルソリッドメッシュビューを供給する。" #: Views/SimpleView/plugin.json msgctxt "name" @@ -730,7 +674,7 @@ #: FileLogger/plugin.json msgctxt "description" msgid "Outputs log information to a file in your settings folder." -msgstr "ログ情報を設定フォルダーのファイルにアウトプットする" +msgstr "ログ情報を設定フォルダーのファイルにアウトプットする。" #: FileLogger/plugin.json msgctxt "name" @@ -780,7 +724,7 @@ #: ConsoleLogger/plugin.json msgctxt "description" msgid "Outputs log information to the console." -msgstr "ログ情報をコンソールにアウトプットする" +msgstr "ログ情報をコンソールにアウトプットする。" #: ConsoleLogger/plugin.json msgctxt "name" @@ -810,7 +754,7 @@ #: UpdateChecker/plugin.json msgctxt "description" msgid "Checks for updates of the software." -msgstr "ソフトウェアのアップデートを確認中" +msgstr "ソフトウェアのアップデートを確認中。" #: UpdateChecker/plugin.json msgctxt "name" @@ -850,7 +794,7 @@ #: Tools/ScaleTool/plugin.json msgctxt "description" msgid "Provides the Scale tool." -msgstr "スケールツールを供給すr" +msgstr "スケールツールを供給すr。" #: Tools/ScaleTool/plugin.json msgctxt "name" @@ -860,7 +804,7 @@ #: Tools/SelectionTool/plugin.json msgctxt "description" msgid "Provides the Selection tool." -msgstr "セレクションツールを供給する" +msgstr "セレクションツールを供給する。" #: Tools/SelectionTool/plugin.json msgctxt "name" @@ -870,7 +814,7 @@ #: Tools/TranslateTool/plugin.json msgctxt "description" msgid "Provides the Move tool." -msgstr "ムーブツールを供給する" +msgstr "ムーブツールを供給する。" #: Tools/TranslateTool/plugin.json msgctxt "name" @@ -880,7 +824,7 @@ #: Tools/CameraTool/plugin.json msgctxt "description" msgid "Provides the tool to manipulate the camera." -msgstr "カメラを操作するためのツールを供給する" +msgstr "カメラを操作するためのツールを供給する。" #: Tools/CameraTool/plugin.json msgctxt "name" @@ -890,7 +834,7 @@ #: Tools/RotateTool/plugin.json msgctxt "description" msgid "Provides the Rotate tool." -msgstr "回転ツールを供給する" +msgstr "回転ツールを供給する。" #: Tools/RotateTool/plugin.json msgctxt "name" @@ -900,13 +844,193 @@ #: Tools/MirrorTool/plugin.json msgctxt "description" msgid "Provides the Mirror tool." -msgstr "ミラーツールを供給する" +msgstr "ミラーツールを供給する。" #: Tools/MirrorTool/plugin.json msgctxt "name" msgid "Mirror Tool" msgstr "ミラーツール" +#~ msgctxt "@title:tab" +#~ msgid "Plugins" +#~ msgstr "プラグイン" + +#~ msgctxt "@action:button" +#~ msgid "Install new plugin" +#~ msgstr "新しいプラグインをインストールする" + +#~ msgctxt "@label" +#~ msgid "You will need to restart the application before changes in plugins have effect." +#~ msgstr "プラグインへの変更を有効にするためにアプリケーション再起動する必要があります。" + +#~ msgctxt "@label" +#~ msgid "This plugin is required for the application to run." +#~ msgstr "アプリケーションを稼働させるためにプラグインが必要です。" + +#~ msgctxt "@label" +#~ msgid "Info..." +#~ msgstr "インフォメーション…" + +#~ msgctxt "@window:title" +#~ msgid "Install Plugin" +#~ msgstr "プラグインをインストール" + +#~ msgctxt "@title:window" +#~ msgid "Open file(s)" +#~ msgstr "ファイルを開く" + +#~ msgctxt "@label" +#~ msgid "No text available" +#~ msgstr "利用可能なテキストがありません" + +#~ msgctxt "@title:window" +#~ msgid "About %1" +#~ msgstr "アバウト%1" + +#~ msgctxt "@label" +#~ msgid "Author:" +#~ msgstr "著者:" + +#~ msgctxt "@label" +#~ msgid "Version:" +#~ msgstr "バージョン:" + +#~ msgctxt "@action:button" +#~ msgid "Learn more about the new features" +#~ msgstr "新機能について詳しく見る" + +#~ msgctxt "@info:status" +#~ msgid "Cura {0} is available!" +#~ msgstr "Cura {0} は利用可能!" + +#~ msgctxt "@info:status" +#~ msgid "Cura {0} provides better and reliable printing experience." +#~ msgstr "Cura {0} は、信頼性の高い優れた印刷体験を提供します。" + +#~ msgctxt "@action:button" +#~ msgid "Learn more about new features" +#~ msgstr "新機能について詳しく見る" + +#~ msgctxt "@error:update" +#~ msgid "" +#~ "There was an error uninstalling the package {package} before installingnew version:\n" +#~ "{error}.\n" +#~ "Please try to upgrade again later." +#~ msgstr "" +#~ "新しいバージョンをインストールする前に、パッケージ {package} のアンインストールでエラーが発生しました:\n" +#~ "{error}.\n" +#~ "後からアップグレードをやり直してください" + +#~ msgctxt "@info:status" +#~ msgid "" +#~ "Your configuration seems to be corrupt. Something seems to be wrong with the following profiles:\n" +#~ "- {profiles}\n" +#~ "Would you like to reset to factory defaults? Reset will remove all your current printers and profiles." +#~ msgstr "" +#~ "構成が破損している可能性があります。以下のプロファイルでエラーが発生しています:\n" +#~ "- {profiles}\n" +#~ "工場出荷状態にリセットしますか?リセットすると使用してるすべてのプリンターおよびプロファイルが削除されます。" + +#~ msgctxt "@info" +#~ msgid "A new version is available!" +#~ msgstr "新しいバージョンが利用可能です。" + +#~ msgctxt "@info:status" +#~ msgid "" +#~ "Failed to install plugin from {0}:\n" +#~ "{1}" +#~ msgstr "" +#~ "プラグインのインストールに失敗しました。{0}:\n" +#~ "{1}" + +#~ msgctxt "@info:status" +#~ msgid "" +#~ "Failed to install the plugin;\n" +#~ "{0}" +#~ msgstr "" +#~ "プラグインのインストールに失敗しました。\n" +#~ "{0}" + +#~ msgctxt "@info:status" +#~ msgid "Failed to uninstall plugin. Plugin will be removed after {0} restarts." +#~ msgstr "プラグインのアンインストールに失敗しました。プラグインは {0} を再起動すると削除されます。" + +#~ msgctxt "@title:tab" +#~ msgid "Setting Visibility" +#~ msgstr "視野設定" + +#~ msgctxt "@label:textbox" +#~ msgid "Check all" +#~ msgstr "全てを調べる" + +#~ msgctxt "@label:textbox" +#~ msgid "Filter..." +#~ msgstr "フィルター…" + +#~ msgctxt "@title:tab" +#~ msgid "Profiles" +#~ msgstr "プロファイル" + +#~ msgctxt "@label" +#~ msgid "Duplicate" +#~ msgstr "複製" + +#~ msgctxt "@label %1 is printer name" +#~ msgid "Printer: %1" +#~ msgstr "プリンター:%1" + +#~ msgctxt "@action:button" +#~ msgid "Update \"%1\"" +#~ msgstr "アップデート “%1”" + +#~ msgctxt "@action:button" +#~ msgid "Update profile" +#~ msgstr "プロファイルをアップデート" + +#~ msgctxt "@action:button" +#~ msgid "Discard current changes" +#~ msgstr "今の変更を破棄する" + +#~ msgctxt "@action:button" +#~ msgid "Reload profile" +#~ msgstr "プロファイルをリロードする" + +#~ msgctxt "@label" +#~ msgid "Based on" +#~ msgstr "ベースにする" + +#~ msgctxt "@label" +#~ msgid "Profile type" +#~ msgstr "プロファイルタイプ" + +#~ msgctxt "@label" +#~ msgid "Protected profile" +#~ msgstr "保護されたプロファイル" + +#~ msgctxt "@label" +#~ msgid "Custom profile" +#~ msgstr "カスタムプロファイル" + +#~ msgctxt "@action:button" +#~ msgid "Import" +#~ msgstr "取り込む" + +#~ msgctxt "@action:button" +#~ msgid "Export" +#~ msgstr "書き出す" + +#~ msgctxt "@window:title" +#~ msgid "Import Profile" +#~ msgstr "プロファイルを取り込む" + +#~ msgctxt "@title:window" +#~ msgid "Import Profile" +#~ msgstr "プロファイルを取り込む" + +#~ msgctxt "@title:window" +#~ msgid "Export Profile" +#~ msgstr "プロファイルを書き出す" + #~ msgctxt "@info" #~ msgid "An exception occurred while checking for updates." #~ msgstr "アップデート確認中にエラーが起こりました。" diff -Nru uranium-3.3.0/resources/i18n/ko_KR/uranium.po uranium-4.4.1/resources/i18n/ko_KR/uranium.po --- uranium-3.3.0/resources/i18n/ko_KR/uranium.po 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/resources/i18n/ko_KR/uranium.po 2019-11-19 10:50:46.000000000 +0000 @@ -1,14 +1,14 @@ # Uranium -# Copyright (C) 2018 Ultimaker +# Copyright (C) 2019 Ultimaker B.V. # This file is distributed under the same license as the Uranium package. -# Ruben Dulek , 2018. +# Ruben Dulek , 2019. # msgid "" msgstr "" -"Project-Id-Version: Uranium 3.3\n" +"Project-Id-Version: Uranium 4.4\n" "Report-Msgid-Bugs-To: r.dulek@ultimaker.com\n" -"POT-Creation-Date: 2018-03-29 08:36+0200\n" -"PO-Revision-Date: 2018-04-13 18:10+0900\n" +"POT-Creation-Date: 2019-11-05 13:40+0100\n" +"PO-Revision-Date: 2019-09-23 13:25+0200\n" "Last-Translator: Jinbuhm Kim \n" "Language-Team: Jinbuhm Kim, , Korean \n" "Language: ko_KR\n" @@ -16,7 +16,7 @@ "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: Poedit 2.0.6\n" +"X-Generator: Poedit 2.2.1\n" #: /home/ruben/Projects/Uranium/plugins/Views/SimpleView/__init__.py:12 msgctxt "@item:inmenu" @@ -34,6 +34,17 @@ msgid "Wavefront OBJ File" msgstr "Wavefront OBJ 파일" +#: /home/ruben/Projects/Uranium/plugins/FileHandlers/OBJWriter/OBJWriter.py:23 +msgctxt "@error:not supported" +msgid "OBJWriter does not support non-text mode." +msgstr "OBJWriter는 텍스트가 아닌 모드는 지원하지 않습니다." + +#: /home/ruben/Projects/Uranium/plugins/FileHandlers/OBJWriter/OBJWriter.py:30 +#: /home/ruben/Projects/Uranium/plugins/FileHandlers/STLWriter/STLWriter.py:27 +msgctxt "@error:no mesh" +msgid "There is no mesh to write." +msgstr "작성할 메쉬가 없습니다." + #: /home/ruben/Projects/Uranium/plugins/FileHandlers/STLWriter/__init__.py:17 msgctxt "@item:inlistbox" msgid "STL File (ASCII)" @@ -44,80 +55,101 @@ msgid "STL File (Binary)" msgstr "STL 파일 (바이너리)" -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:42 +#: /home/ruben/Projects/Uranium/plugins/FileHandlers/STLWriter/STLWriter.py:36 +msgctxt "@error:not supported" +msgid "Unsupported output mode writing STL to stream." +msgstr "스트리밍할 STL을 작성하는 지원되지 않는 출력 모드." + +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:50 msgctxt "@info" msgid "Could not access update information." msgstr "업데이트 정보에 액세스 할 수 없습니다." -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:43 -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:60 -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:71 -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:89 -#: /home/ruben/Projects/Uranium/UM/VersionUpgradeManager.py:123 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:51 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:68 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:97 +#: /home/ruben/Projects/Uranium/UM/VersionUpgradeManager.py:155 msgctxt "@info:title" msgid "Version Upgrade" msgstr "버전 업그레이드" -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:55 -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:60 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:63 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:68 msgctxt "@info" msgid "The version you are using does not support checking for updates." msgstr "사용중인 버전은 업데이트 확인을 지원하지 않습니다." -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:55 -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:178 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:63 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:188 msgctxt "@info:title" msgid "Warning" msgstr "경고" -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:71 -msgctxt "@info" -msgid "A new version is available!" -msgstr "새 버전을 사용할 수 있습니다!" - -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:72 -msgctxt "@action:button" -msgid "Download" -msgstr "다운로드" - -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:85 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:93 msgctxt "@info" msgid "An error occurred while checking for updates." msgstr "업데이트를 확인하는 도중 오류가 발생했습니다." -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:85 -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:185 -#: /home/ruben/Projects/Uranium/UM/Qt/Bindings/OutputDeviceManagerProxy.py:128 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:93 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:195 +#: /home/ruben/Projects/Uranium/UM/Qt/Bindings/OutputDeviceManagerProxy.py:141 msgctxt "@info:title" msgid "Error" msgstr "오류" -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:89 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:97 msgctxt "@info" msgid "No new version was found." msgstr "새 버전이 없습니다." +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:102 +#, python-brace-format +msgctxt "@info:status" +msgid "{application_name} {version_number} is available!" +msgstr "{application_name} {version_number}을(를) 사용할 수 있습니다!" + +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:104 +#, python-brace-format +msgctxt "@info:status" +msgid "{application_name} {version_number} provides a better and more reliable printing experience." +msgstr "{application_name} {version_number}은(는) 보다 개선된 안정적인 인쇄 환경을 제공합니다." + +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:107 +msgctxt "@action:button" +msgid "Download" +msgstr "다운로드" + +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:109 +msgctxt "@action:button" +msgid "Learn more" +msgstr "자세히 알아보기" + #: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateChecker.py:26 msgctxt "@item:inmenu" +msgid "Update Checker" +msgstr "업데이트 검사기" + +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateChecker.py:27 +msgctxt "@item:inmenu" msgid "Check for Updates" msgstr "업데이트 확인" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:33 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:30 msgctxt "@item:inmenu" msgid "Local File" msgstr "로컬 파일" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:34 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:31 msgctxt "@action:button Preceded by 'Ready to'." msgid "Save to File" msgstr "파일에 저장" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:35 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:32 msgctxt "@info:tooltip" msgid "Save to File" msgstr "파일에 저장" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:56 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:53 msgctxt "@title:window" msgid "Save to File" msgstr "파일에 저장" @@ -127,63 +159,63 @@ msgid "There are no file types available to write with!" msgstr "쓸 수있는 파일 유형이 없습니다!" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:121 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:130 msgctxt "@title:window" msgid "File Already Exists" msgstr "파일이 이미 있음" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:121 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:130 #, python-brace-format msgctxt "@label Don't translate the XML tag !" msgid "The file {0} already exists. Are you sure you want to overwrite it?" msgstr "{0} 파일이 이미 있습니다. 덮어 쓰시겠습니까?" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:150 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:160 #, python-brace-format msgctxt "@info:progress Don't translate the XML tags !" msgid "Saving to {0}" msgstr "{0} 저장 중입니다" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:151 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:161 msgctxt "@info:title" msgid "Saving" msgstr "저장" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:159 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:169 #, python-brace-format msgctxt "@info:status Don't translate the XML tags !" msgid "Permission denied when trying to save {0}" msgstr "{0} 저장하려고 하나 권한이 거부되었습니다" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:162 -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:178 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:172 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:188 #, python-brace-format msgctxt "@info:status Don't translate the XML tags or !" msgid "Could not save to {0}: {1}" msgstr "{0}: {1} 에 저장할 수 없습니다" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:172 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:182 #, python-brace-format msgctxt "@info:status Don't translate the XML tags !" msgid "Saved to {0}" msgstr "{0} 에 저장됨" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:172 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:182 msgctxt "@info:title" msgid "File Saved" msgstr "파일이 저장됨" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:173 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:183 msgctxt "@action:button" msgid "Open Folder" msgstr "폴더 열기" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:173 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:183 msgctxt "@info:tooltip" msgid "Open the folder containing the file" msgstr "파일이 있는 폴더를 엽니다" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:185 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:195 #, python-brace-format msgctxt "@info:status" msgid "Something went wrong saving to {0}: {1}" @@ -219,6 +251,16 @@ msgid "Rotate Model" msgstr "모델 회전" +#: /home/ruben/Projects/Uranium/plugins/Tools/RotateTool/RotateTool.py:279 +msgctxt "@label" +msgid "Laying object flat on buildplate..." +msgstr "빌드 플레이트에 개체 평평하게 놓기..." + +#: /home/ruben/Projects/Uranium/plugins/Tools/RotateTool/RotateTool.py:279 +msgctxt "@title" +msgid "Object Rotation" +msgstr "개체 회전" + #: /home/ruben/Projects/Uranium/plugins/Tools/MirrorTool/__init__.py:12 msgctxt "@label" msgid "Mirror" @@ -242,11 +284,13 @@ "기본값으로 재설정하시겠습니까?" #: /home/ruben/Projects/Uranium/UM/__init__.py:16 +#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:175 msgctxt "@info:status" msgid "Your configuration seems to be corrupt." msgstr "설정이 손상된 것 같습니다." #: /home/ruben/Projects/Uranium/UM/__init__.py:17 +#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:177 msgctxt "@info:title" msgid "Configuration errors" msgstr "설정 오류" @@ -256,82 +300,121 @@ msgid "Reset your configuration to factory defaults." msgstr "설정을 기본값으로 재설정합니다." -#: /home/ruben/Projects/Uranium/UM/Settings/Models/InstanceContainersModel.py:189 -#: /home/ruben/Projects/Uranium/UM/Qt/Bindings/MeshFileHandlerProxy.py:48 /home/ruben/Projects/Uranium/UM/PluginRegistry.py:655 -#: /home/ruben/Projects/Uranium/UM/FileHandler/FileHandler.py:70 +#: /home/ruben/Projects/Uranium/UM/Settings/Models/InstanceContainersModel.py:181 +#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:708 +#: /home/ruben/Projects/Uranium/UM/FileHandler/FileHandler.py:56 #, python-brace-format msgctxt "@item:inlistbox" msgid "All Supported Types ({0})" msgstr "지원되는 모든 유형 ({0})" -#: /home/ruben/Projects/Uranium/UM/Settings/Models/InstanceContainersModel.py:192 -#: /home/ruben/Projects/Uranium/UM/Qt/Bindings/MeshFileHandlerProxy.py:49 /home/ruben/Projects/Uranium/UM/PluginRegistry.py:656 -#: /home/ruben/Projects/Uranium/UM/FileHandler/FileHandler.py:71 +#: /home/ruben/Projects/Uranium/UM/Settings/Models/InstanceContainersModel.py:184 +#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:709 +#: /home/ruben/Projects/Uranium/UM/FileHandler/FileHandler.py:57 msgctxt "@item:inlistbox" msgid "All Files (*)" msgstr "모든 파일" -#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:108 +#: /home/ruben/Projects/Uranium/UM/PackageManager.py:233 +#, python-brace-format +msgctxt "@error:uninstall" +msgid "" +"There were some errors uninstalling the following packages:\n" +"{packages}" +msgstr "" +"다음 패키지를 제거하는 중에 오류가 발생했습니다. \n" +"{packages}" + +#: /home/ruben/Projects/Uranium/UM/PackageManager.py:235 +msgctxt "@info:title" +msgid "Uninstalling errors" +msgstr "오류 제거 중" + +#: /home/ruben/Projects/Uranium/UM/PackageManager.py:454 +#, python-brace-format +msgctxt "@error:update" +msgid "" +"There was an error uninstalling the package {package} before installing new version:\n" +"{error}.\n" +"Please try to upgrade again later." +msgstr "" +"새 버전을 설치하기 전 패키지 {package}(을)를 제거하는 중에 오류가 발생했습니다. \n" +"{error}.\n" +" 업그레이드를 나중에 다시 시도하십시오." + +#: /home/ruben/Projects/Uranium/UM/PackageManager.py:457 +msgctxt "@info:title" +msgid "Updating error" +msgstr "업데이트 오류" + +#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:112 #, python-brace-format msgctxt "@label Short days-hours-minutes format. {0} is days, {1} is hours, {2} is minutes" msgid "{0:0>2}d {1:0>2}h {2:0>2}min" msgstr "{0:0>2}일 {1:0>2}시 {2:0>2}분" -#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:110 +#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:114 #, python-brace-format msgctxt "@label Short hours-minutes format. {0} is hours, {1} is minutes" msgid "{0:0>2}h {1:0>2}min" msgstr "{0:0>2}시 {1:0>2}분" -#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:113 +#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:117 #, python-brace-format msgctxt "@label Long duration format. {0} is days" msgid "{0} day" msgid_plural "{0} days" msgstr[0] "{0} 일" -#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:113 /home/ruben/Projects/Uranium/UM/Qt/Duration.py:115 +#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:117 +#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:119 #, python-brace-format msgctxt "@label Long duration format. {0} is hours" msgid "{0} hour" msgid_plural "{0} hours" msgstr[0] "{0} 시간" -#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:113 /home/ruben/Projects/Uranium/UM/Qt/Duration.py:115 #: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:117 +#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:119 +#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:121 #, python-brace-format msgctxt "@label Long duration format. {0} is minutes" msgid "{0} minute" msgid_plural "{0} minutes" msgstr[0] "{0} 분" -#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:112 +#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:159 +msgctxt "@info:progress" +msgid "Initializing package manager..." +msgstr "패키지 관리자 초기화 중..." + +#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:180 msgctxt "@info:progress" msgid "Loading plugins..." msgstr "플러그인 로드 중 ..." -#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:119 +#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:187 msgctxt "@info:progress" msgid "Updating configuration..." msgstr "설정 업데이트 중 ..." -#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:136 +#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:205 msgctxt "@info:progress" msgid "Loading preferences..." msgstr "환경 설정로드 중 ..." -#: /home/ruben/Projects/Uranium/UM/Mesh/ReadMeshJob.py:65 +#: /home/ruben/Projects/Uranium/UM/Mesh/ReadMeshJob.py:68 #, python-format, python-brace-format msgctxt "@info:status" msgid "Auto scaled object to {0}% of original size" msgstr "원본크기의 {0}% 로 개체 크기 자동조절" -#: /home/ruben/Projects/Uranium/UM/Mesh/ReadMeshJob.py:65 +#: /home/ruben/Projects/Uranium/UM/Mesh/ReadMeshJob.py:68 msgctxt "@info:title" msgid "Scaling Object" msgstr "크기 조절" -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:220 +#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:277 msgctxt "@info:status" msgid "" "The plugin has been installed.\n" @@ -340,25 +423,7 @@ "플러그인이 설치되었습니다.\n" "플러그인을 활성화하려면 응용 프로그램을 다시 시작하십시오." -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:231 /home/ruben/Projects/Uranium/UM/PluginRegistry.py:270 -#, python-brace-format -msgctxt "@info:status" -msgid "" -"Failed to install plugin from {0}:\n" -"{1}" -msgstr "{0}에서 플러그인을 설치하지 못했습니다:\n{1}" - -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:254 /home/ruben/Projects/Uranium/UM/PluginRegistry.py:259 -#, python-brace-format -msgctxt "@info:status" -msgid "" -"Failed to install the plugin;\n" -"{0}" -msgstr "" -"플러그인을 설치하지 못했습니다;\n" -"{0}" - -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:421 +#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:415 #, python-brace-format msgctxt "@info:status" msgid "" @@ -368,89 +433,109 @@ "플러그인이 제거되었습니다.\n" "제거를 완료하려면 {0}을(를) 다시 시작하십시오." -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:433 -#, python-brace-format -msgctxt "@info:status" -msgid "Failed to uninstall plugin. Plugin will be removed after {0} restarts." -msgstr "플러그인을 제거하지 못했습니다. {0}을(를) 다시 시작하면 플러그인이 제거됩니다." - -#: /home/ruben/Projects/Uranium/UM/VersionUpgradeManager.py:123 +#: /home/ruben/Projects/Uranium/UM/VersionUpgradeManager.py:155 #, python-brace-format msgctxt "@info:version-upgrade" msgid "A configuration from an older version of {0} was imported." msgstr "{0} 이전 버전의 구성을 가져 왔습니다." -#: /home/ruben/Projects/Uranium/UM/View/GL/OpenGL.py:50 +#: /home/ruben/Projects/Uranium/UM/View/GL/OpenGL.py:58 +#: /home/ruben/Projects/Uranium/UM/View/GL/OpenGL.py:63 msgctxt "@message" msgid "Failed to Initialize OpenGL" msgstr "OpenGL을 초기화하지 못했습니다" -#: /home/ruben/Projects/Uranium/UM/View/GL/OpenGL.py:60 +#: /home/ruben/Projects/Uranium/UM/View/GL/OpenGL.py:73 msgctxt "Critical OpenGL Extensions Missing" msgid "Critical OpenGL extensions are missing. This program requires support for Framebuffer Objects. Please check your video card drivers." msgstr "중요한 OpenGL 확장이 누락되었습니다. 이 프로그램은 Framebuffer 객체를 지원해야 합니다. 비디오 카드 드라이버를 확인하십시오." -#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:153 +#: /home/ruben/Projects/Uranium/UM/ConfigurationErrorMessage.py:32 +#: /home/ruben/Projects/Uranium/plugins/Tools/ScaleTool/ScaleTool.qml:67 +#: /home/ruben/Projects/Uranium/plugins/Tools/RotateTool/RotateTool.qml:21 +msgctxt "@action:button" +msgid "Reset" +msgstr "리셋" + +#: /home/ruben/Projects/Uranium/UM/ConfigurationErrorMessage.py:44 +#, python-brace-format +msgctxt "@info:status" +msgid "" +"Your configuration seems to be corrupt. Something seems to be wrong with the following profiles:\n" +"- {profiles}\n" +" Would you like to reset to factory defaults? Reset will remove all your current printers and profiles." +msgstr "" +"설정이 손상된 것 같습니다. 다음 프로파일에 문제가 발생한 것 같습니다:\n" +"- {profiles}\n" +" 기본값으로 재설정하시겠습니까? 재설정하면 현재 모든 프린터 및 프로파일이 제거됩니다." + +#: /home/ruben/Projects/Uranium/UM/ConfigurationErrorMessage.py:49 +msgctxt "@title:window" +msgid "Reset to factory" +msgstr "기본값으로 재설정" + +#: /home/ruben/Projects/Uranium/UM/ConfigurationErrorMessage.py:51 +msgctxt "@label" +msgid "Reset will remove all your current printers and profiles! Are you sure you want to reset?" +msgstr "재설정하면 현재 모든 프린터 및 프로파일이 제거됩니다! 정말로 재설정하시겠습니까?" + +#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:162 #, python-brace-format msgctxt "@info" msgid "Would you like to reload {filename}?" msgstr "{filename}을(를) 다시 로드하시겠습니까?" -#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:154 +#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:163 msgctxt "@info:title" msgid "File has been modified" msgstr "파일 수정됨" -#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:155 +#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:164 msgctxt "@action:button" msgid "Reload" msgstr "다시 로드하기" -#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:155 +#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:164 msgctxt "@action:description" msgid "This will trigger the modified files to reload from disk." msgstr "수정된 파일을 트리거하여 디스크에서 다시 가져옵니다." -#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:32 +#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:36 #, python-brace-format msgctxt "@info:status Don't translate the XML tag !" msgid "Cannot open files of the type of {0}" msgstr "{0} 형식의 파일을 열 수 없습니다" -#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:32 /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:47 -#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:70 +#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:36 +#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:51 +#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:74 msgctxt "@info:title" msgid "Invalid File" msgstr "유효하지 않은 파일" -#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:45 /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:70 +#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:49 +#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:74 #, python-brace-format msgctxt "@info:status Don't translate the XML tag !" msgid "Failed to load {0}" msgstr "{0}을 로드하지 못했습니다" -#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:54 +#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:59 msgctxt "@info:title" msgid "Loading" msgstr "로딩중" -#: /home/ruben/Projects/Uranium/plugins/Tools/ScaleTool/ScaleTool.qml:60 -#: /home/ruben/Projects/Uranium/plugins/Tools/RotateTool/RotateTool.qml:21 -msgctxt "@action:button" -msgid "Reset" -msgstr "리셋" - -#: /home/ruben/Projects/Uranium/plugins/Tools/ScaleTool/ScaleTool.qml:86 +#: /home/ruben/Projects/Uranium/plugins/Tools/ScaleTool/ScaleTool.qml:93 msgctxt "@option:check" msgid "Snap Scaling" msgstr "스냅 크기 조정" -#: /home/ruben/Projects/Uranium/plugins/Tools/ScaleTool/ScaleTool.qml:104 +#: /home/ruben/Projects/Uranium/plugins/Tools/ScaleTool/ScaleTool.qml:121 msgctxt "@option:check" msgid "Uniform Scaling" msgstr "균일한 크기 조정" -#: /home/ruben/Projects/Uranium/plugins/Tools/TranslateTool/TranslateTool.qml:177 +#: /home/ruben/Projects/Uranium/plugins/Tools/TranslateTool/TranslateTool.qml:196 msgctxt "@option:check" msgid "Lock Model" msgstr "모델 잠금" @@ -460,89 +545,37 @@ msgid "Lay flat" msgstr "바닥에 놓기" -#: /home/ruben/Projects/Uranium/plugins/Tools/RotateTool/RotateTool.qml:55 +#: /home/ruben/Projects/Uranium/plugins/Tools/RotateTool/RotateTool.qml:60 +msgctxt "@action:button" +msgid "Select face to align to the build plate" +msgstr "빌드 플레이어에 정렬할 면을 선택하십시오" + +#: /home/ruben/Projects/Uranium/plugins/Tools/RotateTool/RotateTool.qml:81 msgctxt "@action:checkbox" msgid "Snap Rotation" msgstr "회전 스냅" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:19 -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:148 -msgctxt "@title:tab" -msgid "Plugins" -msgstr "플러그인" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:28 -msgctxt "@action:button" -msgid "Install new plugin" -msgstr "새 플러그인 설치" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:51 -msgctxt "@label" -msgid "You will need to restart the application before changes in plugins have effect." -msgstr "플러그인의 변경 사항이 적용되기 전에 응용 프로그램을 다시 시작해야합니다." - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:87 -msgctxt "@label" -msgid "This plugin is required for the application to run." -msgstr "이 플러그인은 응용 프로그램을 실행하는 데 필요합니다." - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:104 -msgctxt "@label" -msgid "Info..." -msgstr "정보 ..." - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:122 -msgctxt "@window:title" -msgid "Install Plugin" -msgstr "플러그인 설치" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:131 -msgctxt "@title:window" -msgid "Open file(s)" -msgstr "파일 열기" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:165 -msgctxt "@label" -msgid "No text available" -msgstr "사용할 수 있는 텍스트 없음" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:171 -msgctxt "@title:window" -msgid "About %1" -msgstr "대략 %1" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:203 -msgctxt "@label" -msgid "Author:" -msgstr "원작자:" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:225 -msgctxt "@label" -msgid "Version:" -msgstr "버전:" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:243 -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:113 -msgctxt "@action:button" -msgid "Close" -msgstr "닫기" - #: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:18 msgctxt "@title:window" msgid "Preferences" msgstr "환경 설정" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:106 +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:107 msgctxt "@action:button" msgid "Defaults" msgstr "기본값" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:146 +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:115 +msgctxt "@action:button" +msgid "Close" +msgstr "닫기" + +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:148 msgctxt "@title:tab" msgid "General" msgstr "일반" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:147 +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:149 msgctxt "@title:tab" msgid "Settings" msgstr "설정" @@ -552,42 +585,33 @@ msgid "Rename" msgstr "이름 바꾸기" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/RenameDialog.qml:56 /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Wizard.qml:241 +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/RenameDialog.qml:20 +msgctxt "@info" +msgid "Please provide a new name." +msgstr "새 이름을 입력하십시오." + +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/RenameDialog.qml:70 +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Wizard.qml:241 msgctxt "@action:button" msgid "Cancel" msgstr "취소" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/RenameDialog.qml:60 +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/RenameDialog.qml:75 msgctxt "@action:button" msgid "OK" msgstr "확인" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/SettingVisibilityItem.qml:34 +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/SettingVisibilityItem.qml:32 msgctxt "@item:tooltip" msgid "This setting has been hidden by the active machine and will not be visible." msgstr "이 설정은 활성 기기에 의해 숨겨졌으며 보이지 않습니다." -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/SettingVisibilityItem.qml:51 +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/SettingVisibilityItem.qml:49 msgctxt "@item:tooltip %1 is list of setting names" msgid "This setting has been hidden by the value of %1. Change the value of that setting to make this setting visible." msgid_plural "This setting has been hidden by the values of %1. Change the values of those settings to make this setting visible." msgstr[0] "이 설정은 %1 값으로 숨겨져 있습니다. 이 설정을 볼 수 있게 설정 값을 변경하십시오." -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/SettingVisibilityPage.qml:12 -msgctxt "@title:tab" -msgid "Setting Visibility" -msgstr "공개 설정하기" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/SettingVisibilityPage.qml:42 -msgctxt "@label:textbox" -msgid "Check all" -msgstr "모두 확인" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/SettingVisibilityPage.qml:89 -msgctxt "@label:textbox" -msgid "Filter..." -msgstr "필터..." - #: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/MachinesPage.qml:12 msgctxt "@title:tab" msgid "Printers" @@ -608,86 +632,6 @@ msgid "Are you sure you wish to remove %1? This cannot be undone!" msgstr "%1을 제거 하시겠습니까? 이것은 취소 할 수 없습니다!" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:14 -msgctxt "@title:tab" -msgid "Profiles" -msgstr "프로파일" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:15 -msgctxt "@label" -msgid "Duplicate" -msgstr "복제" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:45 -msgctxt "@label %1 is printer name" -msgid "Printer: %1" -msgstr "프린터: %1" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:83 -msgctxt "@action:button" -msgid "Update \"%1\"" -msgstr "업데이트 \"%1\"" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:84 -msgctxt "@action:button" -msgid "Update profile" -msgstr "프로파일 업데이트" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:92 -msgctxt "@action:button" -msgid "Discard current changes" -msgstr "현재 변경 사항 삭제" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:93 -msgctxt "@action:button" -msgid "Reload profile" -msgstr "프로파일 새로 고침" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:107 -msgctxt "@label" -msgid "Based on" -msgstr "기준" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:107 -msgctxt "@label" -msgid "Profile type" -msgstr "프로파일 유형" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:112 -msgctxt "@label" -msgid "Protected profile" -msgstr "보호된 프로파일" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:112 -msgctxt "@label" -msgid "Custom profile" -msgstr "사용자 정의 프로파일" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:139 -msgctxt "@action:button" -msgid "Import" -msgstr "가져오기" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:146 -msgctxt "@action:button" -msgid "Export" -msgstr "내보내기" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:184 -msgctxt "@window:title" -msgid "Import Profile" -msgstr "프로파일 가져오기" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:192 -msgctxt "@title:window" -msgid "Import Profile" -msgstr "프로파일 가져오기" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:219 -msgctxt "@title:window" -msgid "Export Profile" -msgstr "프로파일 내보내기" - #: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Wizard.qml:215 msgctxt "@action:button" msgid "Back" @@ -903,6 +847,186 @@ msgid "Mirror Tool" msgstr "대칭 도구" +#~ msgctxt "@title:tab" +#~ msgid "Plugins" +#~ msgstr "플러그인" + +#~ msgctxt "@action:button" +#~ msgid "Install new plugin" +#~ msgstr "새 플러그인 설치" + +#~ msgctxt "@label" +#~ msgid "You will need to restart the application before changes in plugins have effect." +#~ msgstr "플러그인의 변경 사항이 적용되기 전에 응용 프로그램을 다시 시작해야합니다." + +#~ msgctxt "@label" +#~ msgid "This plugin is required for the application to run." +#~ msgstr "이 플러그인은 응용 프로그램을 실행하는 데 필요합니다." + +#~ msgctxt "@label" +#~ msgid "Info..." +#~ msgstr "정보 ..." + +#~ msgctxt "@window:title" +#~ msgid "Install Plugin" +#~ msgstr "플러그인 설치" + +#~ msgctxt "@title:window" +#~ msgid "Open file(s)" +#~ msgstr "파일 열기" + +#~ msgctxt "@label" +#~ msgid "No text available" +#~ msgstr "사용할 수 있는 텍스트 없음" + +#~ msgctxt "@title:window" +#~ msgid "About %1" +#~ msgstr "대략 %1" + +#~ msgctxt "@label" +#~ msgid "Author:" +#~ msgstr "원작자:" + +#~ msgctxt "@label" +#~ msgid "Version:" +#~ msgstr "버전:" + +#~ msgctxt "@action:button" +#~ msgid "Learn more about the new features" +#~ msgstr "새 기능에 대해 자세히 알아보기" + +#~ msgctxt "@info:status" +#~ msgid "Cura {0} is available!" +#~ msgstr "Cura {0}을(를) 사용할 수 있습니다!" + +#~ msgctxt "@info:status" +#~ msgid "Cura {0} provides better and reliable printing experience." +#~ msgstr "Cura {0}은(는) 보다 개선된 안정적인 인쇄 환경을 제공합니다." + +#~ msgctxt "@action:button" +#~ msgid "Learn more about new features" +#~ msgstr "새 기능에 대해 자세히 알아보기" + +#~ msgctxt "@error:update" +#~ msgid "" +#~ "There was an error uninstalling the package {package} before installingnew version:\n" +#~ "{error}.\n" +#~ "Please try to upgrade again later." +#~ msgstr "" +#~ "새 버전을 설치하기 전 패키지 {package}(을)를 제거하는 중에 오류가 발생했습니다. \n" +#~ "{error}.\n" +#~ "업그레이드를 나중에 다시 시도하십시오." + +#~ msgctxt "@info:status" +#~ msgid "" +#~ "Your configuration seems to be corrupt. Something seems to be wrong with the following profiles:\n" +#~ "- {profiles}\n" +#~ "Would you like to reset to factory defaults? Reset will remove all your current printers and profiles." +#~ msgstr "" +#~ "설정이 손상된 것 같습니다. 다음 프로파일에 문제가 발생한 것 같습니다.\n" +#~ "- {profiles}\n" +#~ "기본값으로 재설정하시겠습니까? 재설정하면 현재 모든 프린터 및 프로파일이 제거됩니다." + +#~ msgctxt "@info" +#~ msgid "A new version is available!" +#~ msgstr "새 버전을 사용할 수 있습니다!" + +#~ msgctxt "@info:status" +#~ msgid "" +#~ "Failed to install plugin from {0}:\n" +#~ "{1}" +#~ msgstr "" +#~ "{0}에서 플러그인을 설치하지 못했습니다:\n" +#~ "{1}" + +#~ msgctxt "@info:status" +#~ msgid "" +#~ "Failed to install the plugin;\n" +#~ "{0}" +#~ msgstr "" +#~ "플러그인을 설치하지 못했습니다;\n" +#~ "{0}" + +#~ msgctxt "@info:status" +#~ msgid "Failed to uninstall plugin. Plugin will be removed after {0} restarts." +#~ msgstr "플러그인을 제거하지 못했습니다. {0}을(를) 다시 시작하면 플러그인이 제거됩니다." + +#~ msgctxt "@title:tab" +#~ msgid "Setting Visibility" +#~ msgstr "공개 설정하기" + +#~ msgctxt "@label:textbox" +#~ msgid "Check all" +#~ msgstr "모두 확인" + +#~ msgctxt "@label:textbox" +#~ msgid "Filter..." +#~ msgstr "필터..." + +#~ msgctxt "@title:tab" +#~ msgid "Profiles" +#~ msgstr "프로파일" + +#~ msgctxt "@label" +#~ msgid "Duplicate" +#~ msgstr "복제" + +#~ msgctxt "@label %1 is printer name" +#~ msgid "Printer: %1" +#~ msgstr "프린터: %1" + +#~ msgctxt "@action:button" +#~ msgid "Update \"%1\"" +#~ msgstr "업데이트 \"%1\"" + +#~ msgctxt "@action:button" +#~ msgid "Update profile" +#~ msgstr "프로파일 업데이트" + +#~ msgctxt "@action:button" +#~ msgid "Discard current changes" +#~ msgstr "현재 변경 사항 삭제" + +#~ msgctxt "@action:button" +#~ msgid "Reload profile" +#~ msgstr "프로파일 새로 고침" + +#~ msgctxt "@label" +#~ msgid "Based on" +#~ msgstr "기준" + +#~ msgctxt "@label" +#~ msgid "Profile type" +#~ msgstr "프로파일 유형" + +#~ msgctxt "@label" +#~ msgid "Protected profile" +#~ msgstr "보호된 프로파일" + +#~ msgctxt "@label" +#~ msgid "Custom profile" +#~ msgstr "사용자 정의 프로파일" + +#~ msgctxt "@action:button" +#~ msgid "Import" +#~ msgstr "가져오기" + +#~ msgctxt "@action:button" +#~ msgid "Export" +#~ msgstr "내보내기" + +#~ msgctxt "@window:title" +#~ msgid "Import Profile" +#~ msgstr "프로파일 가져오기" + +#~ msgctxt "@title:window" +#~ msgid "Import Profile" +#~ msgstr "프로파일 가져오기" + +#~ msgctxt "@title:window" +#~ msgid "Export Profile" +#~ msgstr "프로파일 내보내기" + #~ msgctxt "@info" #~ msgid "An exception occurred while checking for updates." #~ msgstr "업데이트를 확인하는 중 예외가 발생했습니다." diff -Nru uranium-3.3.0/resources/i18n/nl_NL/uranium.po uranium-4.4.1/resources/i18n/nl_NL/uranium.po --- uranium-3.3.0/resources/i18n/nl_NL/uranium.po 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/resources/i18n/nl_NL/uranium.po 2019-11-19 10:50:46.000000000 +0000 @@ -1,14 +1,14 @@ # Uranium -# Copyright (C) 2018 Ultimaker +# Copyright (C) 2019 Ultimaker B.V. # This file is distributed under the same license as the Uranium package. -# Ruben Dulek , 2018. +# Ruben Dulek , 2019. # msgid "" msgstr "" -"Project-Id-Version: Uranium 3.3\n" +"Project-Id-Version: Uranium 4.4\n" "Report-Msgid-Bugs-To: r.dulek@ultimaker.com\n" -"POT-Creation-Date: 2018-03-29 08:36+0200\n" -"PO-Revision-Date: 2018-04-11 15:55+0100\n" +"POT-Creation-Date: 2019-11-05 13:40+0100\n" +"PO-Revision-Date: 2019-09-23 13:26+0200\n" "Last-Translator: Bothof \n" "Language-Team: Ultimaker , Dutch \n" "Language: nl_NL\n" @@ -16,6 +16,7 @@ "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Generator: Poedit 2.2.1\n" #: /home/ruben/Projects/Uranium/plugins/Views/SimpleView/__init__.py:12 msgctxt "@item:inmenu" @@ -33,6 +34,17 @@ msgid "Wavefront OBJ File" msgstr "Wavefront OBJ-bestand" +#: /home/ruben/Projects/Uranium/plugins/FileHandlers/OBJWriter/OBJWriter.py:23 +msgctxt "@error:not supported" +msgid "OBJWriter does not support non-text mode." +msgstr "OBJWriter ondersteunt geen non-tekstmodus." + +#: /home/ruben/Projects/Uranium/plugins/FileHandlers/OBJWriter/OBJWriter.py:30 +#: /home/ruben/Projects/Uranium/plugins/FileHandlers/STLWriter/STLWriter.py:27 +msgctxt "@error:no mesh" +msgid "There is no mesh to write." +msgstr "Er is geen raster om te schrijven." + #: /home/ruben/Projects/Uranium/plugins/FileHandlers/STLWriter/__init__.py:17 msgctxt "@item:inlistbox" msgid "STL File (ASCII)" @@ -43,80 +55,101 @@ msgid "STL File (Binary)" msgstr "STL-bestand (binair)" -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:42 +#: /home/ruben/Projects/Uranium/plugins/FileHandlers/STLWriter/STLWriter.py:36 +msgctxt "@error:not supported" +msgid "Unsupported output mode writing STL to stream." +msgstr "Niet-ondersteunde uitvoermodus bij het schrijven van STL naar stream." + +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:50 msgctxt "@info" msgid "Could not access update information." msgstr "Geen toegang tot update-informatie." -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:43 -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:60 -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:71 -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:89 -#: /home/ruben/Projects/Uranium/UM/VersionUpgradeManager.py:123 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:51 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:68 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:97 +#: /home/ruben/Projects/Uranium/UM/VersionUpgradeManager.py:155 msgctxt "@info:title" msgid "Version Upgrade" msgstr "Versie-upgrade" -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:55 -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:60 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:63 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:68 msgctxt "@info" msgid "The version you are using does not support checking for updates." msgstr "Het controleren op updates wordt in de door u gebruikte versie niet ondersteund." -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:55 -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:178 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:63 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:188 msgctxt "@info:title" msgid "Warning" msgstr "Waarschuwing" -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:71 -msgctxt "@info" -msgid "A new version is available!" -msgstr "Er is een nieuwe versie beschikbaar." - -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:72 -msgctxt "@action:button" -msgid "Download" -msgstr "Downloaden" - -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:85 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:93 msgctxt "@info" msgid "An error occurred while checking for updates." msgstr "Er is een fout opgetreden tijdens het controleren op updates." -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:85 -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:185 -#: /home/ruben/Projects/Uranium/UM/Qt/Bindings/OutputDeviceManagerProxy.py:128 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:93 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:195 +#: /home/ruben/Projects/Uranium/UM/Qt/Bindings/OutputDeviceManagerProxy.py:141 msgctxt "@info:title" msgid "Error" msgstr "Fout" -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:89 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:97 msgctxt "@info" msgid "No new version was found." msgstr "Er is geen nieuwe versie gevonden." +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:102 +#, python-brace-format +msgctxt "@info:status" +msgid "{application_name} {version_number} is available!" +msgstr "{application_name} {version_number} is beschikbaar!" + +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:104 +#, python-brace-format +msgctxt "@info:status" +msgid "{application_name} {version_number} provides a better and more reliable printing experience." +msgstr "{application_name} {version_number} biedt een betere en betrouwbaardere printervaring." + +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:107 +msgctxt "@action:button" +msgid "Download" +msgstr "Downloaden" + +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:109 +msgctxt "@action:button" +msgid "Learn more" +msgstr "Meer informatie" + #: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateChecker.py:26 msgctxt "@item:inmenu" +msgid "Update Checker" +msgstr "Updatecontrole" + +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateChecker.py:27 +msgctxt "@item:inmenu" msgid "Check for Updates" msgstr "Controleren op Updates" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:33 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:30 msgctxt "@item:inmenu" msgid "Local File" msgstr "Lokaal Bestand" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:34 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:31 msgctxt "@action:button Preceded by 'Ready to'." msgid "Save to File" msgstr "Opslaan als bestand" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:35 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:32 msgctxt "@info:tooltip" msgid "Save to File" msgstr "Opslaan als Bestand" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:56 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:53 msgctxt "@title:window" msgid "Save to File" msgstr "Opslaan als Bestand" @@ -126,63 +159,63 @@ msgid "There are no file types available to write with!" msgstr "Er zijn geen bestandstypen beschikbaar om te schrijven!" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:121 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:130 msgctxt "@title:window" msgid "File Already Exists" msgstr "Het Bestand Bestaat Al" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:121 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:130 #, python-brace-format msgctxt "@label Don't translate the XML tag !" msgid "The file {0} already exists. Are you sure you want to overwrite it?" msgstr "Het bestand {0} bestaat al. Weet u zeker dat u dit bestand wilt overschrijven?" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:150 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:160 #, python-brace-format msgctxt "@info:progress Don't translate the XML tags !" msgid "Saving to {0}" msgstr "Opslaan als {0}" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:151 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:161 msgctxt "@info:title" msgid "Saving" msgstr "Opslaan" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:159 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:169 #, python-brace-format msgctxt "@info:status Don't translate the XML tags !" msgid "Permission denied when trying to save {0}" msgstr "Toegang geweigerd tijdens opslaan als {0}" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:162 -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:178 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:172 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:188 #, python-brace-format msgctxt "@info:status Don't translate the XML tags or !" msgid "Could not save to {0}: {1}" msgstr "Kan niet opslaan als {0}: {1}" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:172 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:182 #, python-brace-format msgctxt "@info:status Don't translate the XML tags !" msgid "Saved to {0}" msgstr "Opgeslagen als {0}" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:172 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:182 msgctxt "@info:title" msgid "File Saved" msgstr "Bestand opgeslagen" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:173 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:183 msgctxt "@action:button" msgid "Open Folder" msgstr "Map Openen" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:173 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:183 msgctxt "@info:tooltip" msgid "Open the folder containing the file" msgstr "De map met het bestand openen" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:185 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:195 #, python-brace-format msgctxt "@info:status" msgid "Something went wrong saving to {0}: {1}" @@ -218,6 +251,16 @@ msgid "Rotate Model" msgstr "Model Roteren" +#: /home/ruben/Projects/Uranium/plugins/Tools/RotateTool/RotateTool.py:279 +msgctxt "@label" +msgid "Laying object flat on buildplate..." +msgstr "Object plat op platform plaatsen..." + +#: /home/ruben/Projects/Uranium/plugins/Tools/RotateTool/RotateTool.py:279 +msgctxt "@title" +msgid "Object Rotation" +msgstr "Objectrotatie" + #: /home/ruben/Projects/Uranium/plugins/Tools/MirrorTool/__init__.py:12 msgctxt "@label" msgid "Mirror" @@ -235,14 +278,19 @@ "Your configuration seems to be corrupt. Something seems to be wrong with the following profiles:\n" "- {profiles}\n" "Would you like to reset to factory defaults?" -msgstr "Uw configuratie is mogelijk beschadigd. Er lijkt een probleem te zijn met de volgende profielen:\n- {profiles}\nWilt u de standaardinstellingen herstellen?" +msgstr "" +"Uw configuratie is mogelijk beschadigd. Er lijkt een probleem te zijn met de volgende profielen:\n" +"- {profiles}\n" +"Wilt u de standaardinstellingen herstellen?" #: /home/ruben/Projects/Uranium/UM/__init__.py:16 +#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:175 msgctxt "@info:status" msgid "Your configuration seems to be corrupt." msgstr "Uw configuratie is mogelijk beschadigd." #: /home/ruben/Projects/Uranium/UM/__init__.py:17 +#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:177 msgctxt "@info:title" msgid "Configuration errors" msgstr "Configuratiefouten" @@ -252,36 +300,66 @@ msgid "Reset your configuration to factory defaults." msgstr "Herstel uw configuratie naar de standaardinstellingen." -#: /home/ruben/Projects/Uranium/UM/Settings/Models/InstanceContainersModel.py:189 -#: /home/ruben/Projects/Uranium/UM/Qt/Bindings/MeshFileHandlerProxy.py:48 -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:655 -#: /home/ruben/Projects/Uranium/UM/FileHandler/FileHandler.py:70 +#: /home/ruben/Projects/Uranium/UM/Settings/Models/InstanceContainersModel.py:181 +#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:708 +#: /home/ruben/Projects/Uranium/UM/FileHandler/FileHandler.py:56 #, python-brace-format msgctxt "@item:inlistbox" msgid "All Supported Types ({0})" msgstr "Alle Ondersteunde Typen ({0})" -#: /home/ruben/Projects/Uranium/UM/Settings/Models/InstanceContainersModel.py:192 -#: /home/ruben/Projects/Uranium/UM/Qt/Bindings/MeshFileHandlerProxy.py:49 -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:656 -#: /home/ruben/Projects/Uranium/UM/FileHandler/FileHandler.py:71 +#: /home/ruben/Projects/Uranium/UM/Settings/Models/InstanceContainersModel.py:184 +#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:709 +#: /home/ruben/Projects/Uranium/UM/FileHandler/FileHandler.py:57 msgctxt "@item:inlistbox" msgid "All Files (*)" msgstr "Alle Bestanden (*)" -#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:108 +#: /home/ruben/Projects/Uranium/UM/PackageManager.py:233 +#, python-brace-format +msgctxt "@error:uninstall" +msgid "" +"There were some errors uninstalling the following packages:\n" +"{packages}" +msgstr "" +"Er zijn fouten opgetreden bij het deïnstalleren van de volgende packages:\n" +"{packages}" + +#: /home/ruben/Projects/Uranium/UM/PackageManager.py:235 +msgctxt "@info:title" +msgid "Uninstalling errors" +msgstr "Fouten bij het de-installeren" + +#: /home/ruben/Projects/Uranium/UM/PackageManager.py:454 +#, python-brace-format +msgctxt "@error:update" +msgid "" +"There was an error uninstalling the package {package} before installing new version:\n" +"{error}.\n" +"Please try to upgrade again later." +msgstr "" +"Er is een fout opgetreden bij het deïnstalleren van de package {package} vóór installatie van de nieuwe versie:\n" +"{error}.\n" +"Probeer de upgrade later opnieuw uit te voeren." + +#: /home/ruben/Projects/Uranium/UM/PackageManager.py:457 +msgctxt "@info:title" +msgid "Updating error" +msgstr "Fout bij het bijwerken" + +#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:112 #, python-brace-format msgctxt "@label Short days-hours-minutes format. {0} is days, {1} is hours, {2} is minutes" msgid "{0:0>2}d {1:0>2}h {2:0>2}min" msgstr "{0:0>2}d {1:0>2}u {2:0>2}min" -#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:110 +#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:114 #, python-brace-format msgctxt "@label Short hours-minutes format. {0} is hours, {1} is minutes" msgid "{0:0>2}h {1:0>2}min" msgstr "{0:0>2}u {1:0>2}min" -#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:113 +#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:117 #, python-brace-format msgctxt "@label Long duration format. {0} is days" msgid "{0} day" @@ -289,8 +367,8 @@ msgstr[0] "{0} dag" msgstr[1] "{0} dagen" -#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:113 -#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:115 +#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:117 +#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:119 #, python-brace-format msgctxt "@label Long duration format. {0} is hours" msgid "{0} hour" @@ -298,9 +376,9 @@ msgstr[0] "{0} uur" msgstr[1] "{0} uur" -#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:113 -#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:115 #: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:117 +#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:119 +#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:121 #, python-brace-format msgctxt "@label Long duration format. {0} is minutes" msgid "{0} minute" @@ -308,150 +386,159 @@ msgstr[0] "{0} minuut" msgstr[1] "{0} minuten" -#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:112 +#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:159 +msgctxt "@info:progress" +msgid "Initializing package manager..." +msgstr "Pakketbeheer initialiseren..." + +#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:180 msgctxt "@info:progress" msgid "Loading plugins..." msgstr "Invoegtoepassingen laden..." -#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:119 +#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:187 msgctxt "@info:progress" msgid "Updating configuration..." msgstr "Configuratie bijwerken..." -#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:136 +#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:205 msgctxt "@info:progress" msgid "Loading preferences..." msgstr "Voorkeuren laden..." -#: /home/ruben/Projects/Uranium/UM/Mesh/ReadMeshJob.py:65 +#: /home/ruben/Projects/Uranium/UM/Mesh/ReadMeshJob.py:68 #, python-format, python-brace-format msgctxt "@info:status" msgid "Auto scaled object to {0}% of original size" msgstr "Het object is automatisch geschaald naar {0}% van het oorspronkelijke formaat" -#: /home/ruben/Projects/Uranium/UM/Mesh/ReadMeshJob.py:65 +#: /home/ruben/Projects/Uranium/UM/Mesh/ReadMeshJob.py:68 msgctxt "@info:title" msgid "Scaling Object" msgstr "Object schalen" -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:220 +#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:277 msgctxt "@info:status" msgid "" "The plugin has been installed.\n" "Please re-start the application to activate the plugin." -msgstr "De invoegtoepassing is geïnstalleerd.\nStart de toepassing opnieuw om de invoegtoepassing te activeren." - -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:231 -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:270 -#, python-brace-format -msgctxt "@info:status" -msgid "" -"Failed to install plugin from {0}:\n" -"{1}" -msgstr "Kan de invoegtoepassing van {0} niet installeren:\n{1}" - -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:254 -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:259 -#, python-brace-format -msgctxt "@info:status" -msgid "" -"Failed to install the plugin;\n" -"{0}" -msgstr "Kan de invoegtoepassing niet installeren;\n{0}" +msgstr "" +"De invoegtoepassing is geïnstalleerd.\n" +"Start de toepassing opnieuw om de invoegtoepassing te activeren." -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:421 +#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:415 #, python-brace-format msgctxt "@info:status" msgid "" "The plugin has been removed.\n" "Please restart {0} to finish uninstall." -msgstr "De invoegtoepassing is verwijderd.\nStart {0} opnieuw om het verwijderen te voltooien." - -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:433 -#, python-brace-format -msgctxt "@info:status" -msgid "Failed to uninstall plugin. Plugin will be removed after {0} restarts." -msgstr "Kan de invoegtoepassing niet verwijderen. De invoegtoepassing wordt na {0} keer opnieuw opstarten verwijderd." +msgstr "" +"De invoegtoepassing is verwijderd.\n" +"Start {0} opnieuw om het verwijderen te voltooien." -#: /home/ruben/Projects/Uranium/UM/VersionUpgradeManager.py:123 +#: /home/ruben/Projects/Uranium/UM/VersionUpgradeManager.py:155 #, python-brace-format msgctxt "@info:version-upgrade" msgid "A configuration from an older version of {0} was imported." msgstr "Er is een configuratie van een oudere versie van {0} geïmporteerd." -#: /home/ruben/Projects/Uranium/UM/View/GL/OpenGL.py:50 +#: /home/ruben/Projects/Uranium/UM/View/GL/OpenGL.py:58 +#: /home/ruben/Projects/Uranium/UM/View/GL/OpenGL.py:63 msgctxt "@message" msgid "Failed to Initialize OpenGL" msgstr "Kan OpenGL niet initialiseren" -#: /home/ruben/Projects/Uranium/UM/View/GL/OpenGL.py:60 +#: /home/ruben/Projects/Uranium/UM/View/GL/OpenGL.py:73 msgctxt "Critical OpenGL Extensions Missing" msgid "Critical OpenGL extensions are missing. This program requires support for Framebuffer Objects. Please check your video card drivers." msgstr "Er ontbreken essentiële OpenGL-extensies. Voor dit programma is ondersteuning voor Framebuffer-objecten vereist. Controleer het stuurprogramma voor uw videokaart." -#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:153 +#: /home/ruben/Projects/Uranium/UM/ConfigurationErrorMessage.py:32 +#: /home/ruben/Projects/Uranium/plugins/Tools/ScaleTool/ScaleTool.qml:67 +#: /home/ruben/Projects/Uranium/plugins/Tools/RotateTool/RotateTool.qml:21 +msgctxt "@action:button" +msgid "Reset" +msgstr "Herstellen" + +#: /home/ruben/Projects/Uranium/UM/ConfigurationErrorMessage.py:44 +#, python-brace-format +msgctxt "@info:status" +msgid "" +"Your configuration seems to be corrupt. Something seems to be wrong with the following profiles:\n" +"- {profiles}\n" +" Would you like to reset to factory defaults? Reset will remove all your current printers and profiles." +msgstr "" +"Uw configuratie is mogelijk beschadigd. Er lijkt een probleem te zijn met de volgende profielen:\n" +"- {profiles}\n" +" Wilt u de standaardinstellingen herstellen? Hiermee worden al uw huidige printers en profielen gewist." + +#: /home/ruben/Projects/Uranium/UM/ConfigurationErrorMessage.py:49 +msgctxt "@title:window" +msgid "Reset to factory" +msgstr "Herstellen naar fabrieksinstellingen" + +#: /home/ruben/Projects/Uranium/UM/ConfigurationErrorMessage.py:51 +msgctxt "@label" +msgid "Reset will remove all your current printers and profiles! Are you sure you want to reset?" +msgstr "Als u de instellingen herstelt, worden alle huidige printers en profielen verwijderd. Weet u zeker dat u de instellingen wilt herstellen?" + +#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:162 #, python-brace-format msgctxt "@info" msgid "Would you like to reload {filename}?" msgstr "Wilt u {filename} opnieuw laden?" -#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:154 +#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:163 msgctxt "@info:title" msgid "File has been modified" msgstr "Het bestand is gewijzigd" -#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:155 +#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:164 msgctxt "@action:button" msgid "Reload" msgstr "Opnieuw laden" -#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:155 +#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:164 msgctxt "@action:description" msgid "This will trigger the modified files to reload from disk." msgstr "Hiermee wordt het opnieuw laden van de bestanden vanaf de schijf geactiveerd." -#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:32 +#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:36 #, python-brace-format msgctxt "@info:status Don't translate the XML tag !" msgid "Cannot open files of the type of {0}" msgstr "Kan geen bestanden openen van het type {0}" -#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:32 -#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:47 -#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:70 +#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:36 +#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:51 +#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:74 msgctxt "@info:title" msgid "Invalid File" msgstr "Ongeldig bestand" -#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:45 -#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:70 +#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:49 +#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:74 #, python-brace-format msgctxt "@info:status Don't translate the XML tag !" msgid "Failed to load {0}" msgstr "Kan {0} niet laden" -#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:54 +#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:59 msgctxt "@info:title" msgid "Loading" msgstr "Laden" -#: /home/ruben/Projects/Uranium/plugins/Tools/ScaleTool/ScaleTool.qml:60 -#: /home/ruben/Projects/Uranium/plugins/Tools/RotateTool/RotateTool.qml:21 -msgctxt "@action:button" -msgid "Reset" -msgstr "Herstellen" - -#: /home/ruben/Projects/Uranium/plugins/Tools/ScaleTool/ScaleTool.qml:86 +#: /home/ruben/Projects/Uranium/plugins/Tools/ScaleTool/ScaleTool.qml:93 msgctxt "@option:check" msgid "Snap Scaling" msgstr "Schalen in Stappen" -#: /home/ruben/Projects/Uranium/plugins/Tools/ScaleTool/ScaleTool.qml:104 +#: /home/ruben/Projects/Uranium/plugins/Tools/ScaleTool/ScaleTool.qml:121 msgctxt "@option:check" msgid "Uniform Scaling" msgstr "Uniform Schalen" -#: /home/ruben/Projects/Uranium/plugins/Tools/TranslateTool/TranslateTool.qml:177 +#: /home/ruben/Projects/Uranium/plugins/Tools/TranslateTool/TranslateTool.qml:196 msgctxt "@option:check" msgid "Lock Model" msgstr "Model vergrendelen" @@ -461,89 +548,37 @@ msgid "Lay flat" msgstr "Plat neerleggen" -#: /home/ruben/Projects/Uranium/plugins/Tools/RotateTool/RotateTool.qml:55 +#: /home/ruben/Projects/Uranium/plugins/Tools/RotateTool/RotateTool.qml:60 +msgctxt "@action:button" +msgid "Select face to align to the build plate" +msgstr "Selecteer de kant die u wilt uitlijnen met het platform" + +#: /home/ruben/Projects/Uranium/plugins/Tools/RotateTool/RotateTool.qml:81 msgctxt "@action:checkbox" msgid "Snap Rotation" msgstr "Roteren in Stappen" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:19 -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:148 -msgctxt "@title:tab" -msgid "Plugins" -msgstr "Invoegtoepassingen" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:28 -msgctxt "@action:button" -msgid "Install new plugin" -msgstr "Nieuwe invoegtoepassing installeren" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:51 -msgctxt "@label" -msgid "You will need to restart the application before changes in plugins have effect." -msgstr "U moet de toepassing opnieuw starten voordat wijzigingen in invoegtoepassingen van kracht worden." - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:87 -msgctxt "@label" -msgid "This plugin is required for the application to run." -msgstr "Voor het uitvoeren van de toepassing is deze invoegtoepassing vereist." - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:104 -msgctxt "@label" -msgid "Info..." -msgstr "Info..." - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:122 -msgctxt "@window:title" -msgid "Install Plugin" -msgstr "Invoegtoepassing installeren" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:131 -msgctxt "@title:window" -msgid "Open file(s)" -msgstr "Bestand(en) openen" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:165 -msgctxt "@label" -msgid "No text available" -msgstr "Geen tekst beschikbaar" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:171 -msgctxt "@title:window" -msgid "About %1" -msgstr "Over %1" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:203 -msgctxt "@label" -msgid "Author:" -msgstr "Auteur:" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:225 -msgctxt "@label" -msgid "Version:" -msgstr "Versie:" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:243 -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:113 -msgctxt "@action:button" -msgid "Close" -msgstr "Sluiten" - #: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:18 msgctxt "@title:window" msgid "Preferences" msgstr "Voorkeuren" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:106 +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:107 msgctxt "@action:button" msgid "Defaults" msgstr "Standaardwaarden" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:146 +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:115 +msgctxt "@action:button" +msgid "Close" +msgstr "Sluiten" + +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:148 msgctxt "@title:tab" msgid "General" msgstr "Algemeen" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:147 +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:149 msgctxt "@title:tab" msgid "Settings" msgstr "Instellingen" @@ -553,44 +588,34 @@ msgid "Rename" msgstr "Hernoemen" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/RenameDialog.qml:56 +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/RenameDialog.qml:20 +msgctxt "@info" +msgid "Please provide a new name." +msgstr "Geef een nieuwe naam op." + +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/RenameDialog.qml:70 #: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Wizard.qml:241 msgctxt "@action:button" msgid "Cancel" msgstr "Annuleren" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/RenameDialog.qml:60 +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/RenameDialog.qml:75 msgctxt "@action:button" msgid "OK" msgstr "OK" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/SettingVisibilityItem.qml:34 +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/SettingVisibilityItem.qml:32 msgctxt "@item:tooltip" msgid "This setting has been hidden by the active machine and will not be visible." msgstr "Deze instelling is door de actieve machine verborgen en wordt niet zichtbaar." -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/SettingVisibilityItem.qml:51 +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/SettingVisibilityItem.qml:49 msgctxt "@item:tooltip %1 is list of setting names" msgid "This setting has been hidden by the value of %1. Change the value of that setting to make this setting visible." msgid_plural "This setting has been hidden by the values of %1. Change the values of those settings to make this setting visible." msgstr[0] "Deze instelling is verborgen vanwege de waarde van %1. Wijzig de waarde van die instelling om deze instelling zichtbaar te maken." msgstr[1] "Deze instelling is verborgen vanwege de waarden van %1. Wijzig de waarden van die instellingen om deze instelling zichtbaar te maken." -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/SettingVisibilityPage.qml:12 -msgctxt "@title:tab" -msgid "Setting Visibility" -msgstr "Zichtbaarheid Instellen" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/SettingVisibilityPage.qml:42 -msgctxt "@label:textbox" -msgid "Check all" -msgstr "Alles aanvinken" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/SettingVisibilityPage.qml:89 -msgctxt "@label:textbox" -msgid "Filter..." -msgstr "Filteren..." - #: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/MachinesPage.qml:12 msgctxt "@title:tab" msgid "Printers" @@ -609,87 +634,7 @@ #: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ConfirmRemoveDialog.qml:17 msgctxt "@label (%1 is object name)" msgid "Are you sure you wish to remove %1? This cannot be undone!" -msgstr "Weet u zeker dat u %1 wilt verwijderen? Deze bewerking kan niet ongedaan worden gemaakt." - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:14 -msgctxt "@title:tab" -msgid "Profiles" -msgstr "Profielen" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:15 -msgctxt "@label" -msgid "Duplicate" -msgstr "Dupliceren" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:45 -msgctxt "@label %1 is printer name" -msgid "Printer: %1" -msgstr "Printer: %1" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:83 -msgctxt "@action:button" -msgid "Update \"%1\"" -msgstr "\"%1\" bijwerken" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:84 -msgctxt "@action:button" -msgid "Update profile" -msgstr "Profiel bijwerken" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:92 -msgctxt "@action:button" -msgid "Discard current changes" -msgstr "Huidige wijzigingen verwijderen" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:93 -msgctxt "@action:button" -msgid "Reload profile" -msgstr "Profiel opnieuw laden" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:107 -msgctxt "@label" -msgid "Based on" -msgstr "Gebaseerd op" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:107 -msgctxt "@label" -msgid "Profile type" -msgstr "Profieltype" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:112 -msgctxt "@label" -msgid "Protected profile" -msgstr "Beschermd profiel" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:112 -msgctxt "@label" -msgid "Custom profile" -msgstr "Aangepast profiel" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:139 -msgctxt "@action:button" -msgid "Import" -msgstr "Importeren" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:146 -msgctxt "@action:button" -msgid "Export" -msgstr "Exporteren" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:184 -msgctxt "@window:title" -msgid "Import Profile" -msgstr "Profiel Importeren" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:192 -msgctxt "@title:window" -msgid "Import Profile" -msgstr "Profiel Importeren" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:219 -msgctxt "@title:window" -msgid "Export Profile" -msgstr "Profiel Exporteren" +msgstr "Weet u zeker dat u %1 wilt verwijderen? Deze bewerking kan niet ongedaan worden gemaakt!" #: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Wizard.qml:215 msgctxt "@action:button" @@ -906,6 +851,186 @@ msgid "Mirror Tool" msgstr "Spiegelgereedschap" +#~ msgctxt "@title:tab" +#~ msgid "Plugins" +#~ msgstr "Invoegtoepassingen" + +#~ msgctxt "@action:button" +#~ msgid "Install new plugin" +#~ msgstr "Nieuwe invoegtoepassing installeren" + +#~ msgctxt "@label" +#~ msgid "You will need to restart the application before changes in plugins have effect." +#~ msgstr "U moet de toepassing opnieuw starten voordat wijzigingen in invoegtoepassingen van kracht worden." + +#~ msgctxt "@label" +#~ msgid "This plugin is required for the application to run." +#~ msgstr "Voor het uitvoeren van de toepassing is deze invoegtoepassing vereist." + +#~ msgctxt "@label" +#~ msgid "Info..." +#~ msgstr "Info..." + +#~ msgctxt "@window:title" +#~ msgid "Install Plugin" +#~ msgstr "Invoegtoepassing installeren" + +#~ msgctxt "@title:window" +#~ msgid "Open file(s)" +#~ msgstr "Bestand(en) openen" + +#~ msgctxt "@label" +#~ msgid "No text available" +#~ msgstr "Geen tekst beschikbaar" + +#~ msgctxt "@title:window" +#~ msgid "About %1" +#~ msgstr "Over %1" + +#~ msgctxt "@label" +#~ msgid "Author:" +#~ msgstr "Auteur:" + +#~ msgctxt "@label" +#~ msgid "Version:" +#~ msgstr "Versie:" + +#~ msgctxt "@action:button" +#~ msgid "Learn more about the new features" +#~ msgstr "Meer informatie over de nieuwe functies" + +#~ msgctxt "@info:status" +#~ msgid "Cura {0} is available!" +#~ msgstr "Cura {0} is beschikbaar." + +#~ msgctxt "@info:status" +#~ msgid "Cura {0} provides better and reliable printing experience." +#~ msgstr "Cura {0} biedt een betere en betrouwbare printervaring." + +#~ msgctxt "@action:button" +#~ msgid "Learn more about new features" +#~ msgstr "Meer informatie over de nieuwe functies" + +#~ msgctxt "@error:update" +#~ msgid "" +#~ "There was an error uninstalling the package {package} before installingnew version:\n" +#~ "{error}.\n" +#~ "Please try to upgrade again later." +#~ msgstr "" +#~ "Er is een fout opgetreden bij het de-installeren van de package {package} vóór installatie van de nieuwe versie:\n" +#~ "{error}.\n" +#~ "Probeer de upgrade later opnieuw uit te voeren." + +#~ msgctxt "@info:status" +#~ msgid "" +#~ "Your configuration seems to be corrupt. Something seems to be wrong with the following profiles:\n" +#~ "- {profiles}\n" +#~ "Would you like to reset to factory defaults? Reset will remove all your current printers and profiles." +#~ msgstr "" +#~ "Uw configuratie is mogelijk beschadigd. Er lijkt een probleem te zijn met de volgende profielen:\n" +#~ "- {profiles}\n" +#~ "Wilt u de standaardinstellingen herstellen? Hiermee worden al uw huidige printers en profielen gewist." + +#~ msgctxt "@info" +#~ msgid "A new version is available!" +#~ msgstr "Er is een nieuwe versie beschikbaar." + +#~ msgctxt "@info:status" +#~ msgid "" +#~ "Failed to install plugin from {0}:\n" +#~ "{1}" +#~ msgstr "" +#~ "Kan de invoegtoepassing van {0} niet installeren:\n" +#~ "{1}" + +#~ msgctxt "@info:status" +#~ msgid "" +#~ "Failed to install the plugin;\n" +#~ "{0}" +#~ msgstr "" +#~ "Kan de invoegtoepassing niet installeren;\n" +#~ "{0}" + +#~ msgctxt "@info:status" +#~ msgid "Failed to uninstall plugin. Plugin will be removed after {0} restarts." +#~ msgstr "Kan de invoegtoepassing niet verwijderen. De invoegtoepassing wordt na {0} keer opnieuw opstarten verwijderd." + +#~ msgctxt "@title:tab" +#~ msgid "Setting Visibility" +#~ msgstr "Zichtbaarheid Instellen" + +#~ msgctxt "@label:textbox" +#~ msgid "Check all" +#~ msgstr "Alles aanvinken" + +#~ msgctxt "@label:textbox" +#~ msgid "Filter..." +#~ msgstr "Filteren..." + +#~ msgctxt "@title:tab" +#~ msgid "Profiles" +#~ msgstr "Profielen" + +#~ msgctxt "@label" +#~ msgid "Duplicate" +#~ msgstr "Dupliceren" + +#~ msgctxt "@label %1 is printer name" +#~ msgid "Printer: %1" +#~ msgstr "Printer: %1" + +#~ msgctxt "@action:button" +#~ msgid "Update \"%1\"" +#~ msgstr "\"%1\" bijwerken" + +#~ msgctxt "@action:button" +#~ msgid "Update profile" +#~ msgstr "Profiel bijwerken" + +#~ msgctxt "@action:button" +#~ msgid "Discard current changes" +#~ msgstr "Huidige wijzigingen verwijderen" + +#~ msgctxt "@action:button" +#~ msgid "Reload profile" +#~ msgstr "Profiel opnieuw laden" + +#~ msgctxt "@label" +#~ msgid "Based on" +#~ msgstr "Gebaseerd op" + +#~ msgctxt "@label" +#~ msgid "Profile type" +#~ msgstr "Profieltype" + +#~ msgctxt "@label" +#~ msgid "Protected profile" +#~ msgstr "Beschermd profiel" + +#~ msgctxt "@label" +#~ msgid "Custom profile" +#~ msgstr "Aangepast profiel" + +#~ msgctxt "@action:button" +#~ msgid "Import" +#~ msgstr "Importeren" + +#~ msgctxt "@action:button" +#~ msgid "Export" +#~ msgstr "Exporteren" + +#~ msgctxt "@window:title" +#~ msgid "Import Profile" +#~ msgstr "Profiel Importeren" + +#~ msgctxt "@title:window" +#~ msgid "Import Profile" +#~ msgstr "Profiel Importeren" + +#~ msgctxt "@title:window" +#~ msgid "Export Profile" +#~ msgstr "Profiel Exporteren" + #~ msgctxt "@info" #~ msgid "An exception occurred while checking for updates." #~ msgstr "Er is een uitzondering opgetreden tijdens het controleren op updates." diff -Nru uranium-3.3.0/resources/i18n/pl_PL/uranium.po uranium-4.4.1/resources/i18n/pl_PL/uranium.po --- uranium-3.3.0/resources/i18n/pl_PL/uranium.po 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/resources/i18n/pl_PL/uranium.po 2019-11-19 10:50:46.000000000 +0000 @@ -1,22 +1,23 @@ # Uranium -# Copyright (C) 2018 Ultimaker +# Copyright (C) 2019 Ultimaker B.V. # This file is distributed under the same license as the Uranium package. -# Ruben Dulek , 2018. +# Ruben Dulek , 2019. # msgid "" msgstr "" -"Project-Id-Version: Uranium 3.3\n" +"Project-Id-Version: Uranium 4.4\n" "Report-Msgid-Bugs-To: r.dulek@ultimaker.com\n" -"POT-Creation-Date: 2018-03-29 08:36+0200\n" -"PO-Revision-Date: 2018-03-30 20:39+0200\n" -"Last-Translator: 'Jaguś' Paweł Jagusiak and Andrzej 'anraf1001' Rafalski\n" +"POT-Creation-Date: 2019-11-05 13:40+0100\n" +"PO-Revision-Date: 2019-11-15 15:35+0100\n" +"Last-Translator: Mariusz 'Virgin71' Matłosz \n" "Language-Team: reprapy.pl\n" "Language: pl_PL\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -"X-Generator: Poedit 2.0.6\n" +"X-Generator: Poedit 2.2.4\n" +"X-Poedit-SourceCharset: UTF-8\n" #: /home/ruben/Projects/Uranium/plugins/Views/SimpleView/__init__.py:12 msgctxt "@item:inmenu" @@ -34,6 +35,17 @@ msgid "Wavefront OBJ File" msgstr "Plik Wavefront OBJ" +#: /home/ruben/Projects/Uranium/plugins/FileHandlers/OBJWriter/OBJWriter.py:23 +msgctxt "@error:not supported" +msgid "OBJWriter does not support non-text mode." +msgstr "OBJWriter nie obsługuje trybu nietekstowego." + +#: /home/ruben/Projects/Uranium/plugins/FileHandlers/OBJWriter/OBJWriter.py:30 +#: /home/ruben/Projects/Uranium/plugins/FileHandlers/STLWriter/STLWriter.py:27 +msgctxt "@error:no mesh" +msgid "There is no mesh to write." +msgstr "Nie ma siatki do zapisania." + #: /home/ruben/Projects/Uranium/plugins/FileHandlers/STLWriter/__init__.py:17 msgctxt "@item:inlistbox" msgid "STL File (ASCII)" @@ -44,80 +56,101 @@ msgid "STL File (Binary)" msgstr "Plik STL (Binarny)" -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:42 +#: /home/ruben/Projects/Uranium/plugins/FileHandlers/STLWriter/STLWriter.py:36 +msgctxt "@error:not supported" +msgid "Unsupported output mode writing STL to stream." +msgstr "Nieobsługiwany tryb wyjściowy zapisu STL do strumienia." + +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:50 msgctxt "@info" msgid "Could not access update information." msgstr "Nie można uzyskać informacji o aktualizacji." -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:43 -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:60 -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:71 -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:89 -#: /home/ruben/Projects/Uranium/UM/VersionUpgradeManager.py:123 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:51 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:68 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:97 +#: /home/ruben/Projects/Uranium/UM/VersionUpgradeManager.py:155 msgctxt "@info:title" msgid "Version Upgrade" msgstr "Aktualizacja wersji" -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:55 -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:60 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:63 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:68 msgctxt "@info" msgid "The version you are using does not support checking for updates." msgstr "Wersja, której używasz nie wspiera sprawdzania aktualizacji." -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:55 -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:178 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:63 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:188 msgctxt "@info:title" msgid "Warning" msgstr "Ostrzeżenie" -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:71 -msgctxt "@info" -msgid "A new version is available!" -msgstr "Dostępna jest nowa wersja!" - -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:72 -msgctxt "@action:button" -msgid "Download" -msgstr "Pobierz" - -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:85 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:93 msgctxt "@info" msgid "An error occurred while checking for updates." msgstr "Wystąpił błąd podczas sprawdzania aktualizacji." -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:85 -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:185 -#: /home/ruben/Projects/Uranium/UM/Qt/Bindings/OutputDeviceManagerProxy.py:128 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:93 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:195 +#: /home/ruben/Projects/Uranium/UM/Qt/Bindings/OutputDeviceManagerProxy.py:141 msgctxt "@info:title" msgid "Error" msgstr "Błąd" -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:89 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:97 msgctxt "@info" msgid "No new version was found." msgstr "Nie znaleziono nowej wersji." +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:102 +#, python-brace-format +msgctxt "@info:status" +msgid "{application_name} {version_number} is available!" +msgstr "{application_name} {version_number} jest dostępna!" + +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:104 +#, python-brace-format +msgctxt "@info:status" +msgid "{application_name} {version_number} provides a better and more reliable printing experience." +msgstr "{application_name} {version_number} zapewnia lepszą i bardziej niezawodną obsługę drukowania." + +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:107 +msgctxt "@action:button" +msgid "Download" +msgstr "Pobierz" + +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:109 +msgctxt "@action:button" +msgid "Learn more" +msgstr "Dowiedz się więcej" + #: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateChecker.py:26 msgctxt "@item:inmenu" +msgid "Update Checker" +msgstr "Sprawdź aktualizacje" + +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateChecker.py:27 +msgctxt "@item:inmenu" msgid "Check for Updates" msgstr "Sprawdź aktualizacje" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:33 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:30 msgctxt "@item:inmenu" msgid "Local File" msgstr "Plik lokalny" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:34 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:31 msgctxt "@action:button Preceded by 'Ready to'." msgid "Save to File" msgstr "Zapisz do pliku" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:35 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:32 msgctxt "@info:tooltip" msgid "Save to File" msgstr "Zapisz do pliku" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:56 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:53 msgctxt "@title:window" msgid "Save to File" msgstr "Zapisz do pliku" @@ -127,64 +160,64 @@ msgid "There are no file types available to write with!" msgstr "Nie ma żadnych typów plików do zapisania!" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:121 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:130 msgctxt "@title:window" msgid "File Already Exists" msgstr "Plik już istnieje" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:121 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:130 #, python-brace-format msgctxt "@label Don't translate the XML tag !" msgid "The file {0} already exists. Are you sure you want to overwrite it?" msgstr "Plik {0} już istnieje. Jesteś pewny, że chcesz go nadpisać?" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:150 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:160 #, python-brace-format msgctxt "@info:progress Don't translate the XML tags !" msgid "Saving to {0}" msgstr "Zapisuję do {0}" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:151 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:161 msgctxt "@info:title" msgid "Saving" msgstr "Zapisuję" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:159 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:169 #, python-brace-format msgctxt "@info:status Don't translate the XML tags !" msgid "Permission denied when trying to save {0}" msgstr "Odrzucenie uprawnień podczas zapisu pliku {0}" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:162 -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:178 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:172 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:188 #, python-brace-format msgctxt "@info:status Don't translate the XML tags or !" msgid "Could not save to {0}: {1}" msgstr "Nie można zapisać {0}: {1}" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:172 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:182 #, python-brace-format msgctxt "@info:status Don't translate the XML tags !" msgid "Saved to {0}" msgstr "Zapisano do {0}" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:172 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:182 msgctxt "@info:title" msgid "File Saved" msgstr "Zapisano plik" # otwórz folder -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:173 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:183 msgctxt "@action:button" msgid "Open Folder" msgstr "Otwórz folder" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:173 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:183 msgctxt "@info:tooltip" msgid "Open the folder containing the file" msgstr "Otwórz folder zawierający plik" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:185 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:195 #, python-brace-format msgctxt "@info:status" msgid "Something went wrong saving to {0}: {1}" @@ -220,6 +253,16 @@ msgid "Rotate Model" msgstr "Obróć model" +#: /home/ruben/Projects/Uranium/plugins/Tools/RotateTool/RotateTool.py:279 +msgctxt "@label" +msgid "Laying object flat on buildplate..." +msgstr "Ustawiam obiekt płasko na powierzchni druku..." + +#: /home/ruben/Projects/Uranium/plugins/Tools/RotateTool/RotateTool.py:279 +msgctxt "@title" +msgid "Object Rotation" +msgstr "Obracanie obiektu" + #: /home/ruben/Projects/Uranium/plugins/Tools/MirrorTool/__init__.py:12 msgctxt "@label" msgid "Mirror" @@ -243,11 +286,13 @@ "Czy chcesz przywrócić ustawienia fabryczne?" #: /home/ruben/Projects/Uranium/UM/__init__.py:16 +#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:175 msgctxt "@info:status" msgid "Your configuration seems to be corrupt." msgstr "Twoja konfiguracja wygląda na uszkodzoną." #: /home/ruben/Projects/Uranium/UM/__init__.py:17 +#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:177 msgctxt "@info:title" msgid "Configuration errors" msgstr "Błędy konfiguracji" @@ -257,36 +302,66 @@ msgid "Reset your configuration to factory defaults." msgstr "Zresetuj twoją konfigurację do ustawień fabrycznych." -#: /home/ruben/Projects/Uranium/UM/Settings/Models/InstanceContainersModel.py:189 -#: /home/ruben/Projects/Uranium/UM/Qt/Bindings/MeshFileHandlerProxy.py:48 -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:655 -#: /home/ruben/Projects/Uranium/UM/FileHandler/FileHandler.py:70 +#: /home/ruben/Projects/Uranium/UM/Settings/Models/InstanceContainersModel.py:181 +#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:708 +#: /home/ruben/Projects/Uranium/UM/FileHandler/FileHandler.py:56 #, python-brace-format msgctxt "@item:inlistbox" msgid "All Supported Types ({0})" msgstr "Wszystkie obsługiwane typy ({0})" -#: /home/ruben/Projects/Uranium/UM/Settings/Models/InstanceContainersModel.py:192 -#: /home/ruben/Projects/Uranium/UM/Qt/Bindings/MeshFileHandlerProxy.py:49 -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:656 -#: /home/ruben/Projects/Uranium/UM/FileHandler/FileHandler.py:71 +#: /home/ruben/Projects/Uranium/UM/Settings/Models/InstanceContainersModel.py:184 +#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:709 +#: /home/ruben/Projects/Uranium/UM/FileHandler/FileHandler.py:57 msgctxt "@item:inlistbox" msgid "All Files (*)" msgstr "Wszystkie pliki (*)" -#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:108 +#: /home/ruben/Projects/Uranium/UM/PackageManager.py:233 +#, python-brace-format +msgctxt "@error:uninstall" +msgid "" +"There were some errors uninstalling the following packages:\n" +"{packages}" +msgstr "" +"Wystąpiły błędy podczas odinstalowywania następujących pakietów:\n" +"{packages}" + +#: /home/ruben/Projects/Uranium/UM/PackageManager.py:235 +msgctxt "@info:title" +msgid "Uninstalling errors" +msgstr "Błędy odinstalowywania" + +#: /home/ruben/Projects/Uranium/UM/PackageManager.py:454 +#, python-brace-format +msgctxt "@error:update" +msgid "" +"There was an error uninstalling the package {package} before installing new version:\n" +"{error}.\n" +"Please try to upgrade again later." +msgstr "" +"Wystąpił błąd podczas odinstalowywania pakietu {package} przed instalacją nowej wersji:\n" +"{error}.\n" +"Spróbuj uaktualnić później." + +#: /home/ruben/Projects/Uranium/UM/PackageManager.py:457 +msgctxt "@info:title" +msgid "Updating error" +msgstr "Błąd aktualizacji" + +#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:112 #, python-brace-format msgctxt "@label Short days-hours-minutes format. {0} is days, {1} is hours, {2} is minutes" msgid "{0:0>2}d {1:0>2}h {2:0>2}min" msgstr "{0:0>2}d {1:0>2}h {2:0>2}min" -#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:110 +#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:114 #, python-brace-format msgctxt "@label Short hours-minutes format. {0} is hours, {1} is minutes" msgid "{0:0>2}h {1:0>2}min" msgstr "{0:0>2}h {1:0>2}min" -#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:113 +#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:117 #, python-brace-format msgctxt "@label Long duration format. {0} is days" msgid "{0} day" @@ -294,8 +369,8 @@ msgstr[0] "{0} dzień" msgstr[1] "{0} dni" -#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:113 -#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:115 +#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:117 +#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:119 #, python-brace-format msgctxt "@label Long duration format. {0} is hours" msgid "{0} hour" @@ -303,9 +378,9 @@ msgstr[0] "{0} godzina" msgstr[1] "{0} godziny" -#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:113 -#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:115 #: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:117 +#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:119 +#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:121 #, python-brace-format msgctxt "@label Long duration format. {0} is minutes" msgid "{0} minute" @@ -313,33 +388,38 @@ msgstr[0] "{0} minuta" msgstr[1] "{0} minuty" -#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:112 +#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:159 +msgctxt "@info:progress" +msgid "Initializing package manager..." +msgstr "Inicjowanie menedżera pakietów…" + +#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:180 msgctxt "@info:progress" msgid "Loading plugins..." msgstr "Wczytywanie wtyczek..." -#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:119 +#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:187 msgctxt "@info:progress" msgid "Updating configuration..." msgstr "Aktualizowanie konfiguracji..." -#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:136 +#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:205 msgctxt "@info:progress" msgid "Loading preferences..." msgstr "Ładowanie preferencji..." -#: /home/ruben/Projects/Uranium/UM/Mesh/ReadMeshJob.py:65 +#: /home/ruben/Projects/Uranium/UM/Mesh/ReadMeshJob.py:68 #, python-format, python-brace-format msgctxt "@info:status" msgid "Auto scaled object to {0}% of original size" msgstr "Obiekt przeskalowany do {0}% oryginalnego rozmiaru" -#: /home/ruben/Projects/Uranium/UM/Mesh/ReadMeshJob.py:65 +#: /home/ruben/Projects/Uranium/UM/Mesh/ReadMeshJob.py:68 msgctxt "@info:title" msgid "Scaling Object" msgstr "Skalowanie obiektu" -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:220 +#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:277 msgctxt "@info:status" msgid "" "The plugin has been installed.\n" @@ -348,29 +428,7 @@ "Wtyczka została zainstalowana.\n" "Proszę zrestartuj aplikację, aby aktywować wtyczkę." -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:231 -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:270 -#, python-brace-format -msgctxt "@info:status" -msgid "" -"Failed to install plugin from {0}:\n" -"{1}" -msgstr "" -"Nie można zainstalować wtyczki z {0}:\n" -"{1}" - -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:254 -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:259 -#, python-brace-format -msgctxt "@info:status" -msgid "" -"Failed to install the plugin;\n" -"{0}" -msgstr "" -"Nie udało się zainstalować wtyczki;\n" -"{0}" - -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:421 +#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:415 #, python-brace-format msgctxt "@info:status" msgid "" @@ -380,91 +438,110 @@ "Wtyczka została usunięta.\n" "Proszę zrestartuj {0}, aby zakończyć odinstalowywanie." -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:433 -#, python-brace-format -msgctxt "@info:status" -msgid "Failed to uninstall plugin. Plugin will be removed after {0} restarts." -msgstr "Nie udało się odinstalować wtyczki. Wtyczka zostanie usunięta po {0} ponownych uruchomieniach." - -#: /home/ruben/Projects/Uranium/UM/VersionUpgradeManager.py:123 +#: /home/ruben/Projects/Uranium/UM/VersionUpgradeManager.py:155 #, python-brace-format msgctxt "@info:version-upgrade" msgid "A configuration from an older version of {0} was imported." msgstr "Zainstalowano konfigurację ze starszej wersji {0}." -#: /home/ruben/Projects/Uranium/UM/View/GL/OpenGL.py:50 +#: /home/ruben/Projects/Uranium/UM/View/GL/OpenGL.py:58 +#: /home/ruben/Projects/Uranium/UM/View/GL/OpenGL.py:63 msgctxt "@message" msgid "Failed to Initialize OpenGL" msgstr "Nie można zainicjować OpenGL" -#: /home/ruben/Projects/Uranium/UM/View/GL/OpenGL.py:60 +#: /home/ruben/Projects/Uranium/UM/View/GL/OpenGL.py:73 msgctxt "Critical OpenGL Extensions Missing" msgid "Critical OpenGL extensions are missing. This program requires support for Framebuffer Objects. Please check your video card drivers." msgstr "Nie znaleziono ważnych rozszerzeń OpenGL. Ten program wymaga wsparcia dla Framebuffer Objects. Sprawdź sterowniki karty graficznej." -#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:153 +#: /home/ruben/Projects/Uranium/UM/ConfigurationErrorMessage.py:32 +#: /home/ruben/Projects/Uranium/plugins/Tools/ScaleTool/ScaleTool.qml:67 +#: /home/ruben/Projects/Uranium/plugins/Tools/RotateTool/RotateTool.qml:21 +msgctxt "@action:button" +msgid "Reset" +msgstr "Resetuj" + +#: /home/ruben/Projects/Uranium/UM/ConfigurationErrorMessage.py:44 +#, python-brace-format +msgctxt "@info:status" +msgid "" +"Your configuration seems to be corrupt. Something seems to be wrong with the following profiles:\n" +"- {profiles}\n" +" Would you like to reset to factory defaults? Reset will remove all your current printers and profiles." +msgstr "" +"Twój plik konfiguracji wydaje się być uszkodzony. Coś jest nie tak z następującymi profilami:\n" +"- {profiles}\n" +"Czy chcesz zresetować ustawienia do wartości fabrycznych? Spowoduje to usunięcie wszystkich bieżących drukarek i profili." + +#: /home/ruben/Projects/Uranium/UM/ConfigurationErrorMessage.py:49 +msgctxt "@title:window" +msgid "Reset to factory" +msgstr "Resetuj od wartości fabrycznych" + +# It has different translation, than info:status, but It’s correct. +#: /home/ruben/Projects/Uranium/UM/ConfigurationErrorMessage.py:51 +msgctxt "@label" +msgid "Reset will remove all your current printers and profiles! Are you sure you want to reset?" +msgstr "Reset spowoduje usunięcie wszystkich bieżących drukarek i profili. Czy na pewno chcesz wykonać reset?" + +#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:162 #, python-brace-format msgctxt "@info" msgid "Would you like to reload {filename}?" msgstr "Czy chciałbyś przeładować {filename}?" -#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:154 +#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:163 msgctxt "@info:title" msgid "File has been modified" msgstr "Plik został zmodyfikowany" -#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:155 +#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:164 msgctxt "@action:button" msgid "Reload" msgstr "Przeładuj" -#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:155 +#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:164 msgctxt "@action:description" msgid "This will trigger the modified files to reload from disk." msgstr "Spowoduje to przeładowanie zmodyfikowanego pliku z dysku." -#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:32 +#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:36 #, python-brace-format msgctxt "@info:status Don't translate the XML tag !" msgid "Cannot open files of the type of {0}" msgstr "Nie można otworzyć plików typu {0}" -#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:32 -#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:47 -#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:70 +#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:36 +#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:51 +#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:74 msgctxt "@info:title" msgid "Invalid File" msgstr "Nieprawidłowy plik" -#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:45 -#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:70 +#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:49 +#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:74 #, python-brace-format msgctxt "@info:status Don't translate the XML tag !" msgid "Failed to load {0}" msgstr "Nie udało się załadować {0}" -#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:54 +#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:59 msgctxt "@info:title" msgid "Loading" msgstr "Ładowanie" -#: /home/ruben/Projects/Uranium/plugins/Tools/ScaleTool/ScaleTool.qml:60 -#: /home/ruben/Projects/Uranium/plugins/Tools/RotateTool/RotateTool.qml:21 -msgctxt "@action:button" -msgid "Reset" -msgstr "Resetuj" - -#: /home/ruben/Projects/Uranium/plugins/Tools/ScaleTool/ScaleTool.qml:86 +#: /home/ruben/Projects/Uranium/plugins/Tools/ScaleTool/ScaleTool.qml:93 msgctxt "@option:check" msgid "Snap Scaling" msgstr "Skalowanie przyciągania" -#: /home/ruben/Projects/Uranium/plugins/Tools/ScaleTool/ScaleTool.qml:104 +#: /home/ruben/Projects/Uranium/plugins/Tools/ScaleTool/ScaleTool.qml:121 msgctxt "@option:check" msgid "Uniform Scaling" msgstr "Jednolite skalowanie" -#: /home/ruben/Projects/Uranium/plugins/Tools/TranslateTool/TranslateTool.qml:177 +#: /home/ruben/Projects/Uranium/plugins/Tools/TranslateTool/TranslateTool.qml:196 msgctxt "@option:check" msgid "Lock Model" msgstr "Zablokuj Model" @@ -474,89 +551,37 @@ msgid "Lay flat" msgstr "Ułóż płasko" -#: /home/ruben/Projects/Uranium/plugins/Tools/RotateTool/RotateTool.qml:55 +#: /home/ruben/Projects/Uranium/plugins/Tools/RotateTool/RotateTool.qml:60 +msgctxt "@action:button" +msgid "Select face to align to the build plate" +msgstr "Wybierz ścianę, aby ustawić na platformie" + +#: /home/ruben/Projects/Uranium/plugins/Tools/RotateTool/RotateTool.qml:81 msgctxt "@action:checkbox" msgid "Snap Rotation" msgstr "Obrót myszką" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:19 -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:148 -msgctxt "@title:tab" -msgid "Plugins" -msgstr "Wtyczki" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:28 -msgctxt "@action:button" -msgid "Install new plugin" -msgstr "Zainstaluj nową wtyczkę" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:51 -msgctxt "@label" -msgid "You will need to restart the application before changes in plugins have effect." -msgstr "Trzeba ponownie uruchomić aplikację, zanim zmiany w wtyczkach okażą się skuteczne." - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:87 -msgctxt "@label" -msgid "This plugin is required for the application to run." -msgstr "Ta wtyczka jest wymagana do uruchomienia aplikacji." - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:104 -msgctxt "@label" -msgid "Info..." -msgstr "Info..." - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:122 -msgctxt "@window:title" -msgid "Install Plugin" -msgstr "Zainstaluj wtyczkę" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:131 -msgctxt "@title:window" -msgid "Open file(s)" -msgstr "Otwórz plik(i)" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:165 -msgctxt "@label" -msgid "No text available" -msgstr "Brak tekstu" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:171 -msgctxt "@title:window" -msgid "About %1" -msgstr "Około %1" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:203 -msgctxt "@label" -msgid "Author:" -msgstr "Autor:" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:225 -msgctxt "@label" -msgid "Version:" -msgstr "Wersia:" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:243 -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:113 -msgctxt "@action:button" -msgid "Close" -msgstr "Zamknij" - #: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:18 msgctxt "@title:window" msgid "Preferences" msgstr "Preferencje" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:106 +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:107 msgctxt "@action:button" msgid "Defaults" msgstr "Domyślne" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:146 +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:115 +msgctxt "@action:button" +msgid "Close" +msgstr "Zamknij" + +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:148 msgctxt "@title:tab" msgid "General" msgstr "Ogólne" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:147 +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:149 msgctxt "@title:tab" msgid "Settings" msgstr "Ustawienia" @@ -566,44 +591,34 @@ msgid "Rename" msgstr "Zmień nazwę" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/RenameDialog.qml:56 +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/RenameDialog.qml:20 +msgctxt "@info" +msgid "Please provide a new name." +msgstr "Proszę podać nową nazwę." + +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/RenameDialog.qml:70 #: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Wizard.qml:241 msgctxt "@action:button" msgid "Cancel" msgstr "Anuluj" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/RenameDialog.qml:60 +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/RenameDialog.qml:75 msgctxt "@action:button" msgid "OK" msgstr "OK" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/SettingVisibilityItem.qml:34 +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/SettingVisibilityItem.qml:32 msgctxt "@item:tooltip" msgid "This setting has been hidden by the active machine and will not be visible." msgstr "To ustawienie zostało ukryte przez aktywną drukarkę i nie będzie widoczne." -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/SettingVisibilityItem.qml:51 +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/SettingVisibilityItem.qml:49 msgctxt "@item:tooltip %1 is list of setting names" msgid "This setting has been hidden by the value of %1. Change the value of that setting to make this setting visible." msgid_plural "This setting has been hidden by the values of %1. Change the values of those settings to make this setting visible." msgstr[0] "To ustawienie zostało ukryte przez wartość %1. Zmień te wartość, aby to ustawienie było widoczne." msgstr[1] "To ustawienie zostało ukryte przez wartości %1. Zmień te wartości, aby to ustawienie było widoczne." -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/SettingVisibilityPage.qml:12 -msgctxt "@title:tab" -msgid "Setting Visibility" -msgstr "Ustaw widoczność" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/SettingVisibilityPage.qml:42 -msgctxt "@label:textbox" -msgid "Check all" -msgstr "Zaznacz wszystkie" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/SettingVisibilityPage.qml:89 -msgctxt "@label:textbox" -msgid "Filter..." -msgstr "Filtr..." - #: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/MachinesPage.qml:12 msgctxt "@title:tab" msgid "Printers" @@ -624,86 +639,6 @@ msgid "Are you sure you wish to remove %1? This cannot be undone!" msgstr "Czy na pewno chcesz usunąć %1? Tego nie da się cofnąć!" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:14 -msgctxt "@title:tab" -msgid "Profiles" -msgstr "Profile" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:15 -msgctxt "@label" -msgid "Duplicate" -msgstr "Duplikuj" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:45 -msgctxt "@label %1 is printer name" -msgid "Printer: %1" -msgstr "Drukarka: %1" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:83 -msgctxt "@action:button" -msgid "Update \"%1\"" -msgstr "Aktualizacja \"%1\"" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:84 -msgctxt "@action:button" -msgid "Update profile" -msgstr "Zaktualizuj profil" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:92 -msgctxt "@action:button" -msgid "Discard current changes" -msgstr "Odrzuć bieżące zmiany" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:93 -msgctxt "@action:button" -msgid "Reload profile" -msgstr "Przeładuj ponownie profil" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:107 -msgctxt "@label" -msgid "Based on" -msgstr "Oparte na" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:107 -msgctxt "@label" -msgid "Profile type" -msgstr "Typ profilu" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:112 -msgctxt "@label" -msgid "Protected profile" -msgstr "Chroniony profil" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:112 -msgctxt "@label" -msgid "Custom profile" -msgstr "Profil niestandardowy" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:139 -msgctxt "@action:button" -msgid "Import" -msgstr "Importuj" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:146 -msgctxt "@action:button" -msgid "Export" -msgstr "Eksportuj" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:184 -msgctxt "@window:title" -msgid "Import Profile" -msgstr "Importuj profil" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:192 -msgctxt "@title:window" -msgid "Import Profile" -msgstr "Importuj profil" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:219 -msgctxt "@title:window" -msgid "Export Profile" -msgstr "Eksportuj profil" - #: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Wizard.qml:215 msgctxt "@action:button" msgid "Back" @@ -919,6 +854,182 @@ msgid "Mirror Tool" msgstr "Narz. Lustra" +#~ msgctxt "@title:tab" +#~ msgid "Plugins" +#~ msgstr "Wtyczki" + +#~ msgctxt "@action:button" +#~ msgid "Install new plugin" +#~ msgstr "Zainstaluj nową wtyczkę" + +#~ msgctxt "@label" +#~ msgid "You will need to restart the application before changes in plugins have effect." +#~ msgstr "Trzeba ponownie uruchomić aplikację, zanim zmiany w wtyczkach okażą się skuteczne." + +#~ msgctxt "@label" +#~ msgid "This plugin is required for the application to run." +#~ msgstr "Ta wtyczka jest wymagana do uruchomienia aplikacji." + +#~ msgctxt "@label" +#~ msgid "Info..." +#~ msgstr "Info..." + +#~ msgctxt "@window:title" +#~ msgid "Install Plugin" +#~ msgstr "Zainstaluj wtyczkę" + +#~ msgctxt "@title:window" +#~ msgid "Open file(s)" +#~ msgstr "Otwórz plik(i)" + +#~ msgctxt "@label" +#~ msgid "No text available" +#~ msgstr "Brak tekstu" + +#~ msgctxt "@title:window" +#~ msgid "About %1" +#~ msgstr "Około %1" + +#~ msgctxt "@label" +#~ msgid "Author:" +#~ msgstr "Autor:" + +#~ msgctxt "@label" +#~ msgid "Version:" +#~ msgstr "Wersia:" + +#~ msgctxt "@info:status" +#~ msgid "Cura {0} is available!" +#~ msgstr "Cura {0} jest dostępna!" + +#~ msgctxt "@info:status" +#~ msgid "Cura {0} provides better and reliable printing experience." +#~ msgstr "Cura {0} zapewnia lepsze i bardziej niezawodne drukowanie." + +#~ msgctxt "@action:button" +#~ msgid "Learn more about new features" +#~ msgstr "Dowiedz się więcej o nowych funkcjach" + +#~ msgctxt "@error:update" +#~ msgid "" +#~ "There was an error uninstalling the package {package} before installingnew version:\n" +#~ "{error}.\n" +#~ "Please try to upgrade again later." +#~ msgstr "" +#~ "Wystąpił błąd podczas odinstalowywania pakietu {package} przed instalacją nowej wersji:\n" +#~ "{error}.\n" +#~ "Proszę spróbować zaktualizować ponownie później." + +#~ msgctxt "@info:status" +#~ msgid "" +#~ "Your configuration seems to be corrupt. Something seems to be wrong with the following profiles:\n" +#~ "- {profiles}\n" +#~ "Would you like to reset to factory defaults? Reset will remove all your current printers and profiles." +#~ msgstr "" +#~ "Twoja konfiguracja wygląda na uszkodzoną. Coś jest nie tak z następującymi profilami:\n" +#~ "- {profiles}\n" +#~ "Czy chcesz przywrócić ustawienia fabryczne? Przywracanie usunie wszystkie bieżące drukarki i profile." + +#~ msgctxt "@info" +#~ msgid "A new version is available!" +#~ msgstr "Dostępna jest nowa wersja!" + +#~ msgctxt "@info:status" +#~ msgid "" +#~ "Failed to install plugin from {0}:\n" +#~ "{1}" +#~ msgstr "" +#~ "Nie można zainstalować wtyczki z {0}:\n" +#~ "{1}" + +#~ msgctxt "@info:status" +#~ msgid "" +#~ "Failed to install the plugin;\n" +#~ "{0}" +#~ msgstr "" +#~ "Nie udało się zainstalować wtyczki;\n" +#~ "{0}" + +#~ msgctxt "@info:status" +#~ msgid "Failed to uninstall plugin. Plugin will be removed after {0} restarts." +#~ msgstr "Nie udało się odinstalować wtyczki. Wtyczka zostanie usunięta po {0} ponownych uruchomieniach." + +#~ msgctxt "@title:tab" +#~ msgid "Setting Visibility" +#~ msgstr "Ustaw widoczność" + +#~ msgctxt "@label:textbox" +#~ msgid "Check all" +#~ msgstr "Zaznacz wszystkie" + +#~ msgctxt "@label:textbox" +#~ msgid "Filter..." +#~ msgstr "Filtr..." + +#~ msgctxt "@title:tab" +#~ msgid "Profiles" +#~ msgstr "Profile" + +#~ msgctxt "@label" +#~ msgid "Duplicate" +#~ msgstr "Duplikuj" + +#~ msgctxt "@label %1 is printer name" +#~ msgid "Printer: %1" +#~ msgstr "Drukarka: %1" + +#~ msgctxt "@action:button" +#~ msgid "Update \"%1\"" +#~ msgstr "Aktualizacja \"%1\"" + +#~ msgctxt "@action:button" +#~ msgid "Update profile" +#~ msgstr "Zaktualizuj profil" + +#~ msgctxt "@action:button" +#~ msgid "Discard current changes" +#~ msgstr "Odrzuć bieżące zmiany" + +#~ msgctxt "@action:button" +#~ msgid "Reload profile" +#~ msgstr "Przeładuj ponownie profil" + +#~ msgctxt "@label" +#~ msgid "Based on" +#~ msgstr "Oparte na" + +#~ msgctxt "@label" +#~ msgid "Profile type" +#~ msgstr "Typ profilu" + +#~ msgctxt "@label" +#~ msgid "Protected profile" +#~ msgstr "Chroniony profil" + +#~ msgctxt "@label" +#~ msgid "Custom profile" +#~ msgstr "Profil niestandardowy" + +#~ msgctxt "@action:button" +#~ msgid "Import" +#~ msgstr "Importuj" + +#~ msgctxt "@action:button" +#~ msgid "Export" +#~ msgstr "Eksportuj" + +#~ msgctxt "@window:title" +#~ msgid "Import Profile" +#~ msgstr "Importuj profil" + +#~ msgctxt "@title:window" +#~ msgid "Import Profile" +#~ msgstr "Importuj profil" + +#~ msgctxt "@title:window" +#~ msgid "Export Profile" +#~ msgstr "Eksportuj profil" + #~ msgctxt "@info" #~ msgid "An exception occurred while checking for updates." #~ msgstr "Wystąpił błąd podczas sprawdzania aktualizacji." diff -Nru uranium-3.3.0/resources/i18n/pt_BR/uranium.po uranium-4.4.1/resources/i18n/pt_BR/uranium.po --- uranium-3.3.0/resources/i18n/pt_BR/uranium.po 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/resources/i18n/pt_BR/uranium.po 2019-11-19 10:50:46.000000000 +0000 @@ -1,14 +1,14 @@ # Uranium -# Copyright (C) 2018 Ultimaker +# Copyright (C) 2019 Ultimaker B.V. # This file is distributed under the same license as the Uranium package. -# Ruben Dulek , 2018. +# Ruben Dulek , 2019. # msgid "" msgstr "" -"Project-Id-Version: Uranium 3.3\n" +"Project-Id-Version: Uranium 4.4\n" "Report-Msgid-Bugs-To: r.dulek@ultimaker.com\n" -"POT-Creation-Date: 2018-03-29 08:36+0200\n" -"PO-Revision-Date: 2018-04-21 09:40-0300\n" +"POT-Creation-Date: 2019-11-05 13:40+0100\n" +"PO-Revision-Date: 2019-09-23 03:10-0300\n" "Last-Translator: Cláudio Sampaio \n" "Language-Team: Cláudio Sampaio\n" "Language: pt_BR\n" @@ -33,6 +33,17 @@ msgid "Wavefront OBJ File" msgstr "Arquivo Wavefront OBJ" +#: /home/ruben/Projects/Uranium/plugins/FileHandlers/OBJWriter/OBJWriter.py:23 +msgctxt "@error:not supported" +msgid "OBJWriter does not support non-text mode." +msgstr "O OBJWriter não suporta modo binário." + +#: /home/ruben/Projects/Uranium/plugins/FileHandlers/OBJWriter/OBJWriter.py:30 +#: /home/ruben/Projects/Uranium/plugins/FileHandlers/STLWriter/STLWriter.py:27 +msgctxt "@error:no mesh" +msgid "There is no mesh to write." +msgstr "Não há malha para salvar." + #: /home/ruben/Projects/Uranium/plugins/FileHandlers/STLWriter/__init__.py:17 msgctxt "@item:inlistbox" msgid "STL File (ASCII)" @@ -43,80 +54,101 @@ msgid "STL File (Binary)" msgstr "Arquivo STL (Binário)" -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:42 +#: /home/ruben/Projects/Uranium/plugins/FileHandlers/STLWriter/STLWriter.py:36 +msgctxt "@error:not supported" +msgid "Unsupported output mode writing STL to stream." +msgstr "Modo de saída não-suportado ao escrever STL." + +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:50 msgctxt "@info" msgid "Could not access update information." msgstr "Não foi possível acessar informação sobre atualizações." -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:43 -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:60 -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:71 -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:89 -#: /home/ruben/Projects/Uranium/UM/VersionUpgradeManager.py:123 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:51 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:68 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:97 +#: /home/ruben/Projects/Uranium/UM/VersionUpgradeManager.py:155 msgctxt "@info:title" msgid "Version Upgrade" msgstr "Atualização de Versão" -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:55 -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:60 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:63 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:68 msgctxt "@info" msgid "The version you are using does not support checking for updates." msgstr "A versão atual não suporta a verificação de atualizações." -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:55 -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:178 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:63 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:188 msgctxt "@info:title" msgid "Warning" msgstr "Aviso" -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:71 -msgctxt "@info" -msgid "A new version is available!" -msgstr "Uma nova versão está disponível!" - -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:72 -msgctxt "@action:button" -msgid "Download" -msgstr "Baixar" - -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:85 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:93 msgctxt "@info" msgid "An error occurred while checking for updates." msgstr "Um erro ocorreu ao verificar por atualizações." -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:85 -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:185 -#: /home/ruben/Projects/Uranium/UM/Qt/Bindings/OutputDeviceManagerProxy.py:128 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:93 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:195 +#: /home/ruben/Projects/Uranium/UM/Qt/Bindings/OutputDeviceManagerProxy.py:141 msgctxt "@info:title" msgid "Error" msgstr "Erro" -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:89 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:97 msgctxt "@info" msgid "No new version was found." msgstr "Nenhuma nova versão foi encontrada." +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:102 +#, python-brace-format +msgctxt "@info:status" +msgid "{application_name} {version_number} is available!" +msgstr "{application_name} {version_number} está disponível!" + +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:104 +#, python-brace-format +msgctxt "@info:status" +msgid "{application_name} {version_number} provides a better and more reliable printing experience." +msgstr "{application_name} {version_number} provê uma experiência melhor e mais confiável de impressão." + +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:107 +msgctxt "@action:button" +msgid "Download" +msgstr "Baixar" + +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:109 +msgctxt "@action:button" +msgid "Learn more" +msgstr "Saiba mais" + #: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateChecker.py:26 msgctxt "@item:inmenu" +msgid "Update Checker" +msgstr "Verificador de Atualizações" + +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateChecker.py:27 +msgctxt "@item:inmenu" msgid "Check for Updates" msgstr "Verificar Novas Atualizações" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:33 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:30 msgctxt "@item:inmenu" msgid "Local File" msgstr "Arquivo Local" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:34 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:31 msgctxt "@action:button Preceded by 'Ready to'." msgid "Save to File" msgstr "Salvar em Arquivo" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:35 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:32 msgctxt "@info:tooltip" msgid "Save to File" msgstr "Salvar em Arquivo" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:56 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:53 msgctxt "@title:window" msgid "Save to File" msgstr "Salvar em Arquivo" @@ -126,63 +158,63 @@ msgid "There are no file types available to write with!" msgstr "Não há tipos de arquivos de escrita disponíveis!" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:121 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:130 msgctxt "@title:window" msgid "File Already Exists" msgstr "O Arquivo Já Existe" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:121 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:130 #, python-brace-format msgctxt "@label Don't translate the XML tag !" msgid "The file {0} already exists. Are you sure you want to overwrite it?" msgstr "O arquivo {0} já existe. Tem certeza que deseja sobrescrevê-lo?" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:150 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:160 #, python-brace-format msgctxt "@info:progress Don't translate the XML tags !" msgid "Saving to {0}" msgstr "Salvando para {0}" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:151 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:161 msgctxt "@info:title" msgid "Saving" msgstr "Salvando" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:159 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:169 #, python-brace-format msgctxt "@info:status Don't translate the XML tags !" msgid "Permission denied when trying to save {0}" msgstr "Permissão negada ao tentar salvar {0}" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:162 -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:178 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:172 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:188 #, python-brace-format msgctxt "@info:status Don't translate the XML tags or !" msgid "Could not save to {0}: {1}" msgstr "Não foi possível salvar para {0}: {1}" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:172 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:182 #, python-brace-format msgctxt "@info:status Don't translate the XML tags !" msgid "Saved to {0}" msgstr "Salvo em {0}" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:172 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:182 msgctxt "@info:title" msgid "File Saved" msgstr "Arquivo Salvo" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:173 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:183 msgctxt "@action:button" msgid "Open Folder" msgstr "Abrir Pasta" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:173 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:183 msgctxt "@info:tooltip" msgid "Open the folder containing the file" msgstr "Abre a pasta contendo o arquivo" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:185 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:195 #, python-brace-format msgctxt "@info:status" msgid "Something went wrong saving to {0}: {1}" @@ -218,6 +250,16 @@ msgid "Rotate Model" msgstr "Rotacionar Modelo" +#: /home/ruben/Projects/Uranium/plugins/Tools/RotateTool/RotateTool.py:279 +msgctxt "@label" +msgid "Laying object flat on buildplate..." +msgstr "Deitar o objeto na plataforma de impressão..." + +#: /home/ruben/Projects/Uranium/plugins/Tools/RotateTool/RotateTool.py:279 +msgctxt "@title" +msgid "Object Rotation" +msgstr "Rotação de Objeto" + #: /home/ruben/Projects/Uranium/plugins/Tools/MirrorTool/__init__.py:12 msgctxt "@label" msgid "Mirror" @@ -241,11 +283,13 @@ "Você gostaria de restaurar o padrão de fábrica?" #: /home/ruben/Projects/Uranium/UM/__init__.py:16 +#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:175 msgctxt "@info:status" msgid "Your configuration seems to be corrupt." msgstr "Sua configuração parece estar corrompida." #: /home/ruben/Projects/Uranium/UM/__init__.py:17 +#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:177 msgctxt "@info:title" msgid "Configuration errors" msgstr "Erros de configuração" @@ -255,36 +299,66 @@ msgid "Reset your configuration to factory defaults." msgstr "Restaurar sua configuração para o padrão de fábrica." -#: /home/ruben/Projects/Uranium/UM/Settings/Models/InstanceContainersModel.py:189 -#: /home/ruben/Projects/Uranium/UM/Qt/Bindings/MeshFileHandlerProxy.py:48 -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:655 -#: /home/ruben/Projects/Uranium/UM/FileHandler/FileHandler.py:70 +#: /home/ruben/Projects/Uranium/UM/Settings/Models/InstanceContainersModel.py:181 +#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:708 +#: /home/ruben/Projects/Uranium/UM/FileHandler/FileHandler.py:56 #, python-brace-format msgctxt "@item:inlistbox" msgid "All Supported Types ({0})" msgstr "Todos os Tipos Suportados ({0})" -#: /home/ruben/Projects/Uranium/UM/Settings/Models/InstanceContainersModel.py:192 -#: /home/ruben/Projects/Uranium/UM/Qt/Bindings/MeshFileHandlerProxy.py:49 -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:656 -#: /home/ruben/Projects/Uranium/UM/FileHandler/FileHandler.py:71 +#: /home/ruben/Projects/Uranium/UM/Settings/Models/InstanceContainersModel.py:184 +#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:709 +#: /home/ruben/Projects/Uranium/UM/FileHandler/FileHandler.py:57 msgctxt "@item:inlistbox" msgid "All Files (*)" msgstr "Todos os Arquivos (*)" -#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:108 +#: /home/ruben/Projects/Uranium/UM/PackageManager.py:233 +#, python-brace-format +msgctxt "@error:uninstall" +msgid "" +"There were some errors uninstalling the following packages:\n" +"{packages}" +msgstr "" +"Houve alguns erros ao desinstalar os seguintes pacotes:\n" +"{packages}" + +#: /home/ruben/Projects/Uranium/UM/PackageManager.py:235 +msgctxt "@info:title" +msgid "Uninstalling errors" +msgstr "Erros ao desinstalar" + +#: /home/ruben/Projects/Uranium/UM/PackageManager.py:454 +#, python-brace-format +msgctxt "@error:update" +msgid "" +"There was an error uninstalling the package {package} before installing new version:\n" +"{error}.\n" +"Please try to upgrade again later." +msgstr "" +"Houve um erro ao desinstalar o pacote {package} antes de instalar a nova versão:\n" +"{error}.\n" +"Por favor tente atualizar novamente mais tarde." + +#: /home/ruben/Projects/Uranium/UM/PackageManager.py:457 +msgctxt "@info:title" +msgid "Updating error" +msgstr "Erro ao atualizar" + +#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:112 #, python-brace-format msgctxt "@label Short days-hours-minutes format. {0} is days, {1} is hours, {2} is minutes" msgid "{0:0>2}d {1:0>2}h {2:0>2}min" msgstr "{0:0>2}d {1:0>2}h {2:0>2}min" -#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:110 +#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:114 #, python-brace-format msgctxt "@label Short hours-minutes format. {0} is hours, {1} is minutes" msgid "{0:0>2}h {1:0>2}min" msgstr "{0:0>2}h {1:0>2}min" -#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:113 +#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:117 #, python-brace-format msgctxt "@label Long duration format. {0} is days" msgid "{0} day" @@ -292,8 +366,8 @@ msgstr[0] "{0} dia" msgstr[1] "{0} dias" -#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:113 -#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:115 +#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:117 +#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:119 #, python-brace-format msgctxt "@label Long duration format. {0} is hours" msgid "{0} hour" @@ -301,9 +375,9 @@ msgstr[0] "{0} hora" msgstr[1] "{0} horas" -#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:113 -#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:115 #: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:117 +#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:119 +#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:121 #, python-brace-format msgctxt "@label Long duration format. {0} is minutes" msgid "{0} minute" @@ -311,33 +385,38 @@ msgstr[0] "{0} minuto" msgstr[1] "{0} minutos" -#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:112 +#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:159 +msgctxt "@info:progress" +msgid "Initializing package manager..." +msgstr "" + +#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:180 msgctxt "@info:progress" msgid "Loading plugins..." msgstr "Carregando complementos..." -#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:119 +#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:187 msgctxt "@info:progress" msgid "Updating configuration..." msgstr "Atualizando configuração..." -#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:136 +#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:205 msgctxt "@info:progress" msgid "Loading preferences..." msgstr "Carregando preferências..." -#: /home/ruben/Projects/Uranium/UM/Mesh/ReadMeshJob.py:65 +#: /home/ruben/Projects/Uranium/UM/Mesh/ReadMeshJob.py:68 #, python-format, python-brace-format msgctxt "@info:status" msgid "Auto scaled object to {0}% of original size" msgstr "Objeto autorredimensionado para {0}% do tamanho original" -#: /home/ruben/Projects/Uranium/UM/Mesh/ReadMeshJob.py:65 +#: /home/ruben/Projects/Uranium/UM/Mesh/ReadMeshJob.py:68 msgctxt "@info:title" msgid "Scaling Object" msgstr "Redimensionando Objeto" -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:220 +#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:277 msgctxt "@info:status" msgid "" "The plugin has been installed.\n" @@ -346,29 +425,7 @@ "O complemento foi instalado.\n" "Por favor reinicie a aplicação para ativar o complemento." -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:231 -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:270 -#, python-brace-format -msgctxt "@info:status" -msgid "" -"Failed to install plugin from {0}:\n" -"{1}" -msgstr "" -"Falha em instalar complemento de {0}:\n" -"{1}" - -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:254 -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:259 -#, python-brace-format -msgctxt "@info:status" -msgid "" -"Failed to install the plugin;\n" -"{0}" -msgstr "" -"Falha em instalar o complemento;\n" -"{0}" - -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:421 +#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:415 #, python-brace-format msgctxt "@info:status" msgid "" @@ -378,91 +435,109 @@ "O plugin foi removido.\n" "Por favor reinicie {0} para finalizar a desinstalação." -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:433 -#, python-brace-format -msgctxt "@info:status" -msgid "Failed to uninstall plugin. Plugin will be removed after {0} restarts." -msgstr "Falha em desinstalar plugin. O plugin será removido após {0} reiniciar." - -#: /home/ruben/Projects/Uranium/UM/VersionUpgradeManager.py:123 +#: /home/ruben/Projects/Uranium/UM/VersionUpgradeManager.py:155 #, python-brace-format msgctxt "@info:version-upgrade" msgid "A configuration from an older version of {0} was imported." msgstr "A configuração da versão antiga de {0} foi importada." -#: /home/ruben/Projects/Uranium/UM/View/GL/OpenGL.py:50 +#: /home/ruben/Projects/Uranium/UM/View/GL/OpenGL.py:58 +#: /home/ruben/Projects/Uranium/UM/View/GL/OpenGL.py:63 msgctxt "@message" msgid "Failed to Initialize OpenGL" msgstr "Falha em inicializar OpenGL" -#: /home/ruben/Projects/Uranium/UM/View/GL/OpenGL.py:60 +#: /home/ruben/Projects/Uranium/UM/View/GL/OpenGL.py:73 msgctxt "Critical OpenGL Extensions Missing" msgid "Critical OpenGL extensions are missing. This program requires support for Framebuffer Objects. Please check your video card drivers." msgstr "Extensões OpenGL críticas estão faltando. Este programa exige suporte a Objetos de Framebuffer. Por favor verifique os drivers de sua placa de vídeo." -#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:153 +#: /home/ruben/Projects/Uranium/UM/ConfigurationErrorMessage.py:32 +#: /home/ruben/Projects/Uranium/plugins/Tools/ScaleTool/ScaleTool.qml:67 +#: /home/ruben/Projects/Uranium/plugins/Tools/RotateTool/RotateTool.qml:21 +msgctxt "@action:button" +msgid "Reset" +msgstr "Restabelecer" + +#: /home/ruben/Projects/Uranium/UM/ConfigurationErrorMessage.py:44 +#, python-brace-format +msgctxt "@info:status" +msgid "" +"Your configuration seems to be corrupt. Something seems to be wrong with the following profiles:\n" +"- {profiles}\n" +" Would you like to reset to factory defaults? Reset will remove all your current printers and profiles." +msgstr "" +"Sua configuração parece estar corrompida. Algo parece estar errado com os seguintes perfis:\n" +"- {profiles}\n" +" Você gostaria de restaurar os ajustes de fábrica? A restauração removerá todos os seus perfis e impressoras atuais." + +#: /home/ruben/Projects/Uranium/UM/ConfigurationErrorMessage.py:49 +msgctxt "@title:window" +msgid "Reset to factory" +msgstr "Restaurar de fábrica" + +#: /home/ruben/Projects/Uranium/UM/ConfigurationErrorMessage.py:51 +msgctxt "@label" +msgid "Reset will remove all your current printers and profiles! Are you sure you want to reset?" +msgstr "Restaurar removerá todas as suas impressoras e perfis atuais! Tem certeza que quer restaurar?" + +#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:162 #, python-brace-format msgctxt "@info" msgid "Would you like to reload {filename}?" msgstr "Gostaria de recarregar {filename}?" -#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:154 +#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:163 msgctxt "@info:title" msgid "File has been modified" msgstr "Arquivo foi modificado" -#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:155 +#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:164 msgctxt "@action:button" msgid "Reload" msgstr "Recarregar" -#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:155 +#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:164 msgctxt "@action:description" msgid "This will trigger the modified files to reload from disk." msgstr "Isto irá fazer com que arquivos modificados sejam recarregados do disco." -#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:32 +#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:36 #, python-brace-format msgctxt "@info:status Don't translate the XML tag !" msgid "Cannot open files of the type of {0}" msgstr "Não é possível abrir arquivos do tipo {0}" -#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:32 -#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:47 -#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:70 +#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:36 +#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:51 +#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:74 msgctxt "@info:title" msgid "Invalid File" msgstr "Arquivo Inválido" -#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:45 -#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:70 +#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:49 +#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:74 #, python-brace-format msgctxt "@info:status Don't translate the XML tag !" msgid "Failed to load {0}" msgstr "Falha em carregar {0}" -#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:54 +#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:59 msgctxt "@info:title" msgid "Loading" msgstr "Carregando" -#: /home/ruben/Projects/Uranium/plugins/Tools/ScaleTool/ScaleTool.qml:60 -#: /home/ruben/Projects/Uranium/plugins/Tools/RotateTool/RotateTool.qml:21 -msgctxt "@action:button" -msgid "Reset" -msgstr "Restabelecer" - -#: /home/ruben/Projects/Uranium/plugins/Tools/ScaleTool/ScaleTool.qml:86 +#: /home/ruben/Projects/Uranium/plugins/Tools/ScaleTool/ScaleTool.qml:93 msgctxt "@option:check" msgid "Snap Scaling" msgstr "Alinhar Redimensionamento" -#: /home/ruben/Projects/Uranium/plugins/Tools/ScaleTool/ScaleTool.qml:104 +#: /home/ruben/Projects/Uranium/plugins/Tools/ScaleTool/ScaleTool.qml:121 msgctxt "@option:check" msgid "Uniform Scaling" msgstr "Redimensionamento Uniforme" -#: /home/ruben/Projects/Uranium/plugins/Tools/TranslateTool/TranslateTool.qml:177 +#: /home/ruben/Projects/Uranium/plugins/Tools/TranslateTool/TranslateTool.qml:196 msgctxt "@option:check" msgid "Lock Model" msgstr "Travar Modelo" @@ -472,89 +547,37 @@ msgid "Lay flat" msgstr "Assentar no plano" -#: /home/ruben/Projects/Uranium/plugins/Tools/RotateTool/RotateTool.qml:55 +#: /home/ruben/Projects/Uranium/plugins/Tools/RotateTool/RotateTool.qml:60 +msgctxt "@action:button" +msgid "Select face to align to the build plate" +msgstr "Selecione a face a alinhar com a plataforma de impressão" + +#: /home/ruben/Projects/Uranium/plugins/Tools/RotateTool/RotateTool.qml:81 msgctxt "@action:checkbox" msgid "Snap Rotation" msgstr "Alinhar Rotação" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:19 -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:148 -msgctxt "@title:tab" -msgid "Plugins" -msgstr "Complementos" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:28 -msgctxt "@action:button" -msgid "Install new plugin" -msgstr "Instalar novo complemento" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:51 -msgctxt "@label" -msgid "You will need to restart the application before changes in plugins have effect." -msgstr "Você precisará reiniciar a aplicação para que mudanças nos complementos tenham efeito." - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:87 -msgctxt "@label" -msgid "This plugin is required for the application to run." -msgstr "Este complemento é necessário para que a aplicação rode." - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:104 -msgctxt "@label" -msgid "Info..." -msgstr "Informação..." - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:122 -msgctxt "@window:title" -msgid "Install Plugin" -msgstr "Instalar Complemento" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:131 -msgctxt "@title:window" -msgid "Open file(s)" -msgstr "Abrir arquivo(s)" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:165 -msgctxt "@label" -msgid "No text available" -msgstr "Nenhum texto disponível" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:171 -msgctxt "@title:window" -msgid "About %1" -msgstr "Sobre %1" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:203 -msgctxt "@label" -msgid "Author:" -msgstr "Autor:" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:225 -msgctxt "@label" -msgid "Version:" -msgstr "Versão:" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:243 -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:113 -msgctxt "@action:button" -msgid "Close" -msgstr "Fechar" - #: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:18 msgctxt "@title:window" msgid "Preferences" msgstr "Preferências" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:106 +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:107 msgctxt "@action:button" msgid "Defaults" msgstr "Defaults" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:146 +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:115 +msgctxt "@action:button" +msgid "Close" +msgstr "Fechar" + +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:148 msgctxt "@title:tab" msgid "General" msgstr "Geral" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:147 +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:149 msgctxt "@title:tab" msgid "Settings" msgstr "Ajustes" @@ -564,44 +587,34 @@ msgid "Rename" msgstr "Renomear" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/RenameDialog.qml:56 +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/RenameDialog.qml:20 +msgctxt "@info" +msgid "Please provide a new name." +msgstr "Por favor providencie um novo nome." + +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/RenameDialog.qml:70 #: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Wizard.qml:241 msgctxt "@action:button" msgid "Cancel" msgstr "Cancelar" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/RenameDialog.qml:60 +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/RenameDialog.qml:75 msgctxt "@action:button" msgid "OK" msgstr "OK" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/SettingVisibilityItem.qml:34 +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/SettingVisibilityItem.qml:32 msgctxt "@item:tooltip" msgid "This setting has been hidden by the active machine and will not be visible." msgstr "Este ajuste foi omitido para a máquina ativa e não será visível." -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/SettingVisibilityItem.qml:51 +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/SettingVisibilityItem.qml:49 msgctxt "@item:tooltip %1 is list of setting names" msgid "This setting has been hidden by the value of %1. Change the value of that setting to make this setting visible." msgid_plural "This setting has been hidden by the values of %1. Change the values of those settings to make this setting visible." msgstr[0] "Este ajuste foi mantido invisível pelo valor de %1. Altere os valores desse ajuste para tornar este ajuste visível." msgstr[1] "Este ajuste foi mantido invisível pelos valores de %1. Altere os valores desses ajustes para tornar este ajuste visível." -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/SettingVisibilityPage.qml:12 -msgctxt "@title:tab" -msgid "Setting Visibility" -msgstr "Visibilidade de Ajustes" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/SettingVisibilityPage.qml:42 -msgctxt "@label:textbox" -msgid "Check all" -msgstr "Selecionar todos" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/SettingVisibilityPage.qml:89 -msgctxt "@label:textbox" -msgid "Filter..." -msgstr "Filtrar..." - #: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/MachinesPage.qml:12 msgctxt "@title:tab" msgid "Printers" @@ -622,86 +635,6 @@ msgid "Are you sure you wish to remove %1? This cannot be undone!" msgstr "Tem certeza que deseja remover %1? Isto não pode ser desfeito!" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:14 -msgctxt "@title:tab" -msgid "Profiles" -msgstr "Perfis" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:15 -msgctxt "@label" -msgid "Duplicate" -msgstr "Duplicar" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:45 -msgctxt "@label %1 is printer name" -msgid "Printer: %1" -msgstr "Impressora: %1" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:83 -msgctxt "@action:button" -msgid "Update \"%1\"" -msgstr "Atualizar \"%1\"" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:84 -msgctxt "@action:button" -msgid "Update profile" -msgstr "Atualizar perfil" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:92 -msgctxt "@action:button" -msgid "Discard current changes" -msgstr "Descartar alterações atuais" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:93 -msgctxt "@action:button" -msgid "Reload profile" -msgstr "Recarregar perfil" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:107 -msgctxt "@label" -msgid "Based on" -msgstr "Baseado em" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:107 -msgctxt "@label" -msgid "Profile type" -msgstr "Tipo de perfil" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:112 -msgctxt "@label" -msgid "Protected profile" -msgstr "Perfil protegido" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:112 -msgctxt "@label" -msgid "Custom profile" -msgstr "Perfil personalizado" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:139 -msgctxt "@action:button" -msgid "Import" -msgstr "Importar" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:146 -msgctxt "@action:button" -msgid "Export" -msgstr "Exportar" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:184 -msgctxt "@window:title" -msgid "Import Profile" -msgstr "Importar Perfil" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:192 -msgctxt "@title:window" -msgid "Import Profile" -msgstr "Importar Perfil" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:219 -msgctxt "@title:window" -msgid "Export Profile" -msgstr "Exportar Perfil" - #: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Wizard.qml:215 msgctxt "@action:button" msgid "Back" @@ -917,6 +850,186 @@ msgid "Mirror Tool" msgstr "Ferramenta de Espelhamento" +#~ msgctxt "@title:tab" +#~ msgid "Plugins" +#~ msgstr "Complementos" + +#~ msgctxt "@action:button" +#~ msgid "Install new plugin" +#~ msgstr "Instalar novo complemento" + +#~ msgctxt "@label" +#~ msgid "You will need to restart the application before changes in plugins have effect." +#~ msgstr "Você precisará reiniciar a aplicação para que mudanças nos complementos tenham efeito." + +#~ msgctxt "@label" +#~ msgid "This plugin is required for the application to run." +#~ msgstr "Este complemento é necessário para que a aplicação rode." + +#~ msgctxt "@label" +#~ msgid "Info..." +#~ msgstr "Informação..." + +#~ msgctxt "@window:title" +#~ msgid "Install Plugin" +#~ msgstr "Instalar Complemento" + +#~ msgctxt "@title:window" +#~ msgid "Open file(s)" +#~ msgstr "Abrir arquivo(s)" + +#~ msgctxt "@label" +#~ msgid "No text available" +#~ msgstr "Nenhum texto disponível" + +#~ msgctxt "@title:window" +#~ msgid "About %1" +#~ msgstr "Sobre %1" + +#~ msgctxt "@label" +#~ msgid "Author:" +#~ msgstr "Autor:" + +#~ msgctxt "@label" +#~ msgid "Version:" +#~ msgstr "Versão:" + +#~ msgctxt "@action:button" +#~ msgid "Learn more about the new features" +#~ msgstr "Aprenda mais sobre os novos recursos" + +#~ msgctxt "@info:status" +#~ msgid "Cura {0} is available!" +#~ msgstr "O Cura {0} está disponível!" + +#~ msgctxt "@info:status" +#~ msgid "Cura {0} provides better and reliable printing experience." +#~ msgstr "O Cura {0} proporciona experiência de impressão melhor e mais confiável." + +#~ msgctxt "@action:button" +#~ msgid "Learn more about new features" +#~ msgstr "Aprenda mais sobre os novos recursos" + +#~ msgctxt "@error:update" +#~ msgid "" +#~ "There was an error uninstalling the package {package} before installingnew version:\n" +#~ "{error}.\n" +#~ "Please try to upgrade again later." +#~ msgstr "" +#~ "Houve um erro ao desinstalar o pacote {package} antes de instalar a nova version:\n" +#~ "{error}.\n" +#~ "Por favor tente atualizar novamente mais tarde." + +#~ msgctxt "@info:status" +#~ msgid "" +#~ "Your configuration seems to be corrupt. Something seems to be wrong with the following profiles:\n" +#~ "- {profiles}\n" +#~ "Would you like to reset to factory defaults? Reset will remove all your current printers and profiles." +#~ msgstr "" +#~ "Sua configuração parece estar corrompida. Algo parece estar errado com os seguintes perfis:\n" +#~ "- {profiles}\n" +#~ "Você gostaria de restaurar as configurações de fábrica? A restauração removerá todos os seus perfis e impressoras atuais." + +#~ msgctxt "@info" +#~ msgid "A new version is available!" +#~ msgstr "Uma nova versão está disponível!" + +#~ msgctxt "@info:status" +#~ msgid "" +#~ "Failed to install plugin from {0}:\n" +#~ "{1}" +#~ msgstr "" +#~ "Falha em instalar complemento de {0}:\n" +#~ "{1}" + +#~ msgctxt "@info:status" +#~ msgid "" +#~ "Failed to install the plugin;\n" +#~ "{0}" +#~ msgstr "" +#~ "Falha em instalar o complemento;\n" +#~ "{0}" + +#~ msgctxt "@info:status" +#~ msgid "Failed to uninstall plugin. Plugin will be removed after {0} restarts." +#~ msgstr "Falha em desinstalar plugin. O plugin será removido após {0} reiniciar." + +#~ msgctxt "@title:tab" +#~ msgid "Setting Visibility" +#~ msgstr "Visibilidade de Ajustes" + +#~ msgctxt "@label:textbox" +#~ msgid "Check all" +#~ msgstr "Selecionar todos" + +#~ msgctxt "@label:textbox" +#~ msgid "Filter..." +#~ msgstr "Filtrar..." + +#~ msgctxt "@title:tab" +#~ msgid "Profiles" +#~ msgstr "Perfis" + +#~ msgctxt "@label" +#~ msgid "Duplicate" +#~ msgstr "Duplicar" + +#~ msgctxt "@label %1 is printer name" +#~ msgid "Printer: %1" +#~ msgstr "Impressora: %1" + +#~ msgctxt "@action:button" +#~ msgid "Update \"%1\"" +#~ msgstr "Atualizar \"%1\"" + +#~ msgctxt "@action:button" +#~ msgid "Update profile" +#~ msgstr "Atualizar perfil" + +#~ msgctxt "@action:button" +#~ msgid "Discard current changes" +#~ msgstr "Descartar alterações atuais" + +#~ msgctxt "@action:button" +#~ msgid "Reload profile" +#~ msgstr "Recarregar perfil" + +#~ msgctxt "@label" +#~ msgid "Based on" +#~ msgstr "Baseado em" + +#~ msgctxt "@label" +#~ msgid "Profile type" +#~ msgstr "Tipo de perfil" + +#~ msgctxt "@label" +#~ msgid "Protected profile" +#~ msgstr "Perfil protegido" + +#~ msgctxt "@label" +#~ msgid "Custom profile" +#~ msgstr "Perfil personalizado" + +#~ msgctxt "@action:button" +#~ msgid "Import" +#~ msgstr "Importar" + +#~ msgctxt "@action:button" +#~ msgid "Export" +#~ msgstr "Exportar" + +#~ msgctxt "@window:title" +#~ msgid "Import Profile" +#~ msgstr "Importar Perfil" + +#~ msgctxt "@title:window" +#~ msgid "Import Profile" +#~ msgstr "Importar Perfil" + +#~ msgctxt "@title:window" +#~ msgid "Export Profile" +#~ msgstr "Exportar Perfil" + #~ msgctxt "@info" #~ msgid "An exception occurred while checking for updates." #~ msgstr "Uma exceção ocorreu enquanto se verificava por novas atualizações." diff -Nru uranium-3.3.0/resources/i18n/pt_PT/uranium.po uranium-4.4.1/resources/i18n/pt_PT/uranium.po --- uranium-3.3.0/resources/i18n/pt_PT/uranium.po 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/resources/i18n/pt_PT/uranium.po 2019-11-19 10:50:46.000000000 +0000 @@ -1,22 +1,22 @@ # Uranium -# Copyright (C) 2018 Ultimaker +# Copyright (C) 2019 Ultimaker B.V. # This file is distributed under the same license as the Uranium package. -# Ruben Dulek , 2018. +# Ruben Dulek , 2019. # msgid "" msgstr "" -"Project-Id-Version: Uranium 3.3\n" +"Project-Id-Version: Uranium 4.4\n" "Report-Msgid-Bugs-To: r.dulek@ultimaker.com\n" -"POT-Creation-Date: 2018-03-29 08:36+0200\n" -"PO-Revision-Date: 2018-04-16 02:14+0100\n" -"Last-Translator: Paulo Miranda \n" +"POT-Creation-Date: 2019-11-05 13:40+0100\n" +"PO-Revision-Date: 2019-03-14 14:15+0100\n" +"Last-Translator: Portuguese \n" "Language-Team: Paulo Miranda , Portuguese \n" "Language: pt_PT\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -"X-Generator: Poedit 2.0.5\n" +"X-Generator: Poedit 2.0.7\n" #: /home/ruben/Projects/Uranium/plugins/Views/SimpleView/__init__.py:12 msgctxt "@item:inmenu" @@ -34,6 +34,17 @@ msgid "Wavefront OBJ File" msgstr "Ficheiro OBJ Wavefront" +#: /home/ruben/Projects/Uranium/plugins/FileHandlers/OBJWriter/OBJWriter.py:23 +msgctxt "@error:not supported" +msgid "OBJWriter does not support non-text mode." +msgstr "O OBJWriter não suporta modo sem texto." + +#: /home/ruben/Projects/Uranium/plugins/FileHandlers/OBJWriter/OBJWriter.py:30 +#: /home/ruben/Projects/Uranium/plugins/FileHandlers/STLWriter/STLWriter.py:27 +msgctxt "@error:no mesh" +msgid "There is no mesh to write." +msgstr "Não existe uma malha para gravar." + #: /home/ruben/Projects/Uranium/plugins/FileHandlers/STLWriter/__init__.py:17 msgctxt "@item:inlistbox" msgid "STL File (ASCII)" @@ -44,22 +55,26 @@ msgid "STL File (Binary)" msgstr "Ficheiro STL (Binário)" -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:42 +#: /home/ruben/Projects/Uranium/plugins/FileHandlers/STLWriter/STLWriter.py:36 +msgctxt "@error:not supported" +msgid "Unsupported output mode writing STL to stream." +msgstr "Modo de saída não suportado ao gravar STL no fluxo." + +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:50 msgctxt "@info" msgid "Could not access update information." msgstr "Não foi possível aceder às informações sobre a atualização." -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:43 -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:60 -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:71 -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:89 -#: /home/ruben/Projects/Uranium/UM/VersionUpgradeManager.py:123 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:51 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:68 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:97 +#: /home/ruben/Projects/Uranium/UM/VersionUpgradeManager.py:155 msgctxt "@info:title" msgid "Version Upgrade" msgstr "Atualizar Versão" -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:55 -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:60 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:63 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:68 msgctxt "@info" msgid "The version you are using does not support checking for updates." msgstr "A versão que está a usar não permite verificar se existem atualizações." @@ -68,60 +83,77 @@ # Context!? # Aviso? # Cuidado? -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:55 -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:178 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:63 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:188 msgctxt "@info:title" msgid "Warning" msgstr "Atenção" -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:71 -msgctxt "@info" -msgid "A new version is available!" -msgstr "Está disponível uma nova versão!" - -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:72 -msgctxt "@action:button" -msgid "Download" -msgstr "Transferir" - -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:85 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:93 msgctxt "@info" msgid "An error occurred while checking for updates." msgstr "Ocorreu um erro ao procurar por atualizações." -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:85 -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:185 -#: /home/ruben/Projects/Uranium/UM/Qt/Bindings/OutputDeviceManagerProxy.py:128 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:93 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:195 +#: /home/ruben/Projects/Uranium/UM/Qt/Bindings/OutputDeviceManagerProxy.py:141 msgctxt "@info:title" msgid "Error" msgstr "Erro" -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:89 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:97 msgctxt "@info" msgid "No new version was found." msgstr "Não foi encontrada uma nova versão." +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:102 +#, python-brace-format +msgctxt "@info:status" +msgid "{application_name} {version_number} is available!" +msgstr "A {application_name} {version_number} encontra-se disponível!" + +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:104 +#, python-brace-format +msgctxt "@info:status" +msgid "{application_name} {version_number} provides a better and more reliable printing experience." +msgstr "A {application_name} {version_number} proporciona uma experiência de impressão melhor e mais fiável." + +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:107 +msgctxt "@action:button" +msgid "Download" +msgstr "Transferir" + +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:109 +msgctxt "@action:button" +msgid "Learn more" +msgstr "Saber mais" + #: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateChecker.py:26 msgctxt "@item:inmenu" +msgid "Update Checker" +msgstr "Verificador de Atualizações" + +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateChecker.py:27 +msgctxt "@item:inmenu" msgid "Check for Updates" msgstr "Procurar Atualizações" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:33 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:30 msgctxt "@item:inmenu" msgid "Local File" msgstr "Ficheiro Local" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:34 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:31 msgctxt "@action:button Preceded by 'Ready to'." msgid "Save to File" msgstr "Guardar Ficheiro" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:35 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:32 msgctxt "@info:tooltip" msgid "Save to File" msgstr "Guardar Ficheiro" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:56 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:53 msgctxt "@title:window" msgid "Save to File" msgstr "Guardar Ficheiro" @@ -131,63 +163,63 @@ msgid "There are no file types available to write with!" msgstr "Não existem quaisquer formatos disponíveis para gravar o ficheiro!" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:121 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:130 msgctxt "@title:window" msgid "File Already Exists" msgstr "O Ficheiro já Existe" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:121 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:130 #, python-brace-format msgctxt "@label Don't translate the XML tag !" msgid "The file {0} already exists. Are you sure you want to overwrite it?" msgstr "O ficheiro {0} já existe. Tem a certeza de que deseja substituí-lo?" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:150 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:160 #, python-brace-format msgctxt "@info:progress Don't translate the XML tags !" msgid "Saving to {0}" msgstr "A guardar em {0}" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:151 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:161 msgctxt "@info:title" msgid "Saving" msgstr "A Guardar" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:159 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:169 #, python-brace-format msgctxt "@info:status Don't translate the XML tags !" msgid "Permission denied when trying to save {0}" msgstr "Permissão negada ao tentar guardar {0}" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:162 -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:178 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:172 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:188 #, python-brace-format msgctxt "@info:status Don't translate the XML tags or !" msgid "Could not save to {0}: {1}" msgstr "Não foi possível guardar em {0}: {1}" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:172 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:182 #, python-brace-format msgctxt "@info:status Don't translate the XML tags !" msgid "Saved to {0}" msgstr "Guardado em {0}" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:172 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:182 msgctxt "@info:title" msgid "File Saved" msgstr "Ficheiro Guardado" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:173 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:183 msgctxt "@action:button" msgid "Open Folder" msgstr "Abrir Pasta" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:173 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:183 msgctxt "@info:tooltip" msgid "Open the folder containing the file" msgstr "Abrir a pasta que contém o ficheiro" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:185 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:195 #, python-brace-format msgctxt "@info:status" msgid "Something went wrong saving to {0}: {1}" @@ -223,6 +255,16 @@ msgid "Rotate Model" msgstr "Rodar o Modelo" +#: /home/ruben/Projects/Uranium/plugins/Tools/RotateTool/RotateTool.py:279 +msgctxt "@label" +msgid "Laying object flat on buildplate..." +msgstr "A colocar horizontalmente o objeto na placa de construção..." + +#: /home/ruben/Projects/Uranium/plugins/Tools/RotateTool/RotateTool.py:279 +msgctxt "@title" +msgid "Object Rotation" +msgstr "Rotação do objeto" + #: /home/ruben/Projects/Uranium/plugins/Tools/MirrorTool/__init__.py:12 msgctxt "@label" msgid "Mirror" @@ -246,11 +288,13 @@ "Deseja repor as predefinições de fábrica?" #: /home/ruben/Projects/Uranium/UM/__init__.py:16 +#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:175 msgctxt "@info:status" msgid "Your configuration seems to be corrupt." msgstr "A sua configuração parece estar danificada." #: /home/ruben/Projects/Uranium/UM/__init__.py:17 +#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:177 msgctxt "@info:title" msgid "Configuration errors" msgstr "Erros de configuração" @@ -260,36 +304,66 @@ msgid "Reset your configuration to factory defaults." msgstr "Reponha a sua configuração para as predefinições de fábrica." -#: /home/ruben/Projects/Uranium/UM/Settings/Models/InstanceContainersModel.py:189 -#: /home/ruben/Projects/Uranium/UM/Qt/Bindings/MeshFileHandlerProxy.py:48 -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:655 -#: /home/ruben/Projects/Uranium/UM/FileHandler/FileHandler.py:70 +#: /home/ruben/Projects/Uranium/UM/Settings/Models/InstanceContainersModel.py:181 +#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:708 +#: /home/ruben/Projects/Uranium/UM/FileHandler/FileHandler.py:56 #, python-brace-format msgctxt "@item:inlistbox" msgid "All Supported Types ({0})" msgstr "Todos os Formatos Suportados ({0})" -#: /home/ruben/Projects/Uranium/UM/Settings/Models/InstanceContainersModel.py:192 -#: /home/ruben/Projects/Uranium/UM/Qt/Bindings/MeshFileHandlerProxy.py:49 -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:656 -#: /home/ruben/Projects/Uranium/UM/FileHandler/FileHandler.py:71 +#: /home/ruben/Projects/Uranium/UM/Settings/Models/InstanceContainersModel.py:184 +#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:709 +#: /home/ruben/Projects/Uranium/UM/FileHandler/FileHandler.py:57 msgctxt "@item:inlistbox" msgid "All Files (*)" msgstr "Todos os Ficheiros (*)" -#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:108 +#: /home/ruben/Projects/Uranium/UM/PackageManager.py:233 +#, python-brace-format +msgctxt "@error:uninstall" +msgid "" +"There were some errors uninstalling the following packages:\n" +"{packages}" +msgstr "" +"Ocorreram alguns erros ao desinstalar os seguintes pacotes:\n" +"{packages}" + +#: /home/ruben/Projects/Uranium/UM/PackageManager.py:235 +msgctxt "@info:title" +msgid "Uninstalling errors" +msgstr "Erros de desinstalação" + +#: /home/ruben/Projects/Uranium/UM/PackageManager.py:454 +#, python-brace-format +msgctxt "@error:update" +msgid "" +"There was an error uninstalling the package {package} before installing new version:\n" +"{error}.\n" +"Please try to upgrade again later." +msgstr "" +"Ocorreu um erro ao desinstalar o pacote {package} antes de instalar uma nova versão:\n" +"{error}.\n" +"Tente atualizar novamente mais tarde." + +#: /home/ruben/Projects/Uranium/UM/PackageManager.py:457 +msgctxt "@info:title" +msgid "Updating error" +msgstr "Erro de atualização" + +#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:112 #, python-brace-format msgctxt "@label Short days-hours-minutes format. {0} is days, {1} is hours, {2} is minutes" msgid "{0:0>2}d {1:0>2}h {2:0>2}min" msgstr "{0:0>2}d {1:0>2}h {2:0>2}min" -#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:110 +#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:114 #, python-brace-format msgctxt "@label Short hours-minutes format. {0} is hours, {1} is minutes" msgid "{0:0>2}h {1:0>2}min" msgstr "{0:0>2}h {1:0>2}min" -#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:113 +#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:117 #, python-brace-format msgctxt "@label Long duration format. {0} is days" msgid "{0} day" @@ -297,8 +371,8 @@ msgstr[0] "{0} dia" msgstr[1] "{0} dias" -#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:113 -#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:115 +#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:117 +#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:119 #, python-brace-format msgctxt "@label Long duration format. {0} is hours" msgid "{0} hour" @@ -306,9 +380,9 @@ msgstr[0] "{0} hora" msgstr[1] "{0} horas" -#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:113 -#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:115 #: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:117 +#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:119 +#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:121 #, python-brace-format msgctxt "@label Long duration format. {0} is minutes" msgid "{0} minute" @@ -316,33 +390,38 @@ msgstr[0] "{0} minuto" msgstr[1] "{0} minutos" -#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:112 +#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:159 +msgctxt "@info:progress" +msgid "Initializing package manager..." +msgstr "A iniciar o gestor de pacotes..." + +#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:180 msgctxt "@info:progress" msgid "Loading plugins..." msgstr "A carregar plug-ins..." -#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:119 +#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:187 msgctxt "@info:progress" msgid "Updating configuration..." msgstr "A atualizar a configuração..." -#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:136 +#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:205 msgctxt "@info:progress" msgid "Loading preferences..." msgstr "A carregar preferências..." -#: /home/ruben/Projects/Uranium/UM/Mesh/ReadMeshJob.py:65 +#: /home/ruben/Projects/Uranium/UM/Mesh/ReadMeshJob.py:68 #, python-format, python-brace-format msgctxt "@info:status" msgid "Auto scaled object to {0}% of original size" msgstr "Objeto redimensionado automaticamente para {0}% do tamanho original" -#: /home/ruben/Projects/Uranium/UM/Mesh/ReadMeshJob.py:65 +#: /home/ruben/Projects/Uranium/UM/Mesh/ReadMeshJob.py:68 msgctxt "@info:title" msgid "Scaling Object" msgstr "A Redimensionar Objeto" -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:220 +#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:277 msgctxt "@info:status" msgid "" "The plugin has been installed.\n" @@ -351,29 +430,7 @@ "O plug-in foi instalado.\n" "Por favor reinicie a aplicação para ativar o plug-in." -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:231 -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:270 -#, python-brace-format -msgctxt "@info:status" -msgid "" -"Failed to install plugin from {0}:\n" -"{1}" -msgstr "" -"Não foi possível instalar o plug-in em {0}:\n" -"{1}" - -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:254 -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:259 -#, python-brace-format -msgctxt "@info:status" -msgid "" -"Failed to install the plugin;\n" -"{0}" -msgstr "" -"Não foi possível instalar o plug-in;\n" -"{0}" - -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:421 +#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:415 #, python-brace-format msgctxt "@info:status" msgid "" @@ -383,91 +440,109 @@ "O plug-in foi removido.\n" "Por favor reinicie o {0} para concluir a desinstalação." -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:433 -#, python-brace-format -msgctxt "@info:status" -msgid "Failed to uninstall plugin. Plugin will be removed after {0} restarts." -msgstr "Não foi possível desinstalar o plug-in. O plug-in será removido após o reinicio do {0}." - -#: /home/ruben/Projects/Uranium/UM/VersionUpgradeManager.py:123 +#: /home/ruben/Projects/Uranium/UM/VersionUpgradeManager.py:155 #, python-brace-format msgctxt "@info:version-upgrade" msgid "A configuration from an older version of {0} was imported." msgstr "Foi importada uma configuração de uma versão anterior do {0}." -#: /home/ruben/Projects/Uranium/UM/View/GL/OpenGL.py:50 +#: /home/ruben/Projects/Uranium/UM/View/GL/OpenGL.py:58 +#: /home/ruben/Projects/Uranium/UM/View/GL/OpenGL.py:63 msgctxt "@message" msgid "Failed to Initialize OpenGL" msgstr "Não foi possível inicializar o OpenGL" -#: /home/ruben/Projects/Uranium/UM/View/GL/OpenGL.py:60 +#: /home/ruben/Projects/Uranium/UM/View/GL/OpenGL.py:73 msgctxt "Critical OpenGL Extensions Missing" msgid "Critical OpenGL extensions are missing. This program requires support for Framebuffer Objects. Please check your video card drivers." msgstr "Extensões cruciais do OpenGL não foram encontradas. Este programa requer o suporte de Framebuffer Objects. Por favor verifique os controladores da placa gráfica." -#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:153 +#: /home/ruben/Projects/Uranium/UM/ConfigurationErrorMessage.py:32 +#: /home/ruben/Projects/Uranium/plugins/Tools/ScaleTool/ScaleTool.qml:67 +#: /home/ruben/Projects/Uranium/plugins/Tools/RotateTool/RotateTool.qml:21 +msgctxt "@action:button" +msgid "Reset" +msgstr "Repor" + +#: /home/ruben/Projects/Uranium/UM/ConfigurationErrorMessage.py:44 +#, python-brace-format +msgctxt "@info:status" +msgid "" +"Your configuration seems to be corrupt. Something seems to be wrong with the following profiles:\n" +"- {profiles}\n" +" Would you like to reset to factory defaults? Reset will remove all your current printers and profiles." +msgstr "" +"A sua configuração parece estar danificada. Parece haver algo de errado com os seguintes perfis:\n" +"- {profiles}\n" +" Deseja repor as predefinições de fábrica? A reposição removerá todos os perfis e impressoras atuais." + +#: /home/ruben/Projects/Uranium/UM/ConfigurationErrorMessage.py:49 +msgctxt "@title:window" +msgid "Reset to factory" +msgstr "Repor predefinições de fábrica" + +#: /home/ruben/Projects/Uranium/UM/ConfigurationErrorMessage.py:51 +msgctxt "@label" +msgid "Reset will remove all your current printers and profiles! Are you sure you want to reset?" +msgstr "A reposição irá remover todos os perfis e impressoras atuais! Tem a certeza de que deseja efetuar a reposição?" + +#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:162 #, python-brace-format msgctxt "@info" msgid "Would you like to reload {filename}?" msgstr "Deseja recarregar {filename}?" -#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:154 +#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:163 msgctxt "@info:title" msgid "File has been modified" msgstr "O ficheiro foi modificado" -#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:155 +#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:164 msgctxt "@action:button" msgid "Reload" msgstr "Recarregar" -#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:155 +#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:164 msgctxt "@action:description" msgid "This will trigger the modified files to reload from disk." msgstr "Isto irá reabrir os ficheiros modificados a partir do disco." -#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:32 +#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:36 #, python-brace-format msgctxt "@info:status Don't translate the XML tag !" msgid "Cannot open files of the type of {0}" msgstr "Não é possível abrir ficheiros do tipo {0}" -#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:32 -#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:47 -#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:70 +#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:36 +#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:51 +#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:74 msgctxt "@info:title" msgid "Invalid File" msgstr "Ficheiro Inválido" -#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:45 -#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:70 +#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:49 +#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:74 #, python-brace-format msgctxt "@info:status Don't translate the XML tag !" msgid "Failed to load {0}" msgstr "Não foi possível carregar {0}" -#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:54 +#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:59 msgctxt "@info:title" msgid "Loading" msgstr "A Abrir" -#: /home/ruben/Projects/Uranium/plugins/Tools/ScaleTool/ScaleTool.qml:60 -#: /home/ruben/Projects/Uranium/plugins/Tools/RotateTool/RotateTool.qml:21 -msgctxt "@action:button" -msgid "Reset" -msgstr "Repor" - -#: /home/ruben/Projects/Uranium/plugins/Tools/ScaleTool/ScaleTool.qml:86 +#: /home/ruben/Projects/Uranium/plugins/Tools/ScaleTool/ScaleTool.qml:93 msgctxt "@option:check" msgid "Snap Scaling" msgstr "Restringir Dimensões" -#: /home/ruben/Projects/Uranium/plugins/Tools/ScaleTool/ScaleTool.qml:104 +#: /home/ruben/Projects/Uranium/plugins/Tools/ScaleTool/ScaleTool.qml:121 msgctxt "@option:check" msgid "Uniform Scaling" msgstr "Manter Proporções" -#: /home/ruben/Projects/Uranium/plugins/Tools/TranslateTool/TranslateTool.qml:177 +#: /home/ruben/Projects/Uranium/plugins/Tools/TranslateTool/TranslateTool.qml:196 msgctxt "@option:check" msgid "Lock Model" msgstr "Bloquear Modelo" @@ -478,89 +553,37 @@ msgid "Lay flat" msgstr "Deitar" -#: /home/ruben/Projects/Uranium/plugins/Tools/RotateTool/RotateTool.qml:55 +#: /home/ruben/Projects/Uranium/plugins/Tools/RotateTool/RotateTool.qml:60 +msgctxt "@action:button" +msgid "Select face to align to the build plate" +msgstr "Selecione a face que pretende alinhar com a base de construção" + +#: /home/ruben/Projects/Uranium/plugins/Tools/RotateTool/RotateTool.qml:81 msgctxt "@action:checkbox" msgid "Snap Rotation" msgstr "Restringir Rotação" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:19 -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:148 -msgctxt "@title:tab" -msgid "Plugins" -msgstr "Plug-ins" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:28 -msgctxt "@action:button" -msgid "Install new plugin" -msgstr "Instalar novo plug-in" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:51 -msgctxt "@label" -msgid "You will need to restart the application before changes in plugins have effect." -msgstr "É necessário reiniciar a aplicação para que as alterações nos plug-ins sejam aplicadas." - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:87 -msgctxt "@label" -msgid "This plugin is required for the application to run." -msgstr "Este plug-in é necessário para executar a aplicação." - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:104 -msgctxt "@label" -msgid "Info..." -msgstr "Informações..." - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:122 -msgctxt "@window:title" -msgid "Install Plugin" -msgstr "Instalar plug-in" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:131 -msgctxt "@title:window" -msgid "Open file(s)" -msgstr "Abrir ficheiro(s)" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:165 -msgctxt "@label" -msgid "No text available" -msgstr "Nenhum texto disponível" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:171 -msgctxt "@title:window" -msgid "About %1" -msgstr "Sobre %1" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:203 -msgctxt "@label" -msgid "Author:" -msgstr "Autor:" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:225 -msgctxt "@label" -msgid "Version:" -msgstr "Versão:" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:243 -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:113 -msgctxt "@action:button" -msgid "Close" -msgstr "Fechar" - #: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:18 msgctxt "@title:window" msgid "Preferences" msgstr "Preferências" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:106 +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:107 msgctxt "@action:button" msgid "Defaults" msgstr "Predefinições" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:146 +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:115 +msgctxt "@action:button" +msgid "Close" +msgstr "Fechar" + +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:148 msgctxt "@title:tab" msgid "General" msgstr "Geral" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:147 +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:149 msgctxt "@title:tab" msgid "Settings" msgstr "Definições" @@ -570,44 +593,34 @@ msgid "Rename" msgstr "Mudar o Nome" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/RenameDialog.qml:56 +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/RenameDialog.qml:20 +msgctxt "@info" +msgid "Please provide a new name." +msgstr "Forneça um novo nome." + +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/RenameDialog.qml:70 #: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Wizard.qml:241 msgctxt "@action:button" msgid "Cancel" msgstr "Cancelar" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/RenameDialog.qml:60 +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/RenameDialog.qml:75 msgctxt "@action:button" msgid "OK" msgstr "OK" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/SettingVisibilityItem.qml:34 +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/SettingVisibilityItem.qml:32 msgctxt "@item:tooltip" msgid "This setting has been hidden by the active machine and will not be visible." msgstr "Esta definição não é válida para a máquina ativa, e não será visível." -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/SettingVisibilityItem.qml:51 +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/SettingVisibilityItem.qml:49 msgctxt "@item:tooltip %1 is list of setting names" msgid "This setting has been hidden by the value of %1. Change the value of that setting to make this setting visible." msgid_plural "This setting has been hidden by the values of %1. Change the values of those settings to make this setting visible." msgstr[0] "Esta definição não é visível devido ao valor da definição: %1. Altere o valor dessa definição, para que esta definição fique visível." msgstr[1] "Esta definição não é visível devido aos valores das seguintes definições: %1. Altere os valores dessas definições, para que esta definição fique visível." -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/SettingVisibilityPage.qml:12 -msgctxt "@title:tab" -msgid "Setting Visibility" -msgstr "Visibilidade das Definições" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/SettingVisibilityPage.qml:42 -msgctxt "@label:textbox" -msgid "Check all" -msgstr "Selecionar todas" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/SettingVisibilityPage.qml:89 -msgctxt "@label:textbox" -msgid "Filter..." -msgstr "Filtrar..." - #: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/MachinesPage.qml:12 msgctxt "@title:tab" msgid "Printers" @@ -628,86 +641,6 @@ msgid "Are you sure you wish to remove %1? This cannot be undone!" msgstr "Tem a certeza de que deseja remover %1? Não é possível desfazer esta ação!" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:14 -msgctxt "@title:tab" -msgid "Profiles" -msgstr "Perfis" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:15 -msgctxt "@label" -msgid "Duplicate" -msgstr "Duplicar" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:45 -msgctxt "@label %1 is printer name" -msgid "Printer: %1" -msgstr "Impressora: %1" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:83 -msgctxt "@action:button" -msgid "Update \"%1\"" -msgstr "Atualizar \"%1\"" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:84 -msgctxt "@action:button" -msgid "Update profile" -msgstr "Atualizar perfil" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:92 -msgctxt "@action:button" -msgid "Discard current changes" -msgstr "Descartar alterações atuais" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:93 -msgctxt "@action:button" -msgid "Reload profile" -msgstr "Reabrir perfil" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:107 -msgctxt "@label" -msgid "Based on" -msgstr "Baseado em" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:107 -msgctxt "@label" -msgid "Profile type" -msgstr "Tipo de perfil" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:112 -msgctxt "@label" -msgid "Protected profile" -msgstr "Perfil protegido" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:112 -msgctxt "@label" -msgid "Custom profile" -msgstr "Perfil personalizado" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:139 -msgctxt "@action:button" -msgid "Import" -msgstr "Importar" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:146 -msgctxt "@action:button" -msgid "Export" -msgstr "Exportar" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:184 -msgctxt "@window:title" -msgid "Import Profile" -msgstr "Importar Perfil" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:192 -msgctxt "@title:window" -msgid "Import Profile" -msgstr "Importar Perfil" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:219 -msgctxt "@title:window" -msgid "Export Profile" -msgstr "Exportar Perfil" - #: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Wizard.qml:215 msgctxt "@action:button" msgid "Back" @@ -853,7 +786,7 @@ #: LocalFileOutputDevice/plugin.json msgctxt "description" msgid "Enables saving to local files." -msgstr "Permite guardar para ficheiros locais." +msgstr "Permite guardar em ficheiros locais." #: LocalFileOutputDevice/plugin.json msgctxt "name" @@ -868,7 +801,7 @@ #: LocalContainerProvider/plugin.json msgctxt "name" msgid "Local Container Provider" -msgstr "Local Container Provider" +msgstr "Fornecedor de recipientes local" #: Tools/ScaleTool/plugin.json msgctxt "description" @@ -929,3 +862,183 @@ msgctxt "name" msgid "Mirror Tool" msgstr "Ferramenta Espelhar" + +#~ msgctxt "@title:tab" +#~ msgid "Plugins" +#~ msgstr "Plug-ins" + +#~ msgctxt "@action:button" +#~ msgid "Install new plugin" +#~ msgstr "Instalar novo plug-in" + +#~ msgctxt "@label" +#~ msgid "You will need to restart the application before changes in plugins have effect." +#~ msgstr "É necessário reiniciar a aplicação para que as alterações nos plug-ins sejam aplicadas." + +#~ msgctxt "@label" +#~ msgid "This plugin is required for the application to run." +#~ msgstr "Este plug-in é necessário para executar a aplicação." + +#~ msgctxt "@label" +#~ msgid "Info..." +#~ msgstr "Informações..." + +#~ msgctxt "@window:title" +#~ msgid "Install Plugin" +#~ msgstr "Instalar plug-in" + +#~ msgctxt "@title:window" +#~ msgid "Open file(s)" +#~ msgstr "Abrir ficheiro(s)" + +#~ msgctxt "@label" +#~ msgid "No text available" +#~ msgstr "Nenhum texto disponível" + +#~ msgctxt "@title:window" +#~ msgid "About %1" +#~ msgstr "Sobre %1" + +#~ msgctxt "@label" +#~ msgid "Author:" +#~ msgstr "Autor:" + +#~ msgctxt "@label" +#~ msgid "Version:" +#~ msgstr "Versão:" + +#~ msgctxt "@action:button" +#~ msgid "Learn more about the new features" +#~ msgstr "Descubra mais sobre as novas funcionalidades" + +#~ msgctxt "@info:status" +#~ msgid "Cura {0} is available!" +#~ msgstr "Está disponível o Ultimaker Cura {0}!" + +#~ msgctxt "@info:status" +#~ msgid "Cura {0} provides better and reliable printing experience." +#~ msgstr "O Ultimaker Cura {0} oferece uma melhor e mais fiável experiência de impressão 3D." + +#~ msgctxt "@action:button" +#~ msgid "Learn more about new features" +#~ msgstr "Descubra as novas funcionalidades" + +#~ msgctxt "@error:update" +#~ msgid "" +#~ "There was an error uninstalling the package {package} before installingnew version:\n" +#~ "{error}.\n" +#~ "Please try to upgrade again later." +#~ msgstr "" +#~ "Ocorreu um erro ao desinstalar o pacote {package} antes de instalar uma nova versão:\n" +#~ "{error}.\n" +#~ "Tente atualizar novamente mais tarde." + +#~ msgctxt "@info:status" +#~ msgid "" +#~ "Your configuration seems to be corrupt. Something seems to be wrong with the following profiles:\n" +#~ "- {profiles}\n" +#~ "Would you like to reset to factory defaults? Reset will remove all your current printers and profiles." +#~ msgstr "" +#~ "A sua configuração parece estar danificada. Parece haver algo de errado com os seguintes perfis:\n" +#~ "- {profiles}\n" +#~ "Deseja repor as predefinições de fábrica? A reposição removerá todos os perfis e impressoras atuais." + +#~ msgctxt "@info" +#~ msgid "A new version is available!" +#~ msgstr "Está disponível uma nova versão!" + +#~ msgctxt "@info:status" +#~ msgid "" +#~ "Failed to install plugin from {0}:\n" +#~ "{1}" +#~ msgstr "" +#~ "Não foi possível instalar o plug-in em {0}:\n" +#~ "{1}" + +#~ msgctxt "@info:status" +#~ msgid "" +#~ "Failed to install the plugin;\n" +#~ "{0}" +#~ msgstr "" +#~ "Não foi possível instalar o plug-in;\n" +#~ "{0}" + +#~ msgctxt "@info:status" +#~ msgid "Failed to uninstall plugin. Plugin will be removed after {0} restarts." +#~ msgstr "Não foi possível desinstalar o plug-in. O plug-in será removido após o reinicio do {0}." + +#~ msgctxt "@title:tab" +#~ msgid "Setting Visibility" +#~ msgstr "Visibilidade das Definições" + +#~ msgctxt "@label:textbox" +#~ msgid "Check all" +#~ msgstr "Selecionar todas" + +#~ msgctxt "@label:textbox" +#~ msgid "Filter..." +#~ msgstr "Filtrar..." + +#~ msgctxt "@title:tab" +#~ msgid "Profiles" +#~ msgstr "Perfis" + +#~ msgctxt "@label" +#~ msgid "Duplicate" +#~ msgstr "Duplicar" + +#~ msgctxt "@label %1 is printer name" +#~ msgid "Printer: %1" +#~ msgstr "Impressora: %1" + +#~ msgctxt "@action:button" +#~ msgid "Update \"%1\"" +#~ msgstr "Atualizar \"%1\"" + +#~ msgctxt "@action:button" +#~ msgid "Update profile" +#~ msgstr "Atualizar perfil" + +#~ msgctxt "@action:button" +#~ msgid "Discard current changes" +#~ msgstr "Descartar alterações atuais" + +#~ msgctxt "@action:button" +#~ msgid "Reload profile" +#~ msgstr "Reabrir perfil" + +#~ msgctxt "@label" +#~ msgid "Based on" +#~ msgstr "Baseado em" + +#~ msgctxt "@label" +#~ msgid "Profile type" +#~ msgstr "Tipo de perfil" + +#~ msgctxt "@label" +#~ msgid "Protected profile" +#~ msgstr "Perfil protegido" + +#~ msgctxt "@label" +#~ msgid "Custom profile" +#~ msgstr "Perfil personalizado" + +#~ msgctxt "@action:button" +#~ msgid "Import" +#~ msgstr "Importar" + +#~ msgctxt "@action:button" +#~ msgid "Export" +#~ msgstr "Exportar" + +#~ msgctxt "@window:title" +#~ msgid "Import Profile" +#~ msgstr "Importar Perfil" + +#~ msgctxt "@title:window" +#~ msgid "Import Profile" +#~ msgstr "Importar Perfil" + +#~ msgctxt "@title:window" +#~ msgid "Export Profile" +#~ msgstr "Exportar Perfil" diff -Nru uranium-3.3.0/resources/i18n/ru_RU/uranium.po uranium-4.4.1/resources/i18n/ru_RU/uranium.po --- uranium-3.3.0/resources/i18n/ru_RU/uranium.po 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/resources/i18n/ru_RU/uranium.po 2019-11-19 10:50:46.000000000 +0000 @@ -1,14 +1,14 @@ # Uranium -# Copyright (C) 2018 Ultimaker +# Copyright (C) 2019 Ultimaker B.V. # This file is distributed under the same license as the Uranium package. -# Ruben Dulek , 2018. +# Ruben Dulek , 2019. # msgid "" msgstr "" -"Project-Id-Version: Uranium 3.3\n" +"Project-Id-Version: Uranium 4.4\n" "Report-Msgid-Bugs-To: r.dulek@ultimaker.com\n" -"POT-Creation-Date: 2018-03-29 08:36+0200\n" -"PO-Revision-Date: 2018-04-11 15:55+0100\n" +"POT-Creation-Date: 2019-11-05 13:40+0100\n" +"PO-Revision-Date: 2019-09-23 13:26+0200\n" "Last-Translator: Bothof \n" "Language-Team: Ruslan Popov , Russian \n" "Language: ru_RU\n" @@ -16,7 +16,7 @@ "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" -"X-Generator: Poedit 2.0.4\n" +"X-Generator: Poedit 2.2.1\n" #: /home/ruben/Projects/Uranium/plugins/Views/SimpleView/__init__.py:12 msgctxt "@item:inmenu" @@ -34,6 +34,17 @@ msgid "Wavefront OBJ File" msgstr "Wavefront OBJ File" +#: /home/ruben/Projects/Uranium/plugins/FileHandlers/OBJWriter/OBJWriter.py:23 +msgctxt "@error:not supported" +msgid "OBJWriter does not support non-text mode." +msgstr "Средство записи OBJ (OBJWriter) не поддерживает нетекстовый режим." + +#: /home/ruben/Projects/Uranium/plugins/FileHandlers/OBJWriter/OBJWriter.py:30 +#: /home/ruben/Projects/Uranium/plugins/FileHandlers/STLWriter/STLWriter.py:27 +msgctxt "@error:no mesh" +msgid "There is no mesh to write." +msgstr "Отсутствует объект для записи." + #: /home/ruben/Projects/Uranium/plugins/FileHandlers/STLWriter/__init__.py:17 msgctxt "@item:inlistbox" msgid "STL File (ASCII)" @@ -44,80 +55,101 @@ msgid "STL File (Binary)" msgstr "Файл STL (бинарный)" -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:42 +#: /home/ruben/Projects/Uranium/plugins/FileHandlers/STLWriter/STLWriter.py:36 +msgctxt "@error:not supported" +msgid "Unsupported output mode writing STL to stream." +msgstr "Неподдерживаемый режим вывода при записи STL для потоковой передачи." + +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:50 msgctxt "@info" msgid "Could not access update information." msgstr "Не могу получить информацию об обновлениях." -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:43 -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:60 -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:71 -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:89 -#: /home/ruben/Projects/Uranium/UM/VersionUpgradeManager.py:123 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:51 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:68 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:97 +#: /home/ruben/Projects/Uranium/UM/VersionUpgradeManager.py:155 msgctxt "@info:title" msgid "Version Upgrade" msgstr "Обновление версии" -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:55 -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:60 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:63 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:68 msgctxt "@info" msgid "The version you are using does not support checking for updates." msgstr "Используемая вами версия не поддерживает проверку обновлений." -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:55 -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:178 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:63 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:188 msgctxt "@info:title" msgid "Warning" msgstr "Внимание" -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:71 -msgctxt "@info" -msgid "A new version is available!" -msgstr "Доступна новая версия!" - -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:72 -msgctxt "@action:button" -msgid "Download" -msgstr "Скачать" - -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:85 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:93 msgctxt "@info" msgid "An error occurred while checking for updates." msgstr "Во время проверки наличия обновлений возникла ошибка." -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:85 -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:185 -#: /home/ruben/Projects/Uranium/UM/Qt/Bindings/OutputDeviceManagerProxy.py:128 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:93 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:195 +#: /home/ruben/Projects/Uranium/UM/Qt/Bindings/OutputDeviceManagerProxy.py:141 msgctxt "@info:title" msgid "Error" msgstr "Ошибка" -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:89 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:97 msgctxt "@info" msgid "No new version was found." msgstr "Новая версия не найдена." +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:102 +#, python-brace-format +msgctxt "@info:status" +msgid "{application_name} {version_number} is available!" +msgstr "Доступна версия {application_name} {version_number}!" + +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:104 +#, python-brace-format +msgctxt "@info:status" +msgid "{application_name} {version_number} provides a better and more reliable printing experience." +msgstr "{application_name} {version_number} обеспечивает более качественную и надежную печать." + +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:107 +msgctxt "@action:button" +msgid "Download" +msgstr "Скачать" + +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:109 +msgctxt "@action:button" +msgid "Learn more" +msgstr "Узнать больше" + #: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateChecker.py:26 msgctxt "@item:inmenu" +msgid "Update Checker" +msgstr "Проверка обновлений" + +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateChecker.py:27 +msgctxt "@item:inmenu" msgid "Check for Updates" msgstr "Проверить обновления" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:33 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:30 msgctxt "@item:inmenu" msgid "Local File" msgstr "Локальный файл" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:34 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:31 msgctxt "@action:button Preceded by 'Ready to'." msgid "Save to File" msgstr "Сохранить в файл" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:35 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:32 msgctxt "@info:tooltip" msgid "Save to File" msgstr "Сохранить в файл" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:56 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:53 msgctxt "@title:window" msgid "Save to File" msgstr "Сохранить в файл" @@ -127,63 +159,63 @@ msgid "There are no file types available to write with!" msgstr "Ни один из типов файлов не доступен для записи!" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:121 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:130 msgctxt "@title:window" msgid "File Already Exists" msgstr "Файл уже существует" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:121 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:130 #, python-brace-format msgctxt "@label Don't translate the XML tag !" msgid "The file {0} already exists. Are you sure you want to overwrite it?" msgstr "Файл {0} уже существует. Вы уверены, что желаете перезаписать его?" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:150 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:160 #, python-brace-format msgctxt "@info:progress Don't translate the XML tags !" msgid "Saving to {0}" msgstr "Сохранение в {0}" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:151 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:161 msgctxt "@info:title" msgid "Saving" msgstr "Сохранение" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:159 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:169 #, python-brace-format msgctxt "@info:status Don't translate the XML tags !" msgid "Permission denied when trying to save {0}" msgstr "Недостаточно прав для записи {0}" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:162 -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:178 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:172 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:188 #, python-brace-format msgctxt "@info:status Don't translate the XML tags or !" msgid "Could not save to {0}: {1}" msgstr "Не могу записать {0}: {1}" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:172 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:182 #, python-brace-format msgctxt "@info:status Don't translate the XML tags !" msgid "Saved to {0}" msgstr "Запись в {0}" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:172 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:182 msgctxt "@info:title" msgid "File Saved" msgstr "Файл сохранён" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:173 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:183 msgctxt "@action:button" msgid "Open Folder" msgstr "Открыть каталог" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:173 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:183 msgctxt "@info:tooltip" msgid "Open the folder containing the file" msgstr "Открыть каталог, содержащий данный файл" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:185 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:195 #, python-brace-format msgctxt "@info:status" msgid "Something went wrong saving to {0}: {1}" @@ -219,6 +251,16 @@ msgid "Rotate Model" msgstr "Вращение модели" +#: /home/ruben/Projects/Uranium/plugins/Tools/RotateTool/RotateTool.py:279 +msgctxt "@label" +msgid "Laying object flat on buildplate..." +msgstr "Плоское горизонтальное расположение объекта на печатающем столе..." + +#: /home/ruben/Projects/Uranium/plugins/Tools/RotateTool/RotateTool.py:279 +msgctxt "@title" +msgid "Object Rotation" +msgstr "Вращение объекта" + #: /home/ruben/Projects/Uranium/plugins/Tools/MirrorTool/__init__.py:12 msgctxt "@label" msgid "Mirror" @@ -236,14 +278,19 @@ "Your configuration seems to be corrupt. Something seems to be wrong with the following profiles:\n" "- {profiles}\n" "Would you like to reset to factory defaults?" -msgstr "Вероятно, данные вашей конфигурации повреждены. Возникли проблемы со следующими профилями:\n- {profiles}\nВыполнить сброс до заводских настроек по умолчанию?" +msgstr "" +"Вероятно, данные вашей конфигурации повреждены. Возникли проблемы со следующими профилями:\n" +"- {profiles}\n" +"Выполнить сброс до заводских настроек по умолчанию?" #: /home/ruben/Projects/Uranium/UM/__init__.py:16 +#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:175 msgctxt "@info:status" msgid "Your configuration seems to be corrupt." msgstr "Вероятно, данные вашей конфигурации повреждены." #: /home/ruben/Projects/Uranium/UM/__init__.py:17 +#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:177 msgctxt "@info:title" msgid "Configuration errors" msgstr "Ошибки конфигурации" @@ -253,36 +300,66 @@ msgid "Reset your configuration to factory defaults." msgstr "Сбросьте конфигурацию до заводских настроек по умолчанию." -#: /home/ruben/Projects/Uranium/UM/Settings/Models/InstanceContainersModel.py:189 -#: /home/ruben/Projects/Uranium/UM/Qt/Bindings/MeshFileHandlerProxy.py:48 -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:655 -#: /home/ruben/Projects/Uranium/UM/FileHandler/FileHandler.py:70 +#: /home/ruben/Projects/Uranium/UM/Settings/Models/InstanceContainersModel.py:181 +#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:708 +#: /home/ruben/Projects/Uranium/UM/FileHandler/FileHandler.py:56 #, python-brace-format msgctxt "@item:inlistbox" msgid "All Supported Types ({0})" msgstr "Все поддерживаемые типы ({0})" -#: /home/ruben/Projects/Uranium/UM/Settings/Models/InstanceContainersModel.py:192 -#: /home/ruben/Projects/Uranium/UM/Qt/Bindings/MeshFileHandlerProxy.py:49 -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:656 -#: /home/ruben/Projects/Uranium/UM/FileHandler/FileHandler.py:71 +#: /home/ruben/Projects/Uranium/UM/Settings/Models/InstanceContainersModel.py:184 +#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:709 +#: /home/ruben/Projects/Uranium/UM/FileHandler/FileHandler.py:57 msgctxt "@item:inlistbox" msgid "All Files (*)" msgstr "Все файлы (*)" -#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:108 +#: /home/ruben/Projects/Uranium/UM/PackageManager.py:233 +#, python-brace-format +msgctxt "@error:uninstall" +msgid "" +"There were some errors uninstalling the following packages:\n" +"{packages}" +msgstr "" +"Возникли некоторые ошибки при удалении этих пакетов: \n" +"{packages}" + +#: /home/ruben/Projects/Uranium/UM/PackageManager.py:235 +msgctxt "@info:title" +msgid "Uninstalling errors" +msgstr "Ошибки при удалении" + +#: /home/ruben/Projects/Uranium/UM/PackageManager.py:454 +#, python-brace-format +msgctxt "@error:update" +msgid "" +"There was an error uninstalling the package {package} before installing new version:\n" +"{error}.\n" +"Please try to upgrade again later." +msgstr "" +"Возникла ошибка при удалении пакета {package} перед установкой новой версии:\n" +"{error}.\n" +"Повторите попытку обновления позже." + +#: /home/ruben/Projects/Uranium/UM/PackageManager.py:457 +msgctxt "@info:title" +msgid "Updating error" +msgstr "Ошибка при обновлении" + +#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:112 #, python-brace-format msgctxt "@label Short days-hours-minutes format. {0} is days, {1} is hours, {2} is minutes" msgid "{0:0>2}d {1:0>2}h {2:0>2}min" msgstr "{0:0>2}д {1:0>2}ч {2:0>2}мин" -#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:110 +#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:114 #, python-brace-format msgctxt "@label Short hours-minutes format. {0} is hours, {1} is minutes" msgid "{0:0>2}h {1:0>2}min" msgstr "{0:0>2}ч {1:0>2}мин" -#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:113 +#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:117 #, python-brace-format msgctxt "@label Long duration format. {0} is days" msgid "{0} day" @@ -291,8 +368,8 @@ msgstr[1] "{0} дня" msgstr[2] "{0} дня" -#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:113 -#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:115 +#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:117 +#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:119 #, python-brace-format msgctxt "@label Long duration format. {0} is hours" msgid "{0} hour" @@ -301,9 +378,9 @@ msgstr[1] "{0} часа" msgstr[2] "{0} часа" -#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:113 -#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:115 #: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:117 +#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:119 +#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:121 #, python-brace-format msgctxt "@label Long duration format. {0} is minutes" msgid "{0} minute" @@ -312,150 +389,159 @@ msgstr[1] "{0} минут" msgstr[2] "{0} минут" -#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:112 +#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:159 +msgctxt "@info:progress" +msgid "Initializing package manager..." +msgstr "Инициализация диспетчера пакетов..." + +#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:180 msgctxt "@info:progress" msgid "Loading plugins..." msgstr "Загрузка плагинов..." -#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:119 +#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:187 msgctxt "@info:progress" msgid "Updating configuration..." msgstr "Обновление конфигурации..." -#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:136 +#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:205 msgctxt "@info:progress" msgid "Loading preferences..." -msgstr "Загрузка настроек…" +msgstr "Загрузка настроек..." -#: /home/ruben/Projects/Uranium/UM/Mesh/ReadMeshJob.py:65 +#: /home/ruben/Projects/Uranium/UM/Mesh/ReadMeshJob.py:68 #, python-format, python-brace-format msgctxt "@info:status" msgid "Auto scaled object to {0}% of original size" msgstr "Автоматическое масштабирование объекта к {0}% от оригинального размера" -#: /home/ruben/Projects/Uranium/UM/Mesh/ReadMeshJob.py:65 +#: /home/ruben/Projects/Uranium/UM/Mesh/ReadMeshJob.py:68 msgctxt "@info:title" msgid "Scaling Object" msgstr "Масштабирование объекта" -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:220 +#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:277 msgctxt "@info:status" msgid "" "The plugin has been installed.\n" "Please re-start the application to activate the plugin." -msgstr "Плагин был установлен\nПожалуйста, перезапустите приложение для активации плагина." - -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:231 -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:270 -#, python-brace-format -msgctxt "@info:status" -msgid "" -"Failed to install plugin from {0}:\n" -"{1}" -msgstr "Не удалось установить плагин из {0}:\n{1}" - -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:254 -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:259 -#, python-brace-format -msgctxt "@info:status" -msgid "" -"Failed to install the plugin;\n" -"{0}" -msgstr "Не удалось установить плагин;\n{0}" +msgstr "" +"Плагин был установлен\n" +"Пожалуйста, перезапустите приложение для активации плагина." -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:421 +#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:415 #, python-brace-format msgctxt "@info:status" msgid "" "The plugin has been removed.\n" "Please restart {0} to finish uninstall." -msgstr "Плагин удален.\nПерезапустите {0} для завершения удаления." - -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:433 -#, python-brace-format -msgctxt "@info:status" -msgid "Failed to uninstall plugin. Plugin will be removed after {0} restarts." -msgstr "Не удалось удалить плагин. Плагин будет удален через {0} перезапуска (-ов)." +msgstr "" +"Плагин удален.\n" +"Перезапустите {0} для завершения удаления." -#: /home/ruben/Projects/Uranium/UM/VersionUpgradeManager.py:123 +#: /home/ruben/Projects/Uranium/UM/VersionUpgradeManager.py:155 #, python-brace-format msgctxt "@info:version-upgrade" msgid "A configuration from an older version of {0} was imported." msgstr "Была импортирована конфигурация от старой версии {0}." -#: /home/ruben/Projects/Uranium/UM/View/GL/OpenGL.py:50 +#: /home/ruben/Projects/Uranium/UM/View/GL/OpenGL.py:58 +#: /home/ruben/Projects/Uranium/UM/View/GL/OpenGL.py:63 msgctxt "@message" msgid "Failed to Initialize OpenGL" msgstr "Не удалось инициализировать OpenGL" -#: /home/ruben/Projects/Uranium/UM/View/GL/OpenGL.py:60 +#: /home/ruben/Projects/Uranium/UM/View/GL/OpenGL.py:73 msgctxt "Critical OpenGL Extensions Missing" msgid "Critical OpenGL extensions are missing. This program requires support for Framebuffer Objects. Please check your video card drivers." msgstr "Важные дополнения OpenGL отсутствуют. Данная программа требует поддержки для объектов фреймбуфера. Пожалуйста, проверьте драйвер своей видеокарты." -#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:153 +#: /home/ruben/Projects/Uranium/UM/ConfigurationErrorMessage.py:32 +#: /home/ruben/Projects/Uranium/plugins/Tools/ScaleTool/ScaleTool.qml:67 +#: /home/ruben/Projects/Uranium/plugins/Tools/RotateTool/RotateTool.qml:21 +msgctxt "@action:button" +msgid "Reset" +msgstr "Сброс" + +#: /home/ruben/Projects/Uranium/UM/ConfigurationErrorMessage.py:44 +#, python-brace-format +msgctxt "@info:status" +msgid "" +"Your configuration seems to be corrupt. Something seems to be wrong with the following profiles:\n" +"- {profiles}\n" +" Would you like to reset to factory defaults? Reset will remove all your current printers and profiles." +msgstr "" +"Вероятно, данные вашей конфигурации повреждены. Возникли проблемы со следующими профилями:\n" +"- {profiles}\n" +"Выполнить сброс до заводских настроек по умолчанию? Сброс приведет к удалению данных всех текущих принтеров и профилей." + +#: /home/ruben/Projects/Uranium/UM/ConfigurationErrorMessage.py:49 +msgctxt "@title:window" +msgid "Reset to factory" +msgstr "Сброс до заводских настроек по умолчанию" + +#: /home/ruben/Projects/Uranium/UM/ConfigurationErrorMessage.py:51 +msgctxt "@label" +msgid "Reset will remove all your current printers and profiles! Are you sure you want to reset?" +msgstr "Сброс приведет к удалению данных всех текущих принтеров и профилей! Действительно выполнить сброс?" + +#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:162 #, python-brace-format msgctxt "@info" msgid "Would you like to reload {filename}?" msgstr "Перезагрузить {filename}?" -#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:154 +#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:163 msgctxt "@info:title" msgid "File has been modified" msgstr "Файл был изменен" -#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:155 +#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:164 msgctxt "@action:button" msgid "Reload" msgstr "Перезагрузить" -#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:155 +#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:164 msgctxt "@action:description" msgid "This will trigger the modified files to reload from disk." msgstr "Это запустит перезагрузку измененных файлов с диска." -#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:32 +#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:36 #, python-brace-format msgctxt "@info:status Don't translate the XML tag !" msgid "Cannot open files of the type of {0}" msgstr "Не удалось открыть файлы типа {0}" -#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:32 -#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:47 -#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:70 +#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:36 +#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:51 +#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:74 msgctxt "@info:title" msgid "Invalid File" msgstr "Неправильный файл" -#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:45 -#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:70 +#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:49 +#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:74 #, python-brace-format msgctxt "@info:status Don't translate the XML tag !" msgid "Failed to load {0}" msgstr "Невозможно открыть {0}" -#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:54 +#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:59 msgctxt "@info:title" msgid "Loading" msgstr "Загрузка" -#: /home/ruben/Projects/Uranium/plugins/Tools/ScaleTool/ScaleTool.qml:60 -#: /home/ruben/Projects/Uranium/plugins/Tools/RotateTool/RotateTool.qml:21 -msgctxt "@action:button" -msgid "Reset" -msgstr "Сброс" - -#: /home/ruben/Projects/Uranium/plugins/Tools/ScaleTool/ScaleTool.qml:86 +#: /home/ruben/Projects/Uranium/plugins/Tools/ScaleTool/ScaleTool.qml:93 msgctxt "@option:check" msgid "Snap Scaling" msgstr "Быстрое масштабирование" -#: /home/ruben/Projects/Uranium/plugins/Tools/ScaleTool/ScaleTool.qml:104 +#: /home/ruben/Projects/Uranium/plugins/Tools/ScaleTool/ScaleTool.qml:121 msgctxt "@option:check" msgid "Uniform Scaling" msgstr "Обычное масштабирование" -#: /home/ruben/Projects/Uranium/plugins/Tools/TranslateTool/TranslateTool.qml:177 +#: /home/ruben/Projects/Uranium/plugins/Tools/TranslateTool/TranslateTool.qml:196 msgctxt "@option:check" msgid "Lock Model" msgstr "Блокировка модели" @@ -465,89 +551,37 @@ msgid "Lay flat" msgstr "Положить плашмя" -#: /home/ruben/Projects/Uranium/plugins/Tools/RotateTool/RotateTool.qml:55 +#: /home/ruben/Projects/Uranium/plugins/Tools/RotateTool/RotateTool.qml:60 +msgctxt "@action:button" +msgid "Select face to align to the build plate" +msgstr "Выберите поверхность для выравнивания с печатной пластиной" + +#: /home/ruben/Projects/Uranium/plugins/Tools/RotateTool/RotateTool.qml:81 msgctxt "@action:checkbox" msgid "Snap Rotation" msgstr "Быстрое вращение" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:19 -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:148 -msgctxt "@title:tab" -msgid "Plugins" -msgstr "Плагины" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:28 -msgctxt "@action:button" -msgid "Install new plugin" -msgstr "Установить новый плагин" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:51 -msgctxt "@label" -msgid "You will need to restart the application before changes in plugins have effect." -msgstr "Вам потребуется перезапустить приложение для активации возможностей плагина." - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:87 -msgctxt "@label" -msgid "This plugin is required for the application to run." -msgstr "Данный плагин необходим для запуска приложения." - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:104 -msgctxt "@label" -msgid "Info..." -msgstr "Инфо..." - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:122 -msgctxt "@window:title" -msgid "Install Plugin" -msgstr "Установка плагина" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:131 -msgctxt "@title:window" -msgid "Open file(s)" -msgstr "Открыть файл(ы)" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:165 -msgctxt "@label" -msgid "No text available" -msgstr "Текста нет" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:171 -msgctxt "@title:window" -msgid "About %1" -msgstr "О %1" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:203 -msgctxt "@label" -msgid "Author:" -msgstr "Автор:" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:225 -msgctxt "@label" -msgid "Version:" -msgstr "Версия:" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:243 -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:113 -msgctxt "@action:button" -msgid "Close" -msgstr "Закрыть" - #: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:18 msgctxt "@title:window" msgid "Preferences" msgstr "Настройки" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:106 +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:107 msgctxt "@action:button" msgid "Defaults" msgstr "Стандартные" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:146 +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:115 +msgctxt "@action:button" +msgid "Close" +msgstr "Закрыть" + +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:148 msgctxt "@title:tab" msgid "General" msgstr "Общее" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:147 +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:149 msgctxt "@title:tab" msgid "Settings" msgstr "Параметры" @@ -557,23 +591,28 @@ msgid "Rename" msgstr "Переименовать" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/RenameDialog.qml:56 +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/RenameDialog.qml:20 +msgctxt "@info" +msgid "Please provide a new name." +msgstr "Укажите новое имя." + +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/RenameDialog.qml:70 #: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Wizard.qml:241 msgctxt "@action:button" msgid "Cancel" msgstr "Отмена" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/RenameDialog.qml:60 +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/RenameDialog.qml:75 msgctxt "@action:button" msgid "OK" msgstr "OK" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/SettingVisibilityItem.qml:34 +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/SettingVisibilityItem.qml:32 msgctxt "@item:tooltip" msgid "This setting has been hidden by the active machine and will not be visible." msgstr "Данный параметр был скрыт текущим принтером и не будет отображаться." -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/SettingVisibilityItem.qml:51 +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/SettingVisibilityItem.qml:49 msgctxt "@item:tooltip %1 is list of setting names" msgid "This setting has been hidden by the value of %1. Change the value of that setting to make this setting visible." msgid_plural "This setting has been hidden by the values of %1. Change the values of those settings to make this setting visible." @@ -581,21 +620,6 @@ msgstr[1] "Эти параметры были скрыты значением %1. Измените это значение, чтобы параметр стал отображаться." msgstr[2] "Эти параметры были скрыты значением %1. Измените это значение, чтобы параметр стал отображаться." -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/SettingVisibilityPage.qml:12 -msgctxt "@title:tab" -msgid "Setting Visibility" -msgstr "Видимость настроек" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/SettingVisibilityPage.qml:42 -msgctxt "@label:textbox" -msgid "Check all" -msgstr "Выбрать все" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/SettingVisibilityPage.qml:89 -msgctxt "@label:textbox" -msgid "Filter..." -msgstr "Фильтр..." - #: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/MachinesPage.qml:12 msgctxt "@title:tab" msgid "Printers" @@ -616,86 +640,6 @@ msgid "Are you sure you wish to remove %1? This cannot be undone!" msgstr "Вы уверены, что желаете удалить %1? Это нельзя будет отменить!" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:14 -msgctxt "@title:tab" -msgid "Profiles" -msgstr "Профили" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:15 -msgctxt "@label" -msgid "Duplicate" -msgstr "Дублировать" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:45 -msgctxt "@label %1 is printer name" -msgid "Printer: %1" -msgstr "Принтер: %1" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:83 -msgctxt "@action:button" -msgid "Update \"%1\"" -msgstr "Обновить \"%1\"" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:84 -msgctxt "@action:button" -msgid "Update profile" -msgstr "Обновить профиль" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:92 -msgctxt "@action:button" -msgid "Discard current changes" -msgstr "Сбросить текущие параметры" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:93 -msgctxt "@action:button" -msgid "Reload profile" -msgstr "Перезагрузить профиль" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:107 -msgctxt "@label" -msgid "Based on" -msgstr "Основан на" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:107 -msgctxt "@label" -msgid "Profile type" -msgstr "Тип профиля" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:112 -msgctxt "@label" -msgid "Protected profile" -msgstr "Защищённый профиль" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:112 -msgctxt "@label" -msgid "Custom profile" -msgstr "Собственный профиль" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:139 -msgctxt "@action:button" -msgid "Import" -msgstr "Импорт" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:146 -msgctxt "@action:button" -msgid "Export" -msgstr "Экспорт" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:184 -msgctxt "@window:title" -msgid "Import Profile" -msgstr "Импорт профиля" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:192 -msgctxt "@title:window" -msgid "Import Profile" -msgstr "Импорт профиля" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:219 -msgctxt "@title:window" -msgid "Export Profile" -msgstr "Экспорт профиля" - #: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Wizard.qml:215 msgctxt "@action:button" msgid "Back" @@ -879,7 +823,7 @@ #: Tools/TranslateTool/plugin.json msgctxt "name" msgid "Move Tool" -msgstr "Инструмент \"Перемещение\"." +msgstr "Инструмент \"Перемещение\"" #: Tools/CameraTool/plugin.json msgctxt "description" @@ -911,6 +855,186 @@ msgid "Mirror Tool" msgstr "Инструмент \"Зеркало\"" +#~ msgctxt "@title:tab" +#~ msgid "Plugins" +#~ msgstr "Плагины" + +#~ msgctxt "@action:button" +#~ msgid "Install new plugin" +#~ msgstr "Установить новый плагин" + +#~ msgctxt "@label" +#~ msgid "You will need to restart the application before changes in plugins have effect." +#~ msgstr "Вам потребуется перезапустить приложение для активации возможностей плагина." + +#~ msgctxt "@label" +#~ msgid "This plugin is required for the application to run." +#~ msgstr "Данный плагин необходим для запуска приложения." + +#~ msgctxt "@label" +#~ msgid "Info..." +#~ msgstr "Инфо..." + +#~ msgctxt "@window:title" +#~ msgid "Install Plugin" +#~ msgstr "Установка плагина" + +#~ msgctxt "@title:window" +#~ msgid "Open file(s)" +#~ msgstr "Открыть файл(ы)" + +#~ msgctxt "@label" +#~ msgid "No text available" +#~ msgstr "Текста нет" + +#~ msgctxt "@title:window" +#~ msgid "About %1" +#~ msgstr "О %1" + +#~ msgctxt "@label" +#~ msgid "Author:" +#~ msgstr "Автор:" + +#~ msgctxt "@label" +#~ msgid "Version:" +#~ msgstr "Версия:" + +#~ msgctxt "@action:button" +#~ msgid "Learn more about the new features" +#~ msgstr "Узнайте больше о новых функциях" + +#~ msgctxt "@info:status" +#~ msgid "Cura {0} is available!" +#~ msgstr "Доступна версия {0} Cura!" + +#~ msgctxt "@info:status" +#~ msgid "Cura {0} provides better and reliable printing experience." +#~ msgstr "Cura {0} обеспечивает еще более оптимальную и надежную печать." + +#~ msgctxt "@action:button" +#~ msgid "Learn more about new features" +#~ msgstr "Узнайте больше о новых функциях" + +#~ msgctxt "@error:update" +#~ msgid "" +#~ "There was an error uninstalling the package {package} before installingnew version:\n" +#~ "{error}.\n" +#~ "Please try to upgrade again later." +#~ msgstr "" +#~ "Возникла ошибка при удалении пакета {package} перед установкой новой версии: \n" +#~ "{error}.\n" +#~ "Повторите попытку обновления позже." + +#~ msgctxt "@info:status" +#~ msgid "" +#~ "Your configuration seems to be corrupt. Something seems to be wrong with the following profiles:\n" +#~ "- {profiles}\n" +#~ "Would you like to reset to factory defaults? Reset will remove all your current printers and profiles." +#~ msgstr "" +#~ "Вероятно, данные вашей конфигурации повреждены. Возникли проблемы со следующими профилями: \n" +#~ "- {profiles}\n" +#~ "Выполнить сброс до заводских настроек по умолчанию? Сброс приведет к удалению данных всех текущих принтеров и профилей." + +#~ msgctxt "@info" +#~ msgid "A new version is available!" +#~ msgstr "Доступна новая версия!" + +#~ msgctxt "@info:status" +#~ msgid "" +#~ "Failed to install plugin from {0}:\n" +#~ "{1}" +#~ msgstr "" +#~ "Не удалось установить плагин из {0}:\n" +#~ "{1}" + +#~ msgctxt "@info:status" +#~ msgid "" +#~ "Failed to install the plugin;\n" +#~ "{0}" +#~ msgstr "" +#~ "Не удалось установить плагин;\n" +#~ "{0}" + +#~ msgctxt "@info:status" +#~ msgid "Failed to uninstall plugin. Plugin will be removed after {0} restarts." +#~ msgstr "Не удалось удалить плагин. Плагин будет удален через {0} перезапуска (-ов)." + +#~ msgctxt "@title:tab" +#~ msgid "Setting Visibility" +#~ msgstr "Видимость настроек" + +#~ msgctxt "@label:textbox" +#~ msgid "Check all" +#~ msgstr "Выбрать все" + +#~ msgctxt "@label:textbox" +#~ msgid "Filter..." +#~ msgstr "Фильтр..." + +#~ msgctxt "@title:tab" +#~ msgid "Profiles" +#~ msgstr "Профили" + +#~ msgctxt "@label" +#~ msgid "Duplicate" +#~ msgstr "Дублировать" + +#~ msgctxt "@label %1 is printer name" +#~ msgid "Printer: %1" +#~ msgstr "Принтер: %1" + +#~ msgctxt "@action:button" +#~ msgid "Update \"%1\"" +#~ msgstr "Обновить \"%1\"" + +#~ msgctxt "@action:button" +#~ msgid "Update profile" +#~ msgstr "Обновить профиль" + +#~ msgctxt "@action:button" +#~ msgid "Discard current changes" +#~ msgstr "Сбросить текущие параметры" + +#~ msgctxt "@action:button" +#~ msgid "Reload profile" +#~ msgstr "Перезагрузить профиль" + +#~ msgctxt "@label" +#~ msgid "Based on" +#~ msgstr "Основан на" + +#~ msgctxt "@label" +#~ msgid "Profile type" +#~ msgstr "Тип профиля" + +#~ msgctxt "@label" +#~ msgid "Protected profile" +#~ msgstr "Защищённый профиль" + +#~ msgctxt "@label" +#~ msgid "Custom profile" +#~ msgstr "Собственный профиль" + +#~ msgctxt "@action:button" +#~ msgid "Import" +#~ msgstr "Импорт" + +#~ msgctxt "@action:button" +#~ msgid "Export" +#~ msgstr "Экспорт" + +#~ msgctxt "@window:title" +#~ msgid "Import Profile" +#~ msgstr "Импорт профиля" + +#~ msgctxt "@title:window" +#~ msgid "Import Profile" +#~ msgstr "Импорт профиля" + +#~ msgctxt "@title:window" +#~ msgid "Export Profile" +#~ msgstr "Экспорт профиля" + #~ msgctxt "@info" #~ msgid "An exception occurred while checking for updates." #~ msgstr "Произошло исключение во время проверки наличия обновлений." diff -Nru uranium-3.3.0/resources/i18n/tr_TR/uranium.po uranium-4.4.1/resources/i18n/tr_TR/uranium.po --- uranium-3.3.0/resources/i18n/tr_TR/uranium.po 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/resources/i18n/tr_TR/uranium.po 2019-11-19 10:50:46.000000000 +0000 @@ -1,14 +1,14 @@ # Uranium -# Copyright (C) 2018 Ultimaker +# Copyright (C) 2019 Ultimaker B.V. # This file is distributed under the same license as the Uranium package. -# Ruben Dulek , 2018. +# Ruben Dulek , 2019. # msgid "" msgstr "" -"Project-Id-Version: Uranium 3.3\n" +"Project-Id-Version: Uranium 4.4\n" "Report-Msgid-Bugs-To: r.dulek@ultimaker.com\n" -"POT-Creation-Date: 2018-03-29 08:36+0200\n" -"PO-Revision-Date: 2018-04-11 15:55+0100\n" +"POT-Creation-Date: 2019-11-05 13:40+0100\n" +"PO-Revision-Date: 2019-09-23 13:27+0200\n" "Last-Translator: Bothof \n" "Language-Team: Turkish \n" "Language: tr_TR\n" @@ -16,6 +16,7 @@ "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" +"X-Generator: Poedit 2.2.1\n" #: /home/ruben/Projects/Uranium/plugins/Views/SimpleView/__init__.py:12 msgctxt "@item:inmenu" @@ -33,6 +34,17 @@ msgid "Wavefront OBJ File" msgstr "Wavefront OBJ Dosyası" +#: /home/ruben/Projects/Uranium/plugins/FileHandlers/OBJWriter/OBJWriter.py:23 +msgctxt "@error:not supported" +msgid "OBJWriter does not support non-text mode." +msgstr "OBJWriter metin dışı modu desteklemez." + +#: /home/ruben/Projects/Uranium/plugins/FileHandlers/OBJWriter/OBJWriter.py:30 +#: /home/ruben/Projects/Uranium/plugins/FileHandlers/STLWriter/STLWriter.py:27 +msgctxt "@error:no mesh" +msgid "There is no mesh to write." +msgstr "Yazdırılacak ağ yok." + #: /home/ruben/Projects/Uranium/plugins/FileHandlers/STLWriter/__init__.py:17 msgctxt "@item:inlistbox" msgid "STL File (ASCII)" @@ -43,80 +55,101 @@ msgid "STL File (Binary)" msgstr "STL Dosyası (İkili)" -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:42 +#: /home/ruben/Projects/Uranium/plugins/FileHandlers/STLWriter/STLWriter.py:36 +msgctxt "@error:not supported" +msgid "Unsupported output mode writing STL to stream." +msgstr "STL akışa yazılırken desteklenmeyen çıktı modu." + +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:50 msgctxt "@info" msgid "Could not access update information." msgstr "Güncelleme bilgilerine erişilemedi." -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:43 -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:60 -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:71 -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:89 -#: /home/ruben/Projects/Uranium/UM/VersionUpgradeManager.py:123 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:51 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:68 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:97 +#: /home/ruben/Projects/Uranium/UM/VersionUpgradeManager.py:155 msgctxt "@info:title" msgid "Version Upgrade" msgstr "Sürüm Yükseltme" -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:55 -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:60 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:63 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:68 msgctxt "@info" msgid "The version you are using does not support checking for updates." msgstr "Kullandığınız sürüm güncellemeleri denetlemeyi desteklemiyor." -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:55 -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:178 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:63 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:188 msgctxt "@info:title" msgid "Warning" msgstr "Uyarı" -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:71 -msgctxt "@info" -msgid "A new version is available!" -msgstr "Yeni bir sürüm mevcut!" - -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:72 -msgctxt "@action:button" -msgid "Download" -msgstr "İndir" - -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:85 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:93 msgctxt "@info" msgid "An error occurred while checking for updates." msgstr "Güncellemelerin kontrolü sırasında bir hata oluştu." -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:85 -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:185 -#: /home/ruben/Projects/Uranium/UM/Qt/Bindings/OutputDeviceManagerProxy.py:128 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:93 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:195 +#: /home/ruben/Projects/Uranium/UM/Qt/Bindings/OutputDeviceManagerProxy.py:141 msgctxt "@info:title" msgid "Error" msgstr "Hata" -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:89 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:97 msgctxt "@info" msgid "No new version was found." msgstr "Yeni sürüm bulunamadı." +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:102 +#, python-brace-format +msgctxt "@info:status" +msgid "{application_name} {version_number} is available!" +msgstr "{application_name} {version_number} yayınlandı!" + +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:104 +#, python-brace-format +msgctxt "@info:status" +msgid "{application_name} {version_number} provides a better and more reliable printing experience." +msgstr "{application_name} {version_number}, daha iyi ve daha güvenilir bir yazdırma deneyimi sunar." + +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:107 +msgctxt "@action:button" +msgid "Download" +msgstr "İndir" + +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:109 +msgctxt "@action:button" +msgid "Learn more" +msgstr "Daha fazla bilgi edinin" + #: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateChecker.py:26 msgctxt "@item:inmenu" +msgid "Update Checker" +msgstr "Güncelleme Denetleyicisi" + +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateChecker.py:27 +msgctxt "@item:inmenu" msgid "Check for Updates" msgstr "Güncellemeleri Denetle" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:33 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:30 msgctxt "@item:inmenu" msgid "Local File" msgstr "Yerel Dosya" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:34 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:31 msgctxt "@action:button Preceded by 'Ready to'." msgid "Save to File" msgstr "Dosyaya Kaydet" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:35 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:32 msgctxt "@info:tooltip" msgid "Save to File" msgstr "Dosyaya Kaydet" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:56 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:53 msgctxt "@title:window" msgid "Save to File" msgstr "Dosyaya Kaydet" @@ -126,63 +159,63 @@ msgid "There are no file types available to write with!" msgstr "Yazılacak dosya türleri mevcut değil!" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:121 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:130 msgctxt "@title:window" msgid "File Already Exists" msgstr "Dosya Zaten Mevcut" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:121 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:130 #, python-brace-format msgctxt "@label Don't translate the XML tag !" msgid "The file {0} already exists. Are you sure you want to overwrite it?" msgstr "Dosya {0} zaten mevcut. Üstüne yazmak istediğinizden emin misiniz?" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:150 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:160 #, python-brace-format msgctxt "@info:progress Don't translate the XML tags !" msgid "Saving to {0}" msgstr "{0} dosyasına kaydediliyor" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:151 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:161 msgctxt "@info:title" msgid "Saving" msgstr "Kaydediliyor" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:159 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:169 #, python-brace-format msgctxt "@info:status Don't translate the XML tags !" msgid "Permission denied when trying to save {0}" msgstr "{0} dosyasını kaydetmeye çalışırken izin reddedildi" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:162 -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:178 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:172 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:188 #, python-brace-format msgctxt "@info:status Don't translate the XML tags or !" msgid "Could not save to {0}: {1}" msgstr "{0} dosyasına kaydedilemedi: {1}" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:172 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:182 #, python-brace-format msgctxt "@info:status Don't translate the XML tags !" msgid "Saved to {0}" msgstr "{0} dosyasına kaydedildi" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:172 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:182 msgctxt "@info:title" msgid "File Saved" msgstr "Dosya Kaydedildi" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:173 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:183 msgctxt "@action:button" msgid "Open Folder" msgstr "Klasörü Aç" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:173 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:183 msgctxt "@info:tooltip" msgid "Open the folder containing the file" msgstr "Dosyayı içeren klasörü açın" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:185 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:195 #, python-brace-format msgctxt "@info:status" msgid "Something went wrong saving to {0}: {1}" @@ -218,6 +251,16 @@ msgid "Rotate Model" msgstr "Döndürme Modeli" +#: /home/ruben/Projects/Uranium/plugins/Tools/RotateTool/RotateTool.py:279 +msgctxt "@label" +msgid "Laying object flat on buildplate..." +msgstr "Nesne yapı levhasına düz olarak yerleştiriliyor..." + +#: /home/ruben/Projects/Uranium/plugins/Tools/RotateTool/RotateTool.py:279 +msgctxt "@title" +msgid "Object Rotation" +msgstr "Nesne Döndürme" + #: /home/ruben/Projects/Uranium/plugins/Tools/MirrorTool/__init__.py:12 msgctxt "@label" msgid "Mirror" @@ -235,14 +278,19 @@ "Your configuration seems to be corrupt. Something seems to be wrong with the following profiles:\n" "- {profiles}\n" "Would you like to reset to factory defaults?" -msgstr "Yapılandırmanız bozuk görünüyor. Aşağıdaki profillerde bir sorun var gibi görünüyor:\n- {profiles}\nFabrika varsayılanlarına sıfırlamak ister misiniz?" +msgstr "" +"Yapılandırmanız bozuk görünüyor. Aşağıdaki profillerde bir sorun var gibi görünüyor:\n" +"- {profiles}\n" +"Fabrika varsayılanlarına sıfırlamak ister misiniz?" #: /home/ruben/Projects/Uranium/UM/__init__.py:16 +#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:175 msgctxt "@info:status" msgid "Your configuration seems to be corrupt." msgstr "Yapılandırmanız bozuk görünüyor." #: /home/ruben/Projects/Uranium/UM/__init__.py:17 +#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:177 msgctxt "@info:title" msgid "Configuration errors" msgstr "Yapılandırma hataları" @@ -252,36 +300,66 @@ msgid "Reset your configuration to factory defaults." msgstr "Yapılandırmanızı fabrika varsayılanlarına sıfırlayın." -#: /home/ruben/Projects/Uranium/UM/Settings/Models/InstanceContainersModel.py:189 -#: /home/ruben/Projects/Uranium/UM/Qt/Bindings/MeshFileHandlerProxy.py:48 -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:655 -#: /home/ruben/Projects/Uranium/UM/FileHandler/FileHandler.py:70 +#: /home/ruben/Projects/Uranium/UM/Settings/Models/InstanceContainersModel.py:181 +#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:708 +#: /home/ruben/Projects/Uranium/UM/FileHandler/FileHandler.py:56 #, python-brace-format msgctxt "@item:inlistbox" msgid "All Supported Types ({0})" msgstr "Tüm desteklenen türler ({0})" -#: /home/ruben/Projects/Uranium/UM/Settings/Models/InstanceContainersModel.py:192 -#: /home/ruben/Projects/Uranium/UM/Qt/Bindings/MeshFileHandlerProxy.py:49 -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:656 -#: /home/ruben/Projects/Uranium/UM/FileHandler/FileHandler.py:71 +#: /home/ruben/Projects/Uranium/UM/Settings/Models/InstanceContainersModel.py:184 +#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:709 +#: /home/ruben/Projects/Uranium/UM/FileHandler/FileHandler.py:57 msgctxt "@item:inlistbox" msgid "All Files (*)" msgstr "Tüm Dosyalar (*)" -#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:108 +#: /home/ruben/Projects/Uranium/UM/PackageManager.py:233 +#, python-brace-format +msgctxt "@error:uninstall" +msgid "" +"There were some errors uninstalling the following packages:\n" +"{packages}" +msgstr "" +"Şu paketler kaldırılırken bazı hatalar meydana geldi:\n" +"{packages}" + +#: /home/ruben/Projects/Uranium/UM/PackageManager.py:235 +msgctxt "@info:title" +msgid "Uninstalling errors" +msgstr "Kaldırma hataları" + +#: /home/ruben/Projects/Uranium/UM/PackageManager.py:454 +#, python-brace-format +msgctxt "@error:update" +msgid "" +"There was an error uninstalling the package {package} before installing new version:\n" +"{error}.\n" +"Please try to upgrade again later." +msgstr "" +"Yeni sürüm yüklenmeden önce {package} paketi kaldırılırken hata meydana geldi:\n" +"{error}.\n" +"Lütfen daha sonra tekrar yükseltmeyi deneyin." + +#: /home/ruben/Projects/Uranium/UM/PackageManager.py:457 +msgctxt "@info:title" +msgid "Updating error" +msgstr "Güncelleme hatası" + +#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:112 #, python-brace-format msgctxt "@label Short days-hours-minutes format. {0} is days, {1} is hours, {2} is minutes" msgid "{0:0>2}d {1:0>2}h {2:0>2}min" msgstr "{0:0>2}g {1:0>2}sa {2:0>2}dk" -#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:110 +#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:114 #, python-brace-format msgctxt "@label Short hours-minutes format. {0} is hours, {1} is minutes" msgid "{0:0>2}h {1:0>2}min" msgstr "{0:0>2}sa {1:0>2}dk" -#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:113 +#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:117 #, python-brace-format msgctxt "@label Long duration format. {0} is days" msgid "{0} day" @@ -289,8 +367,8 @@ msgstr[0] "{0} gün" msgstr[1] "{0} gün" -#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:113 -#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:115 +#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:117 +#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:119 #, python-brace-format msgctxt "@label Long duration format. {0} is hours" msgid "{0} hour" @@ -298,9 +376,9 @@ msgstr[0] "{0} saat" msgstr[1] "{0} saat" -#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:113 -#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:115 #: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:117 +#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:119 +#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:121 #, python-brace-format msgctxt "@label Long duration format. {0} is minutes" msgid "{0} minute" @@ -308,150 +386,159 @@ msgstr[0] "{0} dakika" msgstr[1] "{0} dakika" -#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:112 +#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:159 +msgctxt "@info:progress" +msgid "Initializing package manager..." +msgstr "Paket yöneticisi başlatılıyor..." + +#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:180 msgctxt "@info:progress" msgid "Loading plugins..." msgstr "Eklentiler yükleniyor..." -#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:119 +#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:187 msgctxt "@info:progress" msgid "Updating configuration..." msgstr "Yapılandırma güncelleniyor..." -#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:136 +#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:205 msgctxt "@info:progress" msgid "Loading preferences..." msgstr "Tercihler yükleniyor..." -#: /home/ruben/Projects/Uranium/UM/Mesh/ReadMeshJob.py:65 +#: /home/ruben/Projects/Uranium/UM/Mesh/ReadMeshJob.py:68 #, python-format, python-brace-format msgctxt "@info:status" msgid "Auto scaled object to {0}% of original size" msgstr "Nesne özgün boyutun %{0}’sine kadar otomatik ölçeklendirildi" -#: /home/ruben/Projects/Uranium/UM/Mesh/ReadMeshJob.py:65 +#: /home/ruben/Projects/Uranium/UM/Mesh/ReadMeshJob.py:68 msgctxt "@info:title" msgid "Scaling Object" msgstr "Nesne Ölçeklendiriliyor" -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:220 +#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:277 msgctxt "@info:status" msgid "" "The plugin has been installed.\n" "Please re-start the application to activate the plugin." -msgstr "Eklenti kurulumu yapıldı.\n Eklentiyi aktif hale getirmek uygulamayı yeniden başlatın." - -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:231 -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:270 -#, python-brace-format -msgctxt "@info:status" -msgid "" -"Failed to install plugin from {0}:\n" -"{1}" -msgstr "{0} üzerinden eklenti kurulumu başarısız oldu:\n{1}" - -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:254 -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:259 -#, python-brace-format -msgctxt "@info:status" -msgid "" -"Failed to install the plugin;\n" -"{0}" -msgstr "Eklenti kurulumu başarısız oldu;\n{0}" +msgstr "" +"Eklenti kurulumu yapıldı.\n" +"Eklentiyi aktif hale getirmek uygulamayı yeniden başlatın." -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:421 +#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:415 #, python-brace-format msgctxt "@info:status" msgid "" "The plugin has been removed.\n" "Please restart {0} to finish uninstall." -msgstr "Eklenti kaldırıldı.\nKaldırmayı tamamlamak için lütfen {0} yeniden başlatın." - -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:433 -#, python-brace-format -msgctxt "@info:status" -msgid "Failed to uninstall plugin. Plugin will be removed after {0} restarts." -msgstr "Eklenti kaldırılamadı. Eklenti {0} yeniden başlatmadan sonra kaldırılacaktır." +msgstr "" +"Eklenti kaldırıldı.\n" +"Kaldırmayı tamamlamak için lütfen {0} yeniden başlatın." -#: /home/ruben/Projects/Uranium/UM/VersionUpgradeManager.py:123 +#: /home/ruben/Projects/Uranium/UM/VersionUpgradeManager.py:155 #, python-brace-format msgctxt "@info:version-upgrade" msgid "A configuration from an older version of {0} was imported." msgstr "Eski {0} versiyonundan bir yapılandırma içe aktarıldı." -#: /home/ruben/Projects/Uranium/UM/View/GL/OpenGL.py:50 +#: /home/ruben/Projects/Uranium/UM/View/GL/OpenGL.py:58 +#: /home/ruben/Projects/Uranium/UM/View/GL/OpenGL.py:63 msgctxt "@message" msgid "Failed to Initialize OpenGL" msgstr "OpenGL Başlatılamadı" -#: /home/ruben/Projects/Uranium/UM/View/GL/OpenGL.py:60 +#: /home/ruben/Projects/Uranium/UM/View/GL/OpenGL.py:73 msgctxt "Critical OpenGL Extensions Missing" msgid "Critical OpenGL extensions are missing. This program requires support for Framebuffer Objects. Please check your video card drivers." msgstr "Kritik OpenGL uzantıları eksik. Bu program Framebuffer Objects desteği gerektirir. Lütfen ekran kartı sürücülerinizi kontrol edin." -#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:153 +#: /home/ruben/Projects/Uranium/UM/ConfigurationErrorMessage.py:32 +#: /home/ruben/Projects/Uranium/plugins/Tools/ScaleTool/ScaleTool.qml:67 +#: /home/ruben/Projects/Uranium/plugins/Tools/RotateTool/RotateTool.qml:21 +msgctxt "@action:button" +msgid "Reset" +msgstr "Sıfırla" + +#: /home/ruben/Projects/Uranium/UM/ConfigurationErrorMessage.py:44 +#, python-brace-format +msgctxt "@info:status" +msgid "" +"Your configuration seems to be corrupt. Something seems to be wrong with the following profiles:\n" +"- {profiles}\n" +" Would you like to reset to factory defaults? Reset will remove all your current printers and profiles." +msgstr "" +"Yapılandırmanız bozuk görünüyor. Şu profillerde bir sorun var gibi görünüyor:\n" +"- {profiles}\n" +" Fabrika varsayılanlarına sıfırlamak ister misiniz? Sıfırlama işlemi tüm mevcut yazıcılarınızı ve profillerinizi kaldırır." + +#: /home/ruben/Projects/Uranium/UM/ConfigurationErrorMessage.py:49 +msgctxt "@title:window" +msgid "Reset to factory" +msgstr "Fabrika ayarlarına sıfırla" + +#: /home/ruben/Projects/Uranium/UM/ConfigurationErrorMessage.py:51 +msgctxt "@label" +msgid "Reset will remove all your current printers and profiles! Are you sure you want to reset?" +msgstr "Sıfırlama işlemi tüm mevcut yazıcılarınızı ve profillerinizi kaldırır! Sıfırlamak istediğinizden emin misiniz?" + +#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:162 #, python-brace-format msgctxt "@info" msgid "Would you like to reload {filename}?" msgstr "{filename} yeniden yüklemek ister misiniz?" -#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:154 +#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:163 msgctxt "@info:title" msgid "File has been modified" msgstr "Dosya değiştirildi" -#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:155 +#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:164 msgctxt "@action:button" msgid "Reload" msgstr "Yeniden Yükle" -#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:155 +#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:164 msgctxt "@action:description" msgid "This will trigger the modified files to reload from disk." msgstr "Bu, değiştirilmiş dosyaların diskten yeniden yüklenmesini tetikleyecektir." -#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:32 +#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:36 #, python-brace-format msgctxt "@info:status Don't translate the XML tag !" msgid "Cannot open files of the type of {0}" -msgstr " {0} türündeki dosyalar açılamaz" +msgstr "{0} türündeki dosyalar açılamaz" -#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:32 -#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:47 -#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:70 +#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:36 +#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:51 +#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:74 msgctxt "@info:title" msgid "Invalid File" msgstr "Geçersiz Dosya" -#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:45 -#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:70 +#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:49 +#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:74 #, python-brace-format msgctxt "@info:status Don't translate the XML tag !" msgid "Failed to load {0}" msgstr "{0} yüklemesi başarısız oldu" -#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:54 +#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:59 msgctxt "@info:title" msgid "Loading" msgstr "Yükleniyor" -#: /home/ruben/Projects/Uranium/plugins/Tools/ScaleTool/ScaleTool.qml:60 -#: /home/ruben/Projects/Uranium/plugins/Tools/RotateTool/RotateTool.qml:21 -msgctxt "@action:button" -msgid "Reset" -msgstr "Sıfırla" - -#: /home/ruben/Projects/Uranium/plugins/Tools/ScaleTool/ScaleTool.qml:86 +#: /home/ruben/Projects/Uranium/plugins/Tools/ScaleTool/ScaleTool.qml:93 msgctxt "@option:check" msgid "Snap Scaling" msgstr "Ölçeklendirmeyi Tuttur" -#: /home/ruben/Projects/Uranium/plugins/Tools/ScaleTool/ScaleTool.qml:104 +#: /home/ruben/Projects/Uranium/plugins/Tools/ScaleTool/ScaleTool.qml:121 msgctxt "@option:check" msgid "Uniform Scaling" msgstr "Ölçeklendirmeyi Aynı Yap" -#: /home/ruben/Projects/Uranium/plugins/Tools/TranslateTool/TranslateTool.qml:177 +#: /home/ruben/Projects/Uranium/plugins/Tools/TranslateTool/TranslateTool.qml:196 msgctxt "@option:check" msgid "Lock Model" msgstr "Kilit Modeli" @@ -461,89 +548,37 @@ msgid "Lay flat" msgstr "Düz Şekilde Yerleştir" -#: /home/ruben/Projects/Uranium/plugins/Tools/RotateTool/RotateTool.qml:55 +#: /home/ruben/Projects/Uranium/plugins/Tools/RotateTool/RotateTool.qml:60 +msgctxt "@action:button" +msgid "Select face to align to the build plate" +msgstr "Yapı plakasıyla hizalanacak yüzü seçin" + +#: /home/ruben/Projects/Uranium/plugins/Tools/RotateTool/RotateTool.qml:81 msgctxt "@action:checkbox" msgid "Snap Rotation" msgstr "Döndürmeyi Tuttur" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:19 -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:148 -msgctxt "@title:tab" -msgid "Plugins" -msgstr "Eklentiler" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:28 -msgctxt "@action:button" -msgid "Install new plugin" -msgstr "Yeni eklenti kur" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:51 -msgctxt "@label" -msgid "You will need to restart the application before changes in plugins have effect." -msgstr "Eklentilerde yapılan değişikliklerin geçerli olması için uygulamayı yeniden başlatmanız gerekecektir." - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:87 -msgctxt "@label" -msgid "This plugin is required for the application to run." -msgstr "Bu eklenti uygulamanın çalışması için gereklidir." - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:104 -msgctxt "@label" -msgid "Info..." -msgstr "Bilgi..." - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:122 -msgctxt "@window:title" -msgid "Install Plugin" -msgstr "Eklenti Kur" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:131 -msgctxt "@title:window" -msgid "Open file(s)" -msgstr "Dosya aç" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:165 -msgctxt "@label" -msgid "No text available" -msgstr "Metin yok" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:171 -msgctxt "@title:window" -msgid "About %1" -msgstr "Yaklaşık %1" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:203 -msgctxt "@label" -msgid "Author:" -msgstr "Yazar:" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:225 -msgctxt "@label" -msgid "Version:" -msgstr "Sürüm:" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:243 -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:113 -msgctxt "@action:button" -msgid "Close" -msgstr "Kapat" - #: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:18 msgctxt "@title:window" msgid "Preferences" msgstr "Tercihler" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:106 +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:107 msgctxt "@action:button" msgid "Defaults" msgstr "Varsayılanlar" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:146 +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:115 +msgctxt "@action:button" +msgid "Close" +msgstr "Kapat" + +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:148 msgctxt "@title:tab" msgid "General" msgstr "Genel" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:147 +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:149 msgctxt "@title:tab" msgid "Settings" msgstr "Ayarlar" @@ -553,44 +588,34 @@ msgid "Rename" msgstr "Yeniden Adlandır" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/RenameDialog.qml:56 +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/RenameDialog.qml:20 +msgctxt "@info" +msgid "Please provide a new name." +msgstr "Lütfen yeni bir isim girin." + +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/RenameDialog.qml:70 #: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Wizard.qml:241 msgctxt "@action:button" msgid "Cancel" msgstr "İptal Et" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/RenameDialog.qml:60 +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/RenameDialog.qml:75 msgctxt "@action:button" msgid "OK" msgstr "Tamam" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/SettingVisibilityItem.qml:34 +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/SettingVisibilityItem.qml:32 msgctxt "@item:tooltip" msgid "This setting has been hidden by the active machine and will not be visible." msgstr "Bu ayar etkin makine tarafından saklanmış ve görünür olmayacak." -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/SettingVisibilityItem.qml:51 +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/SettingVisibilityItem.qml:49 msgctxt "@item:tooltip %1 is list of setting names" msgid "This setting has been hidden by the value of %1. Change the value of that setting to make this setting visible." msgid_plural "This setting has been hidden by the values of %1. Change the values of those settings to make this setting visible." msgstr[0] "Bu ayar %1 değerle saklanmış. Ayarı görünür yapmak için ayar değerini değiştirin." msgstr[1] "Bu ayar %1 değerle saklanmış. Ayarı görünür yapmak için bu ayarların değerini değiştirin." -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/SettingVisibilityPage.qml:12 -msgctxt "@title:tab" -msgid "Setting Visibility" -msgstr "Görünürlüğü Ayarlama" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/SettingVisibilityPage.qml:42 -msgctxt "@label:textbox" -msgid "Check all" -msgstr "Tümünü denetle" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/SettingVisibilityPage.qml:89 -msgctxt "@label:textbox" -msgid "Filter..." -msgstr "Filtrele..." - #: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/MachinesPage.qml:12 msgctxt "@title:tab" msgid "Printers" @@ -611,86 +636,6 @@ msgid "Are you sure you wish to remove %1? This cannot be undone!" msgstr "%1’i kaldırmak istediğinizden emin misiniz? Bu eylem geri alınamaz!" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:14 -msgctxt "@title:tab" -msgid "Profiles" -msgstr "Profiller" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:15 -msgctxt "@label" -msgid "Duplicate" -msgstr "Çoğalt" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:45 -msgctxt "@label %1 is printer name" -msgid "Printer: %1" -msgstr "Yazıcı: %1" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:83 -msgctxt "@action:button" -msgid "Update \"%1\"" -msgstr "“%1” güncelleme" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:84 -msgctxt "@action:button" -msgid "Update profile" -msgstr "Profili güncelle" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:92 -msgctxt "@action:button" -msgid "Discard current changes" -msgstr "Geçerli değişiklikleri iptal et" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:93 -msgctxt "@action:button" -msgid "Reload profile" -msgstr "Profili yeniden yükle" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:107 -msgctxt "@label" -msgid "Based on" -msgstr "Başvuru stili" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:107 -msgctxt "@label" -msgid "Profile type" -msgstr "Profil türü" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:112 -msgctxt "@label" -msgid "Protected profile" -msgstr "Korumalı profil" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:112 -msgctxt "@label" -msgid "Custom profile" -msgstr "Özel profil" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:139 -msgctxt "@action:button" -msgid "Import" -msgstr "İçe Aktar" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:146 -msgctxt "@action:button" -msgid "Export" -msgstr "Dışa Aktar" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:184 -msgctxt "@window:title" -msgid "Import Profile" -msgstr "Profili İçe Aktar" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:192 -msgctxt "@title:window" -msgid "Import Profile" -msgstr "Profili İçe Aktar" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:219 -msgctxt "@title:window" -msgid "Export Profile" -msgstr "Profili Dışa Aktar" - #: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Wizard.qml:215 msgctxt "@action:button" msgid "Back" @@ -906,6 +851,186 @@ msgid "Mirror Tool" msgstr "Ayna Aracı" +#~ msgctxt "@title:tab" +#~ msgid "Plugins" +#~ msgstr "Eklentiler" + +#~ msgctxt "@action:button" +#~ msgid "Install new plugin" +#~ msgstr "Yeni eklenti kur" + +#~ msgctxt "@label" +#~ msgid "You will need to restart the application before changes in plugins have effect." +#~ msgstr "Eklentilerde yapılan değişikliklerin geçerli olması için uygulamayı yeniden başlatmanız gerekecektir." + +#~ msgctxt "@label" +#~ msgid "This plugin is required for the application to run." +#~ msgstr "Bu eklenti uygulamanın çalışması için gereklidir." + +#~ msgctxt "@label" +#~ msgid "Info..." +#~ msgstr "Bilgi..." + +#~ msgctxt "@window:title" +#~ msgid "Install Plugin" +#~ msgstr "Eklenti Kur" + +#~ msgctxt "@title:window" +#~ msgid "Open file(s)" +#~ msgstr "Dosya aç" + +#~ msgctxt "@label" +#~ msgid "No text available" +#~ msgstr "Metin yok" + +#~ msgctxt "@title:window" +#~ msgid "About %1" +#~ msgstr "Yaklaşık %1" + +#~ msgctxt "@label" +#~ msgid "Author:" +#~ msgstr "Yazar:" + +#~ msgctxt "@label" +#~ msgid "Version:" +#~ msgstr "Sürüm:" + +#~ msgctxt "@action:button" +#~ msgid "Learn more about the new features" +#~ msgstr "Yeni özellikler hakkında daha fazla bilgi alın" + +#~ msgctxt "@info:status" +#~ msgid "Cura {0} is available!" +#~ msgstr "Cura {0} yayınlandı!" + +#~ msgctxt "@info:status" +#~ msgid "Cura {0} provides better and reliable printing experience." +#~ msgstr "Cura {0} daha iyi ve daha güvenilir bir yazdırma deneyimi sunar." + +#~ msgctxt "@action:button" +#~ msgid "Learn more about new features" +#~ msgstr "Yeni özellikler hakkında daha fazla bilgi alın" + +#~ msgctxt "@error:update" +#~ msgid "" +#~ "There was an error uninstalling the package {package} before installingnew version:\n" +#~ "{error}.\n" +#~ "Please try to upgrade again later." +#~ msgstr "" +#~ "Yeni sürüm yüklenmeden önce {package} paketi kaldırılırken hata meydana geldi:\n" +#~ "{error}.\n" +#~ "Lütfen daha sonra tekrar güncellemeyi deneyin." + +#~ msgctxt "@info:status" +#~ msgid "" +#~ "Your configuration seems to be corrupt. Something seems to be wrong with the following profiles:\n" +#~ "- {profiles}\n" +#~ "Would you like to reset to factory defaults? Reset will remove all your current printers and profiles." +#~ msgstr "" +#~ "Yapılandırmanız bozuk görünüyor. Şu profillerde bir sorun var gibi görünüyor:\n" +#~ "- {profiles}\n" +#~ "Fabrika varsayılanlarına sıfırlamak ister misiniz? Sıfırlama işlemi mevcut tüm yazıcılarınızı ve profillerinizi kaldıracaktır." + +#~ msgctxt "@info" +#~ msgid "A new version is available!" +#~ msgstr "Yeni bir sürüm mevcut!" + +#~ msgctxt "@info:status" +#~ msgid "" +#~ "Failed to install plugin from {0}:\n" +#~ "{1}" +#~ msgstr "" +#~ "{0} üzerinden eklenti kurulumu başarısız oldu:\n" +#~ "{1}" + +#~ msgctxt "@info:status" +#~ msgid "" +#~ "Failed to install the plugin;\n" +#~ "{0}" +#~ msgstr "" +#~ "Eklenti kurulumu başarısız oldu;\n" +#~ "{0}" + +#~ msgctxt "@info:status" +#~ msgid "Failed to uninstall plugin. Plugin will be removed after {0} restarts." +#~ msgstr "Eklenti kaldırılamadı. Eklenti {0} yeniden başlatmadan sonra kaldırılacaktır." + +#~ msgctxt "@title:tab" +#~ msgid "Setting Visibility" +#~ msgstr "Görünürlüğü Ayarlama" + +#~ msgctxt "@label:textbox" +#~ msgid "Check all" +#~ msgstr "Tümünü denetle" + +#~ msgctxt "@label:textbox" +#~ msgid "Filter..." +#~ msgstr "Filtrele..." + +#~ msgctxt "@title:tab" +#~ msgid "Profiles" +#~ msgstr "Profiller" + +#~ msgctxt "@label" +#~ msgid "Duplicate" +#~ msgstr "Çoğalt" + +#~ msgctxt "@label %1 is printer name" +#~ msgid "Printer: %1" +#~ msgstr "Yazıcı: %1" + +#~ msgctxt "@action:button" +#~ msgid "Update \"%1\"" +#~ msgstr "“%1” güncelleme" + +#~ msgctxt "@action:button" +#~ msgid "Update profile" +#~ msgstr "Profili güncelle" + +#~ msgctxt "@action:button" +#~ msgid "Discard current changes" +#~ msgstr "Geçerli değişiklikleri iptal et" + +#~ msgctxt "@action:button" +#~ msgid "Reload profile" +#~ msgstr "Profili yeniden yükle" + +#~ msgctxt "@label" +#~ msgid "Based on" +#~ msgstr "Başvuru stili" + +#~ msgctxt "@label" +#~ msgid "Profile type" +#~ msgstr "Profil türü" + +#~ msgctxt "@label" +#~ msgid "Protected profile" +#~ msgstr "Korumalı profil" + +#~ msgctxt "@label" +#~ msgid "Custom profile" +#~ msgstr "Özel profil" + +#~ msgctxt "@action:button" +#~ msgid "Import" +#~ msgstr "İçe Aktar" + +#~ msgctxt "@action:button" +#~ msgid "Export" +#~ msgstr "Dışa Aktar" + +#~ msgctxt "@window:title" +#~ msgid "Import Profile" +#~ msgstr "Profili İçe Aktar" + +#~ msgctxt "@title:window" +#~ msgid "Import Profile" +#~ msgstr "Profili İçe Aktar" + +#~ msgctxt "@title:window" +#~ msgid "Export Profile" +#~ msgstr "Profili Dışa Aktar" + #~ msgctxt "@info" #~ msgid "An exception occurred while checking for updates." #~ msgstr "Güncellemelerin kontrolü sırasında olağanüstü bir durum oluştu." diff -Nru uranium-3.3.0/resources/i18n/uranium.pot uranium-4.4.1/resources/i18n/uranium.pot --- uranium-3.3.0/resources/i18n/uranium.pot 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/resources/i18n/uranium.pot 2019-11-19 10:50:46.000000000 +0000 @@ -1,18 +1,18 @@ -# Uranium -# Copyright (C) 2018 Ultimaker -# This file is distributed under the same license as the Uranium package. -# Ruben Dulek , 2018. +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" -"Project-Id-Version: Uranium 3.3\n" -"Report-Msgid-Bugs-To: r.dulek@ultimaker.com\n" -"POT-Creation-Date: 2018-03-29 08:36+0200\n" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2019-11-05 13:40+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" -"Language-Team: TEAM\n" -"Language: LANGUAGE\n" +"Language-Team: LANGUAGE \n" +"Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -34,6 +34,17 @@ msgid "Wavefront OBJ File" msgstr "" +#: /home/ruben/Projects/Uranium/plugins/FileHandlers/OBJWriter/OBJWriter.py:23 +msgctxt "@error:not supported" +msgid "OBJWriter does not support non-text mode." +msgstr "" + +#: /home/ruben/Projects/Uranium/plugins/FileHandlers/OBJWriter/OBJWriter.py:30 +#: /home/ruben/Projects/Uranium/plugins/FileHandlers/STLWriter/STLWriter.py:27 +msgctxt "@error:no mesh" +msgid "There is no mesh to write." +msgstr "" + #: /home/ruben/Projects/Uranium/plugins/FileHandlers/STLWriter/__init__.py:17 msgctxt "@item:inlistbox" msgid "STL File (ASCII)" @@ -44,80 +55,103 @@ msgid "STL File (Binary)" msgstr "" -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:42 +#: /home/ruben/Projects/Uranium/plugins/FileHandlers/STLWriter/STLWriter.py:36 +msgctxt "@error:not supported" +msgid "Unsupported output mode writing STL to stream." +msgstr "" + +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:50 msgctxt "@info" msgid "Could not access update information." msgstr "" -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:43 -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:60 -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:71 -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:89 -#: /home/ruben/Projects/Uranium/UM/VersionUpgradeManager.py:123 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:51 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:68 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:97 +#: /home/ruben/Projects/Uranium/UM/VersionUpgradeManager.py:155 msgctxt "@info:title" msgid "Version Upgrade" msgstr "" -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:55 -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:60 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:63 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:68 msgctxt "@info" msgid "The version you are using does not support checking for updates." msgstr "" -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:55 -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:178 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:63 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:188 msgctxt "@info:title" msgid "Warning" msgstr "" -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:71 -msgctxt "@info" -msgid "A new version is available!" -msgstr "" - -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:72 -msgctxt "@action:button" -msgid "Download" -msgstr "" - -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:85 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:93 msgctxt "@info" msgid "An error occurred while checking for updates." msgstr "" -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:85 -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:185 -#: /home/ruben/Projects/Uranium/UM/Qt/Bindings/OutputDeviceManagerProxy.py:128 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:93 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:195 +#: /home/ruben/Projects/Uranium/UM/Qt/Bindings/OutputDeviceManagerProxy.py:141 msgctxt "@info:title" msgid "Error" msgstr "" -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:89 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:97 msgctxt "@info" msgid "No new version was found." msgstr "" +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:102 +#, python-brace-format +msgctxt "@info:status" +msgid "{application_name} {version_number} is available!" +msgstr "" + +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:104 +#, python-brace-format +msgctxt "@info:status" +msgid "" +"{application_name} {version_number} provides a better and more reliable " +"printing experience." +msgstr "" + +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:107 +msgctxt "@action:button" +msgid "Download" +msgstr "" + +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:109 +msgctxt "@action:button" +msgid "Learn more" +msgstr "" + #: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateChecker.py:26 msgctxt "@item:inmenu" +msgid "Update Checker" +msgstr "" + +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateChecker.py:27 +msgctxt "@item:inmenu" msgid "Check for Updates" msgstr "" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:33 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:30 msgctxt "@item:inmenu" msgid "Local File" msgstr "" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:34 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:31 msgctxt "@action:button Preceded by 'Ready to'." msgid "Save to File" msgstr "" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:35 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:32 msgctxt "@info:tooltip" msgid "Save to File" msgstr "" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:56 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:53 msgctxt "@title:window" msgid "Save to File" msgstr "" @@ -127,12 +161,12 @@ msgid "There are no file types available to write with!" msgstr "" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:121 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:130 msgctxt "@title:window" msgid "File Already Exists" msgstr "" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:121 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:130 #, python-brace-format msgctxt "@label Don't translate the XML tag !" msgid "" @@ -140,52 +174,52 @@ "overwrite it?" msgstr "" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:150 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:160 #, python-brace-format msgctxt "@info:progress Don't translate the XML tags !" msgid "Saving to {0}" msgstr "" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:151 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:161 msgctxt "@info:title" msgid "Saving" msgstr "" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:159 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:169 #, python-brace-format msgctxt "@info:status Don't translate the XML tags !" msgid "Permission denied when trying to save {0}" msgstr "" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:162 -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:178 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:172 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:188 #, python-brace-format msgctxt "@info:status Don't translate the XML tags or !" msgid "Could not save to {0}: {1}" msgstr "" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:172 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:182 #, python-brace-format msgctxt "@info:status Don't translate the XML tags !" msgid "Saved to {0}" msgstr "" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:172 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:182 msgctxt "@info:title" msgid "File Saved" msgstr "" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:173 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:183 msgctxt "@action:button" msgid "Open Folder" msgstr "" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:173 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:183 msgctxt "@info:tooltip" msgid "Open the folder containing the file" msgstr "" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:185 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:195 #, python-brace-format msgctxt "@info:status" msgid "" @@ -223,6 +257,16 @@ msgid "Rotate Model" msgstr "" +#: /home/ruben/Projects/Uranium/plugins/Tools/RotateTool/RotateTool.py:279 +msgctxt "@label" +msgid "Laying object flat on buildplate..." +msgstr "" + +#: /home/ruben/Projects/Uranium/plugins/Tools/RotateTool/RotateTool.py:279 +msgctxt "@title" +msgid "Object Rotation" +msgstr "" + #: /home/ruben/Projects/Uranium/plugins/Tools/MirrorTool/__init__.py:12 msgctxt "@label" msgid "Mirror" @@ -244,11 +288,13 @@ msgstr "" #: /home/ruben/Projects/Uranium/UM/__init__.py:16 +#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:175 msgctxt "@info:status" msgid "Your configuration seems to be corrupt." msgstr "" #: /home/ruben/Projects/Uranium/UM/__init__.py:17 +#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:177 msgctxt "@info:title" msgid "Configuration errors" msgstr "" @@ -258,24 +304,50 @@ msgid "Reset your configuration to factory defaults." msgstr "" -#: /home/ruben/Projects/Uranium/UM/Settings/Models/InstanceContainersModel.py:189 -#: /home/ruben/Projects/Uranium/UM/Qt/Bindings/MeshFileHandlerProxy.py:48 -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:655 -#: /home/ruben/Projects/Uranium/UM/FileHandler/FileHandler.py:70 +#: /home/ruben/Projects/Uranium/UM/Settings/Models/InstanceContainersModel.py:181 +#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:708 +#: /home/ruben/Projects/Uranium/UM/FileHandler/FileHandler.py:56 #, python-brace-format msgctxt "@item:inlistbox" msgid "All Supported Types ({0})" msgstr "" -#: /home/ruben/Projects/Uranium/UM/Settings/Models/InstanceContainersModel.py:192 -#: /home/ruben/Projects/Uranium/UM/Qt/Bindings/MeshFileHandlerProxy.py:49 -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:656 -#: /home/ruben/Projects/Uranium/UM/FileHandler/FileHandler.py:71 +#: /home/ruben/Projects/Uranium/UM/Settings/Models/InstanceContainersModel.py:184 +#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:709 +#: /home/ruben/Projects/Uranium/UM/FileHandler/FileHandler.py:57 msgctxt "@item:inlistbox" msgid "All Files (*)" msgstr "" -#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:108 +#: /home/ruben/Projects/Uranium/UM/PackageManager.py:233 +#, python-brace-format +msgctxt "@error:uninstall" +msgid "" +"There were some errors uninstalling the following packages:\n" +"{packages}" +msgstr "" + +#: /home/ruben/Projects/Uranium/UM/PackageManager.py:235 +msgctxt "@info:title" +msgid "Uninstalling errors" +msgstr "" + +#: /home/ruben/Projects/Uranium/UM/PackageManager.py:454 +#, python-brace-format +msgctxt "@error:update" +msgid "" +"There was an error uninstalling the package {package} before installing new " +"version:\n" +"{error}.\n" +"Please try to upgrade again later." +msgstr "" + +#: /home/ruben/Projects/Uranium/UM/PackageManager.py:457 +msgctxt "@info:title" +msgid "Updating error" +msgstr "" + +#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:112 #, python-brace-format msgctxt "" "@label Short days-hours-minutes format. {0} is days, {1} is hours, {2} is " @@ -283,13 +355,13 @@ msgid "{0:0>2}d {1:0>2}h {2:0>2}min" msgstr "" -#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:110 +#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:114 #, python-brace-format msgctxt "@label Short hours-minutes format. {0} is hours, {1} is minutes" msgid "{0:0>2}h {1:0>2}min" msgstr "" -#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:113 +#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:117 #, python-brace-format msgctxt "@label Long duration format. {0} is days" msgid "{0} day" @@ -297,8 +369,8 @@ msgstr[0] "" msgstr[1] "" -#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:113 -#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:115 +#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:117 +#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:119 #, python-brace-format msgctxt "@label Long duration format. {0} is hours" msgid "{0} hour" @@ -306,9 +378,9 @@ msgstr[0] "" msgstr[1] "" -#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:113 -#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:115 #: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:117 +#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:119 +#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:121 #, python-brace-format msgctxt "@label Long duration format. {0} is minutes" msgid "{0} minute" @@ -316,58 +388,45 @@ msgstr[0] "" msgstr[1] "" -#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:112 +#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:159 +msgctxt "@info:progress" +msgid "Initializing package manager..." +msgstr "" + +#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:180 msgctxt "@info:progress" msgid "Loading plugins..." msgstr "" -#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:119 +#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:187 msgctxt "@info:progress" msgid "Updating configuration..." msgstr "" -#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:136 +#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:205 msgctxt "@info:progress" msgid "Loading preferences..." msgstr "" -#: /home/ruben/Projects/Uranium/UM/Mesh/ReadMeshJob.py:65 +#: /home/ruben/Projects/Uranium/UM/Mesh/ReadMeshJob.py:68 #, python-format, python-brace-format msgctxt "@info:status" msgid "Auto scaled object to {0}% of original size" msgstr "" -#: /home/ruben/Projects/Uranium/UM/Mesh/ReadMeshJob.py:65 +#: /home/ruben/Projects/Uranium/UM/Mesh/ReadMeshJob.py:68 msgctxt "@info:title" msgid "Scaling Object" msgstr "" -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:220 +#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:277 msgctxt "@info:status" msgid "" "The plugin has been installed.\n" "Please re-start the application to activate the plugin." msgstr "" -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:231 -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:270 -#, python-brace-format -msgctxt "@info:status" -msgid "" -"Failed to install plugin from {0}:\n" -"{1}" -msgstr "" - -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:254 -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:259 -#, python-brace-format -msgctxt "@info:status" -msgid "" -"Failed to install the plugin;\n" -"{0}" -msgstr "" - -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:421 +#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:415 #, python-brace-format msgctxt "@info:status" msgid "" @@ -375,93 +434,112 @@ "Please restart {0} to finish uninstall." msgstr "" -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:433 -#, python-brace-format -msgctxt "@info:status" -msgid "Failed to uninstall plugin. Plugin will be removed after {0} restarts." -msgstr "" - -#: /home/ruben/Projects/Uranium/UM/VersionUpgradeManager.py:123 +#: /home/ruben/Projects/Uranium/UM/VersionUpgradeManager.py:155 #, python-brace-format msgctxt "@info:version-upgrade" msgid "A configuration from an older version of {0} was imported." msgstr "" -#: /home/ruben/Projects/Uranium/UM/View/GL/OpenGL.py:50 +#: /home/ruben/Projects/Uranium/UM/View/GL/OpenGL.py:58 +#: /home/ruben/Projects/Uranium/UM/View/GL/OpenGL.py:63 msgctxt "@message" msgid "Failed to Initialize OpenGL" msgstr "" -#: /home/ruben/Projects/Uranium/UM/View/GL/OpenGL.py:60 +#: /home/ruben/Projects/Uranium/UM/View/GL/OpenGL.py:73 msgctxt "Critical OpenGL Extensions Missing" msgid "" "Critical OpenGL extensions are missing. This program requires support for " "Framebuffer Objects. Please check your video card drivers." msgstr "" -#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:153 +#: /home/ruben/Projects/Uranium/UM/ConfigurationErrorMessage.py:32 +#: /home/ruben/Projects/Uranium/plugins/Tools/ScaleTool/ScaleTool.qml:67 +#: /home/ruben/Projects/Uranium/plugins/Tools/RotateTool/RotateTool.qml:21 +msgctxt "@action:button" +msgid "Reset" +msgstr "" + +#: /home/ruben/Projects/Uranium/UM/ConfigurationErrorMessage.py:44 +#, python-brace-format +msgctxt "@info:status" +msgid "" +"Your configuration seems to be corrupt. Something seems to be wrong with the " +"following profiles:\n" +"- {profiles}\n" +" Would you like to reset to factory defaults? Reset will remove all your " +"current printers and profiles." +msgstr "" + +#: /home/ruben/Projects/Uranium/UM/ConfigurationErrorMessage.py:49 +msgctxt "@title:window" +msgid "Reset to factory" +msgstr "" + +#: /home/ruben/Projects/Uranium/UM/ConfigurationErrorMessage.py:51 +msgctxt "@label" +msgid "" +"Reset will remove all your current printers and profiles! Are you sure you " +"want to reset?" +msgstr "" + +#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:162 #, python-brace-format msgctxt "@info" msgid "Would you like to reload {filename}?" msgstr "" -#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:154 +#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:163 msgctxt "@info:title" msgid "File has been modified" msgstr "" -#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:155 +#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:164 msgctxt "@action:button" msgid "Reload" msgstr "" -#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:155 +#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:164 msgctxt "@action:description" msgid "This will trigger the modified files to reload from disk." msgstr "" -#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:32 +#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:36 #, python-brace-format msgctxt "@info:status Don't translate the XML tag !" msgid "Cannot open files of the type of {0}" msgstr "" -#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:32 -#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:47 -#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:70 +#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:36 +#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:51 +#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:74 msgctxt "@info:title" msgid "Invalid File" msgstr "" -#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:45 -#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:70 +#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:49 +#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:74 #, python-brace-format msgctxt "@info:status Don't translate the XML tag !" msgid "Failed to load {0}" msgstr "" -#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:54 +#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:59 msgctxt "@info:title" msgid "Loading" msgstr "" -#: /home/ruben/Projects/Uranium/plugins/Tools/ScaleTool/ScaleTool.qml:60 -#: /home/ruben/Projects/Uranium/plugins/Tools/RotateTool/RotateTool.qml:21 -msgctxt "@action:button" -msgid "Reset" -msgstr "" - -#: /home/ruben/Projects/Uranium/plugins/Tools/ScaleTool/ScaleTool.qml:86 +#: /home/ruben/Projects/Uranium/plugins/Tools/ScaleTool/ScaleTool.qml:93 msgctxt "@option:check" msgid "Snap Scaling" msgstr "" -#: /home/ruben/Projects/Uranium/plugins/Tools/ScaleTool/ScaleTool.qml:104 +#: /home/ruben/Projects/Uranium/plugins/Tools/ScaleTool/ScaleTool.qml:121 msgctxt "@option:check" msgid "Uniform Scaling" msgstr "" -#: /home/ruben/Projects/Uranium/plugins/Tools/TranslateTool/TranslateTool.qml:177 +#: /home/ruben/Projects/Uranium/plugins/Tools/TranslateTool/TranslateTool.qml:196 msgctxt "@option:check" msgid "Lock Model" msgstr "" @@ -471,73 +549,14 @@ msgid "Lay flat" msgstr "" -#: /home/ruben/Projects/Uranium/plugins/Tools/RotateTool/RotateTool.qml:55 -msgctxt "@action:checkbox" -msgid "Snap Rotation" -msgstr "" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:19 -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:148 -msgctxt "@title:tab" -msgid "Plugins" -msgstr "" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:28 +#: /home/ruben/Projects/Uranium/plugins/Tools/RotateTool/RotateTool.qml:60 msgctxt "@action:button" -msgid "Install new plugin" -msgstr "" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:51 -msgctxt "@label" -msgid "" -"You will need to restart the application before changes in plugins have " -"effect." -msgstr "" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:87 -msgctxt "@label" -msgid "This plugin is required for the application to run." -msgstr "" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:104 -msgctxt "@label" -msgid "Info..." -msgstr "" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:122 -msgctxt "@window:title" -msgid "Install Plugin" -msgstr "" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:131 -msgctxt "@title:window" -msgid "Open file(s)" -msgstr "" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:165 -msgctxt "@label" -msgid "No text available" +msgid "Select face to align to the build plate" msgstr "" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:171 -msgctxt "@title:window" -msgid "About %1" -msgstr "" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:203 -msgctxt "@label" -msgid "Author:" -msgstr "" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:225 -msgctxt "@label" -msgid "Version:" -msgstr "" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:243 -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:113 -msgctxt "@action:button" -msgid "Close" +#: /home/ruben/Projects/Uranium/plugins/Tools/RotateTool/RotateTool.qml:81 +msgctxt "@action:checkbox" +msgid "Snap Rotation" msgstr "" #: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:18 @@ -545,17 +564,22 @@ msgid "Preferences" msgstr "" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:106 +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:107 msgctxt "@action:button" msgid "Defaults" msgstr "" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:146 +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:115 +msgctxt "@action:button" +msgid "Close" +msgstr "" + +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:148 msgctxt "@title:tab" msgid "General" msgstr "" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:147 +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:149 msgctxt "@title:tab" msgid "Settings" msgstr "" @@ -565,24 +589,29 @@ msgid "Rename" msgstr "" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/RenameDialog.qml:56 +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/RenameDialog.qml:20 +msgctxt "@info" +msgid "Please provide a new name." +msgstr "" + +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/RenameDialog.qml:70 #: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Wizard.qml:241 msgctxt "@action:button" msgid "Cancel" msgstr "" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/RenameDialog.qml:60 +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/RenameDialog.qml:75 msgctxt "@action:button" msgid "OK" msgstr "" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/SettingVisibilityItem.qml:34 +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/SettingVisibilityItem.qml:32 msgctxt "@item:tooltip" msgid "" "This setting has been hidden by the active machine and will not be visible." msgstr "" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/SettingVisibilityItem.qml:51 +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/SettingVisibilityItem.qml:49 msgctxt "@item:tooltip %1 is list of setting names" msgid "" "This setting has been hidden by the value of %1. Change the value of that " @@ -593,21 +622,6 @@ msgstr[0] "" msgstr[1] "" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/SettingVisibilityPage.qml:12 -msgctxt "@title:tab" -msgid "Setting Visibility" -msgstr "" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/SettingVisibilityPage.qml:42 -msgctxt "@label:textbox" -msgid "Check all" -msgstr "" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/SettingVisibilityPage.qml:89 -msgctxt "@label:textbox" -msgid "Filter..." -msgstr "" - #: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/MachinesPage.qml:12 msgctxt "@title:tab" msgid "Printers" @@ -628,86 +642,6 @@ msgid "Are you sure you wish to remove %1? This cannot be undone!" msgstr "" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:14 -msgctxt "@title:tab" -msgid "Profiles" -msgstr "" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:15 -msgctxt "@label" -msgid "Duplicate" -msgstr "" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:45 -msgctxt "@label %1 is printer name" -msgid "Printer: %1" -msgstr "" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:83 -msgctxt "@action:button" -msgid "Update \"%1\"" -msgstr "" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:84 -msgctxt "@action:button" -msgid "Update profile" -msgstr "" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:92 -msgctxt "@action:button" -msgid "Discard current changes" -msgstr "" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:93 -msgctxt "@action:button" -msgid "Reload profile" -msgstr "" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:107 -msgctxt "@label" -msgid "Based on" -msgstr "" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:107 -msgctxt "@label" -msgid "Profile type" -msgstr "" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:112 -msgctxt "@label" -msgid "Protected profile" -msgstr "" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:112 -msgctxt "@label" -msgid "Custom profile" -msgstr "" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:139 -msgctxt "@action:button" -msgid "Import" -msgstr "" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:146 -msgctxt "@action:button" -msgid "Export" -msgstr "" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:184 -msgctxt "@window:title" -msgid "Import Profile" -msgstr "" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:192 -msgctxt "@title:window" -msgid "Import Profile" -msgstr "" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:219 -msgctxt "@title:window" -msgid "Export Profile" -msgstr "" - #: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Wizard.qml:215 msgctxt "@action:button" msgid "Back" diff -Nru uranium-3.3.0/resources/i18n/zh_CN/uranium.po uranium-4.4.1/resources/i18n/zh_CN/uranium.po --- uranium-3.3.0/resources/i18n/zh_CN/uranium.po 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/resources/i18n/zh_CN/uranium.po 2019-11-19 10:50:46.000000000 +0000 @@ -1,14 +1,14 @@ # Uranium -# Copyright (C) 2018 Ultimaker +# Copyright (C) 2019 Ultimaker B.V. # This file is distributed under the same license as the Uranium package. -# Ruben Dulek , 2018. +# Ruben Dulek , 2019. # msgid "" msgstr "" -"Project-Id-Version: Uranium 3.3\n" +"Project-Id-Version: Uranium 4.4\n" "Report-Msgid-Bugs-To: r.dulek@ultimaker.com\n" -"POT-Creation-Date: 2018-03-29 08:36+0200\n" -"PO-Revision-Date: 2018-04-11 15:55+0100\n" +"POT-Creation-Date: 2019-11-05 13:40+0100\n" +"PO-Revision-Date: 2019-09-23 13:27+0200\n" "Last-Translator: Bothof \n" "Language-Team: PCDotFan , Chinese \n" "Language: zh_CN\n" @@ -16,7 +16,7 @@ "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: Poedit 1.7.3\n" +"X-Generator: Poedit 2.2.1\n" "X-Poedit-SourceCharset: UTF-8\n" #: /home/ruben/Projects/Uranium/plugins/Views/SimpleView/__init__.py:12 @@ -35,6 +35,17 @@ msgid "Wavefront OBJ File" msgstr "Wavefront OBJ 文件" +#: /home/ruben/Projects/Uranium/plugins/FileHandlers/OBJWriter/OBJWriter.py:23 +msgctxt "@error:not supported" +msgid "OBJWriter does not support non-text mode." +msgstr "OBJWriter 不支持非文本模式。" + +#: /home/ruben/Projects/Uranium/plugins/FileHandlers/OBJWriter/OBJWriter.py:30 +#: /home/ruben/Projects/Uranium/plugins/FileHandlers/STLWriter/STLWriter.py:27 +msgctxt "@error:no mesh" +msgid "There is no mesh to write." +msgstr "没有要写入的网格。" + #: /home/ruben/Projects/Uranium/plugins/FileHandlers/STLWriter/__init__.py:17 msgctxt "@item:inlistbox" msgid "STL File (ASCII)" @@ -45,80 +56,101 @@ msgid "STL File (Binary)" msgstr "STL 文件 (二进制)" -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:42 +#: /home/ruben/Projects/Uranium/plugins/FileHandlers/STLWriter/STLWriter.py:36 +msgctxt "@error:not supported" +msgid "Unsupported output mode writing STL to stream." +msgstr "将 STL 写入流时的不支持的输出模式。" + +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:50 msgctxt "@info" msgid "Could not access update information." msgstr "无法获取更新信息。" -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:43 -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:60 -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:71 -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:89 -#: /home/ruben/Projects/Uranium/UM/VersionUpgradeManager.py:123 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:51 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:68 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:97 +#: /home/ruben/Projects/Uranium/UM/VersionUpgradeManager.py:155 msgctxt "@info:title" msgid "Version Upgrade" msgstr "版本升级" -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:55 -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:60 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:63 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:68 msgctxt "@info" msgid "The version you are using does not support checking for updates." msgstr "您正在使用的软件版本不支持检查更新。" -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:55 -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:178 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:63 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:188 msgctxt "@info:title" msgid "Warning" msgstr "警告" -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:71 -msgctxt "@info" -msgid "A new version is available!" -msgstr "有新版本可用!" - -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:72 -msgctxt "@action:button" -msgid "Download" -msgstr "下载" - -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:85 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:93 msgctxt "@info" msgid "An error occurred while checking for updates." msgstr "在检查更新时出现错误。" -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:85 -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:185 -#: /home/ruben/Projects/Uranium/UM/Qt/Bindings/OutputDeviceManagerProxy.py:128 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:93 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:195 +#: /home/ruben/Projects/Uranium/UM/Qt/Bindings/OutputDeviceManagerProxy.py:141 msgctxt "@info:title" msgid "Error" msgstr "错误" -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:89 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:97 msgctxt "@info" msgid "No new version was found." msgstr "软件版本已是最新。" +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:102 +#, python-brace-format +msgctxt "@info:status" +msgid "{application_name} {version_number} is available!" +msgstr "{application_name} {version_number} 可用!" + +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:104 +#, python-brace-format +msgctxt "@info:status" +msgid "{application_name} {version_number} provides a better and more reliable printing experience." +msgstr "{application_name} {version_number} 提供更好、更可靠的打印体验。" + +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:107 +msgctxt "@action:button" +msgid "Download" +msgstr "下载" + +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:109 +msgctxt "@action:button" +msgid "Learn more" +msgstr "详细了解" + #: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateChecker.py:26 msgctxt "@item:inmenu" +msgid "Update Checker" +msgstr "固件更新检查" + +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateChecker.py:27 +msgctxt "@item:inmenu" msgid "Check for Updates" msgstr "检查更新" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:33 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:30 msgctxt "@item:inmenu" msgid "Local File" msgstr "本地文件" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:34 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:31 msgctxt "@action:button Preceded by 'Ready to'." msgid "Save to File" msgstr "保存到文件" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:35 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:32 msgctxt "@info:tooltip" msgid "Save to File" msgstr "保存到文件" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:56 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:53 msgctxt "@title:window" msgid "Save to File" msgstr "保存到文件" @@ -126,65 +158,65 @@ #: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:86 msgctxt "@info:warning" msgid "There are no file types available to write with!" -msgstr "没有可进行写入的文件类型。" +msgstr "没有可进行写入的文件类型!" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:121 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:130 msgctxt "@title:window" msgid "File Already Exists" msgstr "文件已存在" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:121 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:130 #, python-brace-format msgctxt "@label Don't translate the XML tag !" msgid "The file {0} already exists. Are you sure you want to overwrite it?" -msgstr "文件 {0} 已存在。确定要覆盖吗?" +msgstr "文件 {0} 已存在。 您确定要覆盖它吗?" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:150 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:160 #, python-brace-format msgctxt "@info:progress Don't translate the XML tags !" msgid "Saving to {0}" msgstr "正在保存至 {0}" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:151 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:161 msgctxt "@info:title" msgid "Saving" msgstr "正在保存" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:159 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:169 #, python-brace-format msgctxt "@info:status Don't translate the XML tags !" msgid "Permission denied when trying to save {0}" msgstr "保存 {0} 时发生错误:权限不足" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:162 -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:178 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:172 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:188 #, python-brace-format msgctxt "@info:status Don't translate the XML tags or !" msgid "Could not save to {0}: {1}" -msgstr "无法保存到 {0}{1}" +msgstr "无法保存到 {0}{1}" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:172 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:182 #, python-brace-format msgctxt "@info:status Don't translate the XML tags !" msgid "Saved to {0}" msgstr "已保存至 {0}" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:172 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:182 msgctxt "@info:title" msgid "File Saved" msgstr "文件已保存" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:173 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:183 msgctxt "@action:button" msgid "Open Folder" msgstr "打开文件夹" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:173 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:183 msgctxt "@info:tooltip" msgid "Open the folder containing the file" msgstr "打开包含相应文件的文件夹" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:185 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:195 #, python-brace-format msgctxt "@info:status" msgid "Something went wrong saving to {0}: {1}" @@ -220,6 +252,16 @@ msgid "Rotate Model" msgstr "旋转模型" +#: /home/ruben/Projects/Uranium/plugins/Tools/RotateTool/RotateTool.py:279 +msgctxt "@label" +msgid "Laying object flat on buildplate..." +msgstr "正在打印平台上平放模型..." + +#: /home/ruben/Projects/Uranium/plugins/Tools/RotateTool/RotateTool.py:279 +msgctxt "@title" +msgid "Object Rotation" +msgstr "模型旋转" + #: /home/ruben/Projects/Uranium/plugins/Tools/MirrorTool/__init__.py:12 msgctxt "@label" msgid "Mirror" @@ -237,14 +279,19 @@ "Your configuration seems to be corrupt. Something seems to be wrong with the following profiles:\n" "- {profiles}\n" "Would you like to reset to factory defaults?" -msgstr "配置似乎已损坏。以下配置文件似乎出现问题:\n- {profiles}\n是否要恢复出厂默认设置?" +msgstr "" +"配置似乎已损坏。以下配置文件似乎出现问题:\n" +"- {profiles}\n" +"是否要恢复出厂默认设置?" #: /home/ruben/Projects/Uranium/UM/__init__.py:16 +#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:175 msgctxt "@info:status" msgid "Your configuration seems to be corrupt." msgstr "配置似乎已损坏。" #: /home/ruben/Projects/Uranium/UM/__init__.py:17 +#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:177 msgctxt "@info:title" msgid "Configuration errors" msgstr "配置错误" @@ -254,203 +301,242 @@ msgid "Reset your configuration to factory defaults." msgstr "将配置恢复到出厂默认设置。" -#: /home/ruben/Projects/Uranium/UM/Settings/Models/InstanceContainersModel.py:189 -#: /home/ruben/Projects/Uranium/UM/Qt/Bindings/MeshFileHandlerProxy.py:48 -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:655 -#: /home/ruben/Projects/Uranium/UM/FileHandler/FileHandler.py:70 +#: /home/ruben/Projects/Uranium/UM/Settings/Models/InstanceContainersModel.py:181 +#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:708 +#: /home/ruben/Projects/Uranium/UM/FileHandler/FileHandler.py:56 #, python-brace-format msgctxt "@item:inlistbox" msgid "All Supported Types ({0})" msgstr "所有支持的文件类型 ({0})" -#: /home/ruben/Projects/Uranium/UM/Settings/Models/InstanceContainersModel.py:192 -#: /home/ruben/Projects/Uranium/UM/Qt/Bindings/MeshFileHandlerProxy.py:49 -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:656 -#: /home/ruben/Projects/Uranium/UM/FileHandler/FileHandler.py:71 +#: /home/ruben/Projects/Uranium/UM/Settings/Models/InstanceContainersModel.py:184 +#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:709 +#: /home/ruben/Projects/Uranium/UM/FileHandler/FileHandler.py:57 msgctxt "@item:inlistbox" msgid "All Files (*)" msgstr "所有文件 (*)" -#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:108 +#: /home/ruben/Projects/Uranium/UM/PackageManager.py:233 +#, python-brace-format +msgctxt "@error:uninstall" +msgid "" +"There were some errors uninstalling the following packages:\n" +"{packages}" +msgstr "" +"卸载以下程序包时出现了一些错误:\n" +"{packages}" + +#: /home/ruben/Projects/Uranium/UM/PackageManager.py:235 +msgctxt "@info:title" +msgid "Uninstalling errors" +msgstr "卸载错误" + +#: /home/ruben/Projects/Uranium/UM/PackageManager.py:454 +#, python-brace-format +msgctxt "@error:update" +msgid "" +"There was an error uninstalling the package {package} before installing new version:\n" +"{error}.\n" +"Please try to upgrade again later." +msgstr "" +"在安装新版本之前卸载程序包 {package} 时出现了一个错误:\n" +"{error}。\n" +"请稍后再次尝试升级。" + +#: /home/ruben/Projects/Uranium/UM/PackageManager.py:457 +msgctxt "@info:title" +msgid "Updating error" +msgstr "正在更新错误" + +#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:112 #, python-brace-format msgctxt "@label Short days-hours-minutes format. {0} is days, {1} is hours, {2} is minutes" msgid "{0:0>2}d {1:0>2}h {2:0>2}min" msgstr "{0:0>2}天 {1:0>2}小时 {2:0>2}分钟" -#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:110 +#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:114 #, python-brace-format msgctxt "@label Short hours-minutes format. {0} is hours, {1} is minutes" msgid "{0:0>2}h {1:0>2}min" msgstr "{0:0>2}小时 {1:0>2}分钟" -#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:113 +#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:117 #, python-brace-format msgctxt "@label Long duration format. {0} is days" msgid "{0} day" msgid_plural "{0} days" msgstr[0] "{0} 天" -#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:113 -#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:115 +#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:117 +#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:119 #, python-brace-format msgctxt "@label Long duration format. {0} is hours" msgid "{0} hour" msgid_plural "{0} hours" msgstr[0] "{0} 小时" -#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:113 -#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:115 #: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:117 +#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:119 +#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:121 #, python-brace-format msgctxt "@label Long duration format. {0} is minutes" msgid "{0} minute" msgid_plural "{0} minutes" msgstr[0] "{0} 分钟" -#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:112 +#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:159 +msgctxt "@info:progress" +msgid "Initializing package manager..." +msgstr "正在初始化程序包管理器..." + +#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:180 msgctxt "@info:progress" msgid "Loading plugins..." msgstr "正在载入插件..." -#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:119 +#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:187 msgctxt "@info:progress" msgid "Updating configuration..." msgstr "正在更新配置..." -#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:136 +#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:205 msgctxt "@info:progress" msgid "Loading preferences..." msgstr "正在加载偏好设置..." -#: /home/ruben/Projects/Uranium/UM/Mesh/ReadMeshJob.py:65 +#: /home/ruben/Projects/Uranium/UM/Mesh/ReadMeshJob.py:68 #, python-format, python-brace-format msgctxt "@info:status" msgid "Auto scaled object to {0}% of original size" msgstr "自动缩放模型至原始大小的 {0}%" -#: /home/ruben/Projects/Uranium/UM/Mesh/ReadMeshJob.py:65 +#: /home/ruben/Projects/Uranium/UM/Mesh/ReadMeshJob.py:68 msgctxt "@info:title" msgid "Scaling Object" msgstr "缩放模型" -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:220 +#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:277 msgctxt "@info:status" msgid "" "The plugin has been installed.\n" "Please re-start the application to activate the plugin." -msgstr "插件已安装。\n请重新启动应用程序以激活插件。" - -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:231 -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:270 -#, python-brace-format -msgctxt "@info:status" -msgid "" -"Failed to install plugin from {0}:\n" -"{1}" -msgstr "无法从 {0} 中安装插件:\n{1}" - -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:254 -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:259 -#, python-brace-format -msgctxt "@info:status" -msgid "" -"Failed to install the plugin;\n" -"{0}" -msgstr "无法安装插件;\n{0}" +msgstr "" +"插件已安装。\n" +"请重新启动应用程序以激活插件。" -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:421 +#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:415 #, python-brace-format msgctxt "@info:status" msgid "" "The plugin has been removed.\n" "Please restart {0} to finish uninstall." -msgstr "插件已移除。\n请重启 {0} 完成卸载。" - -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:433 -#, python-brace-format -msgctxt "@info:status" -msgid "Failed to uninstall plugin. Plugin will be removed after {0} restarts." -msgstr "无法卸载插件。插件将在 {0} 重启后删除。" +msgstr "" +"插件已移除。\n" +"请重启 {0} 完成卸载。" -#: /home/ruben/Projects/Uranium/UM/VersionUpgradeManager.py:123 +#: /home/ruben/Projects/Uranium/UM/VersionUpgradeManager.py:155 #, python-brace-format msgctxt "@info:version-upgrade" msgid "A configuration from an older version of {0} was imported." msgstr "已导入旧版本 {0} 所使用的配置。" -#: /home/ruben/Projects/Uranium/UM/View/GL/OpenGL.py:50 +#: /home/ruben/Projects/Uranium/UM/View/GL/OpenGL.py:58 +#: /home/ruben/Projects/Uranium/UM/View/GL/OpenGL.py:63 msgctxt "@message" msgid "Failed to Initialize OpenGL" msgstr "无法初始化 OpenGL" -#: /home/ruben/Projects/Uranium/UM/View/GL/OpenGL.py:60 +#: /home/ruben/Projects/Uranium/UM/View/GL/OpenGL.py:73 msgctxt "Critical OpenGL Extensions Missing" msgid "Critical OpenGL extensions are missing. This program requires support for Framebuffer Objects. Please check your video card drivers." msgstr "关键 OpenGL 拓展文件缺失。该程序需要对 Framebuffer Objects 的支持。请检查您的显卡驱动是否正常。" -#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:153 +#: /home/ruben/Projects/Uranium/UM/ConfigurationErrorMessage.py:32 +#: /home/ruben/Projects/Uranium/plugins/Tools/ScaleTool/ScaleTool.qml:67 +#: /home/ruben/Projects/Uranium/plugins/Tools/RotateTool/RotateTool.qml:21 +msgctxt "@action:button" +msgid "Reset" +msgstr "重置" + +#: /home/ruben/Projects/Uranium/UM/ConfigurationErrorMessage.py:44 +#, python-brace-format +msgctxt "@info:status" +msgid "" +"Your configuration seems to be corrupt. Something seems to be wrong with the following profiles:\n" +"- {profiles}\n" +" Would you like to reset to factory defaults? Reset will remove all your current printers and profiles." +msgstr "" +"配置似乎已损坏。以下配置文件似乎出现问题:\n" +"- {profiles}\n" +" 是否要恢复出厂默认设置?重置将移除当前所有的打印机和配置文件。" + +#: /home/ruben/Projects/Uranium/UM/ConfigurationErrorMessage.py:49 +msgctxt "@title:window" +msgid "Reset to factory" +msgstr "恢复出厂设置" + +#: /home/ruben/Projects/Uranium/UM/ConfigurationErrorMessage.py:51 +msgctxt "@label" +msgid "Reset will remove all your current printers and profiles! Are you sure you want to reset?" +msgstr "重置将移除当前所有的打印机和配置文件!您确定要重置吗?" + +#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:162 #, python-brace-format msgctxt "@info" msgid "Would you like to reload {filename}?" msgstr "是否要重新加载 {filename}?" -#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:154 +#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:163 msgctxt "@info:title" msgid "File has been modified" msgstr "文件已修改" -#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:155 +#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:164 msgctxt "@action:button" msgid "Reload" msgstr "重新加载" -#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:155 +#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:164 msgctxt "@action:description" msgid "This will trigger the modified files to reload from disk." msgstr "这将触发修改后的文件从磁盘重新加载。" -#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:32 +#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:36 #, python-brace-format msgctxt "@info:status Don't translate the XML tag !" msgid "Cannot open files of the type of {0}" msgstr "无法打开文件类型 {0}" -#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:32 -#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:47 -#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:70 +#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:36 +#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:51 +#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:74 msgctxt "@info:title" msgid "Invalid File" msgstr "无效文件" -#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:45 -#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:70 +#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:49 +#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:74 #, python-brace-format msgctxt "@info:status Don't translate the XML tag !" msgid "Failed to load {0}" msgstr "无法加载 {0}" -#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:54 +#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:59 msgctxt "@info:title" msgid "Loading" msgstr "加载" -#: /home/ruben/Projects/Uranium/plugins/Tools/ScaleTool/ScaleTool.qml:60 -#: /home/ruben/Projects/Uranium/plugins/Tools/RotateTool/RotateTool.qml:21 -msgctxt "@action:button" -msgid "Reset" -msgstr "重置" - -#: /home/ruben/Projects/Uranium/plugins/Tools/ScaleTool/ScaleTool.qml:86 +#: /home/ruben/Projects/Uranium/plugins/Tools/ScaleTool/ScaleTool.qml:93 msgctxt "@option:check" msgid "Snap Scaling" msgstr "等距缩放(Snap Scaling)" -#: /home/ruben/Projects/Uranium/plugins/Tools/ScaleTool/ScaleTool.qml:104 +#: /home/ruben/Projects/Uranium/plugins/Tools/ScaleTool/ScaleTool.qml:121 msgctxt "@option:check" msgid "Uniform Scaling" msgstr "等比例缩放" -#: /home/ruben/Projects/Uranium/plugins/Tools/TranslateTool/TranslateTool.qml:177 +#: /home/ruben/Projects/Uranium/plugins/Tools/TranslateTool/TranslateTool.qml:196 msgctxt "@option:check" msgid "Lock Model" msgstr "锁定模型" @@ -460,89 +546,37 @@ msgid "Lay flat" msgstr "放平" -#: /home/ruben/Projects/Uranium/plugins/Tools/RotateTool/RotateTool.qml:55 +#: /home/ruben/Projects/Uranium/plugins/Tools/RotateTool/RotateTool.qml:60 +msgctxt "@action:button" +msgid "Select face to align to the build plate" +msgstr "选择要与构建板对齐的面" + +#: /home/ruben/Projects/Uranium/plugins/Tools/RotateTool/RotateTool.qml:81 msgctxt "@action:checkbox" msgid "Snap Rotation" msgstr "等距旋转(Snap Rotation)" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:19 -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:148 -msgctxt "@title:tab" -msgid "Plugins" -msgstr "插件" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:28 -msgctxt "@action:button" -msgid "Install new plugin" -msgstr "安装新插件" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:51 -msgctxt "@label" -msgid "You will need to restart the application before changes in plugins have effect." -msgstr "在插件发生变化之前,您需要重新启动应用程序。" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:87 -msgctxt "@label" -msgid "This plugin is required for the application to run." -msgstr "该插件为程序运行必备插件。" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:104 -msgctxt "@label" -msgid "Info..." -msgstr "信息..." - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:122 -msgctxt "@window:title" -msgid "Install Plugin" -msgstr "安装插件" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:131 -msgctxt "@title:window" -msgid "Open file(s)" -msgstr "打开文件" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:165 -msgctxt "@label" -msgid "No text available" -msgstr "没有文本可用" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:171 -msgctxt "@title:window" -msgid "About %1" -msgstr "关于 %1" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:203 -msgctxt "@label" -msgid "Author:" -msgstr "作者:" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:225 -msgctxt "@label" -msgid "Version:" -msgstr "版本:" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:243 -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:113 -msgctxt "@action:button" -msgid "Close" -msgstr "关闭" - #: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:18 msgctxt "@title:window" msgid "Preferences" msgstr "偏好设置" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:106 +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:107 msgctxt "@action:button" msgid "Defaults" msgstr "默认" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:146 +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:115 +msgctxt "@action:button" +msgid "Close" +msgstr "关闭" + +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:148 msgctxt "@title:tab" msgid "General" msgstr "基本" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:147 +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:149 msgctxt "@title:tab" msgid "Settings" msgstr "设置" @@ -552,43 +586,33 @@ msgid "Rename" msgstr "重命名" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/RenameDialog.qml:56 +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/RenameDialog.qml:20 +msgctxt "@info" +msgid "Please provide a new name." +msgstr "请提供新名称。" + +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/RenameDialog.qml:70 #: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Wizard.qml:241 msgctxt "@action:button" msgid "Cancel" msgstr "取消" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/RenameDialog.qml:60 +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/RenameDialog.qml:75 msgctxt "@action:button" msgid "OK" msgstr "确定" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/SettingVisibilityItem.qml:34 +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/SettingVisibilityItem.qml:32 msgctxt "@item:tooltip" msgid "This setting has been hidden by the active machine and will not be visible." msgstr "该设置已被当前机器所隐藏并不可见。" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/SettingVisibilityItem.qml:51 +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/SettingVisibilityItem.qml:49 msgctxt "@item:tooltip %1 is list of setting names" msgid "This setting has been hidden by the value of %1. Change the value of that setting to make this setting visible." msgid_plural "This setting has been hidden by the values of %1. Change the values of those settings to make this setting visible." msgstr[0] "该设置已被 %1 的值所隐藏,若需显示,更改此值可使设置项重新可见。" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/SettingVisibilityPage.qml:12 -msgctxt "@title:tab" -msgid "Setting Visibility" -msgstr "设置可见性" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/SettingVisibilityPage.qml:42 -msgctxt "@label:textbox" -msgid "Check all" -msgstr "全部勾选" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/SettingVisibilityPage.qml:89 -msgctxt "@label:textbox" -msgid "Filter..." -msgstr "筛选…" - #: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/MachinesPage.qml:12 msgctxt "@title:tab" msgid "Printers" @@ -609,86 +633,6 @@ msgid "Are you sure you wish to remove %1? This cannot be undone!" msgstr "您确认要删除 %1?该操作无法恢复!" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:14 -msgctxt "@title:tab" -msgid "Profiles" -msgstr "配置文件" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:15 -msgctxt "@label" -msgid "Duplicate" -msgstr "复制" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:45 -msgctxt "@label %1 is printer name" -msgid "Printer: %1" -msgstr "打印机:%1" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:83 -msgctxt "@action:button" -msgid "Update \"%1\"" -msgstr "升级 \"%1\"" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:84 -msgctxt "@action:button" -msgid "Update profile" -msgstr "升级配置文件" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:92 -msgctxt "@action:button" -msgid "Discard current changes" -msgstr "舍弃当前更改" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:93 -msgctxt "@action:button" -msgid "Reload profile" -msgstr "重新载入配置文件" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:107 -msgctxt "@label" -msgid "Based on" -msgstr "基于" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:107 -msgctxt "@label" -msgid "Profile type" -msgstr "配置文件类型" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:112 -msgctxt "@label" -msgid "Protected profile" -msgstr "受保护的配置文件" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:112 -msgctxt "@label" -msgid "Custom profile" -msgstr "自定义配置文件" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:139 -msgctxt "@action:button" -msgid "Import" -msgstr "导入" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:146 -msgctxt "@action:button" -msgid "Export" -msgstr "导出" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:184 -msgctxt "@window:title" -msgid "Import Profile" -msgstr "导入配置文件" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:192 -msgctxt "@title:window" -msgid "Import Profile" -msgstr "导入配置文件" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:219 -msgctxt "@title:window" -msgid "Export Profile" -msgstr "导出配置文件" - #: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Wizard.qml:215 msgctxt "@action:button" msgid "Back" @@ -904,6 +848,186 @@ msgid "Mirror Tool" msgstr "镜像工具" +#~ msgctxt "@title:tab" +#~ msgid "Plugins" +#~ msgstr "插件" + +#~ msgctxt "@action:button" +#~ msgid "Install new plugin" +#~ msgstr "安装新插件" + +#~ msgctxt "@label" +#~ msgid "You will need to restart the application before changes in plugins have effect." +#~ msgstr "在插件发生变化之前,您需要重新启动应用程序。" + +#~ msgctxt "@label" +#~ msgid "This plugin is required for the application to run." +#~ msgstr "该插件为程序运行必备插件。" + +#~ msgctxt "@label" +#~ msgid "Info..." +#~ msgstr "信息..." + +#~ msgctxt "@window:title" +#~ msgid "Install Plugin" +#~ msgstr "安装插件" + +#~ msgctxt "@title:window" +#~ msgid "Open file(s)" +#~ msgstr "打开文件" + +#~ msgctxt "@label" +#~ msgid "No text available" +#~ msgstr "没有文本可用" + +#~ msgctxt "@title:window" +#~ msgid "About %1" +#~ msgstr "关于 %1" + +#~ msgctxt "@label" +#~ msgid "Author:" +#~ msgstr "作者:" + +#~ msgctxt "@label" +#~ msgid "Version:" +#~ msgstr "版本:" + +#~ msgctxt "@action:button" +#~ msgid "Learn more about the new features" +#~ msgstr "进一步了解新功能" + +#~ msgctxt "@info:status" +#~ msgid "Cura {0} is available!" +#~ msgstr "Cura {0} 可用!" + +#~ msgctxt "@info:status" +#~ msgid "Cura {0} provides better and reliable printing experience." +#~ msgstr "Cura {0} 提供更好、更可靠的打印体验。" + +#~ msgctxt "@action:button" +#~ msgid "Learn more about new features" +#~ msgstr "了解更多新的特点" + +#~ msgctxt "@error:update" +#~ msgid "" +#~ "There was an error uninstalling the package {package} before installingnew version:\n" +#~ "{error}.\n" +#~ "Please try to upgrade again later." +#~ msgstr "" +#~ "在安装新版本之前卸载程序包 {package} 时出现了一个错误:\n" +#~ "{error}。\n" +#~ "请稍后再次尝试升级。" + +#~ msgctxt "@info:status" +#~ msgid "" +#~ "Your configuration seems to be corrupt. Something seems to be wrong with the following profiles:\n" +#~ "- {profiles}\n" +#~ "Would you like to reset to factory defaults? Reset will remove all your current printers and profiles." +#~ msgstr "" +#~ "配置似乎已损坏。以下配置文件似乎出现问题:\n" +#~ "- {profiles}\n" +#~ "是否要恢复出厂默认设置?重置将移除所有当前的打印机和配置文件。" + +#~ msgctxt "@info" +#~ msgid "A new version is available!" +#~ msgstr "有新版本可用!" + +#~ msgctxt "@info:status" +#~ msgid "" +#~ "Failed to install plugin from {0}:\n" +#~ "{1}" +#~ msgstr "" +#~ "无法从 {0} 中安装插件:\n" +#~ "{1}" + +#~ msgctxt "@info:status" +#~ msgid "" +#~ "Failed to install the plugin;\n" +#~ "{0}" +#~ msgstr "" +#~ "无法安装插件;\n" +#~ "{0}" + +#~ msgctxt "@info:status" +#~ msgid "Failed to uninstall plugin. Plugin will be removed after {0} restarts." +#~ msgstr "无法卸载插件。插件将在 {0} 重启后删除。" + +#~ msgctxt "@title:tab" +#~ msgid "Setting Visibility" +#~ msgstr "设置可见性" + +#~ msgctxt "@label:textbox" +#~ msgid "Check all" +#~ msgstr "全部勾选" + +#~ msgctxt "@label:textbox" +#~ msgid "Filter..." +#~ msgstr "筛选…" + +#~ msgctxt "@title:tab" +#~ msgid "Profiles" +#~ msgstr "配置文件" + +#~ msgctxt "@label" +#~ msgid "Duplicate" +#~ msgstr "复制" + +#~ msgctxt "@label %1 is printer name" +#~ msgid "Printer: %1" +#~ msgstr "打印机:%1" + +#~ msgctxt "@action:button" +#~ msgid "Update \"%1\"" +#~ msgstr "升级 \"%1\"" + +#~ msgctxt "@action:button" +#~ msgid "Update profile" +#~ msgstr "升级配置文件" + +#~ msgctxt "@action:button" +#~ msgid "Discard current changes" +#~ msgstr "舍弃当前更改" + +#~ msgctxt "@action:button" +#~ msgid "Reload profile" +#~ msgstr "重新载入配置文件" + +#~ msgctxt "@label" +#~ msgid "Based on" +#~ msgstr "基于" + +#~ msgctxt "@label" +#~ msgid "Profile type" +#~ msgstr "配置文件类型" + +#~ msgctxt "@label" +#~ msgid "Protected profile" +#~ msgstr "受保护的配置文件" + +#~ msgctxt "@label" +#~ msgid "Custom profile" +#~ msgstr "自定义配置文件" + +#~ msgctxt "@action:button" +#~ msgid "Import" +#~ msgstr "导入" + +#~ msgctxt "@action:button" +#~ msgid "Export" +#~ msgstr "导出" + +#~ msgctxt "@window:title" +#~ msgid "Import Profile" +#~ msgstr "导入配置文件" + +#~ msgctxt "@title:window" +#~ msgid "Import Profile" +#~ msgstr "导入配置文件" + +#~ msgctxt "@title:window" +#~ msgid "Export Profile" +#~ msgstr "导出配置文件" + #~ msgctxt "@info" #~ msgid "An exception occurred while checking for updates." #~ msgstr "在检查更新时出现异常情况。" diff -Nru uranium-3.3.0/resources/i18n/zh_TW/uranium.po uranium-4.4.1/resources/i18n/zh_TW/uranium.po --- uranium-3.3.0/resources/i18n/zh_TW/uranium.po 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/resources/i18n/zh_TW/uranium.po 2019-11-19 10:50:46.000000000 +0000 @@ -1,14 +1,14 @@ # Uranium -# Copyright (C) 2018 Ultimaker +# Copyright (C) 2019 Ultimaker B.V. # This file is distributed under the same license as the Uranium package. -# Ruben Dulek , 2018. +# Ruben Dulek , 2019. # msgid "" msgstr "" -"Project-Id-Version: Uranium 3.2\n" +"Project-Id-Version: Uranium 4.4\n" "Report-Msgid-Bugs-To: r.dulek@ultimaker.com\n" -"POT-Creation-Date: 2018-03-29 08:36+0200\n" -"PO-Revision-Date: 2018-03-31 12:53+0800\n" +"POT-Creation-Date: 2019-11-05 13:40+0100\n" +"PO-Revision-Date: 2019-11-09 21:13+0800\n" "Last-Translator: Zhang Heh Ji \n" "Language-Team: Zhang Heh Ji \n" "Language: zh_TW\n" @@ -18,7 +18,7 @@ "Lang-Code: xx\n" "Country-Code: XX\n" "Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: Poedit 2.0.6\n" +"X-Generator: Poedit 2.2.3\n" #: /home/ruben/Projects/Uranium/plugins/Views/SimpleView/__init__.py:12 msgctxt "@item:inmenu" @@ -36,6 +36,17 @@ msgid "Wavefront OBJ File" msgstr "Wavefront OBJ 檔案" +#: /home/ruben/Projects/Uranium/plugins/FileHandlers/OBJWriter/OBJWriter.py:23 +msgctxt "@error:not supported" +msgid "OBJWriter does not support non-text mode." +msgstr "OBJ 寫入器不支援非文字模式。" + +#: /home/ruben/Projects/Uranium/plugins/FileHandlers/OBJWriter/OBJWriter.py:30 +#: /home/ruben/Projects/Uranium/plugins/FileHandlers/STLWriter/STLWriter.py:27 +msgctxt "@error:no mesh" +msgid "There is no mesh to write." +msgstr "沒有網格可寫入。" + #: /home/ruben/Projects/Uranium/plugins/FileHandlers/STLWriter/__init__.py:17 msgctxt "@item:inlistbox" msgid "STL File (ASCII)" @@ -46,80 +57,101 @@ msgid "STL File (Binary)" msgstr "STL 檔案 (二進位)" -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:42 +#: /home/ruben/Projects/Uranium/plugins/FileHandlers/STLWriter/STLWriter.py:36 +msgctxt "@error:not supported" +msgid "Unsupported output mode writing STL to stream." +msgstr "不支援的輸出模式將 STL 寫入串流。" + +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:50 msgctxt "@info" msgid "Could not access update information." msgstr "無法獲取更新資訊。" -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:43 -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:60 -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:71 -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:89 -#: /home/ruben/Projects/Uranium/UM/VersionUpgradeManager.py:123 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:51 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:68 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:97 +#: /home/ruben/Projects/Uranium/UM/VersionUpgradeManager.py:155 msgctxt "@info:title" msgid "Version Upgrade" msgstr "版本升級" -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:55 -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:60 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:63 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:68 msgctxt "@info" msgid "The version you are using does not support checking for updates." msgstr "你正在使用的軟體版本不支援檢查更新。" -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:55 -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:178 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:63 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:188 msgctxt "@info:title" msgid "Warning" msgstr "警告" -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:71 -msgctxt "@info" -msgid "A new version is available!" -msgstr "有新版本可用!" - -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:72 -msgctxt "@action:button" -msgid "Download" -msgstr "下載" - -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:85 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:93 msgctxt "@info" msgid "An error occurred while checking for updates." msgstr "檢查更新時發生錯誤。" -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:85 -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:185 -#: /home/ruben/Projects/Uranium/UM/Qt/Bindings/OutputDeviceManagerProxy.py:128 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:93 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:195 +#: /home/ruben/Projects/Uranium/UM/Qt/Bindings/OutputDeviceManagerProxy.py:141 msgctxt "@info:title" msgid "Error" msgstr "錯誤" -#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:89 +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:97 msgctxt "@info" msgid "No new version was found." msgstr "軟體版本已是最新。" +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:102 +#, python-brace-format +msgctxt "@info:status" +msgid "{application_name} {version_number} is available!" +msgstr "{application_name} {version_number} 已可下載!" + +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:104 +#, python-brace-format +msgctxt "@info:status" +msgid "{application_name} {version_number} provides a better and more reliable printing experience." +msgstr "{application_name} {version_number} 提供更好、更可靠的列印體驗。" + +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:107 +msgctxt "@action:button" +msgid "Download" +msgstr "下載" + +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateCheckerJob.py:109 +msgctxt "@action:button" +msgid "Learn more" +msgstr "瞭解更多" + #: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateChecker.py:26 msgctxt "@item:inmenu" +msgid "Update Checker" +msgstr "韌體更新檢查" + +#: /home/ruben/Projects/Uranium/plugins/UpdateChecker/UpdateChecker.py:27 +msgctxt "@item:inmenu" msgid "Check for Updates" msgstr "檢查更新" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:33 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:30 msgctxt "@item:inmenu" msgid "Local File" msgstr "本機檔案" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:34 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:31 msgctxt "@action:button Preceded by 'Ready to'." msgid "Save to File" msgstr "儲存檔案" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:35 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:32 msgctxt "@info:tooltip" msgid "Save to File" msgstr "儲存檔案" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:56 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:53 msgctxt "@title:window" msgid "Save to File" msgstr "儲存檔案" @@ -129,63 +161,63 @@ msgid "There are no file types available to write with!" msgstr "無可寫入的檔案類型!" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:121 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:130 msgctxt "@title:window" msgid "File Already Exists" msgstr "檔案已經存在" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:121 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:130 #, python-brace-format msgctxt "@label Don't translate the XML tag !" msgid "The file {0} already exists. Are you sure you want to overwrite it?" msgstr "檔案 {0} 已經存在。你確定要覆蓋檔案嗎?" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:150 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:160 #, python-brace-format msgctxt "@info:progress Don't translate the XML tags !" msgid "Saving to {0}" msgstr "正在儲存至 {0}" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:151 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:161 msgctxt "@info:title" msgid "Saving" msgstr "儲存中" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:159 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:169 #, python-brace-format msgctxt "@info:status Don't translate the XML tags !" msgid "Permission denied when trying to save {0}" msgstr "儲存 {0} 時發生錯誤:權限不足" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:162 -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:178 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:172 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:188 #, python-brace-format msgctxt "@info:status Don't translate the XML tags or !" msgid "Could not save to {0}: {1}" msgstr "無法儲存到 {0}{1}" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:172 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:182 #, python-brace-format msgctxt "@info:status Don't translate the XML tags !" msgid "Saved to {0}" msgstr "已儲存至 {0}" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:172 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:182 msgctxt "@info:title" msgid "File Saved" msgstr "檔案已儲存" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:173 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:183 msgctxt "@action:button" msgid "Open Folder" msgstr "開啟資料夾" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:173 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:183 msgctxt "@info:tooltip" msgid "Open the folder containing the file" msgstr "開啟包含這個檔案的資料夾" -#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:185 +#: /home/ruben/Projects/Uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py:195 #, python-brace-format msgctxt "@info:status" msgid "Something went wrong saving to {0}: {1}" @@ -221,6 +253,16 @@ msgid "Rotate Model" msgstr "旋轉模型" +#: /home/ruben/Projects/Uranium/plugins/Tools/RotateTool/RotateTool.py:279 +msgctxt "@label" +msgid "Laying object flat on buildplate..." +msgstr "將物件平放在列印平台上..." + +#: /home/ruben/Projects/Uranium/plugins/Tools/RotateTool/RotateTool.py:279 +msgctxt "@title" +msgid "Object Rotation" +msgstr "物件旋轉" + #: /home/ruben/Projects/Uranium/plugins/Tools/MirrorTool/__init__.py:12 msgctxt "@label" msgid "Mirror" @@ -244,11 +286,13 @@ "要重置為出廠預設值嗎?" #: /home/ruben/Projects/Uranium/UM/__init__.py:16 +#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:175 msgctxt "@info:status" msgid "Your configuration seems to be corrupt." msgstr "你的設定已經損壞。" #: /home/ruben/Projects/Uranium/UM/__init__.py:17 +#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:177 msgctxt "@info:title" msgid "Configuration errors" msgstr "設定錯誤" @@ -258,86 +302,121 @@ msgid "Reset your configuration to factory defaults." msgstr "將你的設定重置為出廠預設值。" -#: /home/ruben/Projects/Uranium/UM/Settings/Models/InstanceContainersModel.py:189 -#: /home/ruben/Projects/Uranium/UM/Qt/Bindings/MeshFileHandlerProxy.py:48 -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:655 -#: /home/ruben/Projects/Uranium/UM/FileHandler/FileHandler.py:70 +#: /home/ruben/Projects/Uranium/UM/Settings/Models/InstanceContainersModel.py:181 +#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:708 +#: /home/ruben/Projects/Uranium/UM/FileHandler/FileHandler.py:56 #, python-brace-format msgctxt "@item:inlistbox" msgid "All Supported Types ({0})" msgstr "所有支援的檔案類型 ({0})" -#: /home/ruben/Projects/Uranium/UM/Settings/Models/InstanceContainersModel.py:192 -#: /home/ruben/Projects/Uranium/UM/Qt/Bindings/MeshFileHandlerProxy.py:49 -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:656 -#: /home/ruben/Projects/Uranium/UM/FileHandler/FileHandler.py:71 +#: /home/ruben/Projects/Uranium/UM/Settings/Models/InstanceContainersModel.py:184 +#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:709 +#: /home/ruben/Projects/Uranium/UM/FileHandler/FileHandler.py:57 msgctxt "@item:inlistbox" msgid "All Files (*)" msgstr "所有檔案 (*)" -#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:108 +#: /home/ruben/Projects/Uranium/UM/PackageManager.py:233 +#, python-brace-format +msgctxt "@error:uninstall" +msgid "" +"There were some errors uninstalling the following packages:\n" +"{packages}" +msgstr "" +"移除下列套件時發生錯誤:\n" +"{packages}" + +#: /home/ruben/Projects/Uranium/UM/PackageManager.py:235 +msgctxt "@info:title" +msgid "Uninstalling errors" +msgstr "移除錯誤" + +#: /home/ruben/Projects/Uranium/UM/PackageManager.py:454 +#, python-brace-format +msgctxt "@error:update" +msgid "" +"There was an error uninstalling the package {package} before installing new version:\n" +"{error}.\n" +"Please try to upgrade again later." +msgstr "" +"在安裝新版本前,移除套件 {package} 發生了錯誤:\n" +"{error}。\n" +"請稍後再嘗試升級。" + +#: /home/ruben/Projects/Uranium/UM/PackageManager.py:457 +msgctxt "@info:title" +msgid "Updating error" +msgstr "升級錯誤" + +#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:112 #, python-brace-format msgctxt "@label Short days-hours-minutes format. {0} is days, {1} is hours, {2} is minutes" msgid "{0:0>2}d {1:0>2}h {2:0>2}min" msgstr "{0:0>2}天 {1:0>2}時 {2:0>2}分" -#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:110 +#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:114 #, python-brace-format msgctxt "@label Short hours-minutes format. {0} is hours, {1} is minutes" msgid "{0:0>2}h {1:0>2}min" msgstr "{0:0>2}時 {1:0>2}分" -#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:113 +#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:117 #, python-brace-format msgctxt "@label Long duration format. {0} is days" msgid "{0} day" msgid_plural "{0} days" msgstr[0] "{0} 天" -#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:113 -#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:115 +#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:117 +#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:119 #, python-brace-format msgctxt "@label Long duration format. {0} is hours" msgid "{0} hour" msgid_plural "{0} hours" msgstr[0] "{0} 時" -#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:113 -#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:115 #: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:117 +#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:119 +#: /home/ruben/Projects/Uranium/UM/Qt/Duration.py:121 #, python-brace-format msgctxt "@label Long duration format. {0} is minutes" msgid "{0} minute" msgid_plural "{0} minutes" msgstr[0] "{0} 分" -#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:112 +#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:159 +msgctxt "@info:progress" +msgid "Initializing package manager..." +msgstr "初始化套件管理員..." + +#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:180 msgctxt "@info:progress" msgid "Loading plugins..." msgstr "正在載入外掛..." -#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:119 +#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:187 msgctxt "@info:progress" msgid "Updating configuration..." msgstr "正在更新設定..." -#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:136 +#: /home/ruben/Projects/Uranium/UM/Qt/QtApplication.py:205 msgctxt "@info:progress" msgid "Loading preferences..." msgstr "正在載入偏好設定..." -#: /home/ruben/Projects/Uranium/UM/Mesh/ReadMeshJob.py:65 +#: /home/ruben/Projects/Uranium/UM/Mesh/ReadMeshJob.py:68 #, python-format, python-brace-format msgctxt "@info:status" msgid "Auto scaled object to {0}% of original size" msgstr "自動將物件縮放到原始大小的 {0}%" -#: /home/ruben/Projects/Uranium/UM/Mesh/ReadMeshJob.py:65 +#: /home/ruben/Projects/Uranium/UM/Mesh/ReadMeshJob.py:68 msgctxt "@info:title" msgid "Scaling Object" msgstr "縮放物件" -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:220 +#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:277 msgctxt "@info:status" msgid "" "The plugin has been installed.\n" @@ -346,29 +425,7 @@ "外掛已安裝。\n" "請重新啟動應用程式以啟動外掛。" -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:231 -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:270 -#, python-brace-format -msgctxt "@info:status" -msgid "" -"Failed to install plugin from {0}:\n" -"{1}" -msgstr "" -"無法從 {0} 中安裝外掛:\n" -"{1}" - -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:254 -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:259 -#, python-brace-format -msgctxt "@info:status" -msgid "" -"Failed to install the plugin;\n" -"{0}" -msgstr "" -"無法安裝外掛;\n" -"{0}" - -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:421 +#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:415 #, python-brace-format msgctxt "@info:status" msgid "" @@ -378,91 +435,109 @@ "外掛程式已移除。\n" "請重新啟動 {0} 以完成解除安裝。" -#: /home/ruben/Projects/Uranium/UM/PluginRegistry.py:433 -#, python-brace-format -msgctxt "@info:status" -msgid "Failed to uninstall plugin. Plugin will be removed after {0} restarts." -msgstr "外掛程式解除安裝失敗。外掛程式將會在 {0} 重新啟動後移除。" - -#: /home/ruben/Projects/Uranium/UM/VersionUpgradeManager.py:123 +#: /home/ruben/Projects/Uranium/UM/VersionUpgradeManager.py:155 #, python-brace-format msgctxt "@info:version-upgrade" msgid "A configuration from an older version of {0} was imported." msgstr "已匯入舊版本 {0} 所使用的設定。" -#: /home/ruben/Projects/Uranium/UM/View/GL/OpenGL.py:50 +#: /home/ruben/Projects/Uranium/UM/View/GL/OpenGL.py:58 +#: /home/ruben/Projects/Uranium/UM/View/GL/OpenGL.py:63 msgctxt "@message" msgid "Failed to Initialize OpenGL" msgstr "無法初始化 OpenGL" -#: /home/ruben/Projects/Uranium/UM/View/GL/OpenGL.py:60 +#: /home/ruben/Projects/Uranium/UM/View/GL/OpenGL.py:73 msgctxt "Critical OpenGL Extensions Missing" msgid "Critical OpenGL extensions are missing. This program requires support for Framebuffer Objects. Please check your video card drivers." msgstr "關鍵的 OpenGL 擴充功能遺失。此程式需要 Framebuffer 物件支援,請檢查您的顯示卡驅動程式是否正常。" -#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:153 +#: /home/ruben/Projects/Uranium/UM/ConfigurationErrorMessage.py:32 +#: /home/ruben/Projects/Uranium/plugins/Tools/ScaleTool/ScaleTool.qml:67 +#: /home/ruben/Projects/Uranium/plugins/Tools/RotateTool/RotateTool.qml:21 +msgctxt "@action:button" +msgid "Reset" +msgstr "重置" + +#: /home/ruben/Projects/Uranium/UM/ConfigurationErrorMessage.py:44 +#, python-brace-format +msgctxt "@info:status" +msgid "" +"Your configuration seems to be corrupt. Something seems to be wrong with the following profiles:\n" +"- {profiles}\n" +" Would you like to reset to factory defaults? Reset will remove all your current printers and profiles." +msgstr "" +"你的設定似乎已損毀。下列的參數中似乎有些問題:\n" +"- {profiles}\n" +"你是否願意重置為出廠預設值?重置將移除你目前所有的印表機和列印參數。" + +#: /home/ruben/Projects/Uranium/UM/ConfigurationErrorMessage.py:49 +msgctxt "@title:window" +msgid "Reset to factory" +msgstr "重置為出廠狀態" + +#: /home/ruben/Projects/Uranium/UM/ConfigurationErrorMessage.py:51 +msgctxt "@label" +msgid "Reset will remove all your current printers and profiles! Are you sure you want to reset?" +msgstr "重置將移除你目前所有的印表機和列印參數!你確定要重置嗎?" + +#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:162 #, python-brace-format msgctxt "@info" msgid "Would you like to reload {filename}?" msgstr "你要重新載入 {filename} 嗎?" -#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:154 +#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:163 msgctxt "@info:title" msgid "File has been modified" msgstr "檔案已被修改" -#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:155 +#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:164 msgctxt "@action:button" msgid "Reload" msgstr "重新載入" -#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:155 +#: /home/ruben/Projects/Uranium/UM/Scene/Scene.py:164 msgctxt "@action:description" msgid "This will trigger the modified files to reload from disk." msgstr "將修改過的檔案從碟機內重新載入。" -#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:32 +#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:36 #, python-brace-format msgctxt "@info:status Don't translate the XML tag !" msgid "Cannot open files of the type of {0}" msgstr "無法開啟的檔案類型 {0}" -#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:32 -#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:47 -#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:70 +#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:36 +#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:51 +#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:74 msgctxt "@info:title" msgid "Invalid File" msgstr "無效的檔案" -#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:45 -#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:70 +#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:49 +#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:74 #, python-brace-format msgctxt "@info:status Don't translate the XML tag !" msgid "Failed to load {0}" msgstr "無法載入 {0}" -#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:54 +#: /home/ruben/Projects/Uranium/UM/FileHandler/ReadFileJob.py:59 msgctxt "@info:title" msgid "Loading" msgstr "載入中" -#: /home/ruben/Projects/Uranium/plugins/Tools/ScaleTool/ScaleTool.qml:60 -#: /home/ruben/Projects/Uranium/plugins/Tools/RotateTool/RotateTool.qml:21 -msgctxt "@action:button" -msgid "Reset" -msgstr "重置" - -#: /home/ruben/Projects/Uranium/plugins/Tools/ScaleTool/ScaleTool.qml:86 +#: /home/ruben/Projects/Uranium/plugins/Tools/ScaleTool/ScaleTool.qml:93 msgctxt "@option:check" msgid "Snap Scaling" msgstr "等距縮放(Snap Scaling)" -#: /home/ruben/Projects/Uranium/plugins/Tools/ScaleTool/ScaleTool.qml:104 +#: /home/ruben/Projects/Uranium/plugins/Tools/ScaleTool/ScaleTool.qml:121 msgctxt "@option:check" msgid "Uniform Scaling" msgstr "等比例縮放" -#: /home/ruben/Projects/Uranium/plugins/Tools/TranslateTool/TranslateTool.qml:177 +#: /home/ruben/Projects/Uranium/plugins/Tools/TranslateTool/TranslateTool.qml:196 msgctxt "@option:check" msgid "Lock Model" msgstr "鎖定模型" @@ -472,89 +547,37 @@ msgid "Lay flat" msgstr "平放" -#: /home/ruben/Projects/Uranium/plugins/Tools/RotateTool/RotateTool.qml:55 +#: /home/ruben/Projects/Uranium/plugins/Tools/RotateTool/RotateTool.qml:60 +msgctxt "@action:button" +msgid "Select face to align to the build plate" +msgstr "選擇要與列印平台對齊的面" + +#: /home/ruben/Projects/Uranium/plugins/Tools/RotateTool/RotateTool.qml:81 msgctxt "@action:checkbox" msgid "Snap Rotation" msgstr "等距旋轉(Snap Rotation)" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:19 -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:148 -msgctxt "@title:tab" -msgid "Plugins" -msgstr "外掛" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:28 -msgctxt "@action:button" -msgid "Install new plugin" -msgstr "安裝新外掛" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:51 -msgctxt "@label" -msgid "You will need to restart the application before changes in plugins have effect." -msgstr "你需要重新啟動應用程式讓外掛生效。" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:87 -msgctxt "@label" -msgid "This plugin is required for the application to run." -msgstr "該外掛為程式運行必備外掛。" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:104 -msgctxt "@label" -msgid "Info..." -msgstr "信息..." - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:122 -msgctxt "@window:title" -msgid "Install Plugin" -msgstr "安裝外掛" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:131 -msgctxt "@title:window" -msgid "Open file(s)" -msgstr "開啟檔案" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:165 -msgctxt "@label" -msgid "No text available" -msgstr "沒有文件可用" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:171 -msgctxt "@title:window" -msgid "About %1" -msgstr "關於 %1" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:203 -msgctxt "@label" -msgid "Author:" -msgstr "作者:" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:225 -msgctxt "@label" -msgid "Version:" -msgstr "版本:" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PluginsPage.qml:243 -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:113 -msgctxt "@action:button" -msgid "Close" -msgstr "關閉" - #: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:18 msgctxt "@title:window" msgid "Preferences" msgstr "偏好設定" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:106 +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:107 msgctxt "@action:button" msgid "Defaults" msgstr "預設" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:146 +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:115 +msgctxt "@action:button" +msgid "Close" +msgstr "關閉" + +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:148 msgctxt "@title:tab" msgid "General" msgstr "一般" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:147 +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml:149 msgctxt "@title:tab" msgid "Settings" msgstr "設定" @@ -564,43 +587,33 @@ msgid "Rename" msgstr "重新命名" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/RenameDialog.qml:56 +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/RenameDialog.qml:20 +msgctxt "@info" +msgid "Please provide a new name." +msgstr "請提供一個新名字。" + +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/RenameDialog.qml:70 #: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Wizard.qml:241 msgctxt "@action:button" msgid "Cancel" msgstr "取消" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/RenameDialog.qml:60 +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/RenameDialog.qml:75 msgctxt "@action:button" msgid "OK" msgstr "確定" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/SettingVisibilityItem.qml:34 +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/SettingVisibilityItem.qml:32 msgctxt "@item:tooltip" msgid "This setting has been hidden by the active machine and will not be visible." msgstr "該設定已被當前機器所隱藏並不可見。" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/SettingVisibilityItem.qml:51 +#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/SettingVisibilityItem.qml:49 msgctxt "@item:tooltip %1 is list of setting names" msgid "This setting has been hidden by the value of %1. Change the value of that setting to make this setting visible." msgid_plural "This setting has been hidden by the values of %1. Change the values of those settings to make this setting visible." msgstr[0] "該設定已被 %1 的值所隱藏,若需顯示,更改此值可使設定項重新可見。" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/SettingVisibilityPage.qml:12 -msgctxt "@title:tab" -msgid "Setting Visibility" -msgstr "參數顯示設定" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/SettingVisibilityPage.qml:42 -msgctxt "@label:textbox" -msgid "Check all" -msgstr "全部勾選" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/SettingVisibilityPage.qml:89 -msgctxt "@label:textbox" -msgid "Filter..." -msgstr "篩選…" - #: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/MachinesPage.qml:12 msgctxt "@title:tab" msgid "Printers" @@ -621,86 +634,6 @@ msgid "Are you sure you wish to remove %1? This cannot be undone!" msgstr "你確認要刪除 %1?該操作無法恢復!" -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:14 -msgctxt "@title:tab" -msgid "Profiles" -msgstr "列印參數" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:15 -msgctxt "@label" -msgid "Duplicate" -msgstr "複製" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:45 -msgctxt "@label %1 is printer name" -msgid "Printer: %1" -msgstr "印表機:%1" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:83 -msgctxt "@action:button" -msgid "Update \"%1\"" -msgstr "升級 \"%1\"" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:84 -msgctxt "@action:button" -msgid "Update profile" -msgstr "升級列印參數" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:92 -msgctxt "@action:button" -msgid "Discard current changes" -msgstr "捨棄目前更改" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:93 -msgctxt "@action:button" -msgid "Reload profile" -msgstr "重新載入列印參數" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:107 -msgctxt "@label" -msgid "Based on" -msgstr "基於" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:107 -msgctxt "@label" -msgid "Profile type" -msgstr "列印參數類型" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:112 -msgctxt "@label" -msgid "Protected profile" -msgstr "受保護的列印參數" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:112 -msgctxt "@label" -msgid "Custom profile" -msgstr "自訂列印參數" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:139 -msgctxt "@action:button" -msgid "Import" -msgstr "匯入" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:146 -msgctxt "@action:button" -msgid "Export" -msgstr "匯出" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:184 -msgctxt "@window:title" -msgid "Import Profile" -msgstr "匯入列印參數" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:192 -msgctxt "@title:window" -msgid "Import Profile" -msgstr "匯入列印參數" - -#: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Preferences/ProfilesPage.qml:219 -msgctxt "@title:window" -msgid "Export Profile" -msgstr "匯出列印參數" - #: /home/ruben/Projects/Uranium/UM/Qt/qml/UM/Wizard.qml:215 msgctxt "@action:button" msgid "Back" @@ -916,6 +849,186 @@ msgid "Mirror Tool" msgstr "鏡像工具" +#~ msgctxt "@title:tab" +#~ msgid "Plugins" +#~ msgstr "外掛" + +#~ msgctxt "@action:button" +#~ msgid "Install new plugin" +#~ msgstr "安裝新外掛" + +#~ msgctxt "@label" +#~ msgid "You will need to restart the application before changes in plugins have effect." +#~ msgstr "你需要重新啟動應用程式讓外掛生效。" + +#~ msgctxt "@label" +#~ msgid "This plugin is required for the application to run." +#~ msgstr "該外掛為程式運行必備外掛。" + +#~ msgctxt "@label" +#~ msgid "Info..." +#~ msgstr "信息..." + +#~ msgctxt "@window:title" +#~ msgid "Install Plugin" +#~ msgstr "安裝外掛" + +#~ msgctxt "@title:window" +#~ msgid "Open file(s)" +#~ msgstr "開啟檔案" + +#~ msgctxt "@label" +#~ msgid "No text available" +#~ msgstr "沒有文件可用" + +#~ msgctxt "@title:window" +#~ msgid "About %1" +#~ msgstr "關於 %1" + +#~ msgctxt "@label" +#~ msgid "Author:" +#~ msgstr "作者:" + +#~ msgctxt "@label" +#~ msgid "Version:" +#~ msgstr "版本:" + +#~ msgctxt "@action:button" +#~ msgid "Learn more about the new features" +#~ msgstr "詳細了解新功能" + +#~ msgctxt "@info:status" +#~ msgid "Cura {0} is available!" +#~ msgstr "Cura {0} 可下載!" + +#~ msgctxt "@info:status" +#~ msgid "Cura {0} provides better and reliable printing experience." +#~ msgstr "Cura {0} 提供更好更可靠的列印體驗。" + +#~ msgctxt "@action:button" +#~ msgid "Learn more about new features" +#~ msgstr "詳細了解新功能" + +#~ msgctxt "@error:update" +#~ msgid "" +#~ "There was an error uninstalling the package {package} before installingnew version:\n" +#~ "{error}.\n" +#~ "Please try to upgrade again later." +#~ msgstr "" +#~ "在安裝新版本前,移除套件 {package} 發生了錯誤:\n" +#~ "{error}.\n" +#~ "請稍後再次嘗試升級。" + +#~ msgctxt "@info:status" +#~ msgid "" +#~ "Your configuration seems to be corrupt. Something seems to be wrong with the following profiles:\n" +#~ "- {profiles}\n" +#~ "Would you like to reset to factory defaults? Reset will remove all your current printers and profiles." +#~ msgstr "" +#~ "你的設定似乎已損毀。下列的參數中似乎有些問題:\n" +#~ "- {profiles}\n" +#~ "你是否願意重置為出廠預設值?重置將移除你目前的印表機和列印參數。" + +#~ msgctxt "@info" +#~ msgid "A new version is available!" +#~ msgstr "有新版本可用!" + +#~ msgctxt "@info:status" +#~ msgid "" +#~ "Failed to install plugin from {0}:\n" +#~ "{1}" +#~ msgstr "" +#~ "無法從 {0} 中安裝外掛:\n" +#~ "{1}" + +#~ msgctxt "@info:status" +#~ msgid "" +#~ "Failed to install the plugin;\n" +#~ "{0}" +#~ msgstr "" +#~ "無法安裝外掛;\n" +#~ "{0}" + +#~ msgctxt "@info:status" +#~ msgid "Failed to uninstall plugin. Plugin will be removed after {0} restarts." +#~ msgstr "外掛程式解除安裝失敗。外掛程式將會在 {0} 重新啟動後移除。" + +#~ msgctxt "@title:tab" +#~ msgid "Setting Visibility" +#~ msgstr "參數顯示設定" + +#~ msgctxt "@label:textbox" +#~ msgid "Check all" +#~ msgstr "全部勾選" + +#~ msgctxt "@label:textbox" +#~ msgid "Filter..." +#~ msgstr "篩選…" + +#~ msgctxt "@title:tab" +#~ msgid "Profiles" +#~ msgstr "列印參數" + +#~ msgctxt "@label" +#~ msgid "Duplicate" +#~ msgstr "複製" + +#~ msgctxt "@label %1 is printer name" +#~ msgid "Printer: %1" +#~ msgstr "印表機:%1" + +#~ msgctxt "@action:button" +#~ msgid "Update \"%1\"" +#~ msgstr "升級 \"%1\"" + +#~ msgctxt "@action:button" +#~ msgid "Update profile" +#~ msgstr "升級列印參數" + +#~ msgctxt "@action:button" +#~ msgid "Discard current changes" +#~ msgstr "捨棄目前更改" + +#~ msgctxt "@action:button" +#~ msgid "Reload profile" +#~ msgstr "重新載入列印參數" + +#~ msgctxt "@label" +#~ msgid "Based on" +#~ msgstr "基於" + +#~ msgctxt "@label" +#~ msgid "Profile type" +#~ msgstr "列印參數類型" + +#~ msgctxt "@label" +#~ msgid "Protected profile" +#~ msgstr "受保護的列印參數" + +#~ msgctxt "@label" +#~ msgid "Custom profile" +#~ msgstr "自訂列印參數" + +#~ msgctxt "@action:button" +#~ msgid "Import" +#~ msgstr "匯入" + +#~ msgctxt "@action:button" +#~ msgid "Export" +#~ msgstr "匯出" + +#~ msgctxt "@window:title" +#~ msgid "Import Profile" +#~ msgstr "匯入列印參數" + +#~ msgctxt "@title:window" +#~ msgid "Import Profile" +#~ msgstr "匯入列印參數" + +#~ msgctxt "@title:window" +#~ msgid "Export Profile" +#~ msgstr "匯出列印參數" + #~ msgctxt "@info" #~ msgid "An exception occurred while checking for updates." #~ msgstr "在檢查更新時出現異常情況。" diff -Nru uranium-3.3.0/resources/shaders/color.shader uranium-4.4.1/resources/shaders/color.shader --- uranium-3.3.0/resources/shaders/color.shader 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/resources/shaders/color.shader 2019-11-19 10:50:46.000000000 +0000 @@ -1,11 +1,13 @@ [shaders] vertex = - uniform highp mat4 u_modelViewProjectionMatrix; + uniform highp mat4 u_modelMatrix; + uniform highp mat4 u_viewMatrix; + uniform highp mat4 u_projectionMatrix; attribute highp vec4 a_vertex; //Vertex coordinate. void main() { - gl_Position = u_modelViewProjectionMatrix * a_vertex; //Transform the vertex coordinates with the model view projection. + gl_Position = u_projectionMatrix * u_viewMatrix * u_modelMatrix * a_vertex; //Transform the vertex coordinates with the model view projection. } fragment = @@ -18,12 +20,14 @@ vertex41core = #version 410 - uniform highp mat4 u_modelViewProjectionMatrix; + uniform highp mat4 u_modelMatrix; + uniform highp mat4 u_viewMatrix; + uniform highp mat4 u_projectionMatrix; in highp vec4 a_vertex; //Vertex coordinate. void main() { - gl_Position = u_modelViewProjectionMatrix * a_vertex; //Transform the vertex coordinates with the model view projection. + gl_Position = u_projectionMatrix * u_viewMatrix * u_modelMatrix * a_vertex; //Transform the vertex coordinates with the model view projection. } fragment41core = @@ -44,7 +48,9 @@ u_z_bias = 0.0 [bindings] -u_modelViewProjectionMatrix = model_view_projection_matrix +u_modelMatrix = model_matrix +u_viewMatrix = view_matrix +u_projectionMatrix = projection_matrix [attributes] a_vertex = vertex diff -Nru uranium-3.3.0/resources/shaders/composite.shader uranium-4.4.1/resources/shaders/composite.shader --- uranium-3.3.0/resources/shaders/composite.shader 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/resources/shaders/composite.shader 2019-11-19 10:50:46.000000000 +0000 @@ -66,6 +66,7 @@ { gl_FragColor = mix(result, u_outline_color, abs(sum.a)); } + gl_FragColor.a = gl_FragColor.a > 0.5 ? 1.0 : 0.0; } vertex41core = @@ -131,6 +132,7 @@ { frag_color = mix(result, u_outline_color, abs(sum.a)); } + frag_color.a = frag_color.a > 0.5 ? 1.0 : 0.0; } [defaults] diff -Nru uranium-3.3.0/resources/shaders/default.shader uranium-4.4.1/resources/shaders/default.shader --- uranium-3.3.0/resources/shaders/default.shader 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/resources/shaders/default.shader 2019-11-19 10:50:46.000000000 +0000 @@ -1,13 +1,15 @@ [shaders] vertex = - uniform highp mat4 u_modelViewProjectionMatrix; + uniform highp mat4 u_modelMatrix; + uniform highp mat4 u_viewMatrix; + uniform highp mat4 u_projectionMatrix; attribute highp vec4 a_vertex; attribute lowp vec4 a_color; varying lowp vec4 v_color; void main() { - gl_Position = u_modelViewProjectionMatrix * a_vertex; + gl_Position = u_projectionMatrix * u_viewMatrix * u_modelMatrix * a_vertex; v_color = a_color; } @@ -29,14 +31,16 @@ vertex41core = #version 410 - uniform highp mat4 u_modelViewProjectionMatrix; + uniform highp mat4 u_modelMatrix; + uniform highp mat4 u_viewMatrix; + uniform highp mat4 u_projectionMatrix; in highp vec4 a_vertex; in lowp vec4 a_color; out lowp vec4 v_color; void main() { - gl_Position = u_modelViewProjectionMatrix * a_vertex; + gl_Position = u_projectionMatrix * u_viewMatrix * u_modelMatrix * a_vertex; v_color = a_color; } @@ -62,7 +66,9 @@ u_color = [0.5, 0.5, 0.5, 1.0] [bindings] -u_modelViewProjectionMatrix = model_view_projection_matrix +u_modelMatrix = model_matrix +u_viewMatrix = view_matrix +u_projectionMatrix = projection_matrix [attributes] a_vertex = vertex diff -Nru uranium-3.3.0/resources/shaders/object.shader uranium-4.4.1/resources/shaders/object.shader --- uranium-3.3.0/resources/shaders/object.shader 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/resources/shaders/object.shader 2019-11-19 10:50:46.000000000 +0000 @@ -1,7 +1,9 @@ [shaders] vertex = uniform highp mat4 u_modelMatrix; - uniform highp mat4 u_viewProjectionMatrix; + uniform highp mat4 u_viewMatrix; + uniform highp mat4 u_projectionMatrix; + uniform highp mat4 u_normalMatrix; attribute highp vec4 a_vertex; @@ -14,7 +16,7 @@ void main() { vec4 world_space_vert = u_modelMatrix * a_vertex; - gl_Position = u_viewProjectionMatrix * world_space_vert; + gl_Position = u_projectionMatrix * u_viewMatrix * world_space_vert; v_vertex = world_space_vert.xyz; v_normal = (u_normalMatrix * normalize(a_normal)).xyz; @@ -59,7 +61,9 @@ vertex41core = #version 410 uniform highp mat4 u_modelMatrix; - uniform highp mat4 u_viewProjectionMatrix; + uniform highp mat4 u_viewMatrix; + uniform highp mat4 u_projectionMatrix; + uniform highp mat4 u_normalMatrix; attribute highp vec4 a_vertex; @@ -72,7 +76,7 @@ void main() { vec4 world_space_vert = u_modelMatrix * a_vertex; - gl_Position = u_viewProjectionMatrix * world_space_vert; + gl_Position = u_projectionMatrix * u_viewMatrix * world_space_vert; v_vertex = world_space_vert.xyz; v_normal = (u_normalMatrix * normalize(a_normal)).xyz; @@ -123,7 +127,8 @@ [bindings] u_modelMatrix = model_matrix -u_viewProjectionMatrix = view_projection_matrix +u_viewMatrix = view_matrix +u_projectionMatrix = projection_matrix u_normalMatrix = normal_matrix u_viewPosition = view_position u_lightPosition = light_0_position diff -Nru uranium-3.3.0/resources/shaders/platform.shader uranium-4.4.1/resources/shaders/platform.shader --- uranium-3.3.0/resources/shaders/platform.shader 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/resources/shaders/platform.shader 2019-11-19 10:50:46.000000000 +0000 @@ -1,7 +1,9 @@ [shaders] vertex = - uniform highp mat4 u_viewProjectionMatrix; uniform highp mat4 u_modelMatrix; + uniform highp mat4 u_viewMatrix; + uniform highp mat4 u_projectionMatrix; + uniform highp mat4 u_normalMatrix; attribute highp vec4 a_vertex; @@ -15,7 +17,7 @@ void main() { vec4 world_space_vert = u_modelMatrix * a_vertex; - gl_Position = u_viewProjectionMatrix * world_space_vert; + gl_Position = u_projectionMatrix * u_viewMatrix * world_space_vert; v_vertex = world_space_vert.xyz; v_normal = (u_normalMatrix * normalize(a_normal)).xyz; @@ -59,8 +61,10 @@ vertex41core = #version 410 - uniform highp mat4 u_viewProjectionMatrix; uniform highp mat4 u_modelMatrix; + uniform highp mat4 u_viewMatrix; + uniform highp mat4 u_projectionMatrix; + uniform highp mat4 u_normalMatrix; in highp vec4 a_vertex; @@ -74,7 +78,7 @@ void main() { vec4 world_space_vert = u_modelMatrix * a_vertex; - gl_Position = u_viewProjectionMatrix * world_space_vert; + gl_Position = u_projectionMatrix * u_viewMatrix * world_space_vert; v_vertex = world_space_vert.xyz; v_normal = (u_normalMatrix * normalize(a_normal)).xyz; @@ -125,8 +129,9 @@ u_texture = 0 [bindings] -u_viewProjectionMatrix = view_projection_matrix u_modelMatrix = model_matrix +u_viewMatrix = view_matrix +u_projectionMatrix = projection_matrix u_normalMatrix = normal_matrix u_lightPosition = light_0_position u_viewPosition = camera_position diff -Nru uranium-3.3.0/resources/shaders/select_face.shader uranium-4.4.1/resources/shaders/select_face.shader --- uranium-3.3.0/resources/shaders/select_face.shader 1970-01-01 00:00:00.000000000 +0000 +++ uranium-4.4.1/resources/shaders/select_face.shader 2019-11-19 10:50:46.000000000 +0000 @@ -0,0 +1,58 @@ +[shaders] +vertex = + uniform highp mat4 u_modelMatrix; + uniform highp mat4 u_viewMatrix; + uniform highp mat4 u_projectionMatrix; + + attribute highp vec4 a_vertex; + + void main() + { + gl_Position = u_projectionMatrix * u_viewMatrix * u_modelMatrix * a_vertex; + } + +fragment = + void main() + { + gl_FragColor = vec4(0., 0., 0., 1.); + // NOTE: Select face can't be used in compatibility-mode; + // the __VERSION__ macro may give back the max the graphics driver supports, + // rather than the one supported by the selected OpenGL version. + } + +vertex41core = + #version 410 + uniform highp mat4 u_modelMatrix; + uniform highp mat4 u_viewMatrix; + uniform highp mat4 u_projectionMatrix; + + in highp vec4 a_vertex; + + void main() + { + gl_Position = u_projectionMatrix * u_viewMatrix * u_modelMatrix * a_vertex; + } + +fragment41core = + #version 410 + out vec4 frag_color; + + void main() + { + frag_color = vec4(0., 0., 0., 1.); + frag_color.r = (gl_PrimitiveID % 0x100) / 255.; + frag_color.g = ((gl_PrimitiveID / 0x100) % 0x100) / 255.; + frag_color.b = (0x1 + 2 * ((gl_PrimitiveID / 0x10000) % 0x80)) / 255.; + // Don't use alpha for anything, as some faces may be behind others, an only the front one's value is desired. + // There isn't any control over the background color, so a signal-bit is put into the blue byte. + } + +[defaults] + +[bindings] +u_modelMatrix = model_matrix +u_viewMatrix = view_matrix +u_projectionMatrix = projection_matrix + +[attributes] +a_vertex = vertex diff -Nru uranium-3.3.0/resources/shaders/selection.shader uranium-4.4.1/resources/shaders/selection.shader --- uranium-3.3.0/resources/shaders/selection.shader 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/resources/shaders/selection.shader 2019-11-19 10:50:46.000000000 +0000 @@ -1,12 +1,14 @@ [shaders] vertex = - uniform highp mat4 u_modelViewProjectionMatrix; + uniform highp mat4 u_modelMatrix; + uniform highp mat4 u_viewMatrix; + uniform highp mat4 u_projectionMatrix; attribute highp vec4 a_vertex; void main() { - gl_Position = u_modelViewProjectionMatrix * a_vertex; + gl_Position = u_projectionMatrix * u_viewMatrix * u_modelMatrix * a_vertex; } fragment = @@ -19,13 +21,15 @@ vertex41core = #version 410 - uniform highp mat4 u_modelViewProjectionMatrix; + uniform highp mat4 u_modelMatrix; + uniform highp mat4 u_viewMatrix; + uniform highp mat4 u_projectionMatrix; in highp vec4 a_vertex; void main() { - gl_Position = u_modelViewProjectionMatrix * a_vertex; + gl_Position = u_projectionMatrix * u_viewMatrix * u_modelMatrix * a_vertex; } fragment41core = @@ -41,7 +45,9 @@ [defaults] [bindings] -u_modelViewProjectionMatrix = model_view_projection_matrix +u_modelMatrix = model_matrix +u_viewMatrix = view_matrix +u_projectionMatrix = projection_matrix u_color = selection_color [attributes] diff -Nru uranium-3.3.0/resources/shaders/toolhandle.shader uranium-4.4.1/resources/shaders/toolhandle.shader --- uranium-3.3.0/resources/shaders/toolhandle.shader 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/resources/shaders/toolhandle.shader 2019-11-19 10:50:46.000000000 +0000 @@ -1,6 +1,8 @@ [shaders] vertex = - uniform highp mat4 u_modelViewProjectionMatrix; + uniform highp mat4 u_modelMatrix; + uniform highp mat4 u_viewMatrix; + uniform highp mat4 u_projectionMatrix; attribute highp vec4 a_vertex; attribute lowp vec4 a_color; @@ -9,7 +11,7 @@ void main() { - gl_Position = u_modelViewProjectionMatrix * a_vertex; + gl_Position = u_projectionMatrix * u_viewMatrix * u_modelMatrix * a_vertex; v_color = a_color; } @@ -34,7 +36,9 @@ vertex41core = #version 410 - uniform highp mat4 u_modelViewProjectionMatrix; + uniform highp mat4 u_modelMatrix; + uniform highp mat4 u_viewMatrix; + uniform highp mat4 u_projectionMatrix; in highp vec4 a_vertex; in lowp vec4 a_color; @@ -43,7 +47,7 @@ void main() { - gl_Position = u_modelViewProjectionMatrix * a_vertex; + gl_Position = u_projectionMatrix * u_viewMatrix * u_modelMatrix * a_vertex; v_color = a_color; } @@ -74,7 +78,9 @@ u_disabledMultiplier = 0.75 [bindings] -u_modelViewProjectionMatrix = model_view_projection_matrix +u_modelMatrix = model_matrix +u_viewMatrix = view_matrix +u_projectionMatrix = projection_matrix [attributes] a_vertex = vertex diff -Nru uranium-3.3.0/run_coverage.py uranium-4.4.1/run_coverage.py --- uranium-3.3.0/run_coverage.py 1970-01-01 00:00:00.000000000 +0000 +++ uranium-4.4.1/run_coverage.py 2019-11-19 10:50:46.000000000 +0000 @@ -0,0 +1,22 @@ +import pytest +from pathlib import Path + +# Small helper script to run the coverage of main code & all plugins + +path = Path("plugins") +args = ["--cov" ,"UM" , "--cov-report", "html"] +all_paths = [] +for p in path.glob('**/*'): + if p.is_dir(): + if p.name in ["__pycache__", "tests"]: + continue + args.append("--cov") + args.append(str(p)) + all_paths.append(str(p)) + +for path in all_paths: + args.append(path) +args.append(".") +args.append("-x") +pytest.main(args) + diff -Nru uranium-3.3.0/run_mypy.py uranium-4.4.1/run_mypy.py --- uranium-3.3.0/run_mypy.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/run_mypy.py 2019-11-19 10:50:46.000000000 +0000 @@ -1,36 +1,84 @@ -#!env python +#!/usr/bin/env python import os import sys import subprocess + # A quick Python implementation of unix 'where' command. -def where(exeName): - searchPath = os.getenv("PATH") - paths = searchPath.split(";" if sys.platform == "win32" else ":") - for path in paths: - candidatePath = os.path.join(path, exeName) - if os.path.exists(candidatePath): - return candidatePath - return None +def where(exe_name: str, search_path: str = os.getenv("PATH")) -> str: + if search_path is None: + search_path = "" + paths = search_path.split(os.pathsep) + result = "" + print(" -> sys.executable location: %s" % sys.executable) + sys_exec_dir = os.path.dirname(sys.executable) + root_dir = os.path.dirname(sys_exec_dir) + paths += [sys_exec_dir, + os.path.join(root_dir, "bin"), + os.path.join(root_dir, "scripts"), + ] + paths = set(paths) + + for path in sorted(paths): + print(" -> Searching %s" % path) + candidate_path = os.path.join(path, exe_name) + if os.path.exists(candidate_path): + result = candidate_path + break + return result + + +def findModules(path): + result = [] + for entry in os.scandir(path): + if entry.is_dir() and os.path.exists(os.path.join(path, entry.name, "__init__.py")): + result.append(entry.name) + return result + def main(): - if sys.platform == "win32": - os.putenv("MYPYPATH", r".;.\stubs") - else: - os.putenv("MYPYPATH", r".:./stubs") + # Find Uranium via the PYTHONPATH var + uraniumUMPath = where("UM", os.getenv("PYTHONPATH")) + if uraniumUMPath is None: + uraniumUMPath = os.path.join("..", "Uranium") + uraniumPath = os.path.dirname(uraniumUMPath) - # Mypy really needs to be run via its Python script otherwise it can't find its data files. - mypyExe = where("mypy.bat" if sys.platform == "win32" else "mypy") - mypyModule = os.path.join(os.path.dirname(mypyExe), "mypy") + mypy_path_parts = [".", os.path.join(".", "plugins"), os.path.join(".", "plugins", "Tools"), os.path.join(".", "plugins", "FileHandlers"), os.path.join(".", "plugins", "Views") , + uraniumPath, os.path.join(uraniumPath, "stubs")] - result = subprocess.run([sys.executable, mypyModule, "-p", "UM"]) - if result.returncode != 0: - print("Type checking failed.") - else: - print(""" + os.putenv("MYPYPATH", os.pathsep.join(mypy_path_parts)) + + # Mypy really needs to be run via its Python script otherwise it can't find its data files. + mypy_exe_name = "mypy.exe" if sys.platform == "win32" else "mypy" + mypy_exe_dir = where(mypy_exe_name) + mypy_module = os.path.join(os.path.dirname(mypy_exe_dir), mypy_exe_name) + print("Found mypy exe path: %s" % mypy_exe_dir) + print("Found mypy module path: %s" % mypy_module) + + plugins = findModules("plugins") + plugins.extend(findModules("plugins/Tools")) + plugins.extend(findModules("plugins/FileHandlers")) + plugins.extend(findModules("plugins/Views")) + plugins.sort() + + mods = ["UM"] + plugins + failed = False + for mod in mods: + print("------------- Checking module {mod}".format(**locals())) + if sys.platform == "win32": + result = subprocess.run([mypy_module, "-p", mod, "--ignore-missing-imports"]) + else: + result = subprocess.run([sys.executable, mypy_module, "-p", mod, "--ignore-missing-imports"]) + if result.returncode != 0: + print("\nModule {mod} failed checking. :(".format(**locals())) + failed = True + #return 1 + if not failed: + print("\n\nDone checking. All is good.") + return 0 + else: + return 1 - Done checking. All is good. - """) - return 0 -sys.exit(main()) +if __name__ == "__main__": + sys.exit(main()) diff -Nru uranium-3.3.0/run_tests.py uranium-4.4.1/run_tests.py --- uranium-3.3.0/run_tests.py 1970-01-01 00:00:00.000000000 +0000 +++ uranium-4.4.1/run_tests.py 2019-11-19 10:50:46.000000000 +0000 @@ -0,0 +1,16 @@ +import pytest +from pathlib import Path + +# Small helper script to run the coverage of main code & all plugins + +path = Path("plugins") +args = [] +for p in path.glob('**/*'): + if p.is_dir(): + if p.name in ["__pycache__", "tests"]: + continue + args.append(str(p)) + +args.append(".") +print(pytest.main(args)) + diff -Nru uranium-3.3.0/scripts/createjsoncontext.py uranium-4.4.1/scripts/createjsoncontext.py --- uranium-3.3.0/scripts/createjsoncontext.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/scripts/createjsoncontext.py 2019-11-19 10:50:46.000000000 +0000 @@ -68,7 +68,7 @@ headertxt += "msgid \"\"\n" headertxt += "msgstr \"\"\n" headertxt += "\"Project-Id-Version: Uranium json setting files\\n\"\n" - headertxt += "\"Report-Msgid-Bugs-To: http://github.com/ultimaker/uranium\\n\"\n" + headertxt += "\"Report-Msgid-Bugs-To: r.dulek@ultimaker.com\\n\"\n" headertxt += "\"POT-Creation-Date: %s+0000\\n\"\n" %time.strftime("%Y-%m-%d %H:%M") headertxt += "\"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\\n\"\n" headertxt += "\"Last-Translator: FULL NAME \\n\"\n" @@ -87,7 +87,7 @@ basedir = sys.argv[2] outputfilename = sys.argv[3] - with open(jsonfilename, "r") as data_file: + with open(jsonfilename, "r", encoding = "utf-8") as data_file: error = False jsondatadict = json.load(data_file, object_pairs_hook=collections.OrderedDict) @@ -98,6 +98,6 @@ processSettings(jsonfilename.replace(basedir, ""), jsondatadict["settings"]) if pottxt != "": - with open(outputfilename, "w") as output_file: + with open(outputfilename, "w", encoding = "utf-8") as output_file: output_file.write(potheader()) output_file.write(pottxt) diff -Nru uranium-3.3.0/scripts/createplugincontext.py uranium-4.4.1/scripts/createplugincontext.py --- uranium-3.3.0/scripts/createplugincontext.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/scripts/createplugincontext.py 2019-11-19 10:50:46.000000000 +0000 @@ -52,11 +52,11 @@ basedir = sys.argv[2] output_filename = sys.argv[3] - with open(json_filename, "r") as data_file: + with open(json_filename, "r", encoding = "utf-8") as data_file: error = False jsondatadict = json.load(data_file, object_pairs_hook=collections.OrderedDict) - if "name" not in jsondatadict or "api" not in jsondatadict or "version" not in jsondatadict: + if "name" not in jsondatadict or ("api" not in jsondatadict and "supported_sdk_versions" not in jsondatadict) or "version" not in jsondatadict: print("The plugin.json file found on %s is invalid, ignoring it" % json_filename) exit(1) @@ -68,5 +68,5 @@ appendMessage(file, "name", jsondatadict["name"]) if pottxt != "": - with open(output_filename, "a") as output_file: + with open(output_filename, "a", encoding = "utf-8") as output_file: output_file.write(pottxt) diff -Nru uranium-3.3.0/scripts/pirateofdoom.py uranium-4.4.1/scripts/pirateofdoom.py --- uranium-3.3.0/scripts/pirateofdoom.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/scripts/pirateofdoom.py 2019-11-19 10:50:46.000000000 +0000 @@ -11,7 +11,8 @@ "no": "nay", "loading": "haulin'", "you": "ye", - "ok": "arrr", + "you're": "ye are", + "ok": "aye", "machine": "ship", "machines": "ships", "mm/s²": "knots/s", diff -Nru uranium-3.3.0/scripts/pirate.py uranium-4.4.1/scripts/pirate.py --- uranium-3.3.0/scripts/pirate.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/scripts/pirate.py 2019-11-19 10:50:46.000000000 +0000 @@ -10,6 +10,7 @@ #Translates English to Pirate. def translate(english): + english = english.replace("&", "") #Pirates don't take shortcuts. for eng, pir in pirateofdoom.pirate.items(): matches = list(re.finditer(r"\b" + eng.lower() + r"\b", english.lower())) matches = [match.start(0) for match in matches] @@ -39,7 +40,7 @@ last_ctxt = "" last_str = "" state = "unknown" -with open(pot_file) as f: +with open(pot_file, encoding = "utf-8") as f: for line in f: if line.startswith("msgctxt"): state = "ctxt" @@ -75,7 +76,7 @@ pirate_plural = translate(english_plural) translations[key] = (pirate, pirate_plural) -with open(po_file, "w") as f: +with open(po_file, "w", encoding = "utf-8") as f: f.write("""msgid "" msgstr "" "Project-Id-Version: Pirate\\n" diff -Nru uranium-3.3.0/stubs/Arcus.pyi uranium-4.4.1/stubs/Arcus.pyi --- uranium-3.3.0/stubs/Arcus.pyi 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/stubs/Arcus.pyi 1970-01-01 00:00:00.000000000 +0000 @@ -1,73 +0,0 @@ - -class SocketState: - Initial = ... # type: SocketState - Connecting = ... # type: SocketState - Connected = ... # type: SocketState - Opening = ... # type: SocketState - Listening = ... # type: SocketState - Closing = ... # type: SocketState - Closed = ... # type: SocketState - Error = ... # type: SocketState - -class MessagePtr: ... - -class SocketListener: - def __init__(self) -> None: ... - def __del__ (self) -> None: ... - - def getSocket(self) -> Socket: ... - def stateChanged(self, newState: SocketState) -> None: ... - def messageReceived(self) -> None: ... - def error(self, error: Error) -> None: ... - -class Socket: - def __init__(self) -> None: ... - def __del__ (self) -> None: ... - - def getState(self) -> SocketState: ... - - def getLastError(self) -> Error: ... - def clearError(self) -> None: ... - - def addListener(self, listener: SocketListener) -> None: ... - def removeListener(self, listener: SocketListener) -> None: ... - - def connect(self, address: str, port: int) -> None: ... - def listen(self, address: str, port: int) -> None: ... - def close(self) -> None: ... - def reset(self) -> None: ... - - def sendMessage(self, message: MessagePtr) -> None: ... - def takeNextMessage(self) -> MessagePtr: ... - def createMessage(self, type_name: str) -> MessagePtr: ... - - def registerAllMessageTypes(self, file_name: str) -> bool: ... - -class ErrorCode: - UnknownError = ... # type: ErrorCode - CreationError = ... # type: ErrorCode - ConnectFailedError = ... # type: ErrorCode - BindFailedError = ... # type: ErrorCode - AcceptFailedError = ... # type: ErrorCode - SendFailedError = ... # type: ErrorCode - ReceiveFailedError = ... # type: ErrorCode - UnknownMessageTypeError = ... # type: ErrorCode - ParseFailedError = ... # type: ErrorCode - ConnectionResetError = ... # type: ErrorCode - MessageRegistrationFailedError = ... # type: ErrorCode - InvalidStateError = ... # type: ErrorCode - InvalidMessageError = ... # type: ErrorCode - Debug = ... # type: ErrorCode - -class Error: - def __init__(self) -> None: ... - # Error(ErrorCode::ErrorCode error_code, const std::string& error_message); - # Error(const Error& error); - - def getErrorCode(self) -> ErrorCode: ... - def getErrorMessage(self) -> str: ... - def isFatalError(self) -> bool: ... - def isValid(self) -> bool: ... - def setFatalError(self, fatal: bool) -> None: ... - - def __repr__(self) -> str: ... diff -Nru uranium-3.3.0/stubs/_dummy_thread.pyi uranium-4.4.1/stubs/_dummy_thread.pyi --- uranium-3.3.0/stubs/_dummy_thread.pyi 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/stubs/_dummy_thread.pyi 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -def get_ident() -> int: ... diff -Nru uranium-3.3.0/stubs/numpy/__init__.pyi uranium-4.4.1/stubs/numpy/__init__.pyi --- uranium-3.3.0/stubs/numpy/__init__.pyi 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/stubs/numpy/__init__.pyi 1970-01-01 00:00:00.000000000 +0000 @@ -1,513 +0,0 @@ -""" -Numpy's mypy stub. Only type declarations for ndarray, the scalar hierarchy and array creation -methods are provided. -""" - -from typing import (Any, Callable, Dict, Generic, Iterator, List, Optional, Sequence, Tuple, Type, TypeVar, Union, - overload) - -class dtype: ... -_dtype = dtype - - -class flagsobj: - """numpy.flagsobj""" - aligned = None # type: bool - behaved = None # type: bool - c_contiguous = None # type: bool - carray = None # type: bool - contiguous = None # type: bool - f_contiguous = None # type: bool - farray = None # type: bool - fnc = None # type: bool - forc = None # type: bool - fortran = None # type: bool - owndata = None # type: bool - updateifcopy = None # type: bool - writeable = None # type: bool - def __getitem__(self, item: str) -> bool: ... - def __setitem__(self, item: str, value: bool) -> None: ... - -# -# Type variables. _T wasn't used to avoid confusions with ndarray's "T" attribute. -# - -_S = TypeVar('_S') -_U = TypeVar('_U') -_V = TypeVar('_V') - -# -# Auxiliary types -# - -ShapeType = Union[int, Tuple[int, ...]] -AxesType = Union[int, Tuple[int, ...]] -OrderType = Union[str, Sequence[str]] -DtypeType = Union[dtype, type] - -class flatiter(Generic[_S], Iterator[_S]): - coords = ... # type: ShapeType - def copy(self) -> flatiter[_S]: ... - -class _ArrayLike(Generic[_S]): - """ - "array-like" interface that both numpy.ndarray and all scalars (descendants of numpy.generic) - implement this interface. - """ - # - # Array-like structures attributes - # - T = None # type: _ArrayLike[_S] - data = None # type: Any - dtype = None # type: _dtype - flags = None # type: flagsobj - flat = None # type: flatiter[_ArrayLike[_S]] - imag = None # type: _ArrayLike[_S] - real = None # type: _ArrayLike[_S] - size = None # type: int - itemsize = None # type: int - nbytes = None # type: int - ndim = None # type: int - shape = None # type: Tuple[int, ...] - strides = None # type: Tuple[int, ...] - base = None # type: Optional[_ArrayLike[_S]] - - # - # Array-like methods - # - - # Once this issue https://github.com/python/mypy/issues/1907 is resolved, most methods that - # have an 'out' argument, will be implemented using overload instead of with a Union - # result. mypy is smart enough to assign the proper type (_ArrayLike[_U]) when out is present - # but it falls back to the union when it's not. - def all(self, axis: AxesType=None, out: '_ArrayLike[_U]'=None, - keepdims: bool=False) -> Union['_ArrayLike[_U]', '_ArrayLike[bool]']: ... - - def any(self, axis: AxesType=None, out: '_ArrayLike[_U]'=None, - keepdims: bool=False) -> Union['_ArrayLike[_U]', '_ArrayLike[bool]']: ... - - def argmax(self, axis: int=None, - out: '_ArrayLike[_U]'=None) -> Union['_ArrayLike[_U]', '_ArrayLike[int]']: ... - - def argmin(self, axis: int=None, - out: '_ArrayLike[_U]'=None) -> Union['_ArrayLike[_U]', '_ArrayLike[int]']: ... - - def argpartition(self, kth: Union[int, Sequence[int]], axis: Optional[int]=-1, - kind: str='introselect', order: OrderType=None) -> '_ArrayLike[int]': ... - - def argsort(self, axis: int=None, kind: str='quicksort', - order: OrderType=None) -> '_ArrayLike[int]': ... - - def astype(self, dtype: Any, order: str='K', casting: str='unsafe', subok: bool=True, - copy: bool=False) -> '_ArrayLike[Any]': ... - - def byteswap(self, inplace: bool=False) -> '_ArrayLike[_S]': ... - - def choose(self, choices:Sequence['_ArrayLike[_V]'], out: '_ArrayLike[_U]'=None, - mode: str='raise') -> Union['_ArrayLike[_U]', '_ArrayLike[_V]']: ... - - def clip(self, a_min: Any, a_max: Any, - out: '_ArrayLike[_U]'=None) -> Union['_ArrayLike[_S]', '_ArrayLike[_U]']: ... - - def compress(self, condition: Sequence[bool], axis: int=None, - out: '_ArrayLike[_U]'=None) -> Union['_ArrayLike[_S]', '_ArrayLike[_U]']: ... - - def conj(self) -> '_ArrayLike[_S]': ... - - def conjugate(self) -> '_ArrayLike[_S]': ... - - def copy(self, order: str='C') -> '_ArrayLike[_S]': ... - - def cumprod(self, axis: int=None, dtype: Any=None, - out: '_ArrayLike[Any]'=None) -> '_ArrayLike[Any]': ... - - def cumsum(self, axis: int=None, dtype: DtypeType=None, - out: '_ArrayLike[Any]'=None) -> '_ArrayLike[Any]': ... - - def diagonal(self, offset: int=0, axis1: int=0, axis2: int=1) -> '_ArrayLike[_S]': ... - - def dot(self, b: '_ArrayLike[Any]', out: '_ArrayLike[Any]'=None) -> '_ArrayLike[Any]': ... - - def dump(self, file: str) -> None: ... - - def dumps(self) -> str: ... - - def fill(self, value: _S) -> None: ... - - def flatten(self, order: str='C') -> '_ArrayLike[_S]': ... - - def getfield(self, dtype: DtypeType, offset: int=0) -> '_ArrayLike[Any]': ... - - def item(self, args: AxesType) -> generic: ... - - def itemset(self, arg0: Union[int, Tuple[int, ...]], arg1: Any=None) -> None: ... - - def max(self, axis: AxesType=None, - out: '_ArrayLike[_U]'=None) -> Union['_ArrayLike[_S]', '_ArrayLike[_U]']: ... - - def mean(self, axis: AxesType=None, dtype: Any=None, - out: '_ArrayLike[_U]'=None, keepdims: bool=False) -> '_ArrayLike[floating]': ... - - def min(self, axis: AxesType=None, - out: '_ArrayLike[_U]'=None) -> Union['_ArrayLike[_S]', '_ArrayLike[_U]']: ... - - def newbyteorder(self, new_order: str='S') -> '_ArrayLike[_S]': ... - - def nonzero(self) -> '_ArrayLike[int]': ... - - def partition(self, kth: AxesType, axis: int=-1, kind: str='introselect', - order: OrderType=None) -> None: ... - - def prod(self, axis: AxesType=None, dtype: DtypeType=None, - out: '_ArrayLike[_U]'=None, keepdims: bool=False) -> '_ArrayLike[Any]': ... - - def ptp(self, axis: int=None, - out: '_ArrayLike[_U]'=None) -> Union['_ArrayLike[_S]', '_ArrayLike[_U]']: ... - - def put(self, ind: '_ArrayLike[int]', v: '_ArrayLike[_S]', mode: str='raise') -> None: ... - - def ravel(self, order: str='C') -> '_ArrayLike[_S]': ... - - def repeat(self, repeats: Union[int, Sequence[int]], - axis: int=None) -> '_ArrayLike[_S]': ... - - def reshape(self, newshape: ShapeType, - order: str='C') -> '_ArrayLike[_S]': ... - - def resize(self, new_shape: ShapeType, refcheck: bool=True) -> None: ... - - def round(self, decimals: int=0, - out: '_ArrayLike[_U]'=None) -> Union['_ArrayLike[_S]', '_ArrayLike[_U]']: ... - - def searchsorted(self, v: Union[_S, '_ArrayLike[_S]'], side: str='left', - sorter: '_ArrayLike[int]'=None) -> '_ArrayLike[int]': ... - - def setfield(self, val: Any, dtype: DtypeType, offset: int=0) -> None: ... - - def setflags(self, write: bool=None, align: bool=None, - uic: bool=None) -> None: ... - - def sort(self, axis: int=-1, kind: str='quicksort', order: OrderType=None) -> None: ... - - def squeeze(self, axis: AxesType=None) -> '_ArrayLike[_S]': ... - - def std(self, axis: AxesType=None, dtype: DtypeType=None, - out: '_ArrayLike[_U]'=None, ddof: int=0, keepdims: bool=False) -> '_ArrayLike[floating]': ... - - def sum(self, axis: AxesType=None, dtype: DtypeType=None, - out: '_ArrayLike[_U]'=None, - keepdims: bool=False) -> '_ArrayLike[Any]': ... - - def swapaxes(self, axis1: int, axis2: int) -> '_ArrayLike[_S]': ... - - def take(self, indices: Sequence[int], axis: int=None, - out: '_ArrayLike[_U]'=None, - mode: str='raise') -> Union['_ArrayLike[_S]', '_ArrayLike[_U]']: ... - - def tobytes(self, order: str='C') -> bytes: ... - - def tofile(self, fid: object, sep: str='', # TODO fix fid definition (There's a bug in mypy io's namespace https://github.com/python/mypy/issues/1462) - format: str='%s') -> None: ... - - def tolist(self) -> List[Any]: ... - - def tostring(self, order: str='C') -> bytes: ... - - def trace(self, offset: int=0, axis1: int=0, axis2: int=1, - dtype: DtypeType=None, out: '_ArrayLike[_U]'=None) -> '_ArrayLike[Any]': ... - - def transpose(self, axes: Optional[AxesType]) -> '_ArrayLike[_S]': ... - - def var(self, axis: AxesType=None, dtype: DtypeType=None, - out: '_ArrayLike[_U]'=None, ddof: int=0, keepdims: bool=False) -> '_ArrayLike[Any]': ... - - def view(self, dtype: Union[DtypeType, Type['ndarray']]=None, - type: type=None) -> '_ArrayLike[Any]': ... - - # - # Magic methods - # - - def __abs__(self) -> '_ArrayLike[_S]': ... - - def __add__(self, value: object) -> '_ArrayLike[Any]': ... - - def __and__(self, value: object) -> '_ArrayLike[int]': ... - - def __array__(self, dtype: DtypeType=None) -> '_ArrayLike[Any]': ... - - def __array_prepare__(self, context: object=None) -> '_ArrayLike[Any]': ... - - def __array_wrap__(self, context: object=None) -> '_ArrayLike[Any]': ... - - def __bool__(self) -> bool: ... - - def __complex__(self) -> complex: ... - - def __contains__(self, key: object) -> bool: ... - - def __copy__(self) -> '_ArrayLike[_S]': ... - - def __deepcopy__(self) -> '_ArrayLike[_S]': ... - - def __delattr__(self, name: str) -> None: ... - - def __delitem__(self, key: str) -> None: ... - - def __dir__(self) -> List[str]: ... - - def __divmod__(self, value: object) -> Tuple['_ArrayLike[int]', '_ArrayLike[float]']: ... - - def __eq__(self, value: object) -> '_ArrayLike[bool]': ... # type: ignore - - def __float__(self) -> float: ... - - def __floordiv__(self, value: object) -> '_ArrayLike[int]': ... - - def __ge__(self, value: object) -> '_ArrayLike[bool]': ... - - def __getattribute__(self, name: str) -> Any: ... - - def __getitem__(self, key: Any) -> '_ArrayLike[_S]': ... - - def __gt__(self, value: object) -> '_ArrayLike[bool]': ... - - def __iadd__(self, value: object) -> None: ... - - def __iand__(self, value: object) -> None: ... - - def __ifloordiv__(self, value: object) -> None: ... - - def __ilshift__(self, value: object) -> None: ... - - def __imatmul__(self, value: '_ArrayLike[Any]') -> None: ... - - def __imod__(self, value: object) -> None: ... - - def __imul__(self, value: object) -> None: ... - - def __index__(self) -> int: ... - - def __int__(self) -> int: ... - - def __invert__(self) -> '_ArrayLike[_S]': ... - - def __ior__(self, value: object) -> None: ... - - def __ipow__(self, value: object) -> None: ... - - def __irshift__(self, value: object) -> None: ... - - def __isub__(self, value: object) -> None: ... - - def __iter__(self) -> Iterator['_ArrayLike[_S]']: ... - - def __itruediv__(sel, value: object) -> None: ... - - def __ixor__(self, value: object) -> None: ... - - def __le__(self, value: object) -> '_ArrayLike[bool]': ... - - def __len__(self) -> int: ... - - def __lshift__(self, value: object) -> '_ArrayLike[_S]': ... - - def __lt__(self, value: object) -> '_ArrayLike[bool]': ... - - def __matmul__(self, value: '_ArrayLike[Any]') -> '_ArrayLike[Any]': ... - - def __mod__(self, value: object) -> '_ArrayLike[_S]': ... - - def __mul__(self, value: object) -> '_ArrayLike[Any]': ... - - def __ne__(self, value: object) -> '_ArrayLike[bool]': ... # type: ignore - - def __neg__(self) -> '_ArrayLike[_S]': ... - - def __or__(self, value: object) -> '_ArrayLike[_S]': ... - - def __pos__(self) -> '_ArrayLike[_S]': ... - - def __pow__(self, value: object) -> '_ArrayLike[Any]': ... - - def __radd__(self, value: object) -> '_ArrayLike[Any]': ... - - def __rand__(self, value: object) -> '_ArrayLike[_S]': ... - - def __rdivmod__(self, value: object) -> Tuple['_ArrayLike[int]', '_ArrayLike[float]']: ... - - def __rfloordiv__(self, value: object) -> '_ArrayLike[Any]': ... - - def __rlshift__(self, value: object) -> '_ArrayLike[Any]': ... - - def __rmatmul__(self, value: object) -> '_ArrayLike[Any]': ... - - def __rmod__(self, value: object) -> '_ArrayLike[Any]': ... - - def __rmul__(self, value: object) -> '_ArrayLike[Any]': ... - - def __ror__(self, value: object) -> '_ArrayLike[_S]': ... - - def __rpow__(self, value: object) -> '_ArrayLike[Any]': ... - - def __rrshift__(self, value: object) -> '_ArrayLike[Any]': ... - - def __rshift__(self, value: object) -> '_ArrayLike[Any]': ... - - def __rsub__(self, value: object) -> '_ArrayLike[Any]': ... - - def __rtruediv__(self, value: object) -> '_ArrayLike[Any]': ... - - def __rxor__(self, value: object) -> '_ArrayLike[_S]': ... - - def __setattr__(self, name: str, value: Any) -> None: ... - - def __setitem__(self, key: Any, value: Any) -> None: ... - - def __str__(self) -> str: ... - - def __sub__(self, value: object) -> '_ArrayLike[Any]': ... - - def __truediv__(sel, value: object) -> '_ArrayLike[Any]': ... - - def __xor__(self, value: object) -> '_ArrayLike[_S]': ... - -# -# numpy's scalar hierarchy (http://docs.scipy.org/doc/numpy/reference/arrays.scalars.html#scalars) -# - -class generic(_ArrayLike[_S], Generic[_S]): ... -class bool_(generic[bool]): ... -bool8 = bool_ -class object_(generic[Any]): ... -class number(generic[_S], Generic[_S]): ... -class integer(number[int]): ... -class signedinteger(integer): ... -class byte(signedinteger): ... -class short(signedinteger): ... -class intc(signedinteger): ... -class int_(signedinteger): ... -class longlong(signedinteger): ... -class int8(signedinteger): ... -class int16(signedinteger): ... -class int32(signedinteger): ... -class int64(signedinteger): ... -class unsignedinteger(integer): ... -class ubyte(unsignedinteger): ... -class ushort(unsignedinteger): ... -class uintc(unsignedinteger): ... -class uint(unsignedinteger): ... -class ulonglong(unsignedinteger): ... -class uint8(signedinteger): ... -class uint16(signedinteger): ... -class uint32(signedinteger): ... -class uint64(signedinteger): ... -class inexact(number[float]): ... -class floating(inexact): ... -class half(floating): ... -class single(floating): ... -class float_(floating): ... -class longfloat_(floating): ... -class float16(floating): ... -class float32(floating): ... -class float64(floating): ... -class float128(floating): ... -class complextfloating(inexact): ... -class csingle(complextfloating): ... -class complex_(complextfloating): ... -class clongfloat(complextfloating): ... -class complex64(complextfloating): ... -class complex128(complextfloating): ... -class complex256(complextfloating): ... -class flexible(generic[_S], Generic[_S]): ... -class character(flexible[str]): ... -class str_(character): ... -class unicode_(character): ... -class void(flexible[None]): ... - -class ndarray(_ArrayLike[_S], Generic[_S]): - """numpy.ndarray""" - ctypes = None # type: Any # TODO Implement ctypes type hint - - # TODO Need to find a way to restrict buffer type - def __init__(self, shape: Tuple[int, ...], dtype: DtypeType=None, - buffer: Any=None, offset: int=None, - strides: Tuple[int, ...]=None, order: str=None) -> None: ... - -# -# Array creation routines -# - -def array(object: Any, dtype: Any=None, copy: bool=True, - order: str=None, subok: bool=False, - ndmin: int=0) -> ndarray[Any]: ... -def asarray(a: Any, dtype: DtypeType=None, order: str=None) -> ndarray[Any]: ... -def asanyarray(a: Any, dtype: DtypeType=None, order: str=None) -> ndarray[Any]: ... # TODO figure out a way to restrict the return type -def asmatrix(data: Any, dtype: DtypeType=None) -> Any: ... # TODO define matrix -def ascontiguousarray(a: Any, dtype: DtypeType=None) -> ndarray[Any]: ... -def copy(a: Any, order: str=None) -> ndarray[Any]: ... -def empty(shape: ShapeType, dtype: DtypeType=float, order: str='C') -> ndarray[Any]: ... -def empty_like(a: Any, dtype: Any=None, order: str='K', subok: bool=True) -> ndarray[Any]: ... -def eye(N: int, M: int=None, k: int=0, dtype: DtypeType=float) -> ndarray[Any]: ... -def frombuffer(buffer: Any, dtype: DtypeType=float, count: int=-1, # TODO figure out a way to restrict buffer - offset: int=0) -> ndarray[Any]: ... -def fromfile(file: object, dtype: DtypeType=float, count: int=-1, sep: str='') -> ndarray[Any]: ... # TODO fix file definition (There's a bug in mypy io's namespace https://github.com/python/mypy/issues/1462) -def full(shape: ShapeType, fill_value: Any, dtype: DtypeType=None, - order: str='C') -> ndarray[Any]: ... -def full_like(a: Any, fill_value: Any, dtype: DtypeType=None, order: str='C', - subok: bool=True) -> ndarray[Any]: ... -def fromfunction(function: Callable[..., _S], shape: ShapeType, dtype: DtypeType=float) -> ndarray[_S]: ... -def fromiter(iterable: Iterator[Any], dytpe: DtypeType, count: int=-1) -> ndarray[Any]: ... -def fromstring(string: str, dtype: DtypeType=float, count: int=-1, sep: str='') -> ndarray[Any]: ... -def identity(n: int, dtype: DtypeType=None) -> ndarray[Any]: ... -def loadtxt(fname: Any, dtype: DtypeType=float, comments: Union[str, Sequence[str]]='#', - delimiter: str=None, converters: Dict[int, Callable[[Any], float]]=None, - skiprows: int=0, usecols: Sequence[int]=None, - unpack: bool=False, ndmin: int=0) -> ndarray[float]: ... -def ones(shape: ShapeType, dtype: Optional[DtypeType]=..., order: str='C') -> ndarray[Any]: ... -def ones_like(a: Any, dtype: Any=None, order: str='K', subok: bool=True) -> ndarray[Any]: ... -def zeros(shape: ShapeType, dtype: DtypeType=float, order: str='C') -> ndarray[Any]: ... -def zeros_like(a: Any, dtype: Any=None, order: str='K', subok: bool=True) -> ndarray[Any]: ... - -def seterr(all: str=None, divide: str=None, over: str=None, invalid: str=None) -> Dict[str, str]: ... - -class finfoobj: - eps = None # type: float - epsneg = None # type: float - iexp = None # type: int - #machar = None # type: MachAr - machep = None # type: int - max = None # type: float - maxexp = None # type: int - min = None # type: float - minexp = None # type: int - negep = None # type: int - nexp = None # type: int - nmant = None # type: int - precision = None # type: int - resolution = None # type: float - tiny = None # type: float - -def finfo(dtype: Any) -> finfoobj: ... - -@overload -def logical_and(x1: _ArrayLike[bool], x2: _ArrayLike[bool]) -> ndarray[bool]: ... -@overload -def logical_and(x1: bool, x2: bool) -> bool: ... - -@overload -def logical_or(x1: _ArrayLike[bool], x2: _ArrayLike[bool]) -> ndarray[bool]: ... -@overload -def logical_or(x1: bool, x2: bool) -> bool: ... - -@overload -def logical_not(x: bool) -> bool: ... -@overload -def logical_not(x: _ArrayLike[bool]) -> ndarray[bool]: ... - -@overload -def logical_xor(x1: _ArrayLike[bool], x2: _ArrayLike[bool]) -> ndarray[bool]: ... -@overload -def logical_xor(x1: bool, x2: bool) -> bool: ... - -def arange(start=0, stop=0, step=1, dtype: DtypeType=None) -> ndarray[Any]: ... diff -Nru uranium-3.3.0/stubs/numpy/linalg/__init__.pyi uranium-4.4.1/stubs/numpy/linalg/__init__.pyi --- uranium-3.3.0/stubs/numpy/linalg/__init__.pyi 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/stubs/numpy/linalg/__init__.pyi 1970-01-01 00:00:00.000000000 +0000 @@ -1,5 +0,0 @@ -from numpy import AxesType, ndarray -from typing import (Any, Union) - -# FIXME: This definition is incomplete and doesn't represent the full range of the norm() function. -def norm(vector: ndarray[Any], ord: Union[int,float,str,None]=None, axis: AxesType=None) -> float: ... diff -Nru uranium-3.3.0/stubs/PyQt5/_QOpenGLFunctions_2_0.pyi uranium-4.4.1/stubs/PyQt5/_QOpenGLFunctions_2_0.pyi --- uranium-3.3.0/stubs/PyQt5/_QOpenGLFunctions_2_0.pyi 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/stubs/PyQt5/_QOpenGLFunctions_2_0.pyi 1970-01-01 00:00:00.000000000 +0000 @@ -1,581 +0,0 @@ -# The PEP 484 type hints stub file for the _QOpenGLFunctions_2_0 module. -# -# Generated by SIP 4.18 -# -# Copyright (c) 2016 Riverbank Computing Limited -# -# This file is part of PyQt5. -# -# This file may be used under the terms of the GNU General Public License -# version 3.0 as published by the Free Software Foundation and appearing in -# the file LICENSE included in the packaging of this file. Please review the -# following information to ensure the GNU General Public License version 3.0 -# requirements will be met: http://www.gnu.org/copyleft/gpl.html. -# -# If you do not wish to use this file under the terms of the GPL version 3.0 -# then you may purchase a commercial license. For more information contact -# info@riverbankcomputing.com. -# -# This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -# WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - - -import typing -import sip - -from PyQt5 import QtGui - -# Support for QDate, QDateTime and QTime. -import datetime - -# Convenient type aliases. -PYQT_SIGNAL = typing.Union[QtCore.pyqtSignal, QtCore.pyqtBoundSignal] -PYQT_SLOT = typing.Union[typing.Callable[..., None], QtCore.pyqtBoundSignal] - -# Convenient aliases for complicated OpenGL types. -PYQT_OPENGL_ARRAY = typing.Union[typing.Sequence[int], typing.Sequence[float], - sip.Buffer, None] -PYQT_OPENGL_BOUND_ARRAY = typing.Union[typing.Sequence[int], - typing.Sequence[float], sip.Buffer, int, None] - - -class QOpenGLFunctions_2_0(QtGui.QAbstractOpenGLFunctions): - - def __init__(self) -> None: ... - - def glVertexAttrib1d(self, index: int, x: float) -> None: ... - def glVertexAttrib1dv(self, index: int, v: PYQT_OPENGL_ARRAY) -> None: ... - def glVertexAttrib1f(self, index: int, x: float) -> None: ... - def glVertexAttrib1fv(self, index: int, v: PYQT_OPENGL_ARRAY) -> None: ... - def glVertexAttrib1s(self, index: int, x: int) -> None: ... - def glVertexAttrib1sv(self, index: int, v: PYQT_OPENGL_ARRAY) -> None: ... - def glVertexAttrib2d(self, index: int, x: float, y: float) -> None: ... - def glVertexAttrib2dv(self, index: int, v: PYQT_OPENGL_ARRAY) -> None: ... - def glVertexAttrib2f(self, index: int, x: float, y: float) -> None: ... - def glVertexAttrib2fv(self, index: int, v: PYQT_OPENGL_ARRAY) -> None: ... - def glVertexAttrib2s(self, index: int, x: int, y: int) -> None: ... - def glVertexAttrib2sv(self, index: int, v: PYQT_OPENGL_ARRAY) -> None: ... - def glVertexAttrib3d(self, index: int, x: float, y: float, z: float) -> None: ... - def glVertexAttrib3dv(self, index: int, v: PYQT_OPENGL_ARRAY) -> None: ... - def glVertexAttrib3f(self, index: int, x: float, y: float, z: float) -> None: ... - def glVertexAttrib3fv(self, index: int, v: PYQT_OPENGL_ARRAY) -> None: ... - def glVertexAttrib3s(self, index: int, x: int, y: int, z: int) -> None: ... - def glVertexAttrib3sv(self, index: int, v: PYQT_OPENGL_ARRAY) -> None: ... - def glVertexAttrib4Nbv(self, index: int, v: PYQT_OPENGL_ARRAY) -> None: ... - def glVertexAttrib4Niv(self, index: int, v: PYQT_OPENGL_ARRAY) -> None: ... - def glVertexAttrib4Nsv(self, index: int, v: PYQT_OPENGL_ARRAY) -> None: ... - def glVertexAttrib4Nub(self, index: int, x: int, y: int, z: int, w: int) -> None: ... - def glVertexAttrib4Nubv(self, index: int, v: PYQT_OPENGL_ARRAY) -> None: ... - def glVertexAttrib4Nuiv(self, index: int, v: PYQT_OPENGL_ARRAY) -> None: ... - def glVertexAttrib4Nusv(self, index: int, v: PYQT_OPENGL_ARRAY) -> None: ... - def glVertexAttrib4bv(self, index: int, v: PYQT_OPENGL_ARRAY) -> None: ... - def glVertexAttrib4d(self, index: int, x: float, y: float, z: float, w: float) -> None: ... - def glVertexAttrib4dv(self, index: int, v: PYQT_OPENGL_ARRAY) -> None: ... - def glVertexAttrib4f(self, index: int, x: float, y: float, z: float, w: float) -> None: ... - def glVertexAttrib4fv(self, index: int, v: PYQT_OPENGL_ARRAY) -> None: ... - def glVertexAttrib4iv(self, index: int, v: PYQT_OPENGL_ARRAY) -> None: ... - def glVertexAttrib4s(self, index: int, x: int, y: int, z: int, w: int) -> None: ... - def glVertexAttrib4sv(self, index: int, v: PYQT_OPENGL_ARRAY) -> None: ... - def glVertexAttrib4ubv(self, index: int, v: PYQT_OPENGL_ARRAY) -> None: ... - def glVertexAttrib4uiv(self, index: int, v: PYQT_OPENGL_ARRAY) -> None: ... - def glVertexAttrib4usv(self, index: int, v: PYQT_OPENGL_ARRAY) -> None: ... - def glFogCoordf(self, coord: float) -> None: ... - def glFogCoordfv(self, coord: PYQT_OPENGL_ARRAY) -> None: ... - def glFogCoordd(self, coord: float) -> None: ... - def glFogCoorddv(self, coord: PYQT_OPENGL_ARRAY) -> None: ... - def glFogCoordPointer(self, type: int, stride: int, pointer: PYQT_OPENGL_ARRAY) -> None: ... - def glSecondaryColor3b(self, red: int, green: int, blue: int) -> None: ... - def glSecondaryColor3bv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glSecondaryColor3d(self, red: float, green: float, blue: float) -> None: ... - def glSecondaryColor3dv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glSecondaryColor3f(self, red: float, green: float, blue: float) -> None: ... - def glSecondaryColor3fv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glSecondaryColor3i(self, red: int, green: int, blue: int) -> None: ... - def glSecondaryColor3iv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glSecondaryColor3s(self, red: int, green: int, blue: int) -> None: ... - def glSecondaryColor3sv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glSecondaryColor3ub(self, red: int, green: int, blue: int) -> None: ... - def glSecondaryColor3ubv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glSecondaryColor3ui(self, red: int, green: int, blue: int) -> None: ... - def glSecondaryColor3uiv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glSecondaryColor3us(self, red: int, green: int, blue: int) -> None: ... - def glSecondaryColor3usv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glSecondaryColorPointer(self, size: int, type: int, stride: int, pointer: PYQT_OPENGL_ARRAY) -> None: ... - def glWindowPos2d(self, x: float, y: float) -> None: ... - def glWindowPos2dv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glWindowPos2f(self, x: float, y: float) -> None: ... - def glWindowPos2fv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glWindowPos2i(self, x: int, y: int) -> None: ... - def glWindowPos2iv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glWindowPos2s(self, x: int, y: int) -> None: ... - def glWindowPos2sv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glWindowPos3d(self, x: float, y: float, z: float) -> None: ... - def glWindowPos3dv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glWindowPos3f(self, x: float, y: float, z: float) -> None: ... - def glWindowPos3fv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glWindowPos3i(self, x: int, y: int, z: int) -> None: ... - def glWindowPos3iv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glWindowPos3s(self, x: int, y: int, z: int) -> None: ... - def glWindowPos3sv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glClientActiveTexture(self, texture: int) -> None: ... - def glMultiTexCoord1d(self, target: int, s: float) -> None: ... - def glMultiTexCoord1dv(self, target: int, v: PYQT_OPENGL_ARRAY) -> None: ... - def glMultiTexCoord1f(self, target: int, s: float) -> None: ... - def glMultiTexCoord1fv(self, target: int, v: PYQT_OPENGL_ARRAY) -> None: ... - def glMultiTexCoord1i(self, target: int, s: int) -> None: ... - def glMultiTexCoord1iv(self, target: int, v: PYQT_OPENGL_ARRAY) -> None: ... - def glMultiTexCoord1s(self, target: int, s: int) -> None: ... - def glMultiTexCoord1sv(self, target: int, v: PYQT_OPENGL_ARRAY) -> None: ... - def glMultiTexCoord2d(self, target: int, s: float, t: float) -> None: ... - def glMultiTexCoord2dv(self, target: int, v: PYQT_OPENGL_ARRAY) -> None: ... - def glMultiTexCoord2f(self, target: int, s: float, t: float) -> None: ... - def glMultiTexCoord2fv(self, target: int, v: PYQT_OPENGL_ARRAY) -> None: ... - def glMultiTexCoord2i(self, target: int, s: int, t: int) -> None: ... - def glMultiTexCoord2iv(self, target: int, v: PYQT_OPENGL_ARRAY) -> None: ... - def glMultiTexCoord2s(self, target: int, s: int, t: int) -> None: ... - def glMultiTexCoord2sv(self, target: int, v: PYQT_OPENGL_ARRAY) -> None: ... - def glMultiTexCoord3d(self, target: int, s: float, t: float, r: float) -> None: ... - def glMultiTexCoord3dv(self, target: int, v: PYQT_OPENGL_ARRAY) -> None: ... - def glMultiTexCoord3f(self, target: int, s: float, t: float, r: float) -> None: ... - def glMultiTexCoord3fv(self, target: int, v: PYQT_OPENGL_ARRAY) -> None: ... - def glMultiTexCoord3i(self, target: int, s: int, t: int, r: int) -> None: ... - def glMultiTexCoord3iv(self, target: int, v: PYQT_OPENGL_ARRAY) -> None: ... - def glMultiTexCoord3s(self, target: int, s: int, t: int, r: int) -> None: ... - def glMultiTexCoord3sv(self, target: int, v: PYQT_OPENGL_ARRAY) -> None: ... - def glMultiTexCoord4d(self, target: int, s: float, t: float, r: float, q: float) -> None: ... - def glMultiTexCoord4dv(self, target: int, v: PYQT_OPENGL_ARRAY) -> None: ... - def glMultiTexCoord4f(self, target: int, s: float, t: float, r: float, q: float) -> None: ... - def glMultiTexCoord4fv(self, target: int, v: PYQT_OPENGL_ARRAY) -> None: ... - def glMultiTexCoord4i(self, target: int, s: int, t: int, r: int, q: int) -> None: ... - def glMultiTexCoord4iv(self, target: int, v: PYQT_OPENGL_ARRAY) -> None: ... - def glMultiTexCoord4s(self, target: int, s: int, t: int, r: int, q: int) -> None: ... - def glMultiTexCoord4sv(self, target: int, v: PYQT_OPENGL_ARRAY) -> None: ... - def glLoadTransposeMatrixf(self, m: PYQT_OPENGL_ARRAY) -> None: ... - def glLoadTransposeMatrixd(self, m: PYQT_OPENGL_ARRAY) -> None: ... - def glMultTransposeMatrixf(self, m: PYQT_OPENGL_ARRAY) -> None: ... - def glMultTransposeMatrixd(self, m: PYQT_OPENGL_ARRAY) -> None: ... - def glColorTable(self, target: int, internalformat: int, width: int, format: int, type: int, table: PYQT_OPENGL_ARRAY) -> None: ... - def glColorTableParameterfv(self, target: int, pname: int, params: PYQT_OPENGL_ARRAY) -> None: ... - def glColorTableParameteriv(self, target: int, pname: int, params: PYQT_OPENGL_ARRAY) -> None: ... - def glCopyColorTable(self, target: int, internalformat: int, x: int, y: int, width: int) -> None: ... - def glGetColorTableParameterfv(self, target: int, pname: int) -> typing.Union[float, typing.Tuple[float, float, float, float]]: ... - def glGetColorTableParameteriv(self, target: int, pname: int) -> typing.Union[int, typing.Tuple[int, int, int, int]]: ... - def glColorSubTable(self, target: int, start: int, count: int, format: int, type: int, data: PYQT_OPENGL_ARRAY) -> None: ... - def glCopyColorSubTable(self, target: int, start: int, x: int, y: int, width: int) -> None: ... - def glConvolutionFilter1D(self, target: int, internalformat: int, width: int, format: int, type: int, image: PYQT_OPENGL_ARRAY) -> None: ... - def glConvolutionFilter2D(self, target: int, internalformat: int, width: int, height: int, format: int, type: int, image: PYQT_OPENGL_ARRAY) -> None: ... - def glConvolutionParameterf(self, target: int, pname: int, params: float) -> None: ... - def glConvolutionParameterfv(self, target: int, pname: int, params: PYQT_OPENGL_ARRAY) -> None: ... - def glConvolutionParameteri(self, target: int, pname: int, params: int) -> None: ... - def glConvolutionParameteriv(self, target: int, pname: int, params: PYQT_OPENGL_ARRAY) -> None: ... - def glCopyConvolutionFilter1D(self, target: int, internalformat: int, x: int, y: int, width: int) -> None: ... - def glCopyConvolutionFilter2D(self, target: int, internalformat: int, x: int, y: int, width: int, height: int) -> None: ... - def glGetConvolutionParameterfv(self, target: int, pname: int) -> typing.Union[float, typing.Tuple[float, float, float, float]]: ... - def glGetConvolutionParameteriv(self, target: int, pname: int) -> typing.Union[int, typing.Tuple[int, int, int, int]]: ... - def glHistogram(self, target: int, width: int, internalformat: int, sink: int) -> None: ... - def glMinmax(self, target: int, internalformat: int, sink: int) -> None: ... - def glResetHistogram(self, target: int) -> None: ... - def glResetMinmax(self, target: int) -> None: ... - def glArrayElement(self, i: int) -> None: ... - def glColorPointer(self, size: int, type: int, stride: int, pointer: PYQT_OPENGL_BOUND_ARRAY) -> None: ... - def glDisableClientState(self, array: int) -> None: ... - def glEdgeFlagPointer(self, stride: int, pointer: PYQT_OPENGL_BOUND_ARRAY) -> None: ... - def glEnableClientState(self, array: int) -> None: ... - def glIndexPointer(self, type: int, stride: int, pointer: PYQT_OPENGL_BOUND_ARRAY) -> None: ... - def glNormalPointer(self, type: int, stride: int, pointer: PYQT_OPENGL_BOUND_ARRAY) -> None: ... - def glTexCoordPointer(self, size: int, type: int, stride: int, pointer: PYQT_OPENGL_BOUND_ARRAY) -> None: ... - def glVertexPointer(self, size: int, type: int, stride: int, pointer: PYQT_OPENGL_BOUND_ARRAY) -> None: ... - def glPopClientAttrib(self) -> None: ... - def glPushClientAttrib(self, mask: int) -> None: ... - def glNewList(self, list: int, mode: int) -> None: ... - def glEndList(self) -> None: ... - def glCallList(self, list: int) -> None: ... - def glDeleteLists(self, list: int, range: int) -> None: ... - def glGenLists(self, range: int) -> int: ... - def glListBase(self, base: int) -> None: ... - def glBegin(self, mode: int) -> None: ... - def glBitmap(self, width: int, height: int, xorig: float, yorig: float, xmove: float, ymove: float, bitmap: PYQT_OPENGL_ARRAY) -> None: ... - def glColor3b(self, red: int, green: int, blue: int) -> None: ... - def glColor3bv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glColor3d(self, red: float, green: float, blue: float) -> None: ... - def glColor3dv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glColor3f(self, red: float, green: float, blue: float) -> None: ... - def glColor3fv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glColor3i(self, red: int, green: int, blue: int) -> None: ... - def glColor3iv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glColor3s(self, red: int, green: int, blue: int) -> None: ... - def glColor3sv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glColor3ub(self, red: int, green: int, blue: int) -> None: ... - def glColor3ubv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glColor3ui(self, red: int, green: int, blue: int) -> None: ... - def glColor3uiv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glColor3us(self, red: int, green: int, blue: int) -> None: ... - def glColor3usv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glColor4b(self, red: int, green: int, blue: int, alpha: int) -> None: ... - def glColor4bv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glColor4d(self, red: float, green: float, blue: float, alpha: float) -> None: ... - def glColor4dv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glColor4f(self, red: float, green: float, blue: float, alpha: float) -> None: ... - def glColor4fv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glColor4i(self, red: int, green: int, blue: int, alpha: int) -> None: ... - def glColor4iv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glColor4s(self, red: int, green: int, blue: int, alpha: int) -> None: ... - def glColor4sv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glColor4ub(self, red: int, green: int, blue: int, alpha: int) -> None: ... - def glColor4ubv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glColor4ui(self, red: int, green: int, blue: int, alpha: int) -> None: ... - def glColor4uiv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glColor4us(self, red: int, green: int, blue: int, alpha: int) -> None: ... - def glColor4usv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glEdgeFlag(self, flag: int) -> None: ... - def glEdgeFlagv(self, flag: PYQT_OPENGL_ARRAY) -> None: ... - def glEnd(self) -> None: ... - def glIndexd(self, c: float) -> None: ... - def glIndexdv(self, c: PYQT_OPENGL_ARRAY) -> None: ... - def glIndexf(self, c: float) -> None: ... - def glIndexfv(self, c: PYQT_OPENGL_ARRAY) -> None: ... - def glIndexi(self, c: int) -> None: ... - def glIndexiv(self, c: PYQT_OPENGL_ARRAY) -> None: ... - def glIndexs(self, c: int) -> None: ... - def glIndexsv(self, c: PYQT_OPENGL_ARRAY) -> None: ... - def glNormal3b(self, nx: int, ny: int, nz: int) -> None: ... - def glNormal3bv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glNormal3d(self, nx: float, ny: float, nz: float) -> None: ... - def glNormal3dv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glNormal3f(self, nx: float, ny: float, nz: float) -> None: ... - def glNormal3fv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glNormal3i(self, nx: int, ny: int, nz: int) -> None: ... - def glNormal3iv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glNormal3s(self, nx: int, ny: int, nz: int) -> None: ... - def glNormal3sv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glRasterPos2d(self, x: float, y: float) -> None: ... - def glRasterPos2dv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glRasterPos2f(self, x: float, y: float) -> None: ... - def glRasterPos2fv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glRasterPos2i(self, x: int, y: int) -> None: ... - def glRasterPos2iv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glRasterPos2s(self, x: int, y: int) -> None: ... - def glRasterPos2sv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glRasterPos3d(self, x: float, y: float, z: float) -> None: ... - def glRasterPos3dv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glRasterPos3f(self, x: float, y: float, z: float) -> None: ... - def glRasterPos3fv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glRasterPos3i(self, x: int, y: int, z: int) -> None: ... - def glRasterPos3iv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glRasterPos3s(self, x: int, y: int, z: int) -> None: ... - def glRasterPos3sv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glRasterPos4d(self, x: float, y: float, z: float, w: float) -> None: ... - def glRasterPos4dv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glRasterPos4f(self, x: float, y: float, z: float, w: float) -> None: ... - def glRasterPos4fv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glRasterPos4i(self, x: int, y: int, z: int, w: int) -> None: ... - def glRasterPos4iv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glRasterPos4s(self, x: int, y: int, z: int, w: int) -> None: ... - def glRasterPos4sv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glRectd(self, x1: float, y1: float, x2: float, y2: float) -> None: ... - def glRectf(self, x1: float, y1: float, x2: float, y2: float) -> None: ... - def glRecti(self, x1: int, y1: int, x2: int, y2: int) -> None: ... - def glRects(self, x1: int, y1: int, x2: int, y2: int) -> None: ... - def glTexCoord1d(self, s: float) -> None: ... - def glTexCoord1dv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glTexCoord1f(self, s: float) -> None: ... - def glTexCoord1fv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glTexCoord1i(self, s: int) -> None: ... - def glTexCoord1iv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glTexCoord1s(self, s: int) -> None: ... - def glTexCoord1sv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glTexCoord2d(self, s: float, t: float) -> None: ... - def glTexCoord2dv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glTexCoord2f(self, s: float, t: float) -> None: ... - def glTexCoord2fv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glTexCoord2i(self, s: int, t: int) -> None: ... - def glTexCoord2iv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glTexCoord2s(self, s: int, t: int) -> None: ... - def glTexCoord2sv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glTexCoord3d(self, s: float, t: float, r: float) -> None: ... - def glTexCoord3dv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glTexCoord3f(self, s: float, t: float, r: float) -> None: ... - def glTexCoord3fv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glTexCoord3i(self, s: int, t: int, r: int) -> None: ... - def glTexCoord3iv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glTexCoord3s(self, s: int, t: int, r: int) -> None: ... - def glTexCoord3sv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glTexCoord4d(self, s: float, t: float, r: float, q: float) -> None: ... - def glTexCoord4dv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glTexCoord4f(self, s: float, t: float, r: float, q: float) -> None: ... - def glTexCoord4fv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glTexCoord4i(self, s: int, t: int, r: int, q: int) -> None: ... - def glTexCoord4iv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glTexCoord4s(self, s: int, t: int, r: int, q: int) -> None: ... - def glTexCoord4sv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glVertex2d(self, x: float, y: float) -> None: ... - def glVertex2dv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glVertex2f(self, x: float, y: float) -> None: ... - def glVertex2fv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glVertex2i(self, x: int, y: int) -> None: ... - def glVertex2iv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glVertex2s(self, x: int, y: int) -> None: ... - def glVertex2sv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glVertex3d(self, x: float, y: float, z: float) -> None: ... - def glVertex3dv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glVertex3f(self, x: float, y: float, z: float) -> None: ... - def glVertex3fv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glVertex3i(self, x: int, y: int, z: int) -> None: ... - def glVertex3iv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glVertex3s(self, x: int, y: int, z: int) -> None: ... - def glVertex3sv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glVertex4d(self, x: float, y: float, z: float, w: float) -> None: ... - def glVertex4dv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glVertex4f(self, x: float, y: float, z: float, w: float) -> None: ... - def glVertex4fv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glVertex4i(self, x: int, y: int, z: int, w: int) -> None: ... - def glVertex4iv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glVertex4s(self, x: int, y: int, z: int, w: int) -> None: ... - def glVertex4sv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glClipPlane(self, plane: int, equation: PYQT_OPENGL_ARRAY) -> None: ... - def glColorMaterial(self, face: int, mode: int) -> None: ... - def glFogf(self, pname: int, param: float) -> None: ... - def glFogfv(self, pname: int, params: PYQT_OPENGL_ARRAY) -> None: ... - def glFogi(self, pname: int, param: int) -> None: ... - def glFogiv(self, pname: int, params: PYQT_OPENGL_ARRAY) -> None: ... - def glLightf(self, light: int, pname: int, param: float) -> None: ... - def glLightfv(self, light: int, pname: int, params: PYQT_OPENGL_ARRAY) -> None: ... - def glLighti(self, light: int, pname: int, param: int) -> None: ... - def glLightiv(self, light: int, pname: int, params: PYQT_OPENGL_ARRAY) -> None: ... - def glLightModelf(self, pname: int, param: float) -> None: ... - def glLightModelfv(self, pname: int, params: PYQT_OPENGL_ARRAY) -> None: ... - def glLightModeli(self, pname: int, param: int) -> None: ... - def glLightModeliv(self, pname: int, params: PYQT_OPENGL_ARRAY) -> None: ... - def glLineStipple(self, factor: int, pattern: int) -> None: ... - def glMaterialf(self, face: int, pname: int, param: float) -> None: ... - def glMaterialfv(self, face: int, pname: int, params: PYQT_OPENGL_ARRAY) -> None: ... - def glMateriali(self, face: int, pname: int, param: int) -> None: ... - def glMaterialiv(self, face: int, pname: int, params: PYQT_OPENGL_ARRAY) -> None: ... - def glPolygonStipple(self, mask: PYQT_OPENGL_ARRAY) -> None: ... - def glShadeModel(self, mode: int) -> None: ... - def glTexEnvf(self, target: int, pname: int, param: float) -> None: ... - def glTexEnvfv(self, target: int, pname: int, params: PYQT_OPENGL_ARRAY) -> None: ... - def glTexEnvi(self, target: int, pname: int, param: int) -> None: ... - def glTexEnviv(self, target: int, pname: int, params: PYQT_OPENGL_ARRAY) -> None: ... - def glTexGend(self, coord: int, pname: int, param: float) -> None: ... - def glTexGendv(self, coord: int, pname: int, params: PYQT_OPENGL_ARRAY) -> None: ... - def glTexGenf(self, coord: int, pname: int, param: float) -> None: ... - def glTexGenfv(self, coord: int, pname: int, params: PYQT_OPENGL_ARRAY) -> None: ... - def glTexGeni(self, coord: int, pname: int, param: int) -> None: ... - def glTexGeniv(self, coord: int, pname: int, params: PYQT_OPENGL_ARRAY) -> None: ... - def glRenderMode(self, mode: int) -> int: ... - def glInitNames(self) -> None: ... - def glLoadName(self, name: int) -> None: ... - def glPassThrough(self, token: float) -> None: ... - def glPopName(self) -> None: ... - def glPushName(self, name: int) -> None: ... - def glClearAccum(self, red: float, green: float, blue: float, alpha: float) -> None: ... - def glClearIndex(self, c: float) -> None: ... - def glIndexMask(self, mask: int) -> None: ... - def glAccum(self, op: int, value: float) -> None: ... - def glPopAttrib(self) -> None: ... - def glPushAttrib(self, mask: int) -> None: ... - def glMap1d(self, target: int, u1: float, u2: float, stride: int, order: int, points: PYQT_OPENGL_ARRAY) -> None: ... - def glMap1f(self, target: int, u1: float, u2: float, stride: int, order: int, points: PYQT_OPENGL_ARRAY) -> None: ... - def glMap2d(self, target: int, u1: float, u2: float, ustride: int, uorder: int, v1: float, v2: float, vstride: int, vorder: int, points: PYQT_OPENGL_ARRAY) -> None: ... - def glMap2f(self, target: int, u1: float, u2: float, ustride: int, uorder: int, v1: float, v2: float, vstride: int, vorder: int, points: PYQT_OPENGL_ARRAY) -> None: ... - def glMapGrid1d(self, un: int, u1: float, u2: float) -> None: ... - def glMapGrid1f(self, un: int, u1: float, u2: float) -> None: ... - def glMapGrid2d(self, un: int, u1: float, u2: float, vn: int, v1: float, v2: float) -> None: ... - def glMapGrid2f(self, un: int, u1: float, u2: float, vn: int, v1: float, v2: float) -> None: ... - def glEvalCoord1d(self, u: float) -> None: ... - def glEvalCoord1dv(self, u: PYQT_OPENGL_ARRAY) -> None: ... - def glEvalCoord1f(self, u: float) -> None: ... - def glEvalCoord1fv(self, u: PYQT_OPENGL_ARRAY) -> None: ... - def glEvalCoord2d(self, u: float, v: float) -> None: ... - def glEvalCoord2dv(self, u: PYQT_OPENGL_ARRAY) -> None: ... - def glEvalCoord2f(self, u: float, v: float) -> None: ... - def glEvalCoord2fv(self, u: PYQT_OPENGL_ARRAY) -> None: ... - def glEvalMesh1(self, mode: int, i1: int, i2: int) -> None: ... - def glEvalPoint1(self, i: int) -> None: ... - def glEvalMesh2(self, mode: int, i1: int, i2: int, j1: int, j2: int) -> None: ... - def glEvalPoint2(self, i: int, j: int) -> None: ... - def glAlphaFunc(self, func: int, ref: float) -> None: ... - def glPixelZoom(self, xfactor: float, yfactor: float) -> None: ... - def glPixelTransferf(self, pname: int, param: float) -> None: ... - def glPixelTransferi(self, pname: int, param: int) -> None: ... - def glPixelMapfv(self, map: int, mapsize: int, values: PYQT_OPENGL_ARRAY) -> None: ... - def glPixelMapuiv(self, map: int, mapsize: int, values: PYQT_OPENGL_ARRAY) -> None: ... - def glPixelMapusv(self, map: int, mapsize: int, values: PYQT_OPENGL_ARRAY) -> None: ... - def glCopyPixels(self, x: int, y: int, width: int, height: int, type: int) -> None: ... - def glDrawPixels(self, width: int, height: int, format: int, type: int, pixels: PYQT_OPENGL_ARRAY) -> None: ... - def glGetClipPlane(self, plane: int) -> typing.Tuple[float, float, float, float]: ... - def glGetLightfv(self, light: int, pname: int) -> typing.Union[float, typing.Tuple[float, float, float], typing.Tuple[float, float, float, float]]: ... - def glGetLightiv(self, light: int, pname: int) -> typing.Union[int, typing.Tuple[int, int, int], typing.Tuple[int, int, int, int]]: ... - def glGetMaterialfv(self, face: int, pname: int) -> typing.Union[float, typing.Tuple[float, float, float], typing.Tuple[float, float, float, float]]: ... - def glGetMaterialiv(self, face: int, pname: int) -> typing.Union[int, typing.Tuple[int, int, int], typing.Tuple[int, int, int, int]]: ... - def glGetTexEnvfv(self, target: int, pname: int) -> typing.Union[float, typing.Tuple[float, float, float, float]]: ... - def glGetTexEnviv(self, target: int, pname: int) -> typing.Union[int, typing.Tuple[int, int, int, int]]: ... - def glGetTexGendv(self, coord: int, pname: int) -> typing.Union[float, typing.Tuple[float, float, float, float]]: ... - def glGetTexGenfv(self, coord: int, pname: int) -> typing.Union[float, typing.Tuple[float, float, float, float]]: ... - def glGetTexGeniv(self, coord: int, pname: int) -> typing.Union[int, typing.Tuple[int, int, int, int]]: ... - def glIsList(self, list: int) -> int: ... - def glFrustum(self, left: float, right: float, bottom: float, top: float, zNear: float, zFar: float) -> None: ... - def glLoadIdentity(self) -> None: ... - def glLoadMatrixf(self, m: PYQT_OPENGL_ARRAY) -> None: ... - def glLoadMatrixd(self, m: PYQT_OPENGL_ARRAY) -> None: ... - def glMatrixMode(self, mode: int) -> None: ... - def glMultMatrixf(self, m: PYQT_OPENGL_ARRAY) -> None: ... - def glMultMatrixd(self, m: PYQT_OPENGL_ARRAY) -> None: ... - def glOrtho(self, left: float, right: float, bottom: float, top: float, zNear: float, zFar: float) -> None: ... - def glPopMatrix(self) -> None: ... - def glPushMatrix(self) -> None: ... - def glRotated(self, angle: float, x: float, y: float, z: float) -> None: ... - def glRotatef(self, angle: float, x: float, y: float, z: float) -> None: ... - def glScaled(self, x: float, y: float, z: float) -> None: ... - def glScalef(self, x: float, y: float, z: float) -> None: ... - def glTranslated(self, x: float, y: float, z: float) -> None: ... - def glTranslatef(self, x: float, y: float, z: float) -> None: ... - def glBlendEquationSeparate(self, modeRGB: int, modeAlpha: int) -> None: ... - def glDrawBuffers(self, n: int, bufs: PYQT_OPENGL_ARRAY) -> None: ... - def glStencilOpSeparate(self, face: int, sfail: int, dpfail: int, dppass: int) -> None: ... - def glStencilFuncSeparate(self, face: int, func: int, ref: int, mask: int) -> None: ... - def glStencilMaskSeparate(self, face: int, mask: int) -> None: ... - def glAttachShader(self, program: int, shader: int) -> None: ... - def glBindAttribLocation(self, program: int, index: int, name: str) -> None: ... - def glCompileShader(self, shader: int) -> None: ... - def glCreateProgram(self) -> int: ... - def glCreateShader(self, type: int) -> int: ... - def glDeleteProgram(self, program: int) -> None: ... - def glDeleteShader(self, shader: int) -> None: ... - def glDetachShader(self, program: int, shader: int) -> None: ... - def glDisableVertexAttribArray(self, index: int) -> None: ... - def glEnableVertexAttribArray(self, index: int) -> None: ... - def glGetActiveAttrib(self, program: int, index: int) -> typing.Tuple[str, int, int]: ... - def glGetActiveUniform(self, program: int, index: int) -> typing.Tuple[str, int, int]: ... - def glGetAttachedShaders(self, program: int) -> typing.Tuple[int, ...]: ... - def glGetAttribLocation(self, program: int, name: str) -> int: ... - def glGetProgramiv(self, program: int, pname: int) -> typing.Union[int, typing.Tuple[int, int, int]]: ... - def glGetProgramInfoLog(self, program: int) -> bytes: ... - def glGetShaderiv(self, shader: int, pname: int) -> int: ... - def glGetShaderInfoLog(self, shader: int) -> bytes: ... - def glGetShaderSource(self, shader: int) -> bytes: ... - def glGetUniformLocation(self, program: int, name: str) -> int: ... - def glGetVertexAttribdv(self, index: int, pname: int) -> typing.Union[float, typing.Tuple[float, float, float, float]]: ... - def glGetVertexAttribfv(self, index: int, pname: int) -> typing.Union[float, typing.Tuple[float, float, float, float]]: ... - def glGetVertexAttribiv(self, index: int, pname: int) -> typing.Union[int, typing.Tuple[int, int, int, int]]: ... - def glIsProgram(self, program: int) -> int: ... - def glIsShader(self, shader: int) -> int: ... - def glLinkProgram(self, program: int) -> None: ... - def glUseProgram(self, program: int) -> None: ... - def glUniform1f(self, location: int, v0: float) -> None: ... - def glUniform2f(self, location: int, v0: float, v1: float) -> None: ... - def glUniform3f(self, location: int, v0: float, v1: float, v2: float) -> None: ... - def glUniform4f(self, location: int, v0: float, v1: float, v2: float, v3: float) -> None: ... - def glUniform1i(self, location: int, v0: int) -> None: ... - def glUniform2i(self, location: int, v0: int, v1: int) -> None: ... - def glUniform3i(self, location: int, v0: int, v1: int, v2: int) -> None: ... - def glUniform4i(self, location: int, v0: int, v1: int, v2: int, v3: int) -> None: ... - def glUniform1fv(self, location: int, count: int, value: PYQT_OPENGL_ARRAY) -> None: ... - def glUniform2fv(self, location: int, count: int, value: PYQT_OPENGL_ARRAY) -> None: ... - def glUniform3fv(self, location: int, count: int, value: PYQT_OPENGL_ARRAY) -> None: ... - def glUniform4fv(self, location: int, count: int, value: PYQT_OPENGL_ARRAY) -> None: ... - def glUniform1iv(self, location: int, count: int, value: PYQT_OPENGL_ARRAY) -> None: ... - def glUniform2iv(self, location: int, count: int, value: PYQT_OPENGL_ARRAY) -> None: ... - def glUniform3iv(self, location: int, count: int, value: PYQT_OPENGL_ARRAY) -> None: ... - def glUniform4iv(self, location: int, count: int, value: PYQT_OPENGL_ARRAY) -> None: ... - def glUniformMatrix2fv(self, location: int, count: int, transpose: int, value: PYQT_OPENGL_ARRAY) -> None: ... - def glUniformMatrix3fv(self, location: int, count: int, transpose: int, value: PYQT_OPENGL_ARRAY) -> None: ... - def glUniformMatrix4fv(self, location: int, count: int, transpose: int, value: PYQT_OPENGL_ARRAY) -> None: ... - def glValidateProgram(self, program: int) -> None: ... - def glVertexAttribPointer(self, index: int, size: int, type: int, normalized: int, stride: int, pointer: PYQT_OPENGL_BOUND_ARRAY) -> None: ... - def glGenQueries(self, n: int) -> typing.Union[int, typing.Tuple[int, ...]]: ... - def glDeleteQueries(self, n: int, ids: PYQT_OPENGL_ARRAY) -> None: ... - def glIsQuery(self, id: int) -> int: ... - def glBeginQuery(self, target: int, id: int) -> None: ... - def glEndQuery(self, target: int) -> None: ... - def glGetQueryiv(self, target: int, pname: int) -> int: ... - def glBindBuffer(self, target: int, buffer: int) -> None: ... - def glDeleteBuffers(self, n: int, buffers: PYQT_OPENGL_ARRAY) -> None: ... - def glGenBuffers(self, n: int) -> typing.Union[int, typing.Tuple[int, ...]]: ... - def glIsBuffer(self, buffer: int) -> int: ... - def glBufferData(self, target: int, size: int, data: PYQT_OPENGL_ARRAY, usage: int) -> None: ... - def glBufferSubData(self, target: int, offset: int, size: int, data: PYQT_OPENGL_ARRAY) -> None: ... - def glUnmapBuffer(self, target: int) -> int: ... - def glGetBufferParameteriv(self, target: int, pname: int) -> int: ... - def glBlendFuncSeparate(self, sfactorRGB: int, dfactorRGB: int, sfactorAlpha: int, dfactorAlpha: int) -> None: ... - def glPointParameterf(self, pname: int, param: float) -> None: ... - def glPointParameterfv(self, pname: int, params: PYQT_OPENGL_ARRAY) -> None: ... - def glPointParameteri(self, pname: int, param: int) -> None: ... - def glPointParameteriv(self, pname: int, params: PYQT_OPENGL_ARRAY) -> None: ... - def glActiveTexture(self, texture: int) -> None: ... - def glSampleCoverage(self, value: float, invert: int) -> None: ... - def glCompressedTexImage3D(self, target: int, level: int, internalformat: int, width: int, height: int, depth: int, border: int, imageSize: int, data: PYQT_OPENGL_ARRAY) -> None: ... - def glCompressedTexImage2D(self, target: int, level: int, internalformat: int, width: int, height: int, border: int, imageSize: int, data: PYQT_OPENGL_ARRAY) -> None: ... - def glCompressedTexImage1D(self, target: int, level: int, internalformat: int, width: int, border: int, imageSize: int, data: PYQT_OPENGL_ARRAY) -> None: ... - def glCompressedTexSubImage3D(self, target: int, level: int, xoffset: int, yoffset: int, zoffset: int, width: int, height: int, depth: int, format: int, imageSize: int, data: PYQT_OPENGL_ARRAY) -> None: ... - def glCompressedTexSubImage2D(self, target: int, level: int, xoffset: int, yoffset: int, width: int, height: int, format: int, imageSize: int, data: PYQT_OPENGL_ARRAY) -> None: ... - def glCompressedTexSubImage1D(self, target: int, level: int, xoffset: int, width: int, format: int, imageSize: int, data: PYQT_OPENGL_ARRAY) -> None: ... - def glBlendColor(self, red: float, green: float, blue: float, alpha: float) -> None: ... - def glBlendEquation(self, mode: int) -> None: ... - def glDrawRangeElements(self, mode: int, start: int, end: int, count: int, type: int, indices: PYQT_OPENGL_ARRAY) -> None: ... - def glTexImage3D(self, target: int, level: int, internalformat: int, width: int, height: int, depth: int, border: int, format: int, type: int, pixels: PYQT_OPENGL_ARRAY) -> None: ... - def glTexSubImage3D(self, target: int, level: int, xoffset: int, yoffset: int, zoffset: int, width: int, height: int, depth: int, format: int, type: int, pixels: PYQT_OPENGL_ARRAY) -> None: ... - def glCopyTexSubImage3D(self, target: int, level: int, xoffset: int, yoffset: int, zoffset: int, x: int, y: int, width: int, height: int) -> None: ... - def glDrawArrays(self, mode: int, first: int, count: int) -> None: ... - def glDrawElements(self, mode: int, count: int, type: int, indices: PYQT_OPENGL_ARRAY) -> None: ... - def glPolygonOffset(self, factor: float, units: float) -> None: ... - def glCopyTexImage1D(self, target: int, level: int, internalformat: int, x: int, y: int, width: int, border: int) -> None: ... - def glCopyTexImage2D(self, target: int, level: int, internalformat: int, x: int, y: int, width: int, height: int, border: int) -> None: ... - def glCopyTexSubImage1D(self, target: int, level: int, xoffset: int, x: int, y: int, width: int) -> None: ... - def glCopyTexSubImage2D(self, target: int, level: int, xoffset: int, yoffset: int, x: int, y: int, width: int, height: int) -> None: ... - def glTexSubImage1D(self, target: int, level: int, xoffset: int, width: int, format: int, type: int, pixels: PYQT_OPENGL_ARRAY) -> None: ... - def glTexSubImage2D(self, target: int, level: int, xoffset: int, yoffset: int, width: int, height: int, format: int, type: int, pixels: PYQT_OPENGL_ARRAY) -> None: ... - def glBindTexture(self, target: int, texture: int) -> None: ... - def glDeleteTextures(self, n: int, textures: PYQT_OPENGL_ARRAY) -> None: ... - def glGenTextures(self, n: int) -> typing.Union[int, typing.Tuple[int, ...]]: ... - def glIsTexture(self, texture: int) -> int: ... - def glIndexub(self, c: int) -> None: ... - def glIndexubv(self, c: PYQT_OPENGL_ARRAY) -> None: ... - def glCullFace(self, mode: int) -> None: ... - def glFrontFace(self, mode: int) -> None: ... - def glHint(self, target: int, mode: int) -> None: ... - def glLineWidth(self, width: float) -> None: ... - def glPointSize(self, size: float) -> None: ... - def glPolygonMode(self, face: int, mode: int) -> None: ... - def glScissor(self, x: int, y: int, width: int, height: int) -> None: ... - def glTexParameterf(self, target: int, pname: int, param: float) -> None: ... - def glTexParameterfv(self, target: int, pname: int, params: PYQT_OPENGL_ARRAY) -> None: ... - def glTexParameteri(self, target: int, pname: int, param: int) -> None: ... - def glTexParameteriv(self, target: int, pname: int, params: PYQT_OPENGL_ARRAY) -> None: ... - def glTexImage1D(self, target: int, level: int, internalformat: int, width: int, border: int, format: int, type: int, pixels: PYQT_OPENGL_ARRAY) -> None: ... - def glTexImage2D(self, target: int, level: int, internalformat: int, width: int, height: int, border: int, format: int, type: int, pixels: PYQT_OPENGL_ARRAY) -> None: ... - def glDrawBuffer(self, mode: int) -> None: ... - def glClear(self, mask: int) -> None: ... - def glClearColor(self, red: float, green: float, blue: float, alpha: float) -> None: ... - def glClearStencil(self, s: int) -> None: ... - def glClearDepth(self, depth: float) -> None: ... - def glStencilMask(self, mask: int) -> None: ... - def glColorMask(self, red: int, green: int, blue: int, alpha: int) -> None: ... - def glDepthMask(self, flag: int) -> None: ... - def glDisable(self, cap: int) -> None: ... - def glEnable(self, cap: int) -> None: ... - def glFinish(self) -> None: ... - def glFlush(self) -> None: ... - def glBlendFunc(self, sfactor: int, dfactor: int) -> None: ... - def glLogicOp(self, opcode: int) -> None: ... - def glStencilFunc(self, func: int, ref: int, mask: int) -> None: ... - def glStencilOp(self, fail: int, zfail: int, zpass: int) -> None: ... - def glDepthFunc(self, func: int) -> None: ... - def glPixelStoref(self, pname: int, param: float) -> None: ... - def glPixelStorei(self, pname: int, param: int) -> None: ... - def glReadBuffer(self, mode: int) -> None: ... - def glGetBooleanv(self, pname: int) -> typing.Union[bool, typing.Tuple[bool, ...]]: ... - def glGetDoublev(self, pname: int) -> typing.Union[float, typing.Tuple[float, ...]]: ... - def glGetError(self) -> int: ... - def glGetFloatv(self, pname: int) -> typing.Union[float, typing.Tuple[float, ...]]: ... - def glGetIntegerv(self, pname: int) -> typing.Union[int, typing.Tuple[int, ...]]: ... - def glGetString(self, name: int) -> str: ... - def glGetTexParameterfv(self, target: int, pname: int) -> typing.Union[float, typing.Tuple[float, float, float, float]]: ... - def glGetTexParameteriv(self, target: int, pname: int) -> typing.Union[int, typing.Tuple[int, int, int, int]]: ... - def glGetTexLevelParameterfv(self, target: int, level: int, pname: int) -> float: ... - def glGetTexLevelParameteriv(self, target: int, level: int, pname: int) -> int: ... - def glIsEnabled(self, cap: int) -> int: ... - def glDepthRange(self, nearVal: float, farVal: float) -> None: ... - def glViewport(self, x: int, y: int, width: int, height: int) -> None: ... - def initializeOpenGLFunctions(self) -> bool: ... diff -Nru uranium-3.3.0/stubs/PyQt5/_QOpenGLFunctions_2_1.pyi uranium-4.4.1/stubs/PyQt5/_QOpenGLFunctions_2_1.pyi --- uranium-3.3.0/stubs/PyQt5/_QOpenGLFunctions_2_1.pyi 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/stubs/PyQt5/_QOpenGLFunctions_2_1.pyi 1970-01-01 00:00:00.000000000 +0000 @@ -1,581 +0,0 @@ -# The PEP 484 type hints stub file for the _QOpenGLFunctions_2_1 module. -# -# Generated by SIP 4.18 -# -# Copyright (c) 2016 Riverbank Computing Limited -# -# This file is part of PyQt5. -# -# This file may be used under the terms of the GNU General Public License -# version 3.0 as published by the Free Software Foundation and appearing in -# the file LICENSE included in the packaging of this file. Please review the -# following information to ensure the GNU General Public License version 3.0 -# requirements will be met: http://www.gnu.org/copyleft/gpl.html. -# -# If you do not wish to use this file under the terms of the GPL version 3.0 -# then you may purchase a commercial license. For more information contact -# info@riverbankcomputing.com. -# -# This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -# WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - - -import typing -import sip - -from PyQt5 import QtGui - -# Support for QDate, QDateTime and QTime. -import datetime - -# Convenient type aliases. -PYQT_SIGNAL = typing.Union[QtCore.pyqtSignal, QtCore.pyqtBoundSignal] -PYQT_SLOT = typing.Union[typing.Callable[..., None], QtCore.pyqtBoundSignal] - -# Convenient aliases for complicated OpenGL types. -PYQT_OPENGL_ARRAY = typing.Union[typing.Sequence[int], typing.Sequence[float], - sip.Buffer, None] -PYQT_OPENGL_BOUND_ARRAY = typing.Union[typing.Sequence[int], - typing.Sequence[float], sip.Buffer, int, None] - - -class QOpenGLFunctions_2_1(QtGui.QAbstractOpenGLFunctions): - - def __init__(self) -> None: ... - - def glVertexAttrib1d(self, index: int, x: float) -> None: ... - def glVertexAttrib1dv(self, index: int, v: PYQT_OPENGL_ARRAY) -> None: ... - def glVertexAttrib1f(self, index: int, x: float) -> None: ... - def glVertexAttrib1fv(self, index: int, v: PYQT_OPENGL_ARRAY) -> None: ... - def glVertexAttrib1s(self, index: int, x: int) -> None: ... - def glVertexAttrib1sv(self, index: int, v: PYQT_OPENGL_ARRAY) -> None: ... - def glVertexAttrib2d(self, index: int, x: float, y: float) -> None: ... - def glVertexAttrib2dv(self, index: int, v: PYQT_OPENGL_ARRAY) -> None: ... - def glVertexAttrib2f(self, index: int, x: float, y: float) -> None: ... - def glVertexAttrib2fv(self, index: int, v: PYQT_OPENGL_ARRAY) -> None: ... - def glVertexAttrib2s(self, index: int, x: int, y: int) -> None: ... - def glVertexAttrib2sv(self, index: int, v: PYQT_OPENGL_ARRAY) -> None: ... - def glVertexAttrib3d(self, index: int, x: float, y: float, z: float) -> None: ... - def glVertexAttrib3dv(self, index: int, v: PYQT_OPENGL_ARRAY) -> None: ... - def glVertexAttrib3f(self, index: int, x: float, y: float, z: float) -> None: ... - def glVertexAttrib3fv(self, index: int, v: PYQT_OPENGL_ARRAY) -> None: ... - def glVertexAttrib3s(self, index: int, x: int, y: int, z: int) -> None: ... - def glVertexAttrib3sv(self, index: int, v: PYQT_OPENGL_ARRAY) -> None: ... - def glVertexAttrib4Nbv(self, index: int, v: PYQT_OPENGL_ARRAY) -> None: ... - def glVertexAttrib4Niv(self, index: int, v: PYQT_OPENGL_ARRAY) -> None: ... - def glVertexAttrib4Nsv(self, index: int, v: PYQT_OPENGL_ARRAY) -> None: ... - def glVertexAttrib4Nub(self, index: int, x: int, y: int, z: int, w: int) -> None: ... - def glVertexAttrib4Nubv(self, index: int, v: PYQT_OPENGL_ARRAY) -> None: ... - def glVertexAttrib4Nuiv(self, index: int, v: PYQT_OPENGL_ARRAY) -> None: ... - def glVertexAttrib4Nusv(self, index: int, v: PYQT_OPENGL_ARRAY) -> None: ... - def glVertexAttrib4bv(self, index: int, v: PYQT_OPENGL_ARRAY) -> None: ... - def glVertexAttrib4d(self, index: int, x: float, y: float, z: float, w: float) -> None: ... - def glVertexAttrib4dv(self, index: int, v: PYQT_OPENGL_ARRAY) -> None: ... - def glVertexAttrib4f(self, index: int, x: float, y: float, z: float, w: float) -> None: ... - def glVertexAttrib4fv(self, index: int, v: PYQT_OPENGL_ARRAY) -> None: ... - def glVertexAttrib4iv(self, index: int, v: PYQT_OPENGL_ARRAY) -> None: ... - def glVertexAttrib4s(self, index: int, x: int, y: int, z: int, w: int) -> None: ... - def glVertexAttrib4sv(self, index: int, v: PYQT_OPENGL_ARRAY) -> None: ... - def glVertexAttrib4ubv(self, index: int, v: PYQT_OPENGL_ARRAY) -> None: ... - def glVertexAttrib4uiv(self, index: int, v: PYQT_OPENGL_ARRAY) -> None: ... - def glVertexAttrib4usv(self, index: int, v: PYQT_OPENGL_ARRAY) -> None: ... - def glFogCoordf(self, coord: float) -> None: ... - def glFogCoordfv(self, coord: PYQT_OPENGL_ARRAY) -> None: ... - def glFogCoordd(self, coord: float) -> None: ... - def glFogCoorddv(self, coord: PYQT_OPENGL_ARRAY) -> None: ... - def glFogCoordPointer(self, type: int, stride: int, pointer: PYQT_OPENGL_ARRAY) -> None: ... - def glSecondaryColor3b(self, red: int, green: int, blue: int) -> None: ... - def glSecondaryColor3bv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glSecondaryColor3d(self, red: float, green: float, blue: float) -> None: ... - def glSecondaryColor3dv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glSecondaryColor3f(self, red: float, green: float, blue: float) -> None: ... - def glSecondaryColor3fv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glSecondaryColor3i(self, red: int, green: int, blue: int) -> None: ... - def glSecondaryColor3iv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glSecondaryColor3s(self, red: int, green: int, blue: int) -> None: ... - def glSecondaryColor3sv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glSecondaryColor3ub(self, red: int, green: int, blue: int) -> None: ... - def glSecondaryColor3ubv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glSecondaryColor3ui(self, red: int, green: int, blue: int) -> None: ... - def glSecondaryColor3uiv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glSecondaryColor3us(self, red: int, green: int, blue: int) -> None: ... - def glSecondaryColor3usv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glSecondaryColorPointer(self, size: int, type: int, stride: int, pointer: PYQT_OPENGL_ARRAY) -> None: ... - def glWindowPos2d(self, x: float, y: float) -> None: ... - def glWindowPos2dv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glWindowPos2f(self, x: float, y: float) -> None: ... - def glWindowPos2fv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glWindowPos2i(self, x: int, y: int) -> None: ... - def glWindowPos2iv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glWindowPos2s(self, x: int, y: int) -> None: ... - def glWindowPos2sv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glWindowPos3d(self, x: float, y: float, z: float) -> None: ... - def glWindowPos3dv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glWindowPos3f(self, x: float, y: float, z: float) -> None: ... - def glWindowPos3fv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glWindowPos3i(self, x: int, y: int, z: int) -> None: ... - def glWindowPos3iv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glWindowPos3s(self, x: int, y: int, z: int) -> None: ... - def glWindowPos3sv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glClientActiveTexture(self, texture: int) -> None: ... - def glMultiTexCoord1d(self, target: int, s: float) -> None: ... - def glMultiTexCoord1dv(self, target: int, v: PYQT_OPENGL_ARRAY) -> None: ... - def glMultiTexCoord1f(self, target: int, s: float) -> None: ... - def glMultiTexCoord1fv(self, target: int, v: PYQT_OPENGL_ARRAY) -> None: ... - def glMultiTexCoord1i(self, target: int, s: int) -> None: ... - def glMultiTexCoord1iv(self, target: int, v: PYQT_OPENGL_ARRAY) -> None: ... - def glMultiTexCoord1s(self, target: int, s: int) -> None: ... - def glMultiTexCoord1sv(self, target: int, v: PYQT_OPENGL_ARRAY) -> None: ... - def glMultiTexCoord2d(self, target: int, s: float, t: float) -> None: ... - def glMultiTexCoord2dv(self, target: int, v: PYQT_OPENGL_ARRAY) -> None: ... - def glMultiTexCoord2f(self, target: int, s: float, t: float) -> None: ... - def glMultiTexCoord2fv(self, target: int, v: PYQT_OPENGL_ARRAY) -> None: ... - def glMultiTexCoord2i(self, target: int, s: int, t: int) -> None: ... - def glMultiTexCoord2iv(self, target: int, v: PYQT_OPENGL_ARRAY) -> None: ... - def glMultiTexCoord2s(self, target: int, s: int, t: int) -> None: ... - def glMultiTexCoord2sv(self, target: int, v: PYQT_OPENGL_ARRAY) -> None: ... - def glMultiTexCoord3d(self, target: int, s: float, t: float, r: float) -> None: ... - def glMultiTexCoord3dv(self, target: int, v: PYQT_OPENGL_ARRAY) -> None: ... - def glMultiTexCoord3f(self, target: int, s: float, t: float, r: float) -> None: ... - def glMultiTexCoord3fv(self, target: int, v: PYQT_OPENGL_ARRAY) -> None: ... - def glMultiTexCoord3i(self, target: int, s: int, t: int, r: int) -> None: ... - def glMultiTexCoord3iv(self, target: int, v: PYQT_OPENGL_ARRAY) -> None: ... - def glMultiTexCoord3s(self, target: int, s: int, t: int, r: int) -> None: ... - def glMultiTexCoord3sv(self, target: int, v: PYQT_OPENGL_ARRAY) -> None: ... - def glMultiTexCoord4d(self, target: int, s: float, t: float, r: float, q: float) -> None: ... - def glMultiTexCoord4dv(self, target: int, v: PYQT_OPENGL_ARRAY) -> None: ... - def glMultiTexCoord4f(self, target: int, s: float, t: float, r: float, q: float) -> None: ... - def glMultiTexCoord4fv(self, target: int, v: PYQT_OPENGL_ARRAY) -> None: ... - def glMultiTexCoord4i(self, target: int, s: int, t: int, r: int, q: int) -> None: ... - def glMultiTexCoord4iv(self, target: int, v: PYQT_OPENGL_ARRAY) -> None: ... - def glMultiTexCoord4s(self, target: int, s: int, t: int, r: int, q: int) -> None: ... - def glMultiTexCoord4sv(self, target: int, v: PYQT_OPENGL_ARRAY) -> None: ... - def glLoadTransposeMatrixf(self, m: PYQT_OPENGL_ARRAY) -> None: ... - def glLoadTransposeMatrixd(self, m: PYQT_OPENGL_ARRAY) -> None: ... - def glMultTransposeMatrixf(self, m: PYQT_OPENGL_ARRAY) -> None: ... - def glMultTransposeMatrixd(self, m: PYQT_OPENGL_ARRAY) -> None: ... - def glColorTable(self, target: int, internalformat: int, width: int, format: int, type: int, table: PYQT_OPENGL_ARRAY) -> None: ... - def glColorTableParameterfv(self, target: int, pname: int, params: PYQT_OPENGL_ARRAY) -> None: ... - def glColorTableParameteriv(self, target: int, pname: int, params: PYQT_OPENGL_ARRAY) -> None: ... - def glCopyColorTable(self, target: int, internalformat: int, x: int, y: int, width: int) -> None: ... - def glGetColorTableParameterfv(self, target: int, pname: int) -> typing.Union[float, typing.Tuple[float, float, float, float]]: ... - def glGetColorTableParameteriv(self, target: int, pname: int) -> typing.Union[int, typing.Tuple[int, int, int, int]]: ... - def glColorSubTable(self, target: int, start: int, count: int, format: int, type: int, data: PYQT_OPENGL_ARRAY) -> None: ... - def glCopyColorSubTable(self, target: int, start: int, x: int, y: int, width: int) -> None: ... - def glConvolutionFilter1D(self, target: int, internalformat: int, width: int, format: int, type: int, image: PYQT_OPENGL_ARRAY) -> None: ... - def glConvolutionFilter2D(self, target: int, internalformat: int, width: int, height: int, format: int, type: int, image: PYQT_OPENGL_ARRAY) -> None: ... - def glConvolutionParameterf(self, target: int, pname: int, params: float) -> None: ... - def glConvolutionParameterfv(self, target: int, pname: int, params: PYQT_OPENGL_ARRAY) -> None: ... - def glConvolutionParameteri(self, target: int, pname: int, params: int) -> None: ... - def glConvolutionParameteriv(self, target: int, pname: int, params: PYQT_OPENGL_ARRAY) -> None: ... - def glCopyConvolutionFilter1D(self, target: int, internalformat: int, x: int, y: int, width: int) -> None: ... - def glCopyConvolutionFilter2D(self, target: int, internalformat: int, x: int, y: int, width: int, height: int) -> None: ... - def glGetConvolutionParameterfv(self, target: int, pname: int) -> typing.Union[float, typing.Tuple[float, float, float, float]]: ... - def glGetConvolutionParameteriv(self, target: int, pname: int) -> typing.Union[int, typing.Tuple[int, int, int, int]]: ... - def glHistogram(self, target: int, width: int, internalformat: int, sink: int) -> None: ... - def glMinmax(self, target: int, internalformat: int, sink: int) -> None: ... - def glResetHistogram(self, target: int) -> None: ... - def glResetMinmax(self, target: int) -> None: ... - def glArrayElement(self, i: int) -> None: ... - def glColorPointer(self, size: int, type: int, stride: int, pointer: PYQT_OPENGL_BOUND_ARRAY) -> None: ... - def glDisableClientState(self, array: int) -> None: ... - def glEdgeFlagPointer(self, stride: int, pointer: PYQT_OPENGL_BOUND_ARRAY) -> None: ... - def glEnableClientState(self, array: int) -> None: ... - def glIndexPointer(self, type: int, stride: int, pointer: PYQT_OPENGL_BOUND_ARRAY) -> None: ... - def glNormalPointer(self, type: int, stride: int, pointer: PYQT_OPENGL_BOUND_ARRAY) -> None: ... - def glTexCoordPointer(self, size: int, type: int, stride: int, pointer: PYQT_OPENGL_BOUND_ARRAY) -> None: ... - def glVertexPointer(self, size: int, type: int, stride: int, pointer: PYQT_OPENGL_BOUND_ARRAY) -> None: ... - def glPopClientAttrib(self) -> None: ... - def glPushClientAttrib(self, mask: int) -> None: ... - def glNewList(self, list: int, mode: int) -> None: ... - def glEndList(self) -> None: ... - def glCallList(self, list: int) -> None: ... - def glDeleteLists(self, list: int, range: int) -> None: ... - def glGenLists(self, range: int) -> int: ... - def glListBase(self, base: int) -> None: ... - def glBegin(self, mode: int) -> None: ... - def glBitmap(self, width: int, height: int, xorig: float, yorig: float, xmove: float, ymove: float, bitmap: PYQT_OPENGL_ARRAY) -> None: ... - def glColor3b(self, red: int, green: int, blue: int) -> None: ... - def glColor3bv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glColor3d(self, red: float, green: float, blue: float) -> None: ... - def glColor3dv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glColor3f(self, red: float, green: float, blue: float) -> None: ... - def glColor3fv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glColor3i(self, red: int, green: int, blue: int) -> None: ... - def glColor3iv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glColor3s(self, red: int, green: int, blue: int) -> None: ... - def glColor3sv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glColor3ub(self, red: int, green: int, blue: int) -> None: ... - def glColor3ubv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glColor3ui(self, red: int, green: int, blue: int) -> None: ... - def glColor3uiv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glColor3us(self, red: int, green: int, blue: int) -> None: ... - def glColor3usv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glColor4b(self, red: int, green: int, blue: int, alpha: int) -> None: ... - def glColor4bv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glColor4d(self, red: float, green: float, blue: float, alpha: float) -> None: ... - def glColor4dv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glColor4f(self, red: float, green: float, blue: float, alpha: float) -> None: ... - def glColor4fv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glColor4i(self, red: int, green: int, blue: int, alpha: int) -> None: ... - def glColor4iv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glColor4s(self, red: int, green: int, blue: int, alpha: int) -> None: ... - def glColor4sv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glColor4ub(self, red: int, green: int, blue: int, alpha: int) -> None: ... - def glColor4ubv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glColor4ui(self, red: int, green: int, blue: int, alpha: int) -> None: ... - def glColor4uiv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glColor4us(self, red: int, green: int, blue: int, alpha: int) -> None: ... - def glColor4usv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glEdgeFlag(self, flag: int) -> None: ... - def glEdgeFlagv(self, flag: PYQT_OPENGL_ARRAY) -> None: ... - def glEnd(self) -> None: ... - def glIndexd(self, c: float) -> None: ... - def glIndexdv(self, c: PYQT_OPENGL_ARRAY) -> None: ... - def glIndexf(self, c: float) -> None: ... - def glIndexfv(self, c: PYQT_OPENGL_ARRAY) -> None: ... - def glIndexi(self, c: int) -> None: ... - def glIndexiv(self, c: PYQT_OPENGL_ARRAY) -> None: ... - def glIndexs(self, c: int) -> None: ... - def glIndexsv(self, c: PYQT_OPENGL_ARRAY) -> None: ... - def glNormal3b(self, nx: int, ny: int, nz: int) -> None: ... - def glNormal3bv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glNormal3d(self, nx: float, ny: float, nz: float) -> None: ... - def glNormal3dv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glNormal3f(self, nx: float, ny: float, nz: float) -> None: ... - def glNormal3fv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glNormal3i(self, nx: int, ny: int, nz: int) -> None: ... - def glNormal3iv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glNormal3s(self, nx: int, ny: int, nz: int) -> None: ... - def glNormal3sv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glRasterPos2d(self, x: float, y: float) -> None: ... - def glRasterPos2dv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glRasterPos2f(self, x: float, y: float) -> None: ... - def glRasterPos2fv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glRasterPos2i(self, x: int, y: int) -> None: ... - def glRasterPos2iv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glRasterPos2s(self, x: int, y: int) -> None: ... - def glRasterPos2sv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glRasterPos3d(self, x: float, y: float, z: float) -> None: ... - def glRasterPos3dv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glRasterPos3f(self, x: float, y: float, z: float) -> None: ... - def glRasterPos3fv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glRasterPos3i(self, x: int, y: int, z: int) -> None: ... - def glRasterPos3iv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glRasterPos3s(self, x: int, y: int, z: int) -> None: ... - def glRasterPos3sv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glRasterPos4d(self, x: float, y: float, z: float, w: float) -> None: ... - def glRasterPos4dv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glRasterPos4f(self, x: float, y: float, z: float, w: float) -> None: ... - def glRasterPos4fv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glRasterPos4i(self, x: int, y: int, z: int, w: int) -> None: ... - def glRasterPos4iv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glRasterPos4s(self, x: int, y: int, z: int, w: int) -> None: ... - def glRasterPos4sv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glRectd(self, x1: float, y1: float, x2: float, y2: float) -> None: ... - def glRectf(self, x1: float, y1: float, x2: float, y2: float) -> None: ... - def glRecti(self, x1: int, y1: int, x2: int, y2: int) -> None: ... - def glRects(self, x1: int, y1: int, x2: int, y2: int) -> None: ... - def glTexCoord1d(self, s: float) -> None: ... - def glTexCoord1dv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glTexCoord1f(self, s: float) -> None: ... - def glTexCoord1fv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glTexCoord1i(self, s: int) -> None: ... - def glTexCoord1iv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glTexCoord1s(self, s: int) -> None: ... - def glTexCoord1sv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glTexCoord2d(self, s: float, t: float) -> None: ... - def glTexCoord2dv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glTexCoord2f(self, s: float, t: float) -> None: ... - def glTexCoord2fv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glTexCoord2i(self, s: int, t: int) -> None: ... - def glTexCoord2iv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glTexCoord2s(self, s: int, t: int) -> None: ... - def glTexCoord2sv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glTexCoord3d(self, s: float, t: float, r: float) -> None: ... - def glTexCoord3dv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glTexCoord3f(self, s: float, t: float, r: float) -> None: ... - def glTexCoord3fv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glTexCoord3i(self, s: int, t: int, r: int) -> None: ... - def glTexCoord3iv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glTexCoord3s(self, s: int, t: int, r: int) -> None: ... - def glTexCoord3sv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glTexCoord4d(self, s: float, t: float, r: float, q: float) -> None: ... - def glTexCoord4dv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glTexCoord4f(self, s: float, t: float, r: float, q: float) -> None: ... - def glTexCoord4fv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glTexCoord4i(self, s: int, t: int, r: int, q: int) -> None: ... - def glTexCoord4iv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glTexCoord4s(self, s: int, t: int, r: int, q: int) -> None: ... - def glTexCoord4sv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glVertex2d(self, x: float, y: float) -> None: ... - def glVertex2dv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glVertex2f(self, x: float, y: float) -> None: ... - def glVertex2fv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glVertex2i(self, x: int, y: int) -> None: ... - def glVertex2iv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glVertex2s(self, x: int, y: int) -> None: ... - def glVertex2sv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glVertex3d(self, x: float, y: float, z: float) -> None: ... - def glVertex3dv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glVertex3f(self, x: float, y: float, z: float) -> None: ... - def glVertex3fv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glVertex3i(self, x: int, y: int, z: int) -> None: ... - def glVertex3iv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glVertex3s(self, x: int, y: int, z: int) -> None: ... - def glVertex3sv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glVertex4d(self, x: float, y: float, z: float, w: float) -> None: ... - def glVertex4dv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glVertex4f(self, x: float, y: float, z: float, w: float) -> None: ... - def glVertex4fv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glVertex4i(self, x: int, y: int, z: int, w: int) -> None: ... - def glVertex4iv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glVertex4s(self, x: int, y: int, z: int, w: int) -> None: ... - def glVertex4sv(self, v: PYQT_OPENGL_ARRAY) -> None: ... - def glClipPlane(self, plane: int, equation: PYQT_OPENGL_ARRAY) -> None: ... - def glColorMaterial(self, face: int, mode: int) -> None: ... - def glFogf(self, pname: int, param: float) -> None: ... - def glFogfv(self, pname: int, params: PYQT_OPENGL_ARRAY) -> None: ... - def glFogi(self, pname: int, param: int) -> None: ... - def glFogiv(self, pname: int, params: PYQT_OPENGL_ARRAY) -> None: ... - def glLightf(self, light: int, pname: int, param: float) -> None: ... - def glLightfv(self, light: int, pname: int, params: PYQT_OPENGL_ARRAY) -> None: ... - def glLighti(self, light: int, pname: int, param: int) -> None: ... - def glLightiv(self, light: int, pname: int, params: PYQT_OPENGL_ARRAY) -> None: ... - def glLightModelf(self, pname: int, param: float) -> None: ... - def glLightModelfv(self, pname: int, params: PYQT_OPENGL_ARRAY) -> None: ... - def glLightModeli(self, pname: int, param: int) -> None: ... - def glLightModeliv(self, pname: int, params: PYQT_OPENGL_ARRAY) -> None: ... - def glLineStipple(self, factor: int, pattern: int) -> None: ... - def glMaterialf(self, face: int, pname: int, param: float) -> None: ... - def glMaterialfv(self, face: int, pname: int, params: PYQT_OPENGL_ARRAY) -> None: ... - def glMateriali(self, face: int, pname: int, param: int) -> None: ... - def glMaterialiv(self, face: int, pname: int, params: PYQT_OPENGL_ARRAY) -> None: ... - def glPolygonStipple(self, mask: PYQT_OPENGL_ARRAY) -> None: ... - def glShadeModel(self, mode: int) -> None: ... - def glTexEnvf(self, target: int, pname: int, param: float) -> None: ... - def glTexEnvfv(self, target: int, pname: int, params: PYQT_OPENGL_ARRAY) -> None: ... - def glTexEnvi(self, target: int, pname: int, param: int) -> None: ... - def glTexEnviv(self, target: int, pname: int, params: PYQT_OPENGL_ARRAY) -> None: ... - def glTexGend(self, coord: int, pname: int, param: float) -> None: ... - def glTexGendv(self, coord: int, pname: int, params: PYQT_OPENGL_ARRAY) -> None: ... - def glTexGenf(self, coord: int, pname: int, param: float) -> None: ... - def glTexGenfv(self, coord: int, pname: int, params: PYQT_OPENGL_ARRAY) -> None: ... - def glTexGeni(self, coord: int, pname: int, param: int) -> None: ... - def glTexGeniv(self, coord: int, pname: int, params: PYQT_OPENGL_ARRAY) -> None: ... - def glRenderMode(self, mode: int) -> int: ... - def glInitNames(self) -> None: ... - def glLoadName(self, name: int) -> None: ... - def glPassThrough(self, token: float) -> None: ... - def glPopName(self) -> None: ... - def glPushName(self, name: int) -> None: ... - def glClearAccum(self, red: float, green: float, blue: float, alpha: float) -> None: ... - def glClearIndex(self, c: float) -> None: ... - def glIndexMask(self, mask: int) -> None: ... - def glAccum(self, op: int, value: float) -> None: ... - def glPopAttrib(self) -> None: ... - def glPushAttrib(self, mask: int) -> None: ... - def glMap1d(self, target: int, u1: float, u2: float, stride: int, order: int, points: PYQT_OPENGL_ARRAY) -> None: ... - def glMap1f(self, target: int, u1: float, u2: float, stride: int, order: int, points: PYQT_OPENGL_ARRAY) -> None: ... - def glMap2d(self, target: int, u1: float, u2: float, ustride: int, uorder: int, v1: float, v2: float, vstride: int, vorder: int, points: PYQT_OPENGL_ARRAY) -> None: ... - def glMap2f(self, target: int, u1: float, u2: float, ustride: int, uorder: int, v1: float, v2: float, vstride: int, vorder: int, points: PYQT_OPENGL_ARRAY) -> None: ... - def glMapGrid1d(self, un: int, u1: float, u2: float) -> None: ... - def glMapGrid1f(self, un: int, u1: float, u2: float) -> None: ... - def glMapGrid2d(self, un: int, u1: float, u2: float, vn: int, v1: float, v2: float) -> None: ... - def glMapGrid2f(self, un: int, u1: float, u2: float, vn: int, v1: float, v2: float) -> None: ... - def glEvalCoord1d(self, u: float) -> None: ... - def glEvalCoord1dv(self, u: PYQT_OPENGL_ARRAY) -> None: ... - def glEvalCoord1f(self, u: float) -> None: ... - def glEvalCoord1fv(self, u: PYQT_OPENGL_ARRAY) -> None: ... - def glEvalCoord2d(self, u: float, v: float) -> None: ... - def glEvalCoord2dv(self, u: PYQT_OPENGL_ARRAY) -> None: ... - def glEvalCoord2f(self, u: float, v: float) -> None: ... - def glEvalCoord2fv(self, u: PYQT_OPENGL_ARRAY) -> None: ... - def glEvalMesh1(self, mode: int, i1: int, i2: int) -> None: ... - def glEvalPoint1(self, i: int) -> None: ... - def glEvalMesh2(self, mode: int, i1: int, i2: int, j1: int, j2: int) -> None: ... - def glEvalPoint2(self, i: int, j: int) -> None: ... - def glAlphaFunc(self, func: int, ref: float) -> None: ... - def glPixelZoom(self, xfactor: float, yfactor: float) -> None: ... - def glPixelTransferf(self, pname: int, param: float) -> None: ... - def glPixelTransferi(self, pname: int, param: int) -> None: ... - def glPixelMapfv(self, map: int, mapsize: int, values: PYQT_OPENGL_ARRAY) -> None: ... - def glPixelMapuiv(self, map: int, mapsize: int, values: PYQT_OPENGL_ARRAY) -> None: ... - def glPixelMapusv(self, map: int, mapsize: int, values: PYQT_OPENGL_ARRAY) -> None: ... - def glCopyPixels(self, x: int, y: int, width: int, height: int, type: int) -> None: ... - def glDrawPixels(self, width: int, height: int, format: int, type: int, pixels: PYQT_OPENGL_ARRAY) -> None: ... - def glGetClipPlane(self, plane: int) -> typing.Tuple[float, float, float, float]: ... - def glGetLightfv(self, light: int, pname: int) -> typing.Union[float, typing.Tuple[float, float, float], typing.Tuple[float, float, float, float]]: ... - def glGetLightiv(self, light: int, pname: int) -> typing.Union[int, typing.Tuple[int, int, int], typing.Tuple[int, int, int, int]]: ... - def glGetMaterialfv(self, face: int, pname: int) -> typing.Union[float, typing.Tuple[float, float, float], typing.Tuple[float, float, float, float]]: ... - def glGetMaterialiv(self, face: int, pname: int) -> typing.Union[int, typing.Tuple[int, int, int], typing.Tuple[int, int, int, int]]: ... - def glGetTexEnvfv(self, target: int, pname: int) -> typing.Union[float, typing.Tuple[float, float, float, float]]: ... - def glGetTexEnviv(self, target: int, pname: int) -> typing.Union[int, typing.Tuple[int, int, int, int]]: ... - def glGetTexGendv(self, coord: int, pname: int) -> typing.Union[float, typing.Tuple[float, float, float, float]]: ... - def glGetTexGenfv(self, coord: int, pname: int) -> typing.Union[float, typing.Tuple[float, float, float, float]]: ... - def glGetTexGeniv(self, coord: int, pname: int) -> typing.Union[int, typing.Tuple[int, int, int, int]]: ... - def glIsList(self, list: int) -> int: ... - def glFrustum(self, left: float, right: float, bottom: float, top: float, zNear: float, zFar: float) -> None: ... - def glLoadIdentity(self) -> None: ... - def glLoadMatrixf(self, m: PYQT_OPENGL_ARRAY) -> None: ... - def glLoadMatrixd(self, m: PYQT_OPENGL_ARRAY) -> None: ... - def glMatrixMode(self, mode: int) -> None: ... - def glMultMatrixf(self, m: PYQT_OPENGL_ARRAY) -> None: ... - def glMultMatrixd(self, m: PYQT_OPENGL_ARRAY) -> None: ... - def glOrtho(self, left: float, right: float, bottom: float, top: float, zNear: float, zFar: float) -> None: ... - def glPopMatrix(self) -> None: ... - def glPushMatrix(self) -> None: ... - def glRotated(self, angle: float, x: float, y: float, z: float) -> None: ... - def glRotatef(self, angle: float, x: float, y: float, z: float) -> None: ... - def glScaled(self, x: float, y: float, z: float) -> None: ... - def glScalef(self, x: float, y: float, z: float) -> None: ... - def glTranslated(self, x: float, y: float, z: float) -> None: ... - def glTranslatef(self, x: float, y: float, z: float) -> None: ... - def glBlendEquationSeparate(self, modeRGB: int, modeAlpha: int) -> None: ... - def glDrawBuffers(self, n: int, bufs: PYQT_OPENGL_ARRAY) -> None: ... - def glStencilOpSeparate(self, face: int, sfail: int, dpfail: int, dppass: int) -> None: ... - def glStencilFuncSeparate(self, face: int, func: int, ref: int, mask: int) -> None: ... - def glStencilMaskSeparate(self, face: int, mask: int) -> None: ... - def glAttachShader(self, program: int, shader: int) -> None: ... - def glBindAttribLocation(self, program: int, index: int, name: str) -> None: ... - def glCompileShader(self, shader: int) -> None: ... - def glCreateProgram(self) -> int: ... - def glCreateShader(self, type: int) -> int: ... - def glDeleteProgram(self, program: int) -> None: ... - def glDeleteShader(self, shader: int) -> None: ... - def glDetachShader(self, program: int, shader: int) -> None: ... - def glDisableVertexAttribArray(self, index: int) -> None: ... - def glEnableVertexAttribArray(self, index: int) -> None: ... - def glGetActiveAttrib(self, program: int, index: int) -> typing.Tuple[str, int, int]: ... - def glGetActiveUniform(self, program: int, index: int) -> typing.Tuple[str, int, int]: ... - def glGetAttachedShaders(self, program: int) -> typing.Tuple[int, ...]: ... - def glGetAttribLocation(self, program: int, name: str) -> int: ... - def glGetProgramiv(self, program: int, pname: int) -> typing.Union[int, typing.Tuple[int, int, int]]: ... - def glGetProgramInfoLog(self, program: int) -> bytes: ... - def glGetShaderiv(self, shader: int, pname: int) -> int: ... - def glGetShaderInfoLog(self, shader: int) -> bytes: ... - def glGetShaderSource(self, shader: int) -> bytes: ... - def glGetUniformLocation(self, program: int, name: str) -> int: ... - def glGetVertexAttribdv(self, index: int, pname: int) -> typing.Union[float, typing.Tuple[float, float, float, float]]: ... - def glGetVertexAttribfv(self, index: int, pname: int) -> typing.Union[float, typing.Tuple[float, float, float, float]]: ... - def glGetVertexAttribiv(self, index: int, pname: int) -> typing.Union[int, typing.Tuple[int, int, int, int]]: ... - def glIsProgram(self, program: int) -> int: ... - def glIsShader(self, shader: int) -> int: ... - def glLinkProgram(self, program: int) -> None: ... - def glUseProgram(self, program: int) -> None: ... - def glUniform1f(self, location: int, v0: float) -> None: ... - def glUniform2f(self, location: int, v0: float, v1: float) -> None: ... - def glUniform3f(self, location: int, v0: float, v1: float, v2: float) -> None: ... - def glUniform4f(self, location: int, v0: float, v1: float, v2: float, v3: float) -> None: ... - def glUniform1i(self, location: int, v0: int) -> None: ... - def glUniform2i(self, location: int, v0: int, v1: int) -> None: ... - def glUniform3i(self, location: int, v0: int, v1: int, v2: int) -> None: ... - def glUniform4i(self, location: int, v0: int, v1: int, v2: int, v3: int) -> None: ... - def glUniform1fv(self, location: int, count: int, value: PYQT_OPENGL_ARRAY) -> None: ... - def glUniform2fv(self, location: int, count: int, value: PYQT_OPENGL_ARRAY) -> None: ... - def glUniform3fv(self, location: int, count: int, value: PYQT_OPENGL_ARRAY) -> None: ... - def glUniform4fv(self, location: int, count: int, value: PYQT_OPENGL_ARRAY) -> None: ... - def glUniform1iv(self, location: int, count: int, value: PYQT_OPENGL_ARRAY) -> None: ... - def glUniform2iv(self, location: int, count: int, value: PYQT_OPENGL_ARRAY) -> None: ... - def glUniform3iv(self, location: int, count: int, value: PYQT_OPENGL_ARRAY) -> None: ... - def glUniform4iv(self, location: int, count: int, value: PYQT_OPENGL_ARRAY) -> None: ... - def glUniformMatrix2fv(self, location: int, count: int, transpose: int, value: PYQT_OPENGL_ARRAY) -> None: ... - def glUniformMatrix3fv(self, location: int, count: int, transpose: int, value: PYQT_OPENGL_ARRAY) -> None: ... - def glUniformMatrix4fv(self, location: int, count: int, transpose: int, value: PYQT_OPENGL_ARRAY) -> None: ... - def glValidateProgram(self, program: int) -> None: ... - def glVertexAttribPointer(self, index: int, size: int, type: int, normalized: int, stride: int, pointer: PYQT_OPENGL_BOUND_ARRAY) -> None: ... - def glGenQueries(self, n: int) -> typing.Union[int, typing.Tuple[int, ...]]: ... - def glDeleteQueries(self, n: int, ids: PYQT_OPENGL_ARRAY) -> None: ... - def glIsQuery(self, id: int) -> int: ... - def glBeginQuery(self, target: int, id: int) -> None: ... - def glEndQuery(self, target: int) -> None: ... - def glGetQueryiv(self, target: int, pname: int) -> int: ... - def glBindBuffer(self, target: int, buffer: int) -> None: ... - def glDeleteBuffers(self, n: int, buffers: PYQT_OPENGL_ARRAY) -> None: ... - def glGenBuffers(self, n: int) -> typing.Union[int, typing.Tuple[int, ...]]: ... - def glIsBuffer(self, buffer: int) -> int: ... - def glBufferData(self, target: int, size: int, data: PYQT_OPENGL_ARRAY, usage: int) -> None: ... - def glBufferSubData(self, target: int, offset: int, size: int, data: PYQT_OPENGL_ARRAY) -> None: ... - def glUnmapBuffer(self, target: int) -> int: ... - def glGetBufferParameteriv(self, target: int, pname: int) -> int: ... - def glBlendFuncSeparate(self, sfactorRGB: int, dfactorRGB: int, sfactorAlpha: int, dfactorAlpha: int) -> None: ... - def glPointParameterf(self, pname: int, param: float) -> None: ... - def glPointParameterfv(self, pname: int, params: PYQT_OPENGL_ARRAY) -> None: ... - def glPointParameteri(self, pname: int, param: int) -> None: ... - def glPointParameteriv(self, pname: int, params: PYQT_OPENGL_ARRAY) -> None: ... - def glActiveTexture(self, texture: int) -> None: ... - def glSampleCoverage(self, value: float, invert: int) -> None: ... - def glCompressedTexImage3D(self, target: int, level: int, internalformat: int, width: int, height: int, depth: int, border: int, imageSize: int, data: PYQT_OPENGL_ARRAY) -> None: ... - def glCompressedTexImage2D(self, target: int, level: int, internalformat: int, width: int, height: int, border: int, imageSize: int, data: PYQT_OPENGL_ARRAY) -> None: ... - def glCompressedTexImage1D(self, target: int, level: int, internalformat: int, width: int, border: int, imageSize: int, data: PYQT_OPENGL_ARRAY) -> None: ... - def glCompressedTexSubImage3D(self, target: int, level: int, xoffset: int, yoffset: int, zoffset: int, width: int, height: int, depth: int, format: int, imageSize: int, data: PYQT_OPENGL_ARRAY) -> None: ... - def glCompressedTexSubImage2D(self, target: int, level: int, xoffset: int, yoffset: int, width: int, height: int, format: int, imageSize: int, data: PYQT_OPENGL_ARRAY) -> None: ... - def glCompressedTexSubImage1D(self, target: int, level: int, xoffset: int, width: int, format: int, imageSize: int, data: PYQT_OPENGL_ARRAY) -> None: ... - def glBlendColor(self, red: float, green: float, blue: float, alpha: float) -> None: ... - def glBlendEquation(self, mode: int) -> None: ... - def glDrawRangeElements(self, mode: int, start: int, end: int, count: int, type: int, indices: PYQT_OPENGL_ARRAY) -> None: ... - def glTexImage3D(self, target: int, level: int, internalformat: int, width: int, height: int, depth: int, border: int, format: int, type: int, pixels: PYQT_OPENGL_ARRAY) -> None: ... - def glTexSubImage3D(self, target: int, level: int, xoffset: int, yoffset: int, zoffset: int, width: int, height: int, depth: int, format: int, type: int, pixels: PYQT_OPENGL_ARRAY) -> None: ... - def glCopyTexSubImage3D(self, target: int, level: int, xoffset: int, yoffset: int, zoffset: int, x: int, y: int, width: int, height: int) -> None: ... - def glDrawArrays(self, mode: int, first: int, count: int) -> None: ... - def glDrawElements(self, mode: int, count: int, type: int, indices: PYQT_OPENGL_ARRAY) -> None: ... - def glPolygonOffset(self, factor: float, units: float) -> None: ... - def glCopyTexImage1D(self, target: int, level: int, internalformat: int, x: int, y: int, width: int, border: int) -> None: ... - def glCopyTexImage2D(self, target: int, level: int, internalformat: int, x: int, y: int, width: int, height: int, border: int) -> None: ... - def glCopyTexSubImage1D(self, target: int, level: int, xoffset: int, x: int, y: int, width: int) -> None: ... - def glCopyTexSubImage2D(self, target: int, level: int, xoffset: int, yoffset: int, x: int, y: int, width: int, height: int) -> None: ... - def glTexSubImage1D(self, target: int, level: int, xoffset: int, width: int, format: int, type: int, pixels: PYQT_OPENGL_ARRAY) -> None: ... - def glTexSubImage2D(self, target: int, level: int, xoffset: int, yoffset: int, width: int, height: int, format: int, type: int, pixels: PYQT_OPENGL_ARRAY) -> None: ... - def glBindTexture(self, target: int, texture: int) -> None: ... - def glDeleteTextures(self, n: int, textures: PYQT_OPENGL_ARRAY) -> None: ... - def glGenTextures(self, n: int) -> typing.Union[int, typing.Tuple[int, ...]]: ... - def glIsTexture(self, texture: int) -> int: ... - def glIndexub(self, c: int) -> None: ... - def glIndexubv(self, c: PYQT_OPENGL_ARRAY) -> None: ... - def glCullFace(self, mode: int) -> None: ... - def glFrontFace(self, mode: int) -> None: ... - def glHint(self, target: int, mode: int) -> None: ... - def glLineWidth(self, width: float) -> None: ... - def glPointSize(self, size: float) -> None: ... - def glPolygonMode(self, face: int, mode: int) -> None: ... - def glScissor(self, x: int, y: int, width: int, height: int) -> None: ... - def glTexParameterf(self, target: int, pname: int, param: float) -> None: ... - def glTexParameterfv(self, target: int, pname: int, params: PYQT_OPENGL_ARRAY) -> None: ... - def glTexParameteri(self, target: int, pname: int, param: int) -> None: ... - def glTexParameteriv(self, target: int, pname: int, params: PYQT_OPENGL_ARRAY) -> None: ... - def glTexImage1D(self, target: int, level: int, internalformat: int, width: int, border: int, format: int, type: int, pixels: PYQT_OPENGL_ARRAY) -> None: ... - def glTexImage2D(self, target: int, level: int, internalformat: int, width: int, height: int, border: int, format: int, type: int, pixels: PYQT_OPENGL_ARRAY) -> None: ... - def glDrawBuffer(self, mode: int) -> None: ... - def glClear(self, mask: int) -> None: ... - def glClearColor(self, red: float, green: float, blue: float, alpha: float) -> None: ... - def glClearStencil(self, s: int) -> None: ... - def glClearDepth(self, depth: float) -> None: ... - def glStencilMask(self, mask: int) -> None: ... - def glColorMask(self, red: int, green: int, blue: int, alpha: int) -> None: ... - def glDepthMask(self, flag: int) -> None: ... - def glDisable(self, cap: int) -> None: ... - def glEnable(self, cap: int) -> None: ... - def glFinish(self) -> None: ... - def glFlush(self) -> None: ... - def glBlendFunc(self, sfactor: int, dfactor: int) -> None: ... - def glLogicOp(self, opcode: int) -> None: ... - def glStencilFunc(self, func: int, ref: int, mask: int) -> None: ... - def glStencilOp(self, fail: int, zfail: int, zpass: int) -> None: ... - def glDepthFunc(self, func: int) -> None: ... - def glPixelStoref(self, pname: int, param: float) -> None: ... - def glPixelStorei(self, pname: int, param: int) -> None: ... - def glReadBuffer(self, mode: int) -> None: ... - def glGetBooleanv(self, pname: int) -> typing.Union[bool, typing.Tuple[bool, ...]]: ... - def glGetDoublev(self, pname: int) -> typing.Union[float, typing.Tuple[float, ...]]: ... - def glGetError(self) -> int: ... - def glGetFloatv(self, pname: int) -> typing.Union[float, typing.Tuple[float, ...]]: ... - def glGetIntegerv(self, pname: int) -> typing.Union[int, typing.Tuple[int, ...]]: ... - def glGetString(self, name: int) -> str: ... - def glGetTexParameterfv(self, target: int, pname: int) -> typing.Union[float, typing.Tuple[float, float, float, float]]: ... - def glGetTexParameteriv(self, target: int, pname: int) -> typing.Union[int, typing.Tuple[int, int, int, int]]: ... - def glGetTexLevelParameterfv(self, target: int, level: int, pname: int) -> float: ... - def glGetTexLevelParameteriv(self, target: int, level: int, pname: int) -> int: ... - def glIsEnabled(self, cap: int) -> int: ... - def glDepthRange(self, nearVal: float, farVal: float) -> None: ... - def glViewport(self, x: int, y: int, width: int, height: int) -> None: ... - def initializeOpenGLFunctions(self) -> bool: ... diff -Nru uranium-3.3.0/stubs/PyQt5/_QOpenGLFunctions_4_1_Core.pyi uranium-4.4.1/stubs/PyQt5/_QOpenGLFunctions_4_1_Core.pyi --- uranium-3.3.0/stubs/PyQt5/_QOpenGLFunctions_4_1_Core.pyi 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/stubs/PyQt5/_QOpenGLFunctions_4_1_Core.pyi 1970-01-01 00:00:00.000000000 +0000 @@ -1,308 +0,0 @@ -# The PEP 484 type hints stub file for the _QOpenGLFunctions_4_1_Core module. -# -# Generated by SIP 4.18 -# -# Copyright (c) 2016 Riverbank Computing Limited -# -# This file is part of PyQt5. -# -# This file may be used under the terms of the GNU General Public License -# version 3.0 as published by the Free Software Foundation and appearing in -# the file LICENSE included in the packaging of this file. Please review the -# following information to ensure the GNU General Public License version 3.0 -# requirements will be met: http://www.gnu.org/copyleft/gpl.html. -# -# If you do not wish to use this file under the terms of the GPL version 3.0 -# then you may purchase a commercial license. For more information contact -# info@riverbankcomputing.com. -# -# This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -# WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - - -import typing -import sip - -from PyQt5 import QtGui - -# Support for QDate, QDateTime and QTime. -import datetime - -# Convenient type aliases. -PYQT_SIGNAL = typing.Union[QtCore.pyqtSignal, QtCore.pyqtBoundSignal] -PYQT_SLOT = typing.Union[typing.Callable[..., None], QtCore.pyqtBoundSignal] - -# Convenient aliases for complicated OpenGL types. -PYQT_OPENGL_ARRAY = typing.Union[typing.Sequence[int], typing.Sequence[float], - sip.Buffer, None] -PYQT_OPENGL_BOUND_ARRAY = typing.Union[typing.Sequence[int], - typing.Sequence[float], sip.Buffer, int, None] - - -class QOpenGLFunctions_4_1_Core(QtGui.QAbstractOpenGLFunctions): - - def __init__(self) -> None: ... - - def glReleaseShaderCompiler(self) -> None: ... - def glDepthRangef(self, n: float, f: float) -> None: ... - def glClearDepthf(self, dd: float) -> None: ... - def glProgramParameteri(self, program: int, pname: int, value: int) -> None: ... - def glUseProgramStages(self, pipeline: int, stages: int, program: int) -> None: ... - def glActiveShaderProgram(self, pipeline: int, program: int) -> None: ... - def glBindProgramPipeline(self, pipeline: int) -> None: ... - def glIsProgramPipeline(self, pipeline: int) -> int: ... - def glProgramUniform1i(self, program: int, location: int, v0: int) -> None: ... - def glProgramUniform1f(self, program: int, location: int, v0: float) -> None: ... - def glProgramUniform1d(self, program: int, location: int, v0: float) -> None: ... - def glProgramUniform1ui(self, program: int, location: int, v0: int) -> None: ... - def glProgramUniform2i(self, program: int, location: int, v0: int, v1: int) -> None: ... - def glProgramUniform2f(self, program: int, location: int, v0: float, v1: float) -> None: ... - def glProgramUniform2d(self, program: int, location: int, v0: float, v1: float) -> None: ... - def glProgramUniform2ui(self, program: int, location: int, v0: int, v1: int) -> None: ... - def glProgramUniform3i(self, program: int, location: int, v0: int, v1: int, v2: int) -> None: ... - def glProgramUniform3f(self, program: int, location: int, v0: float, v1: float, v2: float) -> None: ... - def glProgramUniform3d(self, program: int, location: int, v0: float, v1: float, v2: float) -> None: ... - def glProgramUniform3ui(self, program: int, location: int, v0: int, v1: int, v2: int) -> None: ... - def glProgramUniform4i(self, program: int, location: int, v0: int, v1: int, v2: int, v3: int) -> None: ... - def glProgramUniform4f(self, program: int, location: int, v0: float, v1: float, v2: float, v3: float) -> None: ... - def glProgramUniform4d(self, program: int, location: int, v0: float, v1: float, v2: float, v3: float) -> None: ... - def glProgramUniform4ui(self, program: int, location: int, v0: int, v1: int, v2: int, v3: int) -> None: ... - def glValidateProgramPipeline(self, pipeline: int) -> None: ... - def glVertexAttribL1d(self, index: int, x: float) -> None: ... - def glVertexAttribL2d(self, index: int, x: float, y: float) -> None: ... - def glVertexAttribL3d(self, index: int, x: float, y: float, z: float) -> None: ... - def glVertexAttribL4d(self, index: int, x: float, y: float, z: float, w: float) -> None: ... - def glViewportIndexedf(self, index: int, x: float, y: float, w: float, h: float) -> None: ... - def glScissorIndexed(self, index: int, left: int, bottom: int, width: int, height: int) -> None: ... - def glDepthRangeIndexed(self, index: int, n: float, f: float) -> None: ... - def glMinSampleShading(self, value: float) -> None: ... - def glBlendEquationi(self, buf: int, mode: int) -> None: ... - def glBlendEquationSeparatei(self, buf: int, modeRGB: int, modeAlpha: int) -> None: ... - def glBlendFunci(self, buf: int, src: int, dst: int) -> None: ... - def glBlendFuncSeparatei(self, buf: int, srcRGB: int, dstRGB: int, srcAlpha: int, dstAlpha: int) -> None: ... - def glUniform1d(self, location: int, x: float) -> None: ... - def glUniform2d(self, location: int, x: float, y: float) -> None: ... - def glUniform3d(self, location: int, x: float, y: float, z: float) -> None: ... - def glUniform4d(self, location: int, x: float, y: float, z: float, w: float) -> None: ... - def glPatchParameteri(self, pname: int, value: int) -> None: ... - def glBindTransformFeedback(self, target: int, id: int) -> None: ... - def glIsTransformFeedback(self, id: int) -> int: ... - def glPauseTransformFeedback(self) -> None: ... - def glResumeTransformFeedback(self) -> None: ... - def glDrawTransformFeedback(self, mode: int, id: int) -> None: ... - def glDrawTransformFeedbackStream(self, mode: int, id: int, stream: int) -> None: ... - def glBeginQueryIndexed(self, target: int, index: int, id: int) -> None: ... - def glEndQueryIndexed(self, target: int, index: int) -> None: ... - def glVertexAttribDivisor(self, index: int, divisor: int) -> None: ... - def glIsSampler(self, sampler: int) -> int: ... - def glBindSampler(self, unit: int, sampler: int) -> None: ... - def glSamplerParameteri(self, sampler: int, pname: int, param: int) -> None: ... - def glSamplerParameterf(self, sampler: int, pname: int, param: float) -> None: ... - def glQueryCounter(self, id: int, target: int) -> None: ... - def glVertexP2ui(self, type: int, value: int) -> None: ... - def glVertexP3ui(self, type: int, value: int) -> None: ... - def glVertexP4ui(self, type: int, value: int) -> None: ... - def glTexCoordP1ui(self, type: int, coords: int) -> None: ... - def glTexCoordP2ui(self, type: int, coords: int) -> None: ... - def glTexCoordP3ui(self, type: int, coords: int) -> None: ... - def glTexCoordP4ui(self, type: int, coords: int) -> None: ... - def glMultiTexCoordP1ui(self, texture: int, type: int, coords: int) -> None: ... - def glMultiTexCoordP2ui(self, texture: int, type: int, coords: int) -> None: ... - def glMultiTexCoordP3ui(self, texture: int, type: int, coords: int) -> None: ... - def glMultiTexCoordP4ui(self, texture: int, type: int, coords: int) -> None: ... - def glNormalP3ui(self, type: int, coords: int) -> None: ... - def glColorP3ui(self, type: int, color: int) -> None: ... - def glColorP4ui(self, type: int, color: int) -> None: ... - def glSecondaryColorP3ui(self, type: int, color: int) -> None: ... - def glVertexAttribP1ui(self, index: int, type: int, normalized: int, value: int) -> None: ... - def glVertexAttribP2ui(self, index: int, type: int, normalized: int, value: int) -> None: ... - def glVertexAttribP3ui(self, index: int, type: int, normalized: int, value: int) -> None: ... - def glVertexAttribP4ui(self, index: int, type: int, normalized: int, value: int) -> None: ... - def glFramebufferTexture(self, target: int, attachment: int, texture: int, level: int) -> None: ... - def glProvokingVertex(self, mode: int) -> None: ... - def glTexImage2DMultisample(self, target: int, samples: int, internalformat: int, width: int, height: int, fixedsamplelocations: int) -> None: ... - def glTexImage3DMultisample(self, target: int, samples: int, internalformat: int, width: int, height: int, depth: int, fixedsamplelocations: int) -> None: ... - def glSampleMaski(self, index: int, mask: int) -> None: ... - def glDrawArraysInstanced(self, mode: int, first: int, count: int, instancecount: int) -> None: ... - def glTexBuffer(self, target: int, internalformat: int, buffer: int) -> None: ... - def glPrimitiveRestartIndex(self, index: int) -> None: ... - def glUniformBlockBinding(self, program: int, uniformBlockIndex: int, uniformBlockBinding: int) -> None: ... - def glColorMaski(self, index: int, r: int, g: int, b: int, a: int) -> None: ... - def glEnablei(self, target: int, index: int) -> None: ... - def glDisablei(self, target: int, index: int) -> None: ... - def glIsEnabledi(self, target: int, index: int) -> int: ... - def glBeginTransformFeedback(self, primitiveMode: int) -> None: ... - def glEndTransformFeedback(self) -> None: ... - def glBindBufferBase(self, target: int, index: int, buffer: int) -> None: ... - def glClampColor(self, target: int, clamp: int) -> None: ... - def glBeginConditionalRender(self, id: int, mode: int) -> None: ... - def glEndConditionalRender(self) -> None: ... - def glUniform1ui(self, location: int, v0: int) -> None: ... - def glUniform2ui(self, location: int, v0: int, v1: int) -> None: ... - def glUniform3ui(self, location: int, v0: int, v1: int, v2: int) -> None: ... - def glUniform4ui(self, location: int, v0: int, v1: int, v2: int, v3: int) -> None: ... - def glClearBufferfi(self, buffer: int, drawbuffer: int, depth: float, stencil: int) -> None: ... - def glIsRenderbuffer(self, renderbuffer: int) -> int: ... - def glBindRenderbuffer(self, target: int, renderbuffer: int) -> None: ... - def glRenderbufferStorage(self, target: int, internalformat: int, width: int, height: int) -> None: ... - def glIsFramebuffer(self, framebuffer: int) -> int: ... - def glBindFramebuffer(self, target: int, framebuffer: int) -> None: ... - def glCheckFramebufferStatus(self, target: int) -> int: ... - def glFramebufferTexture1D(self, target: int, attachment: int, textarget: int, texture: int, level: int) -> None: ... - def glFramebufferTexture2D(self, target: int, attachment: int, textarget: int, texture: int, level: int) -> None: ... - def glFramebufferTexture3D(self, target: int, attachment: int, textarget: int, texture: int, level: int, zoffset: int) -> None: ... - def glFramebufferRenderbuffer(self, target: int, attachment: int, renderbuffertarget: int, renderbuffer: int) -> None: ... - def glGenerateMipmap(self, target: int) -> None: ... - def glBlitFramebuffer(self, srcX0: int, srcY0: int, srcX1: int, srcY1: int, dstX0: int, dstY0: int, dstX1: int, dstY1: int, mask: int, filter: int) -> None: ... - def glRenderbufferStorageMultisample(self, target: int, samples: int, internalformat: int, width: int, height: int) -> None: ... - def glFramebufferTextureLayer(self, target: int, attachment: int, texture: int, level: int, layer: int) -> None: ... - def glBindVertexArray(self, array: int) -> None: ... - def glIsVertexArray(self, array: int) -> int: ... - def glBlendEquationSeparate(self, modeRGB: int, modeAlpha: int) -> None: ... - def glDrawBuffers(self, n: int, bufs: PYQT_OPENGL_ARRAY) -> None: ... - def glStencilOpSeparate(self, face: int, sfail: int, dpfail: int, dppass: int) -> None: ... - def glStencilFuncSeparate(self, face: int, func: int, ref: int, mask: int) -> None: ... - def glStencilMaskSeparate(self, face: int, mask: int) -> None: ... - def glAttachShader(self, program: int, shader: int) -> None: ... - def glBindAttribLocation(self, program: int, index: int, name: str) -> None: ... - def glCompileShader(self, shader: int) -> None: ... - def glCreateProgram(self) -> int: ... - def glCreateShader(self, type: int) -> int: ... - def glDeleteProgram(self, program: int) -> None: ... - def glDeleteShader(self, shader: int) -> None: ... - def glDetachShader(self, program: int, shader: int) -> None: ... - def glDisableVertexAttribArray(self, index: int) -> None: ... - def glEnableVertexAttribArray(self, index: int) -> None: ... - def glGetActiveAttrib(self, program: int, index: int) -> typing.Tuple[str, int, int]: ... - def glGetActiveUniform(self, program: int, index: int) -> typing.Tuple[str, int, int]: ... - def glGetAttachedShaders(self, program: int) -> typing.Tuple[int, ...]: ... - def glGetAttribLocation(self, program: int, name: str) -> int: ... - def glGetProgramiv(self, program: int, pname: int) -> typing.Union[int, typing.Tuple[int, int, int]]: ... - def glGetProgramInfoLog(self, program: int) -> bytes: ... - def glGetShaderiv(self, shader: int, pname: int) -> int: ... - def glGetShaderInfoLog(self, shader: int) -> bytes: ... - def glGetShaderSource(self, shader: int) -> bytes: ... - def glGetUniformLocation(self, program: int, name: str) -> int: ... - def glGetVertexAttribdv(self, index: int, pname: int) -> typing.Union[float, typing.Tuple[float, float, float, float]]: ... - def glGetVertexAttribfv(self, index: int, pname: int) -> typing.Union[float, typing.Tuple[float, float, float, float]]: ... - def glGetVertexAttribiv(self, index: int, pname: int) -> typing.Union[int, typing.Tuple[int, int, int, int]]: ... - def glIsProgram(self, program: int) -> int: ... - def glIsShader(self, shader: int) -> int: ... - def glLinkProgram(self, program: int) -> None: ... - def glUseProgram(self, program: int) -> None: ... - def glUniform1f(self, location: int, v0: float) -> None: ... - def glUniform2f(self, location: int, v0: float, v1: float) -> None: ... - def glUniform3f(self, location: int, v0: float, v1: float, v2: float) -> None: ... - def glUniform4f(self, location: int, v0: float, v1: float, v2: float, v3: float) -> None: ... - def glUniform1i(self, location: int, v0: int) -> None: ... - def glUniform2i(self, location: int, v0: int, v1: int) -> None: ... - def glUniform3i(self, location: int, v0: int, v1: int, v2: int) -> None: ... - def glUniform4i(self, location: int, v0: int, v1: int, v2: int, v3: int) -> None: ... - def glUniform1fv(self, location: int, count: int, value: PYQT_OPENGL_ARRAY) -> None: ... - def glUniform2fv(self, location: int, count: int, value: PYQT_OPENGL_ARRAY) -> None: ... - def glUniform3fv(self, location: int, count: int, value: PYQT_OPENGL_ARRAY) -> None: ... - def glUniform4fv(self, location: int, count: int, value: PYQT_OPENGL_ARRAY) -> None: ... - def glUniform1iv(self, location: int, count: int, value: PYQT_OPENGL_ARRAY) -> None: ... - def glUniform2iv(self, location: int, count: int, value: PYQT_OPENGL_ARRAY) -> None: ... - def glUniform3iv(self, location: int, count: int, value: PYQT_OPENGL_ARRAY) -> None: ... - def glUniform4iv(self, location: int, count: int, value: PYQT_OPENGL_ARRAY) -> None: ... - def glUniformMatrix2fv(self, location: int, count: int, transpose: int, value: PYQT_OPENGL_ARRAY) -> None: ... - def glUniformMatrix3fv(self, location: int, count: int, transpose: int, value: PYQT_OPENGL_ARRAY) -> None: ... - def glUniformMatrix4fv(self, location: int, count: int, transpose: int, value: PYQT_OPENGL_ARRAY) -> None: ... - def glValidateProgram(self, program: int) -> None: ... - def glVertexAttribPointer(self, index: int, size: int, type: int, normalized: int, stride: int, pointer: PYQT_OPENGL_BOUND_ARRAY) -> None: ... - def glGenQueries(self, n: int) -> typing.Union[int, typing.Tuple[int, ...]]: ... - def glDeleteQueries(self, n: int, ids: PYQT_OPENGL_ARRAY) -> None: ... - def glIsQuery(self, id: int) -> int: ... - def glBeginQuery(self, target: int, id: int) -> None: ... - def glEndQuery(self, target: int) -> None: ... - def glGetQueryiv(self, target: int, pname: int) -> int: ... - def glBindBuffer(self, target: int, buffer: int) -> None: ... - def glDeleteBuffers(self, n: int, buffers: PYQT_OPENGL_ARRAY) -> None: ... - def glGenBuffers(self, n: int) -> typing.Union[int, typing.Tuple[int, ...]]: ... - def glIsBuffer(self, buffer: int) -> int: ... - def glBufferData(self, target: int, size: int, data: PYQT_OPENGL_ARRAY, usage: int) -> None: ... - def glBufferSubData(self, target: int, offset: int, size: int, data: PYQT_OPENGL_ARRAY) -> None: ... - def glUnmapBuffer(self, target: int) -> int: ... - def glGetBufferParameteriv(self, target: int, pname: int) -> int: ... - def glBlendFuncSeparate(self, sfactorRGB: int, dfactorRGB: int, sfactorAlpha: int, dfactorAlpha: int) -> None: ... - def glPointParameterf(self, pname: int, param: float) -> None: ... - def glPointParameterfv(self, pname: int, params: PYQT_OPENGL_ARRAY) -> None: ... - def glPointParameteri(self, pname: int, param: int) -> None: ... - def glPointParameteriv(self, pname: int, params: PYQT_OPENGL_ARRAY) -> None: ... - def glActiveTexture(self, texture: int) -> None: ... - def glSampleCoverage(self, value: float, invert: int) -> None: ... - def glCompressedTexImage3D(self, target: int, level: int, internalformat: int, width: int, height: int, depth: int, border: int, imageSize: int, data: PYQT_OPENGL_ARRAY) -> None: ... - def glCompressedTexImage2D(self, target: int, level: int, internalformat: int, width: int, height: int, border: int, imageSize: int, data: PYQT_OPENGL_ARRAY) -> None: ... - def glCompressedTexImage1D(self, target: int, level: int, internalformat: int, width: int, border: int, imageSize: int, data: PYQT_OPENGL_ARRAY) -> None: ... - def glCompressedTexSubImage3D(self, target: int, level: int, xoffset: int, yoffset: int, zoffset: int, width: int, height: int, depth: int, format: int, imageSize: int, data: PYQT_OPENGL_ARRAY) -> None: ... - def glCompressedTexSubImage2D(self, target: int, level: int, xoffset: int, yoffset: int, width: int, height: int, format: int, imageSize: int, data: PYQT_OPENGL_ARRAY) -> None: ... - def glCompressedTexSubImage1D(self, target: int, level: int, xoffset: int, width: int, format: int, imageSize: int, data: PYQT_OPENGL_ARRAY) -> None: ... - def glBlendColor(self, red: float, green: float, blue: float, alpha: float) -> None: ... - def glBlendEquation(self, mode: int) -> None: ... - def glDrawRangeElements(self, mode: int, start: int, end: int, count: int, type: int, indices: PYQT_OPENGL_ARRAY) -> None: ... - def glTexImage3D(self, target: int, level: int, internalformat: int, width: int, height: int, depth: int, border: int, format: int, type: int, pixels: PYQT_OPENGL_ARRAY) -> None: ... - def glTexSubImage3D(self, target: int, level: int, xoffset: int, yoffset: int, zoffset: int, width: int, height: int, depth: int, format: int, type: int, pixels: PYQT_OPENGL_ARRAY) -> None: ... - def glCopyTexSubImage3D(self, target: int, level: int, xoffset: int, yoffset: int, zoffset: int, x: int, y: int, width: int, height: int) -> None: ... - def glDrawArrays(self, mode: int, first: int, count: int) -> None: ... - def glDrawElements(self, mode: int, count: int, type: int, indices: PYQT_OPENGL_ARRAY) -> None: ... - def glPolygonOffset(self, factor: float, units: float) -> None: ... - def glCopyTexImage1D(self, target: int, level: int, internalformat: int, x: int, y: int, width: int, border: int) -> None: ... - def glCopyTexImage2D(self, target: int, level: int, internalformat: int, x: int, y: int, width: int, height: int, border: int) -> None: ... - def glCopyTexSubImage1D(self, target: int, level: int, xoffset: int, x: int, y: int, width: int) -> None: ... - def glCopyTexSubImage2D(self, target: int, level: int, xoffset: int, yoffset: int, x: int, y: int, width: int, height: int) -> None: ... - def glTexSubImage1D(self, target: int, level: int, xoffset: int, width: int, format: int, type: int, pixels: PYQT_OPENGL_ARRAY) -> None: ... - def glTexSubImage2D(self, target: int, level: int, xoffset: int, yoffset: int, width: int, height: int, format: int, type: int, pixels: PYQT_OPENGL_ARRAY) -> None: ... - def glBindTexture(self, target: int, texture: int) -> None: ... - def glDeleteTextures(self, n: int, textures: PYQT_OPENGL_ARRAY) -> None: ... - def glGenTextures(self, n: int) -> typing.Union[int, typing.Tuple[int, ...]]: ... - def glIsTexture(self, texture: int) -> int: ... - def glIndexub(self, c: int) -> None: ... - def glIndexubv(self, c: PYQT_OPENGL_ARRAY) -> None: ... - def glCullFace(self, mode: int) -> None: ... - def glFrontFace(self, mode: int) -> None: ... - def glHint(self, target: int, mode: int) -> None: ... - def glLineWidth(self, width: float) -> None: ... - def glPointSize(self, size: float) -> None: ... - def glPolygonMode(self, face: int, mode: int) -> None: ... - def glScissor(self, x: int, y: int, width: int, height: int) -> None: ... - def glTexParameterf(self, target: int, pname: int, param: float) -> None: ... - def glTexParameterfv(self, target: int, pname: int, params: PYQT_OPENGL_ARRAY) -> None: ... - def glTexParameteri(self, target: int, pname: int, param: int) -> None: ... - def glTexParameteriv(self, target: int, pname: int, params: PYQT_OPENGL_ARRAY) -> None: ... - def glTexImage1D(self, target: int, level: int, internalformat: int, width: int, border: int, format: int, type: int, pixels: PYQT_OPENGL_ARRAY) -> None: ... - def glTexImage2D(self, target: int, level: int, internalformat: int, width: int, height: int, border: int, format: int, type: int, pixels: PYQT_OPENGL_ARRAY) -> None: ... - def glDrawBuffer(self, mode: int) -> None: ... - def glClear(self, mask: int) -> None: ... - def glClearColor(self, red: float, green: float, blue: float, alpha: float) -> None: ... - def glClearStencil(self, s: int) -> None: ... - def glClearDepth(self, depth: float) -> None: ... - def glStencilMask(self, mask: int) -> None: ... - def glColorMask(self, red: int, green: int, blue: int, alpha: int) -> None: ... - def glDepthMask(self, flag: int) -> None: ... - def glDisable(self, cap: int) -> None: ... - def glEnable(self, cap: int) -> None: ... - def glFinish(self) -> None: ... - def glFlush(self) -> None: ... - def glBlendFunc(self, sfactor: int, dfactor: int) -> None: ... - def glLogicOp(self, opcode: int) -> None: ... - def glStencilFunc(self, func: int, ref: int, mask: int) -> None: ... - def glStencilOp(self, fail: int, zfail: int, zpass: int) -> None: ... - def glDepthFunc(self, func: int) -> None: ... - def glPixelStoref(self, pname: int, param: float) -> None: ... - def glPixelStorei(self, pname: int, param: int) -> None: ... - def glReadBuffer(self, mode: int) -> None: ... - def glGetBooleanv(self, pname: int) -> typing.Union[bool, typing.Tuple[bool, ...]]: ... - def glGetDoublev(self, pname: int) -> typing.Union[float, typing.Tuple[float, ...]]: ... - def glGetError(self) -> int: ... - def glGetFloatv(self, pname: int) -> typing.Union[float, typing.Tuple[float, ...]]: ... - def glGetIntegerv(self, pname: int) -> typing.Union[int, typing.Tuple[int, ...]]: ... - def glGetString(self, name: int) -> str: ... - def glGetTexParameterfv(self, target: int, pname: int) -> typing.Union[float, typing.Tuple[float, float, float, float]]: ... - def glGetTexParameteriv(self, target: int, pname: int) -> typing.Union[int, typing.Tuple[int, int, int, int]]: ... - def glGetTexLevelParameterfv(self, target: int, level: int, pname: int) -> float: ... - def glGetTexLevelParameteriv(self, target: int, level: int, pname: int) -> int: ... - def glIsEnabled(self, cap: int) -> int: ... - def glDepthRange(self, nearVal: float, farVal: float) -> None: ... - def glViewport(self, x: int, y: int, width: int, height: int) -> None: ... - def initializeOpenGLFunctions(self) -> bool: ... diff -Nru uranium-3.3.0/stubs/PyQt5/QtBluetooth.pyi uranium-4.4.1/stubs/PyQt5/QtBluetooth.pyi --- uranium-3.3.0/stubs/PyQt5/QtBluetooth.pyi 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/stubs/PyQt5/QtBluetooth.pyi 1970-01-01 00:00:00.000000000 +0000 @@ -1,1289 +0,0 @@ -# The PEP 484 type hints stub file for the QtBluetooth module. -# -# Generated by SIP 4.18.1 -# -# Copyright (c) 2016 Riverbank Computing Limited -# -# This file is part of PyQt5. -# -# This file may be used under the terms of the GNU General Public License -# version 3.0 as published by the Free Software Foundation and appearing in -# the file LICENSE included in the packaging of this file. Please review the -# following information to ensure the GNU General Public License version 3.0 -# requirements will be met: http://www.gnu.org/copyleft/gpl.html. -# -# If you do not wish to use this file under the terms of the GPL version 3.0 -# then you may purchase a commercial license. For more information contact -# info@riverbankcomputing.com. -# -# This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -# WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - - -import typing -import sip - -from PyQt5 import QtCore - -# Support for QDate, QDateTime and QTime. -import datetime - -# Convenient type aliases. -PYQT_SIGNAL = typing.Union[QtCore.pyqtSignal, QtCore.pyqtBoundSignal] -PYQT_SLOT = typing.Union[typing.Callable[..., None], QtCore.pyqtBoundSignal] - - -class QBluetooth(sip.simplewrapper): - - class AttAccessConstraint(int): ... - AttAuthorizationRequired = ... # type: 'QBluetooth.AttAccessConstraint' - AttAuthenticationRequired = ... # type: 'QBluetooth.AttAccessConstraint' - AttEncryptionRequired = ... # type: 'QBluetooth.AttAccessConstraint' - - class Security(int): ... - NoSecurity = ... # type: 'QBluetooth.Security' - Authorization = ... # type: 'QBluetooth.Security' - Authentication = ... # type: 'QBluetooth.Security' - Encryption = ... # type: 'QBluetooth.Security' - Secure = ... # type: 'QBluetooth.Security' - - class SecurityFlags(sip.wrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QBluetooth.SecurityFlags', 'QBluetooth.Security']) -> None: ... - @typing.overload - def __init__(self, a0: 'QBluetooth.SecurityFlags') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QBluetooth.SecurityFlags': ... - def __int__(self) -> int: ... - - class AttAccessConstraints(sip.wrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QBluetooth.AttAccessConstraints', 'QBluetooth.AttAccessConstraint']) -> None: ... - @typing.overload - def __init__(self, a0: 'QBluetooth.AttAccessConstraints') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QBluetooth.AttAccessConstraints': ... - def __int__(self) -> int: ... - - -class QBluetoothAddress(sip.wrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, address: int) -> None: ... - @typing.overload - def __init__(self, address: str) -> None: ... - @typing.overload - def __init__(self, other: 'QBluetoothAddress') -> None: ... - - def toString(self) -> str: ... - def toUInt64(self) -> int: ... - def clear(self) -> None: ... - def isNull(self) -> bool: ... - - -class QBluetoothDeviceDiscoveryAgent(QtCore.QObject): - - class InquiryType(int): ... - GeneralUnlimitedInquiry = ... # type: 'QBluetoothDeviceDiscoveryAgent.InquiryType' - LimitedInquiry = ... # type: 'QBluetoothDeviceDiscoveryAgent.InquiryType' - - class Error(int): ... - NoError = ... # type: 'QBluetoothDeviceDiscoveryAgent.Error' - InputOutputError = ... # type: 'QBluetoothDeviceDiscoveryAgent.Error' - PoweredOffError = ... # type: 'QBluetoothDeviceDiscoveryAgent.Error' - InvalidBluetoothAdapterError = ... # type: 'QBluetoothDeviceDiscoveryAgent.Error' - UnsupportedPlatformError = ... # type: 'QBluetoothDeviceDiscoveryAgent.Error' - UnknownError = ... # type: 'QBluetoothDeviceDiscoveryAgent.Error' - - @typing.overload - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - @typing.overload - def __init__(self, deviceAdapter: QBluetoothAddress, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def canceled(self) -> None: ... - def finished(self) -> None: ... - def deviceDiscovered(self, info: 'QBluetoothDeviceInfo') -> None: ... - def stop(self) -> None: ... - def start(self) -> None: ... - def discoveredDevices(self) -> typing.Any: ... - def errorString(self) -> str: ... - @typing.overload - def error(self) -> 'QBluetoothDeviceDiscoveryAgent.Error': ... - @typing.overload - def error(self, error: 'QBluetoothDeviceDiscoveryAgent.Error') -> None: ... - def isActive(self) -> bool: ... - def setInquiryType(self, type: 'QBluetoothDeviceDiscoveryAgent.InquiryType') -> None: ... - def inquiryType(self) -> 'QBluetoothDeviceDiscoveryAgent.InquiryType': ... - - -class QBluetoothDeviceInfo(sip.wrapper): - - class CoreConfiguration(int): ... - UnknownCoreConfiguration = ... # type: 'QBluetoothDeviceInfo.CoreConfiguration' - LowEnergyCoreConfiguration = ... # type: 'QBluetoothDeviceInfo.CoreConfiguration' - BaseRateCoreConfiguration = ... # type: 'QBluetoothDeviceInfo.CoreConfiguration' - BaseRateAndLowEnergyCoreConfiguration = ... # type: 'QBluetoothDeviceInfo.CoreConfiguration' - - class DataCompleteness(int): ... - DataComplete = ... # type: 'QBluetoothDeviceInfo.DataCompleteness' - DataIncomplete = ... # type: 'QBluetoothDeviceInfo.DataCompleteness' - DataUnavailable = ... # type: 'QBluetoothDeviceInfo.DataCompleteness' - - class ServiceClass(int): ... - NoService = ... # type: 'QBluetoothDeviceInfo.ServiceClass' - PositioningService = ... # type: 'QBluetoothDeviceInfo.ServiceClass' - NetworkingService = ... # type: 'QBluetoothDeviceInfo.ServiceClass' - RenderingService = ... # type: 'QBluetoothDeviceInfo.ServiceClass' - CapturingService = ... # type: 'QBluetoothDeviceInfo.ServiceClass' - ObjectTransferService = ... # type: 'QBluetoothDeviceInfo.ServiceClass' - AudioService = ... # type: 'QBluetoothDeviceInfo.ServiceClass' - TelephonyService = ... # type: 'QBluetoothDeviceInfo.ServiceClass' - InformationService = ... # type: 'QBluetoothDeviceInfo.ServiceClass' - AllServices = ... # type: 'QBluetoothDeviceInfo.ServiceClass' - - class MinorHealthClass(int): ... - UncategorizedHealthDevice = ... # type: 'QBluetoothDeviceInfo.MinorHealthClass' - HealthBloodPressureMonitor = ... # type: 'QBluetoothDeviceInfo.MinorHealthClass' - HealthThermometer = ... # type: 'QBluetoothDeviceInfo.MinorHealthClass' - HealthWeightScale = ... # type: 'QBluetoothDeviceInfo.MinorHealthClass' - HealthGlucoseMeter = ... # type: 'QBluetoothDeviceInfo.MinorHealthClass' - HealthPulseOximeter = ... # type: 'QBluetoothDeviceInfo.MinorHealthClass' - HealthDataDisplay = ... # type: 'QBluetoothDeviceInfo.MinorHealthClass' - HealthStepCounter = ... # type: 'QBluetoothDeviceInfo.MinorHealthClass' - - class MinorToyClass(int): ... - UncategorizedToy = ... # type: 'QBluetoothDeviceInfo.MinorToyClass' - ToyRobot = ... # type: 'QBluetoothDeviceInfo.MinorToyClass' - ToyVehicle = ... # type: 'QBluetoothDeviceInfo.MinorToyClass' - ToyDoll = ... # type: 'QBluetoothDeviceInfo.MinorToyClass' - ToyController = ... # type: 'QBluetoothDeviceInfo.MinorToyClass' - ToyGame = ... # type: 'QBluetoothDeviceInfo.MinorToyClass' - - class MinorWearableClass(int): ... - UncategorizedWearableDevice = ... # type: 'QBluetoothDeviceInfo.MinorWearableClass' - WearableWristWatch = ... # type: 'QBluetoothDeviceInfo.MinorWearableClass' - WearablePager = ... # type: 'QBluetoothDeviceInfo.MinorWearableClass' - WearableJacket = ... # type: 'QBluetoothDeviceInfo.MinorWearableClass' - WearableHelmet = ... # type: 'QBluetoothDeviceInfo.MinorWearableClass' - WearableGlasses = ... # type: 'QBluetoothDeviceInfo.MinorWearableClass' - - class MinorImagingClass(int): ... - UncategorizedImagingDevice = ... # type: 'QBluetoothDeviceInfo.MinorImagingClass' - ImageDisplay = ... # type: 'QBluetoothDeviceInfo.MinorImagingClass' - ImageCamera = ... # type: 'QBluetoothDeviceInfo.MinorImagingClass' - ImageScanner = ... # type: 'QBluetoothDeviceInfo.MinorImagingClass' - ImagePrinter = ... # type: 'QBluetoothDeviceInfo.MinorImagingClass' - - class MinorPeripheralClass(int): ... - UncategorizedPeripheral = ... # type: 'QBluetoothDeviceInfo.MinorPeripheralClass' - KeyboardPeripheral = ... # type: 'QBluetoothDeviceInfo.MinorPeripheralClass' - PointingDevicePeripheral = ... # type: 'QBluetoothDeviceInfo.MinorPeripheralClass' - KeyboardWithPointingDevicePeripheral = ... # type: 'QBluetoothDeviceInfo.MinorPeripheralClass' - JoystickPeripheral = ... # type: 'QBluetoothDeviceInfo.MinorPeripheralClass' - GamepadPeripheral = ... # type: 'QBluetoothDeviceInfo.MinorPeripheralClass' - RemoteControlPeripheral = ... # type: 'QBluetoothDeviceInfo.MinorPeripheralClass' - SensingDevicePeripheral = ... # type: 'QBluetoothDeviceInfo.MinorPeripheralClass' - DigitizerTabletPeripheral = ... # type: 'QBluetoothDeviceInfo.MinorPeripheralClass' - CardReaderPeripheral = ... # type: 'QBluetoothDeviceInfo.MinorPeripheralClass' - - class MinorAudioVideoClass(int): ... - UncategorizedAudioVideoDevice = ... # type: 'QBluetoothDeviceInfo.MinorAudioVideoClass' - WearableHeadsetDevice = ... # type: 'QBluetoothDeviceInfo.MinorAudioVideoClass' - HandsFreeDevice = ... # type: 'QBluetoothDeviceInfo.MinorAudioVideoClass' - Microphone = ... # type: 'QBluetoothDeviceInfo.MinorAudioVideoClass' - Loudspeaker = ... # type: 'QBluetoothDeviceInfo.MinorAudioVideoClass' - Headphones = ... # type: 'QBluetoothDeviceInfo.MinorAudioVideoClass' - PortableAudioDevice = ... # type: 'QBluetoothDeviceInfo.MinorAudioVideoClass' - CarAudio = ... # type: 'QBluetoothDeviceInfo.MinorAudioVideoClass' - SetTopBox = ... # type: 'QBluetoothDeviceInfo.MinorAudioVideoClass' - HiFiAudioDevice = ... # type: 'QBluetoothDeviceInfo.MinorAudioVideoClass' - Vcr = ... # type: 'QBluetoothDeviceInfo.MinorAudioVideoClass' - VideoCamera = ... # type: 'QBluetoothDeviceInfo.MinorAudioVideoClass' - Camcorder = ... # type: 'QBluetoothDeviceInfo.MinorAudioVideoClass' - VideoMonitor = ... # type: 'QBluetoothDeviceInfo.MinorAudioVideoClass' - VideoDisplayAndLoudspeaker = ... # type: 'QBluetoothDeviceInfo.MinorAudioVideoClass' - VideoConferencing = ... # type: 'QBluetoothDeviceInfo.MinorAudioVideoClass' - GamingDevice = ... # type: 'QBluetoothDeviceInfo.MinorAudioVideoClass' - - class MinorNetworkClass(int): ... - NetworkFullService = ... # type: 'QBluetoothDeviceInfo.MinorNetworkClass' - NetworkLoadFactorOne = ... # type: 'QBluetoothDeviceInfo.MinorNetworkClass' - NetworkLoadFactorTwo = ... # type: 'QBluetoothDeviceInfo.MinorNetworkClass' - NetworkLoadFactorThree = ... # type: 'QBluetoothDeviceInfo.MinorNetworkClass' - NetworkLoadFactorFour = ... # type: 'QBluetoothDeviceInfo.MinorNetworkClass' - NetworkLoadFactorFive = ... # type: 'QBluetoothDeviceInfo.MinorNetworkClass' - NetworkLoadFactorSix = ... # type: 'QBluetoothDeviceInfo.MinorNetworkClass' - NetworkNoService = ... # type: 'QBluetoothDeviceInfo.MinorNetworkClass' - - class MinorPhoneClass(int): ... - UncategorizedPhone = ... # type: 'QBluetoothDeviceInfo.MinorPhoneClass' - CellularPhone = ... # type: 'QBluetoothDeviceInfo.MinorPhoneClass' - CordlessPhone = ... # type: 'QBluetoothDeviceInfo.MinorPhoneClass' - SmartPhone = ... # type: 'QBluetoothDeviceInfo.MinorPhoneClass' - WiredModemOrVoiceGatewayPhone = ... # type: 'QBluetoothDeviceInfo.MinorPhoneClass' - CommonIsdnAccessPhone = ... # type: 'QBluetoothDeviceInfo.MinorPhoneClass' - - class MinorComputerClass(int): ... - UncategorizedComputer = ... # type: 'QBluetoothDeviceInfo.MinorComputerClass' - DesktopComputer = ... # type: 'QBluetoothDeviceInfo.MinorComputerClass' - ServerComputer = ... # type: 'QBluetoothDeviceInfo.MinorComputerClass' - LaptopComputer = ... # type: 'QBluetoothDeviceInfo.MinorComputerClass' - HandheldClamShellComputer = ... # type: 'QBluetoothDeviceInfo.MinorComputerClass' - HandheldComputer = ... # type: 'QBluetoothDeviceInfo.MinorComputerClass' - WearableComputer = ... # type: 'QBluetoothDeviceInfo.MinorComputerClass' - - class MinorMiscellaneousClass(int): ... - UncategorizedMiscellaneous = ... # type: 'QBluetoothDeviceInfo.MinorMiscellaneousClass' - - class MajorDeviceClass(int): ... - MiscellaneousDevice = ... # type: 'QBluetoothDeviceInfo.MajorDeviceClass' - ComputerDevice = ... # type: 'QBluetoothDeviceInfo.MajorDeviceClass' - PhoneDevice = ... # type: 'QBluetoothDeviceInfo.MajorDeviceClass' - LANAccessDevice = ... # type: 'QBluetoothDeviceInfo.MajorDeviceClass' - AudioVideoDevice = ... # type: 'QBluetoothDeviceInfo.MajorDeviceClass' - PeripheralDevice = ... # type: 'QBluetoothDeviceInfo.MajorDeviceClass' - ImagingDevice = ... # type: 'QBluetoothDeviceInfo.MajorDeviceClass' - WearableDevice = ... # type: 'QBluetoothDeviceInfo.MajorDeviceClass' - ToyDevice = ... # type: 'QBluetoothDeviceInfo.MajorDeviceClass' - HealthDevice = ... # type: 'QBluetoothDeviceInfo.MajorDeviceClass' - UncategorizedDevice = ... # type: 'QBluetoothDeviceInfo.MajorDeviceClass' - - class ServiceClasses(sip.wrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QBluetoothDeviceInfo.ServiceClasses', 'QBluetoothDeviceInfo.ServiceClass']) -> None: ... - @typing.overload - def __init__(self, a0: 'QBluetoothDeviceInfo.ServiceClasses') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QBluetoothDeviceInfo.ServiceClasses': ... - def __int__(self) -> int: ... - - class CoreConfigurations(sip.wrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QBluetoothDeviceInfo.CoreConfigurations', 'QBluetoothDeviceInfo.CoreConfiguration']) -> None: ... - @typing.overload - def __init__(self, a0: 'QBluetoothDeviceInfo.CoreConfigurations') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QBluetoothDeviceInfo.CoreConfigurations': ... - def __int__(self) -> int: ... - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, address: QBluetoothAddress, name: str, classOfDevice: int) -> None: ... - @typing.overload - def __init__(self, uuid: 'QBluetoothUuid', name: str, classOfDevice: int) -> None: ... - @typing.overload - def __init__(self, other: 'QBluetoothDeviceInfo') -> None: ... - - def deviceUuid(self) -> 'QBluetoothUuid': ... - def setDeviceUuid(self, uuid: 'QBluetoothUuid') -> None: ... - def coreConfigurations(self) -> 'QBluetoothDeviceInfo.CoreConfigurations': ... - def setCoreConfigurations(self, coreConfigs: typing.Union['QBluetoothDeviceInfo.CoreConfigurations', 'QBluetoothDeviceInfo.CoreConfiguration']) -> None: ... - def serviceUuidsCompleteness(self) -> 'QBluetoothDeviceInfo.DataCompleteness': ... - def serviceUuids(self) -> typing.Tuple[typing.List['QBluetoothUuid'], 'QBluetoothDeviceInfo.DataCompleteness']: ... - def setServiceUuids(self, uuids: typing.Any, completeness: 'QBluetoothDeviceInfo.DataCompleteness') -> None: ... - def setRssi(self, signal: int) -> None: ... - def rssi(self) -> int: ... - def minorDeviceClass(self) -> int: ... - def majorDeviceClass(self) -> 'QBluetoothDeviceInfo.MajorDeviceClass': ... - def serviceClasses(self) -> 'QBluetoothDeviceInfo.ServiceClasses': ... - def name(self) -> str: ... - def address(self) -> QBluetoothAddress: ... - def setCached(self, cached: bool) -> None: ... - def isCached(self) -> bool: ... - def isValid(self) -> bool: ... - - -class QBluetoothHostInfo(sip.wrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, other: 'QBluetoothHostInfo') -> None: ... - - def setName(self, name: str) -> None: ... - def name(self) -> str: ... - def setAddress(self, address: QBluetoothAddress) -> None: ... - def address(self) -> QBluetoothAddress: ... - - -class QBluetoothLocalDevice(QtCore.QObject): - - class Error(int): ... - NoError = ... # type: 'QBluetoothLocalDevice.Error' - PairingError = ... # type: 'QBluetoothLocalDevice.Error' - UnknownError = ... # type: 'QBluetoothLocalDevice.Error' - - class HostMode(int): ... - HostPoweredOff = ... # type: 'QBluetoothLocalDevice.HostMode' - HostConnectable = ... # type: 'QBluetoothLocalDevice.HostMode' - HostDiscoverable = ... # type: 'QBluetoothLocalDevice.HostMode' - HostDiscoverableLimitedInquiry = ... # type: 'QBluetoothLocalDevice.HostMode' - - class Pairing(int): ... - Unpaired = ... # type: 'QBluetoothLocalDevice.Pairing' - Paired = ... # type: 'QBluetoothLocalDevice.Pairing' - AuthorizedPaired = ... # type: 'QBluetoothLocalDevice.Pairing' - - @typing.overload - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - @typing.overload - def __init__(self, address: QBluetoothAddress, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def deviceDisconnected(self, address: QBluetoothAddress) -> None: ... - def deviceConnected(self, address: QBluetoothAddress) -> None: ... - def error(self, error: 'QBluetoothLocalDevice.Error') -> None: ... - def pairingDisplayConfirmation(self, address: QBluetoothAddress, pin: str) -> None: ... - def pairingDisplayPinCode(self, address: QBluetoothAddress, pin: str) -> None: ... - def pairingFinished(self, address: QBluetoothAddress, pairing: 'QBluetoothLocalDevice.Pairing') -> None: ... - def hostModeStateChanged(self, state: 'QBluetoothLocalDevice.HostMode') -> None: ... - def pairingConfirmation(self, confirmation: bool) -> None: ... - def connectedDevices(self) -> typing.Any: ... - @staticmethod - def allDevices() -> typing.Any: ... - def address(self) -> QBluetoothAddress: ... - def name(self) -> str: ... - def powerOn(self) -> None: ... - def hostMode(self) -> 'QBluetoothLocalDevice.HostMode': ... - def setHostMode(self, mode: 'QBluetoothLocalDevice.HostMode') -> None: ... - def pairingStatus(self, address: QBluetoothAddress) -> 'QBluetoothLocalDevice.Pairing': ... - def requestPairing(self, address: QBluetoothAddress, pairing: 'QBluetoothLocalDevice.Pairing') -> None: ... - def isValid(self) -> bool: ... - - -class QBluetoothServer(QtCore.QObject): - - class Error(int): ... - NoError = ... # type: 'QBluetoothServer.Error' - UnknownError = ... # type: 'QBluetoothServer.Error' - PoweredOffError = ... # type: 'QBluetoothServer.Error' - InputOutputError = ... # type: 'QBluetoothServer.Error' - ServiceAlreadyRegisteredError = ... # type: 'QBluetoothServer.Error' - UnsupportedProtocolError = ... # type: 'QBluetoothServer.Error' - - def __init__(self, serverType: 'QBluetoothServiceInfo.Protocol', parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def newConnection(self) -> None: ... - @typing.overload - def error(self) -> 'QBluetoothServer.Error': ... - @typing.overload - def error(self, a0: 'QBluetoothServer.Error') -> None: ... - def serverType(self) -> 'QBluetoothServiceInfo.Protocol': ... - def securityFlags(self) -> QBluetooth.SecurityFlags: ... - def setSecurityFlags(self, security: typing.Union[QBluetooth.SecurityFlags, QBluetooth.Security]) -> None: ... - def serverPort(self) -> int: ... - def serverAddress(self) -> QBluetoothAddress: ... - def nextPendingConnection(self) -> 'QBluetoothSocket': ... - def hasPendingConnections(self) -> bool: ... - def maxPendingConnections(self) -> int: ... - def setMaxPendingConnections(self, numConnections: int) -> None: ... - def isListening(self) -> bool: ... - @typing.overload - def listen(self, address: QBluetoothAddress = ..., port: int = ...) -> bool: ... - @typing.overload - def listen(self, uuid: 'QBluetoothUuid', serviceName: str = ...) -> 'QBluetoothServiceInfo': ... - def close(self) -> None: ... - - -class QBluetoothServiceDiscoveryAgent(QtCore.QObject): - - class DiscoveryMode(int): ... - MinimalDiscovery = ... # type: 'QBluetoothServiceDiscoveryAgent.DiscoveryMode' - FullDiscovery = ... # type: 'QBluetoothServiceDiscoveryAgent.DiscoveryMode' - - class Error(int): ... - NoError = ... # type: 'QBluetoothServiceDiscoveryAgent.Error' - InputOutputError = ... # type: 'QBluetoothServiceDiscoveryAgent.Error' - PoweredOffError = ... # type: 'QBluetoothServiceDiscoveryAgent.Error' - InvalidBluetoothAdapterError = ... # type: 'QBluetoothServiceDiscoveryAgent.Error' - UnknownError = ... # type: 'QBluetoothServiceDiscoveryAgent.Error' - - @typing.overload - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - @typing.overload - def __init__(self, deviceAdapter: QBluetoothAddress, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def canceled(self) -> None: ... - def finished(self) -> None: ... - def serviceDiscovered(self, info: 'QBluetoothServiceInfo') -> None: ... - def clear(self) -> None: ... - def stop(self) -> None: ... - def start(self, mode: 'QBluetoothServiceDiscoveryAgent.DiscoveryMode' = ...) -> None: ... - def remoteAddress(self) -> QBluetoothAddress: ... - def setRemoteAddress(self, address: QBluetoothAddress) -> bool: ... - def uuidFilter(self) -> typing.List['QBluetoothUuid']: ... - @typing.overload - def setUuidFilter(self, uuids: typing.Iterable['QBluetoothUuid']) -> None: ... - @typing.overload - def setUuidFilter(self, uuid: 'QBluetoothUuid') -> None: ... - def discoveredServices(self) -> typing.Any: ... - def errorString(self) -> str: ... - @typing.overload - def error(self) -> 'QBluetoothServiceDiscoveryAgent.Error': ... - @typing.overload - def error(self, error: 'QBluetoothServiceDiscoveryAgent.Error') -> None: ... - def isActive(self) -> bool: ... - - -class QBluetoothServiceInfo(sip.wrapper): - - class Protocol(int): ... - UnknownProtocol = ... # type: 'QBluetoothServiceInfo.Protocol' - L2capProtocol = ... # type: 'QBluetoothServiceInfo.Protocol' - RfcommProtocol = ... # type: 'QBluetoothServiceInfo.Protocol' - - class AttributeId(int): ... - ServiceRecordHandle = ... # type: 'QBluetoothServiceInfo.AttributeId' - ServiceClassIds = ... # type: 'QBluetoothServiceInfo.AttributeId' - ServiceRecordState = ... # type: 'QBluetoothServiceInfo.AttributeId' - ServiceId = ... # type: 'QBluetoothServiceInfo.AttributeId' - ProtocolDescriptorList = ... # type: 'QBluetoothServiceInfo.AttributeId' - BrowseGroupList = ... # type: 'QBluetoothServiceInfo.AttributeId' - LanguageBaseAttributeIdList = ... # type: 'QBluetoothServiceInfo.AttributeId' - ServiceInfoTimeToLive = ... # type: 'QBluetoothServiceInfo.AttributeId' - ServiceAvailability = ... # type: 'QBluetoothServiceInfo.AttributeId' - BluetoothProfileDescriptorList = ... # type: 'QBluetoothServiceInfo.AttributeId' - DocumentationUrl = ... # type: 'QBluetoothServiceInfo.AttributeId' - ClientExecutableUrl = ... # type: 'QBluetoothServiceInfo.AttributeId' - IconUrl = ... # type: 'QBluetoothServiceInfo.AttributeId' - AdditionalProtocolDescriptorList = ... # type: 'QBluetoothServiceInfo.AttributeId' - PrimaryLanguageBase = ... # type: 'QBluetoothServiceInfo.AttributeId' - ServiceName = ... # type: 'QBluetoothServiceInfo.AttributeId' - ServiceDescription = ... # type: 'QBluetoothServiceInfo.AttributeId' - ServiceProvider = ... # type: 'QBluetoothServiceInfo.AttributeId' - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, other: 'QBluetoothServiceInfo') -> None: ... - - def serviceClassUuids(self) -> typing.List['QBluetoothUuid']: ... - def serviceUuid(self) -> 'QBluetoothUuid': ... - def setServiceUuid(self, uuid: 'QBluetoothUuid') -> None: ... - def serviceAvailability(self) -> int: ... - def setServiceAvailability(self, availability: int) -> None: ... - def serviceProvider(self) -> str: ... - def setServiceProvider(self, provider: str) -> None: ... - def serviceDescription(self) -> str: ... - def setServiceDescription(self, description: str) -> None: ... - def serviceName(self) -> str: ... - def setServiceName(self, name: str) -> None: ... - @typing.overload - def setAttribute(self, attributeId: int, value: 'QBluetoothUuid') -> None: ... - @typing.overload - def setAttribute(self, attributeId: int, value: typing.Iterable[typing.Any]) -> None: ... - @typing.overload - def setAttribute(self, attributeId: int, value: typing.Any) -> None: ... - def unregisterService(self) -> bool: ... - def registerService(self, localAdapter: QBluetoothAddress = ...) -> bool: ... - def isRegistered(self) -> bool: ... - def protocolDescriptor(self, protocol: 'QBluetoothUuid.ProtocolUuid') -> typing.List[typing.Any]: ... - def serverChannel(self) -> int: ... - def protocolServiceMultiplexer(self) -> int: ... - def socketProtocol(self) -> 'QBluetoothServiceInfo.Protocol': ... - def removeAttribute(self, attributeId: int) -> None: ... - def contains(self, attributeId: int) -> bool: ... - def attributes(self) -> typing.List[int]: ... - def attribute(self, attributeId: int) -> typing.Any: ... - def device(self) -> QBluetoothDeviceInfo: ... - def setDevice(self, info: QBluetoothDeviceInfo) -> None: ... - def isComplete(self) -> bool: ... - def isValid(self) -> bool: ... - - -class QBluetoothSocket(QtCore.QIODevice): - - class SocketError(int): ... - NoSocketError = ... # type: 'QBluetoothSocket.SocketError' - UnknownSocketError = ... # type: 'QBluetoothSocket.SocketError' - HostNotFoundError = ... # type: 'QBluetoothSocket.SocketError' - ServiceNotFoundError = ... # type: 'QBluetoothSocket.SocketError' - NetworkError = ... # type: 'QBluetoothSocket.SocketError' - UnsupportedProtocolError = ... # type: 'QBluetoothSocket.SocketError' - OperationError = ... # type: 'QBluetoothSocket.SocketError' - - class SocketState(int): ... - UnconnectedState = ... # type: 'QBluetoothSocket.SocketState' - ServiceLookupState = ... # type: 'QBluetoothSocket.SocketState' - ConnectingState = ... # type: 'QBluetoothSocket.SocketState' - ConnectedState = ... # type: 'QBluetoothSocket.SocketState' - BoundState = ... # type: 'QBluetoothSocket.SocketState' - ClosingState = ... # type: 'QBluetoothSocket.SocketState' - ListeningState = ... # type: 'QBluetoothSocket.SocketState' - - @typing.overload - def __init__(self, socketType: QBluetoothServiceInfo.Protocol, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - @typing.overload - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def preferredSecurityFlags(self) -> QBluetooth.SecurityFlags: ... - def setPreferredSecurityFlags(self, flags: typing.Union[QBluetooth.SecurityFlags, QBluetooth.Security]) -> None: ... - def doDeviceDiscovery(self, service: QBluetoothServiceInfo, openMode: typing.Union[QtCore.QIODevice.OpenMode, QtCore.QIODevice.OpenModeFlag]) -> None: ... - def setSocketError(self, error: 'QBluetoothSocket.SocketError') -> None: ... - def setSocketState(self, state: 'QBluetoothSocket.SocketState') -> None: ... - def writeData(self, data: bytes) -> int: ... - def readData(self, maxlen: int) -> bytes: ... - def stateChanged(self, state: 'QBluetoothSocket.SocketState') -> None: ... - def disconnected(self) -> None: ... - def connected(self) -> None: ... - def errorString(self) -> str: ... - @typing.overload - def error(self) -> 'QBluetoothSocket.SocketError': ... - @typing.overload - def error(self, error: 'QBluetoothSocket.SocketError') -> None: ... - def state(self) -> 'QBluetoothSocket.SocketState': ... - def socketType(self) -> QBluetoothServiceInfo.Protocol: ... - def socketDescriptor(self) -> int: ... - def setSocketDescriptor(self, socketDescriptor: int, socketType: QBluetoothServiceInfo.Protocol, state: 'QBluetoothSocket.SocketState' = ..., mode: typing.Union[QtCore.QIODevice.OpenMode, QtCore.QIODevice.OpenModeFlag] = ...) -> bool: ... - def peerPort(self) -> int: ... - def peerAddress(self) -> QBluetoothAddress: ... - def peerName(self) -> str: ... - def localPort(self) -> int: ... - def localAddress(self) -> QBluetoothAddress: ... - def localName(self) -> str: ... - def disconnectFromService(self) -> None: ... - @typing.overload - def connectToService(self, service: QBluetoothServiceInfo, mode: typing.Union[QtCore.QIODevice.OpenMode, QtCore.QIODevice.OpenModeFlag] = ...) -> None: ... - @typing.overload - def connectToService(self, address: QBluetoothAddress, uuid: 'QBluetoothUuid', mode: typing.Union[QtCore.QIODevice.OpenMode, QtCore.QIODevice.OpenModeFlag] = ...) -> None: ... - @typing.overload - def connectToService(self, address: QBluetoothAddress, port: int, mode: typing.Union[QtCore.QIODevice.OpenMode, QtCore.QIODevice.OpenModeFlag] = ...) -> None: ... - def canReadLine(self) -> bool: ... - def bytesToWrite(self) -> int: ... - def bytesAvailable(self) -> int: ... - def isSequential(self) -> bool: ... - def close(self) -> None: ... - def abort(self) -> None: ... - - -class QBluetoothTransferManager(QtCore.QObject): - - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def finished(self, reply: 'QBluetoothTransferReply') -> None: ... - def put(self, request: 'QBluetoothTransferRequest', data: QtCore.QIODevice) -> 'QBluetoothTransferReply': ... - - -class QBluetoothTransferReply(QtCore.QObject): - - class TransferError(int): ... - NoError = ... # type: 'QBluetoothTransferReply.TransferError' - UnknownError = ... # type: 'QBluetoothTransferReply.TransferError' - FileNotFoundError = ... # type: 'QBluetoothTransferReply.TransferError' - HostNotFoundError = ... # type: 'QBluetoothTransferReply.TransferError' - UserCanceledTransferError = ... # type: 'QBluetoothTransferReply.TransferError' - IODeviceNotReadableError = ... # type: 'QBluetoothTransferReply.TransferError' - ResourceBusyError = ... # type: 'QBluetoothTransferReply.TransferError' - SessionError = ... # type: 'QBluetoothTransferReply.TransferError' - - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def setRequest(self, request: 'QBluetoothTransferRequest') -> None: ... - def setManager(self, manager: QBluetoothTransferManager) -> None: ... - def transferProgress(self, bytesTransferred: int, bytesTotal: int) -> None: ... - def finished(self, a0: 'QBluetoothTransferReply') -> None: ... - def abort(self) -> None: ... - def request(self) -> 'QBluetoothTransferRequest': ... - def errorString(self) -> str: ... - @typing.overload - def error(self) -> 'QBluetoothTransferReply.TransferError': ... - @typing.overload - def error(self, lastError: 'QBluetoothTransferReply.TransferError') -> None: ... - def manager(self) -> QBluetoothTransferManager: ... - def isRunning(self) -> bool: ... - def isFinished(self) -> bool: ... - - -class QBluetoothTransferRequest(sip.wrapper): - - class Attribute(int): ... - DescriptionAttribute = ... # type: 'QBluetoothTransferRequest.Attribute' - TimeAttribute = ... # type: 'QBluetoothTransferRequest.Attribute' - TypeAttribute = ... # type: 'QBluetoothTransferRequest.Attribute' - LengthAttribute = ... # type: 'QBluetoothTransferRequest.Attribute' - NameAttribute = ... # type: 'QBluetoothTransferRequest.Attribute' - - @typing.overload - def __init__(self, address: QBluetoothAddress = ...) -> None: ... - @typing.overload - def __init__(self, other: 'QBluetoothTransferRequest') -> None: ... - - def address(self) -> QBluetoothAddress: ... - def setAttribute(self, code: 'QBluetoothTransferRequest.Attribute', value: typing.Any) -> None: ... - def attribute(self, code: 'QBluetoothTransferRequest.Attribute', defaultValue: typing.Any = ...) -> typing.Any: ... - - -class QBluetoothUuid(QtCore.QUuid): - - class DescriptorType(int): ... - UnknownDescriptorType = ... # type: 'QBluetoothUuid.DescriptorType' - CharacteristicExtendedProperties = ... # type: 'QBluetoothUuid.DescriptorType' - CharacteristicUserDescription = ... # type: 'QBluetoothUuid.DescriptorType' - ClientCharacteristicConfiguration = ... # type: 'QBluetoothUuid.DescriptorType' - ServerCharacteristicConfiguration = ... # type: 'QBluetoothUuid.DescriptorType' - CharacteristicPresentationFormat = ... # type: 'QBluetoothUuid.DescriptorType' - CharacteristicAggregateFormat = ... # type: 'QBluetoothUuid.DescriptorType' - ValidRange = ... # type: 'QBluetoothUuid.DescriptorType' - ExternalReportReference = ... # type: 'QBluetoothUuid.DescriptorType' - ReportReference = ... # type: 'QBluetoothUuid.DescriptorType' - EnvironmentalSensingConfiguration = ... # type: 'QBluetoothUuid.DescriptorType' - EnvironmentalSensingMeasurement = ... # type: 'QBluetoothUuid.DescriptorType' - EnvironmentalSensingTriggerSetting = ... # type: 'QBluetoothUuid.DescriptorType' - - class CharacteristicType(int): ... - DeviceName = ... # type: 'QBluetoothUuid.CharacteristicType' - Appearance = ... # type: 'QBluetoothUuid.CharacteristicType' - PeripheralPrivacyFlag = ... # type: 'QBluetoothUuid.CharacteristicType' - ReconnectionAddress = ... # type: 'QBluetoothUuid.CharacteristicType' - PeripheralPreferredConnectionParameters = ... # type: 'QBluetoothUuid.CharacteristicType' - ServiceChanged = ... # type: 'QBluetoothUuid.CharacteristicType' - AlertLevel = ... # type: 'QBluetoothUuid.CharacteristicType' - TxPowerLevel = ... # type: 'QBluetoothUuid.CharacteristicType' - DateTime = ... # type: 'QBluetoothUuid.CharacteristicType' - DayOfWeek = ... # type: 'QBluetoothUuid.CharacteristicType' - DayDateTime = ... # type: 'QBluetoothUuid.CharacteristicType' - ExactTime256 = ... # type: 'QBluetoothUuid.CharacteristicType' - DSTOffset = ... # type: 'QBluetoothUuid.CharacteristicType' - TimeZone = ... # type: 'QBluetoothUuid.CharacteristicType' - LocalTimeInformation = ... # type: 'QBluetoothUuid.CharacteristicType' - TimeWithDST = ... # type: 'QBluetoothUuid.CharacteristicType' - TimeAccuracy = ... # type: 'QBluetoothUuid.CharacteristicType' - TimeSource = ... # type: 'QBluetoothUuid.CharacteristicType' - ReferenceTimeInformation = ... # type: 'QBluetoothUuid.CharacteristicType' - TimeUpdateControlPoint = ... # type: 'QBluetoothUuid.CharacteristicType' - TimeUpdateState = ... # type: 'QBluetoothUuid.CharacteristicType' - GlucoseMeasurement = ... # type: 'QBluetoothUuid.CharacteristicType' - BatteryLevel = ... # type: 'QBluetoothUuid.CharacteristicType' - TemperatureMeasurement = ... # type: 'QBluetoothUuid.CharacteristicType' - TemperatureType = ... # type: 'QBluetoothUuid.CharacteristicType' - IntermediateTemperature = ... # type: 'QBluetoothUuid.CharacteristicType' - MeasurementInterval = ... # type: 'QBluetoothUuid.CharacteristicType' - BootKeyboardInputReport = ... # type: 'QBluetoothUuid.CharacteristicType' - SystemID = ... # type: 'QBluetoothUuid.CharacteristicType' - ModelNumberString = ... # type: 'QBluetoothUuid.CharacteristicType' - SerialNumberString = ... # type: 'QBluetoothUuid.CharacteristicType' - FirmwareRevisionString = ... # type: 'QBluetoothUuid.CharacteristicType' - HardwareRevisionString = ... # type: 'QBluetoothUuid.CharacteristicType' - SoftwareRevisionString = ... # type: 'QBluetoothUuid.CharacteristicType' - ManufacturerNameString = ... # type: 'QBluetoothUuid.CharacteristicType' - IEEE1107320601RegulatoryCertificationDataList = ... # type: 'QBluetoothUuid.CharacteristicType' - CurrentTime = ... # type: 'QBluetoothUuid.CharacteristicType' - ScanRefresh = ... # type: 'QBluetoothUuid.CharacteristicType' - BootKeyboardOutputReport = ... # type: 'QBluetoothUuid.CharacteristicType' - BootMouseInputReport = ... # type: 'QBluetoothUuid.CharacteristicType' - GlucoseMeasurementContext = ... # type: 'QBluetoothUuid.CharacteristicType' - BloodPressureMeasurement = ... # type: 'QBluetoothUuid.CharacteristicType' - IntermediateCuffPressure = ... # type: 'QBluetoothUuid.CharacteristicType' - HeartRateMeasurement = ... # type: 'QBluetoothUuid.CharacteristicType' - BodySensorLocation = ... # type: 'QBluetoothUuid.CharacteristicType' - HeartRateControlPoint = ... # type: 'QBluetoothUuid.CharacteristicType' - AlertStatus = ... # type: 'QBluetoothUuid.CharacteristicType' - RingerControlPoint = ... # type: 'QBluetoothUuid.CharacteristicType' - RingerSetting = ... # type: 'QBluetoothUuid.CharacteristicType' - AlertCategoryIDBitMask = ... # type: 'QBluetoothUuid.CharacteristicType' - AlertCategoryID = ... # type: 'QBluetoothUuid.CharacteristicType' - AlertNotificationControlPoint = ... # type: 'QBluetoothUuid.CharacteristicType' - UnreadAlertStatus = ... # type: 'QBluetoothUuid.CharacteristicType' - NewAlert = ... # type: 'QBluetoothUuid.CharacteristicType' - SupportedNewAlertCategory = ... # type: 'QBluetoothUuid.CharacteristicType' - SupportedUnreadAlertCategory = ... # type: 'QBluetoothUuid.CharacteristicType' - BloodPressureFeature = ... # type: 'QBluetoothUuid.CharacteristicType' - HIDInformation = ... # type: 'QBluetoothUuid.CharacteristicType' - ReportMap = ... # type: 'QBluetoothUuid.CharacteristicType' - HIDControlPoint = ... # type: 'QBluetoothUuid.CharacteristicType' - Report = ... # type: 'QBluetoothUuid.CharacteristicType' - ProtocolMode = ... # type: 'QBluetoothUuid.CharacteristicType' - ScanIntervalWindow = ... # type: 'QBluetoothUuid.CharacteristicType' - PnPID = ... # type: 'QBluetoothUuid.CharacteristicType' - GlucoseFeature = ... # type: 'QBluetoothUuid.CharacteristicType' - RecordAccessControlPoint = ... # type: 'QBluetoothUuid.CharacteristicType' - RSCMeasurement = ... # type: 'QBluetoothUuid.CharacteristicType' - RSCFeature = ... # type: 'QBluetoothUuid.CharacteristicType' - SCControlPoint = ... # type: 'QBluetoothUuid.CharacteristicType' - CSCMeasurement = ... # type: 'QBluetoothUuid.CharacteristicType' - CSCFeature = ... # type: 'QBluetoothUuid.CharacteristicType' - SensorLocation = ... # type: 'QBluetoothUuid.CharacteristicType' - CyclingPowerMeasurement = ... # type: 'QBluetoothUuid.CharacteristicType' - CyclingPowerVector = ... # type: 'QBluetoothUuid.CharacteristicType' - CyclingPowerFeature = ... # type: 'QBluetoothUuid.CharacteristicType' - CyclingPowerControlPoint = ... # type: 'QBluetoothUuid.CharacteristicType' - LocationAndSpeed = ... # type: 'QBluetoothUuid.CharacteristicType' - Navigation = ... # type: 'QBluetoothUuid.CharacteristicType' - PositionQuality = ... # type: 'QBluetoothUuid.CharacteristicType' - LNFeature = ... # type: 'QBluetoothUuid.CharacteristicType' - LNControlPoint = ... # type: 'QBluetoothUuid.CharacteristicType' - MagneticDeclination = ... # type: 'QBluetoothUuid.CharacteristicType' - Elevation = ... # type: 'QBluetoothUuid.CharacteristicType' - Pressure = ... # type: 'QBluetoothUuid.CharacteristicType' - Temperature = ... # type: 'QBluetoothUuid.CharacteristicType' - Humidity = ... # type: 'QBluetoothUuid.CharacteristicType' - TrueWindSpeed = ... # type: 'QBluetoothUuid.CharacteristicType' - TrueWindDirection = ... # type: 'QBluetoothUuid.CharacteristicType' - ApparentWindSpeed = ... # type: 'QBluetoothUuid.CharacteristicType' - ApparentWindDirection = ... # type: 'QBluetoothUuid.CharacteristicType' - GustFactor = ... # type: 'QBluetoothUuid.CharacteristicType' - PollenConcentration = ... # type: 'QBluetoothUuid.CharacteristicType' - UVIndex = ... # type: 'QBluetoothUuid.CharacteristicType' - Irradiance = ... # type: 'QBluetoothUuid.CharacteristicType' - Rainfall = ... # type: 'QBluetoothUuid.CharacteristicType' - WindChill = ... # type: 'QBluetoothUuid.CharacteristicType' - HeatIndex = ... # type: 'QBluetoothUuid.CharacteristicType' - DewPoint = ... # type: 'QBluetoothUuid.CharacteristicType' - DescriptorValueChanged = ... # type: 'QBluetoothUuid.CharacteristicType' - AerobicHeartRateLowerLimit = ... # type: 'QBluetoothUuid.CharacteristicType' - AerobicThreshold = ... # type: 'QBluetoothUuid.CharacteristicType' - Age = ... # type: 'QBluetoothUuid.CharacteristicType' - AnaerobicHeartRateLowerLimit = ... # type: 'QBluetoothUuid.CharacteristicType' - AnaerobicHeartRateUpperLimit = ... # type: 'QBluetoothUuid.CharacteristicType' - AnaerobicThreshold = ... # type: 'QBluetoothUuid.CharacteristicType' - AerobicHeartRateUpperLimit = ... # type: 'QBluetoothUuid.CharacteristicType' - DateOfBirth = ... # type: 'QBluetoothUuid.CharacteristicType' - DateOfThresholdAssessment = ... # type: 'QBluetoothUuid.CharacteristicType' - EmailAddress = ... # type: 'QBluetoothUuid.CharacteristicType' - FatBurnHeartRateLowerLimit = ... # type: 'QBluetoothUuid.CharacteristicType' - FatBurnHeartRateUpperLimit = ... # type: 'QBluetoothUuid.CharacteristicType' - FirstName = ... # type: 'QBluetoothUuid.CharacteristicType' - FiveZoneHeartRateLimits = ... # type: 'QBluetoothUuid.CharacteristicType' - Gender = ... # type: 'QBluetoothUuid.CharacteristicType' - HeartRateMax = ... # type: 'QBluetoothUuid.CharacteristicType' - Height = ... # type: 'QBluetoothUuid.CharacteristicType' - HipCircumference = ... # type: 'QBluetoothUuid.CharacteristicType' - LastName = ... # type: 'QBluetoothUuid.CharacteristicType' - MaximumRecommendedHeartRate = ... # type: 'QBluetoothUuid.CharacteristicType' - RestingHeartRate = ... # type: 'QBluetoothUuid.CharacteristicType' - SportTypeForAerobicAnaerobicThresholds = ... # type: 'QBluetoothUuid.CharacteristicType' - ThreeZoneHeartRateLimits = ... # type: 'QBluetoothUuid.CharacteristicType' - TwoZoneHeartRateLimits = ... # type: 'QBluetoothUuid.CharacteristicType' - VO2Max = ... # type: 'QBluetoothUuid.CharacteristicType' - WaistCircumference = ... # type: 'QBluetoothUuid.CharacteristicType' - Weight = ... # type: 'QBluetoothUuid.CharacteristicType' - DatabaseChangeIncrement = ... # type: 'QBluetoothUuid.CharacteristicType' - UserIndex = ... # type: 'QBluetoothUuid.CharacteristicType' - BodyCompositionFeature = ... # type: 'QBluetoothUuid.CharacteristicType' - BodyCompositionMeasurement = ... # type: 'QBluetoothUuid.CharacteristicType' - WeightMeasurement = ... # type: 'QBluetoothUuid.CharacteristicType' - WeightScaleFeature = ... # type: 'QBluetoothUuid.CharacteristicType' - UserControlPoint = ... # type: 'QBluetoothUuid.CharacteristicType' - MagneticFluxDensity2D = ... # type: 'QBluetoothUuid.CharacteristicType' - MagneticFluxDensity3D = ... # type: 'QBluetoothUuid.CharacteristicType' - Language = ... # type: 'QBluetoothUuid.CharacteristicType' - BarometricPressureTrend = ... # type: 'QBluetoothUuid.CharacteristicType' - - class ServiceClassUuid(int): ... - ServiceDiscoveryServer = ... # type: 'QBluetoothUuid.ServiceClassUuid' - BrowseGroupDescriptor = ... # type: 'QBluetoothUuid.ServiceClassUuid' - PublicBrowseGroup = ... # type: 'QBluetoothUuid.ServiceClassUuid' - SerialPort = ... # type: 'QBluetoothUuid.ServiceClassUuid' - LANAccessUsingPPP = ... # type: 'QBluetoothUuid.ServiceClassUuid' - DialupNetworking = ... # type: 'QBluetoothUuid.ServiceClassUuid' - IrMCSync = ... # type: 'QBluetoothUuid.ServiceClassUuid' - ObexObjectPush = ... # type: 'QBluetoothUuid.ServiceClassUuid' - OBEXFileTransfer = ... # type: 'QBluetoothUuid.ServiceClassUuid' - IrMCSyncCommand = ... # type: 'QBluetoothUuid.ServiceClassUuid' - Headset = ... # type: 'QBluetoothUuid.ServiceClassUuid' - AudioSource = ... # type: 'QBluetoothUuid.ServiceClassUuid' - AudioSink = ... # type: 'QBluetoothUuid.ServiceClassUuid' - AV_RemoteControlTarget = ... # type: 'QBluetoothUuid.ServiceClassUuid' - AdvancedAudioDistribution = ... # type: 'QBluetoothUuid.ServiceClassUuid' - AV_RemoteControl = ... # type: 'QBluetoothUuid.ServiceClassUuid' - AV_RemoteControlController = ... # type: 'QBluetoothUuid.ServiceClassUuid' - HeadsetAG = ... # type: 'QBluetoothUuid.ServiceClassUuid' - PANU = ... # type: 'QBluetoothUuid.ServiceClassUuid' - NAP = ... # type: 'QBluetoothUuid.ServiceClassUuid' - GN = ... # type: 'QBluetoothUuid.ServiceClassUuid' - DirectPrinting = ... # type: 'QBluetoothUuid.ServiceClassUuid' - ReferencePrinting = ... # type: 'QBluetoothUuid.ServiceClassUuid' - ImagingResponder = ... # type: 'QBluetoothUuid.ServiceClassUuid' - ImagingAutomaticArchive = ... # type: 'QBluetoothUuid.ServiceClassUuid' - ImagingReferenceObjects = ... # type: 'QBluetoothUuid.ServiceClassUuid' - Handsfree = ... # type: 'QBluetoothUuid.ServiceClassUuid' - HandsfreeAudioGateway = ... # type: 'QBluetoothUuid.ServiceClassUuid' - DirectPrintingReferenceObjectsService = ... # type: 'QBluetoothUuid.ServiceClassUuid' - ReflectedUI = ... # type: 'QBluetoothUuid.ServiceClassUuid' - BasicPrinting = ... # type: 'QBluetoothUuid.ServiceClassUuid' - PrintingStatus = ... # type: 'QBluetoothUuid.ServiceClassUuid' - HumanInterfaceDeviceService = ... # type: 'QBluetoothUuid.ServiceClassUuid' - HardcopyCableReplacement = ... # type: 'QBluetoothUuid.ServiceClassUuid' - HCRPrint = ... # type: 'QBluetoothUuid.ServiceClassUuid' - HCRScan = ... # type: 'QBluetoothUuid.ServiceClassUuid' - SIMAccess = ... # type: 'QBluetoothUuid.ServiceClassUuid' - PhonebookAccessPCE = ... # type: 'QBluetoothUuid.ServiceClassUuid' - PhonebookAccessPSE = ... # type: 'QBluetoothUuid.ServiceClassUuid' - PhonebookAccess = ... # type: 'QBluetoothUuid.ServiceClassUuid' - HeadsetHS = ... # type: 'QBluetoothUuid.ServiceClassUuid' - MessageAccessServer = ... # type: 'QBluetoothUuid.ServiceClassUuid' - MessageNotificationServer = ... # type: 'QBluetoothUuid.ServiceClassUuid' - MessageAccessProfile = ... # type: 'QBluetoothUuid.ServiceClassUuid' - PnPInformation = ... # type: 'QBluetoothUuid.ServiceClassUuid' - GenericNetworking = ... # type: 'QBluetoothUuid.ServiceClassUuid' - GenericFileTransfer = ... # type: 'QBluetoothUuid.ServiceClassUuid' - GenericAudio = ... # type: 'QBluetoothUuid.ServiceClassUuid' - GenericTelephony = ... # type: 'QBluetoothUuid.ServiceClassUuid' - VideoSource = ... # type: 'QBluetoothUuid.ServiceClassUuid' - VideoSink = ... # type: 'QBluetoothUuid.ServiceClassUuid' - VideoDistribution = ... # type: 'QBluetoothUuid.ServiceClassUuid' - HDP = ... # type: 'QBluetoothUuid.ServiceClassUuid' - HDPSource = ... # type: 'QBluetoothUuid.ServiceClassUuid' - HDPSink = ... # type: 'QBluetoothUuid.ServiceClassUuid' - BasicImage = ... # type: 'QBluetoothUuid.ServiceClassUuid' - GNSS = ... # type: 'QBluetoothUuid.ServiceClassUuid' - GNSSServer = ... # type: 'QBluetoothUuid.ServiceClassUuid' - Display3D = ... # type: 'QBluetoothUuid.ServiceClassUuid' - Glasses3D = ... # type: 'QBluetoothUuid.ServiceClassUuid' - Synchronization3D = ... # type: 'QBluetoothUuid.ServiceClassUuid' - MPSProfile = ... # type: 'QBluetoothUuid.ServiceClassUuid' - MPSService = ... # type: 'QBluetoothUuid.ServiceClassUuid' - GenericAccess = ... # type: 'QBluetoothUuid.ServiceClassUuid' - GenericAttribute = ... # type: 'QBluetoothUuid.ServiceClassUuid' - ImmediateAlert = ... # type: 'QBluetoothUuid.ServiceClassUuid' - LinkLoss = ... # type: 'QBluetoothUuid.ServiceClassUuid' - TxPower = ... # type: 'QBluetoothUuid.ServiceClassUuid' - CurrentTimeService = ... # type: 'QBluetoothUuid.ServiceClassUuid' - ReferenceTimeUpdateService = ... # type: 'QBluetoothUuid.ServiceClassUuid' - NextDSTChangeService = ... # type: 'QBluetoothUuid.ServiceClassUuid' - Glucose = ... # type: 'QBluetoothUuid.ServiceClassUuid' - HealthThermometer = ... # type: 'QBluetoothUuid.ServiceClassUuid' - DeviceInformation = ... # type: 'QBluetoothUuid.ServiceClassUuid' - HeartRate = ... # type: 'QBluetoothUuid.ServiceClassUuid' - PhoneAlertStatusService = ... # type: 'QBluetoothUuid.ServiceClassUuid' - BatteryService = ... # type: 'QBluetoothUuid.ServiceClassUuid' - BloodPressure = ... # type: 'QBluetoothUuid.ServiceClassUuid' - AlertNotificationService = ... # type: 'QBluetoothUuid.ServiceClassUuid' - HumanInterfaceDevice = ... # type: 'QBluetoothUuid.ServiceClassUuid' - ScanParameters = ... # type: 'QBluetoothUuid.ServiceClassUuid' - RunningSpeedAndCadence = ... # type: 'QBluetoothUuid.ServiceClassUuid' - CyclingSpeedAndCadence = ... # type: 'QBluetoothUuid.ServiceClassUuid' - CyclingPower = ... # type: 'QBluetoothUuid.ServiceClassUuid' - LocationAndNavigation = ... # type: 'QBluetoothUuid.ServiceClassUuid' - EnvironmentalSensing = ... # type: 'QBluetoothUuid.ServiceClassUuid' - BodyComposition = ... # type: 'QBluetoothUuid.ServiceClassUuid' - UserData = ... # type: 'QBluetoothUuid.ServiceClassUuid' - WeightScale = ... # type: 'QBluetoothUuid.ServiceClassUuid' - BondManagement = ... # type: 'QBluetoothUuid.ServiceClassUuid' - ContinuousGlucoseMonitoring = ... # type: 'QBluetoothUuid.ServiceClassUuid' - - class ProtocolUuid(int): ... - Sdp = ... # type: 'QBluetoothUuid.ProtocolUuid' - Udp = ... # type: 'QBluetoothUuid.ProtocolUuid' - Rfcomm = ... # type: 'QBluetoothUuid.ProtocolUuid' - Tcp = ... # type: 'QBluetoothUuid.ProtocolUuid' - TcsBin = ... # type: 'QBluetoothUuid.ProtocolUuid' - TcsAt = ... # type: 'QBluetoothUuid.ProtocolUuid' - Att = ... # type: 'QBluetoothUuid.ProtocolUuid' - Obex = ... # type: 'QBluetoothUuid.ProtocolUuid' - Ip = ... # type: 'QBluetoothUuid.ProtocolUuid' - Ftp = ... # type: 'QBluetoothUuid.ProtocolUuid' - Http = ... # type: 'QBluetoothUuid.ProtocolUuid' - Wsp = ... # type: 'QBluetoothUuid.ProtocolUuid' - Bnep = ... # type: 'QBluetoothUuid.ProtocolUuid' - Upnp = ... # type: 'QBluetoothUuid.ProtocolUuid' - Hidp = ... # type: 'QBluetoothUuid.ProtocolUuid' - HardcopyControlChannel = ... # type: 'QBluetoothUuid.ProtocolUuid' - HardcopyDataChannel = ... # type: 'QBluetoothUuid.ProtocolUuid' - HardcopyNotification = ... # type: 'QBluetoothUuid.ProtocolUuid' - Avctp = ... # type: 'QBluetoothUuid.ProtocolUuid' - Avdtp = ... # type: 'QBluetoothUuid.ProtocolUuid' - Cmtp = ... # type: 'QBluetoothUuid.ProtocolUuid' - UdiCPlain = ... # type: 'QBluetoothUuid.ProtocolUuid' - McapControlChannel = ... # type: 'QBluetoothUuid.ProtocolUuid' - McapDataChannel = ... # type: 'QBluetoothUuid.ProtocolUuid' - L2cap = ... # type: 'QBluetoothUuid.ProtocolUuid' - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, uuid: int) -> None: ... - @typing.overload - def __init__(self, uuid: Tuple[int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int) -> None: ... - @typing.overload - def __init__(self, uuid: str) -> None: ... - @typing.overload - def __init__(self, uuid: 'QBluetoothUuid') -> None: ... - @typing.overload - def __init__(self, uuid: QtCore.QUuid) -> None: ... - - @staticmethod - def descriptorToString(uuid: 'QBluetoothUuid.DescriptorType') -> str: ... - @staticmethod - def characteristicToString(uuid: 'QBluetoothUuid.CharacteristicType') -> str: ... - @staticmethod - def protocolToString(uuid: 'QBluetoothUuid.ProtocolUuid') -> str: ... - @staticmethod - def serviceClassToString(uuid: 'QBluetoothUuid.ServiceClassUuid') -> str: ... - def toUInt128(self) -> Tuple[int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int: ... - def toUInt32(self) -> typing.Tuple[int, bool]: ... - def toUInt16(self) -> typing.Tuple[int, bool]: ... - def minimumSize(self) -> int: ... - - -class QLowEnergyAdvertisingData(sip.wrapper): - - class Discoverability(int): ... - DiscoverabilityNone = ... # type: 'QLowEnergyAdvertisingData.Discoverability' - DiscoverabilityLimited = ... # type: 'QLowEnergyAdvertisingData.Discoverability' - DiscoverabilityGeneral = ... # type: 'QLowEnergyAdvertisingData.Discoverability' - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, other: 'QLowEnergyAdvertisingData') -> None: ... - - def swap(self, other: 'QLowEnergyAdvertisingData') -> None: ... - def rawData(self) -> QtCore.QByteArray: ... - def setRawData(self, data: typing.Union[QtCore.QByteArray, bytes, bytearray]) -> None: ... - def services(self) -> typing.List[QBluetoothUuid]: ... - def setServices(self, services: typing.Iterable[QBluetoothUuid]) -> None: ... - def discoverability(self) -> 'QLowEnergyAdvertisingData.Discoverability': ... - def setDiscoverability(self, mode: 'QLowEnergyAdvertisingData.Discoverability') -> None: ... - def includePowerLevel(self) -> bool: ... - def setIncludePowerLevel(self, doInclude: bool) -> None: ... - def manufacturerData(self) -> QtCore.QByteArray: ... - def manufacturerId(self) -> int: ... - def setManufacturerData(self, id: int, data: typing.Union[QtCore.QByteArray, bytes, bytearray]) -> None: ... - @staticmethod - def invalidManufacturerId() -> int: ... - def localName(self) -> str: ... - def setLocalName(self, name: str) -> None: ... - - -class QLowEnergyAdvertisingParameters(sip.wrapper): - - class FilterPolicy(int): ... - IgnoreWhiteList = ... # type: 'QLowEnergyAdvertisingParameters.FilterPolicy' - UseWhiteListForScanning = ... # type: 'QLowEnergyAdvertisingParameters.FilterPolicy' - UseWhiteListForConnecting = ... # type: 'QLowEnergyAdvertisingParameters.FilterPolicy' - UseWhiteListForScanningAndConnecting = ... # type: 'QLowEnergyAdvertisingParameters.FilterPolicy' - - class Mode(int): ... - AdvInd = ... # type: 'QLowEnergyAdvertisingParameters.Mode' - AdvScanInd = ... # type: 'QLowEnergyAdvertisingParameters.Mode' - AdvNonConnInd = ... # type: 'QLowEnergyAdvertisingParameters.Mode' - - class AddressInfo(sip.wrapper): - - address = ... # type: QBluetoothAddress - type = ... # type: 'QLowEnergyController.RemoteAddressType' - - @typing.overload - def __init__(self, addr: QBluetoothAddress, t: 'QLowEnergyController.RemoteAddressType') -> None: ... - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QLowEnergyAdvertisingParameters.AddressInfo') -> None: ... - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, other: 'QLowEnergyAdvertisingParameters') -> None: ... - - def swap(self, other: 'QLowEnergyAdvertisingParameters') -> None: ... - def maximumInterval(self) -> int: ... - def minimumInterval(self) -> int: ... - def setInterval(self, minimum: int, maximum: int) -> None: ... - def filterPolicy(self) -> 'QLowEnergyAdvertisingParameters.FilterPolicy': ... - def whiteList(self) -> typing.List['QLowEnergyAdvertisingParameters.AddressInfo']: ... - def setWhiteList(self, whiteList: typing.Any, policy: 'QLowEnergyAdvertisingParameters.FilterPolicy') -> None: ... - def mode(self) -> 'QLowEnergyAdvertisingParameters.Mode': ... - def setMode(self, mode: 'QLowEnergyAdvertisingParameters.Mode') -> None: ... - - -class QLowEnergyCharacteristic(sip.wrapper): - - class PropertyType(int): ... - Unknown = ... # type: 'QLowEnergyCharacteristic.PropertyType' - Broadcasting = ... # type: 'QLowEnergyCharacteristic.PropertyType' - Read = ... # type: 'QLowEnergyCharacteristic.PropertyType' - WriteNoResponse = ... # type: 'QLowEnergyCharacteristic.PropertyType' - Write = ... # type: 'QLowEnergyCharacteristic.PropertyType' - Notify = ... # type: 'QLowEnergyCharacteristic.PropertyType' - Indicate = ... # type: 'QLowEnergyCharacteristic.PropertyType' - WriteSigned = ... # type: 'QLowEnergyCharacteristic.PropertyType' - ExtendedProperty = ... # type: 'QLowEnergyCharacteristic.PropertyType' - - class PropertyTypes(sip.wrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QLowEnergyCharacteristic.PropertyTypes', 'QLowEnergyCharacteristic.PropertyType']) -> None: ... - @typing.overload - def __init__(self, a0: 'QLowEnergyCharacteristic.PropertyTypes') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QLowEnergyCharacteristic.PropertyTypes': ... - def __int__(self) -> int: ... - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, other: 'QLowEnergyCharacteristic') -> None: ... - - def isValid(self) -> bool: ... - def descriptors(self) -> typing.Any: ... - def descriptor(self, uuid: QBluetoothUuid) -> 'QLowEnergyDescriptor': ... - def handle(self) -> int: ... - def properties(self) -> 'QLowEnergyCharacteristic.PropertyTypes': ... - def value(self) -> QtCore.QByteArray: ... - def uuid(self) -> QBluetoothUuid: ... - def name(self) -> str: ... - - -class QLowEnergyCharacteristicData(sip.wrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, other: 'QLowEnergyCharacteristicData') -> None: ... - - def swap(self, other: 'QLowEnergyCharacteristicData') -> None: ... - def isValid(self) -> bool: ... - def maximumValueLength(self) -> int: ... - def minimumValueLength(self) -> int: ... - def setValueLength(self, minimum: int, maximum: int) -> None: ... - def writeConstraints(self) -> QBluetooth.AttAccessConstraints: ... - def setWriteConstraints(self, constraints: typing.Union[QBluetooth.AttAccessConstraints, QBluetooth.AttAccessConstraint]) -> None: ... - def readConstraints(self) -> QBluetooth.AttAccessConstraints: ... - def setReadConstraints(self, constraints: typing.Union[QBluetooth.AttAccessConstraints, QBluetooth.AttAccessConstraint]) -> None: ... - def addDescriptor(self, descriptor: 'QLowEnergyDescriptorData') -> None: ... - def setDescriptors(self, descriptors: typing.Iterable['QLowEnergyDescriptorData']) -> None: ... - def descriptors(self) -> typing.Any: ... - def setProperties(self, properties: typing.Union[QLowEnergyCharacteristic.PropertyTypes, QLowEnergyCharacteristic.PropertyType]) -> None: ... - def properties(self) -> QLowEnergyCharacteristic.PropertyTypes: ... - def setValue(self, value: typing.Union[QtCore.QByteArray, bytes, bytearray]) -> None: ... - def value(self) -> QtCore.QByteArray: ... - def setUuid(self, uuid: QBluetoothUuid) -> None: ... - def uuid(self) -> QBluetoothUuid: ... - - -class QLowEnergyConnectionParameters(sip.wrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, other: 'QLowEnergyConnectionParameters') -> None: ... - - def swap(self, other: 'QLowEnergyConnectionParameters') -> None: ... - def supervisionTimeout(self) -> int: ... - def setSupervisionTimeout(self, timeout: int) -> None: ... - def latency(self) -> int: ... - def setLatency(self, latency: int) -> None: ... - def maximumInterval(self) -> float: ... - def minimumInterval(self) -> float: ... - def setIntervalRange(self, minimum: float, maximum: float) -> None: ... - - -class QLowEnergyController(QtCore.QObject): - - class Role(int): ... - CentralRole = ... # type: 'QLowEnergyController.Role' - PeripheralRole = ... # type: 'QLowEnergyController.Role' - - class RemoteAddressType(int): ... - PublicAddress = ... # type: 'QLowEnergyController.RemoteAddressType' - RandomAddress = ... # type: 'QLowEnergyController.RemoteAddressType' - - class ControllerState(int): ... - UnconnectedState = ... # type: 'QLowEnergyController.ControllerState' - ConnectingState = ... # type: 'QLowEnergyController.ControllerState' - ConnectedState = ... # type: 'QLowEnergyController.ControllerState' - DiscoveringState = ... # type: 'QLowEnergyController.ControllerState' - DiscoveredState = ... # type: 'QLowEnergyController.ControllerState' - ClosingState = ... # type: 'QLowEnergyController.ControllerState' - AdvertisingState = ... # type: 'QLowEnergyController.ControllerState' - - class Error(int): ... - NoError = ... # type: 'QLowEnergyController.Error' - UnknownError = ... # type: 'QLowEnergyController.Error' - UnknownRemoteDeviceError = ... # type: 'QLowEnergyController.Error' - NetworkError = ... # type: 'QLowEnergyController.Error' - InvalidBluetoothAdapterError = ... # type: 'QLowEnergyController.Error' - ConnectionError = ... # type: 'QLowEnergyController.Error' - AdvertisingError = ... # type: 'QLowEnergyController.Error' - - @typing.overload - def __init__(self, remoteDevice: QBluetoothDeviceInfo, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - @typing.overload - def __init__(self, remoteDevice: QBluetoothAddress, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - @typing.overload - def __init__(self, remoteDevice: QBluetoothAddress, localDevice: QBluetoothAddress, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def connectionUpdated(self, parameters: QLowEnergyConnectionParameters) -> None: ... - def role(self) -> 'QLowEnergyController.Role': ... - def requestConnectionUpdate(self, parameters: QLowEnergyConnectionParameters) -> None: ... - def addService(self, service: 'QLowEnergyServiceData', parent: typing.Optional[QtCore.QObject] = ...) -> 'QLowEnergyService': ... - def stopAdvertising(self) -> None: ... - def startAdvertising(self, parameters: QLowEnergyAdvertisingParameters, advertisingData: QLowEnergyAdvertisingData, scanResponseData: QLowEnergyAdvertisingData = ...) -> None: ... - @staticmethod - def createPeripheral(parent: typing.Optional[QtCore.QObject] = ...) -> 'QLowEnergyController': ... - @staticmethod - def createCentral(remoteDevice: QBluetoothDeviceInfo, parent: typing.Optional[QtCore.QObject] = ...) -> 'QLowEnergyController': ... - def discoveryFinished(self) -> None: ... - def serviceDiscovered(self, newService: QBluetoothUuid) -> None: ... - def stateChanged(self, state: 'QLowEnergyController.ControllerState') -> None: ... - def disconnected(self) -> None: ... - def connected(self) -> None: ... - def remoteName(self) -> str: ... - def errorString(self) -> str: ... - @typing.overload - def error(self) -> 'QLowEnergyController.Error': ... - @typing.overload - def error(self, newError: 'QLowEnergyController.Error') -> None: ... - def createServiceObject(self, service: QBluetoothUuid, parent: typing.Optional[QtCore.QObject] = ...) -> 'QLowEnergyService': ... - def services(self) -> typing.List[QBluetoothUuid]: ... - def discoverServices(self) -> None: ... - def disconnectFromDevice(self) -> None: ... - def connectToDevice(self) -> None: ... - def setRemoteAddressType(self, type: 'QLowEnergyController.RemoteAddressType') -> None: ... - def remoteAddressType(self) -> 'QLowEnergyController.RemoteAddressType': ... - def state(self) -> 'QLowEnergyController.ControllerState': ... - def remoteAddress(self) -> QBluetoothAddress: ... - def localAddress(self) -> QBluetoothAddress: ... - - -class QLowEnergyDescriptor(sip.wrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, other: 'QLowEnergyDescriptor') -> None: ... - - def type(self) -> QBluetoothUuid.DescriptorType: ... - def name(self) -> str: ... - def handle(self) -> int: ... - def uuid(self) -> QBluetoothUuid: ... - def value(self) -> QtCore.QByteArray: ... - def isValid(self) -> bool: ... - - -class QLowEnergyDescriptorData(sip.wrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, uuid: QBluetoothUuid, value: typing.Union[QtCore.QByteArray, bytes, bytearray]) -> None: ... - @typing.overload - def __init__(self, other: 'QLowEnergyDescriptorData') -> None: ... - - def swap(self, other: 'QLowEnergyDescriptorData') -> None: ... - def writeConstraints(self) -> QBluetooth.AttAccessConstraints: ... - def isWritable(self) -> bool: ... - def setWritePermissions(self, writable: bool, constraints: typing.Union[QBluetooth.AttAccessConstraints, QBluetooth.AttAccessConstraint] = ...) -> None: ... - def readConstraints(self) -> QBluetooth.AttAccessConstraints: ... - def isReadable(self) -> bool: ... - def setReadPermissions(self, readable: bool, constraints: typing.Union[QBluetooth.AttAccessConstraints, QBluetooth.AttAccessConstraint] = ...) -> None: ... - def isValid(self) -> bool: ... - def setUuid(self, uuid: QBluetoothUuid) -> None: ... - def uuid(self) -> QBluetoothUuid: ... - def setValue(self, value: typing.Union[QtCore.QByteArray, bytes, bytearray]) -> None: ... - def value(self) -> QtCore.QByteArray: ... - - -class QLowEnergyService(QtCore.QObject): - - class WriteMode(int): ... - WriteWithResponse = ... # type: 'QLowEnergyService.WriteMode' - WriteWithoutResponse = ... # type: 'QLowEnergyService.WriteMode' - WriteSigned = ... # type: 'QLowEnergyService.WriteMode' - - class ServiceState(int): ... - InvalidService = ... # type: 'QLowEnergyService.ServiceState' - DiscoveryRequired = ... # type: 'QLowEnergyService.ServiceState' - DiscoveringServices = ... # type: 'QLowEnergyService.ServiceState' - ServiceDiscovered = ... # type: 'QLowEnergyService.ServiceState' - LocalService = ... # type: 'QLowEnergyService.ServiceState' - - class ServiceError(int): ... - NoError = ... # type: 'QLowEnergyService.ServiceError' - OperationError = ... # type: 'QLowEnergyService.ServiceError' - CharacteristicWriteError = ... # type: 'QLowEnergyService.ServiceError' - DescriptorWriteError = ... # type: 'QLowEnergyService.ServiceError' - CharacteristicReadError = ... # type: 'QLowEnergyService.ServiceError' - DescriptorReadError = ... # type: 'QLowEnergyService.ServiceError' - UnknownError = ... # type: 'QLowEnergyService.ServiceError' - - class ServiceType(int): ... - PrimaryService = ... # type: 'QLowEnergyService.ServiceType' - IncludedService = ... # type: 'QLowEnergyService.ServiceType' - - class ServiceTypes(sip.wrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QLowEnergyService.ServiceTypes', 'QLowEnergyService.ServiceType']) -> None: ... - @typing.overload - def __init__(self, a0: 'QLowEnergyService.ServiceTypes') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QLowEnergyService.ServiceTypes': ... - def __int__(self) -> int: ... - - def descriptorRead(self, info: QLowEnergyDescriptor, value: typing.Union[QtCore.QByteArray, bytes, bytearray]) -> None: ... - def characteristicRead(self, info: QLowEnergyCharacteristic, value: typing.Union[QtCore.QByteArray, bytes, bytearray]) -> None: ... - def readDescriptor(self, descriptor: QLowEnergyDescriptor) -> None: ... - def readCharacteristic(self, characteristic: QLowEnergyCharacteristic) -> None: ... - def descriptorWritten(self, info: QLowEnergyDescriptor, value: typing.Union[QtCore.QByteArray, bytes, bytearray]) -> None: ... - def characteristicWritten(self, info: QLowEnergyCharacteristic, value: typing.Union[QtCore.QByteArray, bytes, bytearray]) -> None: ... - def characteristicChanged(self, info: QLowEnergyCharacteristic, value: typing.Union[QtCore.QByteArray, bytes, bytearray]) -> None: ... - def stateChanged(self, newState: 'QLowEnergyService.ServiceState') -> None: ... - def writeDescriptor(self, descriptor: QLowEnergyDescriptor, newValue: typing.Union[QtCore.QByteArray, bytes, bytearray]) -> None: ... - def writeCharacteristic(self, characteristic: QLowEnergyCharacteristic, newValue: typing.Union[QtCore.QByteArray, bytes, bytearray], mode: 'QLowEnergyService.WriteMode' = ...) -> None: ... - @typing.overload - def contains(self, characteristic: QLowEnergyCharacteristic) -> bool: ... - @typing.overload - def contains(self, descriptor: QLowEnergyDescriptor) -> bool: ... - @typing.overload - def error(self) -> 'QLowEnergyService.ServiceError': ... - @typing.overload - def error(self, error: 'QLowEnergyService.ServiceError') -> None: ... - def discoverDetails(self) -> None: ... - def serviceName(self) -> str: ... - def serviceUuid(self) -> QBluetoothUuid: ... - def characteristics(self) -> typing.Any: ... - def characteristic(self, uuid: QBluetoothUuid) -> QLowEnergyCharacteristic: ... - def state(self) -> 'QLowEnergyService.ServiceState': ... - def type(self) -> 'QLowEnergyService.ServiceTypes': ... - def includedServices(self) -> typing.List[QBluetoothUuid]: ... - - -class QLowEnergyServiceData(sip.wrapper): - - class ServiceType(int): ... - ServiceTypePrimary = ... # type: 'QLowEnergyServiceData.ServiceType' - ServiceTypeSecondary = ... # type: 'QLowEnergyServiceData.ServiceType' - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, other: 'QLowEnergyServiceData') -> None: ... - - def swap(self, other: 'QLowEnergyServiceData') -> None: ... - def isValid(self) -> bool: ... - def addCharacteristic(self, characteristic: QLowEnergyCharacteristicData) -> None: ... - def setCharacteristics(self, characteristics: typing.Iterable[QLowEnergyCharacteristicData]) -> None: ... - def characteristics(self) -> typing.Any: ... - def addIncludedService(self, service: QLowEnergyService) -> None: ... - def setIncludedServices(self, services: typing.Iterable[QLowEnergyService]) -> None: ... - def includedServices(self) -> typing.Any: ... - def setUuid(self, uuid: QBluetoothUuid) -> None: ... - def uuid(self) -> QBluetoothUuid: ... - def setType(self, type: 'QLowEnergyServiceData.ServiceType') -> None: ... - def type(self) -> 'QLowEnergyServiceData.ServiceType': ... diff -Nru uranium-3.3.0/stubs/PyQt5/QtCore.pyi uranium-4.4.1/stubs/PyQt5/QtCore.pyi --- uranium-3.3.0/stubs/PyQt5/QtCore.pyi 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/stubs/PyQt5/QtCore.pyi 1970-01-01 00:00:00.000000000 +0000 @@ -1,8356 +0,0 @@ -# The PEP 484 type hints stub file for the QtCore module. -# -# Generated by SIP 4.18.1 -# -# Copyright (c) 2016 Riverbank Computing Limited -# -# This file is part of PyQt5. -# -# This file may be used under the terms of the GNU General Public License -# version 3.0 as published by the Free Software Foundation and appearing in -# the file LICENSE included in the packaging of this file. Please review the -# following information to ensure the GNU General Public License version 3.0 -# requirements will be met: http://www.gnu.org/copyleft/gpl.html. -# -# If you do not wish to use this file under the terms of the GPL version 3.0 -# then you may purchase a commercial license. For more information contact -# info@riverbankcomputing.com. -# -# This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -# WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - - -import typing -import sip - -# Support for QDate, QDateTime and QTime. -import datetime - -# Support for new-style signals and slots. -class pyqtSignal: - def __init__(self, *types, name: str = ..., arguments: typing.List[str] = ...) -> None: ... - def emit(self, *args) -> None: ... - def connect(self, slot) -> None: ... - def disconnect(self, slot=None) -> None: ... - -class pyqtBoundSignal: - def emit(self, *args) -> None: ... - -# Convenient type aliases. -PYQT_SIGNAL = typing.Union[pyqtSignal, pyqtBoundSignal] -PYQT_SLOT = typing.Union[typing.Callable[..., None], pyqtBoundSignal] - - -class QtMsgType(int): ... -QtDebugMsg = ... # type: QtMsgType -QtWarningMsg = ... # type: QtMsgType -QtCriticalMsg = ... # type: QtMsgType -QtFatalMsg = ... # type: QtMsgType -QtSystemMsg = ... # type: QtMsgType -QtInfoMsg = ... # type: QtMsgType - - -class Qt(sip.simplewrapper): - - class EnterKeyType(int): ... - EnterKeyDefault = ... # type: 'Qt.EnterKeyType' - EnterKeyReturn = ... # type: 'Qt.EnterKeyType' - EnterKeyDone = ... # type: 'Qt.EnterKeyType' - EnterKeyGo = ... # type: 'Qt.EnterKeyType' - EnterKeySend = ... # type: 'Qt.EnterKeyType' - EnterKeySearch = ... # type: 'Qt.EnterKeyType' - EnterKeyNext = ... # type: 'Qt.EnterKeyType' - EnterKeyPrevious = ... # type: 'Qt.EnterKeyType' - - class ItemSelectionOperation(int): ... - ReplaceSelection = ... # type: 'Qt.ItemSelectionOperation' - AddToSelection = ... # type: 'Qt.ItemSelectionOperation' - - class TabFocusBehavior(int): ... - NoTabFocus = ... # type: 'Qt.TabFocusBehavior' - TabFocusTextControls = ... # type: 'Qt.TabFocusBehavior' - TabFocusListControls = ... # type: 'Qt.TabFocusBehavior' - TabFocusAllControls = ... # type: 'Qt.TabFocusBehavior' - - class MouseEventFlag(int): ... - MouseEventCreatedDoubleClick = ... # type: 'Qt.MouseEventFlag' - - class MouseEventSource(int): ... - MouseEventNotSynthesized = ... # type: 'Qt.MouseEventSource' - MouseEventSynthesizedBySystem = ... # type: 'Qt.MouseEventSource' - MouseEventSynthesizedByQt = ... # type: 'Qt.MouseEventSource' - MouseEventSynthesizedByApplication = ... # type: 'Qt.MouseEventSource' - - class ScrollPhase(int): ... - ScrollBegin = ... # type: 'Qt.ScrollPhase' - ScrollUpdate = ... # type: 'Qt.ScrollPhase' - ScrollEnd = ... # type: 'Qt.ScrollPhase' - NoScrollPhase = ... # type: 'Qt.ScrollPhase' - - class NativeGestureType(int): ... - BeginNativeGesture = ... # type: 'Qt.NativeGestureType' - EndNativeGesture = ... # type: 'Qt.NativeGestureType' - PanNativeGesture = ... # type: 'Qt.NativeGestureType' - ZoomNativeGesture = ... # type: 'Qt.NativeGestureType' - SmartZoomNativeGesture = ... # type: 'Qt.NativeGestureType' - RotateNativeGesture = ... # type: 'Qt.NativeGestureType' - SwipeNativeGesture = ... # type: 'Qt.NativeGestureType' - - class Edge(int): ... - TopEdge = ... # type: 'Qt.Edge' - LeftEdge = ... # type: 'Qt.Edge' - RightEdge = ... # type: 'Qt.Edge' - BottomEdge = ... # type: 'Qt.Edge' - - class ApplicationState(int): ... - ApplicationSuspended = ... # type: 'Qt.ApplicationState' - ApplicationHidden = ... # type: 'Qt.ApplicationState' - ApplicationInactive = ... # type: 'Qt.ApplicationState' - ApplicationActive = ... # type: 'Qt.ApplicationState' - - class HitTestAccuracy(int): ... - ExactHit = ... # type: 'Qt.HitTestAccuracy' - FuzzyHit = ... # type: 'Qt.HitTestAccuracy' - - class WhiteSpaceMode(int): ... - WhiteSpaceNormal = ... # type: 'Qt.WhiteSpaceMode' - WhiteSpacePre = ... # type: 'Qt.WhiteSpaceMode' - WhiteSpaceNoWrap = ... # type: 'Qt.WhiteSpaceMode' - WhiteSpaceModeUndefined = ... # type: 'Qt.WhiteSpaceMode' - - class FindChildOption(int): ... - FindDirectChildrenOnly = ... # type: 'Qt.FindChildOption' - FindChildrenRecursively = ... # type: 'Qt.FindChildOption' - - class ScreenOrientation(int): ... - PrimaryOrientation = ... # type: 'Qt.ScreenOrientation' - PortraitOrientation = ... # type: 'Qt.ScreenOrientation' - LandscapeOrientation = ... # type: 'Qt.ScreenOrientation' - InvertedPortraitOrientation = ... # type: 'Qt.ScreenOrientation' - InvertedLandscapeOrientation = ... # type: 'Qt.ScreenOrientation' - - class CursorMoveStyle(int): ... - LogicalMoveStyle = ... # type: 'Qt.CursorMoveStyle' - VisualMoveStyle = ... # type: 'Qt.CursorMoveStyle' - - class NavigationMode(int): ... - NavigationModeNone = ... # type: 'Qt.NavigationMode' - NavigationModeKeypadTabOrder = ... # type: 'Qt.NavigationMode' - NavigationModeKeypadDirectional = ... # type: 'Qt.NavigationMode' - NavigationModeCursorAuto = ... # type: 'Qt.NavigationMode' - NavigationModeCursorForceVisible = ... # type: 'Qt.NavigationMode' - - class GestureFlag(int): ... - DontStartGestureOnChildren = ... # type: 'Qt.GestureFlag' - ReceivePartialGestures = ... # type: 'Qt.GestureFlag' - IgnoredGesturesPropagateToParent = ... # type: 'Qt.GestureFlag' - - class GestureType(int): ... - TapGesture = ... # type: 'Qt.GestureType' - TapAndHoldGesture = ... # type: 'Qt.GestureType' - PanGesture = ... # type: 'Qt.GestureType' - PinchGesture = ... # type: 'Qt.GestureType' - SwipeGesture = ... # type: 'Qt.GestureType' - CustomGesture = ... # type: 'Qt.GestureType' - - class GestureState(int): ... - GestureStarted = ... # type: 'Qt.GestureState' - GestureUpdated = ... # type: 'Qt.GestureState' - GestureFinished = ... # type: 'Qt.GestureState' - GestureCanceled = ... # type: 'Qt.GestureState' - - class TouchPointState(int): ... - TouchPointPressed = ... # type: 'Qt.TouchPointState' - TouchPointMoved = ... # type: 'Qt.TouchPointState' - TouchPointStationary = ... # type: 'Qt.TouchPointState' - TouchPointReleased = ... # type: 'Qt.TouchPointState' - - class CoordinateSystem(int): ... - DeviceCoordinates = ... # type: 'Qt.CoordinateSystem' - LogicalCoordinates = ... # type: 'Qt.CoordinateSystem' - - class AnchorPoint(int): ... - AnchorLeft = ... # type: 'Qt.AnchorPoint' - AnchorHorizontalCenter = ... # type: 'Qt.AnchorPoint' - AnchorRight = ... # type: 'Qt.AnchorPoint' - AnchorTop = ... # type: 'Qt.AnchorPoint' - AnchorVerticalCenter = ... # type: 'Qt.AnchorPoint' - AnchorBottom = ... # type: 'Qt.AnchorPoint' - - class InputMethodHint(int): ... - ImhNone = ... # type: 'Qt.InputMethodHint' - ImhHiddenText = ... # type: 'Qt.InputMethodHint' - ImhNoAutoUppercase = ... # type: 'Qt.InputMethodHint' - ImhPreferNumbers = ... # type: 'Qt.InputMethodHint' - ImhPreferUppercase = ... # type: 'Qt.InputMethodHint' - ImhPreferLowercase = ... # type: 'Qt.InputMethodHint' - ImhNoPredictiveText = ... # type: 'Qt.InputMethodHint' - ImhDigitsOnly = ... # type: 'Qt.InputMethodHint' - ImhFormattedNumbersOnly = ... # type: 'Qt.InputMethodHint' - ImhUppercaseOnly = ... # type: 'Qt.InputMethodHint' - ImhLowercaseOnly = ... # type: 'Qt.InputMethodHint' - ImhDialableCharactersOnly = ... # type: 'Qt.InputMethodHint' - ImhEmailCharactersOnly = ... # type: 'Qt.InputMethodHint' - ImhUrlCharactersOnly = ... # type: 'Qt.InputMethodHint' - ImhExclusiveInputMask = ... # type: 'Qt.InputMethodHint' - ImhSensitiveData = ... # type: 'Qt.InputMethodHint' - ImhDate = ... # type: 'Qt.InputMethodHint' - ImhTime = ... # type: 'Qt.InputMethodHint' - ImhPreferLatin = ... # type: 'Qt.InputMethodHint' - ImhLatinOnly = ... # type: 'Qt.InputMethodHint' - ImhMultiLine = ... # type: 'Qt.InputMethodHint' - - class TileRule(int): ... - StretchTile = ... # type: 'Qt.TileRule' - RepeatTile = ... # type: 'Qt.TileRule' - RoundTile = ... # type: 'Qt.TileRule' - - class WindowFrameSection(int): ... - NoSection = ... # type: 'Qt.WindowFrameSection' - LeftSection = ... # type: 'Qt.WindowFrameSection' - TopLeftSection = ... # type: 'Qt.WindowFrameSection' - TopSection = ... # type: 'Qt.WindowFrameSection' - TopRightSection = ... # type: 'Qt.WindowFrameSection' - RightSection = ... # type: 'Qt.WindowFrameSection' - BottomRightSection = ... # type: 'Qt.WindowFrameSection' - BottomSection = ... # type: 'Qt.WindowFrameSection' - BottomLeftSection = ... # type: 'Qt.WindowFrameSection' - TitleBarArea = ... # type: 'Qt.WindowFrameSection' - - class SizeHint(int): ... - MinimumSize = ... # type: 'Qt.SizeHint' - PreferredSize = ... # type: 'Qt.SizeHint' - MaximumSize = ... # type: 'Qt.SizeHint' - MinimumDescent = ... # type: 'Qt.SizeHint' - - class SizeMode(int): ... - AbsoluteSize = ... # type: 'Qt.SizeMode' - RelativeSize = ... # type: 'Qt.SizeMode' - - class EventPriority(int): ... - HighEventPriority = ... # type: 'Qt.EventPriority' - NormalEventPriority = ... # type: 'Qt.EventPriority' - LowEventPriority = ... # type: 'Qt.EventPriority' - - class Axis(int): ... - XAxis = ... # type: 'Qt.Axis' - YAxis = ... # type: 'Qt.Axis' - ZAxis = ... # type: 'Qt.Axis' - - class MaskMode(int): ... - MaskInColor = ... # type: 'Qt.MaskMode' - MaskOutColor = ... # type: 'Qt.MaskMode' - - class TextInteractionFlag(int): ... - NoTextInteraction = ... # type: 'Qt.TextInteractionFlag' - TextSelectableByMouse = ... # type: 'Qt.TextInteractionFlag' - TextSelectableByKeyboard = ... # type: 'Qt.TextInteractionFlag' - LinksAccessibleByMouse = ... # type: 'Qt.TextInteractionFlag' - LinksAccessibleByKeyboard = ... # type: 'Qt.TextInteractionFlag' - TextEditable = ... # type: 'Qt.TextInteractionFlag' - TextEditorInteraction = ... # type: 'Qt.TextInteractionFlag' - TextBrowserInteraction = ... # type: 'Qt.TextInteractionFlag' - - class ItemSelectionMode(int): ... - ContainsItemShape = ... # type: 'Qt.ItemSelectionMode' - IntersectsItemShape = ... # type: 'Qt.ItemSelectionMode' - ContainsItemBoundingRect = ... # type: 'Qt.ItemSelectionMode' - IntersectsItemBoundingRect = ... # type: 'Qt.ItemSelectionMode' - - class ApplicationAttribute(int): ... - AA_ImmediateWidgetCreation = ... # type: 'Qt.ApplicationAttribute' - AA_MSWindowsUseDirect3DByDefault = ... # type: 'Qt.ApplicationAttribute' - AA_DontShowIconsInMenus = ... # type: 'Qt.ApplicationAttribute' - AA_NativeWindows = ... # type: 'Qt.ApplicationAttribute' - AA_DontCreateNativeWidgetSiblings = ... # type: 'Qt.ApplicationAttribute' - AA_MacPluginApplication = ... # type: 'Qt.ApplicationAttribute' - AA_DontUseNativeMenuBar = ... # type: 'Qt.ApplicationAttribute' - AA_MacDontSwapCtrlAndMeta = ... # type: 'Qt.ApplicationAttribute' - AA_X11InitThreads = ... # type: 'Qt.ApplicationAttribute' - AA_Use96Dpi = ... # type: 'Qt.ApplicationAttribute' - AA_SynthesizeTouchForUnhandledMouseEvents = ... # type: 'Qt.ApplicationAttribute' - AA_SynthesizeMouseForUnhandledTouchEvents = ... # type: 'Qt.ApplicationAttribute' - AA_UseHighDpiPixmaps = ... # type: 'Qt.ApplicationAttribute' - AA_ForceRasterWidgets = ... # type: 'Qt.ApplicationAttribute' - AA_UseDesktopOpenGL = ... # type: 'Qt.ApplicationAttribute' - AA_UseOpenGLES = ... # type: 'Qt.ApplicationAttribute' - AA_UseSoftwareOpenGL = ... # type: 'Qt.ApplicationAttribute' - AA_ShareOpenGLContexts = ... # type: 'Qt.ApplicationAttribute' - AA_SetPalette = ... # type: 'Qt.ApplicationAttribute' - AA_EnableHighDpiScaling = ... # type: 'Qt.ApplicationAttribute' - AA_DisableHighDpiScaling = ... # type: 'Qt.ApplicationAttribute' - AA_PluginApplication = ... # type: 'Qt.ApplicationAttribute' - AA_UseStyleSheetPropagationInWidgetStyles = ... # type: 'Qt.ApplicationAttribute' - AA_DontUseNativeDialogs = ... # type: 'Qt.ApplicationAttribute' - AA_SynthesizeMouseForUnhandledTabletEvents = ... # type: 'Qt.ApplicationAttribute' - AA_CompressHighFrequencyEvents = ... # type: 'Qt.ApplicationAttribute' - - class WindowModality(int): ... - NonModal = ... # type: 'Qt.WindowModality' - WindowModal = ... # type: 'Qt.WindowModality' - ApplicationModal = ... # type: 'Qt.WindowModality' - - class MatchFlag(int): ... - MatchExactly = ... # type: 'Qt.MatchFlag' - MatchFixedString = ... # type: 'Qt.MatchFlag' - MatchContains = ... # type: 'Qt.MatchFlag' - MatchStartsWith = ... # type: 'Qt.MatchFlag' - MatchEndsWith = ... # type: 'Qt.MatchFlag' - MatchRegExp = ... # type: 'Qt.MatchFlag' - MatchWildcard = ... # type: 'Qt.MatchFlag' - MatchCaseSensitive = ... # type: 'Qt.MatchFlag' - MatchWrap = ... # type: 'Qt.MatchFlag' - MatchRecursive = ... # type: 'Qt.MatchFlag' - - class ItemFlag(int): ... - NoItemFlags = ... # type: 'Qt.ItemFlag' - ItemIsSelectable = ... # type: 'Qt.ItemFlag' - ItemIsEditable = ... # type: 'Qt.ItemFlag' - ItemIsDragEnabled = ... # type: 'Qt.ItemFlag' - ItemIsDropEnabled = ... # type: 'Qt.ItemFlag' - ItemIsUserCheckable = ... # type: 'Qt.ItemFlag' - ItemIsEnabled = ... # type: 'Qt.ItemFlag' - ItemIsTristate = ... # type: 'Qt.ItemFlag' - ItemNeverHasChildren = ... # type: 'Qt.ItemFlag' - ItemIsUserTristate = ... # type: 'Qt.ItemFlag' - ItemIsAutoTristate = ... # type: 'Qt.ItemFlag' - - class ItemDataRole(int): ... - DisplayRole = ... # type: 'Qt.ItemDataRole' - DecorationRole = ... # type: 'Qt.ItemDataRole' - EditRole = ... # type: 'Qt.ItemDataRole' - ToolTipRole = ... # type: 'Qt.ItemDataRole' - StatusTipRole = ... # type: 'Qt.ItemDataRole' - WhatsThisRole = ... # type: 'Qt.ItemDataRole' - FontRole = ... # type: 'Qt.ItemDataRole' - TextAlignmentRole = ... # type: 'Qt.ItemDataRole' - BackgroundRole = ... # type: 'Qt.ItemDataRole' - BackgroundColorRole = ... # type: 'Qt.ItemDataRole' - ForegroundRole = ... # type: 'Qt.ItemDataRole' - TextColorRole = ... # type: 'Qt.ItemDataRole' - CheckStateRole = ... # type: 'Qt.ItemDataRole' - AccessibleTextRole = ... # type: 'Qt.ItemDataRole' - AccessibleDescriptionRole = ... # type: 'Qt.ItemDataRole' - SizeHintRole = ... # type: 'Qt.ItemDataRole' - InitialSortOrderRole = ... # type: 'Qt.ItemDataRole' - UserRole = ... # type: 'Qt.ItemDataRole' - - class CheckState(int): ... - Unchecked = ... # type: 'Qt.CheckState' - PartiallyChecked = ... # type: 'Qt.CheckState' - Checked = ... # type: 'Qt.CheckState' - - class DropAction(int): ... - CopyAction = ... # type: 'Qt.DropAction' - MoveAction = ... # type: 'Qt.DropAction' - LinkAction = ... # type: 'Qt.DropAction' - ActionMask = ... # type: 'Qt.DropAction' - TargetMoveAction = ... # type: 'Qt.DropAction' - IgnoreAction = ... # type: 'Qt.DropAction' - - class LayoutDirection(int): ... - LeftToRight = ... # type: 'Qt.LayoutDirection' - RightToLeft = ... # type: 'Qt.LayoutDirection' - LayoutDirectionAuto = ... # type: 'Qt.LayoutDirection' - - class ToolButtonStyle(int): ... - ToolButtonIconOnly = ... # type: 'Qt.ToolButtonStyle' - ToolButtonTextOnly = ... # type: 'Qt.ToolButtonStyle' - ToolButtonTextBesideIcon = ... # type: 'Qt.ToolButtonStyle' - ToolButtonTextUnderIcon = ... # type: 'Qt.ToolButtonStyle' - ToolButtonFollowStyle = ... # type: 'Qt.ToolButtonStyle' - - class InputMethodQuery(int): ... - ImMicroFocus = ... # type: 'Qt.InputMethodQuery' - ImFont = ... # type: 'Qt.InputMethodQuery' - ImCursorPosition = ... # type: 'Qt.InputMethodQuery' - ImSurroundingText = ... # type: 'Qt.InputMethodQuery' - ImCurrentSelection = ... # type: 'Qt.InputMethodQuery' - ImMaximumTextLength = ... # type: 'Qt.InputMethodQuery' - ImAnchorPosition = ... # type: 'Qt.InputMethodQuery' - ImEnabled = ... # type: 'Qt.InputMethodQuery' - ImCursorRectangle = ... # type: 'Qt.InputMethodQuery' - ImHints = ... # type: 'Qt.InputMethodQuery' - ImPreferredLanguage = ... # type: 'Qt.InputMethodQuery' - ImPlatformData = ... # type: 'Qt.InputMethodQuery' - ImQueryInput = ... # type: 'Qt.InputMethodQuery' - ImQueryAll = ... # type: 'Qt.InputMethodQuery' - ImAbsolutePosition = ... # type: 'Qt.InputMethodQuery' - ImTextBeforeCursor = ... # type: 'Qt.InputMethodQuery' - ImTextAfterCursor = ... # type: 'Qt.InputMethodQuery' - ImEnterKeyType = ... # type: 'Qt.InputMethodQuery' - ImAnchorRectangle = ... # type: 'Qt.InputMethodQuery' - ImInputItemClipRectangle = ... # type: 'Qt.InputMethodQuery' - - class ContextMenuPolicy(int): ... - NoContextMenu = ... # type: 'Qt.ContextMenuPolicy' - PreventContextMenu = ... # type: 'Qt.ContextMenuPolicy' - DefaultContextMenu = ... # type: 'Qt.ContextMenuPolicy' - ActionsContextMenu = ... # type: 'Qt.ContextMenuPolicy' - CustomContextMenu = ... # type: 'Qt.ContextMenuPolicy' - - class FocusReason(int): ... - MouseFocusReason = ... # type: 'Qt.FocusReason' - TabFocusReason = ... # type: 'Qt.FocusReason' - BacktabFocusReason = ... # type: 'Qt.FocusReason' - ActiveWindowFocusReason = ... # type: 'Qt.FocusReason' - PopupFocusReason = ... # type: 'Qt.FocusReason' - ShortcutFocusReason = ... # type: 'Qt.FocusReason' - MenuBarFocusReason = ... # type: 'Qt.FocusReason' - OtherFocusReason = ... # type: 'Qt.FocusReason' - NoFocusReason = ... # type: 'Qt.FocusReason' - - class TransformationMode(int): ... - FastTransformation = ... # type: 'Qt.TransformationMode' - SmoothTransformation = ... # type: 'Qt.TransformationMode' - - class ClipOperation(int): ... - NoClip = ... # type: 'Qt.ClipOperation' - ReplaceClip = ... # type: 'Qt.ClipOperation' - IntersectClip = ... # type: 'Qt.ClipOperation' - - class FillRule(int): ... - OddEvenFill = ... # type: 'Qt.FillRule' - WindingFill = ... # type: 'Qt.FillRule' - - class ShortcutContext(int): ... - WidgetShortcut = ... # type: 'Qt.ShortcutContext' - WindowShortcut = ... # type: 'Qt.ShortcutContext' - ApplicationShortcut = ... # type: 'Qt.ShortcutContext' - WidgetWithChildrenShortcut = ... # type: 'Qt.ShortcutContext' - - class ConnectionType(int): ... - AutoConnection = ... # type: 'Qt.ConnectionType' - DirectConnection = ... # type: 'Qt.ConnectionType' - QueuedConnection = ... # type: 'Qt.ConnectionType' - BlockingQueuedConnection = ... # type: 'Qt.ConnectionType' - UniqueConnection = ... # type: 'Qt.ConnectionType' - - class Corner(int): ... - TopLeftCorner = ... # type: 'Qt.Corner' - TopRightCorner = ... # type: 'Qt.Corner' - BottomLeftCorner = ... # type: 'Qt.Corner' - BottomRightCorner = ... # type: 'Qt.Corner' - - class CaseSensitivity(int): ... - CaseInsensitive = ... # type: 'Qt.CaseSensitivity' - CaseSensitive = ... # type: 'Qt.CaseSensitivity' - - class ScrollBarPolicy(int): ... - ScrollBarAsNeeded = ... # type: 'Qt.ScrollBarPolicy' - ScrollBarAlwaysOff = ... # type: 'Qt.ScrollBarPolicy' - ScrollBarAlwaysOn = ... # type: 'Qt.ScrollBarPolicy' - - class DayOfWeek(int): ... - Monday = ... # type: 'Qt.DayOfWeek' - Tuesday = ... # type: 'Qt.DayOfWeek' - Wednesday = ... # type: 'Qt.DayOfWeek' - Thursday = ... # type: 'Qt.DayOfWeek' - Friday = ... # type: 'Qt.DayOfWeek' - Saturday = ... # type: 'Qt.DayOfWeek' - Sunday = ... # type: 'Qt.DayOfWeek' - - class TimeSpec(int): ... - LocalTime = ... # type: 'Qt.TimeSpec' - UTC = ... # type: 'Qt.TimeSpec' - OffsetFromUTC = ... # type: 'Qt.TimeSpec' - TimeZone = ... # type: 'Qt.TimeSpec' - - class DateFormat(int): ... - TextDate = ... # type: 'Qt.DateFormat' - ISODate = ... # type: 'Qt.DateFormat' - LocalDate = ... # type: 'Qt.DateFormat' - SystemLocaleDate = ... # type: 'Qt.DateFormat' - LocaleDate = ... # type: 'Qt.DateFormat' - SystemLocaleShortDate = ... # type: 'Qt.DateFormat' - SystemLocaleLongDate = ... # type: 'Qt.DateFormat' - DefaultLocaleShortDate = ... # type: 'Qt.DateFormat' - DefaultLocaleLongDate = ... # type: 'Qt.DateFormat' - RFC2822Date = ... # type: 'Qt.DateFormat' - - class ToolBarArea(int): ... - LeftToolBarArea = ... # type: 'Qt.ToolBarArea' - RightToolBarArea = ... # type: 'Qt.ToolBarArea' - TopToolBarArea = ... # type: 'Qt.ToolBarArea' - BottomToolBarArea = ... # type: 'Qt.ToolBarArea' - ToolBarArea_Mask = ... # type: 'Qt.ToolBarArea' - AllToolBarAreas = ... # type: 'Qt.ToolBarArea' - NoToolBarArea = ... # type: 'Qt.ToolBarArea' - - class TimerType(int): ... - PreciseTimer = ... # type: 'Qt.TimerType' - CoarseTimer = ... # type: 'Qt.TimerType' - VeryCoarseTimer = ... # type: 'Qt.TimerType' - - class DockWidgetArea(int): ... - LeftDockWidgetArea = ... # type: 'Qt.DockWidgetArea' - RightDockWidgetArea = ... # type: 'Qt.DockWidgetArea' - TopDockWidgetArea = ... # type: 'Qt.DockWidgetArea' - BottomDockWidgetArea = ... # type: 'Qt.DockWidgetArea' - DockWidgetArea_Mask = ... # type: 'Qt.DockWidgetArea' - AllDockWidgetAreas = ... # type: 'Qt.DockWidgetArea' - NoDockWidgetArea = ... # type: 'Qt.DockWidgetArea' - - class AspectRatioMode(int): ... - IgnoreAspectRatio = ... # type: 'Qt.AspectRatioMode' - KeepAspectRatio = ... # type: 'Qt.AspectRatioMode' - KeepAspectRatioByExpanding = ... # type: 'Qt.AspectRatioMode' - - class TextFormat(int): ... - PlainText = ... # type: 'Qt.TextFormat' - RichText = ... # type: 'Qt.TextFormat' - AutoText = ... # type: 'Qt.TextFormat' - - class CursorShape(int): ... - ArrowCursor = ... # type: 'Qt.CursorShape' - UpArrowCursor = ... # type: 'Qt.CursorShape' - CrossCursor = ... # type: 'Qt.CursorShape' - WaitCursor = ... # type: 'Qt.CursorShape' - IBeamCursor = ... # type: 'Qt.CursorShape' - SizeVerCursor = ... # type: 'Qt.CursorShape' - SizeHorCursor = ... # type: 'Qt.CursorShape' - SizeBDiagCursor = ... # type: 'Qt.CursorShape' - SizeFDiagCursor = ... # type: 'Qt.CursorShape' - SizeAllCursor = ... # type: 'Qt.CursorShape' - BlankCursor = ... # type: 'Qt.CursorShape' - SplitVCursor = ... # type: 'Qt.CursorShape' - SplitHCursor = ... # type: 'Qt.CursorShape' - PointingHandCursor = ... # type: 'Qt.CursorShape' - ForbiddenCursor = ... # type: 'Qt.CursorShape' - OpenHandCursor = ... # type: 'Qt.CursorShape' - ClosedHandCursor = ... # type: 'Qt.CursorShape' - WhatsThisCursor = ... # type: 'Qt.CursorShape' - BusyCursor = ... # type: 'Qt.CursorShape' - LastCursor = ... # type: 'Qt.CursorShape' - BitmapCursor = ... # type: 'Qt.CursorShape' - CustomCursor = ... # type: 'Qt.CursorShape' - DragCopyCursor = ... # type: 'Qt.CursorShape' - DragMoveCursor = ... # type: 'Qt.CursorShape' - DragLinkCursor = ... # type: 'Qt.CursorShape' - - class UIEffect(int): ... - UI_General = ... # type: 'Qt.UIEffect' - UI_AnimateMenu = ... # type: 'Qt.UIEffect' - UI_FadeMenu = ... # type: 'Qt.UIEffect' - UI_AnimateCombo = ... # type: 'Qt.UIEffect' - UI_AnimateTooltip = ... # type: 'Qt.UIEffect' - UI_FadeTooltip = ... # type: 'Qt.UIEffect' - UI_AnimateToolBox = ... # type: 'Qt.UIEffect' - - class BrushStyle(int): ... - NoBrush = ... # type: 'Qt.BrushStyle' - SolidPattern = ... # type: 'Qt.BrushStyle' - Dense1Pattern = ... # type: 'Qt.BrushStyle' - Dense2Pattern = ... # type: 'Qt.BrushStyle' - Dense3Pattern = ... # type: 'Qt.BrushStyle' - Dense4Pattern = ... # type: 'Qt.BrushStyle' - Dense5Pattern = ... # type: 'Qt.BrushStyle' - Dense6Pattern = ... # type: 'Qt.BrushStyle' - Dense7Pattern = ... # type: 'Qt.BrushStyle' - HorPattern = ... # type: 'Qt.BrushStyle' - VerPattern = ... # type: 'Qt.BrushStyle' - CrossPattern = ... # type: 'Qt.BrushStyle' - BDiagPattern = ... # type: 'Qt.BrushStyle' - FDiagPattern = ... # type: 'Qt.BrushStyle' - DiagCrossPattern = ... # type: 'Qt.BrushStyle' - LinearGradientPattern = ... # type: 'Qt.BrushStyle' - RadialGradientPattern = ... # type: 'Qt.BrushStyle' - ConicalGradientPattern = ... # type: 'Qt.BrushStyle' - TexturePattern = ... # type: 'Qt.BrushStyle' - - class PenJoinStyle(int): ... - MiterJoin = ... # type: 'Qt.PenJoinStyle' - BevelJoin = ... # type: 'Qt.PenJoinStyle' - RoundJoin = ... # type: 'Qt.PenJoinStyle' - MPenJoinStyle = ... # type: 'Qt.PenJoinStyle' - SvgMiterJoin = ... # type: 'Qt.PenJoinStyle' - - class PenCapStyle(int): ... - FlatCap = ... # type: 'Qt.PenCapStyle' - SquareCap = ... # type: 'Qt.PenCapStyle' - RoundCap = ... # type: 'Qt.PenCapStyle' - MPenCapStyle = ... # type: 'Qt.PenCapStyle' - - class PenStyle(int): ... - NoPen = ... # type: 'Qt.PenStyle' - SolidLine = ... # type: 'Qt.PenStyle' - DashLine = ... # type: 'Qt.PenStyle' - DotLine = ... # type: 'Qt.PenStyle' - DashDotLine = ... # type: 'Qt.PenStyle' - DashDotDotLine = ... # type: 'Qt.PenStyle' - CustomDashLine = ... # type: 'Qt.PenStyle' - MPenStyle = ... # type: 'Qt.PenStyle' - - class ArrowType(int): ... - NoArrow = ... # type: 'Qt.ArrowType' - UpArrow = ... # type: 'Qt.ArrowType' - DownArrow = ... # type: 'Qt.ArrowType' - LeftArrow = ... # type: 'Qt.ArrowType' - RightArrow = ... # type: 'Qt.ArrowType' - - class Key(int): ... - Key_Escape = ... # type: 'Qt.Key' - Key_Tab = ... # type: 'Qt.Key' - Key_Backtab = ... # type: 'Qt.Key' - Key_Backspace = ... # type: 'Qt.Key' - Key_Return = ... # type: 'Qt.Key' - Key_Enter = ... # type: 'Qt.Key' - Key_Insert = ... # type: 'Qt.Key' - Key_Delete = ... # type: 'Qt.Key' - Key_Pause = ... # type: 'Qt.Key' - Key_Print = ... # type: 'Qt.Key' - Key_SysReq = ... # type: 'Qt.Key' - Key_Clear = ... # type: 'Qt.Key' - Key_Home = ... # type: 'Qt.Key' - Key_End = ... # type: 'Qt.Key' - Key_Left = ... # type: 'Qt.Key' - Key_Up = ... # type: 'Qt.Key' - Key_Right = ... # type: 'Qt.Key' - Key_Down = ... # type: 'Qt.Key' - Key_PageUp = ... # type: 'Qt.Key' - Key_PageDown = ... # type: 'Qt.Key' - Key_Shift = ... # type: 'Qt.Key' - Key_Control = ... # type: 'Qt.Key' - Key_Meta = ... # type: 'Qt.Key' - Key_Alt = ... # type: 'Qt.Key' - Key_CapsLock = ... # type: 'Qt.Key' - Key_NumLock = ... # type: 'Qt.Key' - Key_ScrollLock = ... # type: 'Qt.Key' - Key_F1 = ... # type: 'Qt.Key' - Key_F2 = ... # type: 'Qt.Key' - Key_F3 = ... # type: 'Qt.Key' - Key_F4 = ... # type: 'Qt.Key' - Key_F5 = ... # type: 'Qt.Key' - Key_F6 = ... # type: 'Qt.Key' - Key_F7 = ... # type: 'Qt.Key' - Key_F8 = ... # type: 'Qt.Key' - Key_F9 = ... # type: 'Qt.Key' - Key_F10 = ... # type: 'Qt.Key' - Key_F11 = ... # type: 'Qt.Key' - Key_F12 = ... # type: 'Qt.Key' - Key_F13 = ... # type: 'Qt.Key' - Key_F14 = ... # type: 'Qt.Key' - Key_F15 = ... # type: 'Qt.Key' - Key_F16 = ... # type: 'Qt.Key' - Key_F17 = ... # type: 'Qt.Key' - Key_F18 = ... # type: 'Qt.Key' - Key_F19 = ... # type: 'Qt.Key' - Key_F20 = ... # type: 'Qt.Key' - Key_F21 = ... # type: 'Qt.Key' - Key_F22 = ... # type: 'Qt.Key' - Key_F23 = ... # type: 'Qt.Key' - Key_F24 = ... # type: 'Qt.Key' - Key_F25 = ... # type: 'Qt.Key' - Key_F26 = ... # type: 'Qt.Key' - Key_F27 = ... # type: 'Qt.Key' - Key_F28 = ... # type: 'Qt.Key' - Key_F29 = ... # type: 'Qt.Key' - Key_F30 = ... # type: 'Qt.Key' - Key_F31 = ... # type: 'Qt.Key' - Key_F32 = ... # type: 'Qt.Key' - Key_F33 = ... # type: 'Qt.Key' - Key_F34 = ... # type: 'Qt.Key' - Key_F35 = ... # type: 'Qt.Key' - Key_Super_L = ... # type: 'Qt.Key' - Key_Super_R = ... # type: 'Qt.Key' - Key_Menu = ... # type: 'Qt.Key' - Key_Hyper_L = ... # type: 'Qt.Key' - Key_Hyper_R = ... # type: 'Qt.Key' - Key_Help = ... # type: 'Qt.Key' - Key_Direction_L = ... # type: 'Qt.Key' - Key_Direction_R = ... # type: 'Qt.Key' - Key_Space = ... # type: 'Qt.Key' - Key_Any = ... # type: 'Qt.Key' - Key_Exclam = ... # type: 'Qt.Key' - Key_QuoteDbl = ... # type: 'Qt.Key' - Key_NumberSign = ... # type: 'Qt.Key' - Key_Dollar = ... # type: 'Qt.Key' - Key_Percent = ... # type: 'Qt.Key' - Key_Ampersand = ... # type: 'Qt.Key' - Key_Apostrophe = ... # type: 'Qt.Key' - Key_ParenLeft = ... # type: 'Qt.Key' - Key_ParenRight = ... # type: 'Qt.Key' - Key_Asterisk = ... # type: 'Qt.Key' - Key_Plus = ... # type: 'Qt.Key' - Key_Comma = ... # type: 'Qt.Key' - Key_Minus = ... # type: 'Qt.Key' - Key_Period = ... # type: 'Qt.Key' - Key_Slash = ... # type: 'Qt.Key' - Key_0 = ... # type: 'Qt.Key' - Key_1 = ... # type: 'Qt.Key' - Key_2 = ... # type: 'Qt.Key' - Key_3 = ... # type: 'Qt.Key' - Key_4 = ... # type: 'Qt.Key' - Key_5 = ... # type: 'Qt.Key' - Key_6 = ... # type: 'Qt.Key' - Key_7 = ... # type: 'Qt.Key' - Key_8 = ... # type: 'Qt.Key' - Key_9 = ... # type: 'Qt.Key' - Key_Colon = ... # type: 'Qt.Key' - Key_Semicolon = ... # type: 'Qt.Key' - Key_Less = ... # type: 'Qt.Key' - Key_Equal = ... # type: 'Qt.Key' - Key_Greater = ... # type: 'Qt.Key' - Key_Question = ... # type: 'Qt.Key' - Key_At = ... # type: 'Qt.Key' - Key_A = ... # type: 'Qt.Key' - Key_B = ... # type: 'Qt.Key' - Key_C = ... # type: 'Qt.Key' - Key_D = ... # type: 'Qt.Key' - Key_E = ... # type: 'Qt.Key' - Key_F = ... # type: 'Qt.Key' - Key_G = ... # type: 'Qt.Key' - Key_H = ... # type: 'Qt.Key' - Key_I = ... # type: 'Qt.Key' - Key_J = ... # type: 'Qt.Key' - Key_K = ... # type: 'Qt.Key' - Key_L = ... # type: 'Qt.Key' - Key_M = ... # type: 'Qt.Key' - Key_N = ... # type: 'Qt.Key' - Key_O = ... # type: 'Qt.Key' - Key_P = ... # type: 'Qt.Key' - Key_Q = ... # type: 'Qt.Key' - Key_R = ... # type: 'Qt.Key' - Key_S = ... # type: 'Qt.Key' - Key_T = ... # type: 'Qt.Key' - Key_U = ... # type: 'Qt.Key' - Key_V = ... # type: 'Qt.Key' - Key_W = ... # type: 'Qt.Key' - Key_X = ... # type: 'Qt.Key' - Key_Y = ... # type: 'Qt.Key' - Key_Z = ... # type: 'Qt.Key' - Key_BracketLeft = ... # type: 'Qt.Key' - Key_Backslash = ... # type: 'Qt.Key' - Key_BracketRight = ... # type: 'Qt.Key' - Key_AsciiCircum = ... # type: 'Qt.Key' - Key_Underscore = ... # type: 'Qt.Key' - Key_QuoteLeft = ... # type: 'Qt.Key' - Key_BraceLeft = ... # type: 'Qt.Key' - Key_Bar = ... # type: 'Qt.Key' - Key_BraceRight = ... # type: 'Qt.Key' - Key_AsciiTilde = ... # type: 'Qt.Key' - Key_nobreakspace = ... # type: 'Qt.Key' - Key_exclamdown = ... # type: 'Qt.Key' - Key_cent = ... # type: 'Qt.Key' - Key_sterling = ... # type: 'Qt.Key' - Key_currency = ... # type: 'Qt.Key' - Key_yen = ... # type: 'Qt.Key' - Key_brokenbar = ... # type: 'Qt.Key' - Key_section = ... # type: 'Qt.Key' - Key_diaeresis = ... # type: 'Qt.Key' - Key_copyright = ... # type: 'Qt.Key' - Key_ordfeminine = ... # type: 'Qt.Key' - Key_guillemotleft = ... # type: 'Qt.Key' - Key_notsign = ... # type: 'Qt.Key' - Key_hyphen = ... # type: 'Qt.Key' - Key_registered = ... # type: 'Qt.Key' - Key_macron = ... # type: 'Qt.Key' - Key_degree = ... # type: 'Qt.Key' - Key_plusminus = ... # type: 'Qt.Key' - Key_twosuperior = ... # type: 'Qt.Key' - Key_threesuperior = ... # type: 'Qt.Key' - Key_acute = ... # type: 'Qt.Key' - Key_mu = ... # type: 'Qt.Key' - Key_paragraph = ... # type: 'Qt.Key' - Key_periodcentered = ... # type: 'Qt.Key' - Key_cedilla = ... # type: 'Qt.Key' - Key_onesuperior = ... # type: 'Qt.Key' - Key_masculine = ... # type: 'Qt.Key' - Key_guillemotright = ... # type: 'Qt.Key' - Key_onequarter = ... # type: 'Qt.Key' - Key_onehalf = ... # type: 'Qt.Key' - Key_threequarters = ... # type: 'Qt.Key' - Key_questiondown = ... # type: 'Qt.Key' - Key_Agrave = ... # type: 'Qt.Key' - Key_Aacute = ... # type: 'Qt.Key' - Key_Acircumflex = ... # type: 'Qt.Key' - Key_Atilde = ... # type: 'Qt.Key' - Key_Adiaeresis = ... # type: 'Qt.Key' - Key_Aring = ... # type: 'Qt.Key' - Key_AE = ... # type: 'Qt.Key' - Key_Ccedilla = ... # type: 'Qt.Key' - Key_Egrave = ... # type: 'Qt.Key' - Key_Eacute = ... # type: 'Qt.Key' - Key_Ecircumflex = ... # type: 'Qt.Key' - Key_Ediaeresis = ... # type: 'Qt.Key' - Key_Igrave = ... # type: 'Qt.Key' - Key_Iacute = ... # type: 'Qt.Key' - Key_Icircumflex = ... # type: 'Qt.Key' - Key_Idiaeresis = ... # type: 'Qt.Key' - Key_ETH = ... # type: 'Qt.Key' - Key_Ntilde = ... # type: 'Qt.Key' - Key_Ograve = ... # type: 'Qt.Key' - Key_Oacute = ... # type: 'Qt.Key' - Key_Ocircumflex = ... # type: 'Qt.Key' - Key_Otilde = ... # type: 'Qt.Key' - Key_Odiaeresis = ... # type: 'Qt.Key' - Key_multiply = ... # type: 'Qt.Key' - Key_Ooblique = ... # type: 'Qt.Key' - Key_Ugrave = ... # type: 'Qt.Key' - Key_Uacute = ... # type: 'Qt.Key' - Key_Ucircumflex = ... # type: 'Qt.Key' - Key_Udiaeresis = ... # type: 'Qt.Key' - Key_Yacute = ... # type: 'Qt.Key' - Key_THORN = ... # type: 'Qt.Key' - Key_ssharp = ... # type: 'Qt.Key' - Key_division = ... # type: 'Qt.Key' - Key_ydiaeresis = ... # type: 'Qt.Key' - Key_AltGr = ... # type: 'Qt.Key' - Key_Multi_key = ... # type: 'Qt.Key' - Key_Codeinput = ... # type: 'Qt.Key' - Key_SingleCandidate = ... # type: 'Qt.Key' - Key_MultipleCandidate = ... # type: 'Qt.Key' - Key_PreviousCandidate = ... # type: 'Qt.Key' - Key_Mode_switch = ... # type: 'Qt.Key' - Key_Kanji = ... # type: 'Qt.Key' - Key_Muhenkan = ... # type: 'Qt.Key' - Key_Henkan = ... # type: 'Qt.Key' - Key_Romaji = ... # type: 'Qt.Key' - Key_Hiragana = ... # type: 'Qt.Key' - Key_Katakana = ... # type: 'Qt.Key' - Key_Hiragana_Katakana = ... # type: 'Qt.Key' - Key_Zenkaku = ... # type: 'Qt.Key' - Key_Hankaku = ... # type: 'Qt.Key' - Key_Zenkaku_Hankaku = ... # type: 'Qt.Key' - Key_Touroku = ... # type: 'Qt.Key' - Key_Massyo = ... # type: 'Qt.Key' - Key_Kana_Lock = ... # type: 'Qt.Key' - Key_Kana_Shift = ... # type: 'Qt.Key' - Key_Eisu_Shift = ... # type: 'Qt.Key' - Key_Eisu_toggle = ... # type: 'Qt.Key' - Key_Hangul = ... # type: 'Qt.Key' - Key_Hangul_Start = ... # type: 'Qt.Key' - Key_Hangul_End = ... # type: 'Qt.Key' - Key_Hangul_Hanja = ... # type: 'Qt.Key' - Key_Hangul_Jamo = ... # type: 'Qt.Key' - Key_Hangul_Romaja = ... # type: 'Qt.Key' - Key_Hangul_Jeonja = ... # type: 'Qt.Key' - Key_Hangul_Banja = ... # type: 'Qt.Key' - Key_Hangul_PreHanja = ... # type: 'Qt.Key' - Key_Hangul_PostHanja = ... # type: 'Qt.Key' - Key_Hangul_Special = ... # type: 'Qt.Key' - Key_Dead_Grave = ... # type: 'Qt.Key' - Key_Dead_Acute = ... # type: 'Qt.Key' - Key_Dead_Circumflex = ... # type: 'Qt.Key' - Key_Dead_Tilde = ... # type: 'Qt.Key' - Key_Dead_Macron = ... # type: 'Qt.Key' - Key_Dead_Breve = ... # type: 'Qt.Key' - Key_Dead_Abovedot = ... # type: 'Qt.Key' - Key_Dead_Diaeresis = ... # type: 'Qt.Key' - Key_Dead_Abovering = ... # type: 'Qt.Key' - Key_Dead_Doubleacute = ... # type: 'Qt.Key' - Key_Dead_Caron = ... # type: 'Qt.Key' - Key_Dead_Cedilla = ... # type: 'Qt.Key' - Key_Dead_Ogonek = ... # type: 'Qt.Key' - Key_Dead_Iota = ... # type: 'Qt.Key' - Key_Dead_Voiced_Sound = ... # type: 'Qt.Key' - Key_Dead_Semivoiced_Sound = ... # type: 'Qt.Key' - Key_Dead_Belowdot = ... # type: 'Qt.Key' - Key_Dead_Hook = ... # type: 'Qt.Key' - Key_Dead_Horn = ... # type: 'Qt.Key' - Key_Back = ... # type: 'Qt.Key' - Key_Forward = ... # type: 'Qt.Key' - Key_Stop = ... # type: 'Qt.Key' - Key_Refresh = ... # type: 'Qt.Key' - Key_VolumeDown = ... # type: 'Qt.Key' - Key_VolumeMute = ... # type: 'Qt.Key' - Key_VolumeUp = ... # type: 'Qt.Key' - Key_BassBoost = ... # type: 'Qt.Key' - Key_BassUp = ... # type: 'Qt.Key' - Key_BassDown = ... # type: 'Qt.Key' - Key_TrebleUp = ... # type: 'Qt.Key' - Key_TrebleDown = ... # type: 'Qt.Key' - Key_MediaPlay = ... # type: 'Qt.Key' - Key_MediaStop = ... # type: 'Qt.Key' - Key_MediaPrevious = ... # type: 'Qt.Key' - Key_MediaNext = ... # type: 'Qt.Key' - Key_MediaRecord = ... # type: 'Qt.Key' - Key_HomePage = ... # type: 'Qt.Key' - Key_Favorites = ... # type: 'Qt.Key' - Key_Search = ... # type: 'Qt.Key' - Key_Standby = ... # type: 'Qt.Key' - Key_OpenUrl = ... # type: 'Qt.Key' - Key_LaunchMail = ... # type: 'Qt.Key' - Key_LaunchMedia = ... # type: 'Qt.Key' - Key_Launch0 = ... # type: 'Qt.Key' - Key_Launch1 = ... # type: 'Qt.Key' - Key_Launch2 = ... # type: 'Qt.Key' - Key_Launch3 = ... # type: 'Qt.Key' - Key_Launch4 = ... # type: 'Qt.Key' - Key_Launch5 = ... # type: 'Qt.Key' - Key_Launch6 = ... # type: 'Qt.Key' - Key_Launch7 = ... # type: 'Qt.Key' - Key_Launch8 = ... # type: 'Qt.Key' - Key_Launch9 = ... # type: 'Qt.Key' - Key_LaunchA = ... # type: 'Qt.Key' - Key_LaunchB = ... # type: 'Qt.Key' - Key_LaunchC = ... # type: 'Qt.Key' - Key_LaunchD = ... # type: 'Qt.Key' - Key_LaunchE = ... # type: 'Qt.Key' - Key_LaunchF = ... # type: 'Qt.Key' - Key_MediaLast = ... # type: 'Qt.Key' - Key_Select = ... # type: 'Qt.Key' - Key_Yes = ... # type: 'Qt.Key' - Key_No = ... # type: 'Qt.Key' - Key_Context1 = ... # type: 'Qt.Key' - Key_Context2 = ... # type: 'Qt.Key' - Key_Context3 = ... # type: 'Qt.Key' - Key_Context4 = ... # type: 'Qt.Key' - Key_Call = ... # type: 'Qt.Key' - Key_Hangup = ... # type: 'Qt.Key' - Key_Flip = ... # type: 'Qt.Key' - Key_unknown = ... # type: 'Qt.Key' - Key_Execute = ... # type: 'Qt.Key' - Key_Printer = ... # type: 'Qt.Key' - Key_Play = ... # type: 'Qt.Key' - Key_Sleep = ... # type: 'Qt.Key' - Key_Zoom = ... # type: 'Qt.Key' - Key_Cancel = ... # type: 'Qt.Key' - Key_MonBrightnessUp = ... # type: 'Qt.Key' - Key_MonBrightnessDown = ... # type: 'Qt.Key' - Key_KeyboardLightOnOff = ... # type: 'Qt.Key' - Key_KeyboardBrightnessUp = ... # type: 'Qt.Key' - Key_KeyboardBrightnessDown = ... # type: 'Qt.Key' - Key_PowerOff = ... # type: 'Qt.Key' - Key_WakeUp = ... # type: 'Qt.Key' - Key_Eject = ... # type: 'Qt.Key' - Key_ScreenSaver = ... # type: 'Qt.Key' - Key_WWW = ... # type: 'Qt.Key' - Key_Memo = ... # type: 'Qt.Key' - Key_LightBulb = ... # type: 'Qt.Key' - Key_Shop = ... # type: 'Qt.Key' - Key_History = ... # type: 'Qt.Key' - Key_AddFavorite = ... # type: 'Qt.Key' - Key_HotLinks = ... # type: 'Qt.Key' - Key_BrightnessAdjust = ... # type: 'Qt.Key' - Key_Finance = ... # type: 'Qt.Key' - Key_Community = ... # type: 'Qt.Key' - Key_AudioRewind = ... # type: 'Qt.Key' - Key_BackForward = ... # type: 'Qt.Key' - Key_ApplicationLeft = ... # type: 'Qt.Key' - Key_ApplicationRight = ... # type: 'Qt.Key' - Key_Book = ... # type: 'Qt.Key' - Key_CD = ... # type: 'Qt.Key' - Key_Calculator = ... # type: 'Qt.Key' - Key_ToDoList = ... # type: 'Qt.Key' - Key_ClearGrab = ... # type: 'Qt.Key' - Key_Close = ... # type: 'Qt.Key' - Key_Copy = ... # type: 'Qt.Key' - Key_Cut = ... # type: 'Qt.Key' - Key_Display = ... # type: 'Qt.Key' - Key_DOS = ... # type: 'Qt.Key' - Key_Documents = ... # type: 'Qt.Key' - Key_Excel = ... # type: 'Qt.Key' - Key_Explorer = ... # type: 'Qt.Key' - Key_Game = ... # type: 'Qt.Key' - Key_Go = ... # type: 'Qt.Key' - Key_iTouch = ... # type: 'Qt.Key' - Key_LogOff = ... # type: 'Qt.Key' - Key_Market = ... # type: 'Qt.Key' - Key_Meeting = ... # type: 'Qt.Key' - Key_MenuKB = ... # type: 'Qt.Key' - Key_MenuPB = ... # type: 'Qt.Key' - Key_MySites = ... # type: 'Qt.Key' - Key_News = ... # type: 'Qt.Key' - Key_OfficeHome = ... # type: 'Qt.Key' - Key_Option = ... # type: 'Qt.Key' - Key_Paste = ... # type: 'Qt.Key' - Key_Phone = ... # type: 'Qt.Key' - Key_Calendar = ... # type: 'Qt.Key' - Key_Reply = ... # type: 'Qt.Key' - Key_Reload = ... # type: 'Qt.Key' - Key_RotateWindows = ... # type: 'Qt.Key' - Key_RotationPB = ... # type: 'Qt.Key' - Key_RotationKB = ... # type: 'Qt.Key' - Key_Save = ... # type: 'Qt.Key' - Key_Send = ... # type: 'Qt.Key' - Key_Spell = ... # type: 'Qt.Key' - Key_SplitScreen = ... # type: 'Qt.Key' - Key_Support = ... # type: 'Qt.Key' - Key_TaskPane = ... # type: 'Qt.Key' - Key_Terminal = ... # type: 'Qt.Key' - Key_Tools = ... # type: 'Qt.Key' - Key_Travel = ... # type: 'Qt.Key' - Key_Video = ... # type: 'Qt.Key' - Key_Word = ... # type: 'Qt.Key' - Key_Xfer = ... # type: 'Qt.Key' - Key_ZoomIn = ... # type: 'Qt.Key' - Key_ZoomOut = ... # type: 'Qt.Key' - Key_Away = ... # type: 'Qt.Key' - Key_Messenger = ... # type: 'Qt.Key' - Key_WebCam = ... # type: 'Qt.Key' - Key_MailForward = ... # type: 'Qt.Key' - Key_Pictures = ... # type: 'Qt.Key' - Key_Music = ... # type: 'Qt.Key' - Key_Battery = ... # type: 'Qt.Key' - Key_Bluetooth = ... # type: 'Qt.Key' - Key_WLAN = ... # type: 'Qt.Key' - Key_UWB = ... # type: 'Qt.Key' - Key_AudioForward = ... # type: 'Qt.Key' - Key_AudioRepeat = ... # type: 'Qt.Key' - Key_AudioRandomPlay = ... # type: 'Qt.Key' - Key_Subtitle = ... # type: 'Qt.Key' - Key_AudioCycleTrack = ... # type: 'Qt.Key' - Key_Time = ... # type: 'Qt.Key' - Key_Hibernate = ... # type: 'Qt.Key' - Key_View = ... # type: 'Qt.Key' - Key_TopMenu = ... # type: 'Qt.Key' - Key_PowerDown = ... # type: 'Qt.Key' - Key_Suspend = ... # type: 'Qt.Key' - Key_ContrastAdjust = ... # type: 'Qt.Key' - Key_MediaPause = ... # type: 'Qt.Key' - Key_MediaTogglePlayPause = ... # type: 'Qt.Key' - Key_LaunchG = ... # type: 'Qt.Key' - Key_LaunchH = ... # type: 'Qt.Key' - Key_ToggleCallHangup = ... # type: 'Qt.Key' - Key_VoiceDial = ... # type: 'Qt.Key' - Key_LastNumberRedial = ... # type: 'Qt.Key' - Key_Camera = ... # type: 'Qt.Key' - Key_CameraFocus = ... # type: 'Qt.Key' - Key_TouchpadToggle = ... # type: 'Qt.Key' - Key_TouchpadOn = ... # type: 'Qt.Key' - Key_TouchpadOff = ... # type: 'Qt.Key' - Key_MicMute = ... # type: 'Qt.Key' - Key_Red = ... # type: 'Qt.Key' - Key_Green = ... # type: 'Qt.Key' - Key_Yellow = ... # type: 'Qt.Key' - Key_Blue = ... # type: 'Qt.Key' - Key_ChannelUp = ... # type: 'Qt.Key' - Key_ChannelDown = ... # type: 'Qt.Key' - Key_Guide = ... # type: 'Qt.Key' - Key_Info = ... # type: 'Qt.Key' - Key_Settings = ... # type: 'Qt.Key' - Key_Exit = ... # type: 'Qt.Key' - Key_MicVolumeUp = ... # type: 'Qt.Key' - Key_MicVolumeDown = ... # type: 'Qt.Key' - Key_New = ... # type: 'Qt.Key' - Key_Open = ... # type: 'Qt.Key' - Key_Find = ... # type: 'Qt.Key' - Key_Undo = ... # type: 'Qt.Key' - Key_Redo = ... # type: 'Qt.Key' - - class BGMode(int): ... - TransparentMode = ... # type: 'Qt.BGMode' - OpaqueMode = ... # type: 'Qt.BGMode' - - class ImageConversionFlag(int): ... - AutoColor = ... # type: 'Qt.ImageConversionFlag' - ColorOnly = ... # type: 'Qt.ImageConversionFlag' - MonoOnly = ... # type: 'Qt.ImageConversionFlag' - ThresholdAlphaDither = ... # type: 'Qt.ImageConversionFlag' - OrderedAlphaDither = ... # type: 'Qt.ImageConversionFlag' - DiffuseAlphaDither = ... # type: 'Qt.ImageConversionFlag' - DiffuseDither = ... # type: 'Qt.ImageConversionFlag' - OrderedDither = ... # type: 'Qt.ImageConversionFlag' - ThresholdDither = ... # type: 'Qt.ImageConversionFlag' - AutoDither = ... # type: 'Qt.ImageConversionFlag' - PreferDither = ... # type: 'Qt.ImageConversionFlag' - AvoidDither = ... # type: 'Qt.ImageConversionFlag' - NoOpaqueDetection = ... # type: 'Qt.ImageConversionFlag' - NoFormatConversion = ... # type: 'Qt.ImageConversionFlag' - - class WidgetAttribute(int): ... - WA_Disabled = ... # type: 'Qt.WidgetAttribute' - WA_UnderMouse = ... # type: 'Qt.WidgetAttribute' - WA_MouseTracking = ... # type: 'Qt.WidgetAttribute' - WA_OpaquePaintEvent = ... # type: 'Qt.WidgetAttribute' - WA_StaticContents = ... # type: 'Qt.WidgetAttribute' - WA_LaidOut = ... # type: 'Qt.WidgetAttribute' - WA_PaintOnScreen = ... # type: 'Qt.WidgetAttribute' - WA_NoSystemBackground = ... # type: 'Qt.WidgetAttribute' - WA_UpdatesDisabled = ... # type: 'Qt.WidgetAttribute' - WA_Mapped = ... # type: 'Qt.WidgetAttribute' - WA_MacNoClickThrough = ... # type: 'Qt.WidgetAttribute' - WA_InputMethodEnabled = ... # type: 'Qt.WidgetAttribute' - WA_WState_Visible = ... # type: 'Qt.WidgetAttribute' - WA_WState_Hidden = ... # type: 'Qt.WidgetAttribute' - WA_ForceDisabled = ... # type: 'Qt.WidgetAttribute' - WA_KeyCompression = ... # type: 'Qt.WidgetAttribute' - WA_PendingMoveEvent = ... # type: 'Qt.WidgetAttribute' - WA_PendingResizeEvent = ... # type: 'Qt.WidgetAttribute' - WA_SetPalette = ... # type: 'Qt.WidgetAttribute' - WA_SetFont = ... # type: 'Qt.WidgetAttribute' - WA_SetCursor = ... # type: 'Qt.WidgetAttribute' - WA_NoChildEventsFromChildren = ... # type: 'Qt.WidgetAttribute' - WA_WindowModified = ... # type: 'Qt.WidgetAttribute' - WA_Resized = ... # type: 'Qt.WidgetAttribute' - WA_Moved = ... # type: 'Qt.WidgetAttribute' - WA_PendingUpdate = ... # type: 'Qt.WidgetAttribute' - WA_InvalidSize = ... # type: 'Qt.WidgetAttribute' - WA_MacMetalStyle = ... # type: 'Qt.WidgetAttribute' - WA_CustomWhatsThis = ... # type: 'Qt.WidgetAttribute' - WA_LayoutOnEntireRect = ... # type: 'Qt.WidgetAttribute' - WA_OutsideWSRange = ... # type: 'Qt.WidgetAttribute' - WA_GrabbedShortcut = ... # type: 'Qt.WidgetAttribute' - WA_TransparentForMouseEvents = ... # type: 'Qt.WidgetAttribute' - WA_PaintUnclipped = ... # type: 'Qt.WidgetAttribute' - WA_SetWindowIcon = ... # type: 'Qt.WidgetAttribute' - WA_NoMouseReplay = ... # type: 'Qt.WidgetAttribute' - WA_DeleteOnClose = ... # type: 'Qt.WidgetAttribute' - WA_RightToLeft = ... # type: 'Qt.WidgetAttribute' - WA_SetLayoutDirection = ... # type: 'Qt.WidgetAttribute' - WA_NoChildEventsForParent = ... # type: 'Qt.WidgetAttribute' - WA_ForceUpdatesDisabled = ... # type: 'Qt.WidgetAttribute' - WA_WState_Created = ... # type: 'Qt.WidgetAttribute' - WA_WState_CompressKeys = ... # type: 'Qt.WidgetAttribute' - WA_WState_InPaintEvent = ... # type: 'Qt.WidgetAttribute' - WA_WState_Reparented = ... # type: 'Qt.WidgetAttribute' - WA_WState_ConfigPending = ... # type: 'Qt.WidgetAttribute' - WA_WState_Polished = ... # type: 'Qt.WidgetAttribute' - WA_WState_OwnSizePolicy = ... # type: 'Qt.WidgetAttribute' - WA_WState_ExplicitShowHide = ... # type: 'Qt.WidgetAttribute' - WA_MouseNoMask = ... # type: 'Qt.WidgetAttribute' - WA_GroupLeader = ... # type: 'Qt.WidgetAttribute' - WA_NoMousePropagation = ... # type: 'Qt.WidgetAttribute' - WA_Hover = ... # type: 'Qt.WidgetAttribute' - WA_InputMethodTransparent = ... # type: 'Qt.WidgetAttribute' - WA_QuitOnClose = ... # type: 'Qt.WidgetAttribute' - WA_KeyboardFocusChange = ... # type: 'Qt.WidgetAttribute' - WA_AcceptDrops = ... # type: 'Qt.WidgetAttribute' - WA_WindowPropagation = ... # type: 'Qt.WidgetAttribute' - WA_NoX11EventCompression = ... # type: 'Qt.WidgetAttribute' - WA_TintedBackground = ... # type: 'Qt.WidgetAttribute' - WA_X11OpenGLOverlay = ... # type: 'Qt.WidgetAttribute' - WA_AttributeCount = ... # type: 'Qt.WidgetAttribute' - WA_AlwaysShowToolTips = ... # type: 'Qt.WidgetAttribute' - WA_MacOpaqueSizeGrip = ... # type: 'Qt.WidgetAttribute' - WA_SetStyle = ... # type: 'Qt.WidgetAttribute' - WA_MacBrushedMetal = ... # type: 'Qt.WidgetAttribute' - WA_SetLocale = ... # type: 'Qt.WidgetAttribute' - WA_MacShowFocusRect = ... # type: 'Qt.WidgetAttribute' - WA_MacNormalSize = ... # type: 'Qt.WidgetAttribute' - WA_MacSmallSize = ... # type: 'Qt.WidgetAttribute' - WA_MacMiniSize = ... # type: 'Qt.WidgetAttribute' - WA_LayoutUsesWidgetRect = ... # type: 'Qt.WidgetAttribute' - WA_StyledBackground = ... # type: 'Qt.WidgetAttribute' - WA_MSWindowsUseDirect3D = ... # type: 'Qt.WidgetAttribute' - WA_MacAlwaysShowToolWindow = ... # type: 'Qt.WidgetAttribute' - WA_StyleSheet = ... # type: 'Qt.WidgetAttribute' - WA_ShowWithoutActivating = ... # type: 'Qt.WidgetAttribute' - WA_NativeWindow = ... # type: 'Qt.WidgetAttribute' - WA_DontCreateNativeAncestors = ... # type: 'Qt.WidgetAttribute' - WA_MacVariableSize = ... # type: 'Qt.WidgetAttribute' - WA_DontShowOnScreen = ... # type: 'Qt.WidgetAttribute' - WA_X11NetWmWindowTypeDesktop = ... # type: 'Qt.WidgetAttribute' - WA_X11NetWmWindowTypeDock = ... # type: 'Qt.WidgetAttribute' - WA_X11NetWmWindowTypeToolBar = ... # type: 'Qt.WidgetAttribute' - WA_X11NetWmWindowTypeMenu = ... # type: 'Qt.WidgetAttribute' - WA_X11NetWmWindowTypeUtility = ... # type: 'Qt.WidgetAttribute' - WA_X11NetWmWindowTypeSplash = ... # type: 'Qt.WidgetAttribute' - WA_X11NetWmWindowTypeDialog = ... # type: 'Qt.WidgetAttribute' - WA_X11NetWmWindowTypeDropDownMenu = ... # type: 'Qt.WidgetAttribute' - WA_X11NetWmWindowTypePopupMenu = ... # type: 'Qt.WidgetAttribute' - WA_X11NetWmWindowTypeToolTip = ... # type: 'Qt.WidgetAttribute' - WA_X11NetWmWindowTypeNotification = ... # type: 'Qt.WidgetAttribute' - WA_X11NetWmWindowTypeCombo = ... # type: 'Qt.WidgetAttribute' - WA_X11NetWmWindowTypeDND = ... # type: 'Qt.WidgetAttribute' - WA_MacFrameworkScaled = ... # type: 'Qt.WidgetAttribute' - WA_TranslucentBackground = ... # type: 'Qt.WidgetAttribute' - WA_AcceptTouchEvents = ... # type: 'Qt.WidgetAttribute' - WA_TouchPadAcceptSingleTouchEvents = ... # type: 'Qt.WidgetAttribute' - WA_X11DoNotAcceptFocus = ... # type: 'Qt.WidgetAttribute' - WA_MacNoShadow = ... # type: 'Qt.WidgetAttribute' - WA_AlwaysStackOnTop = ... # type: 'Qt.WidgetAttribute' - - class WindowState(int): ... - WindowNoState = ... # type: 'Qt.WindowState' - WindowMinimized = ... # type: 'Qt.WindowState' - WindowMaximized = ... # type: 'Qt.WindowState' - WindowFullScreen = ... # type: 'Qt.WindowState' - WindowActive = ... # type: 'Qt.WindowState' - - class WindowType(int): ... - Widget = ... # type: 'Qt.WindowType' - Window = ... # type: 'Qt.WindowType' - Dialog = ... # type: 'Qt.WindowType' - Sheet = ... # type: 'Qt.WindowType' - Drawer = ... # type: 'Qt.WindowType' - Popup = ... # type: 'Qt.WindowType' - Tool = ... # type: 'Qt.WindowType' - ToolTip = ... # type: 'Qt.WindowType' - SplashScreen = ... # type: 'Qt.WindowType' - Desktop = ... # type: 'Qt.WindowType' - SubWindow = ... # type: 'Qt.WindowType' - WindowType_Mask = ... # type: 'Qt.WindowType' - MSWindowsFixedSizeDialogHint = ... # type: 'Qt.WindowType' - MSWindowsOwnDC = ... # type: 'Qt.WindowType' - X11BypassWindowManagerHint = ... # type: 'Qt.WindowType' - FramelessWindowHint = ... # type: 'Qt.WindowType' - CustomizeWindowHint = ... # type: 'Qt.WindowType' - WindowTitleHint = ... # type: 'Qt.WindowType' - WindowSystemMenuHint = ... # type: 'Qt.WindowType' - WindowMinimizeButtonHint = ... # type: 'Qt.WindowType' - WindowMaximizeButtonHint = ... # type: 'Qt.WindowType' - WindowMinMaxButtonsHint = ... # type: 'Qt.WindowType' - WindowContextHelpButtonHint = ... # type: 'Qt.WindowType' - WindowShadeButtonHint = ... # type: 'Qt.WindowType' - WindowStaysOnTopHint = ... # type: 'Qt.WindowType' - WindowOkButtonHint = ... # type: 'Qt.WindowType' - WindowCancelButtonHint = ... # type: 'Qt.WindowType' - WindowStaysOnBottomHint = ... # type: 'Qt.WindowType' - WindowCloseButtonHint = ... # type: 'Qt.WindowType' - MacWindowToolBarButtonHint = ... # type: 'Qt.WindowType' - BypassGraphicsProxyWidget = ... # type: 'Qt.WindowType' - WindowTransparentForInput = ... # type: 'Qt.WindowType' - WindowOverridesSystemGestures = ... # type: 'Qt.WindowType' - WindowDoesNotAcceptFocus = ... # type: 'Qt.WindowType' - NoDropShadowWindowHint = ... # type: 'Qt.WindowType' - WindowFullscreenButtonHint = ... # type: 'Qt.WindowType' - ForeignWindow = ... # type: 'Qt.WindowType' - BypassWindowManagerHint = ... # type: 'Qt.WindowType' - CoverWindow = ... # type: 'Qt.WindowType' - MaximizeUsingFullscreenGeometryHint = ... # type: 'Qt.WindowType' - - class TextElideMode(int): ... - ElideLeft = ... # type: 'Qt.TextElideMode' - ElideRight = ... # type: 'Qt.TextElideMode' - ElideMiddle = ... # type: 'Qt.TextElideMode' - ElideNone = ... # type: 'Qt.TextElideMode' - - class TextFlag(int): ... - TextSingleLine = ... # type: 'Qt.TextFlag' - TextDontClip = ... # type: 'Qt.TextFlag' - TextExpandTabs = ... # type: 'Qt.TextFlag' - TextShowMnemonic = ... # type: 'Qt.TextFlag' - TextWordWrap = ... # type: 'Qt.TextFlag' - TextWrapAnywhere = ... # type: 'Qt.TextFlag' - TextDontPrint = ... # type: 'Qt.TextFlag' - TextIncludeTrailingSpaces = ... # type: 'Qt.TextFlag' - TextHideMnemonic = ... # type: 'Qt.TextFlag' - TextJustificationForced = ... # type: 'Qt.TextFlag' - - class AlignmentFlag(int): ... - AlignLeft = ... # type: 'Qt.AlignmentFlag' - AlignLeading = ... # type: 'Qt.AlignmentFlag' - AlignRight = ... # type: 'Qt.AlignmentFlag' - AlignTrailing = ... # type: 'Qt.AlignmentFlag' - AlignHCenter = ... # type: 'Qt.AlignmentFlag' - AlignJustify = ... # type: 'Qt.AlignmentFlag' - AlignAbsolute = ... # type: 'Qt.AlignmentFlag' - AlignHorizontal_Mask = ... # type: 'Qt.AlignmentFlag' - AlignTop = ... # type: 'Qt.AlignmentFlag' - AlignBottom = ... # type: 'Qt.AlignmentFlag' - AlignVCenter = ... # type: 'Qt.AlignmentFlag' - AlignVertical_Mask = ... # type: 'Qt.AlignmentFlag' - AlignCenter = ... # type: 'Qt.AlignmentFlag' - AlignBaseline = ... # type: 'Qt.AlignmentFlag' - - class SortOrder(int): ... - AscendingOrder = ... # type: 'Qt.SortOrder' - DescendingOrder = ... # type: 'Qt.SortOrder' - - class FocusPolicy(int): ... - NoFocus = ... # type: 'Qt.FocusPolicy' - TabFocus = ... # type: 'Qt.FocusPolicy' - ClickFocus = ... # type: 'Qt.FocusPolicy' - StrongFocus = ... # type: 'Qt.FocusPolicy' - WheelFocus = ... # type: 'Qt.FocusPolicy' - - class Orientation(int): ... - Horizontal = ... # type: 'Qt.Orientation' - Vertical = ... # type: 'Qt.Orientation' - - class MouseButton(int): ... - NoButton = ... # type: 'Qt.MouseButton' - AllButtons = ... # type: 'Qt.MouseButton' - LeftButton = ... # type: 'Qt.MouseButton' - RightButton = ... # type: 'Qt.MouseButton' - MidButton = ... # type: 'Qt.MouseButton' - MiddleButton = ... # type: 'Qt.MouseButton' - XButton1 = ... # type: 'Qt.MouseButton' - XButton2 = ... # type: 'Qt.MouseButton' - BackButton = ... # type: 'Qt.MouseButton' - ExtraButton1 = ... # type: 'Qt.MouseButton' - ForwardButton = ... # type: 'Qt.MouseButton' - ExtraButton2 = ... # type: 'Qt.MouseButton' - TaskButton = ... # type: 'Qt.MouseButton' - ExtraButton3 = ... # type: 'Qt.MouseButton' - ExtraButton4 = ... # type: 'Qt.MouseButton' - ExtraButton5 = ... # type: 'Qt.MouseButton' - ExtraButton6 = ... # type: 'Qt.MouseButton' - ExtraButton7 = ... # type: 'Qt.MouseButton' - ExtraButton8 = ... # type: 'Qt.MouseButton' - ExtraButton9 = ... # type: 'Qt.MouseButton' - ExtraButton10 = ... # type: 'Qt.MouseButton' - ExtraButton11 = ... # type: 'Qt.MouseButton' - ExtraButton12 = ... # type: 'Qt.MouseButton' - ExtraButton13 = ... # type: 'Qt.MouseButton' - ExtraButton14 = ... # type: 'Qt.MouseButton' - ExtraButton15 = ... # type: 'Qt.MouseButton' - ExtraButton16 = ... # type: 'Qt.MouseButton' - ExtraButton17 = ... # type: 'Qt.MouseButton' - ExtraButton18 = ... # type: 'Qt.MouseButton' - ExtraButton19 = ... # type: 'Qt.MouseButton' - ExtraButton20 = ... # type: 'Qt.MouseButton' - ExtraButton21 = ... # type: 'Qt.MouseButton' - ExtraButton22 = ... # type: 'Qt.MouseButton' - ExtraButton23 = ... # type: 'Qt.MouseButton' - ExtraButton24 = ... # type: 'Qt.MouseButton' - - class Modifier(int): ... - META = ... # type: 'Qt.Modifier' - SHIFT = ... # type: 'Qt.Modifier' - CTRL = ... # type: 'Qt.Modifier' - ALT = ... # type: 'Qt.Modifier' - MODIFIER_MASK = ... # type: 'Qt.Modifier' - UNICODE_ACCEL = ... # type: 'Qt.Modifier' - - class KeyboardModifier(int): ... - NoModifier = ... # type: 'Qt.KeyboardModifier' - ShiftModifier = ... # type: 'Qt.KeyboardModifier' - ControlModifier = ... # type: 'Qt.KeyboardModifier' - AltModifier = ... # type: 'Qt.KeyboardModifier' - MetaModifier = ... # type: 'Qt.KeyboardModifier' - KeypadModifier = ... # type: 'Qt.KeyboardModifier' - GroupSwitchModifier = ... # type: 'Qt.KeyboardModifier' - KeyboardModifierMask = ... # type: 'Qt.KeyboardModifier' - - class GlobalColor(int): ... - color0 = ... # type: 'Qt.GlobalColor' - color1 = ... # type: 'Qt.GlobalColor' - black = ... # type: 'Qt.GlobalColor' - white = ... # type: 'Qt.GlobalColor' - darkGray = ... # type: 'Qt.GlobalColor' - gray = ... # type: 'Qt.GlobalColor' - lightGray = ... # type: 'Qt.GlobalColor' - red = ... # type: 'Qt.GlobalColor' - green = ... # type: 'Qt.GlobalColor' - blue = ... # type: 'Qt.GlobalColor' - cyan = ... # type: 'Qt.GlobalColor' - magenta = ... # type: 'Qt.GlobalColor' - yellow = ... # type: 'Qt.GlobalColor' - darkRed = ... # type: 'Qt.GlobalColor' - darkGreen = ... # type: 'Qt.GlobalColor' - darkBlue = ... # type: 'Qt.GlobalColor' - darkCyan = ... # type: 'Qt.GlobalColor' - darkMagenta = ... # type: 'Qt.GlobalColor' - darkYellow = ... # type: 'Qt.GlobalColor' - transparent = ... # type: 'Qt.GlobalColor' - - class KeyboardModifiers(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['Qt.KeyboardModifiers', 'Qt.KeyboardModifier']) -> None: ... - @typing.overload - def __init__(self, a0: 'Qt.KeyboardModifiers') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'Qt.KeyboardModifiers': ... - def __int__(self) -> int: ... - - class MouseButtons(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['Qt.MouseButtons', 'Qt.MouseButton']) -> None: ... - @typing.overload - def __init__(self, a0: 'Qt.MouseButtons') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'Qt.MouseButtons': ... - def __int__(self) -> int: ... - - class Orientations(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['Qt.Orientations', 'Qt.Orientation']) -> None: ... - @typing.overload - def __init__(self, a0: 'Qt.Orientations') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'Qt.Orientations': ... - def __int__(self) -> int: ... - - class Alignment(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['Qt.Alignment', 'Qt.AlignmentFlag']) -> None: ... - @typing.overload - def __init__(self, a0: 'Qt.Alignment') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'Qt.Alignment': ... - def __int__(self) -> int: ... - - class WindowFlags(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['Qt.WindowFlags', 'Qt.WindowType']) -> None: ... - @typing.overload - def __init__(self, a0: 'Qt.WindowFlags') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'Qt.WindowFlags': ... - def __int__(self) -> int: ... - - class WindowStates(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['Qt.WindowStates', 'Qt.WindowState']) -> None: ... - @typing.overload - def __init__(self, a0: 'Qt.WindowStates') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'Qt.WindowStates': ... - def __int__(self) -> int: ... - - class ImageConversionFlags(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['Qt.ImageConversionFlags', 'Qt.ImageConversionFlag']) -> None: ... - @typing.overload - def __init__(self, a0: 'Qt.ImageConversionFlags') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'Qt.ImageConversionFlags': ... - def __int__(self) -> int: ... - - class DockWidgetAreas(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['Qt.DockWidgetAreas', 'Qt.DockWidgetArea']) -> None: ... - @typing.overload - def __init__(self, a0: 'Qt.DockWidgetAreas') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'Qt.DockWidgetAreas': ... - def __int__(self) -> int: ... - - class ToolBarAreas(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['Qt.ToolBarAreas', 'Qt.ToolBarArea']) -> None: ... - @typing.overload - def __init__(self, a0: 'Qt.ToolBarAreas') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'Qt.ToolBarAreas': ... - def __int__(self) -> int: ... - - class InputMethodQueries(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['Qt.InputMethodQueries', 'Qt.InputMethodQuery']) -> None: ... - @typing.overload - def __init__(self, a0: 'Qt.InputMethodQueries') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'Qt.InputMethodQueries': ... - def __int__(self) -> int: ... - - class DropActions(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['Qt.DropActions', 'Qt.DropAction']) -> None: ... - @typing.overload - def __init__(self, a0: 'Qt.DropActions') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'Qt.DropActions': ... - def __int__(self) -> int: ... - - class ItemFlags(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['Qt.ItemFlags', 'Qt.ItemFlag']) -> None: ... - @typing.overload - def __init__(self, a0: 'Qt.ItemFlags') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'Qt.ItemFlags': ... - def __int__(self) -> int: ... - - class MatchFlags(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['Qt.MatchFlags', 'Qt.MatchFlag']) -> None: ... - @typing.overload - def __init__(self, a0: 'Qt.MatchFlags') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'Qt.MatchFlags': ... - def __int__(self) -> int: ... - - class TextInteractionFlags(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['Qt.TextInteractionFlags', 'Qt.TextInteractionFlag']) -> None: ... - @typing.overload - def __init__(self, a0: 'Qt.TextInteractionFlags') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'Qt.TextInteractionFlags': ... - def __int__(self) -> int: ... - - class InputMethodHints(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['Qt.InputMethodHints', 'Qt.InputMethodHint']) -> None: ... - @typing.overload - def __init__(self, a0: 'Qt.InputMethodHints') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'Qt.InputMethodHints': ... - def __int__(self) -> int: ... - - class TouchPointStates(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['Qt.TouchPointStates', 'Qt.TouchPointState']) -> None: ... - @typing.overload - def __init__(self, a0: 'Qt.TouchPointStates') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'Qt.TouchPointStates': ... - def __int__(self) -> int: ... - - class GestureFlags(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['Qt.GestureFlags', 'Qt.GestureFlag']) -> None: ... - @typing.overload - def __init__(self, a0: 'Qt.GestureFlags') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'Qt.GestureFlags': ... - def __int__(self) -> int: ... - - class ScreenOrientations(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['Qt.ScreenOrientations', 'Qt.ScreenOrientation']) -> None: ... - @typing.overload - def __init__(self, a0: 'Qt.ScreenOrientations') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'Qt.ScreenOrientations': ... - def __int__(self) -> int: ... - - class FindChildOptions(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['Qt.FindChildOptions', 'Qt.FindChildOption']) -> None: ... - @typing.overload - def __init__(self, a0: 'Qt.FindChildOptions') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'Qt.FindChildOptions': ... - def __int__(self) -> int: ... - - class ApplicationStates(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['Qt.ApplicationStates', 'Qt.ApplicationState']) -> None: ... - @typing.overload - def __init__(self, a0: 'Qt.ApplicationStates') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'Qt.ApplicationStates': ... - def __int__(self) -> int: ... - - class Edges(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['Qt.Edges', 'Qt.Edge']) -> None: ... - @typing.overload - def __init__(self, a0: 'Qt.Edges') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'Qt.Edges': ... - def __int__(self) -> int: ... - - class MouseEventFlags(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['Qt.MouseEventFlags', 'Qt.MouseEventFlag']) -> None: ... - @typing.overload - def __init__(self, a0: 'Qt.MouseEventFlags') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'Qt.MouseEventFlags': ... - def __int__(self) -> int: ... - - -class QObject(sip.wrapper): - - staticMetaObject = ... # type: 'QMetaObject' - - def __init__(self, parent: typing.Optional['QObject'] = ...) -> None: ... - - def disconnect(self) -> None: ... - def isSignalConnected(self, signal: 'QMetaMethod') -> bool: ... - def senderSignalIndex(self) -> int: ... - def disconnectNotify(self, signal: 'QMetaMethod') -> None: ... - def connectNotify(self, signal: 'QMetaMethod') -> None: ... - def customEvent(self, a0: 'QEvent') -> None: ... - def childEvent(self, a0: 'QChildEvent') -> None: ... - def timerEvent(self, a0: 'QTimerEvent') -> None: ... - def receivers(self, signal: PYQT_SIGNAL) -> int: ... - def sender(self) -> 'QObject': ... - def deleteLater(self) -> None: ... - def inherits(self, classname: str) -> bool: ... - def parent(self) -> 'QObject': ... - def objectNameChanged(self, objectName: str) -> None: ... - def destroyed(self, object: typing.Optional['QObject'] = ...) -> None: ... - def property(self, name: str) -> typing.Any: ... - def setProperty(self, name: str, value: typing.Any) -> bool: ... - def dynamicPropertyNames(self) -> typing.Any: ... - def dumpObjectTree(self) -> None: ... - def dumpObjectInfo(self) -> None: ... - def removeEventFilter(self, a0: 'QObject') -> None: ... - def installEventFilter(self, a0: 'QObject') -> None: ... - def setParent(self, a0: 'QObject') -> None: ... - def children(self) -> typing.Any: ... - def killTimer(self, id: int) -> None: ... - def startTimer(self, interval: int, timerType: Qt.TimerType = ...) -> int: ... - def moveToThread(self, thread: 'QThread') -> None: ... - def thread(self) -> 'QThread': ... - def blockSignals(self, b: bool) -> bool: ... - def signalsBlocked(self) -> bool: ... - def isWindowType(self) -> bool: ... - def isWidgetType(self) -> bool: ... - def setObjectName(self, name: str) -> None: ... - def objectName(self) -> str: ... - @typing.overload - def findChildren(self, type: type, name: str = ..., options: typing.Union[Qt.FindChildOptions, Qt.FindChildOption] = ...) -> typing.List['QObject']: ... - @typing.overload - def findChildren(self, types: typing.Tuple, name: str = ..., options: typing.Union[Qt.FindChildOptions, Qt.FindChildOption] = ...) -> typing.List['QObject']: ... - @typing.overload - def findChildren(self, type: type, regExp: 'QRegExp', options: typing.Union[Qt.FindChildOptions, Qt.FindChildOption] = ...) -> typing.List['QObject']: ... - @typing.overload - def findChildren(self, types: typing.Tuple, regExp: 'QRegExp', options: typing.Union[Qt.FindChildOptions, Qt.FindChildOption] = ...) -> typing.List['QObject']: ... - @typing.overload - def findChildren(self, type: type, re: 'QRegularExpression', options: typing.Union[Qt.FindChildOptions, Qt.FindChildOption] = ...) -> typing.List['QObject']: ... - @typing.overload - def findChildren(self, types: typing.Tuple, re: 'QRegularExpression', options: typing.Union[Qt.FindChildOptions, Qt.FindChildOption] = ...) -> typing.List['QObject']: ... - @typing.overload - def findChild(self, type: type, name: str = ..., options: typing.Union[Qt.FindChildOptions, Qt.FindChildOption] = ...) -> 'QObject': ... - @typing.overload - def findChild(self, types: typing.Tuple, name: str = ..., options: typing.Union[Qt.FindChildOptions, Qt.FindChildOption] = ...) -> 'QObject': ... - def tr(self, sourceText: str, disambiguation: typing.Optional[str] = ..., n: int = ...) -> str: ... - def eventFilter(self, a0: 'QObject', a1: 'QEvent') -> bool: ... - def event(self, a0: 'QEvent') -> bool: ... - def __getattr__(self, name: str) -> typing.Any: ... - def pyqtConfigure(self, a0: typing.Any) -> None: ... - def metaObject(self) -> 'QMetaObject': ... - - -class QAbstractAnimation(QObject): - - class DeletionPolicy(int): ... - KeepWhenStopped = ... # type: 'QAbstractAnimation.DeletionPolicy' - DeleteWhenStopped = ... # type: 'QAbstractAnimation.DeletionPolicy' - - class State(int): ... - Stopped = ... # type: 'QAbstractAnimation.State' - Paused = ... # type: 'QAbstractAnimation.State' - Running = ... # type: 'QAbstractAnimation.State' - - class Direction(int): ... - Forward = ... # type: 'QAbstractAnimation.Direction' - Backward = ... # type: 'QAbstractAnimation.Direction' - - def __init__(self, parent: typing.Optional[QObject] = ...) -> None: ... - - def updateDirection(self, direction: 'QAbstractAnimation.Direction') -> None: ... - def updateState(self, newState: 'QAbstractAnimation.State', oldState: 'QAbstractAnimation.State') -> None: ... - def updateCurrentTime(self, currentTime: int) -> None: ... - def event(self, event: 'QEvent') -> bool: ... - def setCurrentTime(self, msecs: int) -> None: ... - def stop(self) -> None: ... - def setPaused(self, a0: bool) -> None: ... - def resume(self) -> None: ... - def pause(self) -> None: ... - def start(self, policy: 'QAbstractAnimation.DeletionPolicy' = ...) -> None: ... - def directionChanged(self, a0: 'QAbstractAnimation.Direction') -> None: ... - def currentLoopChanged(self, currentLoop: int) -> None: ... - def stateChanged(self, newState: 'QAbstractAnimation.State', oldState: 'QAbstractAnimation.State') -> None: ... - def finished(self) -> None: ... - def totalDuration(self) -> int: ... - def duration(self) -> int: ... - def currentLoop(self) -> int: ... - def setLoopCount(self, loopCount: int) -> None: ... - def loopCount(self) -> int: ... - def currentLoopTime(self) -> int: ... - def currentTime(self) -> int: ... - def setDirection(self, direction: 'QAbstractAnimation.Direction') -> None: ... - def direction(self) -> 'QAbstractAnimation.Direction': ... - def group(self) -> 'QAnimationGroup': ... - def state(self) -> 'QAbstractAnimation.State': ... - - -class QAbstractEventDispatcher(QObject): - - class TimerInfo(sip.simplewrapper): - - interval = ... # type: int - timerId = ... # type: int - timerType = ... # type: Qt.TimerType - - @typing.overload - def __init__(self, id: int, i: int, t: Qt.TimerType) -> None: ... - @typing.overload - def __init__(self, a0: 'QAbstractEventDispatcher.TimerInfo') -> None: ... - - def __init__(self, parent: typing.Optional[QObject] = ...) -> None: ... - - def awake(self) -> None: ... - def aboutToBlock(self) -> None: ... - def filterNativeEvent(self, eventType: typing.Union['QByteArray', bytes, bytearray], message: sip.voidptr) -> typing.Tuple[bool, int]: ... - def removeNativeEventFilter(self, filterObj: 'QAbstractNativeEventFilter') -> None: ... - def installNativeEventFilter(self, filterObj: 'QAbstractNativeEventFilter') -> None: ... - def remainingTime(self, timerId: int) -> int: ... - def closingDown(self) -> None: ... - def startingUp(self) -> None: ... - def flush(self) -> None: ... - def interrupt(self) -> None: ... - def wakeUp(self) -> None: ... - def registeredTimers(self, object: QObject) -> typing.Any: ... - def unregisterTimers(self, object: QObject) -> bool: ... - def unregisterTimer(self, timerId: int) -> bool: ... - @typing.overload - def registerTimer(self, interval: int, timerType: Qt.TimerType, object: QObject) -> int: ... - @typing.overload - def registerTimer(self, timerId: int, interval: int, timerType: Qt.TimerType, object: QObject) -> None: ... - def unregisterSocketNotifier(self, notifier: 'QSocketNotifier') -> None: ... - def registerSocketNotifier(self, notifier: 'QSocketNotifier') -> None: ... - def hasPendingEvents(self) -> bool: ... - def processEvents(self, flags: typing.Union['QEventLoop.ProcessEventsFlags', 'QEventLoop.ProcessEventsFlag']) -> bool: ... - @staticmethod - def instance(thread: typing.Optional['QThread'] = ...) -> 'QAbstractEventDispatcher': ... - - -class QModelIndex(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QModelIndex') -> None: ... - @typing.overload - def __init__(self, a0: 'QPersistentModelIndex') -> None: ... - - def __hash__(self) -> int: ... - def sibling(self, arow: int, acolumn: int) -> 'QModelIndex': ... - def parent(self) -> 'QModelIndex': ... - def isValid(self) -> bool: ... - def model(self) -> 'QAbstractItemModel': ... - def internalId(self) -> int: ... - def internalPointer(self) -> typing.Any: ... - def flags(self) -> Qt.ItemFlags: ... - def data(self, role: int = ...) -> typing.Any: ... - def column(self) -> int: ... - def row(self) -> int: ... - def child(self, arow: int, acolumn: int) -> 'QModelIndex': ... - - -class QPersistentModelIndex(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, index: QModelIndex) -> None: ... - @typing.overload - def __init__(self, other: 'QPersistentModelIndex') -> None: ... - - def __hash__(self) -> int: ... - def swap(self, other: 'QPersistentModelIndex') -> None: ... - def isValid(self) -> bool: ... - def model(self) -> 'QAbstractItemModel': ... - def child(self, row: int, column: int) -> QModelIndex: ... - def sibling(self, row: int, column: int) -> QModelIndex: ... - def parent(self) -> QModelIndex: ... - def flags(self) -> Qt.ItemFlags: ... - def data(self, role: int = ...) -> typing.Any: ... - def column(self) -> int: ... - def row(self) -> int: ... - - -class QAbstractItemModel(QObject): - - class LayoutChangeHint(int): ... - NoLayoutChangeHint = ... # type: 'QAbstractItemModel.LayoutChangeHint' - VerticalSortHint = ... # type: 'QAbstractItemModel.LayoutChangeHint' - HorizontalSortHint = ... # type: 'QAbstractItemModel.LayoutChangeHint' - - def __init__(self, parent: typing.Optional[QObject] = ...) -> None: ... - - def moveColumn(self, sourceParent: QModelIndex, sourceColumn: int, destinationParent: QModelIndex, destinationChild: int) -> bool: ... - def moveRow(self, sourceParent: QModelIndex, sourceRow: int, destinationParent: QModelIndex, destinationChild: int) -> bool: ... - def moveColumns(self, sourceParent: QModelIndex, sourceColumn: int, count: int, destinationParent: QModelIndex, destinationChild: int) -> bool: ... - def moveRows(self, sourceParent: QModelIndex, sourceRow: int, count: int, destinationParent: QModelIndex, destinationChild: int) -> bool: ... - def canDropMimeData(self, data: 'QMimeData', action: Qt.DropAction, row: int, column: int, parent: QModelIndex) -> bool: ... - def resetInternalData(self) -> None: ... - def endResetModel(self) -> None: ... - def beginResetModel(self) -> None: ... - def endMoveColumns(self) -> None: ... - def beginMoveColumns(self, sourceParent: QModelIndex, sourceFirst: int, sourceLast: int, destinationParent: QModelIndex, destinationColumn: int) -> bool: ... - def endMoveRows(self) -> None: ... - def beginMoveRows(self, sourceParent: QModelIndex, sourceFirst: int, sourceLast: int, destinationParent: QModelIndex, destinationRow: int) -> bool: ... - def columnsMoved(self, parent: QModelIndex, start: int, end: int, destination: QModelIndex, column: int) -> None: ... - def columnsAboutToBeMoved(self, sourceParent: QModelIndex, sourceStart: int, sourceEnd: int, destinationParent: QModelIndex, destinationColumn: int) -> None: ... - def rowsMoved(self, parent: QModelIndex, start: int, end: int, destination: QModelIndex, row: int) -> None: ... - def rowsAboutToBeMoved(self, sourceParent: QModelIndex, sourceStart: int, sourceEnd: int, destinationParent: QModelIndex, destinationRow: int) -> None: ... - def createIndex(self, row: int, column: int, object: typing.Any = ...) -> QModelIndex: ... - def roleNames(self) -> typing.Any: ... - def supportedDragActions(self) -> Qt.DropActions: ... - def removeColumn(self, column: int, parent: QModelIndex = ...) -> bool: ... - def removeRow(self, row: int, parent: QModelIndex = ...) -> bool: ... - def insertColumn(self, column: int, parent: QModelIndex = ...) -> bool: ... - def insertRow(self, row: int, parent: QModelIndex = ...) -> bool: ... - def changePersistentIndexList(self, from_: typing.Any, to: typing.Any) -> None: ... - def changePersistentIndex(self, from_: QModelIndex, to: QModelIndex) -> None: ... - def persistentIndexList(self) -> typing.Any: ... - def endRemoveColumns(self) -> None: ... - def beginRemoveColumns(self, parent: QModelIndex, first: int, last: int) -> None: ... - def endInsertColumns(self) -> None: ... - def beginInsertColumns(self, parent: QModelIndex, first: int, last: int) -> None: ... - def endRemoveRows(self) -> None: ... - def beginRemoveRows(self, parent: QModelIndex, first: int, last: int) -> None: ... - def endInsertRows(self) -> None: ... - def beginInsertRows(self, parent: QModelIndex, first: int, last: int) -> None: ... - def decodeData(self, row: int, column: int, parent: QModelIndex, stream: 'QDataStream') -> bool: ... - def encodeData(self, indexes: typing.Any, stream: 'QDataStream') -> None: ... - def revert(self) -> None: ... - def submit(self) -> bool: ... - def modelReset(self) -> None: ... - def modelAboutToBeReset(self) -> None: ... - def columnsRemoved(self, parent: QModelIndex, first: int, last: int) -> None: ... - def columnsAboutToBeRemoved(self, parent: QModelIndex, first: int, last: int) -> None: ... - def columnsInserted(self, parent: QModelIndex, first: int, last: int) -> None: ... - def columnsAboutToBeInserted(self, parent: QModelIndex, first: int, last: int) -> None: ... - def rowsRemoved(self, parent: QModelIndex, first: int, last: int) -> None: ... - def rowsAboutToBeRemoved(self, parent: QModelIndex, first: int, last: int) -> None: ... - def rowsInserted(self, parent: QModelIndex, first: int, last: int) -> None: ... - def rowsAboutToBeInserted(self, parent: QModelIndex, first: int, last: int) -> None: ... - def layoutChanged(self, parents: typing.Iterable[QPersistentModelIndex] = ..., hint: 'QAbstractItemModel.LayoutChangeHint' = ...) -> None: ... - def layoutAboutToBeChanged(self, parents: typing.Any = ..., hint: 'QAbstractItemModel.LayoutChangeHint' = ...) -> None: ... - def headerDataChanged(self, orientation: Qt.Orientation, first: int, last: int) -> None: ... - def dataChanged(self, topLeft: QModelIndex, bottomRight: QModelIndex, roles: typing.Iterable[int] = ...) -> None: ... - def span(self, index: QModelIndex) -> 'QSize': ... - def match(self, start: QModelIndex, role: int, value: typing.Any, hits: int = ..., flags: typing.Union[Qt.MatchFlags, Qt.MatchFlag] = ...) -> typing.Any: ... - def buddy(self, index: QModelIndex) -> QModelIndex: ... - def sort(self, column: int, order: Qt.SortOrder = ...) -> None: ... - def flags(self, index: QModelIndex) -> Qt.ItemFlags: ... - def canFetchMore(self, parent: QModelIndex) -> bool: ... - def fetchMore(self, parent: QModelIndex) -> None: ... - def removeColumns(self, column: int, count: int, parent: QModelIndex = ...) -> bool: ... - def removeRows(self, row: int, count: int, parent: QModelIndex = ...) -> bool: ... - def insertColumns(self, column: int, count: int, parent: QModelIndex = ...) -> bool: ... - def insertRows(self, row: int, count: int, parent: QModelIndex = ...) -> bool: ... - def supportedDropActions(self) -> Qt.DropActions: ... - def dropMimeData(self, data: 'QMimeData', action: Qt.DropAction, row: int, column: int, parent: QModelIndex) -> bool: ... - def mimeData(self, indexes: typing.Any) -> 'QMimeData': ... - def mimeTypes(self) -> typing.List[str]: ... - def setItemData(self, index: QModelIndex, roles: typing.Dict[int, typing.Any]) -> bool: ... - def itemData(self, index: QModelIndex) -> typing.Any: ... - def setHeaderData(self, section: int, orientation: Qt.Orientation, value: typing.Any, role: int = ...) -> bool: ... - def headerData(self, section: int, orientation: Qt.Orientation, role: int = ...) -> typing.Any: ... - def setData(self, index: QModelIndex, value: typing.Any, role: int = ...) -> bool: ... - def data(self, index: QModelIndex, role: int = ...) -> typing.Any: ... - def hasChildren(self, parent: QModelIndex = ...) -> bool: ... - def columnCount(self, parent: QModelIndex = ...) -> int: ... - def rowCount(self, parent: QModelIndex = ...) -> int: ... - def sibling(self, row: int, column: int, idx: QModelIndex) -> QModelIndex: ... - @typing.overload - def parent(self, child: QModelIndex) -> QModelIndex: ... - @typing.overload - def parent(self) -> QObject: ... - def index(self, row: int, column: int, parent: QModelIndex = ...) -> QModelIndex: ... - def hasIndex(self, row: int, column: int, parent: QModelIndex = ...) -> bool: ... - - -class QAbstractTableModel(QAbstractItemModel): - - def __init__(self, parent: typing.Optional[QObject] = ...) -> None: ... - - def sibling(self, row: int, column: int, idx: QModelIndex) -> QModelIndex: ... - # def parent(self) -> QObject: ... - def flags(self, index: QModelIndex) -> Qt.ItemFlags: ... - def dropMimeData(self, data: 'QMimeData', action: Qt.DropAction, row: int, column: int, parent: QModelIndex) -> bool: ... - def index(self, row: int, column: int, parent: QModelIndex = ...) -> QModelIndex: ... - - -class QAbstractListModel(QAbstractItemModel): - - def __init__(self, parent: typing.Optional[QObject] = ...) -> None: ... - - def sibling(self, row: int, column: int, idx: QModelIndex) -> QModelIndex: ... - # def parent(self) -> QObject: ... - def flags(self, index: QModelIndex) -> Qt.ItemFlags: ... - def dropMimeData(self, data: 'QMimeData', action: Qt.DropAction, row: int, column: int, parent: QModelIndex) -> bool: ... - def index(self, row: int, column: int = ..., parent: QModelIndex = ...) -> QModelIndex: ... - - -class QAbstractNativeEventFilter(sip.simplewrapper): - - def __init__(self) -> None: ... - - def nativeEventFilter(self, eventType: typing.Union['QByteArray', bytes, bytearray], message: sip.voidptr) -> typing.Tuple[bool, int]: ... - - -class QAbstractProxyModel(QAbstractItemModel): - - def __init__(self, parent: typing.Optional[QObject] = ...) -> None: ... - - def supportedDragActions(self) -> Qt.DropActions: ... - def dropMimeData(self, data: 'QMimeData', action: Qt.DropAction, row: int, column: int, parent: QModelIndex) -> bool: ... - def canDropMimeData(self, data: 'QMimeData', action: Qt.DropAction, row: int, column: int, parent: QModelIndex) -> bool: ... - def sourceModelChanged(self) -> None: ... - def resetInternalData(self) -> None: ... - def sibling(self, row: int, column: int, idx: QModelIndex) -> QModelIndex: ... - def supportedDropActions(self) -> Qt.DropActions: ... - def mimeTypes(self) -> typing.List[str]: ... - def mimeData(self, indexes: typing.Any) -> 'QMimeData': ... - def hasChildren(self, parent: QModelIndex = ...) -> bool: ... - def span(self, index: QModelIndex) -> 'QSize': ... - def sort(self, column: int, order: Qt.SortOrder = ...) -> None: ... - def fetchMore(self, parent: QModelIndex) -> None: ... - def canFetchMore(self, parent: QModelIndex) -> bool: ... - def buddy(self, index: QModelIndex) -> QModelIndex: ... - def setItemData(self, index: QModelIndex, roles: typing.Dict[int, typing.Any]) -> bool: ... - def flags(self, index: QModelIndex) -> Qt.ItemFlags: ... - def itemData(self, index: QModelIndex) -> typing.Dict[int, typing.Any]: ... - def setHeaderData(self, section: int, orientation: Qt.Orientation, value: typing.Any, role: int = ...) -> bool: ... - def headerData(self, section: int, orientation: Qt.Orientation, role: int = ...) -> typing.Any: ... - def setData(self, index: QModelIndex, value: typing.Any, role: int = ...) -> bool: ... - def data(self, proxyIndex: QModelIndex, role: int = ...) -> typing.Any: ... - def revert(self) -> None: ... - def submit(self) -> bool: ... - def mapSelectionFromSource(self, selection: 'QItemSelection') -> 'QItemSelection': ... - def mapSelectionToSource(self, selection: 'QItemSelection') -> 'QItemSelection': ... - def mapFromSource(self, sourceIndex: QModelIndex) -> QModelIndex: ... - def mapToSource(self, proxyIndex: QModelIndex) -> QModelIndex: ... - def sourceModel(self) -> QAbstractItemModel: ... - def setSourceModel(self, sourceModel: QAbstractItemModel) -> None: ... - - -class QAbstractState(QObject): - - def __init__(self, parent: typing.Optional['QState'] = ...) -> None: ... - - def event(self, e: 'QEvent') -> bool: ... - def onExit(self, event: 'QEvent') -> None: ... - def onEntry(self, event: 'QEvent') -> None: ... - def exited(self) -> None: ... - def entered(self) -> None: ... - def activeChanged(self, active: bool) -> None: ... - def active(self) -> bool: ... - def machine(self) -> 'QStateMachine': ... - def parentState(self) -> 'QState': ... - - -class QAbstractTransition(QObject): - - class TransitionType(int): ... - ExternalTransition = ... # type: 'QAbstractTransition.TransitionType' - InternalTransition = ... # type: 'QAbstractTransition.TransitionType' - - def __init__(self, sourceState: typing.Optional['QState'] = ...) -> None: ... - - def setTransitionType(self, type: 'QAbstractTransition.TransitionType') -> None: ... - def transitionType(self) -> 'QAbstractTransition.TransitionType': ... - def event(self, e: 'QEvent') -> bool: ... - def onTransition(self, event: 'QEvent') -> None: ... - def eventTest(self, event: 'QEvent') -> bool: ... - def targetStatesChanged(self) -> None: ... - def targetStateChanged(self) -> None: ... - def triggered(self) -> None: ... - def animations(self) -> typing.Any: ... - def removeAnimation(self, animation: QAbstractAnimation) -> None: ... - def addAnimation(self, animation: QAbstractAnimation) -> None: ... - def machine(self) -> 'QStateMachine': ... - def setTargetStates(self, targets: typing.Iterable[QAbstractState]) -> None: ... - def targetStates(self) -> typing.Any: ... - def setTargetState(self, target: QAbstractState) -> None: ... - def targetState(self) -> QAbstractState: ... - def sourceState(self) -> 'QState': ... - - -class QAnimationGroup(QAbstractAnimation): - - def __init__(self, parent: typing.Optional[QObject] = ...) -> None: ... - - def event(self, event: 'QEvent') -> bool: ... - def clear(self) -> None: ... - def takeAnimation(self, index: int) -> QAbstractAnimation: ... - def removeAnimation(self, animation: QAbstractAnimation) -> None: ... - def insertAnimation(self, index: int, animation: QAbstractAnimation) -> None: ... - def addAnimation(self, animation: QAbstractAnimation) -> None: ... - def indexOfAnimation(self, animation: QAbstractAnimation) -> int: ... - def animationCount(self) -> int: ... - def animationAt(self, index: int) -> QAbstractAnimation: ... - - -class QBasicTimer(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QBasicTimer') -> None: ... - - def stop(self) -> None: ... - @typing.overload - def start(self, msec: int, timerType: Qt.TimerType, obj: QObject) -> None: ... - @typing.overload - def start(self, msec: int, obj: QObject) -> None: ... - def timerId(self) -> int: ... - def isActive(self) -> bool: ... - - -class QBitArray(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, size: int, value: bool = ...) -> None: ... - @typing.overload - def __init__(self, other: 'QBitArray') -> None: ... - - def swap(self, other: 'QBitArray') -> None: ... - def __hash__(self) -> int: ... - def at(self, i: int) -> bool: ... - def __getitem__(self, i: int) -> bool: ... - def toggleBit(self, i: int) -> bool: ... - def clearBit(self, i: int) -> None: ... - @typing.overload - def setBit(self, i: int) -> None: ... - @typing.overload - def setBit(self, i: int, val: bool) -> None: ... - def testBit(self, i: int) -> bool: ... - def truncate(self, pos: int) -> None: ... - @typing.overload - def fill(self, val: bool, first: int, last: int) -> None: ... - @typing.overload - def fill(self, value: bool, size: int = ...) -> bool: ... - def __invert__(self) -> 'QBitArray': ... - def clear(self) -> None: ... - def isDetached(self) -> bool: ... - def detach(self) -> None: ... - def resize(self, size: int) -> None: ... - def isNull(self) -> bool: ... - def isEmpty(self) -> bool: ... - def __len__(self) -> int: ... - @typing.overload - def count(self) -> int: ... - @typing.overload - def count(self, on: bool) -> int: ... - def size(self) -> int: ... - - -class QIODevice(QObject): - - class OpenModeFlag(int): ... - NotOpen = ... # type: 'QIODevice.OpenModeFlag' - ReadOnly = ... # type: 'QIODevice.OpenModeFlag' - WriteOnly = ... # type: 'QIODevice.OpenModeFlag' - ReadWrite = ... # type: 'QIODevice.OpenModeFlag' - Append = ... # type: 'QIODevice.OpenModeFlag' - Truncate = ... # type: 'QIODevice.OpenModeFlag' - Text = ... # type: 'QIODevice.OpenModeFlag' - Unbuffered = ... # type: 'QIODevice.OpenModeFlag' - - class OpenMode(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QIODevice.OpenMode', 'QIODevice.OpenModeFlag']) -> None: ... - @typing.overload - def __init__(self, a0: 'QIODevice.OpenMode') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QIODevice.OpenMode': ... - def __int__(self) -> int: ... - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, parent: QObject) -> None: ... - - def channelBytesWritten(self, channel: int, bytes: int) -> None: ... - def channelReadyRead(self, channel: int) -> None: ... - def isTransactionStarted(self) -> bool: ... - def rollbackTransaction(self) -> None: ... - def commitTransaction(self) -> None: ... - def startTransaction(self) -> None: ... - def setCurrentWriteChannel(self, channel: int) -> None: ... - def currentWriteChannel(self) -> int: ... - def setCurrentReadChannel(self, channel: int) -> None: ... - def currentReadChannel(self) -> int: ... - def writeChannelCount(self) -> int: ... - def readChannelCount(self) -> int: ... - def setErrorString(self, errorString: str) -> None: ... - def setOpenMode(self, openMode: typing.Union['QIODevice.OpenMode', 'QIODevice.OpenModeFlag']) -> None: ... - def writeData(self, data: bytes) -> int: ... - def readLineData(self, maxlen: int) -> bytes: ... - def readData(self, maxlen: int) -> bytes: ... - def readChannelFinished(self) -> None: ... - def aboutToClose(self) -> None: ... - def bytesWritten(self, bytes: int) -> None: ... - def readyRead(self) -> None: ... - def errorString(self) -> str: ... - def getChar(self) -> typing.Tuple[bool, str]: ... - def putChar(self, c: str) -> bool: ... - def ungetChar(self, c: str) -> None: ... - def waitForBytesWritten(self, msecs: int) -> bool: ... - def waitForReadyRead(self, msecs: int) -> bool: ... - def write(self, data: typing.Union['QByteArray', bytes, bytearray]) -> int: ... - def peek(self, maxlen: int) -> 'QByteArray': ... - def canReadLine(self) -> bool: ... - def readLine(self, maxlen: int = ...) -> bytes: ... - def readAll(self) -> 'QByteArray': ... - def read(self, maxlen: int) -> bytes: ... - def bytesToWrite(self) -> int: ... - def bytesAvailable(self) -> int: ... - def reset(self) -> bool: ... - def atEnd(self) -> bool: ... - def seek(self, pos: int) -> bool: ... - def size(self) -> int: ... - def pos(self) -> int: ... - def close(self) -> None: ... - def open(self, mode: typing.Union['QIODevice.OpenMode', 'QIODevice.OpenModeFlag']) -> bool: ... - def isSequential(self) -> bool: ... - def isWritable(self) -> bool: ... - def isReadable(self) -> bool: ... - def isOpen(self) -> bool: ... - def isTextModeEnabled(self) -> bool: ... - def setTextModeEnabled(self, enabled: bool) -> None: ... - def openMode(self) -> 'QIODevice.OpenMode': ... - - -class QBuffer(QIODevice): - - @typing.overload - def __init__(self, parent: typing.Optional[QObject] = ...) -> None: ... - @typing.overload - def __init__(self, byteArray: typing.Union['QByteArray', bytes, bytearray], parent: typing.Optional[QObject] = ...) -> None: ... - - def disconnectNotify(self, a0: 'QMetaMethod') -> None: ... - def connectNotify(self, a0: 'QMetaMethod') -> None: ... - def writeData(self, data: bytes) -> int: ... - def readData(self, maxlen: int) -> bytes: ... - def canReadLine(self) -> bool: ... - def atEnd(self) -> bool: ... - def seek(self, off: int) -> bool: ... - def pos(self) -> int: ... - def size(self) -> int: ... - def close(self) -> None: ... - def open(self, openMode: typing.Union[QIODevice.OpenMode, QIODevice.OpenModeFlag]) -> bool: ... - @typing.overload - def setData(self, data: typing.Union['QByteArray', bytes, bytearray]) -> None: ... - @typing.overload - def setData(self, adata: bytes) -> None: ... - def setBuffer(self, a: typing.Union['QByteArray', bytes, bytearray]) -> None: ... - def data(self) -> 'QByteArray': ... - def buffer(self) -> 'QByteArray': ... - - -class QByteArray(sip.simplewrapper): - - class Base64Option(int): ... - Base64Encoding = ... # type: 'QByteArray.Base64Option' - Base64UrlEncoding = ... # type: 'QByteArray.Base64Option' - KeepTrailingEquals = ... # type: 'QByteArray.Base64Option' - OmitTrailingEquals = ... # type: 'QByteArray.Base64Option' - - class Base64Options(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QByteArray.Base64Options', 'QByteArray.Base64Option']) -> None: ... - @typing.overload - def __init__(self, a0: 'QByteArray.Base64Options') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QByteArray.Base64Options': ... - def __int__(self) -> int: ... - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, size: int, c: str) -> None: ... - @typing.overload - def __init__(self, a: typing.Union['QByteArray', bytes, bytearray]) -> None: ... - - def swap(self, other: 'QByteArray') -> None: ... - def repeated(self, times: int) -> 'QByteArray': ... - @staticmethod - def fromPercentEncoding(input: typing.Union['QByteArray', bytes, bytearray], percent: str = ...) -> 'QByteArray': ... - def toPercentEncoding(self, exclude: typing.Union['QByteArray', bytes, bytearray] = ..., include: typing.Union['QByteArray', bytes, bytearray] = ..., percent: str = ...) -> 'QByteArray': ... - def toHex(self) -> 'QByteArray': ... - def contains(self, a: typing.Union['QByteArray', bytes, bytearray]) -> bool: ... - def push_front(self, a: typing.Union['QByteArray', bytes, bytearray]) -> None: ... - def push_back(self, a: typing.Union['QByteArray', bytes, bytearray]) -> None: ... - def squeeze(self) -> None: ... - def reserve(self, size: int) -> None: ... - def capacity(self) -> int: ... - def data(self) -> bytes: ... - def isEmpty(self) -> bool: ... - def __repr__(self) -> str: ... - def __str__(self) -> str: ... - def __hash__(self) -> int: ... - def __contains__(self, a: typing.Union['QByteArray', bytes, bytearray]) -> int: ... - @typing.overload - def __getitem__(self, i: int) -> str: ... - @typing.overload - def __getitem__(self, slice: slice) -> 'QByteArray': ... - def at(self, i: int) -> str: ... - def size(self) -> int: ... - def isNull(self) -> bool: ... - def length(self) -> int: ... - def __len__(self) -> int: ... - @staticmethod - def fromHex(hexEncoded: typing.Union['QByteArray', bytes, bytearray]) -> 'QByteArray': ... - @staticmethod - def fromRawData(a0: bytes) -> 'QByteArray': ... - @typing.overload - @staticmethod - def fromBase64(base64: typing.Union['QByteArray', bytes, bytearray]) -> 'QByteArray': ... - @typing.overload - @staticmethod - def fromBase64(base64: typing.Union['QByteArray', bytes, bytearray], options: typing.Union['QByteArray.Base64Options', 'QByteArray.Base64Option']) -> 'QByteArray': ... - @typing.overload - @staticmethod - def number(n: int, base: int = ...) -> 'QByteArray': ... - @typing.overload - @staticmethod - def number(n: float, format: str = ..., precision: int = ...) -> 'QByteArray': ... - @typing.overload - @staticmethod - def number(n: int, base: int = ...) -> 'QByteArray': ... - @typing.overload - @staticmethod - def number(n: int, base: int = ...) -> 'QByteArray': ... - @typing.overload - def setNum(self, n: int, base: int = ...) -> 'QByteArray': ... - @typing.overload - def setNum(self, n: float, format: str = ..., precision: int = ...) -> 'QByteArray': ... - @typing.overload - def setNum(self, n: int, base: int = ...) -> 'QByteArray': ... - @typing.overload - def setNum(self, n: int, base: int = ...) -> 'QByteArray': ... - @typing.overload - def toBase64(self) -> 'QByteArray': ... - @typing.overload - def toBase64(self, options: typing.Union['QByteArray.Base64Options', 'QByteArray.Base64Option']) -> 'QByteArray': ... - def toDouble(self) -> typing.Tuple[float, bool]: ... - def toFloat(self) -> typing.Tuple[float, bool]: ... - def toULongLong(self, base: int = ...) -> typing.Tuple[int, bool]: ... - def toLongLong(self, base: int = ...) -> typing.Tuple[int, bool]: ... - def toULong(self, base: int = ...) -> typing.Tuple[int, bool]: ... - def toLong(self, base: int = ...) -> typing.Tuple[int, bool]: ... - def toUInt(self, base: int = ...) -> typing.Tuple[int, bool]: ... - def toInt(self, base: int = ...) -> typing.Tuple[int, bool]: ... - def toUShort(self, base: int = ...) -> typing.Tuple[int, bool]: ... - def toShort(self, base: int = ...) -> typing.Tuple[int, bool]: ... - def split(self, sep: str) -> typing.List['QByteArray']: ... - @typing.overload - def replace(self, index: int, len: int, s: typing.Union['QByteArray', bytes, bytearray]) -> 'QByteArray': ... - @typing.overload - def replace(self, before: typing.Union['QByteArray', bytes, bytearray], after: typing.Union['QByteArray', bytes, bytearray]) -> 'QByteArray': ... - @typing.overload - def replace(self, before: str, after: typing.Union['QByteArray', bytes, bytearray]) -> 'QByteArray': ... - def remove(self, index: int, len: int) -> 'QByteArray': ... - @typing.overload - def insert(self, i: int, a: typing.Union['QByteArray', bytes, bytearray]) -> 'QByteArray': ... - @typing.overload - def insert(self, i: int, s: str) -> 'QByteArray': ... - @typing.overload - def insert(self, i: int, count: int, c: str) -> 'QByteArray': ... - @typing.overload - def append(self, a: typing.Union['QByteArray', bytes, bytearray]) -> 'QByteArray': ... - @typing.overload - def append(self, s: str) -> 'QByteArray': ... - @typing.overload - def append(self, count: int, c: str) -> 'QByteArray': ... - @typing.overload - def prepend(self, a: typing.Union['QByteArray', bytes, bytearray]) -> 'QByteArray': ... - @typing.overload - def prepend(self, count: int, c: str) -> 'QByteArray': ... - def rightJustified(self, width: int, fill: str = ..., truncate: bool = ...) -> 'QByteArray': ... - def leftJustified(self, width: int, fill: str = ..., truncate: bool = ...) -> 'QByteArray': ... - def simplified(self) -> 'QByteArray': ... - def trimmed(self) -> 'QByteArray': ... - def toUpper(self) -> 'QByteArray': ... - def toLower(self) -> 'QByteArray': ... - def chop(self, n: int) -> None: ... - def truncate(self, pos: int) -> None: ... - def endsWith(self, a: typing.Union['QByteArray', bytes, bytearray]) -> bool: ... - def startsWith(self, a: typing.Union['QByteArray', bytes, bytearray]) -> bool: ... - def mid(self, pos: int, length: int = ...) -> 'QByteArray': ... - def right(self, len: int) -> 'QByteArray': ... - def left(self, len: int) -> 'QByteArray': ... - @typing.overload - def count(self, a: typing.Union['QByteArray', bytes, bytearray]) -> int: ... - @typing.overload - def count(self) -> int: ... - @typing.overload - def lastIndexOf(self, ba: typing.Union['QByteArray', bytes, bytearray], from_: int = ...) -> int: ... - @typing.overload - def lastIndexOf(self, str: str, from_: int = ...) -> int: ... - @typing.overload - def indexOf(self, ba: typing.Union['QByteArray', bytes, bytearray], from_: int = ...) -> int: ... - @typing.overload - def indexOf(self, str: str, from_: int = ...) -> int: ... - def clear(self) -> None: ... - def fill(self, ch: str, size: int = ...) -> 'QByteArray': ... - def resize(self, size: int) -> None: ... - - -class QByteArrayMatcher(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, pattern: typing.Union[QByteArray, bytes, bytearray]) -> None: ... - @typing.overload - def __init__(self, other: 'QByteArrayMatcher') -> None: ... - - def pattern(self) -> QByteArray: ... - def indexIn(self, ba: typing.Union[QByteArray, bytes, bytearray], from_: int = ...) -> int: ... - def setPattern(self, pattern: typing.Union[QByteArray, bytes, bytearray]) -> None: ... - - -class QCollatorSortKey(sip.simplewrapper): - - def __init__(self, other: 'QCollatorSortKey') -> None: ... - - def compare(self, key: 'QCollatorSortKey') -> int: ... - def swap(self, other: 'QCollatorSortKey') -> None: ... - - -class QCollator(sip.simplewrapper): - - @typing.overload - def __init__(self, locale: 'QLocale' = ...) -> None: ... - @typing.overload - def __init__(self, a0: 'QCollator') -> None: ... - - def sortKey(self, string: str) -> QCollatorSortKey: ... - def compare(self, s1: str, s2: str) -> int: ... - def ignorePunctuation(self) -> bool: ... - def setIgnorePunctuation(self, on: bool) -> None: ... - def numericMode(self) -> bool: ... - def setNumericMode(self, on: bool) -> None: ... - def setCaseSensitivity(self, cs: Qt.CaseSensitivity) -> None: ... - def caseSensitivity(self) -> Qt.CaseSensitivity: ... - def locale(self) -> 'QLocale': ... - def setLocale(self, locale: 'QLocale') -> None: ... - def swap(self, other: 'QCollator') -> None: ... - - -class QCommandLineOption(sip.simplewrapper): - - @typing.overload - def __init__(self, name: str) -> None: ... - @typing.overload - def __init__(self, names: typing.Iterable[str]) -> None: ... - @typing.overload - def __init__(self, name: str, description: str, valueName: str = ..., defaultValue: str = ...) -> None: ... - @typing.overload - def __init__(self, names: typing.Iterable[str], description: str, valueName: str = ..., defaultValue: str = ...) -> None: ... - @typing.overload - def __init__(self, other: 'QCommandLineOption') -> None: ... - - def isHidden(self) -> bool: ... - def setHidden(self, hidden: bool) -> None: ... - def defaultValues(self) -> typing.List[str]: ... - def setDefaultValues(self, defaultValues: typing.Iterable[str]) -> None: ... - def setDefaultValue(self, defaultValue: str) -> None: ... - def description(self) -> str: ... - def setDescription(self, description: str) -> None: ... - def valueName(self) -> str: ... - def setValueName(self, name: str) -> None: ... - def names(self) -> typing.List[str]: ... - def swap(self, other: 'QCommandLineOption') -> None: ... - - -class QCommandLineParser(sip.simplewrapper): - - class OptionsAfterPositionalArgumentsMode(int): ... - ParseAsOptions = ... # type: 'QCommandLineParser.OptionsAfterPositionalArgumentsMode' - ParseAsPositionalArguments = ... # type: 'QCommandLineParser.OptionsAfterPositionalArgumentsMode' - - class SingleDashWordOptionMode(int): ... - ParseAsCompactedShortOptions = ... # type: 'QCommandLineParser.SingleDashWordOptionMode' - ParseAsLongOptions = ... # type: 'QCommandLineParser.SingleDashWordOptionMode' - - def __init__(self) -> None: ... - - def setOptionsAfterPositionalArgumentsMode(self, mode: 'QCommandLineParser.OptionsAfterPositionalArgumentsMode') -> None: ... - def showVersion(self) -> None: ... - def addOptions(self, options: typing.Any) -> bool: ... - def helpText(self) -> str: ... - def showHelp(self, exitCode: int = ...) -> None: ... - def unknownOptionNames(self) -> typing.List[str]: ... - def optionNames(self) -> typing.List[str]: ... - def positionalArguments(self) -> typing.List[str]: ... - @typing.overload - def values(self, name: str) -> typing.List[str]: ... - @typing.overload - def values(self, option: QCommandLineOption) -> typing.List[str]: ... - @typing.overload - def value(self, name: str) -> str: ... - @typing.overload - def value(self, option: QCommandLineOption) -> str: ... - @typing.overload - def isSet(self, name: str) -> bool: ... - @typing.overload - def isSet(self, option: QCommandLineOption) -> bool: ... - def errorText(self) -> str: ... - def parse(self, arguments: typing.Iterable[str]) -> bool: ... - @typing.overload - def process(self, arguments: typing.Iterable[str]) -> None: ... - @typing.overload - def process(self, app: 'QCoreApplication') -> None: ... - def clearPositionalArguments(self) -> None: ... - def addPositionalArgument(self, name: str, description: str, syntax: str = ...) -> None: ... - def applicationDescription(self) -> str: ... - def setApplicationDescription(self, description: str) -> None: ... - def addHelpOption(self) -> QCommandLineOption: ... - def addVersionOption(self) -> QCommandLineOption: ... - def addOption(self, commandLineOption: QCommandLineOption) -> bool: ... - def setSingleDashWordOptionMode(self, parsingMode: 'QCommandLineParser.SingleDashWordOptionMode') -> None: ... - - -class QCoreApplication(QObject): - - def __init__(self, argv: typing.List[str]) -> None: ... - - @staticmethod - def isSetuidAllowed() -> bool: ... - @staticmethod - def setSetuidAllowed(allow: bool) -> None: ... - def removeNativeEventFilter(self, filterObj: QAbstractNativeEventFilter) -> None: ... - def installNativeEventFilter(self, filterObj: QAbstractNativeEventFilter) -> None: ... - @staticmethod - def setQuitLockEnabled(enabled: bool) -> None: ... - @staticmethod - def isQuitLockEnabled() -> bool: ... - @staticmethod - def setEventDispatcher(eventDispatcher: QAbstractEventDispatcher) -> None: ... - @staticmethod - def eventDispatcher() -> QAbstractEventDispatcher: ... - @staticmethod - def applicationPid() -> int: ... - @staticmethod - def applicationVersion() -> str: ... - @staticmethod - def setApplicationVersion(version: str) -> None: ... - def event(self, a0: 'QEvent') -> bool: ... - def aboutToQuit(self) -> None: ... - @staticmethod - def quit() -> None: ... - @staticmethod - def testAttribute(attribute: Qt.ApplicationAttribute) -> bool: ... - @staticmethod - def setAttribute(attribute: Qt.ApplicationAttribute, on: bool = ...) -> None: ... - @staticmethod - def flush() -> None: ... - @staticmethod - def translate(context: str, sourceText: str, disambiguation: typing.Optional[str] = ..., n: int = ...) -> str: ... - @staticmethod - def removeTranslator(messageFile: 'QTranslator') -> bool: ... - @staticmethod - def installTranslator(messageFile: 'QTranslator') -> bool: ... - @staticmethod - def removeLibraryPath(a0: str) -> None: ... - @staticmethod - def addLibraryPath(a0: str) -> None: ... - @staticmethod - def libraryPaths() -> typing.List[str]: ... - @staticmethod - def setLibraryPaths(a0: typing.Iterable[str]) -> None: ... - @staticmethod - def applicationFilePath() -> str: ... - @staticmethod - def applicationDirPath() -> str: ... - @staticmethod - def closingDown() -> bool: ... - @staticmethod - def startingUp() -> bool: ... - def notify(self, a0: QObject, a1: 'QEvent') -> bool: ... - @staticmethod - def hasPendingEvents() -> bool: ... - @staticmethod - def removePostedEvents(receiver: QObject, eventType: int = ...) -> None: ... - @staticmethod - def sendPostedEvents(receiver: typing.Optional[QObject] = ..., eventType: int = ...) -> None: ... - @staticmethod - def postEvent(receiver: QObject, event: 'QEvent', priority: int = ...) -> None: ... - @staticmethod - def sendEvent(receiver: QObject, event: 'QEvent') -> bool: ... - @staticmethod - def exit(returnCode: int = ...) -> None: ... - @typing.overload - @staticmethod - def processEvents(flags: typing.Union['QEventLoop.ProcessEventsFlags', 'QEventLoop.ProcessEventsFlag'] = ...) -> None: ... - @typing.overload - @staticmethod - def processEvents(flags: typing.Union['QEventLoop.ProcessEventsFlags', 'QEventLoop.ProcessEventsFlag'], maxtime: int) -> None: ... - @staticmethod - def exec() -> int: ... - @staticmethod - def exec_() -> int: ... - @staticmethod - def instance() -> 'QCoreApplication': ... - @staticmethod - def arguments() -> typing.List[str]: ... - @staticmethod - def applicationName() -> str: ... - @staticmethod - def setApplicationName(application: str) -> None: ... - @staticmethod - def organizationName() -> str: ... - @staticmethod - def setOrganizationName(orgName: str) -> None: ... - @staticmethod - def organizationDomain() -> str: ... - @staticmethod - def setOrganizationDomain(orgDomain: str) -> None: ... - - -class QEvent(sip.wrapper): - - class Type(int): ... - None_ = ... # type: 'QEvent.Type' - Timer = ... # type: 'QEvent.Type' - MouseButtonPress = ... # type: 'QEvent.Type' - MouseButtonRelease = ... # type: 'QEvent.Type' - MouseButtonDblClick = ... # type: 'QEvent.Type' - MouseMove = ... # type: 'QEvent.Type' - KeyPress = ... # type: 'QEvent.Type' - KeyRelease = ... # type: 'QEvent.Type' - FocusIn = ... # type: 'QEvent.Type' - FocusOut = ... # type: 'QEvent.Type' - Enter = ... # type: 'QEvent.Type' - Leave = ... # type: 'QEvent.Type' - Paint = ... # type: 'QEvent.Type' - Move = ... # type: 'QEvent.Type' - Resize = ... # type: 'QEvent.Type' - Show = ... # type: 'QEvent.Type' - Hide = ... # type: 'QEvent.Type' - Close = ... # type: 'QEvent.Type' - ParentChange = ... # type: 'QEvent.Type' - ParentAboutToChange = ... # type: 'QEvent.Type' - ThreadChange = ... # type: 'QEvent.Type' - WindowActivate = ... # type: 'QEvent.Type' - WindowDeactivate = ... # type: 'QEvent.Type' - ShowToParent = ... # type: 'QEvent.Type' - HideToParent = ... # type: 'QEvent.Type' - Wheel = ... # type: 'QEvent.Type' - WindowTitleChange = ... # type: 'QEvent.Type' - WindowIconChange = ... # type: 'QEvent.Type' - ApplicationWindowIconChange = ... # type: 'QEvent.Type' - ApplicationFontChange = ... # type: 'QEvent.Type' - ApplicationLayoutDirectionChange = ... # type: 'QEvent.Type' - ApplicationPaletteChange = ... # type: 'QEvent.Type' - PaletteChange = ... # type: 'QEvent.Type' - Clipboard = ... # type: 'QEvent.Type' - MetaCall = ... # type: 'QEvent.Type' - SockAct = ... # type: 'QEvent.Type' - WinEventAct = ... # type: 'QEvent.Type' - DeferredDelete = ... # type: 'QEvent.Type' - DragEnter = ... # type: 'QEvent.Type' - DragMove = ... # type: 'QEvent.Type' - DragLeave = ... # type: 'QEvent.Type' - Drop = ... # type: 'QEvent.Type' - ChildAdded = ... # type: 'QEvent.Type' - ChildPolished = ... # type: 'QEvent.Type' - ChildRemoved = ... # type: 'QEvent.Type' - PolishRequest = ... # type: 'QEvent.Type' - Polish = ... # type: 'QEvent.Type' - LayoutRequest = ... # type: 'QEvent.Type' - UpdateRequest = ... # type: 'QEvent.Type' - UpdateLater = ... # type: 'QEvent.Type' - ContextMenu = ... # type: 'QEvent.Type' - InputMethod = ... # type: 'QEvent.Type' - TabletMove = ... # type: 'QEvent.Type' - LocaleChange = ... # type: 'QEvent.Type' - LanguageChange = ... # type: 'QEvent.Type' - LayoutDirectionChange = ... # type: 'QEvent.Type' - TabletPress = ... # type: 'QEvent.Type' - TabletRelease = ... # type: 'QEvent.Type' - OkRequest = ... # type: 'QEvent.Type' - IconDrag = ... # type: 'QEvent.Type' - FontChange = ... # type: 'QEvent.Type' - EnabledChange = ... # type: 'QEvent.Type' - ActivationChange = ... # type: 'QEvent.Type' - StyleChange = ... # type: 'QEvent.Type' - IconTextChange = ... # type: 'QEvent.Type' - ModifiedChange = ... # type: 'QEvent.Type' - MouseTrackingChange = ... # type: 'QEvent.Type' - WindowBlocked = ... # type: 'QEvent.Type' - WindowUnblocked = ... # type: 'QEvent.Type' - WindowStateChange = ... # type: 'QEvent.Type' - ToolTip = ... # type: 'QEvent.Type' - WhatsThis = ... # type: 'QEvent.Type' - StatusTip = ... # type: 'QEvent.Type' - ActionChanged = ... # type: 'QEvent.Type' - ActionAdded = ... # type: 'QEvent.Type' - ActionRemoved = ... # type: 'QEvent.Type' - FileOpen = ... # type: 'QEvent.Type' - Shortcut = ... # type: 'QEvent.Type' - ShortcutOverride = ... # type: 'QEvent.Type' - WhatsThisClicked = ... # type: 'QEvent.Type' - ToolBarChange = ... # type: 'QEvent.Type' - ApplicationActivate = ... # type: 'QEvent.Type' - ApplicationActivated = ... # type: 'QEvent.Type' - ApplicationDeactivate = ... # type: 'QEvent.Type' - ApplicationDeactivated = ... # type: 'QEvent.Type' - QueryWhatsThis = ... # type: 'QEvent.Type' - EnterWhatsThisMode = ... # type: 'QEvent.Type' - LeaveWhatsThisMode = ... # type: 'QEvent.Type' - ZOrderChange = ... # type: 'QEvent.Type' - HoverEnter = ... # type: 'QEvent.Type' - HoverLeave = ... # type: 'QEvent.Type' - HoverMove = ... # type: 'QEvent.Type' - GraphicsSceneMouseMove = ... # type: 'QEvent.Type' - GraphicsSceneMousePress = ... # type: 'QEvent.Type' - GraphicsSceneMouseRelease = ... # type: 'QEvent.Type' - GraphicsSceneMouseDoubleClick = ... # type: 'QEvent.Type' - GraphicsSceneContextMenu = ... # type: 'QEvent.Type' - GraphicsSceneHoverEnter = ... # type: 'QEvent.Type' - GraphicsSceneHoverMove = ... # type: 'QEvent.Type' - GraphicsSceneHoverLeave = ... # type: 'QEvent.Type' - GraphicsSceneHelp = ... # type: 'QEvent.Type' - GraphicsSceneDragEnter = ... # type: 'QEvent.Type' - GraphicsSceneDragMove = ... # type: 'QEvent.Type' - GraphicsSceneDragLeave = ... # type: 'QEvent.Type' - GraphicsSceneDrop = ... # type: 'QEvent.Type' - GraphicsSceneWheel = ... # type: 'QEvent.Type' - GraphicsSceneResize = ... # type: 'QEvent.Type' - GraphicsSceneMove = ... # type: 'QEvent.Type' - KeyboardLayoutChange = ... # type: 'QEvent.Type' - DynamicPropertyChange = ... # type: 'QEvent.Type' - TabletEnterProximity = ... # type: 'QEvent.Type' - TabletLeaveProximity = ... # type: 'QEvent.Type' - NonClientAreaMouseMove = ... # type: 'QEvent.Type' - NonClientAreaMouseButtonPress = ... # type: 'QEvent.Type' - NonClientAreaMouseButtonRelease = ... # type: 'QEvent.Type' - NonClientAreaMouseButtonDblClick = ... # type: 'QEvent.Type' - MacSizeChange = ... # type: 'QEvent.Type' - ContentsRectChange = ... # type: 'QEvent.Type' - CursorChange = ... # type: 'QEvent.Type' - ToolTipChange = ... # type: 'QEvent.Type' - GrabMouse = ... # type: 'QEvent.Type' - UngrabMouse = ... # type: 'QEvent.Type' - GrabKeyboard = ... # type: 'QEvent.Type' - UngrabKeyboard = ... # type: 'QEvent.Type' - StateMachineSignal = ... # type: 'QEvent.Type' - StateMachineWrapped = ... # type: 'QEvent.Type' - TouchBegin = ... # type: 'QEvent.Type' - TouchUpdate = ... # type: 'QEvent.Type' - TouchEnd = ... # type: 'QEvent.Type' - RequestSoftwareInputPanel = ... # type: 'QEvent.Type' - CloseSoftwareInputPanel = ... # type: 'QEvent.Type' - WinIdChange = ... # type: 'QEvent.Type' - Gesture = ... # type: 'QEvent.Type' - GestureOverride = ... # type: 'QEvent.Type' - FocusAboutToChange = ... # type: 'QEvent.Type' - ScrollPrepare = ... # type: 'QEvent.Type' - Scroll = ... # type: 'QEvent.Type' - Expose = ... # type: 'QEvent.Type' - InputMethodQuery = ... # type: 'QEvent.Type' - OrientationChange = ... # type: 'QEvent.Type' - TouchCancel = ... # type: 'QEvent.Type' - PlatformPanel = ... # type: 'QEvent.Type' - ApplicationStateChange = ... # type: 'QEvent.Type' - ReadOnlyChange = ... # type: 'QEvent.Type' - PlatformSurface = ... # type: 'QEvent.Type' - User = ... # type: 'QEvent.Type' - MaxUser = ... # type: 'QEvent.Type' - - @typing.overload - def __init__(self, type: 'QEvent.Type') -> None: ... - @typing.overload - def __init__(self, other: 'QEvent') -> None: ... - - @staticmethod - def registerEventType(hint: int = ...) -> int: ... - def ignore(self) -> None: ... - def accept(self) -> None: ... - def isAccepted(self) -> bool: ... - def setAccepted(self, accepted: bool) -> None: ... - def spontaneous(self) -> bool: ... - def type(self) -> 'QEvent.Type': ... - - -class QTimerEvent(QEvent): - - @typing.overload - def __init__(self, timerId: int) -> None: ... - @typing.overload - def __init__(self, a0: 'QTimerEvent') -> None: ... - - def timerId(self) -> int: ... - - -class QChildEvent(QEvent): - - @typing.overload - def __init__(self, type: QEvent.Type, child: QObject) -> None: ... - @typing.overload - def __init__(self, a0: 'QChildEvent') -> None: ... - - def removed(self) -> bool: ... - def polished(self) -> bool: ... - def added(self) -> bool: ... - def child(self) -> QObject: ... - - -class QDynamicPropertyChangeEvent(QEvent): - - @typing.overload - def __init__(self, name: typing.Union[QByteArray, bytes, bytearray]) -> None: ... - @typing.overload - def __init__(self, a0: 'QDynamicPropertyChangeEvent') -> None: ... - - def propertyName(self) -> QByteArray: ... - - -class QCryptographicHash(sip.simplewrapper): - - class Algorithm(int): ... - Md4 = ... # type: 'QCryptographicHash.Algorithm' - Md5 = ... # type: 'QCryptographicHash.Algorithm' - Sha1 = ... # type: 'QCryptographicHash.Algorithm' - Sha224 = ... # type: 'QCryptographicHash.Algorithm' - Sha256 = ... # type: 'QCryptographicHash.Algorithm' - Sha384 = ... # type: 'QCryptographicHash.Algorithm' - Sha512 = ... # type: 'QCryptographicHash.Algorithm' - Sha3_224 = ... # type: 'QCryptographicHash.Algorithm' - Sha3_256 = ... # type: 'QCryptographicHash.Algorithm' - Sha3_384 = ... # type: 'QCryptographicHash.Algorithm' - Sha3_512 = ... # type: 'QCryptographicHash.Algorithm' - - def __init__(self, method: 'QCryptographicHash.Algorithm') -> None: ... - - @staticmethod - def hash(data: typing.Union[QByteArray, bytes, bytearray], method: 'QCryptographicHash.Algorithm') -> QByteArray: ... - def result(self) -> QByteArray: ... - @typing.overload - def addData(self, data: bytes) -> None: ... - @typing.overload - def addData(self, data: typing.Union[QByteArray, bytes, bytearray]) -> None: ... - @typing.overload - def addData(self, device: QIODevice) -> bool: ... - def reset(self) -> None: ... - - -class QDataStream(sip.simplewrapper): - - class FloatingPointPrecision(int): ... - SinglePrecision = ... # type: 'QDataStream.FloatingPointPrecision' - DoublePrecision = ... # type: 'QDataStream.FloatingPointPrecision' - - class Status(int): ... - Ok = ... # type: 'QDataStream.Status' - ReadPastEnd = ... # type: 'QDataStream.Status' - ReadCorruptData = ... # type: 'QDataStream.Status' - WriteFailed = ... # type: 'QDataStream.Status' - - class ByteOrder(int): ... - BigEndian = ... # type: 'QDataStream.ByteOrder' - LittleEndian = ... # type: 'QDataStream.ByteOrder' - - class Version(int): ... - Qt_1_0 = ... # type: 'QDataStream.Version' - Qt_2_0 = ... # type: 'QDataStream.Version' - Qt_2_1 = ... # type: 'QDataStream.Version' - Qt_3_0 = ... # type: 'QDataStream.Version' - Qt_3_1 = ... # type: 'QDataStream.Version' - Qt_3_3 = ... # type: 'QDataStream.Version' - Qt_4_0 = ... # type: 'QDataStream.Version' - Qt_4_1 = ... # type: 'QDataStream.Version' - Qt_4_2 = ... # type: 'QDataStream.Version' - Qt_4_3 = ... # type: 'QDataStream.Version' - Qt_4_4 = ... # type: 'QDataStream.Version' - Qt_4_5 = ... # type: 'QDataStream.Version' - Qt_4_6 = ... # type: 'QDataStream.Version' - Qt_4_7 = ... # type: 'QDataStream.Version' - Qt_4_8 = ... # type: 'QDataStream.Version' - Qt_4_9 = ... # type: 'QDataStream.Version' - Qt_5_0 = ... # type: 'QDataStream.Version' - Qt_5_1 = ... # type: 'QDataStream.Version' - Qt_5_2 = ... # type: 'QDataStream.Version' - Qt_5_3 = ... # type: 'QDataStream.Version' - Qt_5_4 = ... # type: 'QDataStream.Version' - Qt_5_5 = ... # type: 'QDataStream.Version' - Qt_5_6 = ... # type: 'QDataStream.Version' - Qt_5_7 = ... # type: 'QDataStream.Version' - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: QIODevice) -> None: ... - @typing.overload - def __init__(self, a0: QByteArray, flags: typing.Union[QIODevice.OpenMode, QIODevice.OpenModeFlag]) -> None: ... - @typing.overload - def __init__(self, a0: QByteArray) -> None: ... - - def abortTransaction(self) -> None: ... - def rollbackTransaction(self) -> None: ... - def commitTransaction(self) -> bool: ... - def startTransaction(self) -> None: ... - def setFloatingPointPrecision(self, precision: 'QDataStream.FloatingPointPrecision') -> None: ... - def floatingPointPrecision(self) -> 'QDataStream.FloatingPointPrecision': ... - def writeRawData(self, a0: bytes) -> int: ... - def writeBytes(self, a0: bytes) -> 'QDataStream': ... - def readRawData(self, len: int) -> bytes: ... - def readBytes(self) -> bytes: ... - def writeQVariantHash(self, qvarhash: typing.Dict[str, typing.Any]) -> None: ... - def readQVariantHash(self) -> typing.Dict[str, typing.Any]: ... - def writeQVariantMap(self, qvarmap: typing.Dict[str, typing.Any]) -> None: ... - def readQVariantMap(self) -> typing.Dict[str, typing.Any]: ... - def writeQVariantList(self, qvarlst: typing.List[typing.Any]) -> None: ... - def readQVariantList(self) -> typing.List[typing.Any]: ... - def writeQVariant(self, qvar: typing.Any) -> None: ... - def readQVariant(self) -> typing.Any: ... - def writeQStringList(self, qstrlst: typing.Iterable[str]) -> None: ... - def readQStringList(self) -> typing.List[str]: ... - def writeQString(self, qstr: str) -> None: ... - def readQString(self) -> str: ... - def writeString(self, str: str) -> None: ... - def writeDouble(self, f: float) -> None: ... - def writeFloat(self, f: float) -> None: ... - def writeBool(self, i: bool) -> None: ... - def writeUInt64(self, i: int) -> None: ... - def writeInt64(self, i: int) -> None: ... - def writeUInt32(self, i: int) -> None: ... - def writeInt32(self, i: int) -> None: ... - def writeUInt16(self, i: int) -> None: ... - def writeInt16(self, i: int) -> None: ... - def writeUInt8(self, i: int) -> None: ... - def writeInt8(self, i: int) -> None: ... - def writeInt(self, i: int) -> None: ... - def readString(self) -> bytes: ... - def readDouble(self) -> float: ... - def readFloat(self) -> float: ... - def readBool(self) -> bool: ... - def readUInt64(self) -> int: ... - def readInt64(self) -> int: ... - def readUInt32(self) -> int: ... - def readInt32(self) -> int: ... - def readUInt16(self) -> int: ... - def readInt16(self) -> int: ... - def readUInt8(self) -> int: ... - def readInt8(self) -> int: ... - def readInt(self) -> int: ... - def skipRawData(self, len: int) -> int: ... - def setVersion(self, v: int) -> None: ... - def version(self) -> int: ... - def setByteOrder(self, a0: 'QDataStream.ByteOrder') -> None: ... - def byteOrder(self) -> 'QDataStream.ByteOrder': ... - def resetStatus(self) -> None: ... - def setStatus(self, status: 'QDataStream.Status') -> None: ... - def status(self) -> 'QDataStream.Status': ... - def atEnd(self) -> bool: ... - def setDevice(self, a0: QIODevice) -> None: ... - def device(self) -> QIODevice: ... - - -class QDate(sip.simplewrapper): - - class MonthNameType(int): ... - DateFormat = ... # type: 'QDate.MonthNameType' - StandaloneFormat = ... # type: 'QDate.MonthNameType' - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, y: int, m: int, d: int) -> None: ... - @typing.overload - def __init__(self, a0: 'QDate') -> None: ... - - def getDate(self) -> typing.Tuple[int, int, int]: ... - def setDate(self, year: int, month: int, date: int) -> bool: ... - def toJulianDay(self) -> int: ... - @staticmethod - def fromJulianDay(jd: int) -> 'QDate': ... - @staticmethod - def isLeapYear(year: int) -> bool: ... - @typing.overload - @staticmethod - def fromString(string: str, format: Qt.DateFormat = ...) -> 'QDate': ... - @typing.overload - @staticmethod - def fromString(s: str, format: str) -> 'QDate': ... - @staticmethod - def currentDate() -> 'QDate': ... - def daysTo(self, a0: typing.Union['QDate', datetime.date]) -> int: ... - def addYears(self, years: int) -> 'QDate': ... - def addMonths(self, months: int) -> 'QDate': ... - def addDays(self, days: int) -> 'QDate': ... - @typing.overload - def toString(self, format: Qt.DateFormat = ...) -> str: ... - @typing.overload - def toString(self, format: str) -> str: ... - @staticmethod - def longDayName(weekday: int, type: 'QDate.MonthNameType' = ...) -> str: ... - @staticmethod - def longMonthName(month: int, type: 'QDate.MonthNameType' = ...) -> str: ... - @staticmethod - def shortDayName(weekday: int, type: 'QDate.MonthNameType' = ...) -> str: ... - @staticmethod - def shortMonthName(month: int, type: 'QDate.MonthNameType' = ...) -> str: ... - def weekNumber(self) -> typing.Tuple[int, int]: ... - def daysInYear(self) -> int: ... - def daysInMonth(self) -> int: ... - def dayOfYear(self) -> int: ... - def dayOfWeek(self) -> int: ... - def day(self) -> int: ... - def month(self) -> int: ... - def year(self) -> int: ... - @typing.overload - def isValid(self) -> bool: ... - @typing.overload - @staticmethod - def isValid(y: int, m: int, d: int) -> bool: ... - def __bool__(self) -> int: ... - def isNull(self) -> bool: ... - def toPyDate(self) -> datetime.date: ... - def __hash__(self) -> int: ... - def __repr__(self) -> str: ... - - -class QTime(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, h: int, m: int, second: int = ..., msec: int = ...) -> None: ... - @typing.overload - def __init__(self, a0: 'QTime') -> None: ... - - def msecsSinceStartOfDay(self) -> int: ... - @staticmethod - def fromMSecsSinceStartOfDay(msecs: int) -> 'QTime': ... - def elapsed(self) -> int: ... - def restart(self) -> int: ... - def start(self) -> None: ... - @typing.overload - @staticmethod - def fromString(string: str, format: Qt.DateFormat = ...) -> 'QTime': ... - @typing.overload - @staticmethod - def fromString(s: str, format: str) -> 'QTime': ... - @staticmethod - def currentTime() -> 'QTime': ... - def msecsTo(self, a0: typing.Union['QTime', datetime.time]) -> int: ... - def addMSecs(self, ms: int) -> 'QTime': ... - def secsTo(self, a0: typing.Union['QTime', datetime.time]) -> int: ... - def addSecs(self, secs: int) -> 'QTime': ... - def setHMS(self, h: int, m: int, s: int, msec: int = ...) -> bool: ... - @typing.overload - def toString(self, format: Qt.DateFormat = ...) -> str: ... - @typing.overload - def toString(self, format: str) -> str: ... - def msec(self) -> int: ... - def second(self) -> int: ... - def minute(self) -> int: ... - def hour(self) -> int: ... - @typing.overload - def isValid(self) -> bool: ... - @typing.overload - @staticmethod - def isValid(h: int, m: int, s: int, msec: int = ...) -> bool: ... - def __bool__(self) -> int: ... - def isNull(self) -> bool: ... - def toPyTime(self) -> datetime.time: ... - def __hash__(self) -> int: ... - def __repr__(self) -> str: ... - - -class QDateTime(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, other: typing.Union['QDateTime', datetime.datetime]) -> None: ... - @typing.overload - def __init__(self, a0: typing.Union[QDate, datetime.date]) -> None: ... - @typing.overload - def __init__(self, date: typing.Union[QDate, datetime.date], time: typing.Union[QTime, datetime.time], timeSpec: Qt.TimeSpec = ...) -> None: ... - @typing.overload - def __init__(self, year: int, month: int, day: int, hour: int, minute: int, second: int = ..., msec: int = ..., timeSpec: int = ...) -> None: ... - @typing.overload - def __init__(self, date: typing.Union[QDate, datetime.date], time: typing.Union[QTime, datetime.time], spec: Qt.TimeSpec, offsetSeconds: int) -> None: ... - @typing.overload - def __init__(self, date: typing.Union[QDate, datetime.date], time: typing.Union[QTime, datetime.time], timeZone: 'QTimeZone') -> None: ... - - def toTimeZone(self, toZone: 'QTimeZone') -> 'QDateTime': ... - def toOffsetFromUtc(self, offsetSeconds: int) -> 'QDateTime': ... - def setTimeZone(self, toZone: 'QTimeZone') -> None: ... - def setOffsetFromUtc(self, offsetSeconds: int) -> None: ... - def isDaylightTime(self) -> bool: ... - def timeZoneAbbreviation(self) -> str: ... - def timeZone(self) -> 'QTimeZone': ... - def offsetFromUtc(self) -> int: ... - def swap(self, other: 'QDateTime') -> None: ... - @staticmethod - def currentMSecsSinceEpoch() -> int: ... - @typing.overload - @staticmethod - def fromMSecsSinceEpoch(msecs: int) -> 'QDateTime': ... - @typing.overload - @staticmethod - def fromMSecsSinceEpoch(msecs: int, spec: Qt.TimeSpec, offsetSeconds: int = ...) -> 'QDateTime': ... - @typing.overload - @staticmethod - def fromMSecsSinceEpoch(msecs: int, timeZone: 'QTimeZone') -> 'QDateTime': ... - @staticmethod - def currentDateTimeUtc() -> 'QDateTime': ... - def msecsTo(self, a0: typing.Union['QDateTime', datetime.datetime]) -> int: ... - def setMSecsSinceEpoch(self, msecs: int) -> None: ... - def toMSecsSinceEpoch(self) -> int: ... - @typing.overload - @staticmethod - def fromTime_t(secsSince1Jan1970UTC: int) -> 'QDateTime': ... - @typing.overload - @staticmethod - def fromTime_t(secsSince1Jan1970UTC: int, spec: Qt.TimeSpec, offsetSeconds: int = ...) -> 'QDateTime': ... - @typing.overload - @staticmethod - def fromTime_t(secsSince1Jan1970UTC: int, timeZone: 'QTimeZone') -> 'QDateTime': ... - @typing.overload - @staticmethod - def fromString(string: str, format: Qt.DateFormat = ...) -> 'QDateTime': ... - @typing.overload - @staticmethod - def fromString(s: str, format: str) -> 'QDateTime': ... - @staticmethod - def currentDateTime() -> 'QDateTime': ... - def secsTo(self, a0: typing.Union['QDateTime', datetime.datetime]) -> int: ... - def daysTo(self, a0: typing.Union['QDateTime', datetime.datetime]) -> int: ... - def toUTC(self) -> 'QDateTime': ... - def toLocalTime(self) -> 'QDateTime': ... - def toTimeSpec(self, spec: Qt.TimeSpec) -> 'QDateTime': ... - def addMSecs(self, msecs: int) -> 'QDateTime': ... - def addSecs(self, secs: int) -> 'QDateTime': ... - def addYears(self, years: int) -> 'QDateTime': ... - def addMonths(self, months: int) -> 'QDateTime': ... - def addDays(self, days: int) -> 'QDateTime': ... - @typing.overload - def toString(self, format: Qt.DateFormat = ...) -> str: ... - @typing.overload - def toString(self, format: str) -> str: ... - def setTime_t(self, secsSince1Jan1970UTC: int) -> None: ... - def setTimeSpec(self, spec: Qt.TimeSpec) -> None: ... - def setTime(self, time: typing.Union[QTime, datetime.time]) -> None: ... - def setDate(self, date: typing.Union[QDate, datetime.date]) -> None: ... - def toTime_t(self) -> int: ... - def timeSpec(self) -> Qt.TimeSpec: ... - def time(self) -> QTime: ... - def date(self) -> QDate: ... - def isValid(self) -> bool: ... - def __bool__(self) -> int: ... - def isNull(self) -> bool: ... - def toPyDateTime(self) -> datetime.datetime: ... - def __hash__(self) -> int: ... - def __repr__(self) -> str: ... - - -class QDir(sip.simplewrapper): - - class SortFlag(int): ... - Name = ... # type: 'QDir.SortFlag' - Time = ... # type: 'QDir.SortFlag' - Size = ... # type: 'QDir.SortFlag' - Unsorted = ... # type: 'QDir.SortFlag' - SortByMask = ... # type: 'QDir.SortFlag' - DirsFirst = ... # type: 'QDir.SortFlag' - Reversed = ... # type: 'QDir.SortFlag' - IgnoreCase = ... # type: 'QDir.SortFlag' - DirsLast = ... # type: 'QDir.SortFlag' - LocaleAware = ... # type: 'QDir.SortFlag' - Type = ... # type: 'QDir.SortFlag' - NoSort = ... # type: 'QDir.SortFlag' - - class Filter(int): ... - Dirs = ... # type: 'QDir.Filter' - Files = ... # type: 'QDir.Filter' - Drives = ... # type: 'QDir.Filter' - NoSymLinks = ... # type: 'QDir.Filter' - AllEntries = ... # type: 'QDir.Filter' - TypeMask = ... # type: 'QDir.Filter' - Readable = ... # type: 'QDir.Filter' - Writable = ... # type: 'QDir.Filter' - Executable = ... # type: 'QDir.Filter' - PermissionMask = ... # type: 'QDir.Filter' - Modified = ... # type: 'QDir.Filter' - Hidden = ... # type: 'QDir.Filter' - System = ... # type: 'QDir.Filter' - AccessMask = ... # type: 'QDir.Filter' - AllDirs = ... # type: 'QDir.Filter' - CaseSensitive = ... # type: 'QDir.Filter' - NoDotAndDotDot = ... # type: 'QDir.Filter' - NoFilter = ... # type: 'QDir.Filter' - NoDot = ... # type: 'QDir.Filter' - NoDotDot = ... # type: 'QDir.Filter' - - class Filters(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QDir.Filters', 'QDir.Filter']) -> None: ... - @typing.overload - def __init__(self, a0: 'QDir.Filters') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QDir.Filters': ... - def __int__(self) -> int: ... - - class SortFlags(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QDir.SortFlags', 'QDir.SortFlag']) -> None: ... - @typing.overload - def __init__(self, a0: 'QDir.SortFlags') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QDir.SortFlags': ... - def __int__(self) -> int: ... - - @typing.overload - def __init__(self, a0: 'QDir') -> None: ... - @typing.overload - def __init__(self, path: str = ...) -> None: ... - @typing.overload - def __init__(self, path: str, nameFilter: str, sort: 'QDir.SortFlags' = ..., filters: 'QDir.Filters' = ...) -> None: ... - - @staticmethod - def listSeparator() -> str: ... - def swap(self, other: 'QDir') -> None: ... - def removeRecursively(self) -> bool: ... - @staticmethod - def searchPaths(prefix: str) -> typing.List[str]: ... - @staticmethod - def addSearchPath(prefix: str, path: str) -> None: ... - @staticmethod - def setSearchPaths(prefix: str, searchPaths: typing.Iterable[str]) -> None: ... - @staticmethod - def fromNativeSeparators(pathName: str) -> str: ... - @staticmethod - def toNativeSeparators(pathName: str) -> str: ... - @staticmethod - def cleanPath(path: str) -> str: ... - @typing.overload - @staticmethod - def match(filters: typing.Iterable[str], fileName: str) -> bool: ... - @typing.overload - @staticmethod - def match(filter: str, fileName: str) -> bool: ... - @staticmethod - def tempPath() -> str: ... - @staticmethod - def temp() -> 'QDir': ... - @staticmethod - def rootPath() -> str: ... - @staticmethod - def root() -> 'QDir': ... - @staticmethod - def homePath() -> str: ... - @staticmethod - def home() -> 'QDir': ... - @staticmethod - def currentPath() -> str: ... - @staticmethod - def current() -> 'QDir': ... - @staticmethod - def setCurrent(path: str) -> bool: ... - @staticmethod - def separator() -> str: ... - @staticmethod - def drives() -> typing.Any: ... - def refresh(self) -> None: ... - def rename(self, oldName: str, newName: str) -> bool: ... - def remove(self, fileName: str) -> bool: ... - def makeAbsolute(self) -> bool: ... - def isAbsolute(self) -> bool: ... - def isRelative(self) -> bool: ... - @staticmethod - def isAbsolutePath(path: str) -> bool: ... - @staticmethod - def isRelativePath(path: str) -> bool: ... - def isRoot(self) -> bool: ... - @typing.overload - def exists(self) -> bool: ... - @typing.overload - def exists(self, name: str) -> bool: ... - def isReadable(self) -> bool: ... - def rmpath(self, dirPath: str) -> bool: ... - def mkpath(self, dirPath: str) -> bool: ... - def rmdir(self, dirName: str) -> bool: ... - def mkdir(self, dirName: str) -> bool: ... - @typing.overload - def entryInfoList(self, filters: typing.Union['QDir.Filters', 'QDir.Filter'] = ..., sort: typing.Union['QDir.SortFlags', 'QDir.SortFlag'] = ...) -> typing.Any: ... - @typing.overload - def entryInfoList(self, nameFilters: typing.Iterable[str], filters: typing.Union['QDir.Filters', 'QDir.Filter'] = ..., sort: typing.Union['QDir.SortFlags', 'QDir.SortFlag'] = ...) -> typing.Any: ... - @typing.overload - def entryList(self, filters: typing.Union['QDir.Filters', 'QDir.Filter'] = ..., sort: typing.Union['QDir.SortFlags', 'QDir.SortFlag'] = ...) -> typing.List[str]: ... - @typing.overload - def entryList(self, nameFilters: typing.Iterable[str], filters: typing.Union['QDir.Filters', 'QDir.Filter'] = ..., sort: typing.Union['QDir.SortFlags', 'QDir.SortFlag'] = ...) -> typing.List[str]: ... - @staticmethod - def nameFiltersFromString(nameFilter: str) -> typing.List[str]: ... - def __contains__(self, a0: str) -> int: ... - @typing.overload - def __getitem__(self, a0: int) -> str: ... - @typing.overload - def __getitem__(self, a0: slice) -> typing.List[str]: ... - def __len__(self) -> int: ... - def count(self) -> int: ... - def setSorting(self, sort: typing.Union['QDir.SortFlags', 'QDir.SortFlag']) -> None: ... - def sorting(self) -> 'QDir.SortFlags': ... - def setFilter(self, filter: typing.Union['QDir.Filters', 'QDir.Filter']) -> None: ... - def filter(self) -> 'QDir.Filters': ... - def setNameFilters(self, nameFilters: typing.Iterable[str]) -> None: ... - def nameFilters(self) -> typing.List[str]: ... - def cdUp(self) -> bool: ... - def cd(self, dirName: str) -> bool: ... - def relativeFilePath(self, fileName: str) -> str: ... - def absoluteFilePath(self, fileName: str) -> str: ... - def filePath(self, fileName: str) -> str: ... - def dirName(self) -> str: ... - def canonicalPath(self) -> str: ... - def absolutePath(self) -> str: ... - def path(self) -> str: ... - def setPath(self, path: str) -> None: ... - - -class QDirIterator(sip.simplewrapper): - - class IteratorFlag(int): ... - NoIteratorFlags = ... # type: 'QDirIterator.IteratorFlag' - FollowSymlinks = ... # type: 'QDirIterator.IteratorFlag' - Subdirectories = ... # type: 'QDirIterator.IteratorFlag' - - class IteratorFlags(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QDirIterator.IteratorFlags', 'QDirIterator.IteratorFlag']) -> None: ... - @typing.overload - def __init__(self, a0: 'QDirIterator.IteratorFlags') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QDirIterator.IteratorFlags': ... - def __int__(self) -> int: ... - - @typing.overload - def __init__(self, dir: QDir, flags: 'QDirIterator.IteratorFlags' = ...) -> None: ... - @typing.overload - def __init__(self, path: str, flags: 'QDirIterator.IteratorFlags' = ...) -> None: ... - @typing.overload - def __init__(self, path: str, filters: QDir.Filters, flags: 'QDirIterator.IteratorFlags' = ...) -> None: ... - @typing.overload - def __init__(self, path: str, nameFilters: typing.Iterable[str], filters: QDir.Filters = ..., flags: 'QDirIterator.IteratorFlags' = ...) -> None: ... - - def path(self) -> str: ... - def fileInfo(self) -> 'QFileInfo': ... - def filePath(self) -> str: ... - def fileName(self) -> str: ... - def hasNext(self) -> bool: ... - def next(self) -> str: ... - - -class QEasingCurve(sip.simplewrapper): - - class Type(int): ... - Linear = ... # type: 'QEasingCurve.Type' - InQuad = ... # type: 'QEasingCurve.Type' - OutQuad = ... # type: 'QEasingCurve.Type' - InOutQuad = ... # type: 'QEasingCurve.Type' - OutInQuad = ... # type: 'QEasingCurve.Type' - InCubic = ... # type: 'QEasingCurve.Type' - OutCubic = ... # type: 'QEasingCurve.Type' - InOutCubic = ... # type: 'QEasingCurve.Type' - OutInCubic = ... # type: 'QEasingCurve.Type' - InQuart = ... # type: 'QEasingCurve.Type' - OutQuart = ... # type: 'QEasingCurve.Type' - InOutQuart = ... # type: 'QEasingCurve.Type' - OutInQuart = ... # type: 'QEasingCurve.Type' - InQuint = ... # type: 'QEasingCurve.Type' - OutQuint = ... # type: 'QEasingCurve.Type' - InOutQuint = ... # type: 'QEasingCurve.Type' - OutInQuint = ... # type: 'QEasingCurve.Type' - InSine = ... # type: 'QEasingCurve.Type' - OutSine = ... # type: 'QEasingCurve.Type' - InOutSine = ... # type: 'QEasingCurve.Type' - OutInSine = ... # type: 'QEasingCurve.Type' - InExpo = ... # type: 'QEasingCurve.Type' - OutExpo = ... # type: 'QEasingCurve.Type' - InOutExpo = ... # type: 'QEasingCurve.Type' - OutInExpo = ... # type: 'QEasingCurve.Type' - InCirc = ... # type: 'QEasingCurve.Type' - OutCirc = ... # type: 'QEasingCurve.Type' - InOutCirc = ... # type: 'QEasingCurve.Type' - OutInCirc = ... # type: 'QEasingCurve.Type' - InElastic = ... # type: 'QEasingCurve.Type' - OutElastic = ... # type: 'QEasingCurve.Type' - InOutElastic = ... # type: 'QEasingCurve.Type' - OutInElastic = ... # type: 'QEasingCurve.Type' - InBack = ... # type: 'QEasingCurve.Type' - OutBack = ... # type: 'QEasingCurve.Type' - InOutBack = ... # type: 'QEasingCurve.Type' - OutInBack = ... # type: 'QEasingCurve.Type' - InBounce = ... # type: 'QEasingCurve.Type' - OutBounce = ... # type: 'QEasingCurve.Type' - InOutBounce = ... # type: 'QEasingCurve.Type' - OutInBounce = ... # type: 'QEasingCurve.Type' - InCurve = ... # type: 'QEasingCurve.Type' - OutCurve = ... # type: 'QEasingCurve.Type' - SineCurve = ... # type: 'QEasingCurve.Type' - CosineCurve = ... # type: 'QEasingCurve.Type' - BezierSpline = ... # type: 'QEasingCurve.Type' - TCBSpline = ... # type: 'QEasingCurve.Type' - Custom = ... # type: 'QEasingCurve.Type' - - @typing.overload - def __init__(self, type: 'QEasingCurve.Type' = ...) -> None: ... - @typing.overload - def __init__(self, other: typing.Union['QEasingCurve', 'QEasingCurve.Type']) -> None: ... - - def toCubicSpline(self) -> typing.Any: ... - def addTCBSegment(self, nextPoint: typing.Union['QPointF', 'QPoint'], t: float, c: float, b: float) -> None: ... - def addCubicBezierSegment(self, c1: typing.Union['QPointF', 'QPoint'], c2: typing.Union['QPointF', 'QPoint'], endPoint: typing.Union['QPointF', 'QPoint']) -> None: ... - def swap(self, other: 'QEasingCurve') -> None: ... - def valueForProgress(self, progress: float) -> float: ... - def customType(self) -> typing.Callable[[], float]: ... - def setCustomType(self, func: typing.Callable[[], float]) -> None: ... - def setType(self, type: 'QEasingCurve.Type') -> None: ... - def type(self) -> 'QEasingCurve.Type': ... - def setOvershoot(self, overshoot: float) -> None: ... - def overshoot(self) -> float: ... - def setPeriod(self, period: float) -> None: ... - def period(self) -> float: ... - def setAmplitude(self, amplitude: float) -> None: ... - def amplitude(self) -> float: ... - - -class QElapsedTimer(sip.simplewrapper): - - class ClockType(int): ... - SystemTime = ... # type: 'QElapsedTimer.ClockType' - MonotonicClock = ... # type: 'QElapsedTimer.ClockType' - TickCounter = ... # type: 'QElapsedTimer.ClockType' - MachAbsoluteTime = ... # type: 'QElapsedTimer.ClockType' - PerformanceCounter = ... # type: 'QElapsedTimer.ClockType' - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QElapsedTimer') -> None: ... - - def nsecsElapsed(self) -> int: ... - def secsTo(self, other: 'QElapsedTimer') -> int: ... - def msecsTo(self, other: 'QElapsedTimer') -> int: ... - def msecsSinceReference(self) -> int: ... - def hasExpired(self, timeout: int) -> bool: ... - def elapsed(self) -> int: ... - def isValid(self) -> bool: ... - def invalidate(self) -> None: ... - def restart(self) -> int: ... - def start(self) -> None: ... - @staticmethod - def isMonotonic() -> bool: ... - @staticmethod - def clockType() -> 'QElapsedTimer.ClockType': ... - - -class QEventLoop(QObject): - - class ProcessEventsFlag(int): ... - AllEvents = ... # type: 'QEventLoop.ProcessEventsFlag' - ExcludeUserInputEvents = ... # type: 'QEventLoop.ProcessEventsFlag' - ExcludeSocketNotifiers = ... # type: 'QEventLoop.ProcessEventsFlag' - WaitForMoreEvents = ... # type: 'QEventLoop.ProcessEventsFlag' - X11ExcludeTimers = ... # type: 'QEventLoop.ProcessEventsFlag' - - class ProcessEventsFlags(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QEventLoop.ProcessEventsFlags', 'QEventLoop.ProcessEventsFlag']) -> None: ... - @typing.overload - def __init__(self, a0: 'QEventLoop.ProcessEventsFlags') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QEventLoop.ProcessEventsFlags': ... - def __int__(self) -> int: ... - - def __init__(self, parent: typing.Optional[QObject] = ...) -> None: ... - - def event(self, event: QEvent) -> bool: ... - def quit(self) -> None: ... - def wakeUp(self) -> None: ... - def isRunning(self) -> bool: ... - def exit(self, returnCode: int = ...) -> None: ... - def exec(self, flags: 'QEventLoop.ProcessEventsFlags' = ...) -> int: ... - def exec_(self, flags: 'QEventLoop.ProcessEventsFlags' = ...) -> int: ... - @typing.overload - def processEvents(self, flags: typing.Union['QEventLoop.ProcessEventsFlags', 'QEventLoop.ProcessEventsFlag'] = ...) -> bool: ... - @typing.overload - def processEvents(self, flags: typing.Union['QEventLoop.ProcessEventsFlags', 'QEventLoop.ProcessEventsFlag'], maximumTime: int) -> None: ... - - -class QEventLoopLocker(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, loop: QEventLoop) -> None: ... - @typing.overload - def __init__(self, thread: 'QThread') -> None: ... - - -class QEventTransition(QAbstractTransition): - - @typing.overload - def __init__(self, sourceState: typing.Optional['QState'] = ...) -> None: ... - @typing.overload - def __init__(self, object: QObject, type: QEvent.Type, sourceState: typing.Optional['QState'] = ...) -> None: ... - - def event(self, e: QEvent) -> bool: ... - def onTransition(self, event: QEvent) -> None: ... - def eventTest(self, event: QEvent) -> bool: ... - def setEventType(self, type: QEvent.Type) -> None: ... - def eventType(self) -> QEvent.Type: ... - def setEventSource(self, object: QObject) -> None: ... - def eventSource(self) -> QObject: ... - - -class QFileDevice(QIODevice): - - class MemoryMapFlags(int): ... - NoOptions = ... # type: 'QFileDevice.MemoryMapFlags' - MapPrivateOption = ... # type: 'QFileDevice.MemoryMapFlags' - - class FileHandleFlag(int): ... - AutoCloseHandle = ... # type: 'QFileDevice.FileHandleFlag' - DontCloseHandle = ... # type: 'QFileDevice.FileHandleFlag' - - class Permission(int): ... - ReadOwner = ... # type: 'QFileDevice.Permission' - WriteOwner = ... # type: 'QFileDevice.Permission' - ExeOwner = ... # type: 'QFileDevice.Permission' - ReadUser = ... # type: 'QFileDevice.Permission' - WriteUser = ... # type: 'QFileDevice.Permission' - ExeUser = ... # type: 'QFileDevice.Permission' - ReadGroup = ... # type: 'QFileDevice.Permission' - WriteGroup = ... # type: 'QFileDevice.Permission' - ExeGroup = ... # type: 'QFileDevice.Permission' - ReadOther = ... # type: 'QFileDevice.Permission' - WriteOther = ... # type: 'QFileDevice.Permission' - ExeOther = ... # type: 'QFileDevice.Permission' - - class FileError(int): ... - NoError = ... # type: 'QFileDevice.FileError' - ReadError = ... # type: 'QFileDevice.FileError' - WriteError = ... # type: 'QFileDevice.FileError' - FatalError = ... # type: 'QFileDevice.FileError' - ResourceError = ... # type: 'QFileDevice.FileError' - OpenError = ... # type: 'QFileDevice.FileError' - AbortError = ... # type: 'QFileDevice.FileError' - TimeOutError = ... # type: 'QFileDevice.FileError' - UnspecifiedError = ... # type: 'QFileDevice.FileError' - RemoveError = ... # type: 'QFileDevice.FileError' - RenameError = ... # type: 'QFileDevice.FileError' - PositionError = ... # type: 'QFileDevice.FileError' - ResizeError = ... # type: 'QFileDevice.FileError' - PermissionsError = ... # type: 'QFileDevice.FileError' - CopyError = ... # type: 'QFileDevice.FileError' - - class Permissions(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QFileDevice.Permissions', 'QFileDevice.Permission']) -> None: ... - @typing.overload - def __init__(self, a0: 'QFileDevice.Permissions') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QFileDevice.Permissions': ... - def __int__(self) -> int: ... - - class FileHandleFlags(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QFileDevice.FileHandleFlags', 'QFileDevice.FileHandleFlag']) -> None: ... - @typing.overload - def __init__(self, a0: 'QFileDevice.FileHandleFlags') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QFileDevice.FileHandleFlags': ... - def __int__(self) -> int: ... - - def readLineData(self, maxlen: int) -> bytes: ... - def writeData(self, data: bytes) -> int: ... - def readData(self, maxlen: int) -> bytes: ... - def unmap(self, address: sip.voidptr) -> bool: ... - def map(self, offset: int, size: int, flags: 'QFileDevice.MemoryMapFlags' = ...) -> sip.voidptr: ... - def setPermissions(self, permissionSpec: typing.Union['QFileDevice.Permissions', 'QFileDevice.Permission']) -> bool: ... - def permissions(self) -> 'QFileDevice.Permissions': ... - def resize(self, sz: int) -> bool: ... - def size(self) -> int: ... - def flush(self) -> bool: ... - def atEnd(self) -> bool: ... - def seek(self, offset: int) -> bool: ... - def pos(self) -> int: ... - def fileName(self) -> str: ... - def handle(self) -> int: ... - def isSequential(self) -> bool: ... - def close(self) -> None: ... - def unsetError(self) -> None: ... - def error(self) -> 'QFileDevice.FileError': ... - - -class QFile(QFileDevice): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, name: str) -> None: ... - @typing.overload - def __init__(self, parent: QObject) -> None: ... - @typing.overload - def __init__(self, name: str, parent: QObject) -> None: ... - - @typing.overload - def setPermissions(self, permissionSpec: typing.Union[QFileDevice.Permissions, QFileDevice.Permission]) -> bool: ... - @typing.overload - @staticmethod - def setPermissions(filename: str, permissionSpec: typing.Union[QFileDevice.Permissions, QFileDevice.Permission]) -> bool: ... - @typing.overload - def permissions(self) -> QFileDevice.Permissions: ... - @typing.overload - @staticmethod - def permissions(filename: str) -> QFileDevice.Permissions: ... - @typing.overload - def resize(self, sz: int) -> bool: ... - @typing.overload - @staticmethod - def resize(filename: str, sz: int) -> bool: ... - def size(self) -> int: ... - @typing.overload - def open(self, flags: typing.Union[QIODevice.OpenMode, QIODevice.OpenModeFlag]) -> bool: ... - @typing.overload - def open(self, fd: int, ioFlags: typing.Union[QIODevice.OpenMode, QIODevice.OpenModeFlag], handleFlags: typing.Union[QFileDevice.FileHandleFlags, QFileDevice.FileHandleFlag] = ...) -> bool: ... - @typing.overload - def copy(self, newName: str) -> bool: ... - @typing.overload - @staticmethod - def copy(fileName: str, newName: str) -> bool: ... - @typing.overload - def link(self, newName: str) -> bool: ... - @typing.overload - @staticmethod - def link(oldname: str, newName: str) -> bool: ... - @typing.overload - def rename(self, newName: str) -> bool: ... - @typing.overload - @staticmethod - def rename(oldName: str, newName: str) -> bool: ... - @typing.overload - def remove(self) -> bool: ... - @typing.overload - @staticmethod - def remove(fileName: str) -> bool: ... - @typing.overload - def symLinkTarget(self) -> str: ... - @typing.overload - @staticmethod - def symLinkTarget(fileName: str) -> str: ... - @typing.overload - def exists(self) -> bool: ... - @typing.overload - @staticmethod - def exists(fileName: str) -> bool: ... - @typing.overload - @staticmethod - def decodeName(localFileName: typing.Union[QByteArray, bytes, bytearray]) -> str: ... - @typing.overload - @staticmethod - def decodeName(localFileName: str) -> str: ... - @staticmethod - def encodeName(fileName: str) -> QByteArray: ... - def setFileName(self, name: str) -> None: ... - def fileName(self) -> str: ... - - -class QFileInfo(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, file: str) -> None: ... - @typing.overload - def __init__(self, file: QFile) -> None: ... - @typing.overload - def __init__(self, dir: QDir, file: str) -> None: ... - @typing.overload - def __init__(self, fileinfo: 'QFileInfo') -> None: ... - - def swap(self, other: 'QFileInfo') -> None: ... - def isNativePath(self) -> bool: ... - def isBundle(self) -> bool: ... - def bundleName(self) -> str: ... - def symLinkTarget(self) -> str: ... - def setCaching(self, on: bool) -> None: ... - def caching(self) -> bool: ... - def lastRead(self) -> QDateTime: ... - def lastModified(self) -> QDateTime: ... - def created(self) -> QDateTime: ... - def size(self) -> int: ... - def permissions(self) -> QFileDevice.Permissions: ... - def permission(self, permissions: typing.Union[QFileDevice.Permissions, QFileDevice.Permission]) -> bool: ... - def groupId(self) -> int: ... - def group(self) -> str: ... - def ownerId(self) -> int: ... - def owner(self) -> str: ... - def isRoot(self) -> bool: ... - def isSymLink(self) -> bool: ... - def isDir(self) -> bool: ... - def isFile(self) -> bool: ... - def makeAbsolute(self) -> bool: ... - def isAbsolute(self) -> bool: ... - def isRelative(self) -> bool: ... - def isHidden(self) -> bool: ... - def isExecutable(self) -> bool: ... - def isWritable(self) -> bool: ... - def isReadable(self) -> bool: ... - def absoluteDir(self) -> QDir: ... - def dir(self) -> QDir: ... - def canonicalPath(self) -> str: ... - def absolutePath(self) -> str: ... - def path(self) -> str: ... - def completeSuffix(self) -> str: ... - def suffix(self) -> str: ... - def completeBaseName(self) -> str: ... - def baseName(self) -> str: ... - def fileName(self) -> str: ... - def canonicalFilePath(self) -> str: ... - def absoluteFilePath(self) -> str: ... - def filePath(self) -> str: ... - def refresh(self) -> None: ... - @typing.overload - def exists(self) -> bool: ... - @typing.overload - @staticmethod - def exists(file: str) -> bool: ... - @typing.overload - def setFile(self, file: str) -> None: ... - @typing.overload - def setFile(self, file: QFile) -> None: ... - @typing.overload - def setFile(self, dir: QDir, file: str) -> None: ... - - -class QFileSelector(QObject): - - def __init__(self, parent: typing.Optional[QObject] = ...) -> None: ... - - def allSelectors(self) -> typing.List[str]: ... - def setExtraSelectors(self, list: typing.Iterable[str]) -> None: ... - def extraSelectors(self) -> typing.List[str]: ... - @typing.overload - def select(self, filePath: str) -> str: ... - @typing.overload - def select(self, filePath: 'QUrl') -> 'QUrl': ... - - -class QFileSystemWatcher(QObject): - - @typing.overload - def __init__(self, parent: typing.Optional[QObject] = ...) -> None: ... - @typing.overload - def __init__(self, paths: typing.Iterable[str], parent: typing.Optional[QObject] = ...) -> None: ... - - def fileChanged(self, path: str) -> None: ... - def directoryChanged(self, path: str) -> None: ... - def removePaths(self, files: typing.Iterable[str]) -> typing.List[str]: ... - def removePath(self, file: str) -> bool: ... - def files(self) -> typing.List[str]: ... - def directories(self) -> typing.List[str]: ... - def addPaths(self, files: typing.Iterable[str]) -> typing.List[str]: ... - def addPath(self, file: str) -> bool: ... - - -class QFinalState(QAbstractState): - - def __init__(self, parent: typing.Optional['QState'] = ...) -> None: ... - - def event(self, e: QEvent) -> bool: ... - def onExit(self, event: QEvent) -> None: ... - def onEntry(self, event: QEvent) -> None: ... - - -class QHistoryState(QAbstractState): - - class HistoryType(int): ... - ShallowHistory = ... # type: 'QHistoryState.HistoryType' - DeepHistory = ... # type: 'QHistoryState.HistoryType' - - @typing.overload - def __init__(self, parent: typing.Optional['QState'] = ...) -> None: ... - @typing.overload - def __init__(self, type: 'QHistoryState.HistoryType', parent: typing.Optional['QState'] = ...) -> None: ... - - def defaultTransitionChanged(self) -> None: ... - def setDefaultTransition(self, transition: QAbstractTransition) -> None: ... - def defaultTransition(self) -> QAbstractTransition: ... - def historyTypeChanged(self) -> None: ... - def defaultStateChanged(self) -> None: ... - def event(self, e: QEvent) -> bool: ... - def onExit(self, event: QEvent) -> None: ... - def onEntry(self, event: QEvent) -> None: ... - def setHistoryType(self, type: 'QHistoryState.HistoryType') -> None: ... - def historyType(self) -> 'QHistoryState.HistoryType': ... - def setDefaultState(self, state: QAbstractState) -> None: ... - def defaultState(self) -> QAbstractState: ... - - -class QIdentityProxyModel(QAbstractProxyModel): - - def __init__(self, parent: typing.Optional[QObject] = ...) -> None: ... - - def sibling(self, row: int, column: int, idx: QModelIndex) -> QModelIndex: ... - def headerData(self, section: int, orientation: Qt.Orientation, role: int = ...) -> typing.Any: ... - def removeRows(self, row: int, count: int, parent: QModelIndex = ...) -> bool: ... - def removeColumns(self, column: int, count: int, parent: QModelIndex = ...) -> bool: ... - def insertRows(self, row: int, count: int, parent: QModelIndex = ...) -> bool: ... - def insertColumns(self, column: int, count: int, parent: QModelIndex = ...) -> bool: ... - def setSourceModel(self, sourceModel: QAbstractItemModel) -> None: ... - def match(self, start: QModelIndex, role: int, value: typing.Any, hits: int = ..., flags: typing.Union[Qt.MatchFlags, Qt.MatchFlag] = ...) -> typing.Any: ... - def mapSelectionToSource(self, selection: 'QItemSelection') -> 'QItemSelection': ... - def mapSelectionFromSource(self, selection: 'QItemSelection') -> 'QItemSelection': ... - def dropMimeData(self, data: 'QMimeData', action: Qt.DropAction, row: int, column: int, parent: QModelIndex) -> bool: ... - def rowCount(self, parent: QModelIndex = ...) -> int: ... - # def parent(self, child: QModelIndex) -> QModelIndex: ... - def mapToSource(self, proxyIndex: QModelIndex) -> QModelIndex: ... - def mapFromSource(self, sourceIndex: QModelIndex) -> QModelIndex: ... - def index(self, row: int, column: int, parent: QModelIndex = ...) -> QModelIndex: ... - def columnCount(self, parent: QModelIndex = ...) -> int: ... - - -class QItemSelectionRange(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, other: 'QItemSelectionRange') -> None: ... - @typing.overload - def __init__(self, atopLeft: QModelIndex, abottomRight: QModelIndex) -> None: ... - @typing.overload - def __init__(self, index: QModelIndex) -> None: ... - - def swap(self, other: 'QItemSelectionRange') -> None: ... - def isEmpty(self) -> bool: ... - def __hash__(self) -> int: ... - def intersected(self, other: 'QItemSelectionRange') -> 'QItemSelectionRange': ... - def indexes(self) -> typing.Any: ... - def isValid(self) -> bool: ... - def intersects(self, other: 'QItemSelectionRange') -> bool: ... - @typing.overload - def contains(self, index: QModelIndex) -> bool: ... - @typing.overload - def contains(self, row: int, column: int, parentIndex: QModelIndex) -> bool: ... - def model(self) -> QAbstractItemModel: ... - def parent(self) -> QModelIndex: ... - def bottomRight(self) -> QPersistentModelIndex: ... - def topLeft(self) -> QPersistentModelIndex: ... - def height(self) -> int: ... - def width(self) -> int: ... - def right(self) -> int: ... - def bottom(self) -> int: ... - def left(self) -> int: ... - def top(self) -> int: ... - - -class QItemSelectionModel(QObject): - - class SelectionFlag(int): ... - NoUpdate = ... # type: 'QItemSelectionModel.SelectionFlag' - Clear = ... # type: 'QItemSelectionModel.SelectionFlag' - Select = ... # type: 'QItemSelectionModel.SelectionFlag' - Deselect = ... # type: 'QItemSelectionModel.SelectionFlag' - Toggle = ... # type: 'QItemSelectionModel.SelectionFlag' - Current = ... # type: 'QItemSelectionModel.SelectionFlag' - Rows = ... # type: 'QItemSelectionModel.SelectionFlag' - Columns = ... # type: 'QItemSelectionModel.SelectionFlag' - SelectCurrent = ... # type: 'QItemSelectionModel.SelectionFlag' - ToggleCurrent = ... # type: 'QItemSelectionModel.SelectionFlag' - ClearAndSelect = ... # type: 'QItemSelectionModel.SelectionFlag' - - class SelectionFlags(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QItemSelectionModel.SelectionFlags', 'QItemSelectionModel.SelectionFlag']) -> None: ... - @typing.overload - def __init__(self, a0: 'QItemSelectionModel.SelectionFlags') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QItemSelectionModel.SelectionFlags': ... - def __int__(self) -> int: ... - - @typing.overload - def __init__(self, model: typing.Optional[QAbstractItemModel] = ...) -> None: ... - @typing.overload - def __init__(self, model: QAbstractItemModel, parent: QObject) -> None: ... - - def modelChanged(self, model: QAbstractItemModel) -> None: ... - def setModel(self, model: QAbstractItemModel) -> None: ... - def selectedColumns(self, row: int = ...) -> typing.Any: ... - def selectedRows(self, column: int = ...) -> typing.Any: ... - def hasSelection(self) -> bool: ... - def emitSelectionChanged(self, newSelection: 'QItemSelection', oldSelection: 'QItemSelection') -> None: ... - def currentColumnChanged(self, current: QModelIndex, previous: QModelIndex) -> None: ... - def currentRowChanged(self, current: QModelIndex, previous: QModelIndex) -> None: ... - def currentChanged(self, current: QModelIndex, previous: QModelIndex) -> None: ... - def selectionChanged(self, selected: 'QItemSelection', deselected: 'QItemSelection') -> None: ... - def clearCurrentIndex(self) -> None: ... - def setCurrentIndex(self, index: QModelIndex, command: typing.Union['QItemSelectionModel.SelectionFlags', 'QItemSelectionModel.SelectionFlag']) -> None: ... - @typing.overload - def select(self, index: QModelIndex, command: typing.Union['QItemSelectionModel.SelectionFlags', 'QItemSelectionModel.SelectionFlag']) -> None: ... - @typing.overload - def select(self, selection: 'QItemSelection', command: typing.Union['QItemSelectionModel.SelectionFlags', 'QItemSelectionModel.SelectionFlag']) -> None: ... - def reset(self) -> None: ... - def clearSelection(self) -> None: ... - def clear(self) -> None: ... - def model(self) -> QAbstractItemModel: ... - def selection(self) -> 'QItemSelection': ... - def selectedIndexes(self) -> typing.Any: ... - def columnIntersectsSelection(self, column: int, parent: QModelIndex) -> bool: ... - def rowIntersectsSelection(self, row: int, parent: QModelIndex) -> bool: ... - def isColumnSelected(self, column: int, parent: QModelIndex) -> bool: ... - def isRowSelected(self, row: int, parent: QModelIndex) -> bool: ... - def isSelected(self, index: QModelIndex) -> bool: ... - def currentIndex(self) -> QModelIndex: ... - - -class QItemSelection(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, topLeft: QModelIndex, bottomRight: QModelIndex) -> None: ... - @typing.overload - def __init__(self, a0: 'QItemSelection') -> None: ... - - def lastIndexOf(self, value: QItemSelectionRange, from_: int = ...) -> int: ... - def indexOf(self, value: QItemSelectionRange, from_: int = ...) -> int: ... - def last(self) -> QItemSelectionRange: ... - def first(self) -> QItemSelectionRange: ... - def __len__(self) -> int: ... - @typing.overload - def count(self, range: QItemSelectionRange) -> int: ... - @typing.overload - def count(self) -> int: ... - def swap(self, i: int, j: int) -> None: ... - def move(self, from_: int, to: int) -> None: ... - def takeLast(self) -> QItemSelectionRange: ... - def takeFirst(self) -> QItemSelectionRange: ... - def takeAt(self, i: int) -> QItemSelectionRange: ... - def removeAll(self, range: QItemSelectionRange) -> int: ... - def removeAt(self, i: int) -> None: ... - def replace(self, i: int, range: QItemSelectionRange) -> None: ... - def insert(self, i: int, range: QItemSelectionRange) -> None: ... - def prepend(self, range: QItemSelectionRange) -> None: ... - def append(self, range: QItemSelectionRange) -> None: ... - def isEmpty(self) -> bool: ... - def clear(self) -> None: ... - @typing.overload - def __getitem__(self, i: int) -> QItemSelectionRange: ... - @typing.overload - def __getitem__(self, slice: slice) -> 'QItemSelection': ... - @typing.overload - def __delitem__(self, i: int) -> None: ... - @typing.overload - def __delitem__(self, slice: slice) -> None: ... - @typing.overload - def __setitem__(self, i: int, range: QItemSelectionRange) -> None: ... - @typing.overload - def __setitem__(self, slice: slice, list: 'QItemSelection') -> None: ... - @staticmethod - def split(range: QItemSelectionRange, other: QItemSelectionRange, result: 'QItemSelection') -> None: ... - def merge(self, other: 'QItemSelection', command: typing.Union[QItemSelectionModel.SelectionFlags, QItemSelectionModel.SelectionFlag]) -> None: ... - def indexes(self) -> typing.Any: ... - def __contains__(self, index: QModelIndex) -> int: ... - def contains(self, index: QModelIndex) -> bool: ... - def select(self, topLeft: QModelIndex, bottomRight: QModelIndex) -> None: ... - - -class QJsonParseError(sip.simplewrapper): - - class ParseError(int): ... - NoError = ... # type: 'QJsonParseError.ParseError' - UnterminatedObject = ... # type: 'QJsonParseError.ParseError' - MissingNameSeparator = ... # type: 'QJsonParseError.ParseError' - UnterminatedArray = ... # type: 'QJsonParseError.ParseError' - MissingValueSeparator = ... # type: 'QJsonParseError.ParseError' - IllegalValue = ... # type: 'QJsonParseError.ParseError' - TerminationByNumber = ... # type: 'QJsonParseError.ParseError' - IllegalNumber = ... # type: 'QJsonParseError.ParseError' - IllegalEscapeSequence = ... # type: 'QJsonParseError.ParseError' - IllegalUTF8String = ... # type: 'QJsonParseError.ParseError' - UnterminatedString = ... # type: 'QJsonParseError.ParseError' - MissingObject = ... # type: 'QJsonParseError.ParseError' - DeepNesting = ... # type: 'QJsonParseError.ParseError' - DocumentTooLarge = ... # type: 'QJsonParseError.ParseError' - GarbageAtEnd = ... # type: 'QJsonParseError.ParseError' - - error = ... # type: 'QJsonParseError.ParseError' - offset = ... # type: int - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QJsonParseError') -> None: ... - - def errorString(self) -> str: ... - - -class QJsonDocument(sip.simplewrapper): - - class JsonFormat(int): ... - Indented = ... # type: 'QJsonDocument.JsonFormat' - Compact = ... # type: 'QJsonDocument.JsonFormat' - - class DataValidation(int): ... - Validate = ... # type: 'QJsonDocument.DataValidation' - BypassValidation = ... # type: 'QJsonDocument.DataValidation' - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, object: typing.Dict[str, 'QJsonValue']) -> None: ... - @typing.overload - def __init__(self, array: typing.Iterable[typing.Union['QJsonValue', 'QJsonValue.Type', typing.Dict[str, 'QJsonValue'], bool, int, float, str]]) -> None: ... - @typing.overload - def __init__(self, other: 'QJsonDocument') -> None: ... - - def isNull(self) -> bool: ... - def setArray(self, array: typing.Iterable[typing.Union['QJsonValue', 'QJsonValue.Type', typing.Dict[str, 'QJsonValue'], bool, int, float, str]]) -> None: ... - def setObject(self, object: typing.Dict[str, 'QJsonValue']) -> None: ... - def array(self) -> typing.List['QJsonValue']: ... - def object(self) -> typing.Dict[str, 'QJsonValue']: ... - def isObject(self) -> bool: ... - def isArray(self) -> bool: ... - def isEmpty(self) -> bool: ... - @typing.overload - def toJson(self) -> QByteArray: ... - @typing.overload - def toJson(self, format: 'QJsonDocument.JsonFormat') -> QByteArray: ... - @staticmethod - def fromJson(json: typing.Union[QByteArray, bytes, bytearray], error: typing.Optional[QJsonParseError] = ...) -> 'QJsonDocument': ... - def toVariant(self) -> typing.Any: ... - @staticmethod - def fromVariant(variant: typing.Any) -> 'QJsonDocument': ... - def toBinaryData(self) -> QByteArray: ... - @staticmethod - def fromBinaryData(data: typing.Union[QByteArray, bytes, bytearray], validation: 'QJsonDocument.DataValidation' = ...) -> 'QJsonDocument': ... - def rawData(self) -> typing.Tuple[str, int]: ... - @staticmethod - def fromRawData(data: str, size: int, validation: 'QJsonDocument.DataValidation' = ...) -> 'QJsonDocument': ... - - -class QJsonValue(sip.simplewrapper): - - class Type(int): ... - Null = ... # type: 'QJsonValue.Type' - Bool = ... # type: 'QJsonValue.Type' - Double = ... # type: 'QJsonValue.Type' - String = ... # type: 'QJsonValue.Type' - Array = ... # type: 'QJsonValue.Type' - Object = ... # type: 'QJsonValue.Type' - Undefined = ... # type: 'QJsonValue.Type' - - @typing.overload - def __init__(self, type: 'QJsonValue.Type' = ...) -> None: ... - @typing.overload - def __init__(self, other: typing.Union['QJsonValue', 'QJsonValue.Type', typing.Dict[str, 'QJsonValue'], bool, int, float, str]) -> None: ... - - @typing.overload - def toString(self) -> str: ... - @typing.overload - def toString(self, defaultValue: str) -> str: ... - @typing.overload - def toObject(self) -> typing.Dict[str, 'QJsonValue']: ... - @typing.overload - def toObject(self, defaultValue: typing.Dict[str, 'QJsonValue']) -> typing.Dict[str, 'QJsonValue']: ... - @typing.overload - def toArray(self) -> typing.List['QJsonValue']: ... - @typing.overload - def toArray(self, defaultValue: typing.Iterable[typing.Union['QJsonValue', 'QJsonValue.Type', typing.Dict[str, 'QJsonValue'], bool, int, float, str]]) -> typing.List['QJsonValue']: ... - def toDouble(self, defaultValue: float = ...) -> float: ... - def toInt(self, defaultValue: int = ...) -> int: ... - def toBool(self, defaultValue: bool = ...) -> bool: ... - def isUndefined(self) -> bool: ... - def isObject(self) -> bool: ... - def isArray(self) -> bool: ... - def isString(self) -> bool: ... - def isDouble(self) -> bool: ... - def isBool(self) -> bool: ... - def isNull(self) -> bool: ... - def type(self) -> 'QJsonValue.Type': ... - def toVariant(self) -> typing.Any: ... - @staticmethod - def fromVariant(variant: typing.Any) -> 'QJsonValue': ... - - -class QLibrary(QObject): - - class LoadHint(int): ... - ResolveAllSymbolsHint = ... # type: 'QLibrary.LoadHint' - ExportExternalSymbolsHint = ... # type: 'QLibrary.LoadHint' - LoadArchiveMemberHint = ... # type: 'QLibrary.LoadHint' - PreventUnloadHint = ... # type: 'QLibrary.LoadHint' - DeepBindHint = ... # type: 'QLibrary.LoadHint' - - class LoadHints(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QLibrary.LoadHints', 'QLibrary.LoadHint']) -> None: ... - @typing.overload - def __init__(self, a0: 'QLibrary.LoadHints') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QLibrary.LoadHints': ... - def __int__(self) -> int: ... - - @typing.overload - def __init__(self, parent: typing.Optional[QObject] = ...) -> None: ... - @typing.overload - def __init__(self, fileName: str, parent: typing.Optional[QObject] = ...) -> None: ... - @typing.overload - def __init__(self, fileName: str, verNum: int, parent: typing.Optional[QObject] = ...) -> None: ... - @typing.overload - def __init__(self, fileName: str, version: str, parent: typing.Optional[QObject] = ...) -> None: ... - - def setLoadHints(self, hints: typing.Union['QLibrary.LoadHints', 'QLibrary.LoadHint']) -> None: ... - @typing.overload - def setFileNameAndVersion(self, fileName: str, verNum: int) -> None: ... - @typing.overload - def setFileNameAndVersion(self, fileName: str, version: str) -> None: ... - def setFileName(self, fileName: str) -> None: ... - @staticmethod - def isLibrary(fileName: str) -> bool: ... - def unload(self) -> bool: ... - @typing.overload - def resolve(self, symbol: str) -> sip.voidptr: ... - @typing.overload - @staticmethod - def resolve(fileName: str, symbol: str) -> sip.voidptr: ... - @typing.overload - @staticmethod - def resolve(fileName: str, verNum: int, symbol: str) -> sip.voidptr: ... - @typing.overload - @staticmethod - def resolve(fileName: str, version: str, symbol: str) -> sip.voidptr: ... - def loadHints(self) -> 'QLibrary.LoadHints': ... - def load(self) -> bool: ... - def isLoaded(self) -> bool: ... - def fileName(self) -> str: ... - def errorString(self) -> str: ... - - -class QLibraryInfo(sip.simplewrapper): - - class LibraryLocation(int): ... - PrefixPath = ... # type: 'QLibraryInfo.LibraryLocation' - DocumentationPath = ... # type: 'QLibraryInfo.LibraryLocation' - HeadersPath = ... # type: 'QLibraryInfo.LibraryLocation' - LibrariesPath = ... # type: 'QLibraryInfo.LibraryLocation' - BinariesPath = ... # type: 'QLibraryInfo.LibraryLocation' - PluginsPath = ... # type: 'QLibraryInfo.LibraryLocation' - DataPath = ... # type: 'QLibraryInfo.LibraryLocation' - TranslationsPath = ... # type: 'QLibraryInfo.LibraryLocation' - SettingsPath = ... # type: 'QLibraryInfo.LibraryLocation' - ExamplesPath = ... # type: 'QLibraryInfo.LibraryLocation' - ImportsPath = ... # type: 'QLibraryInfo.LibraryLocation' - TestsPath = ... # type: 'QLibraryInfo.LibraryLocation' - LibraryExecutablesPath = ... # type: 'QLibraryInfo.LibraryLocation' - Qml2ImportsPath = ... # type: 'QLibraryInfo.LibraryLocation' - ArchDataPath = ... # type: 'QLibraryInfo.LibraryLocation' - - def __init__(self, a0: 'QLibraryInfo') -> None: ... - - @staticmethod - def isDebugBuild() -> bool: ... - @staticmethod - def buildDate() -> QDate: ... - @staticmethod - def location(a0: 'QLibraryInfo.LibraryLocation') -> str: ... - @staticmethod - def licensedProducts() -> str: ... - @staticmethod - def licensee() -> str: ... - - -class QLine(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, pt1_: 'QPoint', pt2_: 'QPoint') -> None: ... - @typing.overload - def __init__(self, x1pos: int, y1pos: int, x2pos: int, y2pos: int) -> None: ... - @typing.overload - def __init__(self, a0: 'QLine') -> None: ... - - def setLine(self, aX1: int, aY1: int, aX2: int, aY2: int) -> None: ... - def setPoints(self, aP1: 'QPoint', aP2: 'QPoint') -> None: ... - def setP2(self, aP2: 'QPoint') -> None: ... - def setP1(self, aP1: 'QPoint') -> None: ... - @typing.overload - def translated(self, p: 'QPoint') -> 'QLine': ... - @typing.overload - def translated(self, adx: int, ady: int) -> 'QLine': ... - @typing.overload - def translate(self, point: 'QPoint') -> None: ... - @typing.overload - def translate(self, adx: int, ady: int) -> None: ... - def dy(self) -> int: ... - def dx(self) -> int: ... - def p2(self) -> 'QPoint': ... - def p1(self) -> 'QPoint': ... - def y2(self) -> int: ... - def x2(self) -> int: ... - def y1(self) -> int: ... - def x1(self) -> int: ... - def __bool__(self) -> int: ... - def isNull(self) -> bool: ... - def __repr__(self) -> str: ... - - -class QLineF(sip.simplewrapper): - - class IntersectType(int): ... - NoIntersection = ... # type: 'QLineF.IntersectType' - BoundedIntersection = ... # type: 'QLineF.IntersectType' - UnboundedIntersection = ... # type: 'QLineF.IntersectType' - - @typing.overload - def __init__(self, line: QLine) -> None: ... - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, apt1: typing.Union['QPointF', 'QPoint'], apt2: typing.Union['QPointF', 'QPoint']) -> None: ... - @typing.overload - def __init__(self, x1pos: float, y1pos: float, x2pos: float, y2pos: float) -> None: ... - @typing.overload - def __init__(self, a0: 'QLineF') -> None: ... - - def setLine(self, aX1: float, aY1: float, aX2: float, aY2: float) -> None: ... - def setPoints(self, aP1: typing.Union['QPointF', 'QPoint'], aP2: typing.Union['QPointF', 'QPoint']) -> None: ... - def setP2(self, aP2: typing.Union['QPointF', 'QPoint']) -> None: ... - def setP1(self, aP1: typing.Union['QPointF', 'QPoint']) -> None: ... - @typing.overload - def translated(self, p: typing.Union['QPointF', 'QPoint']) -> 'QLineF': ... - @typing.overload - def translated(self, adx: float, ady: float) -> 'QLineF': ... - def angleTo(self, l: 'QLineF') -> float: ... - def setAngle(self, angle: float) -> None: ... - def angle(self) -> float: ... - @staticmethod - def fromPolar(length: float, angle: float) -> 'QLineF': ... - def toLine(self) -> QLine: ... - def pointAt(self, t: float) -> 'QPointF': ... - def setLength(self, len: float) -> None: ... - @typing.overload - def translate(self, point: typing.Union['QPointF', 'QPoint']) -> None: ... - @typing.overload - def translate(self, adx: float, ady: float) -> None: ... - def normalVector(self) -> 'QLineF': ... - def dy(self) -> float: ... - def dx(self) -> float: ... - def p2(self) -> 'QPointF': ... - def p1(self) -> 'QPointF': ... - def y2(self) -> float: ... - def x2(self) -> float: ... - def y1(self) -> float: ... - def x1(self) -> float: ... - def __repr__(self) -> str: ... - def intersect(self, l: 'QLineF', intersectionPoint: typing.Union['QPointF', 'QPoint']) -> 'QLineF.IntersectType': ... - def unitVector(self) -> 'QLineF': ... - def length(self) -> float: ... - def __bool__(self) -> int: ... - def isNull(self) -> bool: ... - - -class QLocale(sip.simplewrapper): - - class FloatingPointPrecisionOption(int): ... - FloatingPointShortest = ... # type: 'QLocale.FloatingPointPrecisionOption' - - class QuotationStyle(int): ... - StandardQuotation = ... # type: 'QLocale.QuotationStyle' - AlternateQuotation = ... # type: 'QLocale.QuotationStyle' - - class CurrencySymbolFormat(int): ... - CurrencyIsoCode = ... # type: 'QLocale.CurrencySymbolFormat' - CurrencySymbol = ... # type: 'QLocale.CurrencySymbolFormat' - CurrencyDisplayName = ... # type: 'QLocale.CurrencySymbolFormat' - - class Script(int): ... - AnyScript = ... # type: 'QLocale.Script' - ArabicScript = ... # type: 'QLocale.Script' - CyrillicScript = ... # type: 'QLocale.Script' - DeseretScript = ... # type: 'QLocale.Script' - GurmukhiScript = ... # type: 'QLocale.Script' - SimplifiedHanScript = ... # type: 'QLocale.Script' - TraditionalHanScript = ... # type: 'QLocale.Script' - LatinScript = ... # type: 'QLocale.Script' - MongolianScript = ... # type: 'QLocale.Script' - TifinaghScript = ... # type: 'QLocale.Script' - SimplifiedChineseScript = ... # type: 'QLocale.Script' - TraditionalChineseScript = ... # type: 'QLocale.Script' - ArmenianScript = ... # type: 'QLocale.Script' - BengaliScript = ... # type: 'QLocale.Script' - CherokeeScript = ... # type: 'QLocale.Script' - DevanagariScript = ... # type: 'QLocale.Script' - EthiopicScript = ... # type: 'QLocale.Script' - GeorgianScript = ... # type: 'QLocale.Script' - GreekScript = ... # type: 'QLocale.Script' - GujaratiScript = ... # type: 'QLocale.Script' - HebrewScript = ... # type: 'QLocale.Script' - JapaneseScript = ... # type: 'QLocale.Script' - KhmerScript = ... # type: 'QLocale.Script' - KannadaScript = ... # type: 'QLocale.Script' - KoreanScript = ... # type: 'QLocale.Script' - LaoScript = ... # type: 'QLocale.Script' - MalayalamScript = ... # type: 'QLocale.Script' - MyanmarScript = ... # type: 'QLocale.Script' - OriyaScript = ... # type: 'QLocale.Script' - TamilScript = ... # type: 'QLocale.Script' - TeluguScript = ... # type: 'QLocale.Script' - ThaanaScript = ... # type: 'QLocale.Script' - ThaiScript = ... # type: 'QLocale.Script' - TibetanScript = ... # type: 'QLocale.Script' - SinhalaScript = ... # type: 'QLocale.Script' - SyriacScript = ... # type: 'QLocale.Script' - YiScript = ... # type: 'QLocale.Script' - VaiScript = ... # type: 'QLocale.Script' - AvestanScript = ... # type: 'QLocale.Script' - BalineseScript = ... # type: 'QLocale.Script' - BamumScript = ... # type: 'QLocale.Script' - BatakScript = ... # type: 'QLocale.Script' - BopomofoScript = ... # type: 'QLocale.Script' - BrahmiScript = ... # type: 'QLocale.Script' - BugineseScript = ... # type: 'QLocale.Script' - BuhidScript = ... # type: 'QLocale.Script' - CanadianAboriginalScript = ... # type: 'QLocale.Script' - CarianScript = ... # type: 'QLocale.Script' - ChakmaScript = ... # type: 'QLocale.Script' - ChamScript = ... # type: 'QLocale.Script' - CopticScript = ... # type: 'QLocale.Script' - CypriotScript = ... # type: 'QLocale.Script' - EgyptianHieroglyphsScript = ... # type: 'QLocale.Script' - FraserScript = ... # type: 'QLocale.Script' - GlagoliticScript = ... # type: 'QLocale.Script' - GothicScript = ... # type: 'QLocale.Script' - HanScript = ... # type: 'QLocale.Script' - HangulScript = ... # type: 'QLocale.Script' - HanunooScript = ... # type: 'QLocale.Script' - ImperialAramaicScript = ... # type: 'QLocale.Script' - InscriptionalPahlaviScript = ... # type: 'QLocale.Script' - InscriptionalParthianScript = ... # type: 'QLocale.Script' - JavaneseScript = ... # type: 'QLocale.Script' - KaithiScript = ... # type: 'QLocale.Script' - KatakanaScript = ... # type: 'QLocale.Script' - KayahLiScript = ... # type: 'QLocale.Script' - KharoshthiScript = ... # type: 'QLocale.Script' - LannaScript = ... # type: 'QLocale.Script' - LepchaScript = ... # type: 'QLocale.Script' - LimbuScript = ... # type: 'QLocale.Script' - LinearBScript = ... # type: 'QLocale.Script' - LycianScript = ... # type: 'QLocale.Script' - LydianScript = ... # type: 'QLocale.Script' - MandaeanScript = ... # type: 'QLocale.Script' - MeiteiMayekScript = ... # type: 'QLocale.Script' - MeroiticScript = ... # type: 'QLocale.Script' - MeroiticCursiveScript = ... # type: 'QLocale.Script' - NkoScript = ... # type: 'QLocale.Script' - NewTaiLueScript = ... # type: 'QLocale.Script' - OghamScript = ... # type: 'QLocale.Script' - OlChikiScript = ... # type: 'QLocale.Script' - OldItalicScript = ... # type: 'QLocale.Script' - OldPersianScript = ... # type: 'QLocale.Script' - OldSouthArabianScript = ... # type: 'QLocale.Script' - OrkhonScript = ... # type: 'QLocale.Script' - OsmanyaScript = ... # type: 'QLocale.Script' - PhagsPaScript = ... # type: 'QLocale.Script' - PhoenicianScript = ... # type: 'QLocale.Script' - PollardPhoneticScript = ... # type: 'QLocale.Script' - RejangScript = ... # type: 'QLocale.Script' - RunicScript = ... # type: 'QLocale.Script' - SamaritanScript = ... # type: 'QLocale.Script' - SaurashtraScript = ... # type: 'QLocale.Script' - SharadaScript = ... # type: 'QLocale.Script' - ShavianScript = ... # type: 'QLocale.Script' - SoraSompengScript = ... # type: 'QLocale.Script' - CuneiformScript = ... # type: 'QLocale.Script' - SundaneseScript = ... # type: 'QLocale.Script' - SylotiNagriScript = ... # type: 'QLocale.Script' - TagalogScript = ... # type: 'QLocale.Script' - TagbanwaScript = ... # type: 'QLocale.Script' - TaiLeScript = ... # type: 'QLocale.Script' - TaiVietScript = ... # type: 'QLocale.Script' - TakriScript = ... # type: 'QLocale.Script' - UgariticScript = ... # type: 'QLocale.Script' - BrailleScript = ... # type: 'QLocale.Script' - HiraganaScript = ... # type: 'QLocale.Script' - CaucasianAlbanianScript = ... # type: 'QLocale.Script' - BassaVahScript = ... # type: 'QLocale.Script' - DuployanScript = ... # type: 'QLocale.Script' - ElbasanScript = ... # type: 'QLocale.Script' - GranthaScript = ... # type: 'QLocale.Script' - PahawhHmongScript = ... # type: 'QLocale.Script' - KhojkiScript = ... # type: 'QLocale.Script' - LinearAScript = ... # type: 'QLocale.Script' - MahajaniScript = ... # type: 'QLocale.Script' - ManichaeanScript = ... # type: 'QLocale.Script' - MendeKikakuiScript = ... # type: 'QLocale.Script' - ModiScript = ... # type: 'QLocale.Script' - MroScript = ... # type: 'QLocale.Script' - OldNorthArabianScript = ... # type: 'QLocale.Script' - NabataeanScript = ... # type: 'QLocale.Script' - PalmyreneScript = ... # type: 'QLocale.Script' - PauCinHauScript = ... # type: 'QLocale.Script' - OldPermicScript = ... # type: 'QLocale.Script' - PsalterPahlaviScript = ... # type: 'QLocale.Script' - SiddhamScript = ... # type: 'QLocale.Script' - KhudawadiScript = ... # type: 'QLocale.Script' - TirhutaScript = ... # type: 'QLocale.Script' - VarangKshitiScript = ... # type: 'QLocale.Script' - AhomScript = ... # type: 'QLocale.Script' - AnatolianHieroglyphsScript = ... # type: 'QLocale.Script' - HatranScript = ... # type: 'QLocale.Script' - MultaniScript = ... # type: 'QLocale.Script' - OldHungarianScript = ... # type: 'QLocale.Script' - SignWritingScript = ... # type: 'QLocale.Script' - AdlamScript = ... # type: 'QLocale.Script' - BhaiksukiScript = ... # type: 'QLocale.Script' - MarchenScript = ... # type: 'QLocale.Script' - NewaScript = ... # type: 'QLocale.Script' - OsageScript = ... # type: 'QLocale.Script' - TangutScript = ... # type: 'QLocale.Script' - HanWithBopomofoScript = ... # type: 'QLocale.Script' - JamoScript = ... # type: 'QLocale.Script' - - class MeasurementSystem(int): ... - MetricSystem = ... # type: 'QLocale.MeasurementSystem' - ImperialSystem = ... # type: 'QLocale.MeasurementSystem' - ImperialUSSystem = ... # type: 'QLocale.MeasurementSystem' - ImperialUKSystem = ... # type: 'QLocale.MeasurementSystem' - - class FormatType(int): ... - LongFormat = ... # type: 'QLocale.FormatType' - ShortFormat = ... # type: 'QLocale.FormatType' - NarrowFormat = ... # type: 'QLocale.FormatType' - - class NumberOption(int): ... - OmitGroupSeparator = ... # type: 'QLocale.NumberOption' - RejectGroupSeparator = ... # type: 'QLocale.NumberOption' - DefaultNumberOptions = ... # type: 'QLocale.NumberOption' - OmitLeadingZeroInExponent = ... # type: 'QLocale.NumberOption' - RejectLeadingZeroInExponent = ... # type: 'QLocale.NumberOption' - - class Country(int): ... - AnyCountry = ... # type: 'QLocale.Country' - Afghanistan = ... # type: 'QLocale.Country' - Albania = ... # type: 'QLocale.Country' - Algeria = ... # type: 'QLocale.Country' - AmericanSamoa = ... # type: 'QLocale.Country' - Andorra = ... # type: 'QLocale.Country' - Angola = ... # type: 'QLocale.Country' - Anguilla = ... # type: 'QLocale.Country' - Antarctica = ... # type: 'QLocale.Country' - AntiguaAndBarbuda = ... # type: 'QLocale.Country' - Argentina = ... # type: 'QLocale.Country' - Armenia = ... # type: 'QLocale.Country' - Aruba = ... # type: 'QLocale.Country' - Australia = ... # type: 'QLocale.Country' - Austria = ... # type: 'QLocale.Country' - Azerbaijan = ... # type: 'QLocale.Country' - Bahamas = ... # type: 'QLocale.Country' - Bahrain = ... # type: 'QLocale.Country' - Bangladesh = ... # type: 'QLocale.Country' - Barbados = ... # type: 'QLocale.Country' - Belarus = ... # type: 'QLocale.Country' - Belgium = ... # type: 'QLocale.Country' - Belize = ... # type: 'QLocale.Country' - Benin = ... # type: 'QLocale.Country' - Bermuda = ... # type: 'QLocale.Country' - Bhutan = ... # type: 'QLocale.Country' - Bolivia = ... # type: 'QLocale.Country' - BosniaAndHerzegowina = ... # type: 'QLocale.Country' - Botswana = ... # type: 'QLocale.Country' - BouvetIsland = ... # type: 'QLocale.Country' - Brazil = ... # type: 'QLocale.Country' - BritishIndianOceanTerritory = ... # type: 'QLocale.Country' - Bulgaria = ... # type: 'QLocale.Country' - BurkinaFaso = ... # type: 'QLocale.Country' - Burundi = ... # type: 'QLocale.Country' - Cambodia = ... # type: 'QLocale.Country' - Cameroon = ... # type: 'QLocale.Country' - Canada = ... # type: 'QLocale.Country' - CapeVerde = ... # type: 'QLocale.Country' - CaymanIslands = ... # type: 'QLocale.Country' - CentralAfricanRepublic = ... # type: 'QLocale.Country' - Chad = ... # type: 'QLocale.Country' - Chile = ... # type: 'QLocale.Country' - China = ... # type: 'QLocale.Country' - ChristmasIsland = ... # type: 'QLocale.Country' - CocosIslands = ... # type: 'QLocale.Country' - Colombia = ... # type: 'QLocale.Country' - Comoros = ... # type: 'QLocale.Country' - DemocraticRepublicOfCongo = ... # type: 'QLocale.Country' - PeoplesRepublicOfCongo = ... # type: 'QLocale.Country' - CookIslands = ... # type: 'QLocale.Country' - CostaRica = ... # type: 'QLocale.Country' - IvoryCoast = ... # type: 'QLocale.Country' - Croatia = ... # type: 'QLocale.Country' - Cuba = ... # type: 'QLocale.Country' - Cyprus = ... # type: 'QLocale.Country' - CzechRepublic = ... # type: 'QLocale.Country' - Denmark = ... # type: 'QLocale.Country' - Djibouti = ... # type: 'QLocale.Country' - Dominica = ... # type: 'QLocale.Country' - DominicanRepublic = ... # type: 'QLocale.Country' - EastTimor = ... # type: 'QLocale.Country' - Ecuador = ... # type: 'QLocale.Country' - Egypt = ... # type: 'QLocale.Country' - ElSalvador = ... # type: 'QLocale.Country' - EquatorialGuinea = ... # type: 'QLocale.Country' - Eritrea = ... # type: 'QLocale.Country' - Estonia = ... # type: 'QLocale.Country' - Ethiopia = ... # type: 'QLocale.Country' - FalklandIslands = ... # type: 'QLocale.Country' - FaroeIslands = ... # type: 'QLocale.Country' - Finland = ... # type: 'QLocale.Country' - France = ... # type: 'QLocale.Country' - FrenchGuiana = ... # type: 'QLocale.Country' - FrenchPolynesia = ... # type: 'QLocale.Country' - FrenchSouthernTerritories = ... # type: 'QLocale.Country' - Gabon = ... # type: 'QLocale.Country' - Gambia = ... # type: 'QLocale.Country' - Georgia = ... # type: 'QLocale.Country' - Germany = ... # type: 'QLocale.Country' - Ghana = ... # type: 'QLocale.Country' - Gibraltar = ... # type: 'QLocale.Country' - Greece = ... # type: 'QLocale.Country' - Greenland = ... # type: 'QLocale.Country' - Grenada = ... # type: 'QLocale.Country' - Guadeloupe = ... # type: 'QLocale.Country' - Guam = ... # type: 'QLocale.Country' - Guatemala = ... # type: 'QLocale.Country' - Guinea = ... # type: 'QLocale.Country' - GuineaBissau = ... # type: 'QLocale.Country' - Guyana = ... # type: 'QLocale.Country' - Haiti = ... # type: 'QLocale.Country' - HeardAndMcDonaldIslands = ... # type: 'QLocale.Country' - Honduras = ... # type: 'QLocale.Country' - HongKong = ... # type: 'QLocale.Country' - Hungary = ... # type: 'QLocale.Country' - Iceland = ... # type: 'QLocale.Country' - India = ... # type: 'QLocale.Country' - Indonesia = ... # type: 'QLocale.Country' - Iran = ... # type: 'QLocale.Country' - Iraq = ... # type: 'QLocale.Country' - Ireland = ... # type: 'QLocale.Country' - Israel = ... # type: 'QLocale.Country' - Italy = ... # type: 'QLocale.Country' - Jamaica = ... # type: 'QLocale.Country' - Japan = ... # type: 'QLocale.Country' - Jordan = ... # type: 'QLocale.Country' - Kazakhstan = ... # type: 'QLocale.Country' - Kenya = ... # type: 'QLocale.Country' - Kiribati = ... # type: 'QLocale.Country' - DemocraticRepublicOfKorea = ... # type: 'QLocale.Country' - RepublicOfKorea = ... # type: 'QLocale.Country' - Kuwait = ... # type: 'QLocale.Country' - Kyrgyzstan = ... # type: 'QLocale.Country' - Latvia = ... # type: 'QLocale.Country' - Lebanon = ... # type: 'QLocale.Country' - Lesotho = ... # type: 'QLocale.Country' - Liberia = ... # type: 'QLocale.Country' - Liechtenstein = ... # type: 'QLocale.Country' - Lithuania = ... # type: 'QLocale.Country' - Luxembourg = ... # type: 'QLocale.Country' - Macau = ... # type: 'QLocale.Country' - Macedonia = ... # type: 'QLocale.Country' - Madagascar = ... # type: 'QLocale.Country' - Malawi = ... # type: 'QLocale.Country' - Malaysia = ... # type: 'QLocale.Country' - Maldives = ... # type: 'QLocale.Country' - Mali = ... # type: 'QLocale.Country' - Malta = ... # type: 'QLocale.Country' - MarshallIslands = ... # type: 'QLocale.Country' - Martinique = ... # type: 'QLocale.Country' - Mauritania = ... # type: 'QLocale.Country' - Mauritius = ... # type: 'QLocale.Country' - Mayotte = ... # type: 'QLocale.Country' - Mexico = ... # type: 'QLocale.Country' - Micronesia = ... # type: 'QLocale.Country' - Moldova = ... # type: 'QLocale.Country' - Monaco = ... # type: 'QLocale.Country' - Mongolia = ... # type: 'QLocale.Country' - Montserrat = ... # type: 'QLocale.Country' - Morocco = ... # type: 'QLocale.Country' - Mozambique = ... # type: 'QLocale.Country' - Myanmar = ... # type: 'QLocale.Country' - Namibia = ... # type: 'QLocale.Country' - NauruCountry = ... # type: 'QLocale.Country' - Nepal = ... # type: 'QLocale.Country' - Netherlands = ... # type: 'QLocale.Country' - NewCaledonia = ... # type: 'QLocale.Country' - NewZealand = ... # type: 'QLocale.Country' - Nicaragua = ... # type: 'QLocale.Country' - Niger = ... # type: 'QLocale.Country' - Nigeria = ... # type: 'QLocale.Country' - Niue = ... # type: 'QLocale.Country' - NorfolkIsland = ... # type: 'QLocale.Country' - NorthernMarianaIslands = ... # type: 'QLocale.Country' - Norway = ... # type: 'QLocale.Country' - Oman = ... # type: 'QLocale.Country' - Pakistan = ... # type: 'QLocale.Country' - Palau = ... # type: 'QLocale.Country' - Panama = ... # type: 'QLocale.Country' - PapuaNewGuinea = ... # type: 'QLocale.Country' - Paraguay = ... # type: 'QLocale.Country' - Peru = ... # type: 'QLocale.Country' - Philippines = ... # type: 'QLocale.Country' - Pitcairn = ... # type: 'QLocale.Country' - Poland = ... # type: 'QLocale.Country' - Portugal = ... # type: 'QLocale.Country' - PuertoRico = ... # type: 'QLocale.Country' - Qatar = ... # type: 'QLocale.Country' - Reunion = ... # type: 'QLocale.Country' - Romania = ... # type: 'QLocale.Country' - RussianFederation = ... # type: 'QLocale.Country' - Rwanda = ... # type: 'QLocale.Country' - SaintKittsAndNevis = ... # type: 'QLocale.Country' - Samoa = ... # type: 'QLocale.Country' - SanMarino = ... # type: 'QLocale.Country' - SaoTomeAndPrincipe = ... # type: 'QLocale.Country' - SaudiArabia = ... # type: 'QLocale.Country' - Senegal = ... # type: 'QLocale.Country' - Seychelles = ... # type: 'QLocale.Country' - SierraLeone = ... # type: 'QLocale.Country' - Singapore = ... # type: 'QLocale.Country' - Slovakia = ... # type: 'QLocale.Country' - Slovenia = ... # type: 'QLocale.Country' - SolomonIslands = ... # type: 'QLocale.Country' - Somalia = ... # type: 'QLocale.Country' - SouthAfrica = ... # type: 'QLocale.Country' - SouthGeorgiaAndTheSouthSandwichIslands = ... # type: 'QLocale.Country' - Spain = ... # type: 'QLocale.Country' - SriLanka = ... # type: 'QLocale.Country' - Sudan = ... # type: 'QLocale.Country' - Suriname = ... # type: 'QLocale.Country' - SvalbardAndJanMayenIslands = ... # type: 'QLocale.Country' - Swaziland = ... # type: 'QLocale.Country' - Sweden = ... # type: 'QLocale.Country' - Switzerland = ... # type: 'QLocale.Country' - SyrianArabRepublic = ... # type: 'QLocale.Country' - Taiwan = ... # type: 'QLocale.Country' - Tajikistan = ... # type: 'QLocale.Country' - Tanzania = ... # type: 'QLocale.Country' - Thailand = ... # type: 'QLocale.Country' - Togo = ... # type: 'QLocale.Country' - Tokelau = ... # type: 'QLocale.Country' - TrinidadAndTobago = ... # type: 'QLocale.Country' - Tunisia = ... # type: 'QLocale.Country' - Turkey = ... # type: 'QLocale.Country' - Turkmenistan = ... # type: 'QLocale.Country' - TurksAndCaicosIslands = ... # type: 'QLocale.Country' - Tuvalu = ... # type: 'QLocale.Country' - Uganda = ... # type: 'QLocale.Country' - Ukraine = ... # type: 'QLocale.Country' - UnitedArabEmirates = ... # type: 'QLocale.Country' - UnitedKingdom = ... # type: 'QLocale.Country' - UnitedStates = ... # type: 'QLocale.Country' - UnitedStatesMinorOutlyingIslands = ... # type: 'QLocale.Country' - Uruguay = ... # type: 'QLocale.Country' - Uzbekistan = ... # type: 'QLocale.Country' - Vanuatu = ... # type: 'QLocale.Country' - VaticanCityState = ... # type: 'QLocale.Country' - Venezuela = ... # type: 'QLocale.Country' - BritishVirginIslands = ... # type: 'QLocale.Country' - WallisAndFutunaIslands = ... # type: 'QLocale.Country' - WesternSahara = ... # type: 'QLocale.Country' - Yemen = ... # type: 'QLocale.Country' - Zambia = ... # type: 'QLocale.Country' - Zimbabwe = ... # type: 'QLocale.Country' - Montenegro = ... # type: 'QLocale.Country' - Serbia = ... # type: 'QLocale.Country' - SaintBarthelemy = ... # type: 'QLocale.Country' - SaintMartin = ... # type: 'QLocale.Country' - LatinAmericaAndTheCaribbean = ... # type: 'QLocale.Country' - LastCountry = ... # type: 'QLocale.Country' - Brunei = ... # type: 'QLocale.Country' - CongoKinshasa = ... # type: 'QLocale.Country' - CongoBrazzaville = ... # type: 'QLocale.Country' - Fiji = ... # type: 'QLocale.Country' - Guernsey = ... # type: 'QLocale.Country' - NorthKorea = ... # type: 'QLocale.Country' - SouthKorea = ... # type: 'QLocale.Country' - Laos = ... # type: 'QLocale.Country' - Libya = ... # type: 'QLocale.Country' - CuraSao = ... # type: 'QLocale.Country' - PalestinianTerritories = ... # type: 'QLocale.Country' - Russia = ... # type: 'QLocale.Country' - SaintLucia = ... # type: 'QLocale.Country' - SaintVincentAndTheGrenadines = ... # type: 'QLocale.Country' - SaintHelena = ... # type: 'QLocale.Country' - SaintPierreAndMiquelon = ... # type: 'QLocale.Country' - Syria = ... # type: 'QLocale.Country' - Tonga = ... # type: 'QLocale.Country' - Vietnam = ... # type: 'QLocale.Country' - UnitedStatesVirginIslands = ... # type: 'QLocale.Country' - CanaryIslands = ... # type: 'QLocale.Country' - ClippertonIsland = ... # type: 'QLocale.Country' - AscensionIsland = ... # type: 'QLocale.Country' - AlandIslands = ... # type: 'QLocale.Country' - DiegoGarcia = ... # type: 'QLocale.Country' - CeutaAndMelilla = ... # type: 'QLocale.Country' - IsleOfMan = ... # type: 'QLocale.Country' - Jersey = ... # type: 'QLocale.Country' - TristanDaCunha = ... # type: 'QLocale.Country' - SouthSudan = ... # type: 'QLocale.Country' - Bonaire = ... # type: 'QLocale.Country' - SintMaarten = ... # type: 'QLocale.Country' - Kosovo = ... # type: 'QLocale.Country' - TokelauCountry = ... # type: 'QLocale.Country' - TuvaluCountry = ... # type: 'QLocale.Country' - EuropeanUnion = ... # type: 'QLocale.Country' - OutlyingOceania = ... # type: 'QLocale.Country' - - class Language(int): ... - C = ... # type: 'QLocale.Language' - Abkhazian = ... # type: 'QLocale.Language' - Afan = ... # type: 'QLocale.Language' - Afar = ... # type: 'QLocale.Language' - Afrikaans = ... # type: 'QLocale.Language' - Albanian = ... # type: 'QLocale.Language' - Amharic = ... # type: 'QLocale.Language' - Arabic = ... # type: 'QLocale.Language' - Armenian = ... # type: 'QLocale.Language' - Assamese = ... # type: 'QLocale.Language' - Aymara = ... # type: 'QLocale.Language' - Azerbaijani = ... # type: 'QLocale.Language' - Bashkir = ... # type: 'QLocale.Language' - Basque = ... # type: 'QLocale.Language' - Bengali = ... # type: 'QLocale.Language' - Bhutani = ... # type: 'QLocale.Language' - Bihari = ... # type: 'QLocale.Language' - Bislama = ... # type: 'QLocale.Language' - Breton = ... # type: 'QLocale.Language' - Bulgarian = ... # type: 'QLocale.Language' - Burmese = ... # type: 'QLocale.Language' - Byelorussian = ... # type: 'QLocale.Language' - Cambodian = ... # type: 'QLocale.Language' - Catalan = ... # type: 'QLocale.Language' - Chinese = ... # type: 'QLocale.Language' - Corsican = ... # type: 'QLocale.Language' - Croatian = ... # type: 'QLocale.Language' - Czech = ... # type: 'QLocale.Language' - Danish = ... # type: 'QLocale.Language' - Dutch = ... # type: 'QLocale.Language' - English = ... # type: 'QLocale.Language' - Esperanto = ... # type: 'QLocale.Language' - Estonian = ... # type: 'QLocale.Language' - Faroese = ... # type: 'QLocale.Language' - Finnish = ... # type: 'QLocale.Language' - French = ... # type: 'QLocale.Language' - Frisian = ... # type: 'QLocale.Language' - Gaelic = ... # type: 'QLocale.Language' - Galician = ... # type: 'QLocale.Language' - Georgian = ... # type: 'QLocale.Language' - German = ... # type: 'QLocale.Language' - Greek = ... # type: 'QLocale.Language' - Greenlandic = ... # type: 'QLocale.Language' - Guarani = ... # type: 'QLocale.Language' - Gujarati = ... # type: 'QLocale.Language' - Hausa = ... # type: 'QLocale.Language' - Hebrew = ... # type: 'QLocale.Language' - Hindi = ... # type: 'QLocale.Language' - Hungarian = ... # type: 'QLocale.Language' - Icelandic = ... # type: 'QLocale.Language' - Indonesian = ... # type: 'QLocale.Language' - Interlingua = ... # type: 'QLocale.Language' - Interlingue = ... # type: 'QLocale.Language' - Inuktitut = ... # type: 'QLocale.Language' - Inupiak = ... # type: 'QLocale.Language' - Irish = ... # type: 'QLocale.Language' - Italian = ... # type: 'QLocale.Language' - Japanese = ... # type: 'QLocale.Language' - Javanese = ... # type: 'QLocale.Language' - Kannada = ... # type: 'QLocale.Language' - Kashmiri = ... # type: 'QLocale.Language' - Kazakh = ... # type: 'QLocale.Language' - Kinyarwanda = ... # type: 'QLocale.Language' - Kirghiz = ... # type: 'QLocale.Language' - Korean = ... # type: 'QLocale.Language' - Kurdish = ... # type: 'QLocale.Language' - Kurundi = ... # type: 'QLocale.Language' - Latin = ... # type: 'QLocale.Language' - Latvian = ... # type: 'QLocale.Language' - Lingala = ... # type: 'QLocale.Language' - Lithuanian = ... # type: 'QLocale.Language' - Macedonian = ... # type: 'QLocale.Language' - Malagasy = ... # type: 'QLocale.Language' - Malay = ... # type: 'QLocale.Language' - Malayalam = ... # type: 'QLocale.Language' - Maltese = ... # type: 'QLocale.Language' - Maori = ... # type: 'QLocale.Language' - Marathi = ... # type: 'QLocale.Language' - Moldavian = ... # type: 'QLocale.Language' - Mongolian = ... # type: 'QLocale.Language' - NauruLanguage = ... # type: 'QLocale.Language' - Nepali = ... # type: 'QLocale.Language' - Norwegian = ... # type: 'QLocale.Language' - Occitan = ... # type: 'QLocale.Language' - Oriya = ... # type: 'QLocale.Language' - Pashto = ... # type: 'QLocale.Language' - Persian = ... # type: 'QLocale.Language' - Polish = ... # type: 'QLocale.Language' - Portuguese = ... # type: 'QLocale.Language' - Punjabi = ... # type: 'QLocale.Language' - Quechua = ... # type: 'QLocale.Language' - RhaetoRomance = ... # type: 'QLocale.Language' - Romanian = ... # type: 'QLocale.Language' - Russian = ... # type: 'QLocale.Language' - Samoan = ... # type: 'QLocale.Language' - Sanskrit = ... # type: 'QLocale.Language' - Serbian = ... # type: 'QLocale.Language' - SerboCroatian = ... # type: 'QLocale.Language' - Shona = ... # type: 'QLocale.Language' - Sindhi = ... # type: 'QLocale.Language' - Slovak = ... # type: 'QLocale.Language' - Slovenian = ... # type: 'QLocale.Language' - Somali = ... # type: 'QLocale.Language' - Spanish = ... # type: 'QLocale.Language' - Sundanese = ... # type: 'QLocale.Language' - Swahili = ... # type: 'QLocale.Language' - Swedish = ... # type: 'QLocale.Language' - Tagalog = ... # type: 'QLocale.Language' - Tajik = ... # type: 'QLocale.Language' - Tamil = ... # type: 'QLocale.Language' - Tatar = ... # type: 'QLocale.Language' - Telugu = ... # type: 'QLocale.Language' - Thai = ... # type: 'QLocale.Language' - Tibetan = ... # type: 'QLocale.Language' - Tigrinya = ... # type: 'QLocale.Language' - Tsonga = ... # type: 'QLocale.Language' - Turkish = ... # type: 'QLocale.Language' - Turkmen = ... # type: 'QLocale.Language' - Twi = ... # type: 'QLocale.Language' - Uigur = ... # type: 'QLocale.Language' - Ukrainian = ... # type: 'QLocale.Language' - Urdu = ... # type: 'QLocale.Language' - Uzbek = ... # type: 'QLocale.Language' - Vietnamese = ... # type: 'QLocale.Language' - Volapuk = ... # type: 'QLocale.Language' - Welsh = ... # type: 'QLocale.Language' - Wolof = ... # type: 'QLocale.Language' - Xhosa = ... # type: 'QLocale.Language' - Yiddish = ... # type: 'QLocale.Language' - Yoruba = ... # type: 'QLocale.Language' - Zhuang = ... # type: 'QLocale.Language' - Zulu = ... # type: 'QLocale.Language' - Bosnian = ... # type: 'QLocale.Language' - Divehi = ... # type: 'QLocale.Language' - Manx = ... # type: 'QLocale.Language' - Cornish = ... # type: 'QLocale.Language' - LastLanguage = ... # type: 'QLocale.Language' - NorwegianBokmal = ... # type: 'QLocale.Language' - NorwegianNynorsk = ... # type: 'QLocale.Language' - Akan = ... # type: 'QLocale.Language' - Konkani = ... # type: 'QLocale.Language' - Ga = ... # type: 'QLocale.Language' - Igbo = ... # type: 'QLocale.Language' - Kamba = ... # type: 'QLocale.Language' - Syriac = ... # type: 'QLocale.Language' - Blin = ... # type: 'QLocale.Language' - Geez = ... # type: 'QLocale.Language' - Koro = ... # type: 'QLocale.Language' - Sidamo = ... # type: 'QLocale.Language' - Atsam = ... # type: 'QLocale.Language' - Tigre = ... # type: 'QLocale.Language' - Jju = ... # type: 'QLocale.Language' - Friulian = ... # type: 'QLocale.Language' - Venda = ... # type: 'QLocale.Language' - Ewe = ... # type: 'QLocale.Language' - Walamo = ... # type: 'QLocale.Language' - Hawaiian = ... # type: 'QLocale.Language' - Tyap = ... # type: 'QLocale.Language' - Chewa = ... # type: 'QLocale.Language' - Filipino = ... # type: 'QLocale.Language' - SwissGerman = ... # type: 'QLocale.Language' - SichuanYi = ... # type: 'QLocale.Language' - Kpelle = ... # type: 'QLocale.Language' - LowGerman = ... # type: 'QLocale.Language' - SouthNdebele = ... # type: 'QLocale.Language' - NorthernSotho = ... # type: 'QLocale.Language' - NorthernSami = ... # type: 'QLocale.Language' - Taroko = ... # type: 'QLocale.Language' - Gusii = ... # type: 'QLocale.Language' - Taita = ... # type: 'QLocale.Language' - Fulah = ... # type: 'QLocale.Language' - Kikuyu = ... # type: 'QLocale.Language' - Samburu = ... # type: 'QLocale.Language' - Sena = ... # type: 'QLocale.Language' - NorthNdebele = ... # type: 'QLocale.Language' - Rombo = ... # type: 'QLocale.Language' - Tachelhit = ... # type: 'QLocale.Language' - Kabyle = ... # type: 'QLocale.Language' - Nyankole = ... # type: 'QLocale.Language' - Bena = ... # type: 'QLocale.Language' - Vunjo = ... # type: 'QLocale.Language' - Bambara = ... # type: 'QLocale.Language' - Embu = ... # type: 'QLocale.Language' - Cherokee = ... # type: 'QLocale.Language' - Morisyen = ... # type: 'QLocale.Language' - Makonde = ... # type: 'QLocale.Language' - Langi = ... # type: 'QLocale.Language' - Ganda = ... # type: 'QLocale.Language' - Bemba = ... # type: 'QLocale.Language' - Kabuverdianu = ... # type: 'QLocale.Language' - Meru = ... # type: 'QLocale.Language' - Kalenjin = ... # type: 'QLocale.Language' - Nama = ... # type: 'QLocale.Language' - Machame = ... # type: 'QLocale.Language' - Colognian = ... # type: 'QLocale.Language' - Masai = ... # type: 'QLocale.Language' - Soga = ... # type: 'QLocale.Language' - Luyia = ... # type: 'QLocale.Language' - Asu = ... # type: 'QLocale.Language' - Teso = ... # type: 'QLocale.Language' - Saho = ... # type: 'QLocale.Language' - KoyraChiini = ... # type: 'QLocale.Language' - Rwa = ... # type: 'QLocale.Language' - Luo = ... # type: 'QLocale.Language' - Chiga = ... # type: 'QLocale.Language' - CentralMoroccoTamazight = ... # type: 'QLocale.Language' - KoyraboroSenni = ... # type: 'QLocale.Language' - Shambala = ... # type: 'QLocale.Language' - AnyLanguage = ... # type: 'QLocale.Language' - Rundi = ... # type: 'QLocale.Language' - Bodo = ... # type: 'QLocale.Language' - Aghem = ... # type: 'QLocale.Language' - Basaa = ... # type: 'QLocale.Language' - Zarma = ... # type: 'QLocale.Language' - Duala = ... # type: 'QLocale.Language' - JolaFonyi = ... # type: 'QLocale.Language' - Ewondo = ... # type: 'QLocale.Language' - Bafia = ... # type: 'QLocale.Language' - LubaKatanga = ... # type: 'QLocale.Language' - MakhuwaMeetto = ... # type: 'QLocale.Language' - Mundang = ... # type: 'QLocale.Language' - Kwasio = ... # type: 'QLocale.Language' - Nuer = ... # type: 'QLocale.Language' - Sakha = ... # type: 'QLocale.Language' - Sangu = ... # type: 'QLocale.Language' - CongoSwahili = ... # type: 'QLocale.Language' - Tasawaq = ... # type: 'QLocale.Language' - Vai = ... # type: 'QLocale.Language' - Walser = ... # type: 'QLocale.Language' - Yangben = ... # type: 'QLocale.Language' - Oromo = ... # type: 'QLocale.Language' - Dzongkha = ... # type: 'QLocale.Language' - Belarusian = ... # type: 'QLocale.Language' - Khmer = ... # type: 'QLocale.Language' - Fijian = ... # type: 'QLocale.Language' - WesternFrisian = ... # type: 'QLocale.Language' - Lao = ... # type: 'QLocale.Language' - Marshallese = ... # type: 'QLocale.Language' - Romansh = ... # type: 'QLocale.Language' - Sango = ... # type: 'QLocale.Language' - Ossetic = ... # type: 'QLocale.Language' - SouthernSotho = ... # type: 'QLocale.Language' - Tswana = ... # type: 'QLocale.Language' - Sinhala = ... # type: 'QLocale.Language' - Swati = ... # type: 'QLocale.Language' - Sardinian = ... # type: 'QLocale.Language' - Tongan = ... # type: 'QLocale.Language' - Tahitian = ... # type: 'QLocale.Language' - Nyanja = ... # type: 'QLocale.Language' - Avaric = ... # type: 'QLocale.Language' - Chamorro = ... # type: 'QLocale.Language' - Chechen = ... # type: 'QLocale.Language' - Church = ... # type: 'QLocale.Language' - Chuvash = ... # type: 'QLocale.Language' - Cree = ... # type: 'QLocale.Language' - Haitian = ... # type: 'QLocale.Language' - Herero = ... # type: 'QLocale.Language' - HiriMotu = ... # type: 'QLocale.Language' - Kanuri = ... # type: 'QLocale.Language' - Komi = ... # type: 'QLocale.Language' - Kongo = ... # type: 'QLocale.Language' - Kwanyama = ... # type: 'QLocale.Language' - Limburgish = ... # type: 'QLocale.Language' - Luxembourgish = ... # type: 'QLocale.Language' - Navaho = ... # type: 'QLocale.Language' - Ndonga = ... # type: 'QLocale.Language' - Ojibwa = ... # type: 'QLocale.Language' - Pali = ... # type: 'QLocale.Language' - Walloon = ... # type: 'QLocale.Language' - Avestan = ... # type: 'QLocale.Language' - Asturian = ... # type: 'QLocale.Language' - Ngomba = ... # type: 'QLocale.Language' - Kako = ... # type: 'QLocale.Language' - Meta = ... # type: 'QLocale.Language' - Ngiemboon = ... # type: 'QLocale.Language' - Uighur = ... # type: 'QLocale.Language' - Aragonese = ... # type: 'QLocale.Language' - Akkadian = ... # type: 'QLocale.Language' - AncientEgyptian = ... # type: 'QLocale.Language' - AncientGreek = ... # type: 'QLocale.Language' - Aramaic = ... # type: 'QLocale.Language' - Balinese = ... # type: 'QLocale.Language' - Bamun = ... # type: 'QLocale.Language' - BatakToba = ... # type: 'QLocale.Language' - Buginese = ... # type: 'QLocale.Language' - Buhid = ... # type: 'QLocale.Language' - Carian = ... # type: 'QLocale.Language' - Chakma = ... # type: 'QLocale.Language' - ClassicalMandaic = ... # type: 'QLocale.Language' - Coptic = ... # type: 'QLocale.Language' - Dogri = ... # type: 'QLocale.Language' - EasternCham = ... # type: 'QLocale.Language' - EasternKayah = ... # type: 'QLocale.Language' - Etruscan = ... # type: 'QLocale.Language' - Gothic = ... # type: 'QLocale.Language' - Hanunoo = ... # type: 'QLocale.Language' - Ingush = ... # type: 'QLocale.Language' - LargeFloweryMiao = ... # type: 'QLocale.Language' - Lepcha = ... # type: 'QLocale.Language' - Limbu = ... # type: 'QLocale.Language' - Lisu = ... # type: 'QLocale.Language' - Lu = ... # type: 'QLocale.Language' - Lycian = ... # type: 'QLocale.Language' - Lydian = ... # type: 'QLocale.Language' - Mandingo = ... # type: 'QLocale.Language' - Manipuri = ... # type: 'QLocale.Language' - Meroitic = ... # type: 'QLocale.Language' - NorthernThai = ... # type: 'QLocale.Language' - OldIrish = ... # type: 'QLocale.Language' - OldNorse = ... # type: 'QLocale.Language' - OldPersian = ... # type: 'QLocale.Language' - OldTurkish = ... # type: 'QLocale.Language' - Pahlavi = ... # type: 'QLocale.Language' - Parthian = ... # type: 'QLocale.Language' - Phoenician = ... # type: 'QLocale.Language' - PrakritLanguage = ... # type: 'QLocale.Language' - Rejang = ... # type: 'QLocale.Language' - Sabaean = ... # type: 'QLocale.Language' - Samaritan = ... # type: 'QLocale.Language' - Santali = ... # type: 'QLocale.Language' - Saurashtra = ... # type: 'QLocale.Language' - Sora = ... # type: 'QLocale.Language' - Sylheti = ... # type: 'QLocale.Language' - Tagbanwa = ... # type: 'QLocale.Language' - TaiDam = ... # type: 'QLocale.Language' - TaiNua = ... # type: 'QLocale.Language' - Ugaritic = ... # type: 'QLocale.Language' - Akoose = ... # type: 'QLocale.Language' - Lakota = ... # type: 'QLocale.Language' - StandardMoroccanTamazight = ... # type: 'QLocale.Language' - Mapuche = ... # type: 'QLocale.Language' - CentralKurdish = ... # type: 'QLocale.Language' - LowerSorbian = ... # type: 'QLocale.Language' - UpperSorbian = ... # type: 'QLocale.Language' - Kenyang = ... # type: 'QLocale.Language' - Mohawk = ... # type: 'QLocale.Language' - Nko = ... # type: 'QLocale.Language' - Prussian = ... # type: 'QLocale.Language' - Kiche = ... # type: 'QLocale.Language' - SouthernSami = ... # type: 'QLocale.Language' - LuleSami = ... # type: 'QLocale.Language' - InariSami = ... # type: 'QLocale.Language' - SkoltSami = ... # type: 'QLocale.Language' - Warlpiri = ... # type: 'QLocale.Language' - ManichaeanMiddlePersian = ... # type: 'QLocale.Language' - Mende = ... # type: 'QLocale.Language' - AncientNorthArabian = ... # type: 'QLocale.Language' - LinearA = ... # type: 'QLocale.Language' - HmongNjua = ... # type: 'QLocale.Language' - Ho = ... # type: 'QLocale.Language' - Lezghian = ... # type: 'QLocale.Language' - Bassa = ... # type: 'QLocale.Language' - Mono = ... # type: 'QLocale.Language' - TedimChin = ... # type: 'QLocale.Language' - Maithili = ... # type: 'QLocale.Language' - Ahom = ... # type: 'QLocale.Language' - AmericanSignLanguage = ... # type: 'QLocale.Language' - ArdhamagadhiPrakrit = ... # type: 'QLocale.Language' - Bhojpuri = ... # type: 'QLocale.Language' - HieroglyphicLuwian = ... # type: 'QLocale.Language' - LiteraryChinese = ... # type: 'QLocale.Language' - Mazanderani = ... # type: 'QLocale.Language' - Mru = ... # type: 'QLocale.Language' - Newari = ... # type: 'QLocale.Language' - NorthernLuri = ... # type: 'QLocale.Language' - Palauan = ... # type: 'QLocale.Language' - Papiamento = ... # type: 'QLocale.Language' - Saraiki = ... # type: 'QLocale.Language' - TokelauLanguage = ... # type: 'QLocale.Language' - TokPisin = ... # type: 'QLocale.Language' - TuvaluLanguage = ... # type: 'QLocale.Language' - UncodedLanguages = ... # type: 'QLocale.Language' - Cantonese = ... # type: 'QLocale.Language' - Osage = ... # type: 'QLocale.Language' - Tangut = ... # type: 'QLocale.Language' - - class NumberOptions(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QLocale.NumberOptions', 'QLocale.NumberOption']) -> None: ... - @typing.overload - def __init__(self, a0: 'QLocale.NumberOptions') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QLocale.NumberOptions': ... - def __int__(self) -> int: ... - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, name: str) -> None: ... - @typing.overload - def __init__(self, language: 'QLocale.Language', country: 'QLocale.Country' = ...) -> None: ... - @typing.overload - def __init__(self, other: 'QLocale') -> None: ... - @typing.overload - def __init__(self, language: 'QLocale.Language', script: 'QLocale.Script', country: 'QLocale.Country') -> None: ... - - def swap(self, other: 'QLocale') -> None: ... - def __hash__(self) -> int: ... - def createSeparatedList(self, list: typing.Iterable[str]) -> str: ... - def quoteString(self, str: str, style: 'QLocale.QuotationStyle' = ...) -> str: ... - @staticmethod - def matchingLocales(language: 'QLocale.Language', script: 'QLocale.Script', country: 'QLocale.Country') -> typing.Any: ... - @staticmethod - def scriptToString(script: 'QLocale.Script') -> str: ... - def uiLanguages(self) -> typing.List[str]: ... - @typing.overload - def toCurrencyString(self, value: int, symbol: str = ...) -> str: ... - @typing.overload - def toCurrencyString(self, value: float, symbol: str = ...) -> str: ... - @typing.overload - def toCurrencyString(self, value: float, symbol: str, precision: int) -> str: ... - @typing.overload - def toCurrencyString(self, value: int, symbol: str = ...) -> str: ... - @typing.overload - def toCurrencyString(self, value: int, symbol: str = ...) -> str: ... - def currencySymbol(self, format: 'QLocale.CurrencySymbolFormat' = ...) -> str: ... - def toLower(self, str: str) -> str: ... - def toUpper(self, str: str) -> str: ... - def weekdays(self) -> typing.List[Qt.DayOfWeek]: ... - def firstDayOfWeek(self) -> Qt.DayOfWeek: ... - def nativeCountryName(self) -> str: ... - def nativeLanguageName(self) -> str: ... - def bcp47Name(self) -> str: ... - def script(self) -> 'QLocale.Script': ... - def textDirection(self) -> Qt.LayoutDirection: ... - def pmText(self) -> str: ... - def amText(self) -> str: ... - def standaloneDayName(self, a0: int, format: 'QLocale.FormatType' = ...) -> str: ... - def standaloneMonthName(self, a0: int, format: 'QLocale.FormatType' = ...) -> str: ... - def positiveSign(self) -> str: ... - def measurementSystem(self) -> 'QLocale.MeasurementSystem': ... - def numberOptions(self) -> 'QLocale.NumberOptions': ... - def setNumberOptions(self, options: typing.Union['QLocale.NumberOptions', 'QLocale.NumberOption']) -> None: ... - def dayName(self, a0: int, format: 'QLocale.FormatType' = ...) -> str: ... - def monthName(self, a0: int, format: 'QLocale.FormatType' = ...) -> str: ... - def exponential(self) -> str: ... - def negativeSign(self) -> str: ... - def zeroDigit(self) -> str: ... - def percent(self) -> str: ... - def groupSeparator(self) -> str: ... - def decimalPoint(self) -> str: ... - @typing.overload - def toDateTime(self, string: str, format: 'QLocale.FormatType' = ...) -> QDateTime: ... - @typing.overload - def toDateTime(self, string: str, format: str) -> QDateTime: ... - @typing.overload - def toTime(self, string: str, format: 'QLocale.FormatType' = ...) -> QTime: ... - @typing.overload - def toTime(self, string: str, format: str) -> QTime: ... - @typing.overload - def toDate(self, string: str, format: 'QLocale.FormatType' = ...) -> QDate: ... - @typing.overload - def toDate(self, string: str, format: str) -> QDate: ... - def dateTimeFormat(self, format: 'QLocale.FormatType' = ...) -> str: ... - def timeFormat(self, format: 'QLocale.FormatType' = ...) -> str: ... - def dateFormat(self, format: 'QLocale.FormatType' = ...) -> str: ... - @staticmethod - def system() -> 'QLocale': ... - @staticmethod - def c() -> 'QLocale': ... - @staticmethod - def setDefault(locale: 'QLocale') -> None: ... - @staticmethod - def countryToString(country: 'QLocale.Country') -> str: ... - @staticmethod - def languageToString(language: 'QLocale.Language') -> str: ... - @typing.overload - def toString(self, i: int) -> str: ... - @typing.overload - def toString(self, i: float, format: str = ..., precision: int = ...) -> str: ... - @typing.overload - def toString(self, i: int) -> str: ... - @typing.overload - def toString(self, i: int) -> str: ... - @typing.overload - def toString(self, dateTime: typing.Union[QDateTime, datetime.datetime], format: str) -> str: ... - @typing.overload - def toString(self, dateTime: typing.Union[QDateTime, datetime.datetime], format: 'QLocale.FormatType' = ...) -> str: ... - @typing.overload - def toString(self, date: typing.Union[QDate, datetime.date], formatStr: str) -> str: ... - @typing.overload - def toString(self, date: typing.Union[QDate, datetime.date], format: 'QLocale.FormatType' = ...) -> str: ... - @typing.overload - def toString(self, time: typing.Union[QTime, datetime.time], formatStr: str) -> str: ... - @typing.overload - def toString(self, time: typing.Union[QTime, datetime.time], format: 'QLocale.FormatType' = ...) -> str: ... - def toDouble(self, s: str) -> typing.Tuple[float, bool]: ... - def toFloat(self, s: str) -> typing.Tuple[float, bool]: ... - def toULongLong(self, s: str) -> typing.Tuple[int, bool]: ... - def toLongLong(self, s: str) -> typing.Tuple[int, bool]: ... - def toUInt(self, s: str) -> typing.Tuple[int, bool]: ... - def toInt(self, s: str) -> typing.Tuple[int, bool]: ... - def toUShort(self, s: str) -> typing.Tuple[int, bool]: ... - def toShort(self, s: str) -> typing.Tuple[int, bool]: ... - def name(self) -> str: ... - def country(self) -> 'QLocale.Country': ... - def language(self) -> 'QLocale.Language': ... - - -class QLockFile(sip.simplewrapper): - - class LockError(int): ... - NoError = ... # type: 'QLockFile.LockError' - LockFailedError = ... # type: 'QLockFile.LockError' - PermissionError = ... # type: 'QLockFile.LockError' - UnknownError = ... # type: 'QLockFile.LockError' - - def __init__(self, fileName: str) -> None: ... - - def error(self) -> 'QLockFile.LockError': ... - def removeStaleLockFile(self) -> bool: ... - def getLockInfo(self) -> typing.Tuple[bool, int, str, str]: ... - def isLocked(self) -> bool: ... - def staleLockTime(self) -> int: ... - def setStaleLockTime(self, a0: int) -> None: ... - def unlock(self) -> None: ... - def tryLock(self, timeout: int = ...) -> bool: ... - def lock(self) -> bool: ... - - -class QMessageLogContext(sip.simplewrapper): - - category = ... # type: str - file = ... # type: str - function = ... # type: str - line = ... # type: int - - -class QMessageLogger(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, file: str, line: int, function: str) -> None: ... - @typing.overload - def __init__(self, file: str, line: int, function: str, category: str) -> None: ... - - def info(self, msg: str) -> None: ... - def fatal(self, msg: str) -> None: ... - def critical(self, msg: str) -> None: ... - def warning(self, msg: str) -> None: ... - def debug(self, msg: str) -> None: ... - - -class QMargins(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, aleft: int, atop: int, aright: int, abottom: int) -> None: ... - @typing.overload - def __init__(self, a0: 'QMargins') -> None: ... - - def __neg__(self) -> 'QMargins': ... - def __pos__(self) -> 'QMargins': ... - def setBottom(self, abottom: int) -> None: ... - def setRight(self, aright: int) -> None: ... - def setTop(self, atop: int) -> None: ... - def setLeft(self, aleft: int) -> None: ... - def bottom(self) -> int: ... - def right(self) -> int: ... - def top(self) -> int: ... - def left(self) -> int: ... - def isNull(self) -> bool: ... - - -class QMarginsF(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, aleft: float, atop: float, aright: float, abottom: float) -> None: ... - @typing.overload - def __init__(self, margins: QMargins) -> None: ... - @typing.overload - def __init__(self, a0: 'QMarginsF') -> None: ... - - def __neg__(self) -> 'QMarginsF': ... - def __pos__(self) -> 'QMarginsF': ... - def toMargins(self) -> QMargins: ... - def setBottom(self, abottom: float) -> None: ... - def setRight(self, aright: float) -> None: ... - def setTop(self, atop: float) -> None: ... - def setLeft(self, aleft: float) -> None: ... - def bottom(self) -> float: ... - def right(self) -> float: ... - def top(self) -> float: ... - def left(self) -> float: ... - def isNull(self) -> bool: ... - - -class QMessageAuthenticationCode(sip.simplewrapper): - - def __init__(self, method: QCryptographicHash.Algorithm, key: typing.Union[QByteArray, bytes, bytearray] = ...) -> None: ... - - @staticmethod - def hash(message: typing.Union[QByteArray, bytes, bytearray], key: typing.Union[QByteArray, bytes, bytearray], method: QCryptographicHash.Algorithm) -> QByteArray: ... - def result(self) -> QByteArray: ... - @typing.overload - def addData(self, data: str, length: int) -> None: ... - @typing.overload - def addData(self, data: typing.Union[QByteArray, bytes, bytearray]) -> None: ... - @typing.overload - def addData(self, device: QIODevice) -> bool: ... - def setKey(self, key: typing.Union[QByteArray, bytes, bytearray]) -> None: ... - def reset(self) -> None: ... - - -class QMetaMethod(sip.simplewrapper): - - class MethodType(int): ... - Method = ... # type: 'QMetaMethod.MethodType' - Signal = ... # type: 'QMetaMethod.MethodType' - Slot = ... # type: 'QMetaMethod.MethodType' - Constructor = ... # type: 'QMetaMethod.MethodType' - - class Access(int): ... - Private = ... # type: 'QMetaMethod.Access' - Protected = ... # type: 'QMetaMethod.Access' - Public = ... # type: 'QMetaMethod.Access' - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QMetaMethod') -> None: ... - - def parameterType(self, index: int) -> int: ... - def parameterCount(self) -> int: ... - def returnType(self) -> int: ... - def name(self) -> QByteArray: ... - def methodSignature(self) -> QByteArray: ... - def isValid(self) -> bool: ... - def methodIndex(self) -> int: ... - @typing.overload - def invoke(self, object: QObject, connectionType: Qt.ConnectionType, returnValue: 'QGenericReturnArgument', value0: 'QGenericArgument' = ..., value1: 'QGenericArgument' = ..., value2: 'QGenericArgument' = ..., value3: 'QGenericArgument' = ..., value4: 'QGenericArgument' = ..., value5: 'QGenericArgument' = ..., value6: 'QGenericArgument' = ..., value7: 'QGenericArgument' = ..., value8: 'QGenericArgument' = ..., value9: 'QGenericArgument' = ...) -> typing.Any: ... - @typing.overload - def invoke(self, object: QObject, returnValue: 'QGenericReturnArgument', value0: 'QGenericArgument' = ..., value1: 'QGenericArgument' = ..., value2: 'QGenericArgument' = ..., value3: 'QGenericArgument' = ..., value4: 'QGenericArgument' = ..., value5: 'QGenericArgument' = ..., value6: 'QGenericArgument' = ..., value7: 'QGenericArgument' = ..., value8: 'QGenericArgument' = ..., value9: 'QGenericArgument' = ...) -> typing.Any: ... - @typing.overload - def invoke(self, object: QObject, connectionType: Qt.ConnectionType, value0: 'QGenericArgument' = ..., value1: 'QGenericArgument' = ..., value2: 'QGenericArgument' = ..., value3: 'QGenericArgument' = ..., value4: 'QGenericArgument' = ..., value5: 'QGenericArgument' = ..., value6: 'QGenericArgument' = ..., value7: 'QGenericArgument' = ..., value8: 'QGenericArgument' = ..., value9: 'QGenericArgument' = ...) -> typing.Any: ... - @typing.overload - def invoke(self, object: QObject, value0: 'QGenericArgument' = ..., value1: 'QGenericArgument' = ..., value2: 'QGenericArgument' = ..., value3: 'QGenericArgument' = ..., value4: 'QGenericArgument' = ..., value5: 'QGenericArgument' = ..., value6: 'QGenericArgument' = ..., value7: 'QGenericArgument' = ..., value8: 'QGenericArgument' = ..., value9: 'QGenericArgument' = ...) -> typing.Any: ... - def methodType(self) -> 'QMetaMethod.MethodType': ... - def access(self) -> 'QMetaMethod.Access': ... - def tag(self) -> str: ... - def parameterNames(self) -> typing.List[QByteArray]: ... - def parameterTypes(self) -> typing.List[QByteArray]: ... - def typeName(self) -> str: ... - - -class QMetaEnum(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QMetaEnum') -> None: ... - - def isValid(self) -> bool: ... - def valueToKeys(self, value: int) -> QByteArray: ... - def keysToValue(self, keys: str) -> typing.Tuple[int, bool]: ... - def valueToKey(self, value: int) -> str: ... - def keyToValue(self, key: str) -> typing.Tuple[int, bool]: ... - def scope(self) -> str: ... - def value(self, index: int) -> int: ... - def key(self, index: int) -> str: ... - def keyCount(self) -> int: ... - def isFlag(self) -> bool: ... - def name(self) -> str: ... - - -class QMetaProperty(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QMetaProperty') -> None: ... - - def isFinal(self) -> bool: ... - def isConstant(self) -> bool: ... - def propertyIndex(self) -> int: ... - def notifySignalIndex(self) -> int: ... - def notifySignal(self) -> QMetaMethod: ... - def hasNotifySignal(self) -> bool: ... - def userType(self) -> int: ... - def isUser(self, object: typing.Optional[QObject] = ...) -> bool: ... - def isResettable(self) -> bool: ... - def isValid(self) -> bool: ... - def hasStdCppSet(self) -> bool: ... - def reset(self, obj: QObject) -> bool: ... - def write(self, obj: QObject, value: typing.Any) -> bool: ... - def read(self, obj: QObject) -> typing.Any: ... - def enumerator(self) -> QMetaEnum: ... - def isEnumType(self) -> bool: ... - def isFlagType(self) -> bool: ... - def isStored(self, object: typing.Optional[QObject] = ...) -> bool: ... - def isScriptable(self, object: typing.Optional[QObject] = ...) -> bool: ... - def isDesignable(self, object: typing.Optional[QObject] = ...) -> bool: ... - def isWritable(self) -> bool: ... - def isReadable(self) -> bool: ... - def type(self) -> 'QVariant.Type': ... - def typeName(self) -> str: ... - def name(self) -> str: ... - - -class QMetaClassInfo(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QMetaClassInfo') -> None: ... - - def value(self) -> str: ... - def name(self) -> str: ... - - -class QMetaType(sip.simplewrapper): - - class TypeFlag(int): ... - NeedsConstruction = ... # type: 'QMetaType.TypeFlag' - NeedsDestruction = ... # type: 'QMetaType.TypeFlag' - MovableType = ... # type: 'QMetaType.TypeFlag' - IsGadget = ... # type: 'QMetaType.TypeFlag' - - class Type(int): ... - UnknownType = ... # type: 'QMetaType.Type' - Void = ... # type: 'QMetaType.Type' - Bool = ... # type: 'QMetaType.Type' - Int = ... # type: 'QMetaType.Type' - UInt = ... # type: 'QMetaType.Type' - LongLong = ... # type: 'QMetaType.Type' - ULongLong = ... # type: 'QMetaType.Type' - Double = ... # type: 'QMetaType.Type' - QChar = ... # type: 'QMetaType.Type' - QVariantMap = ... # type: 'QMetaType.Type' - QVariantList = ... # type: 'QMetaType.Type' - QVariantHash = ... # type: 'QMetaType.Type' - QString = ... # type: 'QMetaType.Type' - QStringList = ... # type: 'QMetaType.Type' - QByteArray = ... # type: 'QMetaType.Type' - QBitArray = ... # type: 'QMetaType.Type' - QDate = ... # type: 'QMetaType.Type' - QTime = ... # type: 'QMetaType.Type' - QDateTime = ... # type: 'QMetaType.Type' - QUrl = ... # type: 'QMetaType.Type' - QLocale = ... # type: 'QMetaType.Type' - QRect = ... # type: 'QMetaType.Type' - QRectF = ... # type: 'QMetaType.Type' - QSize = ... # type: 'QMetaType.Type' - QSizeF = ... # type: 'QMetaType.Type' - QLine = ... # type: 'QMetaType.Type' - QLineF = ... # type: 'QMetaType.Type' - QPoint = ... # type: 'QMetaType.Type' - QPointF = ... # type: 'QMetaType.Type' - QRegExp = ... # type: 'QMetaType.Type' - LastCoreType = ... # type: 'QMetaType.Type' - FirstGuiType = ... # type: 'QMetaType.Type' - QFont = ... # type: 'QMetaType.Type' - QPixmap = ... # type: 'QMetaType.Type' - QBrush = ... # type: 'QMetaType.Type' - QColor = ... # type: 'QMetaType.Type' - QPalette = ... # type: 'QMetaType.Type' - QIcon = ... # type: 'QMetaType.Type' - QImage = ... # type: 'QMetaType.Type' - QPolygon = ... # type: 'QMetaType.Type' - QRegion = ... # type: 'QMetaType.Type' - QBitmap = ... # type: 'QMetaType.Type' - QCursor = ... # type: 'QMetaType.Type' - QSizePolicy = ... # type: 'QMetaType.Type' - QKeySequence = ... # type: 'QMetaType.Type' - QPen = ... # type: 'QMetaType.Type' - QTextLength = ... # type: 'QMetaType.Type' - QTextFormat = ... # type: 'QMetaType.Type' - QMatrix = ... # type: 'QMetaType.Type' - QTransform = ... # type: 'QMetaType.Type' - VoidStar = ... # type: 'QMetaType.Type' - Long = ... # type: 'QMetaType.Type' - Short = ... # type: 'QMetaType.Type' - Char = ... # type: 'QMetaType.Type' - ULong = ... # type: 'QMetaType.Type' - UShort = ... # type: 'QMetaType.Type' - UChar = ... # type: 'QMetaType.Type' - Float = ... # type: 'QMetaType.Type' - QObjectStar = ... # type: 'QMetaType.Type' - QMatrix4x4 = ... # type: 'QMetaType.Type' - QVector2D = ... # type: 'QMetaType.Type' - QVector3D = ... # type: 'QMetaType.Type' - QVector4D = ... # type: 'QMetaType.Type' - QQuaternion = ... # type: 'QMetaType.Type' - QEasingCurve = ... # type: 'QMetaType.Type' - QVariant = ... # type: 'QMetaType.Type' - QUuid = ... # type: 'QMetaType.Type' - QModelIndex = ... # type: 'QMetaType.Type' - QPolygonF = ... # type: 'QMetaType.Type' - SChar = ... # type: 'QMetaType.Type' - QRegularExpression = ... # type: 'QMetaType.Type' - QJsonValue = ... # type: 'QMetaType.Type' - QJsonObject = ... # type: 'QMetaType.Type' - QJsonArray = ... # type: 'QMetaType.Type' - QJsonDocument = ... # type: 'QMetaType.Type' - QByteArrayList = ... # type: 'QMetaType.Type' - QPersistentModelIndex = ... # type: 'QMetaType.Type' - User = ... # type: 'QMetaType.Type' - - class TypeFlags(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QMetaType.TypeFlags', 'QMetaType.TypeFlag']) -> None: ... - @typing.overload - def __init__(self, a0: 'QMetaType.TypeFlags') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QMetaType.TypeFlags': ... - def __int__(self) -> int: ... - - def __init__(self, type: int) -> None: ... - - @staticmethod - def metaObjectForType(type: int) -> 'QMetaObject': ... - def isValid(self) -> bool: ... - def flags(self) -> 'QMetaType.TypeFlags': ... - @staticmethod - def typeFlags(type: int) -> 'QMetaType.TypeFlags': ... - @typing.overload - @staticmethod - def isRegistered(type: int) -> bool: ... - @typing.overload - def isRegistered(self) -> bool: ... - @staticmethod - def typeName(type: int) -> str: ... - @staticmethod - def type(typeName: str) -> int: ... - - -class QMimeData(QObject): - - def __init__(self) -> None: ... - - def retrieveData(self, mimetype: str, preferredType: 'QVariant.Type') -> typing.Any: ... - def removeFormat(self, mimetype: str) -> None: ... - def clear(self) -> None: ... - def formats(self) -> typing.List[str]: ... - def hasFormat(self, mimetype: str) -> bool: ... - def setData(self, mimetype: str, data: typing.Union[QByteArray, bytes, bytearray]) -> None: ... - def data(self, mimetype: str) -> QByteArray: ... - def hasColor(self) -> bool: ... - def setColorData(self, color: typing.Any) -> None: ... - def colorData(self) -> typing.Any: ... - def hasImage(self) -> bool: ... - def setImageData(self, image: typing.Any) -> None: ... - def imageData(self) -> typing.Any: ... - def hasHtml(self) -> bool: ... - def setHtml(self, html: str) -> None: ... - def html(self) -> str: ... - def hasText(self) -> bool: ... - def setText(self, text: str) -> None: ... - def text(self) -> str: ... - def hasUrls(self) -> bool: ... - def setUrls(self, urls: typing.Iterable['QUrl']) -> None: ... - def urls(self) -> typing.Any: ... - - -class QMimeDatabase(sip.simplewrapper): - - class MatchMode(int): ... - MatchDefault = ... # type: 'QMimeDatabase.MatchMode' - MatchExtension = ... # type: 'QMimeDatabase.MatchMode' - MatchContent = ... # type: 'QMimeDatabase.MatchMode' - - def __init__(self) -> None: ... - - def allMimeTypes(self) -> typing.List['QMimeType']: ... - def suffixForFileName(self, fileName: str) -> str: ... - @typing.overload - def mimeTypeForFileNameAndData(self, fileName: str, device: QIODevice) -> 'QMimeType': ... - @typing.overload - def mimeTypeForFileNameAndData(self, fileName: str, data: typing.Union[QByteArray, bytes, bytearray]) -> 'QMimeType': ... - def mimeTypeForUrl(self, url: 'QUrl') -> 'QMimeType': ... - @typing.overload - def mimeTypeForData(self, data: typing.Union[QByteArray, bytes, bytearray]) -> 'QMimeType': ... - @typing.overload - def mimeTypeForData(self, device: QIODevice) -> 'QMimeType': ... - def mimeTypesForFileName(self, fileName: str) -> typing.Any: ... - @typing.overload - def mimeTypeForFile(self, fileName: str, mode: 'QMimeDatabase.MatchMode' = ...) -> 'QMimeType': ... - @typing.overload - def mimeTypeForFile(self, fileInfo: QFileInfo, mode: 'QMimeDatabase.MatchMode' = ...) -> 'QMimeType': ... - def mimeTypeForName(self, nameOrAlias: str) -> 'QMimeType': ... - - -class QMimeType(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, other: 'QMimeType') -> None: ... - - def __hash__(self) -> int: ... - def filterString(self) -> str: ... - def inherits(self, mimeTypeName: str) -> bool: ... - def preferredSuffix(self) -> str: ... - def suffixes(self) -> typing.List[str]: ... - def aliases(self) -> typing.List[str]: ... - def allAncestors(self) -> typing.List[str]: ... - def parentMimeTypes(self) -> typing.List[str]: ... - def globPatterns(self) -> typing.List[str]: ... - def iconName(self) -> str: ... - def genericIconName(self) -> str: ... - def comment(self) -> str: ... - def name(self) -> str: ... - def isDefault(self) -> bool: ... - def isValid(self) -> bool: ... - def swap(self, other: 'QMimeType') -> None: ... - - -class QMutexLocker(sip.simplewrapper): - - def __init__(self, m: 'QMutex') -> None: ... - - def __exit__(self, type: typing.Any, value: typing.Any, traceback: typing.Any) -> None: ... - def __enter__(self) -> typing.Any: ... - def mutex(self) -> 'QMutex': ... - def relock(self) -> None: ... - def unlock(self) -> None: ... - - -class QMutex(sip.simplewrapper): - - class RecursionMode(int): ... - NonRecursive = ... # type: 'QMutex.RecursionMode' - Recursive = ... # type: 'QMutex.RecursionMode' - - def __init__(self, mode: 'QMutex.RecursionMode' = ...) -> None: ... - - def isRecursive(self) -> bool: ... - def unlock(self) -> None: ... - def tryLock(self, timeout: int = ...) -> bool: ... - def lock(self) -> None: ... - - -class QSignalBlocker(sip.simplewrapper): - - def __init__(self, o: QObject) -> None: ... - - def __exit__(self, type: typing.Any, value: typing.Any, traceback: typing.Any) -> None: ... - def __enter__(self) -> typing.Any: ... - def unblock(self) -> None: ... - def reblock(self) -> None: ... - - -class QObjectCleanupHandler(QObject): - - def __init__(self) -> None: ... - - def clear(self) -> None: ... - def isEmpty(self) -> bool: ... - def remove(self, object: QObject) -> None: ... - def add(self, object: QObject) -> QObject: ... - - -class QMetaObject(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QMetaObject') -> None: ... - - def inherits(self, metaObject: 'QMetaObject') -> bool: ... - def constructor(self, index: int) -> QMetaMethod: ... - def indexOfConstructor(self, constructor: str) -> int: ... - def constructorCount(self) -> int: ... - @typing.overload - @staticmethod - def invokeMethod(obj: QObject, member: str, type: Qt.ConnectionType, ret: 'QGenericReturnArgument', value0: 'QGenericArgument' = ..., value1: 'QGenericArgument' = ..., value2: 'QGenericArgument' = ..., value3: 'QGenericArgument' = ..., value4: 'QGenericArgument' = ..., value5: 'QGenericArgument' = ..., value6: 'QGenericArgument' = ..., value7: 'QGenericArgument' = ..., value8: 'QGenericArgument' = ..., value9: 'QGenericArgument' = ...) -> typing.Any: ... - @typing.overload - @staticmethod - def invokeMethod(obj: QObject, member: str, ret: 'QGenericReturnArgument', value0: 'QGenericArgument' = ..., value1: 'QGenericArgument' = ..., value2: 'QGenericArgument' = ..., value3: 'QGenericArgument' = ..., value4: 'QGenericArgument' = ..., value5: 'QGenericArgument' = ..., value6: 'QGenericArgument' = ..., value7: 'QGenericArgument' = ..., value8: 'QGenericArgument' = ..., value9: 'QGenericArgument' = ...) -> typing.Any: ... - @typing.overload - @staticmethod - def invokeMethod(obj: QObject, member: str, type: Qt.ConnectionType, value0: 'QGenericArgument' = ..., value1: 'QGenericArgument' = ..., value2: 'QGenericArgument' = ..., value3: 'QGenericArgument' = ..., value4: 'QGenericArgument' = ..., value5: 'QGenericArgument' = ..., value6: 'QGenericArgument' = ..., value7: 'QGenericArgument' = ..., value8: 'QGenericArgument' = ..., value9: 'QGenericArgument' = ...) -> typing.Any: ... - @typing.overload - @staticmethod - def invokeMethod(obj: QObject, member: str, value0: 'QGenericArgument' = ..., value1: 'QGenericArgument' = ..., value2: 'QGenericArgument' = ..., value3: 'QGenericArgument' = ..., value4: 'QGenericArgument' = ..., value5: 'QGenericArgument' = ..., value6: 'QGenericArgument' = ..., value7: 'QGenericArgument' = ..., value8: 'QGenericArgument' = ..., value9: 'QGenericArgument' = ...) -> typing.Any: ... - @staticmethod - def normalizedType(type: str) -> QByteArray: ... - @staticmethod - def normalizedSignature(method: str) -> QByteArray: ... - @staticmethod - def connectSlotsByName(o: QObject) -> None: ... - @typing.overload - @staticmethod - def checkConnectArgs(signal: str, method: str) -> bool: ... - @typing.overload - @staticmethod - def checkConnectArgs(signal: QMetaMethod, method: QMetaMethod) -> bool: ... - def classInfo(self, index: int) -> QMetaClassInfo: ... - def property(self, index: int) -> QMetaProperty: ... - def enumerator(self, index: int) -> QMetaEnum: ... - def method(self, index: int) -> QMetaMethod: ... - def indexOfClassInfo(self, name: str) -> int: ... - def indexOfProperty(self, name: str) -> int: ... - def indexOfEnumerator(self, name: str) -> int: ... - def indexOfSlot(self, slot: str) -> int: ... - def indexOfSignal(self, signal: str) -> int: ... - def indexOfMethod(self, method: str) -> int: ... - def classInfoCount(self) -> int: ... - def propertyCount(self) -> int: ... - def enumeratorCount(self) -> int: ... - def methodCount(self) -> int: ... - def classInfoOffset(self) -> int: ... - def propertyOffset(self) -> int: ... - def enumeratorOffset(self) -> int: ... - def methodOffset(self) -> int: ... - def userProperty(self) -> QMetaProperty: ... - def superClass(self) -> 'QMetaObject': ... - def className(self) -> str: ... - - -class QGenericArgument(sip.simplewrapper): ... - - -class QGenericReturnArgument(sip.simplewrapper): ... - - -class QParallelAnimationGroup(QAnimationGroup): - - def __init__(self, parent: typing.Optional[QObject] = ...) -> None: ... - - def updateDirection(self, direction: QAbstractAnimation.Direction) -> None: ... - def updateState(self, newState: QAbstractAnimation.State, oldState: QAbstractAnimation.State) -> None: ... - def updateCurrentTime(self, currentTime: int) -> None: ... - def event(self, event: QEvent) -> bool: ... - def duration(self) -> int: ... - - -class QPauseAnimation(QAbstractAnimation): - - @typing.overload - def __init__(self, parent: typing.Optional[QObject] = ...) -> None: ... - @typing.overload - def __init__(self, msecs: int, parent: typing.Optional[QObject] = ...) -> None: ... - - def updateCurrentTime(self, a0: int) -> None: ... - def event(self, e: QEvent) -> bool: ... - def setDuration(self, msecs: int) -> None: ... - def duration(self) -> int: ... - - -class QVariantAnimation(QAbstractAnimation): - - def __init__(self, parent: typing.Optional[QObject] = ...) -> None: ... - - def interpolated(self, from_: typing.Any, to: typing.Any, progress: float) -> typing.Any: ... - def updateCurrentValue(self, value: typing.Any) -> None: ... - def updateState(self, newState: QAbstractAnimation.State, oldState: QAbstractAnimation.State) -> None: ... - def updateCurrentTime(self, a0: int) -> None: ... - def event(self, event: QEvent) -> bool: ... - def valueChanged(self, value: typing.Any) -> None: ... - def setEasingCurve(self, easing: typing.Union[QEasingCurve, QEasingCurve.Type]) -> None: ... - def easingCurve(self) -> QEasingCurve: ... - def setDuration(self, msecs: int) -> None: ... - def duration(self) -> int: ... - def currentValue(self) -> typing.Any: ... - def setKeyValues(self, values: typing.Any) -> None: ... - def keyValues(self) -> typing.Any: ... - def setKeyValueAt(self, step: float, value: typing.Any) -> None: ... - def keyValueAt(self, step: float) -> typing.Any: ... - def setEndValue(self, value: typing.Any) -> None: ... - def endValue(self) -> typing.Any: ... - def setStartValue(self, value: typing.Any) -> None: ... - def startValue(self) -> typing.Any: ... - - -class QPropertyAnimation(QVariantAnimation): - - @typing.overload - def __init__(self, parent: typing.Optional[QObject] = ...) -> None: ... - @typing.overload - def __init__(self, target: QObject, propertyName: typing.Union[QByteArray, bytes, bytearray], parent: typing.Optional[QObject] = ...) -> None: ... - - def updateState(self, newState: QAbstractAnimation.State, oldState: QAbstractAnimation.State) -> None: ... - def updateCurrentValue(self, value: typing.Any) -> None: ... - def event(self, event: QEvent) -> bool: ... - def setPropertyName(self, propertyName: typing.Union[QByteArray, bytes, bytearray]) -> None: ... - def propertyName(self) -> QByteArray: ... - def setTargetObject(self, target: QObject) -> None: ... - def targetObject(self) -> QObject: ... - - -class QPluginLoader(QObject): - - @typing.overload - def __init__(self, parent: typing.Optional[QObject] = ...) -> None: ... - @typing.overload - def __init__(self, fileName: str, parent: typing.Optional[QObject] = ...) -> None: ... - - def loadHints(self) -> QLibrary.LoadHints: ... - def setLoadHints(self, loadHints: typing.Union[QLibrary.LoadHints, QLibrary.LoadHint]) -> None: ... - def errorString(self) -> str: ... - def fileName(self) -> str: ... - def setFileName(self, fileName: str) -> None: ... - def isLoaded(self) -> bool: ... - def unload(self) -> bool: ... - def load(self) -> bool: ... - @staticmethod - def staticInstances() -> typing.Any: ... - def instance(self) -> QObject: ... - - -class QPoint(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, xpos: int, ypos: int) -> None: ... - @typing.overload - def __init__(self, a0: 'QPoint') -> None: ... - - def __neg__(self) -> 'QPoint': ... - def __pos__(self) -> 'QPoint': ... - @staticmethod - def dotProduct(p1: 'QPoint', p2: 'QPoint') -> int: ... - def setY(self, ypos: int) -> None: ... - def setX(self, xpos: int) -> None: ... - def y(self) -> int: ... - def x(self) -> int: ... - def __bool__(self) -> int: ... - def isNull(self) -> bool: ... - def __repr__(self) -> str: ... - def manhattanLength(self) -> int: ... - - -class QPointF(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, xpos: float, ypos: float) -> None: ... - @typing.overload - def __init__(self, p: QPoint) -> None: ... - @typing.overload - def __init__(self, a0: 'QPointF') -> None: ... - - def __neg__(self) -> 'QPointF': ... - def __pos__(self) -> 'QPointF': ... - @staticmethod - def dotProduct(p1: typing.Union['QPointF', QPoint], p2: typing.Union['QPointF', QPoint]) -> float: ... - def manhattanLength(self) -> float: ... - def toPoint(self) -> QPoint: ... - def setY(self, ypos: float) -> None: ... - def setX(self, xpos: float) -> None: ... - def y(self) -> float: ... - def x(self) -> float: ... - def __bool__(self) -> int: ... - def isNull(self) -> bool: ... - def __repr__(self) -> str: ... - - -class QProcess(QIODevice): - - class InputChannelMode(int): ... - ManagedInputChannel = ... # type: 'QProcess.InputChannelMode' - ForwardedInputChannel = ... # type: 'QProcess.InputChannelMode' - - class ProcessChannelMode(int): ... - SeparateChannels = ... # type: 'QProcess.ProcessChannelMode' - MergedChannels = ... # type: 'QProcess.ProcessChannelMode' - ForwardedChannels = ... # type: 'QProcess.ProcessChannelMode' - ForwardedOutputChannel = ... # type: 'QProcess.ProcessChannelMode' - ForwardedErrorChannel = ... # type: 'QProcess.ProcessChannelMode' - - class ProcessChannel(int): ... - StandardOutput = ... # type: 'QProcess.ProcessChannel' - StandardError = ... # type: 'QProcess.ProcessChannel' - - class ProcessState(int): ... - NotRunning = ... # type: 'QProcess.ProcessState' - Starting = ... # type: 'QProcess.ProcessState' - Running = ... # type: 'QProcess.ProcessState' - - class ProcessError(int): ... - FailedToStart = ... # type: 'QProcess.ProcessError' - Crashed = ... # type: 'QProcess.ProcessError' - Timedout = ... # type: 'QProcess.ProcessError' - ReadError = ... # type: 'QProcess.ProcessError' - WriteError = ... # type: 'QProcess.ProcessError' - UnknownError = ... # type: 'QProcess.ProcessError' - - class ExitStatus(int): ... - NormalExit = ... # type: 'QProcess.ExitStatus' - CrashExit = ... # type: 'QProcess.ExitStatus' - - def __init__(self, parent: typing.Optional[QObject] = ...) -> None: ... - - def processId(self) -> int: ... - @staticmethod - def nullDevice() -> str: ... - def setInputChannelMode(self, mode: 'QProcess.InputChannelMode') -> None: ... - def inputChannelMode(self) -> 'QProcess.InputChannelMode': ... - def open(self, mode: typing.Union[QIODevice.OpenMode, QIODevice.OpenModeFlag] = ...) -> bool: ... - def setArguments(self, arguments: typing.Iterable[str]) -> None: ... - def arguments(self) -> typing.List[str]: ... - def setProgram(self, program: str) -> None: ... - def program(self) -> str: ... - def processEnvironment(self) -> 'QProcessEnvironment': ... - def setProcessEnvironment(self, environment: 'QProcessEnvironment') -> None: ... - def writeData(self, data: bytes) -> int: ... - def readData(self, maxlen: int) -> bytes: ... - def setupChildProcess(self) -> None: ... - def setProcessState(self, state: 'QProcess.ProcessState') -> None: ... - def errorOccurred(self, error: 'QProcess.ProcessError') -> None: ... - def readyReadStandardError(self) -> None: ... - def readyReadStandardOutput(self) -> None: ... - def stateChanged(self, state: 'QProcess.ProcessState') -> None: ... - def finished(self, exitCode: int, exitStatus: 'QProcess.ExitStatus') -> None: ... - def started(self) -> None: ... - def kill(self) -> None: ... - def terminate(self) -> None: ... - def setStandardOutputProcess(self, destination: 'QProcess') -> None: ... - def setStandardErrorFile(self, fileName: str, mode: typing.Union[QIODevice.OpenMode, QIODevice.OpenModeFlag] = ...) -> None: ... - def setStandardOutputFile(self, fileName: str, mode: typing.Union[QIODevice.OpenMode, QIODevice.OpenModeFlag] = ...) -> None: ... - def setStandardInputFile(self, fileName: str) -> None: ... - def setProcessChannelMode(self, mode: 'QProcess.ProcessChannelMode') -> None: ... - def processChannelMode(self) -> 'QProcess.ProcessChannelMode': ... - @staticmethod - def systemEnvironment() -> typing.List[str]: ... - @typing.overload - @staticmethod - def startDetached(program: str, arguments: typing.Iterable[str], workingDirectory: str) -> typing.Tuple[bool, int]: ... - @typing.overload - @staticmethod - def startDetached(program: str, arguments: typing.Iterable[str]) -> bool: ... - @typing.overload - @staticmethod - def startDetached(program: str) -> bool: ... - @typing.overload - @staticmethod - def execute(program: str, arguments: typing.Iterable[str]) -> int: ... - @typing.overload - @staticmethod - def execute(program: str) -> int: ... - def atEnd(self) -> bool: ... - def close(self) -> None: ... - def canReadLine(self) -> bool: ... - def isSequential(self) -> bool: ... - def bytesToWrite(self) -> int: ... - def bytesAvailable(self) -> int: ... - def exitStatus(self) -> 'QProcess.ExitStatus': ... - def exitCode(self) -> int: ... - def readAllStandardError(self) -> QByteArray: ... - def readAllStandardOutput(self) -> QByteArray: ... - def waitForFinished(self, msecs: int = ...) -> bool: ... - def waitForBytesWritten(self, msecs: int = ...) -> bool: ... - def waitForReadyRead(self, msecs: int = ...) -> bool: ... - def waitForStarted(self, msecs: int = ...) -> bool: ... - def pid(self) -> int: ... - def state(self) -> 'QProcess.ProcessState': ... - @typing.overload - def error(self) -> 'QProcess.ProcessError': ... - @typing.overload - def error(self, error: 'QProcess.ProcessError') -> None: ... - def setWorkingDirectory(self, dir: str) -> None: ... - def workingDirectory(self) -> str: ... - def closeWriteChannel(self) -> None: ... - def closeReadChannel(self, channel: 'QProcess.ProcessChannel') -> None: ... - def setReadChannel(self, channel: 'QProcess.ProcessChannel') -> None: ... - def readChannel(self) -> 'QProcess.ProcessChannel': ... - @typing.overload - def start(self, program: str, arguments: typing.Iterable[str], mode: typing.Union[QIODevice.OpenMode, QIODevice.OpenModeFlag] = ...) -> None: ... - @typing.overload - def start(self, command: str, mode: typing.Union[QIODevice.OpenMode, QIODevice.OpenModeFlag] = ...) -> None: ... - @typing.overload - def start(self, mode: typing.Union[QIODevice.OpenMode, QIODevice.OpenModeFlag] = ...) -> None: ... - - -class QProcessEnvironment(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, other: 'QProcessEnvironment') -> None: ... - - def swap(self, other: 'QProcessEnvironment') -> None: ... - def keys(self) -> typing.List[str]: ... - @staticmethod - def systemEnvironment() -> 'QProcessEnvironment': ... - def toStringList(self) -> typing.List[str]: ... - def value(self, name: str, defaultValue: str = ...) -> str: ... - def remove(self, name: str) -> None: ... - @typing.overload - def insert(self, name: str, value: str) -> None: ... - @typing.overload - def insert(self, e: 'QProcessEnvironment') -> None: ... - def contains(self, name: str) -> bool: ... - def clear(self) -> None: ... - def isEmpty(self) -> bool: ... - - -class QReadWriteLock(sip.simplewrapper): - - class RecursionMode(int): ... - NonRecursive = ... # type: 'QReadWriteLock.RecursionMode' - Recursive = ... # type: 'QReadWriteLock.RecursionMode' - - def __init__(self, recursionMode: 'QReadWriteLock.RecursionMode' = ...) -> None: ... - - def unlock(self) -> None: ... - @typing.overload - def tryLockForWrite(self) -> bool: ... - @typing.overload - def tryLockForWrite(self, timeout: int) -> bool: ... - def lockForWrite(self) -> None: ... - @typing.overload - def tryLockForRead(self) -> bool: ... - @typing.overload - def tryLockForRead(self, timeout: int) -> bool: ... - def lockForRead(self) -> None: ... - - -class QReadLocker(sip.simplewrapper): - - def __init__(self, areadWriteLock: QReadWriteLock) -> None: ... - - def __exit__(self, type: typing.Any, value: typing.Any, traceback: typing.Any) -> None: ... - def __enter__(self) -> typing.Any: ... - def readWriteLock(self) -> QReadWriteLock: ... - def relock(self) -> None: ... - def unlock(self) -> None: ... - - -class QWriteLocker(sip.simplewrapper): - - def __init__(self, areadWriteLock: QReadWriteLock) -> None: ... - - def __exit__(self, type: typing.Any, value: typing.Any, traceback: typing.Any) -> None: ... - def __enter__(self) -> typing.Any: ... - def readWriteLock(self) -> QReadWriteLock: ... - def relock(self) -> None: ... - def unlock(self) -> None: ... - - -class QRect(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, aleft: int, atop: int, awidth: int, aheight: int) -> None: ... - @typing.overload - def __init__(self, atopLeft: QPoint, abottomRight: QPoint) -> None: ... - @typing.overload - def __init__(self, atopLeft: QPoint, asize: 'QSize') -> None: ... - @typing.overload - def __init__(self, a0: 'QRect') -> None: ... - - def transposed(self) -> 'QRect': ... - def marginsRemoved(self, margins: QMargins) -> 'QRect': ... - def marginsAdded(self, margins: QMargins) -> 'QRect': ... - def united(self, r: 'QRect') -> 'QRect': ... - def intersected(self, other: 'QRect') -> 'QRect': ... - def setSize(self, s: 'QSize') -> None: ... - def setHeight(self, h: int) -> None: ... - def setWidth(self, w: int) -> None: ... - def adjust(self, dx1: int, dy1: int, dx2: int, dy2: int) -> None: ... - def adjusted(self, xp1: int, yp1: int, xp2: int, yp2: int) -> 'QRect': ... - def setCoords(self, xp1: int, yp1: int, xp2: int, yp2: int) -> None: ... - def getCoords(self) -> typing.Tuple[int, int, int, int]: ... - def setRect(self, ax: int, ay: int, aw: int, ah: int) -> None: ... - def getRect(self) -> typing.Tuple[int, int, int, int]: ... - def moveBottomLeft(self, p: QPoint) -> None: ... - def moveTopRight(self, p: QPoint) -> None: ... - def moveBottomRight(self, p: QPoint) -> None: ... - def moveTopLeft(self, p: QPoint) -> None: ... - def moveBottom(self, pos: int) -> None: ... - def moveRight(self, pos: int) -> None: ... - def moveTop(self, pos: int) -> None: ... - def moveLeft(self, pos: int) -> None: ... - @typing.overload - def moveTo(self, ax: int, ay: int) -> None: ... - @typing.overload - def moveTo(self, p: QPoint) -> None: ... - @typing.overload - def translated(self, dx: int, dy: int) -> 'QRect': ... - @typing.overload - def translated(self, p: QPoint) -> 'QRect': ... - @typing.overload - def translate(self, dx: int, dy: int) -> None: ... - @typing.overload - def translate(self, p: QPoint) -> None: ... - def size(self) -> 'QSize': ... - def height(self) -> int: ... - def width(self) -> int: ... - def center(self) -> QPoint: ... - def bottomLeft(self) -> QPoint: ... - def topRight(self) -> QPoint: ... - def bottomRight(self) -> QPoint: ... - def topLeft(self) -> QPoint: ... - def setY(self, ay: int) -> None: ... - def setX(self, ax: int) -> None: ... - def setBottomLeft(self, p: QPoint) -> None: ... - def setTopRight(self, p: QPoint) -> None: ... - def setBottomRight(self, p: QPoint) -> None: ... - def setTopLeft(self, p: QPoint) -> None: ... - def setBottom(self, pos: int) -> None: ... - def setRight(self, pos: int) -> None: ... - def setTop(self, pos: int) -> None: ... - def setLeft(self, pos: int) -> None: ... - def y(self) -> int: ... - def x(self) -> int: ... - def bottom(self) -> int: ... - def right(self) -> int: ... - def top(self) -> int: ... - def left(self) -> int: ... - def __bool__(self) -> int: ... - def isValid(self) -> bool: ... - def isEmpty(self) -> bool: ... - def isNull(self) -> bool: ... - def __repr__(self) -> str: ... - def intersects(self, r: 'QRect') -> bool: ... - @typing.overload - def __contains__(self, p: QPoint) -> int: ... - @typing.overload - def __contains__(self, r: 'QRect') -> int: ... - @typing.overload - def contains(self, point: QPoint, proper: bool = ...) -> bool: ... - @typing.overload - def contains(self, rectangle: 'QRect', proper: bool = ...) -> bool: ... - @typing.overload - def contains(self, ax: int, ay: int, aproper: bool) -> bool: ... - @typing.overload - def contains(self, ax: int, ay: int) -> bool: ... - def moveCenter(self, p: QPoint) -> None: ... - def normalized(self) -> 'QRect': ... - - -class QRectF(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, atopLeft: typing.Union[QPointF, QPoint], asize: 'QSizeF') -> None: ... - @typing.overload - def __init__(self, atopLeft: typing.Union[QPointF, QPoint], abottomRight: typing.Union[QPointF, QPoint]) -> None: ... - @typing.overload - def __init__(self, aleft: float, atop: float, awidth: float, aheight: float) -> None: ... - @typing.overload - def __init__(self, r: QRect) -> None: ... - @typing.overload - def __init__(self, a0: 'QRectF') -> None: ... - - def transposed(self) -> 'QRectF': ... - def marginsRemoved(self, margins: QMarginsF) -> 'QRectF': ... - def marginsAdded(self, margins: QMarginsF) -> 'QRectF': ... - def toRect(self) -> QRect: ... - def toAlignedRect(self) -> QRect: ... - def united(self, r: 'QRectF') -> 'QRectF': ... - def intersected(self, r: 'QRectF') -> 'QRectF': ... - def setSize(self, s: 'QSizeF') -> None: ... - def setHeight(self, ah: float) -> None: ... - def setWidth(self, aw: float) -> None: ... - def adjusted(self, xp1: float, yp1: float, xp2: float, yp2: float) -> 'QRectF': ... - def adjust(self, xp1: float, yp1: float, xp2: float, yp2: float) -> None: ... - def setCoords(self, xp1: float, yp1: float, xp2: float, yp2: float) -> None: ... - def getCoords(self) -> typing.Tuple[float, float, float, float]: ... - def setRect(self, ax: float, ay: float, aaw: float, aah: float) -> None: ... - def getRect(self) -> typing.Tuple[float, float, float, float]: ... - @typing.overload - def translated(self, dx: float, dy: float) -> 'QRectF': ... - @typing.overload - def translated(self, p: typing.Union[QPointF, QPoint]) -> 'QRectF': ... - @typing.overload - def moveTo(self, ax: float, ay: float) -> None: ... - @typing.overload - def moveTo(self, p: typing.Union[QPointF, QPoint]) -> None: ... - @typing.overload - def translate(self, dx: float, dy: float) -> None: ... - @typing.overload - def translate(self, p: typing.Union[QPointF, QPoint]) -> None: ... - def size(self) -> 'QSizeF': ... - def height(self) -> float: ... - def width(self) -> float: ... - def moveCenter(self, p: typing.Union[QPointF, QPoint]) -> None: ... - def moveBottomRight(self, p: typing.Union[QPointF, QPoint]) -> None: ... - def moveBottomLeft(self, p: typing.Union[QPointF, QPoint]) -> None: ... - def moveTopRight(self, p: typing.Union[QPointF, QPoint]) -> None: ... - def moveTopLeft(self, p: typing.Union[QPointF, QPoint]) -> None: ... - def moveBottom(self, pos: float) -> None: ... - def moveRight(self, pos: float) -> None: ... - def moveTop(self, pos: float) -> None: ... - def moveLeft(self, pos: float) -> None: ... - def center(self) -> QPointF: ... - def setBottomRight(self, p: typing.Union[QPointF, QPoint]) -> None: ... - def setBottomLeft(self, p: typing.Union[QPointF, QPoint]) -> None: ... - def setTopRight(self, p: typing.Union[QPointF, QPoint]) -> None: ... - def setTopLeft(self, p: typing.Union[QPointF, QPoint]) -> None: ... - def setBottom(self, pos: float) -> None: ... - def setTop(self, pos: float) -> None: ... - def setRight(self, pos: float) -> None: ... - def setLeft(self, pos: float) -> None: ... - def y(self) -> float: ... - def x(self) -> float: ... - def __bool__(self) -> int: ... - def isValid(self) -> bool: ... - def isEmpty(self) -> bool: ... - def isNull(self) -> bool: ... - def intersects(self, r: 'QRectF') -> bool: ... - @typing.overload - def __contains__(self, p: typing.Union[QPointF, QPoint]) -> int: ... - @typing.overload - def __contains__(self, r: 'QRectF') -> int: ... - @typing.overload - def contains(self, p: typing.Union[QPointF, QPoint]) -> bool: ... - @typing.overload - def contains(self, r: 'QRectF') -> bool: ... - @typing.overload - def contains(self, ax: float, ay: float) -> bool: ... - def bottomLeft(self) -> QPointF: ... - def topRight(self) -> QPointF: ... - def bottomRight(self) -> QPointF: ... - def topLeft(self) -> QPointF: ... - def setY(self, pos: float) -> None: ... - def setX(self, pos: float) -> None: ... - def bottom(self) -> float: ... - def right(self) -> float: ... - def top(self) -> float: ... - def left(self) -> float: ... - def normalized(self) -> 'QRectF': ... - def __repr__(self) -> str: ... - - -class QRegExp(sip.simplewrapper): - - class CaretMode(int): ... - CaretAtZero = ... # type: 'QRegExp.CaretMode' - CaretAtOffset = ... # type: 'QRegExp.CaretMode' - CaretWontMatch = ... # type: 'QRegExp.CaretMode' - - class PatternSyntax(int): ... - RegExp = ... # type: 'QRegExp.PatternSyntax' - RegExp2 = ... # type: 'QRegExp.PatternSyntax' - Wildcard = ... # type: 'QRegExp.PatternSyntax' - FixedString = ... # type: 'QRegExp.PatternSyntax' - WildcardUnix = ... # type: 'QRegExp.PatternSyntax' - W3CXmlSchema11 = ... # type: 'QRegExp.PatternSyntax' - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, pattern: str, cs: Qt.CaseSensitivity = ..., syntax: 'QRegExp.PatternSyntax' = ...) -> None: ... - @typing.overload - def __init__(self, rx: 'QRegExp') -> None: ... - - def __hash__(self) -> int: ... - def swap(self, other: 'QRegExp') -> None: ... - def captureCount(self) -> int: ... - @staticmethod - def escape(str: str) -> str: ... - def errorString(self) -> str: ... - def pos(self, nth: int = ...) -> int: ... - def cap(self, nth: int = ...) -> str: ... - def capturedTexts(self) -> typing.List[str]: ... - def matchedLength(self) -> int: ... - def lastIndexIn(self, str: str, offset: int = ..., caretMode: 'QRegExp.CaretMode' = ...) -> int: ... - def indexIn(self, str: str, offset: int = ..., caretMode: 'QRegExp.CaretMode' = ...) -> int: ... - def exactMatch(self, str: str) -> bool: ... - def setMinimal(self, minimal: bool) -> None: ... - def isMinimal(self) -> bool: ... - def setPatternSyntax(self, syntax: 'QRegExp.PatternSyntax') -> None: ... - def patternSyntax(self) -> 'QRegExp.PatternSyntax': ... - def setCaseSensitivity(self, cs: Qt.CaseSensitivity) -> None: ... - def caseSensitivity(self) -> Qt.CaseSensitivity: ... - def setPattern(self, pattern: str) -> None: ... - def pattern(self) -> str: ... - def isValid(self) -> bool: ... - def isEmpty(self) -> bool: ... - def __repr__(self) -> str: ... - - -class QRegularExpression(sip.simplewrapper): - - class MatchOption(int): ... - NoMatchOption = ... # type: 'QRegularExpression.MatchOption' - AnchoredMatchOption = ... # type: 'QRegularExpression.MatchOption' - DontCheckSubjectStringMatchOption = ... # type: 'QRegularExpression.MatchOption' - - class MatchType(int): ... - NormalMatch = ... # type: 'QRegularExpression.MatchType' - PartialPreferCompleteMatch = ... # type: 'QRegularExpression.MatchType' - PartialPreferFirstMatch = ... # type: 'QRegularExpression.MatchType' - NoMatch = ... # type: 'QRegularExpression.MatchType' - - class PatternOption(int): ... - NoPatternOption = ... # type: 'QRegularExpression.PatternOption' - CaseInsensitiveOption = ... # type: 'QRegularExpression.PatternOption' - DotMatchesEverythingOption = ... # type: 'QRegularExpression.PatternOption' - MultilineOption = ... # type: 'QRegularExpression.PatternOption' - ExtendedPatternSyntaxOption = ... # type: 'QRegularExpression.PatternOption' - InvertedGreedinessOption = ... # type: 'QRegularExpression.PatternOption' - DontCaptureOption = ... # type: 'QRegularExpression.PatternOption' - UseUnicodePropertiesOption = ... # type: 'QRegularExpression.PatternOption' - OptimizeOnFirstUsageOption = ... # type: 'QRegularExpression.PatternOption' - DontAutomaticallyOptimizeOption = ... # type: 'QRegularExpression.PatternOption' - - class PatternOptions(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QRegularExpression.PatternOptions', 'QRegularExpression.PatternOption']) -> None: ... - @typing.overload - def __init__(self, a0: 'QRegularExpression.PatternOptions') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QRegularExpression.PatternOptions': ... - def __int__(self) -> int: ... - - class MatchOptions(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QRegularExpression.MatchOptions', 'QRegularExpression.MatchOption']) -> None: ... - @typing.overload - def __init__(self, a0: 'QRegularExpression.MatchOptions') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QRegularExpression.MatchOptions': ... - def __int__(self) -> int: ... - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, pattern: str, options: typing.Union['QRegularExpression.PatternOptions', 'QRegularExpression.PatternOption'] = ...) -> None: ... - @typing.overload - def __init__(self, re: 'QRegularExpression') -> None: ... - - def __hash__(self) -> int: ... - def optimize(self) -> None: ... - def namedCaptureGroups(self) -> typing.List[str]: ... - @staticmethod - def escape(str: str) -> str: ... - def globalMatch(self, subject: str, offset: int = ..., matchType: 'QRegularExpression.MatchType' = ..., matchOptions: typing.Union['QRegularExpression.MatchOptions', 'QRegularExpression.MatchOption'] = ...) -> 'QRegularExpressionMatchIterator': ... - def match(self, subject: str, offset: int = ..., matchType: 'QRegularExpression.MatchType' = ..., matchOptions: typing.Union['QRegularExpression.MatchOptions', 'QRegularExpression.MatchOption'] = ...) -> 'QRegularExpressionMatch': ... - def captureCount(self) -> int: ... - def errorString(self) -> str: ... - def patternErrorOffset(self) -> int: ... - def isValid(self) -> bool: ... - def setPattern(self, pattern: str) -> None: ... - def pattern(self) -> str: ... - def swap(self, re: 'QRegularExpression') -> None: ... - def __repr__(self) -> str: ... - def setPatternOptions(self, options: typing.Union['QRegularExpression.PatternOptions', 'QRegularExpression.PatternOption']) -> None: ... - def patternOptions(self) -> 'QRegularExpression.PatternOptions': ... - - -class QRegularExpressionMatch(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, match: 'QRegularExpressionMatch') -> None: ... - - @typing.overload - def capturedEnd(self, nth: int = ...) -> int: ... - @typing.overload - def capturedEnd(self, name: str) -> int: ... - @typing.overload - def capturedLength(self, nth: int = ...) -> int: ... - @typing.overload - def capturedLength(self, name: str) -> int: ... - @typing.overload - def capturedStart(self, nth: int = ...) -> int: ... - @typing.overload - def capturedStart(self, name: str) -> int: ... - def capturedTexts(self) -> typing.List[str]: ... - @typing.overload - def captured(self, nth: int = ...) -> str: ... - @typing.overload - def captured(self, name: str) -> str: ... - def lastCapturedIndex(self) -> int: ... - def isValid(self) -> bool: ... - def hasPartialMatch(self) -> bool: ... - def hasMatch(self) -> bool: ... - def matchOptions(self) -> QRegularExpression.MatchOptions: ... - def matchType(self) -> QRegularExpression.MatchType: ... - def regularExpression(self) -> QRegularExpression: ... - def swap(self, match: 'QRegularExpressionMatch') -> None: ... - - -class QRegularExpressionMatchIterator(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, iterator: 'QRegularExpressionMatchIterator') -> None: ... - - def matchOptions(self) -> QRegularExpression.MatchOptions: ... - def matchType(self) -> QRegularExpression.MatchType: ... - def regularExpression(self) -> QRegularExpression: ... - def peekNext(self) -> QRegularExpressionMatch: ... - def next(self) -> QRegularExpressionMatch: ... - def hasNext(self) -> bool: ... - def isValid(self) -> bool: ... - def swap(self, iterator: 'QRegularExpressionMatchIterator') -> None: ... - - -class QResource(sip.simplewrapper): - - def __init__(self, fileName: str = ..., locale: QLocale = ...) -> None: ... - - def isFile(self) -> bool: ... - def isDir(self) -> bool: ... - def children(self) -> typing.List[str]: ... - @staticmethod - def unregisterResourceData(rccData: str, mapRoot: str = ...) -> bool: ... - @staticmethod - def unregisterResource(rccFileName: str, mapRoot: str = ...) -> bool: ... - @staticmethod - def registerResourceData(rccData: str, mapRoot: str = ...) -> bool: ... - @staticmethod - def registerResource(rccFileName: str, mapRoot: str = ...) -> bool: ... - def size(self) -> int: ... - def setLocale(self, locale: QLocale) -> None: ... - def setFileName(self, file: str) -> None: ... - def locale(self) -> QLocale: ... - def isValid(self) -> bool: ... - def isCompressed(self) -> bool: ... - def fileName(self) -> str: ... - def data(self) -> bytes: ... - def absoluteFilePath(self) -> str: ... - - -class QRunnable(sip.wrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QRunnable') -> None: ... - - def setAutoDelete(self, _autoDelete: bool) -> None: ... - def autoDelete(self) -> bool: ... - def run(self) -> None: ... - - -class QSaveFile(QFileDevice): - - @typing.overload - def __init__(self, name: str) -> None: ... - @typing.overload - def __init__(self, parent: typing.Optional[QObject] = ...) -> None: ... - @typing.overload - def __init__(self, name: str, parent: QObject) -> None: ... - - def writeData(self, data: bytes) -> int: ... - def directWriteFallback(self) -> bool: ... - def setDirectWriteFallback(self, enabled: bool) -> None: ... - def cancelWriting(self) -> None: ... - def commit(self) -> bool: ... - def open(self, flags: typing.Union[QIODevice.OpenMode, QIODevice.OpenModeFlag]) -> bool: ... - def setFileName(self, name: str) -> None: ... - def fileName(self) -> str: ... - - -class QSemaphore(sip.simplewrapper): - - def __init__(self, n: int = ...) -> None: ... - - def available(self) -> int: ... - def release(self, n: int = ...) -> None: ... - @typing.overload - def tryAcquire(self, n: int = ...) -> bool: ... - @typing.overload - def tryAcquire(self, n: int, timeout: int) -> bool: ... - def acquire(self, n: int = ...) -> None: ... - - -class QSequentialAnimationGroup(QAnimationGroup): - - def __init__(self, parent: typing.Optional[QObject] = ...) -> None: ... - - def updateDirection(self, direction: QAbstractAnimation.Direction) -> None: ... - def updateState(self, newState: QAbstractAnimation.State, oldState: QAbstractAnimation.State) -> None: ... - def updateCurrentTime(self, a0: int) -> None: ... - def event(self, event: QEvent) -> bool: ... - def currentAnimationChanged(self, current: QAbstractAnimation) -> None: ... - def duration(self) -> int: ... - def currentAnimation(self) -> QAbstractAnimation: ... - def insertPause(self, index: int, msecs: int) -> QPauseAnimation: ... - def addPause(self, msecs: int) -> QPauseAnimation: ... - - -class QSettings(QObject): - - class Scope(int): ... - UserScope = ... # type: 'QSettings.Scope' - SystemScope = ... # type: 'QSettings.Scope' - - class Format(int): ... - NativeFormat = ... # type: 'QSettings.Format' - IniFormat = ... # type: 'QSettings.Format' - InvalidFormat = ... # type: 'QSettings.Format' - - class Status(int): ... - NoError = ... # type: 'QSettings.Status' - AccessError = ... # type: 'QSettings.Status' - FormatError = ... # type: 'QSettings.Status' - - @typing.overload - def __init__(self, organization: str, application: str = ..., parent: typing.Optional[QObject] = ...) -> None: ... - @typing.overload - def __init__(self, scope: 'QSettings.Scope', organization: str, application: str = ..., parent: typing.Optional[QObject] = ...) -> None: ... - @typing.overload - def __init__(self, format: 'QSettings.Format', scope: 'QSettings.Scope', organization: str, application: str = ..., parent: typing.Optional[QObject] = ...) -> None: ... - @typing.overload - def __init__(self, fileName: str, format: 'QSettings.Format', parent: typing.Optional[QObject] = ...) -> None: ... - @typing.overload - def __init__(self, parent: typing.Optional[QObject] = ...) -> None: ... - - def event(self, event: QEvent) -> bool: ... - def iniCodec(self) -> 'QTextCodec': ... - @typing.overload - def setIniCodec(self, codec: 'QTextCodec') -> None: ... - @typing.overload - def setIniCodec(self, codecName: str) -> None: ... - @staticmethod - def defaultFormat() -> 'QSettings.Format': ... - @staticmethod - def setDefaultFormat(format: 'QSettings.Format') -> None: ... - def applicationName(self) -> str: ... - def organizationName(self) -> str: ... - def scope(self) -> 'QSettings.Scope': ... - def format(self) -> 'QSettings.Format': ... - @staticmethod - def setPath(format: 'QSettings.Format', scope: 'QSettings.Scope', path: str) -> None: ... - def fileName(self) -> str: ... - def fallbacksEnabled(self) -> bool: ... - def setFallbacksEnabled(self, b: bool) -> None: ... - def contains(self, key: str) -> bool: ... - def remove(self, key: str) -> None: ... - def value(self, key: str, defaultValue: typing.Any = ..., type: type = ...) -> typing.Any: ... - def setValue(self, key: str, value: typing.Any) -> None: ... - def isWritable(self) -> bool: ... - def childGroups(self) -> typing.List[str]: ... - def childKeys(self) -> typing.List[str]: ... - def allKeys(self) -> typing.List[str]: ... - def setArrayIndex(self, i: int) -> None: ... - def endArray(self) -> None: ... - def beginWriteArray(self, prefix: str, size: int = ...) -> None: ... - def beginReadArray(self, prefix: str) -> int: ... - def group(self) -> str: ... - def endGroup(self) -> None: ... - def beginGroup(self, prefix: str) -> None: ... - def status(self) -> 'QSettings.Status': ... - def sync(self) -> None: ... - def clear(self) -> None: ... - - -class QSharedMemory(QObject): - - class SharedMemoryError(int): ... - NoError = ... # type: 'QSharedMemory.SharedMemoryError' - PermissionDenied = ... # type: 'QSharedMemory.SharedMemoryError' - InvalidSize = ... # type: 'QSharedMemory.SharedMemoryError' - KeyError = ... # type: 'QSharedMemory.SharedMemoryError' - AlreadyExists = ... # type: 'QSharedMemory.SharedMemoryError' - NotFound = ... # type: 'QSharedMemory.SharedMemoryError' - LockError = ... # type: 'QSharedMemory.SharedMemoryError' - OutOfResources = ... # type: 'QSharedMemory.SharedMemoryError' - UnknownError = ... # type: 'QSharedMemory.SharedMemoryError' - - class AccessMode(int): ... - ReadOnly = ... # type: 'QSharedMemory.AccessMode' - ReadWrite = ... # type: 'QSharedMemory.AccessMode' - - @typing.overload - def __init__(self, parent: typing.Optional[QObject] = ...) -> None: ... - @typing.overload - def __init__(self, key: str, parent: typing.Optional[QObject] = ...) -> None: ... - - def nativeKey(self) -> str: ... - def setNativeKey(self, key: str) -> None: ... - def errorString(self) -> str: ... - def error(self) -> 'QSharedMemory.SharedMemoryError': ... - def unlock(self) -> bool: ... - def lock(self) -> bool: ... - def constData(self) -> sip.voidptr: ... - def data(self) -> sip.voidptr: ... - def detach(self) -> bool: ... - def isAttached(self) -> bool: ... - def attach(self, mode: 'QSharedMemory.AccessMode' = ...) -> bool: ... - def size(self) -> int: ... - def create(self, size: int, mode: 'QSharedMemory.AccessMode' = ...) -> bool: ... - def key(self) -> str: ... - def setKey(self, key: str) -> None: ... - - -class QSignalMapper(QObject): - - from PyQt5.QtWidgets import QWidget - - def __init__(self, parent: typing.Optional[QObject] = ...) -> None: ... - - @typing.overload - def map(self) -> None: ... - @typing.overload - def map(self, sender: QObject) -> None: ... - @typing.overload - def mapped(self, a0: int) -> None: ... - @typing.overload - def mapped(self, a0: str) -> None: ... - @typing.overload - def mapped(self, a0: QWidget) -> None: ... - @typing.overload - def mapped(self, a0: QObject) -> None: ... - @typing.overload - def mapping(self, id: int) -> QObject: ... - @typing.overload - def mapping(self, text: str) -> QObject: ... - @typing.overload - def mapping(self, widget: QWidget) -> QObject: ... - @typing.overload - def mapping(self, object: QObject) -> QObject: ... - def removeMappings(self, sender: QObject) -> None: ... - @typing.overload - def setMapping(self, sender: QObject, id: int) -> None: ... - @typing.overload - def setMapping(self, sender: QObject, text: str) -> None: ... - @typing.overload - def setMapping(self, sender: QObject, widget: QWidget) -> None: ... - @typing.overload - def setMapping(self, sender: QObject, object: QObject) -> None: ... - - -class QSignalTransition(QAbstractTransition): - - @typing.overload - def __init__(self, sourceState: typing.Optional['QState'] = ...) -> None: ... - @typing.overload - def __init__(self, signal: pyqtBoundSignal, sourceState: typing.Optional['QState'] = ...) -> None: ... - - def signalChanged(self) -> None: ... - def senderObjectChanged(self) -> None: ... - def event(self, e: QEvent) -> bool: ... - def onTransition(self, event: QEvent) -> None: ... - def eventTest(self, event: QEvent) -> bool: ... - def setSignal(self, signal: typing.Union[QByteArray, bytes, bytearray]) -> None: ... - def signal(self) -> QByteArray: ... - def setSenderObject(self, sender: QObject) -> None: ... - def senderObject(self) -> QObject: ... - - -class QSize(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, w: int, h: int) -> None: ... - @typing.overload - def __init__(self, a0: 'QSize') -> None: ... - - def transposed(self) -> 'QSize': ... - @typing.overload - def scaled(self, s: 'QSize', mode: Qt.AspectRatioMode) -> 'QSize': ... - @typing.overload - def scaled(self, w: int, h: int, mode: Qt.AspectRatioMode) -> 'QSize': ... - def boundedTo(self, otherSize: 'QSize') -> 'QSize': ... - def expandedTo(self, otherSize: 'QSize') -> 'QSize': ... - def setHeight(self, h: int) -> None: ... - def setWidth(self, w: int) -> None: ... - def height(self) -> int: ... - def width(self) -> int: ... - def __bool__(self) -> int: ... - def isValid(self) -> bool: ... - def isEmpty(self) -> bool: ... - def isNull(self) -> bool: ... - def __repr__(self) -> str: ... - @typing.overload - def scale(self, s: 'QSize', mode: Qt.AspectRatioMode) -> None: ... - @typing.overload - def scale(self, w: int, h: int, mode: Qt.AspectRatioMode) -> None: ... - def transpose(self) -> None: ... - - -class QSizeF(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, sz: QSize) -> None: ... - @typing.overload - def __init__(self, w: float, h: float) -> None: ... - @typing.overload - def __init__(self, a0: 'QSizeF') -> None: ... - - def transposed(self) -> 'QSizeF': ... - @typing.overload - def scaled(self, s: 'QSizeF', mode: Qt.AspectRatioMode) -> 'QSizeF': ... - @typing.overload - def scaled(self, w: float, h: float, mode: Qt.AspectRatioMode) -> 'QSizeF': ... - def toSize(self) -> QSize: ... - def boundedTo(self, otherSize: 'QSizeF') -> 'QSizeF': ... - def expandedTo(self, otherSize: 'QSizeF') -> 'QSizeF': ... - def setHeight(self, h: float) -> None: ... - def setWidth(self, w: float) -> None: ... - def height(self) -> float: ... - def width(self) -> float: ... - def __bool__(self) -> int: ... - def isValid(self) -> bool: ... - def isEmpty(self) -> bool: ... - def isNull(self) -> bool: ... - def __repr__(self) -> str: ... - @typing.overload - def scale(self, s: 'QSizeF', mode: Qt.AspectRatioMode) -> None: ... - @typing.overload - def scale(self, w: float, h: float, mode: Qt.AspectRatioMode) -> None: ... - def transpose(self) -> None: ... - - -class QSocketNotifier(QObject): - - class Type(int): ... - Read = ... # type: 'QSocketNotifier.Type' - Write = ... # type: 'QSocketNotifier.Type' - Exception = ... # type: 'QSocketNotifier.Type' - - def __init__(self, socket: sip.voidptr, a1: 'QSocketNotifier.Type', parent: typing.Optional[QObject] = ...) -> None: ... - - def event(self, a0: QEvent) -> bool: ... - def activated(self, socket: int) -> None: ... - def setEnabled(self, a0: bool) -> None: ... - def isEnabled(self) -> bool: ... - def type(self) -> 'QSocketNotifier.Type': ... - def socket(self) -> sip.voidptr: ... - - -class QSortFilterProxyModel(QAbstractProxyModel): - - def __init__(self, parent: typing.Optional[QObject] = ...) -> None: ... - - def invalidateFilter(self) -> None: ... - def invalidate(self) -> None: ... - def sibling(self, row: int, column: int, idx: QModelIndex) -> QModelIndex: ... - def setSortLocaleAware(self, on: bool) -> None: ... - def isSortLocaleAware(self) -> bool: ... - def supportedDropActions(self) -> Qt.DropActions: ... - def mimeTypes(self) -> typing.List[str]: ... - def setFilterRole(self, role: int) -> None: ... - def filterRole(self) -> int: ... - def sortOrder(self) -> Qt.SortOrder: ... - def sortColumn(self) -> int: ... - def setSortRole(self, role: int) -> None: ... - def sortRole(self) -> int: ... - def setDynamicSortFilter(self, enable: bool) -> None: ... - def dynamicSortFilter(self) -> bool: ... - def setSortCaseSensitivity(self, cs: Qt.CaseSensitivity) -> None: ... - def sortCaseSensitivity(self) -> Qt.CaseSensitivity: ... - def sort(self, column: int, order: Qt.SortOrder = ...) -> None: ... - def match(self, start: QModelIndex, role: int, value: typing.Any, hits: int = ..., flags: typing.Union[Qt.MatchFlags, Qt.MatchFlag] = ...) -> typing.Any: ... - def span(self, index: QModelIndex) -> QSize: ... - def buddy(self, index: QModelIndex) -> QModelIndex: ... - def flags(self, index: QModelIndex) -> Qt.ItemFlags: ... - def canFetchMore(self, parent: QModelIndex) -> bool: ... - def fetchMore(self, parent: QModelIndex) -> None: ... - def removeColumns(self, column: int, count: int, parent: QModelIndex = ...) -> bool: ... - def removeRows(self, row: int, count: int, parent: QModelIndex = ...) -> bool: ... - def insertColumns(self, column: int, count: int, parent: QModelIndex = ...) -> bool: ... - def insertRows(self, row: int, count: int, parent: QModelIndex = ...) -> bool: ... - def dropMimeData(self, data: QMimeData, action: Qt.DropAction, row: int, column: int, parent: QModelIndex) -> bool: ... - def mimeData(self, indexes: typing.Any) -> QMimeData: ... - def setHeaderData(self, section: int, orientation: Qt.Orientation, value: typing.Any, role: int = ...) -> bool: ... - def headerData(self, section: int, orientation: Qt.Orientation, role: int = ...) -> typing.Any: ... - def setData(self, index: QModelIndex, value: typing.Any, role: int = ...) -> bool: ... - def data(self, index: QModelIndex, role: int = ...) -> typing.Any: ... - def hasChildren(self, parent: QModelIndex = ...) -> bool: ... - def columnCount(self, parent: QModelIndex = ...) -> int: ... - def rowCount(self, parent: QModelIndex = ...) -> int: ... - @typing.overload - def parent(self, child: QModelIndex) -> QModelIndex: ... - @typing.overload - def parent(self) -> QObject: ... - def index(self, row: int, column: int, parent: QModelIndex = ...) -> QModelIndex: ... - def lessThan(self, left: QModelIndex, right: QModelIndex) -> bool: ... - def filterAcceptsColumn(self, source_column: int, source_parent: QModelIndex) -> bool: ... - def filterAcceptsRow(self, source_row: int, source_parent: QModelIndex) -> bool: ... - def setFilterFixedString(self, pattern: str) -> None: ... - def setFilterWildcard(self, pattern: str) -> None: ... - def setFilterCaseSensitivity(self, cs: Qt.CaseSensitivity) -> None: ... - def filterCaseSensitivity(self) -> Qt.CaseSensitivity: ... - def setFilterKeyColumn(self, column: int) -> None: ... - def filterKeyColumn(self) -> int: ... - @typing.overload - def setFilterRegExp(self, regExp: QRegExp) -> None: ... - @typing.overload - def setFilterRegExp(self, pattern: str) -> None: ... - def filterRegExp(self) -> QRegExp: ... - def mapSelectionFromSource(self, sourceSelection: QItemSelection) -> QItemSelection: ... - def mapSelectionToSource(self, proxySelection: QItemSelection) -> QItemSelection: ... - def mapFromSource(self, sourceIndex: QModelIndex) -> QModelIndex: ... - def mapToSource(self, proxyIndex: QModelIndex) -> QModelIndex: ... - def setSourceModel(self, sourceModel: QAbstractItemModel) -> None: ... - - -class QStandardPaths(sip.simplewrapper): - - class LocateOption(int): ... - LocateFile = ... # type: 'QStandardPaths.LocateOption' - LocateDirectory = ... # type: 'QStandardPaths.LocateOption' - - class StandardLocation(int): ... - DesktopLocation = ... # type: 'QStandardPaths.StandardLocation' - DocumentsLocation = ... # type: 'QStandardPaths.StandardLocation' - FontsLocation = ... # type: 'QStandardPaths.StandardLocation' - ApplicationsLocation = ... # type: 'QStandardPaths.StandardLocation' - MusicLocation = ... # type: 'QStandardPaths.StandardLocation' - MoviesLocation = ... # type: 'QStandardPaths.StandardLocation' - PicturesLocation = ... # type: 'QStandardPaths.StandardLocation' - TempLocation = ... # type: 'QStandardPaths.StandardLocation' - HomeLocation = ... # type: 'QStandardPaths.StandardLocation' - DataLocation = ... # type: 'QStandardPaths.StandardLocation' - CacheLocation = ... # type: 'QStandardPaths.StandardLocation' - GenericDataLocation = ... # type: 'QStandardPaths.StandardLocation' - RuntimeLocation = ... # type: 'QStandardPaths.StandardLocation' - ConfigLocation = ... # type: 'QStandardPaths.StandardLocation' - DownloadLocation = ... # type: 'QStandardPaths.StandardLocation' - GenericCacheLocation = ... # type: 'QStandardPaths.StandardLocation' - GenericConfigLocation = ... # type: 'QStandardPaths.StandardLocation' - AppDataLocation = ... # type: 'QStandardPaths.StandardLocation' - AppLocalDataLocation = ... # type: 'QStandardPaths.StandardLocation' - AppConfigLocation = ... # type: 'QStandardPaths.StandardLocation' - - class LocateOptions(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QStandardPaths.LocateOptions', 'QStandardPaths.LocateOption']) -> None: ... - @typing.overload - def __init__(self, a0: 'QStandardPaths.LocateOptions') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QStandardPaths.LocateOptions': ... - def __int__(self) -> int: ... - - def __init__(self, a0: 'QStandardPaths') -> None: ... - - @staticmethod - def setTestModeEnabled(testMode: bool) -> None: ... - @staticmethod - def enableTestMode(testMode: bool) -> None: ... - @staticmethod - def findExecutable(executableName: str, paths: typing.Iterable[str] = ...) -> str: ... - @staticmethod - def displayName(type: 'QStandardPaths.StandardLocation') -> str: ... - @staticmethod - def locateAll(type: 'QStandardPaths.StandardLocation', fileName: str, options: 'QStandardPaths.LocateOptions' = ...) -> typing.List[str]: ... - @staticmethod - def locate(type: 'QStandardPaths.StandardLocation', fileName: str, options: 'QStandardPaths.LocateOptions' = ...) -> str: ... - @staticmethod - def standardLocations(type: 'QStandardPaths.StandardLocation') -> typing.List[str]: ... - @staticmethod - def writableLocation(type: 'QStandardPaths.StandardLocation') -> str: ... - - -class QState(QAbstractState): - - class RestorePolicy(int): ... - DontRestoreProperties = ... # type: 'QState.RestorePolicy' - RestoreProperties = ... # type: 'QState.RestorePolicy' - - class ChildMode(int): ... - ExclusiveStates = ... # type: 'QState.ChildMode' - ParallelStates = ... # type: 'QState.ChildMode' - - @typing.overload - def __init__(self, parent: typing.Optional['QState'] = ...) -> None: ... - @typing.overload - def __init__(self, childMode: 'QState.ChildMode', parent: typing.Optional['QState'] = ...) -> None: ... - - def errorStateChanged(self) -> None: ... - def initialStateChanged(self) -> None: ... - def childModeChanged(self) -> None: ... - def event(self, e: QEvent) -> bool: ... - def onExit(self, event: QEvent) -> None: ... - def onEntry(self, event: QEvent) -> None: ... - def propertiesAssigned(self) -> None: ... - def finished(self) -> None: ... - def assignProperty(self, object: QObject, name: str, value: typing.Any) -> None: ... - def setChildMode(self, mode: 'QState.ChildMode') -> None: ... - def childMode(self) -> 'QState.ChildMode': ... - def setInitialState(self, state: QAbstractState) -> None: ... - def initialState(self) -> QAbstractState: ... - def transitions(self) -> typing.Any: ... - def removeTransition(self, transition: QAbstractTransition) -> None: ... - @typing.overload - def addTransition(self, transition: QAbstractTransition) -> None: ... - @typing.overload - def addTransition(self, signal: pyqtBoundSignal, target: QAbstractState) -> QSignalTransition: ... - @typing.overload - def addTransition(self, target: QAbstractState) -> QAbstractTransition: ... - def setErrorState(self, state: QAbstractState) -> None: ... - def errorState(self) -> QAbstractState: ... - - -class QStateMachine(QState): - - class Error(int): ... - NoError = ... # type: 'QStateMachine.Error' - NoInitialStateError = ... # type: 'QStateMachine.Error' - NoDefaultStateInHistoryStateError = ... # type: 'QStateMachine.Error' - NoCommonAncestorForTransitionError = ... # type: 'QStateMachine.Error' - - class EventPriority(int): ... - NormalPriority = ... # type: 'QStateMachine.EventPriority' - HighPriority = ... # type: 'QStateMachine.EventPriority' - - class SignalEvent(QEvent): - - def arguments(self) -> typing.List[typing.Any]: ... - def signalIndex(self) -> int: ... - def sender(self) -> QObject: ... - - class WrappedEvent(QEvent): - - def event(self) -> QEvent: ... - def object(self) -> QObject: ... - - @typing.overload - def __init__(self, parent: typing.Optional[QObject] = ...) -> None: ... - @typing.overload - def __init__(self, childMode: QState.ChildMode, parent: typing.Optional[QObject] = ...) -> None: ... - - def event(self, e: QEvent) -> bool: ... - def onExit(self, event: QEvent) -> None: ... - def onEntry(self, event: QEvent) -> None: ... - def runningChanged(self, running: bool) -> None: ... - def stopped(self) -> None: ... - def started(self) -> None: ... - def setRunning(self, running: bool) -> None: ... - def stop(self) -> None: ... - def start(self) -> None: ... - def eventFilter(self, watched: QObject, event: QEvent) -> bool: ... - def configuration(self) -> typing.Any: ... - def cancelDelayedEvent(self, id: int) -> bool: ... - def postDelayedEvent(self, event: QEvent, delay: int) -> int: ... - def postEvent(self, event: QEvent, priority: 'QStateMachine.EventPriority' = ...) -> None: ... - def setGlobalRestorePolicy(self, restorePolicy: QState.RestorePolicy) -> None: ... - def globalRestorePolicy(self) -> QState.RestorePolicy: ... - def removeDefaultAnimation(self, animation: QAbstractAnimation) -> None: ... - def defaultAnimations(self) -> typing.List[QAbstractAnimation]: ... - def addDefaultAnimation(self, animation: QAbstractAnimation) -> None: ... - def setAnimated(self, enabled: bool) -> None: ... - def isAnimated(self) -> bool: ... - def isRunning(self) -> bool: ... - def clearError(self) -> None: ... - def errorString(self) -> str: ... - def error(self) -> 'QStateMachine.Error': ... - def removeState(self, state: QAbstractState) -> None: ... - def addState(self, state: QAbstractState) -> None: ... - - -class QStorageInfo(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, path: str) -> None: ... - @typing.overload - def __init__(self, dir: QDir) -> None: ... - @typing.overload - def __init__(self, other: 'QStorageInfo') -> None: ... - - def blockSize(self) -> int: ... - def isRoot(self) -> bool: ... - @staticmethod - def root() -> 'QStorageInfo': ... - @staticmethod - def mountedVolumes() -> typing.Any: ... - def refresh(self) -> None: ... - def isValid(self) -> bool: ... - def isReady(self) -> bool: ... - def isReadOnly(self) -> bool: ... - def bytesAvailable(self) -> int: ... - def bytesFree(self) -> int: ... - def bytesTotal(self) -> int: ... - def displayName(self) -> str: ... - def name(self) -> str: ... - def fileSystemType(self) -> QByteArray: ... - def device(self) -> QByteArray: ... - def rootPath(self) -> str: ... - def setPath(self, path: str) -> None: ... - def swap(self, other: 'QStorageInfo') -> None: ... - - -class QStringListModel(QAbstractListModel): - - @typing.overload - def __init__(self, parent: typing.Optional[QObject] = ...) -> None: ... - @typing.overload - def __init__(self, strings: typing.Iterable[str], parent: typing.Optional[QObject] = ...) -> None: ... - - def sibling(self, row: int, column: int, idx: QModelIndex) -> QModelIndex: ... - def supportedDropActions(self) -> Qt.DropActions: ... - def sort(self, column: int, order: Qt.SortOrder = ...) -> None: ... - def setStringList(self, strings: typing.Iterable[str]) -> None: ... - def stringList(self) -> typing.List[str]: ... - def removeRows(self, row: int, count: int, parent: QModelIndex = ...) -> bool: ... - def insertRows(self, row: int, count: int, parent: QModelIndex = ...) -> bool: ... - def flags(self, index: QModelIndex) -> Qt.ItemFlags: ... - def setData(self, index: QModelIndex, value: typing.Any, role: int = ...) -> bool: ... - # def data(self, index: QModelIndex, role: int) -> typing.Any: ... - def rowCount(self, parent: QModelIndex = ...) -> int: ... - - -class QSystemSemaphore(sip.simplewrapper): - - class SystemSemaphoreError(int): ... - NoError = ... # type: 'QSystemSemaphore.SystemSemaphoreError' - PermissionDenied = ... # type: 'QSystemSemaphore.SystemSemaphoreError' - KeyError = ... # type: 'QSystemSemaphore.SystemSemaphoreError' - AlreadyExists = ... # type: 'QSystemSemaphore.SystemSemaphoreError' - NotFound = ... # type: 'QSystemSemaphore.SystemSemaphoreError' - OutOfResources = ... # type: 'QSystemSemaphore.SystemSemaphoreError' - UnknownError = ... # type: 'QSystemSemaphore.SystemSemaphoreError' - - class AccessMode(int): ... - Open = ... # type: 'QSystemSemaphore.AccessMode' - Create = ... # type: 'QSystemSemaphore.AccessMode' - - def __init__(self, key: str, initialValue: int = ..., mode: 'QSystemSemaphore.AccessMode' = ...) -> None: ... - - def errorString(self) -> str: ... - def error(self) -> 'QSystemSemaphore.SystemSemaphoreError': ... - def release(self, n: int = ...) -> bool: ... - def acquire(self) -> bool: ... - def key(self) -> str: ... - def setKey(self, key: str, initialValue: int = ..., mode: 'QSystemSemaphore.AccessMode' = ...) -> None: ... - - -class QTemporaryDir(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, templateName: str) -> None: ... - - def errorString(self) -> str: ... - def path(self) -> str: ... - def remove(self) -> bool: ... - def setAutoRemove(self, b: bool) -> None: ... - def autoRemove(self) -> bool: ... - def isValid(self) -> bool: ... - - -class QTemporaryFile(QFile): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, templateName: str) -> None: ... - @typing.overload - def __init__(self, parent: QObject) -> None: ... - @typing.overload - def __init__(self, templateName: str, parent: QObject) -> None: ... - - @typing.overload - @staticmethod - def createNativeFile(fileName: str) -> 'QTemporaryFile': ... - @typing.overload - @staticmethod - def createNativeFile(file: QFile) -> 'QTemporaryFile': ... - def setFileTemplate(self, name: str) -> None: ... - def fileTemplate(self) -> str: ... - def fileName(self) -> str: ... - # @typing.overload - # def open(self, flags: typing.Union[QIODevice.OpenMode, QIODevice.OpenModeFlag]) -> bool: ... - # @typing.overload - # def open(self, fd: int, ioFlags: typing.Union[QIODevice.OpenMode, QIODevice.OpenModeFlag], handleFlags: typing.Union[QFileDevice.FileHandleFlags, QFileDevice.FileHandleFlag] = ...) -> bool: ... - # @typing.overload - # def open(self) -> bool: ... - # @typing.overload - # def open(self, mode: QIODevice.OpenMode) -> bool: ... - def setAutoRemove(self, b: bool) -> None: ... - def autoRemove(self) -> bool: ... - - -class QTextBoundaryFinder(sip.simplewrapper): - - class BoundaryType(int): ... - Grapheme = ... # type: 'QTextBoundaryFinder.BoundaryType' - Word = ... # type: 'QTextBoundaryFinder.BoundaryType' - Line = ... # type: 'QTextBoundaryFinder.BoundaryType' - Sentence = ... # type: 'QTextBoundaryFinder.BoundaryType' - - class BoundaryReason(int): ... - NotAtBoundary = ... # type: 'QTextBoundaryFinder.BoundaryReason' - SoftHyphen = ... # type: 'QTextBoundaryFinder.BoundaryReason' - BreakOpportunity = ... # type: 'QTextBoundaryFinder.BoundaryReason' - StartOfItem = ... # type: 'QTextBoundaryFinder.BoundaryReason' - EndOfItem = ... # type: 'QTextBoundaryFinder.BoundaryReason' - MandatoryBreak = ... # type: 'QTextBoundaryFinder.BoundaryReason' - - class BoundaryReasons(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QTextBoundaryFinder.BoundaryReasons', 'QTextBoundaryFinder.BoundaryReason']) -> None: ... - @typing.overload - def __init__(self, a0: 'QTextBoundaryFinder.BoundaryReasons') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QTextBoundaryFinder.BoundaryReasons': ... - def __int__(self) -> int: ... - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, other: 'QTextBoundaryFinder') -> None: ... - @typing.overload - def __init__(self, type: 'QTextBoundaryFinder.BoundaryType', string: str) -> None: ... - - def boundaryReasons(self) -> 'QTextBoundaryFinder.BoundaryReasons': ... - def isAtBoundary(self) -> bool: ... - def toPreviousBoundary(self) -> int: ... - def toNextBoundary(self) -> int: ... - def setPosition(self, position: int) -> None: ... - def position(self) -> int: ... - def toEnd(self) -> None: ... - def toStart(self) -> None: ... - def string(self) -> str: ... - def type(self) -> 'QTextBoundaryFinder.BoundaryType': ... - def isValid(self) -> bool: ... - - -class QTextCodec(sip.wrapper): - - class ConversionFlag(int): ... - DefaultConversion = ... # type: 'QTextCodec.ConversionFlag' - ConvertInvalidToNull = ... # type: 'QTextCodec.ConversionFlag' - IgnoreHeader = ... # type: 'QTextCodec.ConversionFlag' - - class ConversionFlags(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QTextCodec.ConversionFlags', 'QTextCodec.ConversionFlag']) -> None: ... - @typing.overload - def __init__(self, a0: 'QTextCodec.ConversionFlags') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QTextCodec.ConversionFlags': ... - def __int__(self) -> int: ... - - class ConverterState(sip.simplewrapper): - - def __init__(self, flags: typing.Union['QTextCodec.ConversionFlags', 'QTextCodec.ConversionFlag'] = ...) -> None: ... - - def __init__(self) -> None: ... - - def convertToUnicode(self, in_: bytes, state: 'QTextCodec.ConverterState') -> str: ... - def mibEnum(self) -> int: ... - def aliases(self) -> typing.List[QByteArray]: ... - def name(self) -> QByteArray: ... - def fromUnicode(self, uc: str) -> QByteArray: ... - @typing.overload - def toUnicode(self, a0: typing.Union[QByteArray, bytes, bytearray]) -> str: ... - @typing.overload - def toUnicode(self, chars: str) -> str: ... - @typing.overload - def toUnicode(self, in_: bytes, state: typing.Optional['QTextCodec.ConverterState'] = ...) -> str: ... - def canEncode(self, a0: str) -> bool: ... - def makeEncoder(self, flags: typing.Union['QTextCodec.ConversionFlags', 'QTextCodec.ConversionFlag'] = ...) -> 'QTextEncoder': ... - def makeDecoder(self, flags: typing.Union['QTextCodec.ConversionFlags', 'QTextCodec.ConversionFlag'] = ...) -> 'QTextDecoder': ... - @staticmethod - def setCodecForLocale(c: 'QTextCodec') -> None: ... - @staticmethod - def codecForLocale() -> 'QTextCodec': ... - @staticmethod - def availableMibs() -> typing.List[int]: ... - @staticmethod - def availableCodecs() -> typing.List[QByteArray]: ... - @typing.overload - @staticmethod - def codecForUtfText(ba: typing.Union[QByteArray, bytes, bytearray]) -> 'QTextCodec': ... - @typing.overload - @staticmethod - def codecForUtfText(ba: typing.Union[QByteArray, bytes, bytearray], defaultCodec: 'QTextCodec') -> 'QTextCodec': ... - @typing.overload - @staticmethod - def codecForHtml(ba: typing.Union[QByteArray, bytes, bytearray]) -> 'QTextCodec': ... - @typing.overload - @staticmethod - def codecForHtml(ba: typing.Union[QByteArray, bytes, bytearray], defaultCodec: 'QTextCodec') -> 'QTextCodec': ... - @staticmethod - def codecForMib(mib: int) -> 'QTextCodec': ... - @typing.overload - @staticmethod - def codecForName(name: typing.Union[QByteArray, bytes, bytearray]) -> 'QTextCodec': ... - @typing.overload - @staticmethod - def codecForName(name: str) -> 'QTextCodec': ... - - -class QTextEncoder(sip.wrapper): - - @typing.overload - def __init__(self, codec: QTextCodec) -> None: ... - @typing.overload - def __init__(self, codec: QTextCodec, flags: typing.Union[QTextCodec.ConversionFlags, QTextCodec.ConversionFlag]) -> None: ... - - def fromUnicode(self, str: str) -> QByteArray: ... - - -class QTextDecoder(sip.wrapper): - - @typing.overload - def __init__(self, codec: QTextCodec) -> None: ... - @typing.overload - def __init__(self, codec: QTextCodec, flags: typing.Union[QTextCodec.ConversionFlags, QTextCodec.ConversionFlag]) -> None: ... - - @typing.overload - def toUnicode(self, chars: bytes) -> str: ... - @typing.overload - def toUnicode(self, ba: typing.Union[QByteArray, bytes, bytearray]) -> str: ... - - -class QTextStream(sip.simplewrapper): - - class Status(int): ... - Ok = ... # type: 'QTextStream.Status' - ReadPastEnd = ... # type: 'QTextStream.Status' - ReadCorruptData = ... # type: 'QTextStream.Status' - WriteFailed = ... # type: 'QTextStream.Status' - - class NumberFlag(int): ... - ShowBase = ... # type: 'QTextStream.NumberFlag' - ForcePoint = ... # type: 'QTextStream.NumberFlag' - ForceSign = ... # type: 'QTextStream.NumberFlag' - UppercaseBase = ... # type: 'QTextStream.NumberFlag' - UppercaseDigits = ... # type: 'QTextStream.NumberFlag' - - class FieldAlignment(int): ... - AlignLeft = ... # type: 'QTextStream.FieldAlignment' - AlignRight = ... # type: 'QTextStream.FieldAlignment' - AlignCenter = ... # type: 'QTextStream.FieldAlignment' - AlignAccountingStyle = ... # type: 'QTextStream.FieldAlignment' - - class RealNumberNotation(int): ... - SmartNotation = ... # type: 'QTextStream.RealNumberNotation' - FixedNotation = ... # type: 'QTextStream.RealNumberNotation' - ScientificNotation = ... # type: 'QTextStream.RealNumberNotation' - - class NumberFlags(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QTextStream.NumberFlags', 'QTextStream.NumberFlag']) -> None: ... - @typing.overload - def __init__(self, a0: 'QTextStream.NumberFlags') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QTextStream.NumberFlags': ... - def __int__(self) -> int: ... - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, device: QIODevice) -> None: ... - @typing.overload - def __init__(self, array: QByteArray, mode: typing.Union[QIODevice.OpenMode, QIODevice.OpenModeFlag] = ...) -> None: ... - - def locale(self) -> QLocale: ... - def setLocale(self, locale: QLocale) -> None: ... - def pos(self) -> int: ... - def resetStatus(self) -> None: ... - def setStatus(self, status: 'QTextStream.Status') -> None: ... - def status(self) -> 'QTextStream.Status': ... - def realNumberPrecision(self) -> int: ... - def setRealNumberPrecision(self, precision: int) -> None: ... - def realNumberNotation(self) -> 'QTextStream.RealNumberNotation': ... - def setRealNumberNotation(self, notation: 'QTextStream.RealNumberNotation') -> None: ... - def integerBase(self) -> int: ... - def setIntegerBase(self, base: int) -> None: ... - def numberFlags(self) -> 'QTextStream.NumberFlags': ... - def setNumberFlags(self, flags: typing.Union['QTextStream.NumberFlags', 'QTextStream.NumberFlag']) -> None: ... - def fieldWidth(self) -> int: ... - def setFieldWidth(self, width: int) -> None: ... - def padChar(self) -> str: ... - def setPadChar(self, ch: str) -> None: ... - def fieldAlignment(self) -> 'QTextStream.FieldAlignment': ... - def setFieldAlignment(self, alignment: 'QTextStream.FieldAlignment') -> None: ... - def readAll(self) -> str: ... - def readLine(self, maxLength: int = ...) -> str: ... - def read(self, maxlen: int) -> str: ... - def skipWhiteSpace(self) -> None: ... - def seek(self, pos: int) -> bool: ... - def flush(self) -> None: ... - def reset(self) -> None: ... - def atEnd(self) -> bool: ... - def device(self) -> QIODevice: ... - def setDevice(self, device: QIODevice) -> None: ... - def generateByteOrderMark(self) -> bool: ... - def setGenerateByteOrderMark(self, generate: bool) -> None: ... - def autoDetectUnicode(self) -> bool: ... - def setAutoDetectUnicode(self, enabled: bool) -> None: ... - def codec(self) -> QTextCodec: ... - @typing.overload - def setCodec(self, codec: QTextCodec) -> None: ... - @typing.overload - def setCodec(self, codecName: str) -> None: ... - - -class QTextStreamManipulator(sip.simplewrapper): ... - - -class QThread(QObject): - - class Priority(int): ... - IdlePriority = ... # type: 'QThread.Priority' - LowestPriority = ... # type: 'QThread.Priority' - LowPriority = ... # type: 'QThread.Priority' - NormalPriority = ... # type: 'QThread.Priority' - HighPriority = ... # type: 'QThread.Priority' - HighestPriority = ... # type: 'QThread.Priority' - TimeCriticalPriority = ... # type: 'QThread.Priority' - InheritPriority = ... # type: 'QThread.Priority' - - def __init__(self, parent: typing.Optional[QObject] = ...) -> None: ... - - def loopLevel(self) -> int: ... - def isInterruptionRequested(self) -> bool: ... - def requestInterruption(self) -> None: ... - def setEventDispatcher(self, eventDispatcher: QAbstractEventDispatcher) -> None: ... - def eventDispatcher(self) -> QAbstractEventDispatcher: ... - @staticmethod - def usleep(a0: int) -> None: ... - @staticmethod - def msleep(a0: int) -> None: ... - @staticmethod - def sleep(a0: int) -> None: ... - def event(self, event: QEvent) -> bool: ... - @staticmethod - def setTerminationEnabled(enabled: bool = ...) -> None: ... - def exec(self) -> int: ... - def exec_(self) -> int: ... - def run(self) -> None: ... - def finished(self) -> None: ... - def started(self) -> None: ... - def wait(self, msecs: int = ...) -> bool: ... - def quit(self) -> None: ... - def terminate(self) -> None: ... - def start(self, priority: 'QThread.Priority' = ...) -> None: ... - def exit(self, returnCode: int = ...) -> None: ... - def stackSize(self) -> int: ... - def setStackSize(self, stackSize: int) -> None: ... - def priority(self) -> 'QThread.Priority': ... - def setPriority(self, priority: 'QThread.Priority') -> None: ... - def isRunning(self) -> bool: ... - def isFinished(self) -> bool: ... - @staticmethod - def yieldCurrentThread() -> None: ... - @staticmethod - def idealThreadCount() -> int: ... - @staticmethod - def currentThreadId() -> sip.voidptr: ... - @staticmethod - def currentThread() -> 'QThread': ... - - -class QThreadPool(QObject): - - def __init__(self, parent: typing.Optional[QObject] = ...) -> None: ... - - def cancel(self, runnable: QRunnable) -> None: ... - def clear(self) -> None: ... - def waitForDone(self, msecs: int = ...) -> bool: ... - def releaseThread(self) -> None: ... - def reserveThread(self) -> None: ... - def activeThreadCount(self) -> int: ... - def setMaxThreadCount(self, maxThreadCount: int) -> None: ... - def maxThreadCount(self) -> int: ... - def setExpiryTimeout(self, expiryTimeout: int) -> None: ... - def expiryTimeout(self) -> int: ... - def tryStart(self, runnable: QRunnable) -> bool: ... - def start(self, runnable: QRunnable, priority: int = ...) -> None: ... - @staticmethod - def globalInstance() -> 'QThreadPool': ... - - -class QTimeLine(QObject): - - class State(int): ... - NotRunning = ... # type: 'QTimeLine.State' - Paused = ... # type: 'QTimeLine.State' - Running = ... # type: 'QTimeLine.State' - - class Direction(int): ... - Forward = ... # type: 'QTimeLine.Direction' - Backward = ... # type: 'QTimeLine.Direction' - - class CurveShape(int): ... - EaseInCurve = ... # type: 'QTimeLine.CurveShape' - EaseOutCurve = ... # type: 'QTimeLine.CurveShape' - EaseInOutCurve = ... # type: 'QTimeLine.CurveShape' - LinearCurve = ... # type: 'QTimeLine.CurveShape' - SineCurve = ... # type: 'QTimeLine.CurveShape' - CosineCurve = ... # type: 'QTimeLine.CurveShape' - - def __init__(self, duration: int = ..., parent: typing.Optional[QObject] = ...) -> None: ... - - def setEasingCurve(self, curve: typing.Union[QEasingCurve, QEasingCurve.Type]) -> None: ... - def easingCurve(self) -> QEasingCurve: ... - def timerEvent(self, event: QTimerEvent) -> None: ... - def valueChanged(self, x: float) -> None: ... - def stateChanged(self, newState: 'QTimeLine.State') -> None: ... - def frameChanged(self, a0: int) -> None: ... - def finished(self) -> None: ... - def toggleDirection(self) -> None: ... - def stop(self) -> None: ... - def start(self) -> None: ... - def setPaused(self, paused: bool) -> None: ... - def setCurrentTime(self, msec: int) -> None: ... - def resume(self) -> None: ... - def valueForTime(self, msec: int) -> float: ... - def frameForTime(self, msec: int) -> int: ... - def currentValue(self) -> float: ... - def currentFrame(self) -> int: ... - def currentTime(self) -> int: ... - def setCurveShape(self, shape: 'QTimeLine.CurveShape') -> None: ... - def curveShape(self) -> 'QTimeLine.CurveShape': ... - def setUpdateInterval(self, interval: int) -> None: ... - def updateInterval(self) -> int: ... - def setFrameRange(self, startFrame: int, endFrame: int) -> None: ... - def setEndFrame(self, frame: int) -> None: ... - def endFrame(self) -> int: ... - def setStartFrame(self, frame: int) -> None: ... - def startFrame(self) -> int: ... - def setDuration(self, duration: int) -> None: ... - def duration(self) -> int: ... - def setDirection(self, direction: 'QTimeLine.Direction') -> None: ... - def direction(self) -> 'QTimeLine.Direction': ... - def setLoopCount(self, count: int) -> None: ... - def loopCount(self) -> int: ... - def state(self) -> 'QTimeLine.State': ... - - -class QTimer(QObject): - - def __init__(self, parent: typing.Optional[QObject] = ...) -> None: ... - - def remainingTime(self) -> int: ... - def timerType(self) -> Qt.TimerType: ... - def setTimerType(self, atype: Qt.TimerType) -> None: ... - def timerEvent(self, a0: QTimerEvent) -> None: ... - def timeout(self) -> None: ... - def stop(self) -> None: ... - @typing.overload - def start(self, msec: int) -> None: ... - @typing.overload - def start(self) -> None: ... - @typing.overload - @staticmethod - def singleShot(msec: int, slot: PYQT_SLOT) -> None: ... - @typing.overload - @staticmethod - def singleShot(msec: int, timerType: Qt.TimerType, slot: PYQT_SLOT) -> None: ... - def setSingleShot(self, asingleShot: bool) -> None: ... - def isSingleShot(self) -> bool: ... - def interval(self) -> int: ... - def setInterval(self, msec: int) -> None: ... - def timerId(self) -> int: ... - def isActive(self) -> bool: ... - - -class QTimeZone(sip.simplewrapper): - - class NameType(int): ... - DefaultName = ... # type: 'QTimeZone.NameType' - LongName = ... # type: 'QTimeZone.NameType' - ShortName = ... # type: 'QTimeZone.NameType' - OffsetName = ... # type: 'QTimeZone.NameType' - - class TimeType(int): ... - StandardTime = ... # type: 'QTimeZone.TimeType' - DaylightTime = ... # type: 'QTimeZone.TimeType' - GenericTime = ... # type: 'QTimeZone.TimeType' - - class OffsetData(sip.simplewrapper): - - abbreviation = ... # type: str - atUtc = ... # type: typing.Union[QDateTime, datetime.datetime] - daylightTimeOffset = ... # type: int - offsetFromUtc = ... # type: int - standardTimeOffset = ... # type: int - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QTimeZone.OffsetData') -> None: ... - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, ianaId: typing.Union[QByteArray, bytes, bytearray]) -> None: ... - @typing.overload - def __init__(self, offsetSeconds: int) -> None: ... - @typing.overload - def __init__(self, zoneId: typing.Union[QByteArray, bytes, bytearray], offsetSeconds: int, name: str, abbreviation: str, country: QLocale.Country = ..., comment: str = ...) -> None: ... - @typing.overload - def __init__(self, other: 'QTimeZone') -> None: ... - - @staticmethod - def utc() -> 'QTimeZone': ... - @staticmethod - def systemTimeZone() -> 'QTimeZone': ... - @typing.overload - @staticmethod - def windowsIdToIanaIds(windowsId: typing.Union[QByteArray, bytes, bytearray]) -> typing.List[QByteArray]: ... - @typing.overload - @staticmethod - def windowsIdToIanaIds(windowsId: typing.Union[QByteArray, bytes, bytearray], country: QLocale.Country) -> typing.List[QByteArray]: ... - @typing.overload - @staticmethod - def windowsIdToDefaultIanaId(windowsId: typing.Union[QByteArray, bytes, bytearray]) -> QByteArray: ... - @typing.overload - @staticmethod - def windowsIdToDefaultIanaId(windowsId: typing.Union[QByteArray, bytes, bytearray], country: QLocale.Country) -> QByteArray: ... - @staticmethod - def ianaIdToWindowsId(ianaId: typing.Union[QByteArray, bytes, bytearray]) -> QByteArray: ... - @typing.overload - @staticmethod - def availableTimeZoneIds() -> typing.List[QByteArray]: ... - @typing.overload - @staticmethod - def availableTimeZoneIds(country: QLocale.Country) -> typing.List[QByteArray]: ... - @typing.overload - @staticmethod - def availableTimeZoneIds(offsetSeconds: int) -> typing.List[QByteArray]: ... - @staticmethod - def isTimeZoneIdAvailable(ianaId: typing.Union[QByteArray, bytes, bytearray]) -> bool: ... - @staticmethod - def systemTimeZoneId() -> QByteArray: ... - def transitions(self, fromDateTime: typing.Union[QDateTime, datetime.datetime], toDateTime: typing.Union[QDateTime, datetime.datetime]) -> typing.Any: ... - def previousTransition(self, beforeDateTime: typing.Union[QDateTime, datetime.datetime]) -> 'QTimeZone.OffsetData': ... - def nextTransition(self, afterDateTime: typing.Union[QDateTime, datetime.datetime]) -> 'QTimeZone.OffsetData': ... - def hasTransitions(self) -> bool: ... - def offsetData(self, forDateTime: typing.Union[QDateTime, datetime.datetime]) -> 'QTimeZone.OffsetData': ... - def isDaylightTime(self, atDateTime: typing.Union[QDateTime, datetime.datetime]) -> bool: ... - def hasDaylightTime(self) -> bool: ... - def daylightTimeOffset(self, atDateTime: typing.Union[QDateTime, datetime.datetime]) -> int: ... - def standardTimeOffset(self, atDateTime: typing.Union[QDateTime, datetime.datetime]) -> int: ... - def offsetFromUtc(self, atDateTime: typing.Union[QDateTime, datetime.datetime]) -> int: ... - def abbreviation(self, atDateTime: typing.Union[QDateTime, datetime.datetime]) -> str: ... - @typing.overload - def displayName(self, atDateTime: typing.Union[QDateTime, datetime.datetime], nameType: 'QTimeZone.NameType' = ..., locale: QLocale = ...) -> str: ... - @typing.overload - def displayName(self, timeType: 'QTimeZone.TimeType', nameType: 'QTimeZone.NameType' = ..., locale: QLocale = ...) -> str: ... - def comment(self) -> str: ... - def country(self) -> QLocale.Country: ... - def id(self) -> QByteArray: ... - def isValid(self) -> bool: ... - def swap(self, other: 'QTimeZone') -> None: ... - - -class QTranslator(QObject): - - def __init__(self, parent: typing.Optional[QObject] = ...) -> None: ... - - def loadFromData(self, data: bytes, directory: str = ...) -> bool: ... - @typing.overload - def load(self, fileName: str, directory: str = ..., searchDelimiters: str = ..., suffix: str = ...) -> bool: ... - @typing.overload - def load(self, locale: QLocale, fileName: str, prefix: str = ..., directory: str = ..., suffix: str = ...) -> bool: ... - def isEmpty(self) -> bool: ... - def translate(self, context: str, sourceText: str, disambiguation: typing.Optional[str] = ..., n: int = ...) -> str: ... - - -class QUrl(sip.simplewrapper): - - class UserInputResolutionOption(int): ... - DefaultResolution = ... # type: 'QUrl.UserInputResolutionOption' - AssumeLocalFile = ... # type: 'QUrl.UserInputResolutionOption' - - class ComponentFormattingOption(int): ... - PrettyDecoded = ... # type: 'QUrl.ComponentFormattingOption' - EncodeSpaces = ... # type: 'QUrl.ComponentFormattingOption' - EncodeUnicode = ... # type: 'QUrl.ComponentFormattingOption' - EncodeDelimiters = ... # type: 'QUrl.ComponentFormattingOption' - EncodeReserved = ... # type: 'QUrl.ComponentFormattingOption' - DecodeReserved = ... # type: 'QUrl.ComponentFormattingOption' - FullyEncoded = ... # type: 'QUrl.ComponentFormattingOption' - FullyDecoded = ... # type: 'QUrl.ComponentFormattingOption' - - class UrlFormattingOption(int): ... - None_ = ... # type: 'QUrl.UrlFormattingOption' - RemoveScheme = ... # type: 'QUrl.UrlFormattingOption' - RemovePassword = ... # type: 'QUrl.UrlFormattingOption' - RemoveUserInfo = ... # type: 'QUrl.UrlFormattingOption' - RemovePort = ... # type: 'QUrl.UrlFormattingOption' - RemoveAuthority = ... # type: 'QUrl.UrlFormattingOption' - RemovePath = ... # type: 'QUrl.UrlFormattingOption' - RemoveQuery = ... # type: 'QUrl.UrlFormattingOption' - RemoveFragment = ... # type: 'QUrl.UrlFormattingOption' - PreferLocalFile = ... # type: 'QUrl.UrlFormattingOption' - StripTrailingSlash = ... # type: 'QUrl.UrlFormattingOption' - RemoveFilename = ... # type: 'QUrl.UrlFormattingOption' - NormalizePathSegments = ... # type: 'QUrl.UrlFormattingOption' - - class ParsingMode(int): ... - TolerantMode = ... # type: 'QUrl.ParsingMode' - StrictMode = ... # type: 'QUrl.ParsingMode' - DecodedMode = ... # type: 'QUrl.ParsingMode' - - class FormattingOptions(sip.simplewrapper): - - def __init__(self, a0: 'QUrl.FormattingOptions') -> None: ... - - - class ComponentFormattingOptions(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QUrl.ComponentFormattingOptions', 'QUrl.ComponentFormattingOption']) -> None: ... - @typing.overload - def __init__(self, a0: 'QUrl.ComponentFormattingOptions') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QUrl.ComponentFormattingOptions': ... - def __int__(self) -> int: ... - - class UserInputResolutionOptions(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QUrl.UserInputResolutionOptions', 'QUrl.UserInputResolutionOption']) -> None: ... - @typing.overload - def __init__(self, a0: 'QUrl.UserInputResolutionOptions') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QUrl.UserInputResolutionOptions': ... - def __int__(self) -> int: ... - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, url: str, mode: 'QUrl.ParsingMode' = ...) -> None: ... - @typing.overload - def __init__(self, copy: 'QUrl') -> None: ... - - def matches(self, url: 'QUrl', options: 'QUrl.FormattingOptions') -> bool: ... - def fileName(self, options: 'QUrl.ComponentFormattingOptions' = ...) -> str: ... - def adjusted(self, options: 'QUrl.FormattingOptions') -> 'QUrl': ... - @staticmethod - def fromStringList(uris: typing.Iterable[str], mode: 'QUrl.ParsingMode' = ...) -> typing.List['QUrl']: ... - @staticmethod - def toStringList(uris: typing.Iterable['QUrl'], options: 'QUrl.FormattingOptions' = ...) -> typing.List[str]: ... - def query(self, options: 'QUrl.ComponentFormattingOptions' = ...) -> str: ... - @typing.overload - def setQuery(self, query: str, mode: 'QUrl.ParsingMode' = ...) -> None: ... - @typing.overload - def setQuery(self, query: 'QUrlQuery') -> None: ... - def toDisplayString(self, options: 'QUrl.FormattingOptions' = ...) -> str: ... - def isLocalFile(self) -> bool: ... - def topLevelDomain(self, options: 'QUrl.ComponentFormattingOptions' = ...) -> str: ... - def swap(self, other: 'QUrl') -> None: ... - @typing.overload - @staticmethod - def fromUserInput(userInput: str) -> 'QUrl': ... - @typing.overload - @staticmethod - def fromUserInput(userInput: str, workingDirectory: str, options: 'QUrl.UserInputResolutionOptions' = ...) -> 'QUrl': ... - @staticmethod - def setIdnWhitelist(a0: typing.Iterable[str]) -> None: ... - @staticmethod - def idnWhitelist() -> typing.List[str]: ... - @staticmethod - def toAce(a0: str) -> QByteArray: ... - @staticmethod - def fromAce(a0: typing.Union[QByteArray, bytes, bytearray]) -> str: ... - def errorString(self) -> str: ... - def hasFragment(self) -> bool: ... - def hasQuery(self) -> bool: ... - @staticmethod - def toPercentEncoding(input: str, exclude: typing.Union[QByteArray, bytes, bytearray] = ..., include: typing.Union[QByteArray, bytes, bytearray] = ...) -> QByteArray: ... - @staticmethod - def fromPercentEncoding(a0: typing.Union[QByteArray, bytes, bytearray]) -> str: ... - def isDetached(self) -> bool: ... - def detach(self) -> None: ... - @staticmethod - def fromEncoded(u: typing.Union[QByteArray, bytes, bytearray], mode: 'QUrl.ParsingMode' = ...) -> 'QUrl': ... - def toEncoded(self, options: 'QUrl.FormattingOptions' = ...) -> QByteArray: ... - def toString(self, options: 'QUrl.FormattingOptions' = ...) -> str: ... - def toLocalFile(self) -> str: ... - @staticmethod - def fromLocalFile(localfile: str) -> 'QUrl': ... - def isParentOf(self, url: 'QUrl') -> bool: ... - def isRelative(self) -> bool: ... - def resolved(self, relative: 'QUrl') -> 'QUrl': ... - def fragment(self, options: 'QUrl.ComponentFormattingOptions' = ...) -> str: ... - def setFragment(self, fragment: str, mode: 'QUrl.ParsingMode' = ...) -> None: ... - def path(self, options: 'QUrl.ComponentFormattingOptions' = ...) -> str: ... - def setPath(self, path: str, mode: 'QUrl.ParsingMode' = ...) -> None: ... - def port(self, defaultPort: int = ...) -> int: ... - def setPort(self, port: int) -> None: ... - def host(self, options: 'QUrl.ComponentFormattingOptions' = ...) -> str: ... - def setHost(self, host: str, mode: 'QUrl.ParsingMode' = ...) -> None: ... - def password(self, options: 'QUrl.ComponentFormattingOptions' = ...) -> str: ... - def setPassword(self, password: str, mode: 'QUrl.ParsingMode' = ...) -> None: ... - def userName(self, options: 'QUrl.ComponentFormattingOptions' = ...) -> str: ... - def setUserName(self, userName: str, mode: 'QUrl.ParsingMode' = ...) -> None: ... - def userInfo(self, options: 'QUrl.ComponentFormattingOptions' = ...) -> str: ... - def setUserInfo(self, userInfo: str, mode: 'QUrl.ParsingMode' = ...) -> None: ... - def authority(self, options: 'QUrl.ComponentFormattingOptions' = ...) -> str: ... - def setAuthority(self, authority: str, mode: 'QUrl.ParsingMode' = ...) -> None: ... - def scheme(self) -> str: ... - def setScheme(self, scheme: str) -> None: ... - def clear(self) -> None: ... - def isEmpty(self) -> bool: ... - def isValid(self) -> bool: ... - def setUrl(self, url: str, mode: 'QUrl.ParsingMode' = ...) -> None: ... - def url(self, options: 'QUrl.FormattingOptions' = ...) -> str: ... - def __repr__(self) -> str: ... - def __hash__(self) -> int: ... - - -class QUrlQuery(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, url: QUrl) -> None: ... - @typing.overload - def __init__(self, queryString: str) -> None: ... - @typing.overload - def __init__(self, other: 'QUrlQuery') -> None: ... - - def __hash__(self) -> int: ... - @staticmethod - def defaultQueryPairDelimiter() -> str: ... - @staticmethod - def defaultQueryValueDelimiter() -> str: ... - def removeAllQueryItems(self, key: str) -> None: ... - def allQueryItemValues(self, key: str, options: typing.Union[QUrl.ComponentFormattingOptions, QUrl.ComponentFormattingOption] = ...) -> typing.List[str]: ... - def queryItemValue(self, key: str, options: typing.Union[QUrl.ComponentFormattingOptions, QUrl.ComponentFormattingOption] = ...) -> str: ... - def removeQueryItem(self, key: str) -> None: ... - def addQueryItem(self, key: str, value: str) -> None: ... - def hasQueryItem(self, key: str) -> bool: ... - def queryItems(self, options: typing.Union[QUrl.ComponentFormattingOptions, QUrl.ComponentFormattingOption] = ...) -> typing.List[typing.Tuple[str, str]]: ... - def setQueryItems(self, query: typing.Any) -> None: ... - def queryPairDelimiter(self) -> str: ... - def queryValueDelimiter(self) -> str: ... - def setQueryDelimiters(self, valueDelimiter: str, pairDelimiter: str) -> None: ... - def toString(self, options: typing.Union[QUrl.ComponentFormattingOptions, QUrl.ComponentFormattingOption] = ...) -> str: ... - def setQuery(self, queryString: str) -> None: ... - def query(self, options: typing.Union[QUrl.ComponentFormattingOptions, QUrl.ComponentFormattingOption] = ...) -> str: ... - def clear(self) -> None: ... - def isDetached(self) -> bool: ... - def isEmpty(self) -> bool: ... - def swap(self, other: 'QUrlQuery') -> None: ... - - -class QUuid(sip.simplewrapper): - - class Version(int): ... - VerUnknown = ... # type: 'QUuid.Version' - Time = ... # type: 'QUuid.Version' - EmbeddedPOSIX = ... # type: 'QUuid.Version' - Md5 = ... # type: 'QUuid.Version' - Name = ... # type: 'QUuid.Version' - Random = ... # type: 'QUuid.Version' - Sha1 = ... # type: 'QUuid.Version' - - class Variant(int): ... - VarUnknown = ... # type: 'QUuid.Variant' - NCS = ... # type: 'QUuid.Variant' - DCE = ... # type: 'QUuid.Variant' - Microsoft = ... # type: 'QUuid.Variant' - Reserved = ... # type: 'QUuid.Variant' - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, l: int, w1: int, w2: int, b1: int, b2: int, b3: int, b4: int, b5: int, b6: int, b7: int, b8: int) -> None: ... - @typing.overload - def __init__(self, a0: str) -> None: ... - @typing.overload - def __init__(self, a0: typing.Union[QByteArray, bytes, bytearray]) -> None: ... - @typing.overload - def __init__(self, a0: 'QUuid') -> None: ... - - @staticmethod - def fromRfc4122(a0: typing.Union[QByteArray, bytes, bytearray]) -> 'QUuid': ... - def toRfc4122(self) -> QByteArray: ... - def toByteArray(self) -> QByteArray: ... - def version(self) -> 'QUuid.Version': ... - def variant(self) -> 'QUuid.Variant': ... - @typing.overload - @staticmethod - def createUuidV5(ns: 'QUuid', baseData: typing.Union[QByteArray, bytes, bytearray]) -> 'QUuid': ... - @typing.overload - @staticmethod - def createUuidV5(ns: 'QUuid', baseData: str) -> 'QUuid': ... - @typing.overload - @staticmethod - def createUuidV3(ns: 'QUuid', baseData: typing.Union[QByteArray, bytes, bytearray]) -> 'QUuid': ... - @typing.overload - @staticmethod - def createUuidV3(ns: 'QUuid', baseData: str) -> 'QUuid': ... - @staticmethod - def createUuid() -> 'QUuid': ... - def isNull(self) -> bool: ... - def toString(self) -> str: ... - def __repr__(self) -> str: ... - def __hash__(self) -> int: ... - - -class QVariant(sip.simplewrapper): - - class Type(int): ... - Invalid = ... # type: 'QVariant.Type' - Bool = ... # type: 'QVariant.Type' - Int = ... # type: 'QVariant.Type' - UInt = ... # type: 'QVariant.Type' - LongLong = ... # type: 'QVariant.Type' - ULongLong = ... # type: 'QVariant.Type' - Double = ... # type: 'QVariant.Type' - Char = ... # type: 'QVariant.Type' - Map = ... # type: 'QVariant.Type' - List = ... # type: 'QVariant.Type' - String = ... # type: 'QVariant.Type' - StringList = ... # type: 'QVariant.Type' - ByteArray = ... # type: 'QVariant.Type' - BitArray = ... # type: 'QVariant.Type' - Date = ... # type: 'QVariant.Type' - Time = ... # type: 'QVariant.Type' - DateTime = ... # type: 'QVariant.Type' - Url = ... # type: 'QVariant.Type' - Locale = ... # type: 'QVariant.Type' - Rect = ... # type: 'QVariant.Type' - RectF = ... # type: 'QVariant.Type' - Size = ... # type: 'QVariant.Type' - SizeF = ... # type: 'QVariant.Type' - Line = ... # type: 'QVariant.Type' - LineF = ... # type: 'QVariant.Type' - Point = ... # type: 'QVariant.Type' - PointF = ... # type: 'QVariant.Type' - RegExp = ... # type: 'QVariant.Type' - Font = ... # type: 'QVariant.Type' - Pixmap = ... # type: 'QVariant.Type' - Brush = ... # type: 'QVariant.Type' - Color = ... # type: 'QVariant.Type' - Palette = ... # type: 'QVariant.Type' - Icon = ... # type: 'QVariant.Type' - Image = ... # type: 'QVariant.Type' - Polygon = ... # type: 'QVariant.Type' - Region = ... # type: 'QVariant.Type' - Bitmap = ... # type: 'QVariant.Type' - Cursor = ... # type: 'QVariant.Type' - SizePolicy = ... # type: 'QVariant.Type' - KeySequence = ... # type: 'QVariant.Type' - Pen = ... # type: 'QVariant.Type' - TextLength = ... # type: 'QVariant.Type' - TextFormat = ... # type: 'QVariant.Type' - Matrix = ... # type: 'QVariant.Type' - Transform = ... # type: 'QVariant.Type' - Hash = ... # type: 'QVariant.Type' - Matrix4x4 = ... # type: 'QVariant.Type' - Vector2D = ... # type: 'QVariant.Type' - Vector3D = ... # type: 'QVariant.Type' - Vector4D = ... # type: 'QVariant.Type' - Quaternion = ... # type: 'QVariant.Type' - EasingCurve = ... # type: 'QVariant.Type' - Uuid = ... # type: 'QVariant.Type' - ModelIndex = ... # type: 'QVariant.Type' - PolygonF = ... # type: 'QVariant.Type' - RegularExpression = ... # type: 'QVariant.Type' - PersistentModelIndex = ... # type: 'QVariant.Type' - UserType = ... # type: 'QVariant.Type' - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, type: 'QVariant.Type') -> None: ... - @typing.overload - def __init__(self, obj: typing.Any) -> None: ... - @typing.overload - def __init__(self, a0: 'QVariant') -> None: ... - - def swap(self, other: 'QVariant') -> None: ... - @staticmethod - def nameToType(name: str) -> 'QVariant.Type': ... - @staticmethod - def typeToName(typeId: int) -> str: ... - def save(self, ds: QDataStream) -> None: ... - def load(self, ds: QDataStream) -> None: ... - def clear(self) -> None: ... - def isNull(self) -> bool: ... - def isValid(self) -> bool: ... - def convert(self, targetTypeId: int) -> bool: ... - def canConvert(self, targetTypeId: int) -> bool: ... - def typeName(self) -> str: ... - def userType(self) -> int: ... - def type(self) -> 'QVariant.Type': ... - def value(self) -> typing.Any: ... - - -class QVersionNumber(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, seg: typing.Iterable[int]) -> None: ... - @typing.overload - def __init__(self, maj: int) -> None: ... - @typing.overload - def __init__(self, maj: int, min: int) -> None: ... - @typing.overload - def __init__(self, maj: int, min: int, mic: int) -> None: ... - @typing.overload - def __init__(self, a0: 'QVersionNumber') -> None: ... - - def __hash__(self) -> int: ... - @staticmethod - def fromString(string: str) -> typing.Tuple['QVersionNumber', int]: ... - def toString(self) -> str: ... - @staticmethod - def commonPrefix(v1: 'QVersionNumber', v2: 'QVersionNumber') -> 'QVersionNumber': ... - @staticmethod - def compare(v1: 'QVersionNumber', v2: 'QVersionNumber') -> int: ... - def isPrefixOf(self, other: 'QVersionNumber') -> bool: ... - def segmentCount(self) -> int: ... - def segmentAt(self, index: int) -> int: ... - def segments(self) -> typing.List[int]: ... - def normalized(self) -> 'QVersionNumber': ... - def microVersion(self) -> int: ... - def minorVersion(self) -> int: ... - def majorVersion(self) -> int: ... - def isNormalized(self) -> bool: ... - def isNull(self) -> bool: ... - - -class QWaitCondition(sip.simplewrapper): - - def __init__(self) -> None: ... - - def wakeAll(self) -> None: ... - def wakeOne(self) -> None: ... - @typing.overload - def wait(self, mutex: QMutex, msecs: int = ...) -> bool: ... - @typing.overload - def wait(self, readWriteLock: QReadWriteLock, msecs: int = ...) -> bool: ... - - -class QXmlStreamAttribute(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, qualifiedName: str, value: str) -> None: ... - @typing.overload - def __init__(self, namespaceUri: str, name: str, value: str) -> None: ... - @typing.overload - def __init__(self, a0: 'QXmlStreamAttribute') -> None: ... - - def isDefault(self) -> bool: ... - def value(self) -> str: ... - def prefix(self) -> str: ... - def qualifiedName(self) -> str: ... - def name(self) -> str: ... - def namespaceUri(self) -> str: ... - - -class QXmlStreamAttributes(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QXmlStreamAttributes') -> None: ... - - def __contains__(self, value: QXmlStreamAttribute) -> int: ... - @typing.overload - def __delitem__(self, i: int) -> None: ... - @typing.overload - def __delitem__(self, slice: slice) -> None: ... - @typing.overload - def __setitem__(self, i: int, value: QXmlStreamAttribute) -> None: ... - @typing.overload - def __setitem__(self, slice: slice, list: 'QXmlStreamAttributes') -> None: ... - @typing.overload - def __getitem__(self, i: int) -> QXmlStreamAttribute: ... - @typing.overload - def __getitem__(self, slice: slice) -> 'QXmlStreamAttributes': ... - def size(self) -> int: ... - def replace(self, i: int, value: QXmlStreamAttribute) -> None: ... - @typing.overload - def remove(self, i: int) -> None: ... - @typing.overload - def remove(self, i: int, count: int) -> None: ... - def prepend(self, value: QXmlStreamAttribute) -> None: ... - def lastIndexOf(self, value: QXmlStreamAttribute, from_: int = ...) -> int: ... - def last(self) -> QXmlStreamAttribute: ... - def isEmpty(self) -> bool: ... - def insert(self, i: int, value: QXmlStreamAttribute) -> None: ... - def indexOf(self, value: QXmlStreamAttribute, from_: int = ...) -> int: ... - def first(self) -> QXmlStreamAttribute: ... - def fill(self, value: QXmlStreamAttribute, size: int = ...) -> None: ... - def data(self) -> sip.voidptr: ... - def __len__(self) -> int: ... - @typing.overload - def count(self, value: QXmlStreamAttribute) -> int: ... - @typing.overload - def count(self) -> int: ... - def contains(self, value: QXmlStreamAttribute) -> bool: ... - def clear(self) -> None: ... - def at(self, i: int) -> QXmlStreamAttribute: ... - @typing.overload - def hasAttribute(self, qualifiedName: str) -> bool: ... - @typing.overload - def hasAttribute(self, namespaceUri: str, name: str) -> bool: ... - @typing.overload - def append(self, namespaceUri: str, name: str, value: str) -> None: ... - @typing.overload - def append(self, qualifiedName: str, value: str) -> None: ... - @typing.overload - def append(self, attribute: QXmlStreamAttribute) -> None: ... - @typing.overload - def value(self, namespaceUri: str, name: str) -> str: ... - @typing.overload - def value(self, qualifiedName: str) -> str: ... - - -class QXmlStreamNamespaceDeclaration(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QXmlStreamNamespaceDeclaration') -> None: ... - @typing.overload - def __init__(self, prefix: str, namespaceUri: str) -> None: ... - - def namespaceUri(self) -> str: ... - def prefix(self) -> str: ... - - -class QXmlStreamNotationDeclaration(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QXmlStreamNotationDeclaration') -> None: ... - - def publicId(self) -> str: ... - def systemId(self) -> str: ... - def name(self) -> str: ... - - -class QXmlStreamEntityDeclaration(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QXmlStreamEntityDeclaration') -> None: ... - - def value(self) -> str: ... - def publicId(self) -> str: ... - def systemId(self) -> str: ... - def notationName(self) -> str: ... - def name(self) -> str: ... - - -class QXmlStreamEntityResolver(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QXmlStreamEntityResolver') -> None: ... - - def resolveUndeclaredEntity(self, name: str) -> str: ... - - -class QXmlStreamReader(sip.simplewrapper): - - class Error(int): ... - NoError = ... # type: 'QXmlStreamReader.Error' - UnexpectedElementError = ... # type: 'QXmlStreamReader.Error' - CustomError = ... # type: 'QXmlStreamReader.Error' - NotWellFormedError = ... # type: 'QXmlStreamReader.Error' - PrematureEndOfDocumentError = ... # type: 'QXmlStreamReader.Error' - - class ReadElementTextBehaviour(int): ... - ErrorOnUnexpectedElement = ... # type: 'QXmlStreamReader.ReadElementTextBehaviour' - IncludeChildElements = ... # type: 'QXmlStreamReader.ReadElementTextBehaviour' - SkipChildElements = ... # type: 'QXmlStreamReader.ReadElementTextBehaviour' - - class TokenType(int): ... - NoToken = ... # type: 'QXmlStreamReader.TokenType' - Invalid = ... # type: 'QXmlStreamReader.TokenType' - StartDocument = ... # type: 'QXmlStreamReader.TokenType' - EndDocument = ... # type: 'QXmlStreamReader.TokenType' - StartElement = ... # type: 'QXmlStreamReader.TokenType' - EndElement = ... # type: 'QXmlStreamReader.TokenType' - Characters = ... # type: 'QXmlStreamReader.TokenType' - Comment = ... # type: 'QXmlStreamReader.TokenType' - DTD = ... # type: 'QXmlStreamReader.TokenType' - EntityReference = ... # type: 'QXmlStreamReader.TokenType' - ProcessingInstruction = ... # type: 'QXmlStreamReader.TokenType' - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, device: QIODevice) -> None: ... - @typing.overload - def __init__(self, data: typing.Union[QByteArray, bytes, bytearray]) -> None: ... - @typing.overload - def __init__(self, data: str) -> None: ... - - def skipCurrentElement(self) -> None: ... - def readNextStartElement(self) -> bool: ... - def entityResolver(self) -> QXmlStreamEntityResolver: ... - def setEntityResolver(self, resolver: QXmlStreamEntityResolver) -> None: ... - def hasError(self) -> bool: ... - def error(self) -> 'QXmlStreamReader.Error': ... - def errorString(self) -> str: ... - def raiseError(self, message: str = ...) -> None: ... - def dtdSystemId(self) -> str: ... - def dtdPublicId(self) -> str: ... - def dtdName(self) -> str: ... - def entityDeclarations(self) -> typing.Any: ... - def notationDeclarations(self) -> typing.Any: ... - def addExtraNamespaceDeclarations(self, extraNamespaceDeclaractions: typing.Any) -> None: ... - def addExtraNamespaceDeclaration(self, extraNamespaceDeclaraction: QXmlStreamNamespaceDeclaration) -> None: ... - def namespaceDeclarations(self) -> typing.Any: ... - def text(self) -> str: ... - def processingInstructionData(self) -> str: ... - def processingInstructionTarget(self) -> str: ... - def prefix(self) -> str: ... - def qualifiedName(self) -> str: ... - def namespaceUri(self) -> str: ... - def name(self) -> str: ... - def readElementText(self, behaviour: 'QXmlStreamReader.ReadElementTextBehaviour' = ...) -> str: ... - def attributes(self) -> QXmlStreamAttributes: ... - def characterOffset(self) -> int: ... - def columnNumber(self) -> int: ... - def lineNumber(self) -> int: ... - def documentEncoding(self) -> str: ... - def documentVersion(self) -> str: ... - def isStandaloneDocument(self) -> bool: ... - def isProcessingInstruction(self) -> bool: ... - def isEntityReference(self) -> bool: ... - def isDTD(self) -> bool: ... - def isComment(self) -> bool: ... - def isCDATA(self) -> bool: ... - def isWhitespace(self) -> bool: ... - def isCharacters(self) -> bool: ... - def isEndElement(self) -> bool: ... - def isStartElement(self) -> bool: ... - def isEndDocument(self) -> bool: ... - def isStartDocument(self) -> bool: ... - def namespaceProcessing(self) -> bool: ... - def setNamespaceProcessing(self, a0: bool) -> None: ... - def tokenString(self) -> str: ... - def tokenType(self) -> 'QXmlStreamReader.TokenType': ... - def readNext(self) -> 'QXmlStreamReader.TokenType': ... - def atEnd(self) -> bool: ... - def clear(self) -> None: ... - @typing.overload - def addData(self, data: typing.Union[QByteArray, bytes, bytearray]) -> None: ... - @typing.overload - def addData(self, data: str) -> None: ... - def device(self) -> QIODevice: ... - def setDevice(self, device: QIODevice) -> None: ... - - -class QXmlStreamWriter(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, device: QIODevice) -> None: ... - @typing.overload - def __init__(self, array: typing.Union[QByteArray, bytes, bytearray]) -> None: ... - - def hasError(self) -> bool: ... - def writeCurrentToken(self, reader: QXmlStreamReader) -> None: ... - @typing.overload - def writeStartElement(self, qualifiedName: str) -> None: ... - @typing.overload - def writeStartElement(self, namespaceUri: str, name: str) -> None: ... - @typing.overload - def writeStartDocument(self) -> None: ... - @typing.overload - def writeStartDocument(self, version: str) -> None: ... - @typing.overload - def writeStartDocument(self, version: str, standalone: bool) -> None: ... - def writeProcessingInstruction(self, target: str, data: str = ...) -> None: ... - def writeDefaultNamespace(self, namespaceUri: str) -> None: ... - def writeNamespace(self, namespaceUri: str, prefix: str = ...) -> None: ... - def writeEntityReference(self, name: str) -> None: ... - def writeEndElement(self) -> None: ... - def writeEndDocument(self) -> None: ... - @typing.overload - def writeTextElement(self, qualifiedName: str, text: str) -> None: ... - @typing.overload - def writeTextElement(self, namespaceUri: str, name: str, text: str) -> None: ... - @typing.overload - def writeEmptyElement(self, qualifiedName: str) -> None: ... - @typing.overload - def writeEmptyElement(self, namespaceUri: str, name: str) -> None: ... - def writeDTD(self, dtd: str) -> None: ... - def writeComment(self, text: str) -> None: ... - def writeCharacters(self, text: str) -> None: ... - def writeCDATA(self, text: str) -> None: ... - def writeAttributes(self, attributes: QXmlStreamAttributes) -> None: ... - @typing.overload - def writeAttribute(self, qualifiedName: str, value: str) -> None: ... - @typing.overload - def writeAttribute(self, namespaceUri: str, name: str, value: str) -> None: ... - @typing.overload - def writeAttribute(self, attribute: QXmlStreamAttribute) -> None: ... - def autoFormattingIndent(self) -> int: ... - def setAutoFormattingIndent(self, spaces: int) -> None: ... - def autoFormatting(self) -> bool: ... - def setAutoFormatting(self, a0: bool) -> None: ... - def codec(self) -> QTextCodec: ... - @typing.overload - def setCodec(self, codec: QTextCodec) -> None: ... - @typing.overload - def setCodec(self, codecName: str) -> None: ... - def device(self) -> QIODevice: ... - def setDevice(self, device: QIODevice) -> None: ... - - -class QSysInfo(sip.simplewrapper): - - class Endian(int): ... - BigEndian = ... # type: 'QSysInfo.Endian' - LittleEndian = ... # type: 'QSysInfo.Endian' - ByteOrder = ... # type: 'QSysInfo.Endian' - - class Sizes(int): ... - WordSize = ... # type: 'QSysInfo.Sizes' - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QSysInfo') -> None: ... - - @staticmethod - def machineHostName() -> str: ... - @staticmethod - def productVersion() -> str: ... - @staticmethod - def productType() -> str: ... - @staticmethod - def prettyProductName() -> str: ... - @staticmethod - def kernelVersion() -> str: ... - @staticmethod - def kernelType() -> str: ... - @staticmethod - def currentCpuArchitecture() -> str: ... - @staticmethod - def buildCpuArchitecture() -> str: ... - @staticmethod - def buildAbi() -> str: ... - - -PYQT_VERSION = ... # type: int -PYQT_VERSION_STR = ... # type: str -QT_VERSION = ... # type: int -QT_VERSION_STR = ... # type: str - - -def qSetRealNumberPrecision(precision: int) -> QTextStreamManipulator: ... -def qSetPadChar(ch: str) -> QTextStreamManipulator: ... -def qSetFieldWidth(width: int) -> QTextStreamManipulator: ... -def ws(s: QTextStream) -> QTextStream: ... -def bom(s: QTextStream) -> QTextStream: ... -def reset(s: QTextStream) -> QTextStream: ... -def flush(s: QTextStream) -> QTextStream: ... -def endl(s: QTextStream) -> QTextStream: ... -def center(s: QTextStream) -> QTextStream: ... -def right(s: QTextStream) -> QTextStream: ... -def left(s: QTextStream) -> QTextStream: ... -def scientific(s: QTextStream) -> QTextStream: ... -def fixed(s: QTextStream) -> QTextStream: ... -def lowercasedigits(s: QTextStream) -> QTextStream: ... -def lowercasebase(s: QTextStream) -> QTextStream: ... -def uppercasedigits(s: QTextStream) -> QTextStream: ... -def uppercasebase(s: QTextStream) -> QTextStream: ... -def noforcepoint(s: QTextStream) -> QTextStream: ... -def noforcesign(s: QTextStream) -> QTextStream: ... -def noshowbase(s: QTextStream) -> QTextStream: ... -def forcepoint(s: QTextStream) -> QTextStream: ... -def forcesign(s: QTextStream) -> QTextStream: ... -def showbase(s: QTextStream) -> QTextStream: ... -def hex_(s: QTextStream) -> QTextStream: ... -def dec(s: QTextStream) -> QTextStream: ... -def oct_(s: QTextStream) -> QTextStream: ... -def bin_(s: QTextStream) -> QTextStream: ... -def Q_RETURN_ARG(type: typing.Any) -> QGenericReturnArgument: ... -def Q_ARG(type: typing.Any, data: typing.Any) -> QGenericArgument: ... -def pyqtSlot(*types, name: typing.Optional[str] = ..., result: typing.Optional[typing.Any] = ...) -> typing.Callable[..., typing.Optional[str]]: ... -def QT_TRANSLATE_NOOP(a0: str, a1: str) -> str: ... -def QT_TR_NOOP_UTF8(a0: str) -> str: ... -def QT_TR_NOOP(a0: str) -> str: ... -def Q_FLAGS(*a0) -> None: ... -def Q_ENUMS(*a0) -> None: ... -def Q_CLASSINFO(name: str, value: str) -> None: ... -def qFloatDistance(a: float, b: float) -> int: ... -def qQNaN() -> float: ... -def qSNaN() -> float: ... -def qInf() -> float: ... -def qIsNaN(d: float) -> bool: ... -def qIsFinite(d: float) -> bool: ... -def qIsInf(d: float) -> bool: ... -def qFormatLogMessage(type: QtMsgType, context: QMessageLogContext, buf: str) -> str: ... -def qSetMessagePattern(messagePattern: str) -> None: ... -def qInstallMessageHandler(a0: typing.Optional[typing.Callable[[], None]]) -> typing.Optional[typing.Callable[[], None]]: ... -def qWarning(msg: str) -> None: ... -def qFatal(msg: str) -> None: ... -@typing.overload -def qErrnoWarning(code: int, msg: str) -> None: ... -@typing.overload -def qErrnoWarning(msg: str) -> None: ... -def qDebug(msg: str) -> None: ... -def qCritical(msg: str) -> None: ... -def pyqtRestoreInputHook() -> None: ... -def pyqtRemoveInputHook() -> None: ... -def qAddPreRoutine(routine: typing.Callable[[], None]) -> None: ... -def qRemovePostRoutine(a0: typing.Callable[..., None]) -> None: ... -def qAddPostRoutine(a0: typing.Callable[..., None]) -> None: ... -def qUncompress(data: typing.Union[QByteArray, bytes, bytearray]) -> QByteArray: ... -def qCompress(data: typing.Union[QByteArray, bytes, bytearray], compressionLevel: int = ...) -> QByteArray: ... -def qChecksum(s: bytes) -> int: ... -def pyqtPickleProtocol() -> typing.Optional[int]: ... -def pyqtSetPickleProtocol(a0: typing.Optional[int]) -> None: ... -def qrand() -> int: ... -def qsrand(seed: int) -> None: ... -def qIsNull(d: float) -> bool: ... -def qFuzzyCompare(p1: float, p2: float) -> bool: ... -def qUnregisterResourceData(a0: int, a1: str, a2: str, a3: str) -> bool: ... -def qRegisterResourceData(a0: int, a1: str, a2: str, a3: str) -> bool: ... -def qSharedBuild() -> bool: ... -def qVersion() -> str: ... -def qRound64(d: float) -> int: ... -def qRound(d: float) -> int: ... -def qAbs(t: float) -> float: ... -def pyqtProperty(type: typing.Any, - fget: typing.Optional[typing.Callable[..., None]] = ..., - fset: typing.Optional[typing.Callable[..., None]] = ..., - freset: typing.Optional[typing.Callable[..., None]] = ..., - fdel: typing.Optional[typing.Callable[..., None]] = ..., - doc: str = ..., - designable: bool = ..., - scriptable: bool = ..., - stored: bool = ..., - user: bool = ..., - constant: bool = ..., - final: bool = ..., - notify: typing.Any = ..., - revision: int = ... - ) -> typing.Callable[..., typing.Any]: ... diff -Nru uranium-3.3.0/stubs/PyQt5/QtDBus.pyi uranium-4.4.1/stubs/PyQt5/QtDBus.pyi --- uranium-3.3.0/stubs/PyQt5/QtDBus.pyi 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/stubs/PyQt5/QtDBus.pyi 1970-01-01 00:00:00.000000000 +0000 @@ -1,508 +0,0 @@ -# The PEP 484 type hints stub file for the QtDBus module. -# -# Generated by SIP 4.18.1 -# -# Copyright (c) 2016 Riverbank Computing Limited -# -# This file is part of PyQt5. -# -# This file may be used under the terms of the GNU General Public License -# version 3.0 as published by the Free Software Foundation and appearing in -# the file LICENSE included in the packaging of this file. Please review the -# following information to ensure the GNU General Public License version 3.0 -# requirements will be met: http://www.gnu.org/copyleft/gpl.html. -# -# If you do not wish to use this file under the terms of the GPL version 3.0 -# then you may purchase a commercial license. For more information contact -# info@riverbankcomputing.com. -# -# This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -# WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - - -import typing -import sip - -from PyQt5 import QtCore - -# Support for QDate, QDateTime and QTime. -import datetime - -# Convenient type aliases. -PYQT_SIGNAL = typing.Union[QtCore.pyqtSignal, QtCore.pyqtBoundSignal] -PYQT_SLOT = typing.Union[typing.Callable[..., None], QtCore.pyqtBoundSignal] - - -class QDBusAbstractAdaptor(QtCore.QObject): - - def __init__(self, parent: QtCore.QObject) -> None: ... - - def autoRelaySignals(self) -> bool: ... - def setAutoRelaySignals(self, enable: bool) -> None: ... - - -class QDBusAbstractInterface(QtCore.QObject): - - def __init__(self, service: str, path: str, interface: str, connection: 'QDBusConnection', parent: QtCore.QObject) -> None: ... - - def disconnectNotify(self, signal: QtCore.QMetaMethod) -> None: ... - def connectNotify(self, signal: QtCore.QMetaMethod) -> None: ... - def asyncCallWithArgumentList(self, method: str, args: typing.Iterable[typing.Any]) -> 'QDBusPendingCall': ... - def asyncCall(self, method: str, arg1: typing.Any = ..., arg2: typing.Any = ..., arg3: typing.Any = ..., arg4: typing.Any = ..., arg5: typing.Any = ..., arg6: typing.Any = ..., arg7: typing.Any = ..., arg8: typing.Any = ...) -> 'QDBusPendingCall': ... - @typing.overload - def callWithCallback(self, method: str, args: typing.Iterable[typing.Any], returnMethod: PYQT_SLOT, errorMethod: PYQT_SLOT) -> bool: ... - @typing.overload - def callWithCallback(self, method: str, args: typing.Iterable[typing.Any], slot: PYQT_SLOT) -> bool: ... - def callWithArgumentList(self, mode: 'QDBus.CallMode', method: str, args: typing.Iterable[typing.Any]) -> 'QDBusMessage': ... - @typing.overload - def call(self, method: str, arg1: typing.Any = ..., arg2: typing.Any = ..., arg3: typing.Any = ..., arg4: typing.Any = ..., arg5: typing.Any = ..., arg6: typing.Any = ..., arg7: typing.Any = ..., arg8: typing.Any = ...) -> 'QDBusMessage': ... - @typing.overload - def call(self, mode: 'QDBus.CallMode', method: str, arg1: typing.Any = ..., arg2: typing.Any = ..., arg3: typing.Any = ..., arg4: typing.Any = ..., arg5: typing.Any = ..., arg6: typing.Any = ..., arg7: typing.Any = ..., arg8: typing.Any = ...) -> 'QDBusMessage': ... - def timeout(self) -> int: ... - def setTimeout(self, timeout: int) -> None: ... - def lastError(self) -> 'QDBusError': ... - def interface(self) -> str: ... - def path(self) -> str: ... - def service(self) -> str: ... - def connection(self) -> 'QDBusConnection': ... - def isValid(self) -> bool: ... - - -class QDBusArgument(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, other: 'QDBusArgument') -> None: ... - @typing.overload - def __init__(self, arg: typing.Any, id: int = ...) -> None: ... - - def swap(self, other: 'QDBusArgument') -> None: ... - def endMapEntry(self) -> None: ... - def beginMapEntry(self) -> None: ... - def endMap(self) -> None: ... - def beginMap(self, kid: int, vid: int) -> None: ... - def endArray(self) -> None: ... - def beginArray(self, id: int) -> None: ... - def endStructure(self) -> None: ... - def beginStructure(self) -> None: ... - def add(self, arg: typing.Any, id: int = ...) -> None: ... - - -class QDBus(sip.simplewrapper): - - class CallMode(int): ... - NoBlock = ... # type: 'QDBus.CallMode' - Block = ... # type: 'QDBus.CallMode' - BlockWithGui = ... # type: 'QDBus.CallMode' - AutoDetect = ... # type: 'QDBus.CallMode' - - -class QDBusConnection(sip.simplewrapper): - - class ConnectionCapability(int): ... - UnixFileDescriptorPassing = ... # type: 'QDBusConnection.ConnectionCapability' - - class UnregisterMode(int): ... - UnregisterNode = ... # type: 'QDBusConnection.UnregisterMode' - UnregisterTree = ... # type: 'QDBusConnection.UnregisterMode' - - class RegisterOption(int): ... - ExportAdaptors = ... # type: 'QDBusConnection.RegisterOption' - ExportScriptableSlots = ... # type: 'QDBusConnection.RegisterOption' - ExportScriptableSignals = ... # type: 'QDBusConnection.RegisterOption' - ExportScriptableProperties = ... # type: 'QDBusConnection.RegisterOption' - ExportScriptableInvokables = ... # type: 'QDBusConnection.RegisterOption' - ExportScriptableContents = ... # type: 'QDBusConnection.RegisterOption' - ExportNonScriptableSlots = ... # type: 'QDBusConnection.RegisterOption' - ExportNonScriptableSignals = ... # type: 'QDBusConnection.RegisterOption' - ExportNonScriptableProperties = ... # type: 'QDBusConnection.RegisterOption' - ExportNonScriptableInvokables = ... # type: 'QDBusConnection.RegisterOption' - ExportNonScriptableContents = ... # type: 'QDBusConnection.RegisterOption' - ExportAllSlots = ... # type: 'QDBusConnection.RegisterOption' - ExportAllSignals = ... # type: 'QDBusConnection.RegisterOption' - ExportAllProperties = ... # type: 'QDBusConnection.RegisterOption' - ExportAllInvokables = ... # type: 'QDBusConnection.RegisterOption' - ExportAllContents = ... # type: 'QDBusConnection.RegisterOption' - ExportAllSignal = ... # type: 'QDBusConnection.RegisterOption' - ExportChildObjects = ... # type: 'QDBusConnection.RegisterOption' - - class BusType(int): ... - SessionBus = ... # type: 'QDBusConnection.BusType' - SystemBus = ... # type: 'QDBusConnection.BusType' - ActivationBus = ... # type: 'QDBusConnection.BusType' - - class RegisterOptions(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QDBusConnection.RegisterOptions', 'QDBusConnection.RegisterOption']) -> None: ... - @typing.overload - def __init__(self, a0: 'QDBusConnection.RegisterOptions') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QDBusConnection.RegisterOptions': ... - def __int__(self) -> int: ... - - class ConnectionCapabilities(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QDBusConnection.ConnectionCapabilities', 'QDBusConnection.ConnectionCapability']) -> None: ... - @typing.overload - def __init__(self, a0: 'QDBusConnection.ConnectionCapabilities') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QDBusConnection.ConnectionCapabilities': ... - def __int__(self) -> int: ... - - @typing.overload - def __init__(self, name: str) -> None: ... - @typing.overload - def __init__(self, other: 'QDBusConnection') -> None: ... - - def swap(self, other: 'QDBusConnection') -> None: ... - @staticmethod - def sender() -> 'QDBusConnection': ... - @staticmethod - def systemBus() -> 'QDBusConnection': ... - @staticmethod - def sessionBus() -> 'QDBusConnection': ... - @staticmethod - def localMachineId() -> QtCore.QByteArray: ... - @staticmethod - def disconnectFromPeer(name: str) -> None: ... - @staticmethod - def disconnectFromBus(name: str) -> None: ... - @staticmethod - def connectToPeer(address: str, name: str) -> 'QDBusConnection': ... - @typing.overload - @staticmethod - def connectToBus(type: 'QDBusConnection.BusType', name: str) -> 'QDBusConnection': ... - @typing.overload - @staticmethod - def connectToBus(address: str, name: str) -> 'QDBusConnection': ... - def interface(self) -> 'QDBusConnectionInterface': ... - def unregisterService(self, serviceName: str) -> bool: ... - def registerService(self, serviceName: str) -> bool: ... - def objectRegisteredAt(self, path: str) -> QtCore.QObject: ... - def unregisterObject(self, path: str, mode: 'QDBusConnection.UnregisterMode' = ...) -> None: ... - @typing.overload - def registerObject(self, path: str, object: QtCore.QObject, options: typing.Union['QDBusConnection.RegisterOptions', 'QDBusConnection.RegisterOption'] = ...) -> bool: ... - @typing.overload - def registerObject(self, path: str, interface: str, object: QtCore.QObject, options: typing.Union['QDBusConnection.RegisterOptions', 'QDBusConnection.RegisterOption'] = ...) -> bool: ... - @typing.overload - def disconnect(self, service: str, path: str, interface: str, name: str, slot: PYQT_SLOT) -> bool: ... - @typing.overload - def disconnect(self, service: str, path: str, interface: str, name: str, signature: str, slot: PYQT_SLOT) -> bool: ... - @typing.overload - def disconnect(self, service: str, path: str, interface: str, name: str, argumentMatch: typing.Iterable[str], signature: str, slot: PYQT_SLOT) -> bool: ... - @typing.overload - def connect(self, service: str, path: str, interface: str, name: str, slot: PYQT_SLOT) -> bool: ... - @typing.overload - def connect(self, service: str, path: str, interface: str, name: str, signature: str, slot: PYQT_SLOT) -> bool: ... - @typing.overload - def connect(self, service: str, path: str, interface: str, name: str, argumentMatch: typing.Iterable[str], signature: str, slot: PYQT_SLOT) -> bool: ... - def asyncCall(self, message: 'QDBusMessage', timeout: int = ...) -> 'QDBusPendingCall': ... - def call(self, message: 'QDBusMessage', mode: QDBus.CallMode = ..., timeout: int = ...) -> 'QDBusMessage': ... - def callWithCallback(self, message: 'QDBusMessage', returnMethod: PYQT_SLOT, errorMethod: PYQT_SLOT, timeout: int = ...) -> bool: ... - def send(self, message: 'QDBusMessage') -> bool: ... - def connectionCapabilities(self) -> 'QDBusConnection.ConnectionCapabilities': ... - def name(self) -> str: ... - def lastError(self) -> 'QDBusError': ... - def baseService(self) -> str: ... - def isConnected(self) -> bool: ... - - -class QDBusConnectionInterface(QDBusAbstractInterface): - - class RegisterServiceReply(int): ... - ServiceNotRegistered = ... # type: 'QDBusConnectionInterface.RegisterServiceReply' - ServiceRegistered = ... # type: 'QDBusConnectionInterface.RegisterServiceReply' - ServiceQueued = ... # type: 'QDBusConnectionInterface.RegisterServiceReply' - - class ServiceReplacementOptions(int): ... - DontAllowReplacement = ... # type: 'QDBusConnectionInterface.ServiceReplacementOptions' - AllowReplacement = ... # type: 'QDBusConnectionInterface.ServiceReplacementOptions' - - class ServiceQueueOptions(int): ... - DontQueueService = ... # type: 'QDBusConnectionInterface.ServiceQueueOptions' - QueueService = ... # type: 'QDBusConnectionInterface.ServiceQueueOptions' - ReplaceExistingService = ... # type: 'QDBusConnectionInterface.ServiceQueueOptions' - - def disconnectNotify(self, a0: QtCore.QMetaMethod) -> None: ... - def connectNotify(self, a0: QtCore.QMetaMethod) -> None: ... - def callWithCallbackFailed(self, error: 'QDBusError', call: 'QDBusMessage') -> None: ... - def serviceUnregistered(self, service: str) -> None: ... - def serviceRegistered(self, service: str) -> None: ... - def startService(self, name: str) -> 'QDBusReply': ... - def serviceUid(self, serviceName: str) -> 'QDBusReply': ... - def servicePid(self, serviceName: str) -> 'QDBusReply': ... - def registerService(self, serviceName: str, qoption: 'QDBusConnectionInterface.ServiceQueueOptions' = ..., roption: 'QDBusConnectionInterface.ServiceReplacementOptions' = ...) -> 'QDBusReply': ... - def unregisterService(self, serviceName: str) -> 'QDBusReply': ... - def serviceOwner(self, name: str) -> typing.Any: ... - def isServiceRegistered(self, serviceName: str) -> 'QDBusReply': ... - def registeredServiceNames(self) -> typing.Any: ... - - -class QDBusError(sip.simplewrapper): - - class ErrorType(int): ... - NoError = ... # type: 'QDBusError.ErrorType' - Other = ... # type: 'QDBusError.ErrorType' - Failed = ... # type: 'QDBusError.ErrorType' - NoMemory = ... # type: 'QDBusError.ErrorType' - ServiceUnknown = ... # type: 'QDBusError.ErrorType' - NoReply = ... # type: 'QDBusError.ErrorType' - BadAddress = ... # type: 'QDBusError.ErrorType' - NotSupported = ... # type: 'QDBusError.ErrorType' - LimitsExceeded = ... # type: 'QDBusError.ErrorType' - AccessDenied = ... # type: 'QDBusError.ErrorType' - NoServer = ... # type: 'QDBusError.ErrorType' - Timeout = ... # type: 'QDBusError.ErrorType' - NoNetwork = ... # type: 'QDBusError.ErrorType' - AddressInUse = ... # type: 'QDBusError.ErrorType' - Disconnected = ... # type: 'QDBusError.ErrorType' - InvalidArgs = ... # type: 'QDBusError.ErrorType' - UnknownMethod = ... # type: 'QDBusError.ErrorType' - TimedOut = ... # type: 'QDBusError.ErrorType' - InvalidSignature = ... # type: 'QDBusError.ErrorType' - UnknownInterface = ... # type: 'QDBusError.ErrorType' - InternalError = ... # type: 'QDBusError.ErrorType' - UnknownObject = ... # type: 'QDBusError.ErrorType' - InvalidService = ... # type: 'QDBusError.ErrorType' - InvalidObjectPath = ... # type: 'QDBusError.ErrorType' - InvalidInterface = ... # type: 'QDBusError.ErrorType' - InvalidMember = ... # type: 'QDBusError.ErrorType' - UnknownProperty = ... # type: 'QDBusError.ErrorType' - PropertyReadOnly = ... # type: 'QDBusError.ErrorType' - - def __init__(self, other: 'QDBusError') -> None: ... - - def swap(self, other: 'QDBusError') -> None: ... - @staticmethod - def errorString(error: 'QDBusError.ErrorType') -> str: ... - def isValid(self) -> bool: ... - def message(self) -> str: ... - def name(self) -> str: ... - def type(self) -> 'QDBusError.ErrorType': ... - - -class QDBusObjectPath(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, objectPath: str) -> None: ... - @typing.overload - def __init__(self, a0: 'QDBusObjectPath') -> None: ... - - def swap(self, other: 'QDBusObjectPath') -> None: ... - def __hash__(self) -> int: ... - def setPath(self, objectPath: str) -> None: ... - def path(self) -> str: ... - - -class QDBusSignature(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, dBusSignature: str) -> None: ... - @typing.overload - def __init__(self, a0: 'QDBusSignature') -> None: ... - - def swap(self, other: 'QDBusSignature') -> None: ... - def __hash__(self) -> int: ... - def setSignature(self, dBusSignature: str) -> None: ... - def signature(self) -> str: ... - - -class QDBusVariant(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, dBusVariant: typing.Any) -> None: ... - @typing.overload - def __init__(self, a0: 'QDBusVariant') -> None: ... - - def swap(self, other: 'QDBusVariant') -> None: ... - def setVariant(self, dBusVariant: typing.Any) -> None: ... - def variant(self) -> typing.Any: ... - - -class QDBusInterface(QDBusAbstractInterface): - - def __init__(self, service: str, path: str, interface: str = ..., connection: QDBusConnection = ..., parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - -class QDBusMessage(sip.simplewrapper): - - class MessageType(int): ... - InvalidMessage = ... # type: 'QDBusMessage.MessageType' - MethodCallMessage = ... # type: 'QDBusMessage.MessageType' - ReplyMessage = ... # type: 'QDBusMessage.MessageType' - ErrorMessage = ... # type: 'QDBusMessage.MessageType' - SignalMessage = ... # type: 'QDBusMessage.MessageType' - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, other: 'QDBusMessage') -> None: ... - - @staticmethod - def createTargetedSignal(service: str, path: str, interface: str, name: str) -> 'QDBusMessage': ... - def swap(self, other: 'QDBusMessage') -> None: ... - def arguments(self) -> typing.List[typing.Any]: ... - def setArguments(self, arguments: typing.Iterable[typing.Any]) -> None: ... - def autoStartService(self) -> bool: ... - def setAutoStartService(self, enable: bool) -> None: ... - def isDelayedReply(self) -> bool: ... - def setDelayedReply(self, enable: bool) -> None: ... - def isReplyRequired(self) -> bool: ... - def signature(self) -> str: ... - def type(self) -> 'QDBusMessage.MessageType': ... - def errorMessage(self) -> str: ... - def errorName(self) -> str: ... - def member(self) -> str: ... - def interface(self) -> str: ... - def path(self) -> str: ... - def service(self) -> str: ... - @typing.overload - def createErrorReply(self, name: str, msg: str) -> 'QDBusMessage': ... - @typing.overload - def createErrorReply(self, error: QDBusError) -> 'QDBusMessage': ... - @typing.overload - def createErrorReply(self, type: QDBusError.ErrorType, msg: str) -> 'QDBusMessage': ... - @typing.overload - def createReply(self, arguments: typing.Iterable[typing.Any] = ...) -> 'QDBusMessage': ... - @typing.overload - def createReply(self, argument: typing.Any) -> 'QDBusMessage': ... - @typing.overload - @staticmethod - def createError(name: str, msg: str) -> 'QDBusMessage': ... - @typing.overload - @staticmethod - def createError(error: QDBusError) -> 'QDBusMessage': ... - @typing.overload - @staticmethod - def createError(type: QDBusError.ErrorType, msg: str) -> 'QDBusMessage': ... - @staticmethod - def createMethodCall(service: str, path: str, interface: str, method: str) -> 'QDBusMessage': ... - @staticmethod - def createSignal(path: str, interface: str, name: str) -> 'QDBusMessage': ... - - -class QDBusPendingCall(sip.simplewrapper): - - def __init__(self, other: 'QDBusPendingCall') -> None: ... - - def swap(self, other: 'QDBusPendingCall') -> None: ... - @staticmethod - def fromCompletedCall(message: QDBusMessage) -> 'QDBusPendingCall': ... - @staticmethod - def fromError(error: QDBusError) -> 'QDBusPendingCall': ... - - -class QDBusPendingCallWatcher(QtCore.QObject, QDBusPendingCall): - - def __init__(self, call: QDBusPendingCall, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def finished(self, watcher: typing.Optional['QDBusPendingCallWatcher'] = ...) -> None: ... - def waitForFinished(self) -> None: ... - def isFinished(self) -> bool: ... - - -class QDBusServiceWatcher(QtCore.QObject): - - class WatchModeFlag(int): ... - WatchForRegistration = ... # type: 'QDBusServiceWatcher.WatchModeFlag' - WatchForUnregistration = ... # type: 'QDBusServiceWatcher.WatchModeFlag' - WatchForOwnerChange = ... # type: 'QDBusServiceWatcher.WatchModeFlag' - - class WatchMode(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QDBusServiceWatcher.WatchMode', 'QDBusServiceWatcher.WatchModeFlag']) -> None: ... - @typing.overload - def __init__(self, a0: 'QDBusServiceWatcher.WatchMode') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QDBusServiceWatcher.WatchMode': ... - def __int__(self) -> int: ... - - @typing.overload - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - @typing.overload - def __init__(self, service: str, connection: QDBusConnection, watchMode: typing.Union['QDBusServiceWatcher.WatchMode', 'QDBusServiceWatcher.WatchModeFlag'] = ..., parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def serviceOwnerChanged(self, service: str, oldOwner: str, newOwner: str) -> None: ... - def serviceUnregistered(self, service: str) -> None: ... - def serviceRegistered(self, service: str) -> None: ... - def setConnection(self, connection: QDBusConnection) -> None: ... - def connection(self) -> QDBusConnection: ... - def setWatchMode(self, mode: typing.Union['QDBusServiceWatcher.WatchMode', 'QDBusServiceWatcher.WatchModeFlag']) -> None: ... - def watchMode(self) -> 'QDBusServiceWatcher.WatchMode': ... - def removeWatchedService(self, service: str) -> bool: ... - def addWatchedService(self, newService: str) -> None: ... - def setWatchedServices(self, services: typing.Iterable[str]) -> None: ... - def watchedServices(self) -> typing.List[str]: ... - - -class QDBusUnixFileDescriptor(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, fileDescriptor: int) -> None: ... - @typing.overload - def __init__(self, other: 'QDBusUnixFileDescriptor') -> None: ... - - def swap(self, other: 'QDBusUnixFileDescriptor') -> None: ... - @staticmethod - def isSupported() -> bool: ... - def setFileDescriptor(self, fileDescriptor: int) -> None: ... - def fileDescriptor(self) -> int: ... - def isValid(self) -> bool: ... - - -class QDBusPendingReply(QDBusPendingCall): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, other: 'QDBusPendingReply') -> None: ... - @typing.overload - def __init__(self, call: QDBusPendingCall) -> None: ... - @typing.overload - def __init__(self, reply: QDBusMessage) -> None: ... - - def value(self, type: typing.Any = ...) -> typing.Any: ... - def waitForFinished(self) -> None: ... - def reply(self) -> QDBusMessage: ... - def isValid(self) -> bool: ... - def isFinished(self) -> bool: ... - def isError(self) -> bool: ... - def error(self) -> QDBusError: ... - def argumentAt(self, index: int) -> typing.Any: ... - - -class QDBusReply(sip.simplewrapper): - - @typing.overload - def __init__(self, reply: QDBusMessage) -> None: ... - @typing.overload - def __init__(self, call: QDBusPendingCall) -> None: ... - @typing.overload - def __init__(self, error: QDBusError) -> None: ... - @typing.overload - def __init__(self, other: 'QDBusReply') -> None: ... - - def value(self, type: typing.Any = ...) -> typing.Any: ... - def isValid(self) -> bool: ... - def error(self) -> QDBusError: ... diff -Nru uranium-3.3.0/stubs/PyQt5/QtDesigner.pyi uranium-4.4.1/stubs/PyQt5/QtDesigner.pyi --- uranium-3.3.0/stubs/PyQt5/QtDesigner.pyi 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/stubs/PyQt5/QtDesigner.pyi 1970-01-01 00:00:00.000000000 +0000 @@ -1,480 +0,0 @@ -# The PEP 484 type hints stub file for the QtDesigner module. -# -# Generated by SIP 4.18.1 -# -# Copyright (c) 2016 Riverbank Computing Limited -# -# This file is part of PyQt5. -# -# This file may be used under the terms of the GNU General Public License -# version 3.0 as published by the Free Software Foundation and appearing in -# the file LICENSE included in the packaging of this file. Please review the -# following information to ensure the GNU General Public License version 3.0 -# requirements will be met: http://www.gnu.org/copyleft/gpl.html. -# -# If you do not wish to use this file under the terms of the GPL version 3.0 -# then you may purchase a commercial license. For more information contact -# info@riverbankcomputing.com. -# -# This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -# WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - - -import typing -import sip - -from PyQt5 import QtWidgets -from PyQt5 import QtCore - -# Support for QDate, QDateTime and QTime. -import datetime - -# Convenient type aliases. -PYQT_SIGNAL = typing.Union[QtCore.pyqtSignal, QtCore.pyqtBoundSignal] -PYQT_SLOT = typing.Union[typing.Callable[..., None], QtCore.pyqtBoundSignal] - -# Convenient aliases for complicated OpenGL types. -PYQT_OPENGL_ARRAY = typing.Union[typing.Sequence[int], typing.Sequence[float], - sip.Buffer, None] -PYQT_OPENGL_BOUND_ARRAY = typing.Union[typing.Sequence[int], - typing.Sequence[float], sip.Buffer, int, None] - - -class QDesignerActionEditorInterface(QtWidgets.QWidget): - - def __init__(self, parent: QtWidgets.QWidget, flags: typing.Union[QtCore.Qt.WindowFlags, QtCore.Qt.WindowType] = ...) -> None: ... - - def setFormWindow(self, formWindow: 'QDesignerFormWindowInterface') -> None: ... - def unmanageAction(self, action: QtWidgets.QAction) -> None: ... - def manageAction(self, action: QtWidgets.QAction) -> None: ... - def core(self) -> 'QDesignerFormEditorInterface': ... - - -class QAbstractFormBuilder(sip.simplewrapper): - - def __init__(self) -> None: ... - - def errorString(self) -> str: ... - def workingDirectory(self) -> QtCore.QDir: ... - def setWorkingDirectory(self, directory: QtCore.QDir) -> None: ... - def save(self, dev: QtCore.QIODevice, widget: QtWidgets.QWidget) -> None: ... - def load(self, device: QtCore.QIODevice, parent: typing.Optional[QtWidgets.QWidget] = ...) -> QtWidgets.QWidget: ... - - -class QDesignerFormEditorInterface(QtCore.QObject): - - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def setActionEditor(self, actionEditor: QDesignerActionEditorInterface) -> None: ... - def setObjectInspector(self, objectInspector: 'QDesignerObjectInspectorInterface') -> None: ... - def setPropertyEditor(self, propertyEditor: 'QDesignerPropertyEditorInterface') -> None: ... - def setWidgetBox(self, widgetBox: 'QDesignerWidgetBoxInterface') -> None: ... - def actionEditor(self) -> QDesignerActionEditorInterface: ... - def formWindowManager(self) -> 'QDesignerFormWindowManagerInterface': ... - def objectInspector(self) -> 'QDesignerObjectInspectorInterface': ... - def propertyEditor(self) -> 'QDesignerPropertyEditorInterface': ... - def widgetBox(self) -> 'QDesignerWidgetBoxInterface': ... - def topLevel(self) -> QtWidgets.QWidget: ... - def extensionManager(self) -> 'QExtensionManager': ... - - -class QDesignerFormWindowInterface(QtWidgets.QWidget): - - class FeatureFlag(int): ... - EditFeature = ... # type: 'QDesignerFormWindowInterface.FeatureFlag' - GridFeature = ... # type: 'QDesignerFormWindowInterface.FeatureFlag' - TabOrderFeature = ... # type: 'QDesignerFormWindowInterface.FeatureFlag' - DefaultFeature = ... # type: 'QDesignerFormWindowInterface.FeatureFlag' - - class Feature(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QDesignerFormWindowInterface.Feature', 'QDesignerFormWindowInterface.FeatureFlag']) -> None: ... - @typing.overload - def __init__(self, a0: 'QDesignerFormWindowInterface.Feature') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QDesignerFormWindowInterface.Feature': ... - def __int__(self) -> int: ... - - def __init__(self, parent: typing.Optional[QtWidgets.QWidget] = ..., flags: typing.Union[QtCore.Qt.WindowFlags, QtCore.Qt.WindowType] = ...) -> None: ... - - def activateResourceFilePaths(self, paths: typing.Iterable[str]) -> typing.Tuple[int, str]: ... - def formContainer(self) -> QtWidgets.QWidget: ... - def activeResourceFilePaths(self) -> typing.List[str]: ... - def checkContents(self) -> typing.List[str]: ... - def objectRemoved(self, o: QtCore.QObject) -> None: ... - def widgetRemoved(self, w: QtWidgets.QWidget) -> None: ... - def changed(self) -> None: ... - def activated(self, widget: QtWidgets.QWidget) -> None: ... - def aboutToUnmanageWidget(self, widget: QtWidgets.QWidget) -> None: ... - def widgetUnmanaged(self, widget: QtWidgets.QWidget) -> None: ... - def widgetManaged(self, widget: QtWidgets.QWidget) -> None: ... - def resourceFilesChanged(self) -> None: ... - def geometryChanged(self) -> None: ... - def selectionChanged(self) -> None: ... - def featureChanged(self, f: typing.Union['QDesignerFormWindowInterface.Feature', 'QDesignerFormWindowInterface.FeatureFlag']) -> None: ... - def fileNameChanged(self, fileName: str) -> None: ... - def mainContainerChanged(self, mainContainer: QtWidgets.QWidget) -> None: ... - def setFileName(self, fileName: str) -> None: ... - def setGrid(self, grid: QtCore.QPoint) -> None: ... - def selectWidget(self, widget: QtWidgets.QWidget, select: bool = ...) -> None: ... - def clearSelection(self, update: bool = ...) -> None: ... - def setDirty(self, dirty: bool) -> None: ... - def setFeatures(self, f: typing.Union['QDesignerFormWindowInterface.Feature', 'QDesignerFormWindowInterface.FeatureFlag']) -> None: ... - def unmanageWidget(self, widget: QtWidgets.QWidget) -> None: ... - def manageWidget(self, widget: QtWidgets.QWidget) -> None: ... - def removeResourceFile(self, path: str) -> None: ... - def addResourceFile(self, path: str) -> None: ... - def resourceFiles(self) -> typing.List[str]: ... - def emitSelectionChanged(self) -> None: ... - @typing.overload - @staticmethod - def findFormWindow(w: QtWidgets.QWidget) -> 'QDesignerFormWindowInterface': ... - @typing.overload - @staticmethod - def findFormWindow(obj: QtCore.QObject) -> 'QDesignerFormWindowInterface': ... - def isDirty(self) -> bool: ... - def isManaged(self, widget: QtWidgets.QWidget) -> bool: ... - def setMainContainer(self, mainContainer: QtWidgets.QWidget) -> None: ... - def mainContainer(self) -> QtWidgets.QWidget: ... - def grid(self) -> QtCore.QPoint: ... - def cursor(self) -> 'QDesignerFormWindowCursorInterface': ... - def core(self) -> QDesignerFormEditorInterface: ... - def setIncludeHints(self, includeHints: typing.Iterable[str]) -> None: ... - def includeHints(self) -> typing.List[str]: ... - def setExportMacro(self, exportMacro: str) -> None: ... - def exportMacro(self) -> str: ... - def setPixmapFunction(self, pixmapFunction: str) -> None: ... - def pixmapFunction(self) -> str: ... - def setLayoutFunction(self, margin: str, spacing: str) -> None: ... - def layoutFunction(self) -> typing.Tuple[str, str]: ... - def setLayoutDefault(self, margin: int, spacing: int) -> None: ... - def layoutDefault(self) -> typing.Tuple[int, int]: ... - def setComment(self, comment: str) -> None: ... - def comment(self) -> str: ... - def setAuthor(self, author: str) -> None: ... - def author(self) -> str: ... - def hasFeature(self, f: typing.Union['QDesignerFormWindowInterface.Feature', 'QDesignerFormWindowInterface.FeatureFlag']) -> bool: ... - def features(self) -> 'QDesignerFormWindowInterface.Feature': ... - @typing.overload - def setContents(self, dev: QtCore.QIODevice, errorMessage: typing.Optional[str] = ...) -> bool: ... - @typing.overload - def setContents(self, contents: str) -> bool: ... - def contents(self) -> str: ... - def absoluteDir(self) -> QtCore.QDir: ... - def fileName(self) -> str: ... - - -class QDesignerFormWindowCursorInterface(sip.simplewrapper): - - class MoveMode(int): ... - MoveAnchor = ... # type: 'QDesignerFormWindowCursorInterface.MoveMode' - KeepAnchor = ... # type: 'QDesignerFormWindowCursorInterface.MoveMode' - - class MoveOperation(int): ... - NoMove = ... # type: 'QDesignerFormWindowCursorInterface.MoveOperation' - Start = ... # type: 'QDesignerFormWindowCursorInterface.MoveOperation' - End = ... # type: 'QDesignerFormWindowCursorInterface.MoveOperation' - Next = ... # type: 'QDesignerFormWindowCursorInterface.MoveOperation' - Prev = ... # type: 'QDesignerFormWindowCursorInterface.MoveOperation' - Left = ... # type: 'QDesignerFormWindowCursorInterface.MoveOperation' - Right = ... # type: 'QDesignerFormWindowCursorInterface.MoveOperation' - Up = ... # type: 'QDesignerFormWindowCursorInterface.MoveOperation' - Down = ... # type: 'QDesignerFormWindowCursorInterface.MoveOperation' - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QDesignerFormWindowCursorInterface') -> None: ... - - def isWidgetSelected(self, widget: QtWidgets.QWidget) -> bool: ... - def resetWidgetProperty(self, widget: QtWidgets.QWidget, name: str) -> None: ... - def setWidgetProperty(self, widget: QtWidgets.QWidget, name: str, value: typing.Any) -> None: ... - def setProperty(self, name: str, value: typing.Any) -> None: ... - def selectedWidget(self, index: int) -> QtWidgets.QWidget: ... - def selectedWidgetCount(self) -> int: ... - def hasSelection(self) -> bool: ... - def widget(self, index: int) -> QtWidgets.QWidget: ... - def widgetCount(self) -> int: ... - def current(self) -> QtWidgets.QWidget: ... - def setPosition(self, pos: int, mode: 'QDesignerFormWindowCursorInterface.MoveMode' = ...) -> None: ... - def position(self) -> int: ... - def movePosition(self, op: 'QDesignerFormWindowCursorInterface.MoveOperation', mode: 'QDesignerFormWindowCursorInterface.MoveMode' = ...) -> bool: ... - def formWindow(self) -> QDesignerFormWindowInterface: ... - - -class QDesignerFormWindowManagerInterface(QtCore.QObject): - - class ActionGroup(int): ... - StyledPreviewActionGroup = ... # type: 'QDesignerFormWindowManagerInterface.ActionGroup' - - class Action(int): ... - CutAction = ... # type: 'QDesignerFormWindowManagerInterface.Action' - CopyAction = ... # type: 'QDesignerFormWindowManagerInterface.Action' - PasteAction = ... # type: 'QDesignerFormWindowManagerInterface.Action' - DeleteAction = ... # type: 'QDesignerFormWindowManagerInterface.Action' - SelectAllAction = ... # type: 'QDesignerFormWindowManagerInterface.Action' - LowerAction = ... # type: 'QDesignerFormWindowManagerInterface.Action' - RaiseAction = ... # type: 'QDesignerFormWindowManagerInterface.Action' - UndoAction = ... # type: 'QDesignerFormWindowManagerInterface.Action' - RedoAction = ... # type: 'QDesignerFormWindowManagerInterface.Action' - HorizontalLayoutAction = ... # type: 'QDesignerFormWindowManagerInterface.Action' - VerticalLayoutAction = ... # type: 'QDesignerFormWindowManagerInterface.Action' - SplitHorizontalAction = ... # type: 'QDesignerFormWindowManagerInterface.Action' - SplitVerticalAction = ... # type: 'QDesignerFormWindowManagerInterface.Action' - GridLayoutAction = ... # type: 'QDesignerFormWindowManagerInterface.Action' - FormLayoutAction = ... # type: 'QDesignerFormWindowManagerInterface.Action' - BreakLayoutAction = ... # type: 'QDesignerFormWindowManagerInterface.Action' - AdjustSizeAction = ... # type: 'QDesignerFormWindowManagerInterface.Action' - SimplifyLayoutAction = ... # type: 'QDesignerFormWindowManagerInterface.Action' - DefaultPreviewAction = ... # type: 'QDesignerFormWindowManagerInterface.Action' - FormWindowSettingsDialogAction = ... # type: 'QDesignerFormWindowManagerInterface.Action' - - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def showPluginDialog(self) -> None: ... - def closeAllPreviews(self) -> None: ... - def showPreview(self) -> None: ... - def actionGroup(self, actionGroup: 'QDesignerFormWindowManagerInterface.ActionGroup') -> QtWidgets.QActionGroup: ... - def action(self, action: 'QDesignerFormWindowManagerInterface.Action') -> QtWidgets.QAction: ... - def setActiveFormWindow(self, formWindow: QDesignerFormWindowInterface) -> None: ... - def removeFormWindow(self, formWindow: QDesignerFormWindowInterface) -> None: ... - def addFormWindow(self, formWindow: QDesignerFormWindowInterface) -> None: ... - def formWindowSettingsChanged(self, fw: QDesignerFormWindowInterface) -> None: ... - def activeFormWindowChanged(self, formWindow: QDesignerFormWindowInterface) -> None: ... - def formWindowRemoved(self, formWindow: QDesignerFormWindowInterface) -> None: ... - def formWindowAdded(self, formWindow: QDesignerFormWindowInterface) -> None: ... - def core(self) -> QDesignerFormEditorInterface: ... - def createFormWindow(self, parent: typing.Optional[QtWidgets.QWidget] = ..., flags: typing.Union[QtCore.Qt.WindowFlags, QtCore.Qt.WindowType] = ...) -> QDesignerFormWindowInterface: ... - def formWindow(self, index: int) -> QDesignerFormWindowInterface: ... - def formWindowCount(self) -> int: ... - def activeFormWindow(self) -> QDesignerFormWindowInterface: ... - def actionSimplifyLayout(self) -> QtWidgets.QAction: ... - def actionFormLayout(self) -> QtWidgets.QAction: ... - - -class QDesignerObjectInspectorInterface(QtWidgets.QWidget): - - def __init__(self, parent: QtWidgets.QWidget, flags: typing.Union[QtCore.Qt.WindowFlags, QtCore.Qt.WindowType] = ...) -> None: ... - - def setFormWindow(self, formWindow: QDesignerFormWindowInterface) -> None: ... - def core(self) -> QDesignerFormEditorInterface: ... - - -class QDesignerPropertyEditorInterface(QtWidgets.QWidget): - - def __init__(self, parent: QtWidgets.QWidget, flags: typing.Union[QtCore.Qt.WindowFlags, QtCore.Qt.WindowType] = ...) -> None: ... - - def setReadOnly(self, readOnly: bool) -> None: ... - def setPropertyValue(self, name: str, value: typing.Any, changed: bool = ...) -> None: ... - def setObject(self, object: QtCore.QObject) -> None: ... - def propertyChanged(self, name: str, value: typing.Any) -> None: ... - def currentPropertyName(self) -> str: ... - def object(self) -> QtCore.QObject: ... - def isReadOnly(self) -> bool: ... - def core(self) -> QDesignerFormEditorInterface: ... - - -class QDesignerWidgetBoxInterface(QtWidgets.QWidget): - - def __init__(self, parent: typing.Optional[QtWidgets.QWidget] = ..., flags: typing.Union[QtCore.Qt.WindowFlags, QtCore.Qt.WindowType] = ...) -> None: ... - - def save(self) -> bool: ... - def load(self) -> bool: ... - def fileName(self) -> str: ... - def setFileName(self, file_name: str) -> None: ... - - -class QDesignerContainerExtension(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QDesignerContainerExtension') -> None: ... - - def canRemove(self, index: int) -> bool: ... - def canAddWidget(self) -> bool: ... - def remove(self, index: int) -> None: ... - def insertWidget(self, index: int, widget: QtWidgets.QWidget) -> None: ... - def addWidget(self, widget: QtWidgets.QWidget) -> None: ... - def setCurrentIndex(self, index: int) -> None: ... - def currentIndex(self) -> int: ... - def widget(self, index: int) -> QtWidgets.QWidget: ... - def __len__(self) -> int: ... - def count(self) -> int: ... - - -class QDesignerCustomWidgetInterface(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QDesignerCustomWidgetInterface') -> None: ... - - def codeTemplate(self) -> str: ... - def domXml(self) -> str: ... - def initialize(self, core: QDesignerFormEditorInterface) -> None: ... - def isInitialized(self) -> bool: ... - def createWidget(self, parent: QtWidgets.QWidget) -> QtWidgets.QWidget: ... - def isContainer(self) -> bool: ... - def icon(self) -> QtGui.QIcon: ... - def includeFile(self) -> str: ... - def whatsThis(self) -> str: ... - def toolTip(self) -> str: ... - def group(self) -> str: ... - def name(self) -> str: ... - - -class QDesignerCustomWidgetCollectionInterface(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QDesignerCustomWidgetCollectionInterface') -> None: ... - - def customWidgets(self) -> typing.Any: ... - - -class QAbstractExtensionFactory(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QAbstractExtensionFactory') -> None: ... - - def extension(self, object: QtCore.QObject, iid: str) -> QtCore.QObject: ... - - -class QExtensionFactory(QtCore.QObject, QAbstractExtensionFactory): - - def __init__(self, parent: typing.Optional['QExtensionManager'] = ...) -> None: ... - - def createExtension(self, object: QtCore.QObject, iid: str, parent: QtCore.QObject) -> QtCore.QObject: ... - def extensionManager(self) -> 'QExtensionManager': ... - def extension(self, object: QtCore.QObject, iid: str) -> QtCore.QObject: ... - - -class QAbstractExtensionManager(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QAbstractExtensionManager') -> None: ... - - def extension(self, object: QtCore.QObject, iid: str) -> QtCore.QObject: ... - def unregisterExtensions(self, factory: QAbstractExtensionFactory, iid: str) -> None: ... - def registerExtensions(self, factory: QAbstractExtensionFactory, iid: str) -> None: ... - - -class QFormBuilder(QAbstractFormBuilder): - - def __init__(self) -> None: ... - - def customWidgets(self) -> typing.List[QDesignerCustomWidgetInterface]: ... - def setPluginPath(self, pluginPaths: typing.Iterable[str]) -> None: ... - def addPluginPath(self, pluginPath: str) -> None: ... - def clearPluginPaths(self) -> None: ... - def pluginPaths(self) -> typing.List[str]: ... - - -class QDesignerMemberSheetExtension(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QDesignerMemberSheetExtension') -> None: ... - - def parameterNames(self, index: int) -> typing.List[QtCore.QByteArray]: ... - def parameterTypes(self, index: int) -> typing.List[QtCore.QByteArray]: ... - def signature(self, index: int) -> str: ... - def declaredInClass(self, index: int) -> str: ... - def inheritedFromWidget(self, index: int) -> bool: ... - def isSlot(self, index: int) -> bool: ... - def isSignal(self, index: int) -> bool: ... - def setVisible(self, index: int, b: bool) -> None: ... - def isVisible(self, index: int) -> bool: ... - def setMemberGroup(self, index: int, group: str) -> None: ... - def memberGroup(self, index: int) -> str: ... - def memberName(self, index: int) -> str: ... - def indexOf(self, name: str) -> int: ... - def __len__(self) -> int: ... - def count(self) -> int: ... - - -class QDesignerPropertySheetExtension(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QDesignerPropertySheetExtension') -> None: ... - - def isEnabled(self, index: int) -> bool: ... - def setChanged(self, index: int, changed: bool) -> None: ... - def isChanged(self, index: int) -> bool: ... - def setProperty(self, index: int, value: typing.Any) -> None: ... - def property(self, index: int) -> typing.Any: ... - def setAttribute(self, index: int, b: bool) -> None: ... - def isAttribute(self, index: int) -> bool: ... - def setVisible(self, index: int, b: bool) -> None: ... - def isVisible(self, index: int) -> bool: ... - def reset(self, index: int) -> bool: ... - def hasReset(self, index: int) -> bool: ... - def setPropertyGroup(self, index: int, group: str) -> None: ... - def propertyGroup(self, index: int) -> str: ... - def propertyName(self, index: int) -> str: ... - def indexOf(self, name: str) -> int: ... - def __len__(self) -> int: ... - def count(self) -> int: ... - - -class QExtensionManager(QtCore.QObject, QAbstractExtensionManager): - - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def extension(self, object: QtCore.QObject, iid: str) -> QtCore.QObject: ... - def unregisterExtensions(self, factory: QAbstractExtensionFactory, iid: str = ...) -> None: ... - def registerExtensions(self, factory: QAbstractExtensionFactory, iid: str = ...) -> None: ... - - -class QDesignerTaskMenuExtension(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QDesignerTaskMenuExtension') -> None: ... - - def preferredEditAction(self) -> QtWidgets.QAction: ... - def taskActions(self) -> typing.List[QtWidgets.QAction]: ... - - -class QPyDesignerContainerExtension(QtCore.QObject, QDesignerContainerExtension): - - def __init__(self, parent: QtCore.QObject) -> None: ... - - -class QPyDesignerCustomWidgetCollectionPlugin(QtCore.QObject, QDesignerCustomWidgetCollectionInterface): - - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - -class QPyDesignerCustomWidgetPlugin(QtCore.QObject, QDesignerCustomWidgetInterface): - - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - -class QPyDesignerMemberSheetExtension(QtCore.QObject, QDesignerMemberSheetExtension): - - def __init__(self, parent: QtCore.QObject) -> None: ... - - -class QPyDesignerPropertySheetExtension(QtCore.QObject, QDesignerPropertySheetExtension): - - def __init__(self, parent: QtCore.QObject) -> None: ... - - -class QPyDesignerTaskMenuExtension(QtCore.QObject, QDesignerTaskMenuExtension): - - def __init__(self, parent: QtCore.QObject) -> None: ... diff -Nru uranium-3.3.0/stubs/PyQt5/QtGui.pyi uranium-4.4.1/stubs/PyQt5/QtGui.pyi --- uranium-3.3.0/stubs/PyQt5/QtGui.pyi 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/stubs/PyQt5/QtGui.pyi 1970-01-01 00:00:00.000000000 +0000 @@ -1,8054 +0,0 @@ -# The PEP 484 type hints stub file for the QtGui module. -# -# Generated by SIP 4.18.1 -# -# Copyright (c) 2016 Riverbank Computing Limited -# -# This file is part of PyQt5. -# -# This file may be used under the terms of the GNU General Public License -# version 3.0 as published by the Free Software Foundation and appearing in -# the file LICENSE included in the packaging of this file. Please review the -# following information to ensure the GNU General Public License version 3.0 -# requirements will be met: http://www.gnu.org/copyleft/gpl.html. -# -# If you do not wish to use this file under the terms of the GPL version 3.0 -# then you may purchase a commercial license. For more information contact -# info@riverbankcomputing.com. -# -# This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -# WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - - -import typing -import sip - -from PyQt5 import QtCore - -# Support for QDate, QDateTime and QTime. -import datetime - -# Convenient type aliases. -PYQT_SIGNAL = typing.Union[QtCore.pyqtSignal, QtCore.pyqtBoundSignal] -PYQT_SLOT = typing.Union[typing.Callable[..., None], QtCore.pyqtBoundSignal] - -# Convenient aliases for complicated OpenGL types. -PYQT_SHADER_ATTRIBUTE_ARRAY = typing.Union[typing.Sequence['QVector2D'], - typing.Sequence['QVector3D'], typing.Sequence['QVector4D'], - typing.Sequence[typing.Sequence[float]]] -PYQT_SHADER_UNIFORM_VALUE_ARRAY = typing.Union[typing.Sequence['QVector2D'], - typing.Sequence['QVector3D'], typing.Sequence['QVector4D'], - typing.Sequence['QMatrix2x2'], typing.Sequence['QMatrix2x3'], - typing.Sequence['QMatrix2x4'], typing.Sequence['QMatrix3x2'], - typing.Sequence['QMatrix3x3'], typing.Sequence['QMatrix3x4'], - typing.Sequence['QMatrix4x2'], typing.Sequence['QMatrix4x3'], - typing.Sequence['QMatrix4x4'], typing.Sequence[typing.Sequence[float]]] - - -class QAbstractTextDocumentLayout(QtCore.QObject): - - class Selection(sip.simplewrapper): - - cursor = ... # type: 'QTextCursor' - format = ... # type: 'QTextCharFormat' - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QAbstractTextDocumentLayout.Selection') -> None: ... - - class PaintContext(sip.simplewrapper): - - clip = ... # type: QtCore.QRectF - cursorPosition = ... # type: int - palette = ... # type: 'QPalette' - selections = ... # type: typing.Any - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QAbstractTextDocumentLayout.PaintContext') -> None: ... - - def __init__(self, doc: 'QTextDocument') -> None: ... - - def format(self, pos: int) -> 'QTextCharFormat': ... - def drawInlineObject(self, painter: 'QPainter', rect: QtCore.QRectF, object: 'QTextInlineObject', posInDocument: int, format: 'QTextFormat') -> None: ... - def positionInlineObject(self, item: 'QTextInlineObject', posInDocument: int, format: 'QTextFormat') -> None: ... - def resizeInlineObject(self, item: 'QTextInlineObject', posInDocument: int, format: 'QTextFormat') -> None: ... - def documentChanged(self, from_: int, charsRemoved: int, charsAdded: int) -> None: ... - def updateBlock(self, block: 'QTextBlock') -> None: ... - def pageCountChanged(self, newPages: int) -> None: ... - def documentSizeChanged(self, newSize: QtCore.QSizeF) -> None: ... - def update(self, rect: QtCore.QRectF = ...) -> None: ... - def handlerForObject(self, objectType: int) -> 'QTextObjectInterface': ... - def unregisterHandler(self, objectType: int, component: typing.Optional[QtCore.QObject] = ...) -> None: ... - def registerHandler(self, objectType: int, component: QtCore.QObject) -> None: ... - def document(self) -> 'QTextDocument': ... - def paintDevice(self) -> 'QPaintDevice': ... - def setPaintDevice(self, device: 'QPaintDevice') -> None: ... - def blockBoundingRect(self, block: 'QTextBlock') -> QtCore.QRectF: ... - def frameBoundingRect(self, frame: 'QTextFrame') -> QtCore.QRectF: ... - def documentSize(self) -> QtCore.QSizeF: ... - def pageCount(self) -> int: ... - def anchorAt(self, pos: typing.Union[QtCore.QPointF, QtCore.QPoint]) -> str: ... - def hitTest(self, point: typing.Union[QtCore.QPointF, QtCore.QPoint], accuracy: QtCore.Qt.HitTestAccuracy) -> int: ... - def draw(self, painter: 'QPainter', context: 'QAbstractTextDocumentLayout.PaintContext') -> None: ... - - -class QTextObjectInterface(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QTextObjectInterface') -> None: ... - - def drawObject(self, painter: 'QPainter', rect: QtCore.QRectF, doc: 'QTextDocument', posInDocument: int, format: 'QTextFormat') -> None: ... - def intrinsicSize(self, doc: 'QTextDocument', posInDocument: int, format: 'QTextFormat') -> QtCore.QSizeF: ... - - -class QBackingStore(sip.simplewrapper): - - def __init__(self, window: 'QWindow') -> None: ... - - def hasStaticContents(self) -> bool: ... - def staticContents(self) -> 'QRegion': ... - def setStaticContents(self, region: 'QRegion') -> None: ... - def endPaint(self) -> None: ... - def beginPaint(self, a0: 'QRegion') -> None: ... - def scroll(self, area: 'QRegion', dx: int, dy: int) -> bool: ... - def size(self) -> QtCore.QSize: ... - def resize(self, size: QtCore.QSize) -> None: ... - def flush(self, region: 'QRegion', window: typing.Optional['QWindow'] = ..., offset: QtCore.QPoint = ...) -> None: ... - def paintDevice(self) -> 'QPaintDevice': ... - def window(self) -> 'QWindow': ... - - -class QPaintDevice(sip.simplewrapper): - - class PaintDeviceMetric(int): ... - PdmWidth = ... # type: 'QPaintDevice.PaintDeviceMetric' - PdmHeight = ... # type: 'QPaintDevice.PaintDeviceMetric' - PdmWidthMM = ... # type: 'QPaintDevice.PaintDeviceMetric' - PdmHeightMM = ... # type: 'QPaintDevice.PaintDeviceMetric' - PdmNumColors = ... # type: 'QPaintDevice.PaintDeviceMetric' - PdmDepth = ... # type: 'QPaintDevice.PaintDeviceMetric' - PdmDpiX = ... # type: 'QPaintDevice.PaintDeviceMetric' - PdmDpiY = ... # type: 'QPaintDevice.PaintDeviceMetric' - PdmPhysicalDpiX = ... # type: 'QPaintDevice.PaintDeviceMetric' - PdmPhysicalDpiY = ... # type: 'QPaintDevice.PaintDeviceMetric' - PdmDevicePixelRatio = ... # type: 'QPaintDevice.PaintDeviceMetric' - PdmDevicePixelRatioScaled = ... # type: 'QPaintDevice.PaintDeviceMetric' - - def __init__(self) -> None: ... - - @staticmethod - def devicePixelRatioFScale() -> float: ... - def devicePixelRatioF(self) -> float: ... - def metric(self, metric: 'QPaintDevice.PaintDeviceMetric') -> int: ... - def devicePixelRatio(self) -> float: ... - def colorCount(self) -> int: ... - def paintingActive(self) -> bool: ... - def depth(self) -> int: ... - def physicalDpiY(self) -> int: ... - def physicalDpiX(self) -> int: ... - def logicalDpiY(self) -> int: ... - def logicalDpiX(self) -> int: ... - def heightMM(self) -> int: ... - def widthMM(self) -> int: ... - def height(self) -> int: ... - def width(self) -> int: ... - def paintEngine(self) -> 'QPaintEngine': ... - - -class QPixmap(QPaintDevice): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, w: int, h: int) -> None: ... - @typing.overload - def __init__(self, a0: QtCore.QSize) -> None: ... - @typing.overload - def __init__(self, fileName: str, format: typing.Optional[str] = ..., flags: typing.Union[QtCore.Qt.ImageConversionFlags, QtCore.Qt.ImageConversionFlag] = ...) -> None: ... - @typing.overload - def __init__(self, xpm: typing.List[str]) -> None: ... - @typing.overload - def __init__(self, a0: 'QPixmap') -> None: ... - @typing.overload - def __init__(self, variant: typing.Any) -> None: ... - - def setDevicePixelRatio(self, scaleFactor: float) -> None: ... - def devicePixelRatio(self) -> float: ... - def swap(self, other: 'QPixmap') -> None: ... - @typing.overload - def scroll(self, dx: int, dy: int, rect: QtCore.QRect) -> 'QRegion': ... - @typing.overload - def scroll(self, dx: int, dy: int, x: int, y: int, width: int, height: int) -> 'QRegion': ... - def cacheKey(self) -> int: ... - @staticmethod - def trueMatrix(m: 'QTransform', w: int, h: int) -> 'QTransform': ... - def transformed(self, transform: 'QTransform', mode: QtCore.Qt.TransformationMode = ...) -> 'QPixmap': ... - def metric(self, a0: QPaintDevice.PaintDeviceMetric) -> int: ... - def paintEngine(self) -> 'QPaintEngine': ... - def isQBitmap(self) -> bool: ... - def detach(self) -> None: ... - @typing.overload - def copy(self, rect: QtCore.QRect = ...) -> 'QPixmap': ... - @typing.overload - def copy(self, ax: int, ay: int, awidth: int, aheight: int) -> 'QPixmap': ... - @typing.overload - def save(self, fileName: str, format: typing.Optional[str] = ..., quality: int = ...) -> bool: ... - @typing.overload - def save(self, device: QtCore.QIODevice, format: typing.Optional[str] = ..., quality: int = ...) -> bool: ... - @typing.overload - def loadFromData(self, buf: bytes, format: typing.Optional[str] = ..., flags: typing.Union[QtCore.Qt.ImageConversionFlags, QtCore.Qt.ImageConversionFlag] = ...) -> bool: ... - @typing.overload - def loadFromData(self, buf: typing.Union[QtCore.QByteArray, bytes, bytearray], format: typing.Optional[str] = ..., flags: typing.Union[QtCore.Qt.ImageConversionFlags, QtCore.Qt.ImageConversionFlag] = ...) -> bool: ... - def load(self, fileName: str, format: typing.Optional[str] = ..., flags: typing.Union[QtCore.Qt.ImageConversionFlags, QtCore.Qt.ImageConversionFlag] = ...) -> bool: ... - def convertFromImage(self, img: 'QImage', flags: typing.Union[QtCore.Qt.ImageConversionFlags, QtCore.Qt.ImageConversionFlag] = ...) -> bool: ... - @staticmethod - def fromImageReader(imageReader: 'QImageReader', flags: typing.Union[QtCore.Qt.ImageConversionFlags, QtCore.Qt.ImageConversionFlag] = ...) -> 'QPixmap': ... - @staticmethod - def fromImage(image: 'QImage', flags: typing.Union[QtCore.Qt.ImageConversionFlags, QtCore.Qt.ImageConversionFlag] = ...) -> 'QPixmap': ... - def toImage(self) -> 'QImage': ... - def scaledToHeight(self, height: int, mode: QtCore.Qt.TransformationMode = ...) -> 'QPixmap': ... - def scaledToWidth(self, width: int, mode: QtCore.Qt.TransformationMode = ...) -> 'QPixmap': ... - @typing.overload - def scaled(self, width: int, height: int, aspectRatioMode: QtCore.Qt.AspectRatioMode = ..., transformMode: QtCore.Qt.TransformationMode = ...) -> 'QPixmap': ... - @typing.overload - def scaled(self, size: QtCore.QSize, aspectRatioMode: QtCore.Qt.AspectRatioMode = ..., transformMode: QtCore.Qt.TransformationMode = ...) -> 'QPixmap': ... - def createMaskFromColor(self, maskColor: typing.Union['QColor', QtCore.Qt.GlobalColor, 'QGradient'], mode: QtCore.Qt.MaskMode = ...) -> 'QBitmap': ... - def createHeuristicMask(self, clipTight: bool = ...) -> 'QBitmap': ... - def hasAlphaChannel(self) -> bool: ... - def hasAlpha(self) -> bool: ... - def setMask(self, a0: 'QBitmap') -> None: ... - def mask(self) -> 'QBitmap': ... - def fill(self, color: typing.Union['QColor', QtCore.Qt.GlobalColor, 'QGradient'] = ...) -> None: ... - @staticmethod - def defaultDepth() -> int: ... - def depth(self) -> int: ... - def rect(self) -> QtCore.QRect: ... - def size(self) -> QtCore.QSize: ... - def height(self) -> int: ... - def width(self) -> int: ... - def devType(self) -> int: ... - def isNull(self) -> bool: ... - - -class QBitmap(QPixmap): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, other: 'QBitmap') -> None: ... - @typing.overload - def __init__(self, a0: QPixmap) -> None: ... - @typing.overload - def __init__(self, w: int, h: int) -> None: ... - @typing.overload - def __init__(self, a0: QtCore.QSize) -> None: ... - @typing.overload - def __init__(self, fileName: str, format: typing.Optional[str] = ...) -> None: ... - @typing.overload - def __init__(self, variant: typing.Any) -> None: ... - - # def swap(self, other: 'QBitmap') -> None: ... - # def transformed(self, matrix: 'QTransform') -> 'QBitmap': ... - @staticmethod - def fromData(size: QtCore.QSize, bits: str, format: 'QImage.Format' = ...) -> 'QBitmap': ... - @staticmethod - def fromImage(image: 'QImage', flags: typing.Union[QtCore.Qt.ImageConversionFlags, QtCore.Qt.ImageConversionFlag] = ...) -> 'QBitmap': ... - def clear(self) -> None: ... - - -class QColor(sip.simplewrapper): - - class NameFormat(int): ... - HexRgb = ... # type: 'QColor.NameFormat' - HexArgb = ... # type: 'QColor.NameFormat' - - class Spec(int): ... - Invalid = ... # type: 'QColor.Spec' - Rgb = ... # type: 'QColor.Spec' - Hsv = ... # type: 'QColor.Spec' - Cmyk = ... # type: 'QColor.Spec' - Hsl = ... # type: 'QColor.Spec' - - @typing.overload - def __init__(self, color: QtCore.Qt.GlobalColor) -> None: ... - @typing.overload - def __init__(self, rgb: int) -> None: ... - @typing.overload - def __init__(self, rgba64: 'QRgba64') -> None: ... - @typing.overload - def __init__(self, variant: typing.Any) -> None: ... - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, r: int, g: int, b: int, alpha: int = ...) -> None: ... - @typing.overload - def __init__(self, aname: str) -> None: ... - @typing.overload - def __init__(self, acolor: typing.Union['QColor', QtCore.Qt.GlobalColor, 'QGradient']) -> None: ... - - @typing.overload - @staticmethod - def fromRgba64(r: int, g: int, b: int, alpha: int = ...) -> 'QColor': ... - @typing.overload - @staticmethod - def fromRgba64(rgba: 'QRgba64') -> 'QColor': ... - def setRgba64(self, rgba: 'QRgba64') -> None: ... - def rgba64(self) -> 'QRgba64': ... - @staticmethod - def isValidColor(name: str) -> bool: ... - @staticmethod - def fromHslF(h: float, s: float, l: float, alpha: float = ...) -> 'QColor': ... - @staticmethod - def fromHsl(h: int, s: int, l: int, alpha: int = ...) -> 'QColor': ... - def toHsl(self) -> 'QColor': ... - def setHslF(self, h: float, s: float, l: float, alpha: float = ...) -> None: ... - def getHslF(self) -> typing.Tuple[float, float, float, float]: ... - def setHsl(self, h: int, s: int, l: int, alpha: int = ...) -> None: ... - def getHsl(self) -> typing.Tuple[int, int, int, int]: ... - def lightnessF(self) -> float: ... - def hslSaturationF(self) -> float: ... - def hslHueF(self) -> float: ... - def lightness(self) -> int: ... - def hslSaturation(self) -> int: ... - def hslHue(self) -> int: ... - def hsvSaturationF(self) -> float: ... - def hsvHueF(self) -> float: ... - def hsvSaturation(self) -> int: ... - def hsvHue(self) -> int: ... - def darker(self, factor: int = ...) -> 'QColor': ... - def lighter(self, factor: int = ...) -> 'QColor': ... - def isValid(self) -> bool: ... - @staticmethod - def fromCmykF(c: float, m: float, y: float, k: float, alpha: float = ...) -> 'QColor': ... - @staticmethod - def fromCmyk(c: int, m: int, y: int, k: int, alpha: int = ...) -> 'QColor': ... - @staticmethod - def fromHsvF(h: float, s: float, v: float, alpha: float = ...) -> 'QColor': ... - @staticmethod - def fromHsv(h: int, s: int, v: int, alpha: int = ...) -> 'QColor': ... - @staticmethod - def fromRgbF(r: float, g: float, b: float, alpha: float = ...) -> 'QColor': ... - @staticmethod - def fromRgba(rgba: int) -> 'QColor': ... - @typing.overload - @staticmethod - def fromRgb(rgb: int) -> 'QColor': ... - @typing.overload - @staticmethod - def fromRgb(r: int, g: int, b: int, alpha: int = ...) -> 'QColor': ... - def convertTo(self, colorSpec: 'QColor.Spec') -> 'QColor': ... - def toCmyk(self) -> 'QColor': ... - def toHsv(self) -> 'QColor': ... - def toRgb(self) -> 'QColor': ... - def setCmykF(self, c: float, m: float, y: float, k: float, alpha: float = ...) -> None: ... - def getCmykF(self) -> typing.Tuple[float, float, float, float, float]: ... - def setCmyk(self, c: int, m: int, y: int, k: int, alpha: int = ...) -> None: ... - def getCmyk(self) -> typing.Tuple[int, int, int, int, int]: ... - def blackF(self) -> float: ... - def yellowF(self) -> float: ... - def magentaF(self) -> float: ... - def cyanF(self) -> float: ... - def black(self) -> int: ... - def yellow(self) -> int: ... - def magenta(self) -> int: ... - def cyan(self) -> int: ... - def setHsvF(self, h: float, s: float, v: float, alpha: float = ...) -> None: ... - def getHsvF(self) -> typing.Tuple[float, float, float, float]: ... - def setHsv(self, h: int, s: int, v: int, alpha: int = ...) -> None: ... - def getHsv(self) -> typing.Tuple[int, int, int, int]: ... - def valueF(self) -> float: ... - def saturationF(self) -> float: ... - def hueF(self) -> float: ... - def value(self) -> int: ... - def saturation(self) -> int: ... - def hue(self) -> int: ... - def rgb(self) -> int: ... - def setRgba(self, rgba: int) -> None: ... - def rgba(self) -> int: ... - def setRgbF(self, r: float, g: float, b: float, alpha: float = ...) -> None: ... - def getRgbF(self) -> typing.Tuple[float, float, float, float]: ... - @typing.overload - def setRgb(self, r: int, g: int, b: int, alpha: int = ...) -> None: ... - @typing.overload - def setRgb(self, rgb: int) -> None: ... - def getRgb(self) -> typing.Tuple[int, int, int, int]: ... - def setBlueF(self, blue: float) -> None: ... - def setGreenF(self, green: float) -> None: ... - def setRedF(self, red: float) -> None: ... - def blueF(self) -> float: ... - def greenF(self) -> float: ... - def redF(self) -> float: ... - def setBlue(self, blue: int) -> None: ... - def setGreen(self, green: int) -> None: ... - def setRed(self, red: int) -> None: ... - def blue(self) -> int: ... - def green(self) -> int: ... - def red(self) -> int: ... - def setAlphaF(self, alpha: float) -> None: ... - def alphaF(self) -> float: ... - def setAlpha(self, alpha: int) -> None: ... - def alpha(self) -> int: ... - def spec(self) -> 'QColor.Spec': ... - @staticmethod - def colorNames() -> typing.List[str]: ... - def setNamedColor(self, name: str) -> None: ... - @typing.overload - def name(self) -> str: ... - @typing.overload - def name(self, format: 'QColor.NameFormat') -> str: ... - - -class QBrush(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, bs: QtCore.Qt.BrushStyle) -> None: ... - @typing.overload - def __init__(self, color: typing.Union[QColor, QtCore.Qt.GlobalColor, 'QGradient'], style: QtCore.Qt.BrushStyle = ...) -> None: ... - @typing.overload - def __init__(self, color: typing.Union[QColor, QtCore.Qt.GlobalColor, 'QGradient'], pixmap: QPixmap) -> None: ... - @typing.overload - def __init__(self, pixmap: QPixmap) -> None: ... - @typing.overload - def __init__(self, image: 'QImage') -> None: ... - @typing.overload - def __init__(self, brush: typing.Union['QBrush', QColor, QtCore.Qt.GlobalColor, 'QGradient']) -> None: ... - @typing.overload - def __init__(self, variant: typing.Any) -> None: ... - - def swap(self, other: 'QBrush') -> None: ... - def transform(self) -> 'QTransform': ... - def setTransform(self, a0: 'QTransform') -> None: ... - def textureImage(self) -> 'QImage': ... - def setTextureImage(self, image: 'QImage') -> None: ... - def color(self) -> QColor: ... - def style(self) -> QtCore.Qt.BrushStyle: ... - def isOpaque(self) -> bool: ... - def gradient(self) -> 'QGradient': ... - @typing.overload - def setColor(self, color: typing.Union[QColor, QtCore.Qt.GlobalColor, 'QGradient']) -> None: ... - @typing.overload - def setColor(self, acolor: QtCore.Qt.GlobalColor) -> None: ... - def setTexture(self, pixmap: QPixmap) -> None: ... - def texture(self) -> QPixmap: ... - def setStyle(self, a0: QtCore.Qt.BrushStyle) -> None: ... - - -class QGradient(sip.simplewrapper): - - class Spread(int): ... - PadSpread = ... # type: 'QGradient.Spread' - ReflectSpread = ... # type: 'QGradient.Spread' - RepeatSpread = ... # type: 'QGradient.Spread' - - class Type(int): ... - LinearGradient = ... # type: 'QGradient.Type' - RadialGradient = ... # type: 'QGradient.Type' - ConicalGradient = ... # type: 'QGradient.Type' - NoGradient = ... # type: 'QGradient.Type' - - class CoordinateMode(int): ... - LogicalMode = ... # type: 'QGradient.CoordinateMode' - StretchToDeviceMode = ... # type: 'QGradient.CoordinateMode' - ObjectBoundingMode = ... # type: 'QGradient.CoordinateMode' - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QGradient') -> None: ... - - def setCoordinateMode(self, mode: 'QGradient.CoordinateMode') -> None: ... - def coordinateMode(self) -> 'QGradient.CoordinateMode': ... - def setSpread(self, aspread: 'QGradient.Spread') -> None: ... - def stops(self) -> typing.Any: ... - def setStops(self, stops: typing.Any) -> None: ... - def setColorAt(self, pos: float, color: typing.Union[QColor, QtCore.Qt.GlobalColor, 'QGradient']) -> None: ... - def spread(self) -> 'QGradient.Spread': ... - def type(self) -> 'QGradient.Type': ... - - -class QLinearGradient(QGradient): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, start: typing.Union[QtCore.QPointF, QtCore.QPoint], finalStop: typing.Union[QtCore.QPointF, QtCore.QPoint]) -> None: ... - @typing.overload - def __init__(self, xStart: float, yStart: float, xFinalStop: float, yFinalStop: float) -> None: ... - @typing.overload - def __init__(self, a0: 'QLinearGradient') -> None: ... - - @typing.overload - def setFinalStop(self, stop: typing.Union[QtCore.QPointF, QtCore.QPoint]) -> None: ... - @typing.overload - def setFinalStop(self, x: float, y: float) -> None: ... - @typing.overload - def setStart(self, start: typing.Union[QtCore.QPointF, QtCore.QPoint]) -> None: ... - @typing.overload - def setStart(self, x: float, y: float) -> None: ... - def finalStop(self) -> QtCore.QPointF: ... - def start(self) -> QtCore.QPointF: ... - - -class QRadialGradient(QGradient): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, center: typing.Union[QtCore.QPointF, QtCore.QPoint], radius: float, focalPoint: typing.Union[QtCore.QPointF, QtCore.QPoint]) -> None: ... - @typing.overload - def __init__(self, center: typing.Union[QtCore.QPointF, QtCore.QPoint], centerRadius: float, focalPoint: typing.Union[QtCore.QPointF, QtCore.QPoint], focalRadius: float) -> None: ... - @typing.overload - def __init__(self, center: typing.Union[QtCore.QPointF, QtCore.QPoint], radius: float) -> None: ... - @typing.overload - def __init__(self, cx: float, cy: float, radius: float, fx: float, fy: float) -> None: ... - @typing.overload - def __init__(self, cx: float, cy: float, centerRadius: float, fx: float, fy: float, focalRadius: float) -> None: ... - @typing.overload - def __init__(self, cx: float, cy: float, radius: float) -> None: ... - @typing.overload - def __init__(self, a0: 'QRadialGradient') -> None: ... - - def setFocalRadius(self, radius: float) -> None: ... - def focalRadius(self) -> float: ... - def setCenterRadius(self, radius: float) -> None: ... - def centerRadius(self) -> float: ... - def setRadius(self, radius: float) -> None: ... - @typing.overload - def setFocalPoint(self, focalPoint: typing.Union[QtCore.QPointF, QtCore.QPoint]) -> None: ... - @typing.overload - def setFocalPoint(self, x: float, y: float) -> None: ... - @typing.overload - def setCenter(self, center: typing.Union[QtCore.QPointF, QtCore.QPoint]) -> None: ... - @typing.overload - def setCenter(self, x: float, y: float) -> None: ... - def radius(self) -> float: ... - def focalPoint(self) -> QtCore.QPointF: ... - def center(self) -> QtCore.QPointF: ... - - -class QConicalGradient(QGradient): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, center: typing.Union[QtCore.QPointF, QtCore.QPoint], startAngle: float) -> None: ... - @typing.overload - def __init__(self, cx: float, cy: float, startAngle: float) -> None: ... - @typing.overload - def __init__(self, a0: 'QConicalGradient') -> None: ... - - def setAngle(self, angle: float) -> None: ... - @typing.overload - def setCenter(self, center: typing.Union[QtCore.QPointF, QtCore.QPoint]) -> None: ... - @typing.overload - def setCenter(self, x: float, y: float) -> None: ... - def angle(self) -> float: ... - def center(self) -> QtCore.QPointF: ... - - -class QClipboard(QtCore.QObject): - - class Mode(int): ... - Clipboard = ... # type: 'QClipboard.Mode' - Selection = ... # type: 'QClipboard.Mode' - FindBuffer = ... # type: 'QClipboard.Mode' - - def selectionChanged(self) -> None: ... - def findBufferChanged(self) -> None: ... - def dataChanged(self) -> None: ... - def changed(self, mode: 'QClipboard.Mode') -> None: ... - def setPixmap(self, a0: QPixmap, mode: 'QClipboard.Mode' = ...) -> None: ... - def setImage(self, a0: 'QImage', mode: 'QClipboard.Mode' = ...) -> None: ... - def pixmap(self, mode: 'QClipboard.Mode' = ...) -> QPixmap: ... - def image(self, mode: 'QClipboard.Mode' = ...) -> 'QImage': ... - def setMimeData(self, data: QtCore.QMimeData, mode: 'QClipboard.Mode' = ...) -> None: ... - def mimeData(self, mode: 'QClipboard.Mode' = ...) -> QtCore.QMimeData: ... - def setText(self, a0: str, mode: 'QClipboard.Mode' = ...) -> None: ... - @typing.overload - def text(self, mode: 'QClipboard.Mode' = ...) -> str: ... - @typing.overload - def text(self, subtype: str, mode: 'QClipboard.Mode' = ...) -> typing.Tuple[str, str]: ... - def ownsSelection(self) -> bool: ... - def ownsFindBuffer(self) -> bool: ... - def ownsClipboard(self) -> bool: ... - def supportsSelection(self) -> bool: ... - def supportsFindBuffer(self) -> bool: ... - def clear(self, mode: 'QClipboard.Mode' = ...) -> None: ... - - -class QCursor(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, bitmap: QBitmap, mask: QBitmap, hotX: int = ..., hotY: int = ...) -> None: ... - @typing.overload - def __init__(self, pixmap: QPixmap, hotX: int = ..., hotY: int = ...) -> None: ... - @typing.overload - def __init__(self, cursor: typing.Union['QCursor', QtCore.Qt.CursorShape]) -> None: ... - @typing.overload - def __init__(self, variant: typing.Any) -> None: ... - - def swap(self, other: typing.Union['QCursor', QtCore.Qt.CursorShape]) -> None: ... - @typing.overload - @staticmethod - def setPos(x: int, y: int) -> None: ... - @typing.overload - @staticmethod - def setPos(p: QtCore.QPoint) -> None: ... - @staticmethod - def pos() -> QtCore.QPoint: ... - def hotSpot(self) -> QtCore.QPoint: ... - def pixmap(self) -> QPixmap: ... - def mask(self) -> QBitmap: ... - def bitmap(self) -> QBitmap: ... - def setShape(self, newShape: QtCore.Qt.CursorShape) -> None: ... - def shape(self) -> QtCore.Qt.CursorShape: ... - - -class QDesktopServices(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QDesktopServices') -> None: ... - - @staticmethod - def unsetUrlHandler(scheme: str) -> None: ... - @typing.overload - @staticmethod - def setUrlHandler(scheme: str, receiver: QtCore.QObject, method: str) -> None: ... - @typing.overload - @staticmethod - def setUrlHandler(scheme: str, method: typing.Callable[[], None]) -> None: ... - @staticmethod - def openUrl(url: QtCore.QUrl) -> bool: ... - - -class QDrag(QtCore.QObject): - - def __init__(self, dragSource: QtCore.QObject) -> None: ... - - @staticmethod - def cancel() -> None: ... - def defaultAction(self) -> QtCore.Qt.DropAction: ... - def supportedActions(self) -> QtCore.Qt.DropActions: ... - def dragCursor(self, action: QtCore.Qt.DropAction) -> QPixmap: ... - def targetChanged(self, newTarget: QtCore.QObject) -> None: ... - def actionChanged(self, action: QtCore.Qt.DropAction) -> None: ... - def setDragCursor(self, cursor: QPixmap, action: QtCore.Qt.DropAction) -> None: ... - def target(self) -> QtCore.QObject: ... - def source(self) -> QtCore.QObject: ... - def hotSpot(self) -> QtCore.QPoint: ... - def setHotSpot(self, hotspot: QtCore.QPoint) -> None: ... - def pixmap(self) -> QPixmap: ... - def setPixmap(self, a0: QPixmap) -> None: ... - def mimeData(self) -> QtCore.QMimeData: ... - def setMimeData(self, data: QtCore.QMimeData) -> None: ... - @typing.overload - def exec(self, supportedActions: typing.Union[QtCore.Qt.DropActions, QtCore.Qt.DropAction] = ...) -> QtCore.Qt.DropAction: ... - @typing.overload - def exec(self, supportedActions: typing.Union[QtCore.Qt.DropActions, QtCore.Qt.DropAction], defaultDropAction: QtCore.Qt.DropAction) -> QtCore.Qt.DropAction: ... - @typing.overload - def exec_(self, supportedActions: typing.Union[QtCore.Qt.DropActions, QtCore.Qt.DropAction] = ...) -> QtCore.Qt.DropAction: ... - @typing.overload - def exec_(self, supportedActions: typing.Union[QtCore.Qt.DropActions, QtCore.Qt.DropAction], defaultDropAction: QtCore.Qt.DropAction) -> QtCore.Qt.DropAction: ... - - -class QInputEvent(QtCore.QEvent): - - def setTimestamp(self, atimestamp: int) -> None: ... - def timestamp(self) -> int: ... - def modifiers(self) -> QtCore.Qt.KeyboardModifiers: ... - - -class QMouseEvent(QInputEvent): - - @typing.overload - def __init__(self, type: QtCore.QEvent.Type, pos: typing.Union[QtCore.QPointF, QtCore.QPoint], button: QtCore.Qt.MouseButton, buttons: typing.Union[QtCore.Qt.MouseButtons, QtCore.Qt.MouseButton], modifiers: typing.Union[QtCore.Qt.KeyboardModifiers, QtCore.Qt.KeyboardModifier]) -> None: ... - @typing.overload - def __init__(self, type: QtCore.QEvent.Type, pos: typing.Union[QtCore.QPointF, QtCore.QPoint], globalPos: typing.Union[QtCore.QPointF, QtCore.QPoint], button: QtCore.Qt.MouseButton, buttons: typing.Union[QtCore.Qt.MouseButtons, QtCore.Qt.MouseButton], modifiers: typing.Union[QtCore.Qt.KeyboardModifiers, QtCore.Qt.KeyboardModifier]) -> None: ... - @typing.overload - def __init__(self, type: QtCore.QEvent.Type, pos: typing.Union[QtCore.QPointF, QtCore.QPoint], windowPos: typing.Union[QtCore.QPointF, QtCore.QPoint], globalPos: typing.Union[QtCore.QPointF, QtCore.QPoint], button: QtCore.Qt.MouseButton, buttons: typing.Union[QtCore.Qt.MouseButtons, QtCore.Qt.MouseButton], modifiers: typing.Union[QtCore.Qt.KeyboardModifiers, QtCore.Qt.KeyboardModifier]) -> None: ... - @typing.overload - def __init__(self, type: QtCore.QEvent.Type, localPos: typing.Union[QtCore.QPointF, QtCore.QPoint], windowPos: typing.Union[QtCore.QPointF, QtCore.QPoint], screenPos: typing.Union[QtCore.QPointF, QtCore.QPoint], button: QtCore.Qt.MouseButton, buttons: typing.Union[QtCore.Qt.MouseButtons, QtCore.Qt.MouseButton], modifiers: typing.Union[QtCore.Qt.KeyboardModifiers, QtCore.Qt.KeyboardModifier], source: QtCore.Qt.MouseEventSource) -> None: ... - @typing.overload - def __init__(self, a0: 'QMouseEvent') -> None: ... - - def flags(self) -> QtCore.Qt.MouseEventFlags: ... - def source(self) -> QtCore.Qt.MouseEventSource: ... - def screenPos(self) -> QtCore.QPointF: ... - def windowPos(self) -> QtCore.QPointF: ... - def localPos(self) -> QtCore.QPointF: ... - def buttons(self) -> QtCore.Qt.MouseButtons: ... - def button(self) -> QtCore.Qt.MouseButton: ... - def globalY(self) -> int: ... - def globalX(self) -> int: ... - def y(self) -> int: ... - def x(self) -> int: ... - def globalPos(self) -> QtCore.QPoint: ... - def pos(self) -> QtCore.QPoint: ... - - -class QHoverEvent(QInputEvent): - - @typing.overload - def __init__(self, type: QtCore.QEvent.Type, pos: typing.Union[QtCore.QPointF, QtCore.QPoint], oldPos: typing.Union[QtCore.QPointF, QtCore.QPoint], modifiers: typing.Union[QtCore.Qt.KeyboardModifiers, QtCore.Qt.KeyboardModifier] = ...) -> None: ... - @typing.overload - def __init__(self, a0: 'QHoverEvent') -> None: ... - - def oldPosF(self) -> QtCore.QPointF: ... - def posF(self) -> QtCore.QPointF: ... - def oldPos(self) -> QtCore.QPoint: ... - def pos(self) -> QtCore.QPoint: ... - - -class QWheelEvent(QInputEvent): - - @typing.overload - def __init__(self, pos: typing.Union[QtCore.QPointF, QtCore.QPoint], globalPos: typing.Union[QtCore.QPointF, QtCore.QPoint], pixelDelta: QtCore.QPoint, angleDelta: QtCore.QPoint, qt4Delta: int, qt4Orientation: QtCore.Qt.Orientation, buttons: typing.Union[QtCore.Qt.MouseButtons, QtCore.Qt.MouseButton], modifiers: typing.Union[QtCore.Qt.KeyboardModifiers, QtCore.Qt.KeyboardModifier]) -> None: ... - @typing.overload - def __init__(self, pos: typing.Union[QtCore.QPointF, QtCore.QPoint], globalPos: typing.Union[QtCore.QPointF, QtCore.QPoint], pixelDelta: QtCore.QPoint, angleDelta: QtCore.QPoint, qt4Delta: int, qt4Orientation: QtCore.Qt.Orientation, buttons: typing.Union[QtCore.Qt.MouseButtons, QtCore.Qt.MouseButton], modifiers: typing.Union[QtCore.Qt.KeyboardModifiers, QtCore.Qt.KeyboardModifier], phase: QtCore.Qt.ScrollPhase) -> None: ... - @typing.overload - def __init__(self, pos: typing.Union[QtCore.QPointF, QtCore.QPoint], globalPos: typing.Union[QtCore.QPointF, QtCore.QPoint], pixelDelta: QtCore.QPoint, angleDelta: QtCore.QPoint, qt4Delta: int, qt4Orientation: QtCore.Qt.Orientation, buttons: typing.Union[QtCore.Qt.MouseButtons, QtCore.Qt.MouseButton], modifiers: typing.Union[QtCore.Qt.KeyboardModifiers, QtCore.Qt.KeyboardModifier], phase: QtCore.Qt.ScrollPhase, source: QtCore.Qt.MouseEventSource) -> None: ... - @typing.overload - def __init__(self, pos: typing.Union[QtCore.QPointF, QtCore.QPoint], globalPos: typing.Union[QtCore.QPointF, QtCore.QPoint], pixelDelta: QtCore.QPoint, angleDelta: QtCore.QPoint, qt4Delta: int, qt4Orientation: QtCore.Qt.Orientation, buttons: typing.Union[QtCore.Qt.MouseButtons, QtCore.Qt.MouseButton], modifiers: typing.Union[QtCore.Qt.KeyboardModifiers, QtCore.Qt.KeyboardModifier], phase: QtCore.Qt.ScrollPhase, source: QtCore.Qt.MouseEventSource, inverted: bool) -> None: ... - @typing.overload - def __init__(self, a0: 'QWheelEvent') -> None: ... - - def inverted(self) -> bool: ... - def source(self) -> QtCore.Qt.MouseEventSource: ... - def phase(self) -> QtCore.Qt.ScrollPhase: ... - def globalPosF(self) -> QtCore.QPointF: ... - def posF(self) -> QtCore.QPointF: ... - def angleDelta(self) -> QtCore.QPoint: ... - def pixelDelta(self) -> QtCore.QPoint: ... - def buttons(self) -> QtCore.Qt.MouseButtons: ... - def globalY(self) -> int: ... - def globalX(self) -> int: ... - def y(self) -> int: ... - def x(self) -> int: ... - def globalPos(self) -> QtCore.QPoint: ... - def pos(self) -> QtCore.QPoint: ... - - -class QTabletEvent(QInputEvent): - - class PointerType(int): ... - UnknownPointer = ... # type: 'QTabletEvent.PointerType' - Pen = ... # type: 'QTabletEvent.PointerType' - Cursor = ... # type: 'QTabletEvent.PointerType' - Eraser = ... # type: 'QTabletEvent.PointerType' - - class TabletDevice(int): ... - NoDevice = ... # type: 'QTabletEvent.TabletDevice' - Puck = ... # type: 'QTabletEvent.TabletDevice' - Stylus = ... # type: 'QTabletEvent.TabletDevice' - Airbrush = ... # type: 'QTabletEvent.TabletDevice' - FourDMouse = ... # type: 'QTabletEvent.TabletDevice' - XFreeEraser = ... # type: 'QTabletEvent.TabletDevice' - RotationStylus = ... # type: 'QTabletEvent.TabletDevice' - - @typing.overload - def __init__(self, t: QtCore.QEvent.Type, pos: typing.Union[QtCore.QPointF, QtCore.QPoint], globalPos: typing.Union[QtCore.QPointF, QtCore.QPoint], device: int, pointerType: int, pressure: float, xTilt: int, yTilt: int, tangentialPressure: float, rotation: float, z: int, keyState: typing.Union[QtCore.Qt.KeyboardModifiers, QtCore.Qt.KeyboardModifier], uniqueID: int, button: QtCore.Qt.MouseButton, buttons: typing.Union[QtCore.Qt.MouseButtons, QtCore.Qt.MouseButton]) -> None: ... - @typing.overload - def __init__(self, t: QtCore.QEvent.Type, pos: typing.Union[QtCore.QPointF, QtCore.QPoint], globalPos: typing.Union[QtCore.QPointF, QtCore.QPoint], device: int, pointerType: int, pressure: float, xTilt: int, yTilt: int, tangentialPressure: float, rotation: float, z: int, keyState: typing.Union[QtCore.Qt.KeyboardModifiers, QtCore.Qt.KeyboardModifier], uniqueID: int) -> None: ... - @typing.overload - def __init__(self, a0: 'QTabletEvent') -> None: ... - - def buttons(self) -> QtCore.Qt.MouseButtons: ... - def button(self) -> QtCore.Qt.MouseButton: ... - def globalPosF(self) -> QtCore.QPointF: ... - def posF(self) -> QtCore.QPointF: ... - def yTilt(self) -> int: ... - def xTilt(self) -> int: ... - def rotation(self) -> float: ... - def tangentialPressure(self) -> float: ... - def z(self) -> int: ... - def pressure(self) -> float: ... - def uniqueId(self) -> int: ... - def pointerType(self) -> 'QTabletEvent.PointerType': ... - def device(self) -> 'QTabletEvent.TabletDevice': ... - def hiResGlobalY(self) -> float: ... - def hiResGlobalX(self) -> float: ... - def globalY(self) -> int: ... - def globalX(self) -> int: ... - def y(self) -> int: ... - def x(self) -> int: ... - def globalPos(self) -> QtCore.QPoint: ... - def pos(self) -> QtCore.QPoint: ... - - -class QKeyEvent(QInputEvent): - - @typing.overload - def __init__(self, type: QtCore.QEvent.Type, key: int, modifiers: typing.Union[QtCore.Qt.KeyboardModifiers, QtCore.Qt.KeyboardModifier], nativeScanCode: int, nativeVirtualKey: int, nativeModifiers: int, text: str = ..., autorep: bool = ..., count: int = ...) -> None: ... - @typing.overload - def __init__(self, type: QtCore.QEvent.Type, key: int, modifiers: typing.Union[QtCore.Qt.KeyboardModifiers, QtCore.Qt.KeyboardModifier], text: str = ..., autorep: bool = ..., count: int = ...) -> None: ... - @typing.overload - def __init__(self, a0: 'QKeyEvent') -> None: ... - - def nativeVirtualKey(self) -> int: ... - def nativeScanCode(self) -> int: ... - def nativeModifiers(self) -> int: ... - def matches(self, key: 'QKeySequence.StandardKey') -> bool: ... - def __len__(self) -> int: ... - def count(self) -> int: ... - def isAutoRepeat(self) -> bool: ... - def text(self) -> str: ... - def modifiers(self) -> QtCore.Qt.KeyboardModifiers: ... - def key(self) -> int: ... - - -class QFocusEvent(QtCore.QEvent): - - @typing.overload - def __init__(self, type: QtCore.QEvent.Type, reason: QtCore.Qt.FocusReason = ...) -> None: ... - @typing.overload - def __init__(self, a0: 'QFocusEvent') -> None: ... - - def reason(self) -> QtCore.Qt.FocusReason: ... - def lostFocus(self) -> bool: ... - def gotFocus(self) -> bool: ... - - -class QPaintEvent(QtCore.QEvent): - - @typing.overload - def __init__(self, paintRegion: 'QRegion') -> None: ... - @typing.overload - def __init__(self, paintRect: QtCore.QRect) -> None: ... - @typing.overload - def __init__(self, a0: 'QPaintEvent') -> None: ... - - def region(self) -> 'QRegion': ... - def rect(self) -> QtCore.QRect: ... - - -class QMoveEvent(QtCore.QEvent): - - @typing.overload - def __init__(self, pos: QtCore.QPoint, oldPos: QtCore.QPoint) -> None: ... - @typing.overload - def __init__(self, a0: 'QMoveEvent') -> None: ... - - def oldPos(self) -> QtCore.QPoint: ... - def pos(self) -> QtCore.QPoint: ... - - -class QResizeEvent(QtCore.QEvent): - - @typing.overload - def __init__(self, size: QtCore.QSize, oldSize: QtCore.QSize) -> None: ... - @typing.overload - def __init__(self, a0: 'QResizeEvent') -> None: ... - - def oldSize(self) -> QtCore.QSize: ... - def size(self) -> QtCore.QSize: ... - - -class QCloseEvent(QtCore.QEvent): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QCloseEvent') -> None: ... - - -class QIconDragEvent(QtCore.QEvent): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QIconDragEvent') -> None: ... - - -class QShowEvent(QtCore.QEvent): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QShowEvent') -> None: ... - - -class QHideEvent(QtCore.QEvent): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QHideEvent') -> None: ... - - -class QContextMenuEvent(QInputEvent): - - class Reason(int): ... - Mouse = ... # type: 'QContextMenuEvent.Reason' - Keyboard = ... # type: 'QContextMenuEvent.Reason' - Other = ... # type: 'QContextMenuEvent.Reason' - - @typing.overload - def __init__(self, reason: 'QContextMenuEvent.Reason', pos: QtCore.QPoint, globalPos: QtCore.QPoint, modifiers: typing.Union[QtCore.Qt.KeyboardModifiers, QtCore.Qt.KeyboardModifier]) -> None: ... - @typing.overload - def __init__(self, reason: 'QContextMenuEvent.Reason', pos: QtCore.QPoint, globalPos: QtCore.QPoint) -> None: ... - @typing.overload - def __init__(self, reason: 'QContextMenuEvent.Reason', pos: QtCore.QPoint) -> None: ... - @typing.overload - def __init__(self, a0: 'QContextMenuEvent') -> None: ... - - def reason(self) -> 'QContextMenuEvent.Reason': ... - def globalPos(self) -> QtCore.QPoint: ... - def pos(self) -> QtCore.QPoint: ... - def globalY(self) -> int: ... - def globalX(self) -> int: ... - def y(self) -> int: ... - def x(self) -> int: ... - - -class QInputMethodEvent(QtCore.QEvent): - - class AttributeType(int): ... - TextFormat = ... # type: 'QInputMethodEvent.AttributeType' - Cursor = ... # type: 'QInputMethodEvent.AttributeType' - Language = ... # type: 'QInputMethodEvent.AttributeType' - Ruby = ... # type: 'QInputMethodEvent.AttributeType' - Selection = ... # type: 'QInputMethodEvent.AttributeType' - - class Attribute(sip.simplewrapper): - - length = ... # type: int - start = ... # type: int - type = ... # type: 'QInputMethodEvent.AttributeType' - value = ... # type: typing.Any - - @typing.overload - def __init__(self, t: 'QInputMethodEvent.AttributeType', s: int, l: int, val: typing.Any) -> None: ... - @typing.overload - def __init__(self, a0: 'QInputMethodEvent.Attribute') -> None: ... - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, preeditText: str, attributes: typing.Any) -> None: ... - @typing.overload - def __init__(self, other: 'QInputMethodEvent') -> None: ... - - def replacementLength(self) -> int: ... - def replacementStart(self) -> int: ... - def commitString(self) -> str: ... - def preeditString(self) -> str: ... - def attributes(self) -> typing.List['QInputMethodEvent.Attribute']: ... - def setCommitString(self, commitString: str, from_: int = ..., length: int = ...) -> None: ... - - -class QInputMethodQueryEvent(QtCore.QEvent): - - @typing.overload - def __init__(self, queries: typing.Union[QtCore.Qt.InputMethodQueries, QtCore.Qt.InputMethodQuery]) -> None: ... - @typing.overload - def __init__(self, a0: 'QInputMethodQueryEvent') -> None: ... - - def value(self, query: QtCore.Qt.InputMethodQuery) -> typing.Any: ... - def setValue(self, query: QtCore.Qt.InputMethodQuery, value: typing.Any) -> None: ... - def queries(self) -> QtCore.Qt.InputMethodQueries: ... - - -class QDropEvent(QtCore.QEvent): - - @typing.overload - def __init__(self, pos: typing.Union[QtCore.QPointF, QtCore.QPoint], actions: typing.Union[QtCore.Qt.DropActions, QtCore.Qt.DropAction], data: QtCore.QMimeData, buttons: typing.Union[QtCore.Qt.MouseButtons, QtCore.Qt.MouseButton], modifiers: typing.Union[QtCore.Qt.KeyboardModifiers, QtCore.Qt.KeyboardModifier], type: QtCore.QEvent.Type = ...) -> None: ... - @typing.overload - def __init__(self, a0: 'QDropEvent') -> None: ... - - def mimeData(self) -> QtCore.QMimeData: ... - def source(self) -> QtCore.QObject: ... - def setDropAction(self, action: QtCore.Qt.DropAction) -> None: ... - def dropAction(self) -> QtCore.Qt.DropAction: ... - def acceptProposedAction(self) -> None: ... - def proposedAction(self) -> QtCore.Qt.DropAction: ... - def possibleActions(self) -> QtCore.Qt.DropActions: ... - def keyboardModifiers(self) -> QtCore.Qt.KeyboardModifiers: ... - def mouseButtons(self) -> QtCore.Qt.MouseButtons: ... - def posF(self) -> QtCore.QPointF: ... - def pos(self) -> QtCore.QPoint: ... - - -class QDragMoveEvent(QDropEvent): - - @typing.overload - def __init__(self, pos: QtCore.QPoint, actions: typing.Union[QtCore.Qt.DropActions, QtCore.Qt.DropAction], data: QtCore.QMimeData, buttons: typing.Union[QtCore.Qt.MouseButtons, QtCore.Qt.MouseButton], modifiers: typing.Union[QtCore.Qt.KeyboardModifiers, QtCore.Qt.KeyboardModifier], type: QtCore.QEvent.Type = ...) -> None: ... - @typing.overload - def __init__(self, a0: 'QDragMoveEvent') -> None: ... - - @typing.overload - def ignore(self) -> None: ... - @typing.overload - def ignore(self, r: QtCore.QRect) -> None: ... - @typing.overload - def accept(self) -> None: ... - @typing.overload - def accept(self, r: QtCore.QRect) -> None: ... - def answerRect(self) -> QtCore.QRect: ... - - -class QDragEnterEvent(QDragMoveEvent): - - @typing.overload - def __init__(self, pos: QtCore.QPoint, actions: typing.Union[QtCore.Qt.DropActions, QtCore.Qt.DropAction], data: QtCore.QMimeData, buttons: typing.Union[QtCore.Qt.MouseButtons, QtCore.Qt.MouseButton], modifiers: typing.Union[QtCore.Qt.KeyboardModifiers, QtCore.Qt.KeyboardModifier]) -> None: ... - @typing.overload - def __init__(self, a0: 'QDragEnterEvent') -> None: ... - - -class QDragLeaveEvent(QtCore.QEvent): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QDragLeaveEvent') -> None: ... - - -class QHelpEvent(QtCore.QEvent): - - @typing.overload - def __init__(self, type: QtCore.QEvent.Type, pos: QtCore.QPoint, globalPos: QtCore.QPoint) -> None: ... - @typing.overload - def __init__(self, a0: 'QHelpEvent') -> None: ... - - def globalPos(self) -> QtCore.QPoint: ... - def pos(self) -> QtCore.QPoint: ... - def globalY(self) -> int: ... - def globalX(self) -> int: ... - def y(self) -> int: ... - def x(self) -> int: ... - - -class QStatusTipEvent(QtCore.QEvent): - - @typing.overload - def __init__(self, tip: str) -> None: ... - @typing.overload - def __init__(self, a0: 'QStatusTipEvent') -> None: ... - - def tip(self) -> str: ... - - -class QWhatsThisClickedEvent(QtCore.QEvent): - - @typing.overload - def __init__(self, href: str) -> None: ... - @typing.overload - def __init__(self, a0: 'QWhatsThisClickedEvent') -> None: ... - - def href(self) -> str: ... - - -class QActionEvent(QtCore.QEvent): - - from PyQt5.QtWidgets import QAction - - @typing.overload - def __init__(self, type: int, action: QAction, before: typing.Optional[QAction] = ...) -> None: ... - @typing.overload - def __init__(self, a0: 'QActionEvent') -> None: ... - - def before(self) -> QAction: ... - def action(self) -> QAction: ... - - -class QFileOpenEvent(QtCore.QEvent): - - def openFile(self, file: QtCore.QFile, flags: typing.Union[QtCore.QIODevice.OpenMode, QtCore.QIODevice.OpenModeFlag]) -> bool: ... - def url(self) -> QtCore.QUrl: ... - def file(self) -> str: ... - - -class QShortcutEvent(QtCore.QEvent): - - @typing.overload - def __init__(self, key: typing.Union['QKeySequence', 'QKeySequence.StandardKey', str, int], id: int, ambiguous: bool = ...) -> None: ... - @typing.overload - def __init__(self, a0: 'QShortcutEvent') -> None: ... - - def shortcutId(self) -> int: ... - def key(self) -> 'QKeySequence': ... - def isAmbiguous(self) -> bool: ... - - -class QWindowStateChangeEvent(QtCore.QEvent): - - def oldState(self) -> QtCore.Qt.WindowStates: ... - - -class QTouchEvent(QInputEvent): - - class TouchPoint(sip.simplewrapper): - - class InfoFlag(int): ... - Pen = ... # type: 'QTouchEvent.TouchPoint.InfoFlag' - - class InfoFlags(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QTouchEvent.TouchPoint.InfoFlags', 'QTouchEvent.TouchPoint.InfoFlag']) -> None: ... - @typing.overload - def __init__(self, a0: 'QTouchEvent.TouchPoint.InfoFlags') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QTouchEvent.TouchPoint.InfoFlags': ... - def __int__(self) -> int: ... - - def rawScreenPositions(self) -> typing.List[QtCore.QPointF]: ... - def flags(self) -> 'QTouchEvent.TouchPoint.InfoFlags': ... - def velocity(self) -> 'QVector2D': ... - def pressure(self) -> float: ... - def screenRect(self) -> QtCore.QRectF: ... - def sceneRect(self) -> QtCore.QRectF: ... - def rect(self) -> QtCore.QRectF: ... - def lastNormalizedPos(self) -> QtCore.QPointF: ... - def startNormalizedPos(self) -> QtCore.QPointF: ... - def normalizedPos(self) -> QtCore.QPointF: ... - def lastScreenPos(self) -> QtCore.QPointF: ... - def startScreenPos(self) -> QtCore.QPointF: ... - def screenPos(self) -> QtCore.QPointF: ... - def lastScenePos(self) -> QtCore.QPointF: ... - def startScenePos(self) -> QtCore.QPointF: ... - def scenePos(self) -> QtCore.QPointF: ... - def lastPos(self) -> QtCore.QPointF: ... - def startPos(self) -> QtCore.QPointF: ... - def pos(self) -> QtCore.QPointF: ... - def state(self) -> QtCore.Qt.TouchPointState: ... - def id(self) -> int: ... - - @typing.overload - def __init__(self, eventType: QtCore.QEvent.Type, device: typing.Optional['QTouchDevice'] = ..., modifiers: typing.Union[QtCore.Qt.KeyboardModifiers, QtCore.Qt.KeyboardModifier] = ..., touchPointStates: typing.Union[QtCore.Qt.TouchPointStates, QtCore.Qt.TouchPointState] = ..., touchPoints: typing.Any = ...) -> None: ... - @typing.overload - def __init__(self, a0: 'QTouchEvent') -> None: ... - - def setDevice(self, adevice: 'QTouchDevice') -> None: ... - def device(self) -> 'QTouchDevice': ... - def window(self) -> 'QWindow': ... - def touchPoints(self) -> typing.List['QTouchEvent.TouchPoint']: ... - def touchPointStates(self) -> QtCore.Qt.TouchPointStates: ... - def target(self) -> QtCore.QObject: ... - - -class QExposeEvent(QtCore.QEvent): - - @typing.overload - def __init__(self, rgn: 'QRegion') -> None: ... - @typing.overload - def __init__(self, a0: 'QExposeEvent') -> None: ... - - def region(self) -> 'QRegion': ... - - -class QScrollPrepareEvent(QtCore.QEvent): - - @typing.overload - def __init__(self, startPos: typing.Union[QtCore.QPointF, QtCore.QPoint]) -> None: ... - @typing.overload - def __init__(self, a0: 'QScrollPrepareEvent') -> None: ... - - def setContentPos(self, pos: typing.Union[QtCore.QPointF, QtCore.QPoint]) -> None: ... - def setContentPosRange(self, rect: QtCore.QRectF) -> None: ... - def setViewportSize(self, size: QtCore.QSizeF) -> None: ... - def contentPos(self) -> QtCore.QPointF: ... - def contentPosRange(self) -> QtCore.QRectF: ... - def viewportSize(self) -> QtCore.QSizeF: ... - def startPos(self) -> QtCore.QPointF: ... - - -class QScrollEvent(QtCore.QEvent): - - class ScrollState(int): ... - ScrollStarted = ... # type: 'QScrollEvent.ScrollState' - ScrollUpdated = ... # type: 'QScrollEvent.ScrollState' - ScrollFinished = ... # type: 'QScrollEvent.ScrollState' - - @typing.overload - def __init__(self, contentPos: typing.Union[QtCore.QPointF, QtCore.QPoint], overshoot: typing.Union[QtCore.QPointF, QtCore.QPoint], scrollState: 'QScrollEvent.ScrollState') -> None: ... - @typing.overload - def __init__(self, a0: 'QScrollEvent') -> None: ... - - def scrollState(self) -> 'QScrollEvent.ScrollState': ... - def overshootDistance(self) -> QtCore.QPointF: ... - def contentPos(self) -> QtCore.QPointF: ... - - -class QEnterEvent(QtCore.QEvent): - - @typing.overload - def __init__(self, localPos: typing.Union[QtCore.QPointF, QtCore.QPoint], windowPos: typing.Union[QtCore.QPointF, QtCore.QPoint], screenPos: typing.Union[QtCore.QPointF, QtCore.QPoint]) -> None: ... - @typing.overload - def __init__(self, a0: 'QEnterEvent') -> None: ... - - def screenPos(self) -> QtCore.QPointF: ... - def windowPos(self) -> QtCore.QPointF: ... - def localPos(self) -> QtCore.QPointF: ... - def globalY(self) -> int: ... - def globalX(self) -> int: ... - def y(self) -> int: ... - def x(self) -> int: ... - def globalPos(self) -> QtCore.QPoint: ... - def pos(self) -> QtCore.QPoint: ... - - -class QNativeGestureEvent(QInputEvent): - - @typing.overload - def __init__(self, type: QtCore.Qt.NativeGestureType, localPos: typing.Union[QtCore.QPointF, QtCore.QPoint], windowPos: typing.Union[QtCore.QPointF, QtCore.QPoint], screenPos: typing.Union[QtCore.QPointF, QtCore.QPoint], value: float, sequenceId: int, intArgument: int) -> None: ... - @typing.overload - def __init__(self, a0: 'QNativeGestureEvent') -> None: ... - - def screenPos(self) -> QtCore.QPointF: ... - def windowPos(self) -> QtCore.QPointF: ... - def localPos(self) -> QtCore.QPointF: ... - def globalPos(self) -> QtCore.QPoint: ... - def pos(self) -> QtCore.QPoint: ... - def value(self) -> float: ... - def gestureType(self) -> QtCore.Qt.NativeGestureType: ... - - -class QPlatformSurfaceEvent(QtCore.QEvent): - - class SurfaceEventType(int): ... - SurfaceCreated = ... # type: 'QPlatformSurfaceEvent.SurfaceEventType' - SurfaceAboutToBeDestroyed = ... # type: 'QPlatformSurfaceEvent.SurfaceEventType' - - @typing.overload - def __init__(self, surfaceEventType: 'QPlatformSurfaceEvent.SurfaceEventType') -> None: ... - @typing.overload - def __init__(self, a0: 'QPlatformSurfaceEvent') -> None: ... - - def surfaceEventType(self) -> 'QPlatformSurfaceEvent.SurfaceEventType': ... - - -class QFont(sip.simplewrapper): - - class HintingPreference(int): ... - PreferDefaultHinting = ... # type: 'QFont.HintingPreference' - PreferNoHinting = ... # type: 'QFont.HintingPreference' - PreferVerticalHinting = ... # type: 'QFont.HintingPreference' - PreferFullHinting = ... # type: 'QFont.HintingPreference' - - class SpacingType(int): ... - PercentageSpacing = ... # type: 'QFont.SpacingType' - AbsoluteSpacing = ... # type: 'QFont.SpacingType' - - class Capitalization(int): ... - MixedCase = ... # type: 'QFont.Capitalization' - AllUppercase = ... # type: 'QFont.Capitalization' - AllLowercase = ... # type: 'QFont.Capitalization' - SmallCaps = ... # type: 'QFont.Capitalization' - Capitalize = ... # type: 'QFont.Capitalization' - - class Stretch(int): ... - UltraCondensed = ... # type: 'QFont.Stretch' - ExtraCondensed = ... # type: 'QFont.Stretch' - Condensed = ... # type: 'QFont.Stretch' - SemiCondensed = ... # type: 'QFont.Stretch' - Unstretched = ... # type: 'QFont.Stretch' - SemiExpanded = ... # type: 'QFont.Stretch' - Expanded = ... # type: 'QFont.Stretch' - ExtraExpanded = ... # type: 'QFont.Stretch' - UltraExpanded = ... # type: 'QFont.Stretch' - - class Style(int): ... - StyleNormal = ... # type: 'QFont.Style' - StyleItalic = ... # type: 'QFont.Style' - StyleOblique = ... # type: 'QFont.Style' - - class Weight(int): ... - Thin = ... # type: 'QFont.Weight' - ExtraLight = ... # type: 'QFont.Weight' - Light = ... # type: 'QFont.Weight' - Normal = ... # type: 'QFont.Weight' - Medium = ... # type: 'QFont.Weight' - DemiBold = ... # type: 'QFont.Weight' - Bold = ... # type: 'QFont.Weight' - ExtraBold = ... # type: 'QFont.Weight' - Black = ... # type: 'QFont.Weight' - - class StyleStrategy(int): ... - PreferDefault = ... # type: 'QFont.StyleStrategy' - PreferBitmap = ... # type: 'QFont.StyleStrategy' - PreferDevice = ... # type: 'QFont.StyleStrategy' - PreferOutline = ... # type: 'QFont.StyleStrategy' - ForceOutline = ... # type: 'QFont.StyleStrategy' - PreferMatch = ... # type: 'QFont.StyleStrategy' - PreferQuality = ... # type: 'QFont.StyleStrategy' - PreferAntialias = ... # type: 'QFont.StyleStrategy' - NoAntialias = ... # type: 'QFont.StyleStrategy' - NoSubpixelAntialias = ... # type: 'QFont.StyleStrategy' - OpenGLCompatible = ... # type: 'QFont.StyleStrategy' - NoFontMerging = ... # type: 'QFont.StyleStrategy' - ForceIntegerMetrics = ... # type: 'QFont.StyleStrategy' - - class StyleHint(int): ... - Helvetica = ... # type: 'QFont.StyleHint' - SansSerif = ... # type: 'QFont.StyleHint' - Times = ... # type: 'QFont.StyleHint' - Serif = ... # type: 'QFont.StyleHint' - Courier = ... # type: 'QFont.StyleHint' - TypeWriter = ... # type: 'QFont.StyleHint' - OldEnglish = ... # type: 'QFont.StyleHint' - Decorative = ... # type: 'QFont.StyleHint' - System = ... # type: 'QFont.StyleHint' - AnyStyle = ... # type: 'QFont.StyleHint' - Cursive = ... # type: 'QFont.StyleHint' - Monospace = ... # type: 'QFont.StyleHint' - Fantasy = ... # type: 'QFont.StyleHint' - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, family: str, pointSize: int = ..., weight: int = ..., italic: bool = ...) -> None: ... - @typing.overload - def __init__(self, a0: 'QFont', pd: QPaintDevice) -> None: ... - @typing.overload - def __init__(self, a0: 'QFont') -> None: ... - @typing.overload - def __init__(self, variant: typing.Any) -> None: ... - - def __hash__(self) -> int: ... - def swap(self, other: 'QFont') -> None: ... - def hintingPreference(self) -> 'QFont.HintingPreference': ... - def setHintingPreference(self, hintingPreference: 'QFont.HintingPreference') -> None: ... - def setStyleName(self, styleName: str) -> None: ... - def styleName(self) -> str: ... - def capitalization(self) -> 'QFont.Capitalization': ... - def setCapitalization(self, a0: 'QFont.Capitalization') -> None: ... - def setWordSpacing(self, spacing: float) -> None: ... - def wordSpacing(self) -> float: ... - def setLetterSpacing(self, type: 'QFont.SpacingType', spacing: float) -> None: ... - def letterSpacingType(self) -> 'QFont.SpacingType': ... - def letterSpacing(self) -> float: ... - def setItalic(self, b: bool) -> None: ... - def italic(self) -> bool: ... - def setBold(self, enable: bool) -> None: ... - def bold(self) -> bool: ... - def resolve(self, a0: 'QFont') -> 'QFont': ... - def lastResortFont(self) -> str: ... - def lastResortFamily(self) -> str: ... - def defaultFamily(self) -> str: ... - @staticmethod - def cacheStatistics() -> None: ... - @staticmethod - def cleanup() -> None: ... - @staticmethod - def initialize() -> None: ... - @staticmethod - def removeSubstitutions(a0: str) -> None: ... - @staticmethod - def insertSubstitutions(a0: str, a1: typing.Iterable[str]) -> None: ... - @staticmethod - def insertSubstitution(a0: str, a1: str) -> None: ... - @staticmethod - def substitutions() -> typing.List[str]: ... - @staticmethod - def substitutes(a0: str) -> typing.List[str]: ... - @staticmethod - def substitute(a0: str) -> str: ... - def fromString(self, a0: str) -> bool: ... - def toString(self) -> str: ... - def key(self) -> str: ... - def rawName(self) -> str: ... - def setRawName(self, a0: str) -> None: ... - def isCopyOf(self, a0: 'QFont') -> bool: ... - def exactMatch(self) -> bool: ... - def setRawMode(self, a0: bool) -> None: ... - def rawMode(self) -> bool: ... - def setStretch(self, a0: int) -> None: ... - def stretch(self) -> int: ... - def setStyleStrategy(self, s: 'QFont.StyleStrategy') -> None: ... - def setStyleHint(self, hint: 'QFont.StyleHint', strategy: 'QFont.StyleStrategy' = ...) -> None: ... - def styleStrategy(self) -> 'QFont.StyleStrategy': ... - def styleHint(self) -> 'QFont.StyleHint': ... - def setKerning(self, a0: bool) -> None: ... - def kerning(self) -> bool: ... - def setFixedPitch(self, a0: bool) -> None: ... - def fixedPitch(self) -> bool: ... - def setStrikeOut(self, a0: bool) -> None: ... - def strikeOut(self) -> bool: ... - def setOverline(self, a0: bool) -> None: ... - def overline(self) -> bool: ... - def setUnderline(self, a0: bool) -> None: ... - def underline(self) -> bool: ... - def style(self) -> 'QFont.Style': ... - def setStyle(self, style: 'QFont.Style') -> None: ... - def setWeight(self, a0: int) -> None: ... - def weight(self) -> int: ... - def setPixelSize(self, a0: int) -> None: ... - def pixelSize(self) -> int: ... - def setPointSizeF(self, a0: float) -> None: ... - def pointSizeF(self) -> float: ... - def setPointSize(self, a0: int) -> None: ... - def pointSize(self) -> int: ... - def setFamily(self, a0: str) -> None: ... - def family(self) -> str: ... - - -class QFontDatabase(sip.simplewrapper): - - class SystemFont(int): ... - GeneralFont = ... # type: 'QFontDatabase.SystemFont' - FixedFont = ... # type: 'QFontDatabase.SystemFont' - TitleFont = ... # type: 'QFontDatabase.SystemFont' - SmallestReadableFont = ... # type: 'QFontDatabase.SystemFont' - - class WritingSystem(int): ... - Any = ... # type: 'QFontDatabase.WritingSystem' - Latin = ... # type: 'QFontDatabase.WritingSystem' - Greek = ... # type: 'QFontDatabase.WritingSystem' - Cyrillic = ... # type: 'QFontDatabase.WritingSystem' - Armenian = ... # type: 'QFontDatabase.WritingSystem' - Hebrew = ... # type: 'QFontDatabase.WritingSystem' - Arabic = ... # type: 'QFontDatabase.WritingSystem' - Syriac = ... # type: 'QFontDatabase.WritingSystem' - Thaana = ... # type: 'QFontDatabase.WritingSystem' - Devanagari = ... # type: 'QFontDatabase.WritingSystem' - Bengali = ... # type: 'QFontDatabase.WritingSystem' - Gurmukhi = ... # type: 'QFontDatabase.WritingSystem' - Gujarati = ... # type: 'QFontDatabase.WritingSystem' - Oriya = ... # type: 'QFontDatabase.WritingSystem' - Tamil = ... # type: 'QFontDatabase.WritingSystem' - Telugu = ... # type: 'QFontDatabase.WritingSystem' - Kannada = ... # type: 'QFontDatabase.WritingSystem' - Malayalam = ... # type: 'QFontDatabase.WritingSystem' - Sinhala = ... # type: 'QFontDatabase.WritingSystem' - Thai = ... # type: 'QFontDatabase.WritingSystem' - Lao = ... # type: 'QFontDatabase.WritingSystem' - Tibetan = ... # type: 'QFontDatabase.WritingSystem' - Myanmar = ... # type: 'QFontDatabase.WritingSystem' - Georgian = ... # type: 'QFontDatabase.WritingSystem' - Khmer = ... # type: 'QFontDatabase.WritingSystem' - SimplifiedChinese = ... # type: 'QFontDatabase.WritingSystem' - TraditionalChinese = ... # type: 'QFontDatabase.WritingSystem' - Japanese = ... # type: 'QFontDatabase.WritingSystem' - Korean = ... # type: 'QFontDatabase.WritingSystem' - Vietnamese = ... # type: 'QFontDatabase.WritingSystem' - Other = ... # type: 'QFontDatabase.WritingSystem' - Symbol = ... # type: 'QFontDatabase.WritingSystem' - Ogham = ... # type: 'QFontDatabase.WritingSystem' - Runic = ... # type: 'QFontDatabase.WritingSystem' - Nko = ... # type: 'QFontDatabase.WritingSystem' - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QFontDatabase') -> None: ... - - def isPrivateFamily(self, family: str) -> bool: ... - @staticmethod - def systemFont(type: 'QFontDatabase.SystemFont') -> QFont: ... - @staticmethod - def supportsThreadedFontRendering() -> bool: ... - @staticmethod - def removeAllApplicationFonts() -> bool: ... - @staticmethod - def removeApplicationFont(id: int) -> bool: ... - @staticmethod - def applicationFontFamilies(id: int) -> typing.List[str]: ... - @staticmethod - def addApplicationFontFromData(fontData: typing.Union[QtCore.QByteArray, bytes, bytearray]) -> int: ... - @staticmethod - def addApplicationFont(fileName: str) -> int: ... - @staticmethod - def writingSystemSample(writingSystem: 'QFontDatabase.WritingSystem') -> str: ... - @staticmethod - def writingSystemName(writingSystem: 'QFontDatabase.WritingSystem') -> str: ... - def weight(self, family: str, style: str) -> int: ... - def bold(self, family: str, style: str) -> bool: ... - def italic(self, family: str, style: str) -> bool: ... - def isFixedPitch(self, family: str, style: str = ...) -> bool: ... - def isScalable(self, family: str, style: str = ...) -> bool: ... - def isSmoothlyScalable(self, family: str, style: str = ...) -> bool: ... - def isBitmapScalable(self, family: str, style: str = ...) -> bool: ... - def font(self, family: str, style: str, pointSize: int) -> QFont: ... - @typing.overload - def styleString(self, font: QFont) -> str: ... - @typing.overload - def styleString(self, fontInfo: 'QFontInfo') -> str: ... - def smoothSizes(self, family: str, style: str) -> typing.List[int]: ... - def pointSizes(self, family: str, style: str = ...) -> typing.List[int]: ... - def styles(self, family: str) -> typing.List[str]: ... - def families(self, writingSystem: 'QFontDatabase.WritingSystem' = ...) -> typing.List[str]: ... - @typing.overload - def writingSystems(self) -> typing.List['QFontDatabase.WritingSystem']: ... - @typing.overload - def writingSystems(self, family: str) -> typing.List['QFontDatabase.WritingSystem']: ... - @staticmethod - def standardSizes() -> typing.List[int]: ... - - -class QFontInfo(sip.simplewrapper): - - @typing.overload - def __init__(self, a0: QFont) -> None: ... - @typing.overload - def __init__(self, a0: 'QFontInfo') -> None: ... - - def swap(self, other: 'QFontInfo') -> None: ... - def styleName(self) -> str: ... - def exactMatch(self) -> bool: ... - def rawMode(self) -> bool: ... - def styleHint(self) -> QFont.StyleHint: ... - def fixedPitch(self) -> bool: ... - def bold(self) -> bool: ... - def weight(self) -> int: ... - def style(self) -> QFont.Style: ... - def italic(self) -> bool: ... - def pointSizeF(self) -> float: ... - def pointSize(self) -> int: ... - def pixelSize(self) -> int: ... - def family(self) -> str: ... - - -class QFontMetrics(sip.simplewrapper): - - @typing.overload - def __init__(self, a0: QFont) -> None: ... - @typing.overload - def __init__(self, a0: QFont, pd: QPaintDevice) -> None: ... - @typing.overload - def __init__(self, a0: 'QFontMetrics') -> None: ... - - def swap(self, other: 'QFontMetrics') -> None: ... - def inFontUcs4(self, character: int) -> bool: ... - def tightBoundingRect(self, text: str) -> QtCore.QRect: ... - def elidedText(self, text: str, mode: QtCore.Qt.TextElideMode, width: int, flags: int = ...) -> str: ... - def averageCharWidth(self) -> int: ... - def lineWidth(self) -> int: ... - def strikeOutPos(self) -> int: ... - def overlinePos(self) -> int: ... - def underlinePos(self) -> int: ... - def size(self, flags: int, text: str, tabStops: int = ..., tabArray: typing.Optional[typing.Optional[typing.List[int]]] = ...) -> QtCore.QSize: ... - @typing.overload - def boundingRect(self, text: str) -> QtCore.QRect: ... - @typing.overload - def boundingRect(self, rect: QtCore.QRect, flags: int, text: str, tabStops: int = ..., tabArray: typing.Optional[typing.Optional[typing.List[int]]] = ...) -> QtCore.QRect: ... - @typing.overload - def boundingRect(self, x: int, y: int, width: int, height: int, flags: int, text: str, tabStops: int = ..., tabArray: typing.Optional[typing.Optional[typing.List[int]]] = ...) -> QtCore.QRect: ... - def boundingRectChar(self, a0: str) -> QtCore.QRect: ... - def width(self, text: str, length: int = ...) -> int: ... - def widthChar(self, a0: str) -> int: ... - def rightBearing(self, a0: str) -> int: ... - def leftBearing(self, a0: str) -> int: ... - def inFont(self, a0: str) -> bool: ... - def xHeight(self) -> int: ... - def maxWidth(self) -> int: ... - def minRightBearing(self) -> int: ... - def minLeftBearing(self) -> int: ... - def lineSpacing(self) -> int: ... - def leading(self) -> int: ... - def height(self) -> int: ... - def descent(self) -> int: ... - def ascent(self) -> int: ... - - -class QFontMetricsF(sip.simplewrapper): - - @typing.overload - def __init__(self, a0: QFont) -> None: ... - @typing.overload - def __init__(self, a0: QFont, pd: QPaintDevice) -> None: ... - @typing.overload - def __init__(self, a0: QFontMetrics) -> None: ... - @typing.overload - def __init__(self, a0: 'QFontMetricsF') -> None: ... - - def swap(self, other: 'QFontMetricsF') -> None: ... - def inFontUcs4(self, character: int) -> bool: ... - def tightBoundingRect(self, text: str) -> QtCore.QRectF: ... - def elidedText(self, text: str, mode: QtCore.Qt.TextElideMode, width: float, flags: int = ...) -> str: ... - def averageCharWidth(self) -> float: ... - def lineWidth(self) -> float: ... - def strikeOutPos(self) -> float: ... - def overlinePos(self) -> float: ... - def underlinePos(self) -> float: ... - def size(self, flags: int, text: str, tabStops: int = ..., tabArray: typing.Optional[typing.Optional[typing.List[int]]] = ...) -> QtCore.QSizeF: ... - @typing.overload - def boundingRect(self, string: str) -> QtCore.QRectF: ... - @typing.overload - def boundingRect(self, rect: QtCore.QRectF, flags: int, text: str, tabStops: int = ..., tabArray: typing.Optional[typing.Optional[typing.List[int]]] = ...) -> QtCore.QRectF: ... - def boundingRectChar(self, a0: str) -> QtCore.QRectF: ... - def width(self, string: str) -> float: ... - def widthChar(self, a0: str) -> float: ... - def rightBearing(self, a0: str) -> float: ... - def leftBearing(self, a0: str) -> float: ... - def inFont(self, a0: str) -> bool: ... - def xHeight(self) -> float: ... - def maxWidth(self) -> float: ... - def minRightBearing(self) -> float: ... - def minLeftBearing(self) -> float: ... - def lineSpacing(self) -> float: ... - def leading(self) -> float: ... - def height(self) -> float: ... - def descent(self) -> float: ... - def ascent(self) -> float: ... - - -class QMatrix4x3(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, other: 'QMatrix4x3') -> None: ... - @typing.overload - def __init__(self, values: typing.Sequence[float]) -> None: ... - - def transposed(self) -> 'QMatrix3x4': ... - def fill(self, value: float) -> None: ... - def setToIdentity(self) -> None: ... - def isIdentity(self) -> bool: ... - def __setitem__(self, a0: typing.Any, a1: float) -> None: ... - def __getitem__(self, a0: typing.Any) -> typing.Any: ... - def copyDataTo(self) -> typing.List[float]: ... - def data(self) -> typing.List[float]: ... - def __repr__(self) -> str: ... - - -class QMatrix4x2(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, other: 'QMatrix4x2') -> None: ... - @typing.overload - def __init__(self, values: typing.Sequence[float]) -> None: ... - - def transposed(self) -> 'QMatrix2x4': ... - def fill(self, value: float) -> None: ... - def setToIdentity(self) -> None: ... - def isIdentity(self) -> bool: ... - def __setitem__(self, a0: typing.Any, a1: float) -> None: ... - def __getitem__(self, a0: typing.Any) -> typing.Any: ... - def copyDataTo(self) -> typing.List[float]: ... - def data(self) -> typing.List[float]: ... - def __repr__(self) -> str: ... - - -class QMatrix3x4(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, other: 'QMatrix3x4') -> None: ... - @typing.overload - def __init__(self, values: typing.Sequence[float]) -> None: ... - - def transposed(self) -> QMatrix4x3: ... - def fill(self, value: float) -> None: ... - def setToIdentity(self) -> None: ... - def isIdentity(self) -> bool: ... - def __setitem__(self, a0: typing.Any, a1: float) -> None: ... - def __getitem__(self, a0: typing.Any) -> typing.Any: ... - def copyDataTo(self) -> typing.List[float]: ... - def data(self) -> typing.List[float]: ... - def __repr__(self) -> str: ... - - -class QMatrix3x3(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, other: 'QMatrix3x3') -> None: ... - @typing.overload - def __init__(self, values: typing.Sequence[float]) -> None: ... - - def transposed(self) -> 'QMatrix3x3': ... - def fill(self, value: float) -> None: ... - def setToIdentity(self) -> None: ... - def isIdentity(self) -> bool: ... - def __setitem__(self, a0: typing.Any, a1: float) -> None: ... - def __getitem__(self, a0: typing.Any) -> typing.Any: ... - def copyDataTo(self) -> typing.List[float]: ... - def data(self) -> typing.List[float]: ... - def __repr__(self) -> str: ... - - -class QMatrix3x2(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, other: 'QMatrix3x2') -> None: ... - @typing.overload - def __init__(self, values: typing.Sequence[float]) -> None: ... - - def transposed(self) -> 'QMatrix2x3': ... - def fill(self, value: float) -> None: ... - def setToIdentity(self) -> None: ... - def isIdentity(self) -> bool: ... - def __setitem__(self, a0: typing.Any, a1: float) -> None: ... - def __getitem__(self, a0: typing.Any) -> typing.Any: ... - def copyDataTo(self) -> typing.List[float]: ... - def data(self) -> typing.List[float]: ... - def __repr__(self) -> str: ... - - -class QMatrix2x4(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, other: 'QMatrix2x4') -> None: ... - @typing.overload - def __init__(self, values: typing.Sequence[float]) -> None: ... - - def transposed(self) -> QMatrix4x2: ... - def fill(self, value: float) -> None: ... - def setToIdentity(self) -> None: ... - def isIdentity(self) -> bool: ... - def __setitem__(self, a0: typing.Any, a1: float) -> None: ... - def __getitem__(self, a0: typing.Any) -> typing.Any: ... - def copyDataTo(self) -> typing.List[float]: ... - def data(self) -> typing.List[float]: ... - def __repr__(self) -> str: ... - - -class QMatrix2x3(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, other: 'QMatrix2x3') -> None: ... - @typing.overload - def __init__(self, values: typing.Sequence[float]) -> None: ... - - def transposed(self) -> QMatrix3x2: ... - def fill(self, value: float) -> None: ... - def setToIdentity(self) -> None: ... - def isIdentity(self) -> bool: ... - def __setitem__(self, a0: typing.Any, a1: float) -> None: ... - def __getitem__(self, a0: typing.Any) -> typing.Any: ... - def copyDataTo(self) -> typing.List[float]: ... - def data(self) -> typing.List[float]: ... - def __repr__(self) -> str: ... - - -class QMatrix2x2(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, other: 'QMatrix2x2') -> None: ... - @typing.overload - def __init__(self, values: typing.Sequence[float]) -> None: ... - - def transposed(self) -> 'QMatrix2x2': ... - def fill(self, value: float) -> None: ... - def setToIdentity(self) -> None: ... - def isIdentity(self) -> bool: ... - def __setitem__(self, a0: typing.Any, a1: float) -> None: ... - def __getitem__(self, a0: typing.Any) -> typing.Any: ... - def copyDataTo(self) -> typing.List[float]: ... - def data(self) -> typing.List[float]: ... - def __repr__(self) -> str: ... - - -class QGlyphRun(sip.simplewrapper): - - class GlyphRunFlag(int): ... - Overline = ... # type: 'QGlyphRun.GlyphRunFlag' - Underline = ... # type: 'QGlyphRun.GlyphRunFlag' - StrikeOut = ... # type: 'QGlyphRun.GlyphRunFlag' - RightToLeft = ... # type: 'QGlyphRun.GlyphRunFlag' - SplitLigature = ... # type: 'QGlyphRun.GlyphRunFlag' - - class GlyphRunFlags(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QGlyphRun.GlyphRunFlags', 'QGlyphRun.GlyphRunFlag']) -> None: ... - @typing.overload - def __init__(self, a0: 'QGlyphRun.GlyphRunFlags') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QGlyphRun.GlyphRunFlags': ... - def __int__(self) -> int: ... - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, other: 'QGlyphRun') -> None: ... - - def swap(self, other: 'QGlyphRun') -> None: ... - def isEmpty(self) -> bool: ... - def boundingRect(self) -> QtCore.QRectF: ... - def setBoundingRect(self, boundingRect: QtCore.QRectF) -> None: ... - def flags(self) -> 'QGlyphRun.GlyphRunFlags': ... - def setFlags(self, flags: typing.Union['QGlyphRun.GlyphRunFlags', 'QGlyphRun.GlyphRunFlag']) -> None: ... - def setFlag(self, flag: 'QGlyphRun.GlyphRunFlag', enabled: bool = ...) -> None: ... - def isRightToLeft(self) -> bool: ... - def setRightToLeft(self, on: bool) -> None: ... - def strikeOut(self) -> bool: ... - def setStrikeOut(self, strikeOut: bool) -> None: ... - def underline(self) -> bool: ... - def setUnderline(self, underline: bool) -> None: ... - def overline(self) -> bool: ... - def setOverline(self, overline: bool) -> None: ... - def clear(self) -> None: ... - def setPositions(self, positions: typing.Iterable[typing.Union[QtCore.QPointF, QtCore.QPoint]]) -> None: ... - def positions(self) -> typing.List[QtCore.QPointF]: ... - def setGlyphIndexes(self, glyphIndexes: typing.Iterable[int]) -> None: ... - def glyphIndexes(self) -> typing.List[int]: ... - def setRawFont(self, rawFont: 'QRawFont') -> None: ... - def rawFont(self) -> 'QRawFont': ... - - -class QGuiApplication(QtCore.QCoreApplication): - - def __init__(self, argv: typing.List[str]) -> None: ... - - @staticmethod - def desktopFileName() -> str: ... - @staticmethod - def setDesktopFileName(name: str) -> None: ... - def primaryScreenChanged(self, screen: 'QScreen') -> None: ... - @staticmethod - def setFallbackSessionManagementEnabled(a0: bool) -> None: ... - @staticmethod - def isFallbackSessionManagementEnabled() -> bool: ... - def paletteChanged(self, pal: 'QPalette') -> None: ... - def layoutDirectionChanged(self, direction: QtCore.Qt.LayoutDirection) -> None: ... - def screenRemoved(self, screen: 'QScreen') -> None: ... - def event(self, a0: QtCore.QEvent) -> bool: ... - @staticmethod - def windowIcon() -> 'QIcon': ... - @staticmethod - def setWindowIcon(icon: 'QIcon') -> None: ... - @staticmethod - def sync() -> None: ... - @staticmethod - def applicationState() -> QtCore.Qt.ApplicationState: ... - def isSavingSession(self) -> bool: ... - def sessionKey(self) -> str: ... - def sessionId(self) -> str: ... - def isSessionRestored(self) -> bool: ... - def devicePixelRatio(self) -> float: ... - @staticmethod - def modalWindow() -> 'QWindow': ... - @staticmethod - def applicationDisplayName() -> str: ... - @staticmethod - def setApplicationDisplayName(name: str) -> None: ... - def applicationStateChanged(self, state: QtCore.Qt.ApplicationState) -> None: ... - def focusWindowChanged(self, focusWindow: 'QWindow') -> None: ... - def saveStateRequest(self, sessionManager: 'QSessionManager') -> None: ... - def commitDataRequest(self, sessionManager: 'QSessionManager') -> None: ... - def focusObjectChanged(self, focusObject: QtCore.QObject) -> None: ... - def lastWindowClosed(self) -> None: ... - def screenAdded(self, screen: 'QScreen') -> None: ... - def fontDatabaseChanged(self) -> None: ... - def notify(self, a0: QtCore.QObject, a1: QtCore.QEvent) -> bool: ... - @staticmethod - def exec() -> int: ... - @staticmethod - def exec_() -> int: ... - @staticmethod - def quitOnLastWindowClosed() -> bool: ... - @staticmethod - def setQuitOnLastWindowClosed(quit: bool) -> None: ... - @staticmethod - def desktopSettingsAware() -> bool: ... - @staticmethod - def setDesktopSettingsAware(on: bool) -> None: ... - @staticmethod - def isLeftToRight() -> bool: ... - @staticmethod - def isRightToLeft() -> bool: ... - @staticmethod - def layoutDirection() -> QtCore.Qt.LayoutDirection: ... - @staticmethod - def setLayoutDirection(direction: QtCore.Qt.LayoutDirection) -> None: ... - @staticmethod - def mouseButtons() -> QtCore.Qt.MouseButtons: ... - @staticmethod - def queryKeyboardModifiers() -> QtCore.Qt.KeyboardModifiers: ... - @staticmethod - def keyboardModifiers() -> QtCore.Qt.KeyboardModifiers: ... - @staticmethod - def setPalette(pal: 'QPalette') -> None: ... - @staticmethod - def palette() -> 'QPalette': ... - @staticmethod - def clipboard() -> QClipboard: ... - @staticmethod - def setFont(a0: QFont) -> None: ... - @staticmethod - def font() -> QFont: ... - @staticmethod - def restoreOverrideCursor() -> None: ... - @staticmethod - def changeOverrideCursor(a0: typing.Union[QCursor, QtCore.Qt.CursorShape]) -> None: ... - @staticmethod - def setOverrideCursor(a0: typing.Union[QCursor, QtCore.Qt.CursorShape]) -> None: ... - @staticmethod - def overrideCursor() -> QCursor: ... - @staticmethod - def screens() -> typing.Any: ... - @staticmethod - def primaryScreen() -> 'QScreen': ... - @staticmethod - def focusObject() -> QtCore.QObject: ... - @staticmethod - def focusWindow() -> 'QWindow': ... - @staticmethod - def platformName() -> str: ... - @staticmethod - def topLevelAt(pos: QtCore.QPoint) -> 'QWindow': ... - @staticmethod - def topLevelWindows() -> typing.Any: ... - @staticmethod - def allWindows() -> typing.Any: ... - - -class QIcon(sip.wrapper): - - class State(int): ... - On = ... # type: 'QIcon.State' - Off = ... # type: 'QIcon.State' - - class Mode(int): ... - Normal = ... # type: 'QIcon.Mode' - Disabled = ... # type: 'QIcon.Mode' - Active = ... # type: 'QIcon.Mode' - Selected = ... # type: 'QIcon.Mode' - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, pixmap: QPixmap) -> None: ... - @typing.overload - def __init__(self, other: 'QIcon') -> None: ... - @typing.overload - def __init__(self, fileName: str) -> None: ... - @typing.overload - def __init__(self, engine: 'QIconEngine') -> None: ... - @typing.overload - def __init__(self, variant: typing.Any) -> None: ... - - def isMask(self) -> bool: ... - def setIsMask(self, isMask: bool) -> None: ... - def swap(self, other: 'QIcon') -> None: ... - def name(self) -> str: ... - @staticmethod - def setThemeName(path: str) -> None: ... - @staticmethod - def themeName() -> str: ... - @staticmethod - def setThemeSearchPaths(searchpath: typing.Iterable[str]) -> None: ... - @staticmethod - def themeSearchPaths() -> typing.List[str]: ... - @staticmethod - def hasThemeIcon(name: str) -> bool: ... - @typing.overload - @staticmethod - def fromTheme(name: str) -> 'QIcon': ... - @typing.overload - @staticmethod - def fromTheme(name: str, fallback: 'QIcon') -> 'QIcon': ... - def cacheKey(self) -> int: ... - def addFile(self, fileName: str, size: QtCore.QSize = ..., mode: 'QIcon.Mode' = ..., state: 'QIcon.State' = ...) -> None: ... - def addPixmap(self, pixmap: QPixmap, mode: 'QIcon.Mode' = ..., state: 'QIcon.State' = ...) -> None: ... - def isDetached(self) -> bool: ... - def isNull(self) -> bool: ... - @typing.overload - def paint(self, painter: 'QPainter', rect: QtCore.QRect, alignment: typing.Union[QtCore.Qt.Alignment, QtCore.Qt.AlignmentFlag] = ..., mode: 'QIcon.Mode' = ..., state: 'QIcon.State' = ...) -> None: ... - @typing.overload - def paint(self, painter: 'QPainter', x: int, y: int, w: int, h: int, alignment: typing.Union[QtCore.Qt.Alignment, QtCore.Qt.AlignmentFlag] = ..., mode: 'QIcon.Mode' = ..., state: 'QIcon.State' = ...) -> None: ... - def availableSizes(self, mode: 'QIcon.Mode' = ..., state: 'QIcon.State' = ...) -> typing.List[QtCore.QSize]: ... - @typing.overload - def actualSize(self, size: QtCore.QSize, mode: 'QIcon.Mode' = ..., state: 'QIcon.State' = ...) -> QtCore.QSize: ... - @typing.overload - def actualSize(self, window: 'QWindow', size: QtCore.QSize, mode: 'QIcon.Mode' = ..., state: 'QIcon.State' = ...) -> QtCore.QSize: ... - @typing.overload - def pixmap(self, size: QtCore.QSize, mode: 'QIcon.Mode' = ..., state: 'QIcon.State' = ...) -> QPixmap: ... - @typing.overload - def pixmap(self, w: int, h: int, mode: 'QIcon.Mode' = ..., state: 'QIcon.State' = ...) -> QPixmap: ... - @typing.overload - def pixmap(self, extent: int, mode: 'QIcon.Mode' = ..., state: 'QIcon.State' = ...) -> QPixmap: ... - @typing.overload - def pixmap(self, window: 'QWindow', size: QtCore.QSize, mode: 'QIcon.Mode' = ..., state: 'QIcon.State' = ...) -> QPixmap: ... - - -class QIconEngine(sip.wrapper): - - class IconEngineHook(int): ... - AvailableSizesHook = ... # type: 'QIconEngine.IconEngineHook' - IconNameHook = ... # type: 'QIconEngine.IconEngineHook' - IsNullHook = ... # type: 'QIconEngine.IconEngineHook' - - class AvailableSizesArgument(sip.simplewrapper): - - mode = ... # type: QIcon.Mode - sizes = ... # type: typing.Any - state = ... # type: QIcon.State - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QIconEngine.AvailableSizesArgument') -> None: ... - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QIconEngine') -> None: ... - - def isNull(self) -> bool: ... - def iconName(self) -> str: ... - def availableSizes(self, mode: QIcon.Mode = ..., state: QIcon.State = ...) -> typing.List[QtCore.QSize]: ... - def write(self, out: QtCore.QDataStream) -> bool: ... - def read(self, in_: QtCore.QDataStream) -> bool: ... - def clone(self) -> 'QIconEngine': ... - def key(self) -> str: ... - def addFile(self, fileName: str, size: QtCore.QSize, mode: QIcon.Mode, state: QIcon.State) -> None: ... - def addPixmap(self, pixmap: QPixmap, mode: QIcon.Mode, state: QIcon.State) -> None: ... - def pixmap(self, size: QtCore.QSize, mode: QIcon.Mode, state: QIcon.State) -> QPixmap: ... - def actualSize(self, size: QtCore.QSize, mode: QIcon.Mode, state: QIcon.State) -> QtCore.QSize: ... - def paint(self, painter: 'QPainter', rect: QtCore.QRect, mode: QIcon.Mode, state: QIcon.State) -> None: ... - - -class QImage(QPaintDevice): - - class Format(int): ... - Format_Invalid = ... # type: 'QImage.Format' - Format_Mono = ... # type: 'QImage.Format' - Format_MonoLSB = ... # type: 'QImage.Format' - Format_Indexed8 = ... # type: 'QImage.Format' - Format_RGB32 = ... # type: 'QImage.Format' - Format_ARGB32 = ... # type: 'QImage.Format' - Format_ARGB32_Premultiplied = ... # type: 'QImage.Format' - Format_RGB16 = ... # type: 'QImage.Format' - Format_ARGB8565_Premultiplied = ... # type: 'QImage.Format' - Format_RGB666 = ... # type: 'QImage.Format' - Format_ARGB6666_Premultiplied = ... # type: 'QImage.Format' - Format_RGB555 = ... # type: 'QImage.Format' - Format_ARGB8555_Premultiplied = ... # type: 'QImage.Format' - Format_RGB888 = ... # type: 'QImage.Format' - Format_RGB444 = ... # type: 'QImage.Format' - Format_ARGB4444_Premultiplied = ... # type: 'QImage.Format' - Format_RGBX8888 = ... # type: 'QImage.Format' - Format_RGBA8888 = ... # type: 'QImage.Format' - Format_RGBA8888_Premultiplied = ... # type: 'QImage.Format' - Format_BGR30 = ... # type: 'QImage.Format' - Format_A2BGR30_Premultiplied = ... # type: 'QImage.Format' - Format_RGB30 = ... # type: 'QImage.Format' - Format_A2RGB30_Premultiplied = ... # type: 'QImage.Format' - Format_Alpha8 = ... # type: 'QImage.Format' - Format_Grayscale8 = ... # type: 'QImage.Format' - - class InvertMode(int): ... - InvertRgb = ... # type: 'QImage.InvertMode' - InvertRgba = ... # type: 'QImage.InvertMode' - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, size: QtCore.QSize, format: 'QImage.Format') -> None: ... - @typing.overload - def __init__(self, width: int, height: int, format: 'QImage.Format') -> None: ... - @typing.overload - def __init__(self, data: str, width: int, height: int, format: 'QImage.Format') -> None: ... - @typing.overload - def __init__(self, data: sip.voidptr, width: int, height: int, format: 'QImage.Format') -> None: ... - @typing.overload - def __init__(self, data: str, width: int, height: int, bytesPerLine: int, format: 'QImage.Format') -> None: ... - @typing.overload - def __init__(self, data: sip.voidptr, width: int, height: int, bytesPerLine: int, format: 'QImage.Format') -> None: ... - @typing.overload - def __init__(self, xpm: typing.List[str]) -> None: ... - @typing.overload - def __init__(self, fileName: str, format: typing.Optional[str] = ...) -> None: ... - @typing.overload - def __init__(self, a0: 'QImage') -> None: ... - @typing.overload - def __init__(self, variant: typing.Any) -> None: ... - - @typing.overload - def setPixelColor(self, x: int, y: int, c: typing.Union[QColor, QtCore.Qt.GlobalColor, QGradient]) -> None: ... - @typing.overload - def setPixelColor(self, pt: QtCore.QPoint, c: typing.Union[QColor, QtCore.Qt.GlobalColor, QGradient]) -> None: ... - @typing.overload - def pixelColor(self, x: int, y: int) -> QColor: ... - @typing.overload - def pixelColor(self, pt: QtCore.QPoint) -> QColor: ... - @staticmethod - def toImageFormat(format: 'QPixelFormat') -> 'QImage.Format': ... - @staticmethod - def toPixelFormat(format: 'QImage.Format') -> 'QPixelFormat': ... - def pixelFormat(self) -> 'QPixelFormat': ... - def setDevicePixelRatio(self, scaleFactor: float) -> None: ... - # def devicePixelRatio(self) -> float: ... - def swap(self, other: 'QImage') -> None: ... - def bitPlaneCount(self) -> int: ... - def byteCount(self) -> int: ... - def setColorCount(self, a0: int) -> None: ... - def colorCount(self) -> int: ... - def cacheKey(self) -> int: ... - @staticmethod - def trueMatrix(a0: 'QTransform', w: int, h: int) -> 'QTransform': ... - def transformed(self, matrix: 'QTransform', mode: QtCore.Qt.TransformationMode = ...) -> 'QImage': ... - def createMaskFromColor(self, color: int, mode: QtCore.Qt.MaskMode = ...) -> 'QImage': ... - def smoothScaled(self, w: int, h: int) -> 'QImage': ... - def metric(self, metric: QPaintDevice.PaintDeviceMetric) -> int: ... - def setText(self, key: str, value: str) -> None: ... - def text(self, key: str = ...) -> str: ... - def textKeys(self) -> typing.List[str]: ... - def setOffset(self, a0: QtCore.QPoint) -> None: ... - def offset(self) -> QtCore.QPoint: ... - def setDotsPerMeterY(self, a0: int) -> None: ... - def setDotsPerMeterX(self, a0: int) -> None: ... - def dotsPerMeterY(self) -> int: ... - def dotsPerMeterX(self) -> int: ... - def paintEngine(self) -> 'QPaintEngine': ... - @typing.overload - @staticmethod - def fromData(data: bytes, format: typing.Optional[str] = ...) -> 'QImage': ... - @typing.overload - @staticmethod - def fromData(data: typing.Union[QtCore.QByteArray, bytes, bytearray], format: typing.Optional[str] = ...) -> 'QImage': ... - @typing.overload - def save(self, fileName: str, format: typing.Optional[str] = ..., quality: int = ...) -> bool: ... - @typing.overload - def save(self, device: QtCore.QIODevice, format: typing.Optional[str] = ..., quality: int = ...) -> bool: ... - @typing.overload - def loadFromData(self, data: bytes, format: typing.Optional[str] = ...) -> bool: ... - @typing.overload - def loadFromData(self, data: typing.Union[QtCore.QByteArray, bytes, bytearray], format: typing.Optional[str] = ...) -> bool: ... - @typing.overload - def load(self, device: QtCore.QIODevice, format: str) -> bool: ... - @typing.overload - def load(self, fileName: str, format: typing.Optional[str] = ...) -> bool: ... - def invertPixels(self, mode: 'QImage.InvertMode' = ...) -> None: ... - def rgbSwapped(self) -> 'QImage': ... - def mirrored(self, horizontal: bool = ..., vertical: bool = ...) -> 'QImage': ... - def scaledToHeight(self, height: int, mode: QtCore.Qt.TransformationMode = ...) -> 'QImage': ... - def scaledToWidth(self, width: int, mode: QtCore.Qt.TransformationMode = ...) -> 'QImage': ... - @typing.overload - def scaled(self, width: int, height: int, aspectRatioMode: QtCore.Qt.AspectRatioMode = ..., transformMode: QtCore.Qt.TransformationMode = ...) -> 'QImage': ... - @typing.overload - def scaled(self, size: QtCore.QSize, aspectRatioMode: QtCore.Qt.AspectRatioMode = ..., transformMode: QtCore.Qt.TransformationMode = ...) -> 'QImage': ... - def createHeuristicMask(self, clipTight: bool = ...) -> 'QImage': ... - def createAlphaMask(self, flags: typing.Union[QtCore.Qt.ImageConversionFlags, QtCore.Qt.ImageConversionFlag] = ...) -> 'QImage': ... - def hasAlphaChannel(self) -> bool: ... - @typing.overload - def fill(self, color: QtCore.Qt.GlobalColor) -> None: ... - @typing.overload - def fill(self, color: typing.Union[QColor, QtCore.Qt.GlobalColor, QGradient]) -> None: ... - @typing.overload - def fill(self, pixel: int) -> None: ... - def setColorTable(self, colors: typing.Iterable[int]) -> None: ... - def colorTable(self) -> typing.List[int]: ... - @typing.overload - def setPixel(self, pt: QtCore.QPoint, index_or_rgb: int) -> None: ... - @typing.overload - def setPixel(self, x: int, y: int, index_or_rgb: int) -> None: ... - @typing.overload - def pixel(self, pt: QtCore.QPoint) -> int: ... - @typing.overload - def pixel(self, x: int, y: int) -> int: ... - @typing.overload - def pixelIndex(self, pt: QtCore.QPoint) -> int: ... - @typing.overload - def pixelIndex(self, x: int, y: int) -> int: ... - @typing.overload - def valid(self, pt: QtCore.QPoint) -> bool: ... - @typing.overload - def valid(self, x: int, y: int) -> bool: ... - def bytesPerLine(self) -> int: ... - def constScanLine(self, a0: int) -> sip.voidptr: ... - def scanLine(self, a0: int) -> sip.voidptr: ... - def constBits(self) -> sip.voidptr: ... - def bits(self) -> sip.voidptr: ... - def isGrayscale(self) -> bool: ... - def allGray(self) -> bool: ... - def setColor(self, i: int, c: int) -> None: ... - def color(self, i: int) -> int: ... - def depth(self) -> int: ... - def rect(self) -> QtCore.QRect: ... - def size(self) -> QtCore.QSize: ... - def height(self) -> int: ... - def width(self) -> int: ... - @typing.overload - def convertToFormat(self, format: 'QImage.Format', flags: typing.Union[QtCore.Qt.ImageConversionFlags, QtCore.Qt.ImageConversionFlag] = ...) -> 'QImage': ... - @typing.overload - def convertToFormat(self, format: 'QImage.Format', colorTable: typing.Iterable[int], flags: typing.Union[QtCore.Qt.ImageConversionFlags, QtCore.Qt.ImageConversionFlag] = ...) -> 'QImage': ... - def format(self) -> 'QImage.Format': ... - @typing.overload - def copy(self, rect: QtCore.QRect = ...) -> 'QImage': ... - @typing.overload - def copy(self, x: int, y: int, w: int, h: int) -> 'QImage': ... - def isDetached(self) -> bool: ... - def detach(self) -> None: ... - def devType(self) -> int: ... - def isNull(self) -> bool: ... - - -class QImageIOHandler(sip.simplewrapper): - - class Transformation(int): ... - TransformationNone = ... # type: 'QImageIOHandler.Transformation' - TransformationMirror = ... # type: 'QImageIOHandler.Transformation' - TransformationFlip = ... # type: 'QImageIOHandler.Transformation' - TransformationRotate180 = ... # type: 'QImageIOHandler.Transformation' - TransformationRotate90 = ... # type: 'QImageIOHandler.Transformation' - TransformationMirrorAndRotate90 = ... # type: 'QImageIOHandler.Transformation' - TransformationFlipAndRotate90 = ... # type: 'QImageIOHandler.Transformation' - TransformationRotate270 = ... # type: 'QImageIOHandler.Transformation' - - class ImageOption(int): ... - Size = ... # type: 'QImageIOHandler.ImageOption' - ClipRect = ... # type: 'QImageIOHandler.ImageOption' - Description = ... # type: 'QImageIOHandler.ImageOption' - ScaledClipRect = ... # type: 'QImageIOHandler.ImageOption' - ScaledSize = ... # type: 'QImageIOHandler.ImageOption' - CompressionRatio = ... # type: 'QImageIOHandler.ImageOption' - Gamma = ... # type: 'QImageIOHandler.ImageOption' - Quality = ... # type: 'QImageIOHandler.ImageOption' - Name = ... # type: 'QImageIOHandler.ImageOption' - SubType = ... # type: 'QImageIOHandler.ImageOption' - IncrementalReading = ... # type: 'QImageIOHandler.ImageOption' - Endianness = ... # type: 'QImageIOHandler.ImageOption' - Animation = ... # type: 'QImageIOHandler.ImageOption' - BackgroundColor = ... # type: 'QImageIOHandler.ImageOption' - SupportedSubTypes = ... # type: 'QImageIOHandler.ImageOption' - OptimizedWrite = ... # type: 'QImageIOHandler.ImageOption' - ProgressiveScanWrite = ... # type: 'QImageIOHandler.ImageOption' - ImageTransformation = ... # type: 'QImageIOHandler.ImageOption' - TransformedByDefault = ... # type: 'QImageIOHandler.ImageOption' - - class Transformations(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QImageIOHandler.Transformations', 'QImageIOHandler.Transformation']) -> None: ... - @typing.overload - def __init__(self, a0: 'QImageIOHandler.Transformations') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QImageIOHandler.Transformations': ... - def __int__(self) -> int: ... - - def __init__(self) -> None: ... - - def currentImageRect(self) -> QtCore.QRect: ... - def currentImageNumber(self) -> int: ... - def nextImageDelay(self) -> int: ... - def imageCount(self) -> int: ... - def loopCount(self) -> int: ... - def jumpToImage(self, imageNumber: int) -> bool: ... - def jumpToNextImage(self) -> bool: ... - def supportsOption(self, option: 'QImageIOHandler.ImageOption') -> bool: ... - def setOption(self, option: 'QImageIOHandler.ImageOption', value: typing.Any) -> None: ... - def option(self, option: 'QImageIOHandler.ImageOption') -> typing.Any: ... - def write(self, image: QImage) -> bool: ... - def read(self, image: QImage) -> bool: ... - def canRead(self) -> bool: ... - def format(self) -> QtCore.QByteArray: ... - def setFormat(self, format: typing.Union[QtCore.QByteArray, bytes, bytearray]) -> None: ... - def device(self) -> QtCore.QIODevice: ... - def setDevice(self, device: QtCore.QIODevice) -> None: ... - - -class QImageReader(sip.simplewrapper): - - class ImageReaderError(int): ... - UnknownError = ... # type: 'QImageReader.ImageReaderError' - FileNotFoundError = ... # type: 'QImageReader.ImageReaderError' - DeviceError = ... # type: 'QImageReader.ImageReaderError' - UnsupportedFormatError = ... # type: 'QImageReader.ImageReaderError' - InvalidDataError = ... # type: 'QImageReader.ImageReaderError' - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, device: QtCore.QIODevice, format: typing.Union[QtCore.QByteArray, bytes, bytearray] = ...) -> None: ... - @typing.overload - def __init__(self, fileName: str, format: typing.Union[QtCore.QByteArray, bytes, bytearray] = ...) -> None: ... - - def gamma(self) -> float: ... - def setGamma(self, gamma: float) -> None: ... - def autoTransform(self) -> bool: ... - def setAutoTransform(self, enabled: bool) -> None: ... - def transformation(self) -> QImageIOHandler.Transformations: ... - def supportedSubTypes(self) -> typing.List[QtCore.QByteArray]: ... - def subType(self) -> QtCore.QByteArray: ... - @staticmethod - def supportedMimeTypes() -> typing.List[QtCore.QByteArray]: ... - def decideFormatFromContent(self) -> bool: ... - def setDecideFormatFromContent(self, ignored: bool) -> None: ... - def autoDetectImageFormat(self) -> bool: ... - def setAutoDetectImageFormat(self, enabled: bool) -> None: ... - def supportsOption(self, option: QImageIOHandler.ImageOption) -> bool: ... - def quality(self) -> int: ... - def setQuality(self, quality: int) -> None: ... - def supportsAnimation(self) -> bool: ... - def backgroundColor(self) -> QColor: ... - def setBackgroundColor(self, color: typing.Union[QColor, QtCore.Qt.GlobalColor, QGradient]) -> None: ... - def text(self, key: str) -> str: ... - def textKeys(self) -> typing.List[str]: ... - @staticmethod - def supportedImageFormats() -> typing.List[QtCore.QByteArray]: ... - @typing.overload - @staticmethod - def imageFormat(fileName: str) -> QtCore.QByteArray: ... - @typing.overload - @staticmethod - def imageFormat(device: QtCore.QIODevice) -> QtCore.QByteArray: ... - @typing.overload - def imageFormat(self) -> QImage.Format: ... - def errorString(self) -> str: ... - def error(self) -> 'QImageReader.ImageReaderError': ... - def currentImageRect(self) -> QtCore.QRect: ... - def currentImageNumber(self) -> int: ... - def nextImageDelay(self) -> int: ... - def imageCount(self) -> int: ... - def loopCount(self) -> int: ... - def jumpToImage(self, imageNumber: int) -> bool: ... - def jumpToNextImage(self) -> bool: ... - @typing.overload - def read(self) -> QImage: ... - @typing.overload - def read(self, image: QImage) -> bool: ... - def canRead(self) -> bool: ... - def scaledClipRect(self) -> QtCore.QRect: ... - def setScaledClipRect(self, rect: QtCore.QRect) -> None: ... - def scaledSize(self) -> QtCore.QSize: ... - def setScaledSize(self, size: QtCore.QSize) -> None: ... - def clipRect(self) -> QtCore.QRect: ... - def setClipRect(self, rect: QtCore.QRect) -> None: ... - def size(self) -> QtCore.QSize: ... - def fileName(self) -> str: ... - def setFileName(self, fileName: str) -> None: ... - def device(self) -> QtCore.QIODevice: ... - def setDevice(self, device: QtCore.QIODevice) -> None: ... - def format(self) -> QtCore.QByteArray: ... - def setFormat(self, format: typing.Union[QtCore.QByteArray, bytes, bytearray]) -> None: ... - - -class QImageWriter(sip.simplewrapper): - - class ImageWriterError(int): ... - UnknownError = ... # type: 'QImageWriter.ImageWriterError' - DeviceError = ... # type: 'QImageWriter.ImageWriterError' - UnsupportedFormatError = ... # type: 'QImageWriter.ImageWriterError' - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, device: QtCore.QIODevice, format: typing.Union[QtCore.QByteArray, bytes, bytearray]) -> None: ... - @typing.overload - def __init__(self, fileName: str, format: typing.Union[QtCore.QByteArray, bytes, bytearray] = ...) -> None: ... - - def setTransformation(self, orientation: QImageIOHandler.Transformations) -> None: ... - def transformation(self) -> QImageIOHandler.Transformations: ... - def progressiveScanWrite(self) -> bool: ... - def setProgressiveScanWrite(self, progressive: bool) -> None: ... - def optimizedWrite(self) -> bool: ... - def setOptimizedWrite(self, optimize: bool) -> None: ... - def supportedSubTypes(self) -> typing.List[QtCore.QByteArray]: ... - def subType(self) -> QtCore.QByteArray: ... - def setSubType(self, type: typing.Union[QtCore.QByteArray, bytes, bytearray]) -> None: ... - @staticmethod - def supportedMimeTypes() -> typing.List[QtCore.QByteArray]: ... - def compression(self) -> int: ... - def setCompression(self, compression: int) -> None: ... - def supportsOption(self, option: QImageIOHandler.ImageOption) -> bool: ... - def setText(self, key: str, text: str) -> None: ... - @staticmethod - def supportedImageFormats() -> typing.List[QtCore.QByteArray]: ... - def errorString(self) -> str: ... - def error(self) -> 'QImageWriter.ImageWriterError': ... - def write(self, image: QImage) -> bool: ... - def canWrite(self) -> bool: ... - def gamma(self) -> float: ... - def setGamma(self, gamma: float) -> None: ... - def quality(self) -> int: ... - def setQuality(self, quality: int) -> None: ... - def fileName(self) -> str: ... - def setFileName(self, fileName: str) -> None: ... - def device(self) -> QtCore.QIODevice: ... - def setDevice(self, device: QtCore.QIODevice) -> None: ... - def format(self) -> QtCore.QByteArray: ... - def setFormat(self, format: typing.Union[QtCore.QByteArray, bytes, bytearray]) -> None: ... - - -class QInputMethod(QtCore.QObject): - - class Action(int): ... - Click = ... # type: 'QInputMethod.Action' - ContextMenu = ... # type: 'QInputMethod.Action' - - def inputItemClipRectangleChanged(self) -> None: ... - def anchorRectangleChanged(self) -> None: ... - def inputItemClipRectangle(self) -> QtCore.QRectF: ... - def anchorRectangle(self) -> QtCore.QRectF: ... - def inputDirectionChanged(self, newDirection: QtCore.Qt.LayoutDirection) -> None: ... - def localeChanged(self) -> None: ... - def animatingChanged(self) -> None: ... - def visibleChanged(self) -> None: ... - def keyboardRectangleChanged(self) -> None: ... - def cursorRectangleChanged(self) -> None: ... - def invokeAction(self, a: 'QInputMethod.Action', cursorPosition: int) -> None: ... - def commit(self) -> None: ... - def reset(self) -> None: ... - def update(self, queries: typing.Union[QtCore.Qt.InputMethodQueries, QtCore.Qt.InputMethodQuery]) -> None: ... - def hide(self) -> None: ... - def show(self) -> None: ... - @staticmethod - def queryFocusObject(query: QtCore.Qt.InputMethodQuery, argument: typing.Any) -> typing.Any: ... - def setInputItemRectangle(self, rect: QtCore.QRectF) -> None: ... - def inputItemRectangle(self) -> QtCore.QRectF: ... - def inputDirection(self) -> QtCore.Qt.LayoutDirection: ... - def locale(self) -> QtCore.QLocale: ... - def isAnimating(self) -> bool: ... - def setVisible(self, visible: bool) -> None: ... - def isVisible(self) -> bool: ... - def keyboardRectangle(self) -> QtCore.QRectF: ... - def cursorRectangle(self) -> QtCore.QRectF: ... - def setInputItemTransform(self, transform: 'QTransform') -> None: ... - def inputItemTransform(self) -> 'QTransform': ... - - -class QKeySequence(sip.simplewrapper): - - class StandardKey(int): ... - UnknownKey = ... # type: 'QKeySequence.StandardKey' - HelpContents = ... # type: 'QKeySequence.StandardKey' - WhatsThis = ... # type: 'QKeySequence.StandardKey' - Open = ... # type: 'QKeySequence.StandardKey' - Close = ... # type: 'QKeySequence.StandardKey' - Save = ... # type: 'QKeySequence.StandardKey' - New = ... # type: 'QKeySequence.StandardKey' - Delete = ... # type: 'QKeySequence.StandardKey' - Cut = ... # type: 'QKeySequence.StandardKey' - Copy = ... # type: 'QKeySequence.StandardKey' - Paste = ... # type: 'QKeySequence.StandardKey' - Undo = ... # type: 'QKeySequence.StandardKey' - Redo = ... # type: 'QKeySequence.StandardKey' - Back = ... # type: 'QKeySequence.StandardKey' - Forward = ... # type: 'QKeySequence.StandardKey' - Refresh = ... # type: 'QKeySequence.StandardKey' - ZoomIn = ... # type: 'QKeySequence.StandardKey' - ZoomOut = ... # type: 'QKeySequence.StandardKey' - Print = ... # type: 'QKeySequence.StandardKey' - AddTab = ... # type: 'QKeySequence.StandardKey' - NextChild = ... # type: 'QKeySequence.StandardKey' - PreviousChild = ... # type: 'QKeySequence.StandardKey' - Find = ... # type: 'QKeySequence.StandardKey' - FindNext = ... # type: 'QKeySequence.StandardKey' - FindPrevious = ... # type: 'QKeySequence.StandardKey' - Replace = ... # type: 'QKeySequence.StandardKey' - SelectAll = ... # type: 'QKeySequence.StandardKey' - Bold = ... # type: 'QKeySequence.StandardKey' - Italic = ... # type: 'QKeySequence.StandardKey' - Underline = ... # type: 'QKeySequence.StandardKey' - MoveToNextChar = ... # type: 'QKeySequence.StandardKey' - MoveToPreviousChar = ... # type: 'QKeySequence.StandardKey' - MoveToNextWord = ... # type: 'QKeySequence.StandardKey' - MoveToPreviousWord = ... # type: 'QKeySequence.StandardKey' - MoveToNextLine = ... # type: 'QKeySequence.StandardKey' - MoveToPreviousLine = ... # type: 'QKeySequence.StandardKey' - MoveToNextPage = ... # type: 'QKeySequence.StandardKey' - MoveToPreviousPage = ... # type: 'QKeySequence.StandardKey' - MoveToStartOfLine = ... # type: 'QKeySequence.StandardKey' - MoveToEndOfLine = ... # type: 'QKeySequence.StandardKey' - MoveToStartOfBlock = ... # type: 'QKeySequence.StandardKey' - MoveToEndOfBlock = ... # type: 'QKeySequence.StandardKey' - MoveToStartOfDocument = ... # type: 'QKeySequence.StandardKey' - MoveToEndOfDocument = ... # type: 'QKeySequence.StandardKey' - SelectNextChar = ... # type: 'QKeySequence.StandardKey' - SelectPreviousChar = ... # type: 'QKeySequence.StandardKey' - SelectNextWord = ... # type: 'QKeySequence.StandardKey' - SelectPreviousWord = ... # type: 'QKeySequence.StandardKey' - SelectNextLine = ... # type: 'QKeySequence.StandardKey' - SelectPreviousLine = ... # type: 'QKeySequence.StandardKey' - SelectNextPage = ... # type: 'QKeySequence.StandardKey' - SelectPreviousPage = ... # type: 'QKeySequence.StandardKey' - SelectStartOfLine = ... # type: 'QKeySequence.StandardKey' - SelectEndOfLine = ... # type: 'QKeySequence.StandardKey' - SelectStartOfBlock = ... # type: 'QKeySequence.StandardKey' - SelectEndOfBlock = ... # type: 'QKeySequence.StandardKey' - SelectStartOfDocument = ... # type: 'QKeySequence.StandardKey' - SelectEndOfDocument = ... # type: 'QKeySequence.StandardKey' - DeleteStartOfWord = ... # type: 'QKeySequence.StandardKey' - DeleteEndOfWord = ... # type: 'QKeySequence.StandardKey' - DeleteEndOfLine = ... # type: 'QKeySequence.StandardKey' - InsertParagraphSeparator = ... # type: 'QKeySequence.StandardKey' - InsertLineSeparator = ... # type: 'QKeySequence.StandardKey' - SaveAs = ... # type: 'QKeySequence.StandardKey' - Preferences = ... # type: 'QKeySequence.StandardKey' - Quit = ... # type: 'QKeySequence.StandardKey' - FullScreen = ... # type: 'QKeySequence.StandardKey' - Deselect = ... # type: 'QKeySequence.StandardKey' - DeleteCompleteLine = ... # type: 'QKeySequence.StandardKey' - Backspace = ... # type: 'QKeySequence.StandardKey' - Cancel = ... # type: 'QKeySequence.StandardKey' - - class SequenceMatch(int): ... - NoMatch = ... # type: 'QKeySequence.SequenceMatch' - PartialMatch = ... # type: 'QKeySequence.SequenceMatch' - ExactMatch = ... # type: 'QKeySequence.SequenceMatch' - - class SequenceFormat(int): ... - NativeText = ... # type: 'QKeySequence.SequenceFormat' - PortableText = ... # type: 'QKeySequence.SequenceFormat' - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, ks: typing.Union['QKeySequence', 'QKeySequence.StandardKey', str, int]) -> None: ... - @typing.overload - def __init__(self, key: str, format: 'QKeySequence.SequenceFormat' = ...) -> None: ... - @typing.overload - def __init__(self, k1: int, key2: int = ..., key3: int = ..., key4: int = ...) -> None: ... - @typing.overload - def __init__(self, variant: typing.Any) -> None: ... - - def __hash__(self) -> int: ... - @staticmethod - def listToString(list: typing.Iterable[typing.Union['QKeySequence', 'QKeySequence.StandardKey', str, int]], format: 'QKeySequence.SequenceFormat' = ...) -> str: ... - @staticmethod - def listFromString(str: str, format: 'QKeySequence.SequenceFormat' = ...) -> typing.List['QKeySequence']: ... - @staticmethod - def keyBindings(key: 'QKeySequence.StandardKey') -> typing.Any: ... - @staticmethod - def fromString(str: str, format: 'QKeySequence.SequenceFormat' = ...) -> 'QKeySequence': ... - def toString(self, format: 'QKeySequence.SequenceFormat' = ...) -> str: ... - def swap(self, other: 'QKeySequence') -> None: ... - def isDetached(self) -> bool: ... - def __getitem__(self, i: int) -> int: ... - @staticmethod - def mnemonic(text: str) -> 'QKeySequence': ... - def matches(self, seq: typing.Union['QKeySequence', 'QKeySequence.StandardKey', str, int]) -> 'QKeySequence.SequenceMatch': ... - def isEmpty(self) -> bool: ... - def __len__(self) -> int: ... - def count(self) -> int: ... - - -class QMatrix4x4(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, values: typing.Sequence[float]) -> None: ... - @typing.overload - def __init__(self, m11: float, m12: float, m13: float, m14: float, m21: float, m22: float, m23: float, m24: float, m31: float, m32: float, m33: float, m34: float, m41: float, m42: float, m43: float, m44: float) -> None: ... - @typing.overload - def __init__(self, transform: 'QTransform') -> None: ... - @typing.overload - def __init__(self, a0: 'QMatrix4x4') -> None: ... - - def __neg__(self) -> 'QMatrix4x4': ... - def isAffine(self) -> bool: ... - @typing.overload - def viewport(self, left: float, bottom: float, width: float, height: float, nearPlane: float = ..., farPlane: float = ...) -> None: ... - @typing.overload - def viewport(self, rect: QtCore.QRectF) -> None: ... - def mapVector(self, vector: 'QVector3D') -> 'QVector3D': ... - # @typing.overload - # def map(self, point: QtCore.QPoint) -> QtCore.QPoint: ... - @typing.overload - def map(self, point: typing.Union[QtCore.QPointF, QtCore.QPoint]) -> QtCore.QPointF: ... - @typing.overload - def map(self, point: 'QVector3D') -> 'QVector3D': ... - @typing.overload - def map(self, point: 'QVector4D') -> 'QVector4D': ... - def fill(self, value: float) -> None: ... - def setToIdentity(self) -> None: ... - def isIdentity(self) -> bool: ... - def setRow(self, index: int, value: 'QVector4D') -> None: ... - def row(self, index: int) -> 'QVector4D': ... - def setColumn(self, index: int, value: 'QVector4D') -> None: ... - def column(self, index: int) -> 'QVector4D': ... - def __setitem__(self, a0: typing.Any, a1: float) -> None: ... - def __getitem__(self, a0: typing.Any) -> typing.Any: ... - def optimize(self) -> None: ... - def data(self) -> typing.List[float]: ... - @typing.overload - def mapRect(self, rect: QtCore.QRect) -> QtCore.QRect: ... - @typing.overload - def mapRect(self, rect: QtCore.QRectF) -> QtCore.QRectF: ... - @typing.overload - def toTransform(self) -> 'QTransform': ... - @typing.overload - def toTransform(self, distanceToPlane: float) -> 'QTransform': ... - def copyDataTo(self) -> typing.List[float]: ... - def lookAt(self, eye: 'QVector3D', center: 'QVector3D', up: 'QVector3D') -> None: ... - def perspective(self, angle: float, aspect: float, nearPlane: float, farPlane: float) -> None: ... - def frustum(self, left: float, right: float, bottom: float, top: float, nearPlane: float, farPlane: float) -> None: ... - @typing.overload - def ortho(self, rect: QtCore.QRect) -> None: ... - @typing.overload - def ortho(self, rect: QtCore.QRectF) -> None: ... - @typing.overload - def ortho(self, left: float, right: float, bottom: float, top: float, nearPlane: float, farPlane: float) -> None: ... - @typing.overload - def rotate(self, angle: float, vector: 'QVector3D') -> None: ... - @typing.overload - def rotate(self, angle: float, x: float, y: float, z: float = ...) -> None: ... - @typing.overload - def rotate(self, quaternion: 'QQuaternion') -> None: ... - @typing.overload - def translate(self, vector: 'QVector3D') -> None: ... - @typing.overload - def translate(self, x: float, y: float) -> None: ... - @typing.overload - def translate(self, x: float, y: float, z: float) -> None: ... - @typing.overload - def scale(self, vector: 'QVector3D') -> None: ... - @typing.overload - def scale(self, x: float, y: float) -> None: ... - @typing.overload - def scale(self, x: float, y: float, z: float) -> None: ... - @typing.overload - def scale(self, factor: float) -> None: ... - def normalMatrix(self) -> QMatrix3x3: ... - def transposed(self) -> 'QMatrix4x4': ... - def inverted(self) -> typing.Tuple['QMatrix4x4', bool]: ... - def determinant(self) -> float: ... - def __repr__(self) -> str: ... - - -class QMovie(QtCore.QObject): - - class CacheMode(int): ... - CacheNone = ... # type: 'QMovie.CacheMode' - CacheAll = ... # type: 'QMovie.CacheMode' - - class MovieState(int): ... - NotRunning = ... # type: 'QMovie.MovieState' - Paused = ... # type: 'QMovie.MovieState' - Running = ... # type: 'QMovie.MovieState' - - @typing.overload - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - @typing.overload - def __init__(self, device: QtCore.QIODevice, format: typing.Union[QtCore.QByteArray, bytes, bytearray] = ..., parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - @typing.overload - def __init__(self, fileName: str, format: typing.Union[QtCore.QByteArray, bytes, bytearray] = ..., parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def stop(self) -> None: ... - def setPaused(self, paused: bool) -> None: ... - def jumpToNextFrame(self) -> bool: ... - def start(self) -> None: ... - def frameChanged(self, frameNumber: int) -> None: ... - def finished(self) -> None: ... - def error(self, error: QImageReader.ImageReaderError) -> None: ... - def stateChanged(self, state: 'QMovie.MovieState') -> None: ... - def updated(self, rect: QtCore.QRect) -> None: ... - def resized(self, size: QtCore.QSize) -> None: ... - def started(self) -> None: ... - def setCacheMode(self, mode: 'QMovie.CacheMode') -> None: ... - def cacheMode(self) -> 'QMovie.CacheMode': ... - def setScaledSize(self, size: QtCore.QSize) -> None: ... - def scaledSize(self) -> QtCore.QSize: ... - def speed(self) -> int: ... - def setSpeed(self, percentSpeed: int) -> None: ... - def currentFrameNumber(self) -> int: ... - def nextFrameDelay(self) -> int: ... - def frameCount(self) -> int: ... - def loopCount(self) -> int: ... - def jumpToFrame(self, frameNumber: int) -> bool: ... - def isValid(self) -> bool: ... - def currentPixmap(self) -> QPixmap: ... - def currentImage(self) -> QImage: ... - def frameRect(self) -> QtCore.QRect: ... - def state(self) -> 'QMovie.MovieState': ... - def backgroundColor(self) -> QColor: ... - def setBackgroundColor(self, color: typing.Union[QColor, QtCore.Qt.GlobalColor, QGradient]) -> None: ... - def format(self) -> QtCore.QByteArray: ... - def setFormat(self, format: typing.Union[QtCore.QByteArray, bytes, bytearray]) -> None: ... - def fileName(self) -> str: ... - def setFileName(self, fileName: str) -> None: ... - def device(self) -> QtCore.QIODevice: ... - def setDevice(self, device: QtCore.QIODevice) -> None: ... - @staticmethod - def supportedFormats() -> typing.List[QtCore.QByteArray]: ... - - -class QSurface(sip.simplewrapper): - - class SurfaceType(int): ... - RasterSurface = ... # type: 'QSurface.SurfaceType' - OpenGLSurface = ... # type: 'QSurface.SurfaceType' - RasterGLSurface = ... # type: 'QSurface.SurfaceType' - - class SurfaceClass(int): ... - Window = ... # type: 'QSurface.SurfaceClass' - Offscreen = ... # type: 'QSurface.SurfaceClass' - - @typing.overload - def __init__(self, type: 'QSurface.SurfaceClass') -> None: ... - @typing.overload - def __init__(self, a0: 'QSurface') -> None: ... - - def supportsOpenGL(self) -> bool: ... - def size(self) -> QtCore.QSize: ... - def surfaceType(self) -> 'QSurface.SurfaceType': ... - def format(self) -> 'QSurfaceFormat': ... - def surfaceClass(self) -> 'QSurface.SurfaceClass': ... - - -class QOffscreenSurface(QtCore.QObject, QSurface): - - def __init__(self, screen: typing.Optional['QScreen'] = ...) -> None: ... - - def screenChanged(self, screen: 'QScreen') -> None: ... - def setScreen(self, screen: 'QScreen') -> None: ... - def screen(self) -> 'QScreen': ... - def size(self) -> QtCore.QSize: ... - def requestedFormat(self) -> 'QSurfaceFormat': ... - def format(self) -> 'QSurfaceFormat': ... - def setFormat(self, format: 'QSurfaceFormat') -> None: ... - def isValid(self) -> bool: ... - def destroy(self) -> None: ... - def create(self) -> None: ... - def surfaceType(self) -> QSurface.SurfaceType: ... - - -class QOpenGLBuffer(sip.simplewrapper): - - class RangeAccessFlag(int): ... - RangeRead = ... # type: 'QOpenGLBuffer.RangeAccessFlag' - RangeWrite = ... # type: 'QOpenGLBuffer.RangeAccessFlag' - RangeInvalidate = ... # type: 'QOpenGLBuffer.RangeAccessFlag' - RangeInvalidateBuffer = ... # type: 'QOpenGLBuffer.RangeAccessFlag' - RangeFlushExplicit = ... # type: 'QOpenGLBuffer.RangeAccessFlag' - RangeUnsynchronized = ... # type: 'QOpenGLBuffer.RangeAccessFlag' - - class Access(int): ... - ReadOnly = ... # type: 'QOpenGLBuffer.Access' - WriteOnly = ... # type: 'QOpenGLBuffer.Access' - ReadWrite = ... # type: 'QOpenGLBuffer.Access' - - class UsagePattern(int): ... - StreamDraw = ... # type: 'QOpenGLBuffer.UsagePattern' - StreamRead = ... # type: 'QOpenGLBuffer.UsagePattern' - StreamCopy = ... # type: 'QOpenGLBuffer.UsagePattern' - StaticDraw = ... # type: 'QOpenGLBuffer.UsagePattern' - StaticRead = ... # type: 'QOpenGLBuffer.UsagePattern' - StaticCopy = ... # type: 'QOpenGLBuffer.UsagePattern' - DynamicDraw = ... # type: 'QOpenGLBuffer.UsagePattern' - DynamicRead = ... # type: 'QOpenGLBuffer.UsagePattern' - DynamicCopy = ... # type: 'QOpenGLBuffer.UsagePattern' - - class Type(int): ... - VertexBuffer = ... # type: 'QOpenGLBuffer.Type' - IndexBuffer = ... # type: 'QOpenGLBuffer.Type' - PixelPackBuffer = ... # type: 'QOpenGLBuffer.Type' - PixelUnpackBuffer = ... # type: 'QOpenGLBuffer.Type' - - class RangeAccessFlags(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QOpenGLBuffer.RangeAccessFlags', 'QOpenGLBuffer.RangeAccessFlag']) -> None: ... - @typing.overload - def __init__(self, a0: 'QOpenGLBuffer.RangeAccessFlags') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QOpenGLBuffer.RangeAccessFlags': ... - def __int__(self) -> int: ... - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, type: 'QOpenGLBuffer.Type') -> None: ... - @typing.overload - def __init__(self, other: 'QOpenGLBuffer') -> None: ... - - def mapRange(self, offset: int, count: int, access: typing.Union['QOpenGLBuffer.RangeAccessFlags', 'QOpenGLBuffer.RangeAccessFlag']) -> sip.voidptr: ... - def unmap(self) -> bool: ... - def map(self, access: 'QOpenGLBuffer.Access') -> sip.voidptr: ... - @typing.overload - def allocate(self, data: sip.voidptr, count: int) -> None: ... - @typing.overload - def allocate(self, count: int) -> None: ... - def write(self, offset: int, data: sip.voidptr, count: int) -> None: ... - def read(self, offset: int, data: sip.voidptr, count: int) -> bool: ... - def __len__(self) -> int: ... - def size(self) -> int: ... - def bufferId(self) -> int: ... - @typing.overload - def release(self) -> None: ... - @typing.overload - @staticmethod - def release(type: 'QOpenGLBuffer.Type') -> None: ... - def bind(self) -> bool: ... - def destroy(self) -> None: ... - def isCreated(self) -> bool: ... - def create(self) -> bool: ... - def setUsagePattern(self, value: 'QOpenGLBuffer.UsagePattern') -> None: ... - def usagePattern(self) -> 'QOpenGLBuffer.UsagePattern': ... - def type(self) -> 'QOpenGLBuffer.Type': ... - - -class QOpenGLContextGroup(QtCore.QObject): - - @staticmethod - def currentContextGroup() -> 'QOpenGLContextGroup': ... - def shares(self) -> typing.Any: ... - - -class QOpenGLContext(QtCore.QObject): - - class OpenGLModuleType(int): ... - LibGL = ... # type: 'QOpenGLContext.OpenGLModuleType' - LibGLES = ... # type: 'QOpenGLContext.OpenGLModuleType' - - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - @staticmethod - def globalShareContext() -> 'QOpenGLContext': ... - @staticmethod - def supportsThreadedOpenGL() -> bool: ... - def nativeHandle(self) -> typing.Any: ... - def setNativeHandle(self, handle: typing.Any) -> None: ... - def isOpenGLES(self) -> bool: ... - @staticmethod - def openGLModuleType() -> 'QOpenGLContext.OpenGLModuleType': ... - @staticmethod - def openGLModuleHandle() -> sip.voidptr: ... - def versionFunctions(self, versionProfile: typing.Optional['QOpenGLVersionProfile'] = ...) -> typing.Any: ... - def aboutToBeDestroyed(self) -> None: ... - def hasExtension(self, extension: typing.Union[QtCore.QByteArray, bytes, bytearray]) -> bool: ... - def extensions(self) -> typing.Any: ... - @staticmethod - def areSharing(first: 'QOpenGLContext', second: 'QOpenGLContext') -> bool: ... - @staticmethod - def currentContext() -> 'QOpenGLContext': ... - def surface(self) -> QSurface: ... - def swapBuffers(self, surface: QSurface) -> None: ... - def doneCurrent(self) -> None: ... - def makeCurrent(self, surface: QSurface) -> bool: ... - def defaultFramebufferObject(self) -> int: ... - def screen(self) -> 'QScreen': ... - def shareGroup(self) -> QOpenGLContextGroup: ... - def shareContext(self) -> 'QOpenGLContext': ... - def format(self) -> 'QSurfaceFormat': ... - def isValid(self) -> bool: ... - def create(self) -> bool: ... - def setScreen(self, screen: 'QScreen') -> None: ... - def setShareContext(self, shareContext: 'QOpenGLContext') -> None: ... - def setFormat(self, format: 'QSurfaceFormat') -> None: ... - - -class QOpenGLVersionProfile(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, format: 'QSurfaceFormat') -> None: ... - @typing.overload - def __init__(self, other: 'QOpenGLVersionProfile') -> None: ... - - def isValid(self) -> bool: ... - def isLegacyVersion(self) -> bool: ... - def hasProfiles(self) -> bool: ... - def setProfile(self, profile: 'QSurfaceFormat.OpenGLContextProfile') -> None: ... - def profile(self) -> 'QSurfaceFormat.OpenGLContextProfile': ... - def setVersion(self, majorVersion: int, minorVersion: int) -> None: ... - def version(self) -> typing.Tuple[int, int]: ... - - -class QOpenGLDebugMessage(sip.simplewrapper): - - class Severity(int): ... - InvalidSeverity = ... # type: 'QOpenGLDebugMessage.Severity' - HighSeverity = ... # type: 'QOpenGLDebugMessage.Severity' - MediumSeverity = ... # type: 'QOpenGLDebugMessage.Severity' - LowSeverity = ... # type: 'QOpenGLDebugMessage.Severity' - NotificationSeverity = ... # type: 'QOpenGLDebugMessage.Severity' - AnySeverity = ... # type: 'QOpenGLDebugMessage.Severity' - - class Type(int): ... - InvalidType = ... # type: 'QOpenGLDebugMessage.Type' - ErrorType = ... # type: 'QOpenGLDebugMessage.Type' - DeprecatedBehaviorType = ... # type: 'QOpenGLDebugMessage.Type' - UndefinedBehaviorType = ... # type: 'QOpenGLDebugMessage.Type' - PortabilityType = ... # type: 'QOpenGLDebugMessage.Type' - PerformanceType = ... # type: 'QOpenGLDebugMessage.Type' - OtherType = ... # type: 'QOpenGLDebugMessage.Type' - MarkerType = ... # type: 'QOpenGLDebugMessage.Type' - GroupPushType = ... # type: 'QOpenGLDebugMessage.Type' - GroupPopType = ... # type: 'QOpenGLDebugMessage.Type' - AnyType = ... # type: 'QOpenGLDebugMessage.Type' - - class Source(int): ... - InvalidSource = ... # type: 'QOpenGLDebugMessage.Source' - APISource = ... # type: 'QOpenGLDebugMessage.Source' - WindowSystemSource = ... # type: 'QOpenGLDebugMessage.Source' - ShaderCompilerSource = ... # type: 'QOpenGLDebugMessage.Source' - ThirdPartySource = ... # type: 'QOpenGLDebugMessage.Source' - ApplicationSource = ... # type: 'QOpenGLDebugMessage.Source' - OtherSource = ... # type: 'QOpenGLDebugMessage.Source' - AnySource = ... # type: 'QOpenGLDebugMessage.Source' - - class Sources(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QOpenGLDebugMessage.Sources', 'QOpenGLDebugMessage.Source']) -> None: ... - @typing.overload - def __init__(self, a0: 'QOpenGLDebugMessage.Sources') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QOpenGLDebugMessage.Sources': ... - def __int__(self) -> int: ... - - class Types(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QOpenGLDebugMessage.Types', 'QOpenGLDebugMessage.Type']) -> None: ... - @typing.overload - def __init__(self, a0: 'QOpenGLDebugMessage.Types') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QOpenGLDebugMessage.Types': ... - def __int__(self) -> int: ... - - class Severities(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QOpenGLDebugMessage.Severities', 'QOpenGLDebugMessage.Severity']) -> None: ... - @typing.overload - def __init__(self, a0: 'QOpenGLDebugMessage.Severities') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QOpenGLDebugMessage.Severities': ... - def __int__(self) -> int: ... - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, debugMessage: 'QOpenGLDebugMessage') -> None: ... - - @staticmethod - def createThirdPartyMessage(text: str, id: int = ..., severity: 'QOpenGLDebugMessage.Severity' = ..., type: 'QOpenGLDebugMessage.Type' = ...) -> 'QOpenGLDebugMessage': ... - @staticmethod - def createApplicationMessage(text: str, id: int = ..., severity: 'QOpenGLDebugMessage.Severity' = ..., type: 'QOpenGLDebugMessage.Type' = ...) -> 'QOpenGLDebugMessage': ... - def message(self) -> str: ... - def id(self) -> int: ... - def severity(self) -> 'QOpenGLDebugMessage.Severity': ... - def type(self) -> 'QOpenGLDebugMessage.Type': ... - def source(self) -> 'QOpenGLDebugMessage.Source': ... - def swap(self, debugMessage: 'QOpenGLDebugMessage') -> None: ... - - -class QOpenGLDebugLogger(QtCore.QObject): - - class LoggingMode(int): ... - AsynchronousLogging = ... # type: 'QOpenGLDebugLogger.LoggingMode' - SynchronousLogging = ... # type: 'QOpenGLDebugLogger.LoggingMode' - - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def messageLogged(self, debugMessage: QOpenGLDebugMessage) -> None: ... - def stopLogging(self) -> None: ... - def startLogging(self, loggingMode: 'QOpenGLDebugLogger.LoggingMode' = ...) -> None: ... - def logMessage(self, debugMessage: QOpenGLDebugMessage) -> None: ... - def loggedMessages(self) -> typing.Any: ... - @typing.overload - def disableMessages(self, sources: typing.Union[QOpenGLDebugMessage.Sources, QOpenGLDebugMessage.Source] = ..., types: typing.Union[QOpenGLDebugMessage.Types, QOpenGLDebugMessage.Type] = ..., severities: typing.Union[QOpenGLDebugMessage.Severities, QOpenGLDebugMessage.Severity] = ...) -> None: ... - @typing.overload - def disableMessages(self, ids: typing.Iterable[int], sources: typing.Union[QOpenGLDebugMessage.Sources, QOpenGLDebugMessage.Source] = ..., types: typing.Union[QOpenGLDebugMessage.Types, QOpenGLDebugMessage.Type] = ...) -> None: ... - @typing.overload - def enableMessages(self, sources: typing.Union[QOpenGLDebugMessage.Sources, QOpenGLDebugMessage.Source] = ..., types: typing.Union[QOpenGLDebugMessage.Types, QOpenGLDebugMessage.Type] = ..., severities: typing.Union[QOpenGLDebugMessage.Severities, QOpenGLDebugMessage.Severity] = ...) -> None: ... - @typing.overload - def enableMessages(self, ids: typing.Iterable[int], sources: typing.Union[QOpenGLDebugMessage.Sources, QOpenGLDebugMessage.Source] = ..., types: typing.Union[QOpenGLDebugMessage.Types, QOpenGLDebugMessage.Type] = ...) -> None: ... - def popGroup(self) -> None: ... - def pushGroup(self, name: str, id: int = ..., source: QOpenGLDebugMessage.Source = ...) -> None: ... - def maximumMessageLength(self) -> int: ... - def loggingMode(self) -> 'QOpenGLDebugLogger.LoggingMode': ... - def isLogging(self) -> bool: ... - def initialize(self) -> bool: ... - - -class QOpenGLFramebufferObject(sip.simplewrapper): - - class FramebufferRestorePolicy(int): ... - DontRestoreFramebufferBinding = ... # type: 'QOpenGLFramebufferObject.FramebufferRestorePolicy' - RestoreFramebufferBindingToDefault = ... # type: 'QOpenGLFramebufferObject.FramebufferRestorePolicy' - RestoreFrameBufferBinding = ... # type: 'QOpenGLFramebufferObject.FramebufferRestorePolicy' - - class Attachment(int): ... - NoAttachment = ... # type: 'QOpenGLFramebufferObject.Attachment' - CombinedDepthStencil = ... # type: 'QOpenGLFramebufferObject.Attachment' - Depth = ... # type: 'QOpenGLFramebufferObject.Attachment' - - @typing.overload - def __init__(self, size: QtCore.QSize, target: int = ...) -> None: ... - @typing.overload - def __init__(self, width: int, height: int, target: int = ...) -> None: ... - @typing.overload - def __init__(self, size: QtCore.QSize, attachment: 'QOpenGLFramebufferObject.Attachment', target: int = ..., internal_format: int = ...) -> None: ... - @typing.overload - def __init__(self, width: int, height: int, attachment: 'QOpenGLFramebufferObject.Attachment', target: int = ..., internal_format: int = ...) -> None: ... - @typing.overload - def __init__(self, size: QtCore.QSize, format: 'QOpenGLFramebufferObjectFormat') -> None: ... - @typing.overload - def __init__(self, width: int, height: int, format: 'QOpenGLFramebufferObjectFormat') -> None: ... - - def sizes(self) -> typing.Any: ... - @typing.overload - def addColorAttachment(self, size: QtCore.QSize, internal_format: int = ...) -> None: ... - @typing.overload - def addColorAttachment(self, width: int, height: int, internal_format: int = ...) -> None: ... - @typing.overload - def takeTexture(self) -> int: ... - @typing.overload - def takeTexture(self, colorAttachmentIndex: int) -> int: ... - @typing.overload - @staticmethod - def blitFramebuffer(target: 'QOpenGLFramebufferObject', targetRect: QtCore.QRect, source: 'QOpenGLFramebufferObject', sourceRect: QtCore.QRect, buffers: int = ..., filter: int = ...) -> None: ... - @typing.overload - @staticmethod - def blitFramebuffer(target: 'QOpenGLFramebufferObject', source: 'QOpenGLFramebufferObject', buffers: int = ..., filter: int = ...) -> None: ... - @typing.overload - @staticmethod - def blitFramebuffer(target: 'QOpenGLFramebufferObject', targetRect: QtCore.QRect, source: 'QOpenGLFramebufferObject', sourceRect: QtCore.QRect, buffers: int, filter: int, readColorAttachmentIndex: int, drawColorAttachmentIndex: int) -> None: ... - @typing.overload - @staticmethod - def blitFramebuffer(target: 'QOpenGLFramebufferObject', targetRect: QtCore.QRect, source: 'QOpenGLFramebufferObject', sourceRect: QtCore.QRect, buffers: int, filter: int, readColorAttachmentIndex: int, drawColorAttachmentIndex: int, restorePolicy: 'QOpenGLFramebufferObject.FramebufferRestorePolicy') -> None: ... - @staticmethod - def hasOpenGLFramebufferBlit() -> bool: ... - @staticmethod - def hasOpenGLFramebufferObjects() -> bool: ... - @staticmethod - def bindDefault() -> bool: ... - def handle(self) -> int: ... - def setAttachment(self, attachment: 'QOpenGLFramebufferObject.Attachment') -> None: ... - def attachment(self) -> 'QOpenGLFramebufferObject.Attachment': ... - @typing.overload - def toImage(self) -> QImage: ... - @typing.overload - def toImage(self, flipped: bool) -> QImage: ... - @typing.overload - def toImage(self, flipped: bool, colorAttachmentIndex: int) -> QImage: ... - def size(self) -> QtCore.QSize: ... - def textures(self) -> typing.List[int]: ... - def texture(self) -> int: ... - def height(self) -> int: ... - def width(self) -> int: ... - def release(self) -> bool: ... - def bind(self) -> bool: ... - def isBound(self) -> bool: ... - def isValid(self) -> bool: ... - def format(self) -> 'QOpenGLFramebufferObjectFormat': ... - - -class QOpenGLFramebufferObjectFormat(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, other: 'QOpenGLFramebufferObjectFormat') -> None: ... - - def internalTextureFormat(self) -> int: ... - def setInternalTextureFormat(self, internalTextureFormat: int) -> None: ... - def textureTarget(self) -> int: ... - def setTextureTarget(self, target: int) -> None: ... - def attachment(self) -> QOpenGLFramebufferObject.Attachment: ... - def setAttachment(self, attachment: QOpenGLFramebufferObject.Attachment) -> None: ... - def mipmap(self) -> bool: ... - def setMipmap(self, enabled: bool) -> None: ... - def samples(self) -> int: ... - def setSamples(self, samples: int) -> None: ... - - -class QOpenGLPaintDevice(QPaintDevice): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, size: QtCore.QSize) -> None: ... - @typing.overload - def __init__(self, width: int, height: int) -> None: ... - - def metric(self, metric: QPaintDevice.PaintDeviceMetric) -> int: ... - def setDevicePixelRatio(self, devicePixelRatio: float) -> None: ... - def ensureActiveTarget(self) -> None: ... - def paintFlipped(self) -> bool: ... - def setPaintFlipped(self, flipped: bool) -> None: ... - def setDotsPerMeterY(self, a0: float) -> None: ... - def setDotsPerMeterX(self, a0: float) -> None: ... - def dotsPerMeterY(self) -> float: ... - def dotsPerMeterX(self) -> float: ... - def setSize(self, size: QtCore.QSize) -> None: ... - def size(self) -> QtCore.QSize: ... - def context(self) -> QOpenGLContext: ... - def paintEngine(self) -> 'QPaintEngine': ... - - -class QOpenGLPixelTransferOptions(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QOpenGLPixelTransferOptions') -> None: ... - - def isSwapBytesEnabled(self) -> bool: ... - def setSwapBytesEnabled(self, swapBytes: bool) -> None: ... - def isLeastSignificantBitFirst(self) -> bool: ... - def setLeastSignificantByteFirst(self, lsbFirst: bool) -> None: ... - def rowLength(self) -> int: ... - def setRowLength(self, rowLength: int) -> None: ... - def imageHeight(self) -> int: ... - def setImageHeight(self, imageHeight: int) -> None: ... - def skipPixels(self) -> int: ... - def setSkipPixels(self, skipPixels: int) -> None: ... - def skipRows(self) -> int: ... - def setSkipRows(self, skipRows: int) -> None: ... - def skipImages(self) -> int: ... - def setSkipImages(self, skipImages: int) -> None: ... - def alignment(self) -> int: ... - def setAlignment(self, alignment: int) -> None: ... - def swap(self, other: 'QOpenGLPixelTransferOptions') -> None: ... - - -class QOpenGLShader(QtCore.QObject): - - class ShaderTypeBit(int): ... - Vertex = ... # type: 'QOpenGLShader.ShaderTypeBit' - Fragment = ... # type: 'QOpenGLShader.ShaderTypeBit' - Geometry = ... # type: 'QOpenGLShader.ShaderTypeBit' - TessellationControl = ... # type: 'QOpenGLShader.ShaderTypeBit' - TessellationEvaluation = ... # type: 'QOpenGLShader.ShaderTypeBit' - Compute = ... # type: 'QOpenGLShader.ShaderTypeBit' - - class ShaderType(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QOpenGLShader.ShaderType', 'QOpenGLShader.ShaderTypeBit']) -> None: ... - @typing.overload - def __init__(self, a0: 'QOpenGLShader.ShaderType') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QOpenGLShader.ShaderType': ... - def __int__(self) -> int: ... - - def __init__(self, type: typing.Union['QOpenGLShader.ShaderType', 'QOpenGLShader.ShaderTypeBit'], parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - @staticmethod - def hasOpenGLShaders(type: typing.Union['QOpenGLShader.ShaderType', 'QOpenGLShader.ShaderTypeBit'], context: typing.Optional[QOpenGLContext] = ...) -> bool: ... - def shaderId(self) -> int: ... - def log(self) -> str: ... - def isCompiled(self) -> bool: ... - def sourceCode(self) -> QtCore.QByteArray: ... - def compileSourceFile(self, fileName: str) -> bool: ... - @typing.overload - def compileSourceCode(self, source: typing.Union[QtCore.QByteArray, bytes, bytearray]) -> bool: ... - @typing.overload - def compileSourceCode(self, source: str) -> bool: ... - def shaderType(self) -> 'QOpenGLShader.ShaderType': ... - - -class QOpenGLShaderProgram(QtCore.QObject): - - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def create(self) -> bool: ... - def defaultInnerTessellationLevels(self) -> typing.List[float]: ... - def setDefaultInnerTessellationLevels(self, levels: typing.Iterable[float]) -> None: ... - def defaultOuterTessellationLevels(self) -> typing.List[float]: ... - def setDefaultOuterTessellationLevels(self, levels: typing.Iterable[float]) -> None: ... - def patchVertexCount(self) -> int: ... - def setPatchVertexCount(self, count: int) -> None: ... - def maxGeometryOutputVertices(self) -> int: ... - @staticmethod - def hasOpenGLShaderPrograms(context: typing.Optional[QOpenGLContext] = ...) -> bool: ... - @typing.overload - def setUniformValueArray(self, location: int, values: PYQT_SHADER_UNIFORM_VALUE_ARRAY) -> None: ... - @typing.overload - def setUniformValueArray(self, name: str, values: PYQT_SHADER_UNIFORM_VALUE_ARRAY) -> None: ... - @typing.overload - def setUniformValue(self, location: int, value: int) -> None: ... - @typing.overload - def setUniformValue(self, location: int, value: float) -> None: ... - @typing.overload - def setUniformValue(self, location: int, x: float, y: float) -> None: ... - @typing.overload - def setUniformValue(self, location: int, x: float, y: float, z: float) -> None: ... - @typing.overload - def setUniformValue(self, location: int, x: float, y: float, z: float, w: float) -> None: ... - @typing.overload - def setUniformValue(self, location: int, value: 'QVector2D') -> None: ... - @typing.overload - def setUniformValue(self, location: int, value: 'QVector3D') -> None: ... - @typing.overload - def setUniformValue(self, location: int, value: 'QVector4D') -> None: ... - @typing.overload - def setUniformValue(self, location: int, color: typing.Union[QColor, QtCore.Qt.GlobalColor, QGradient]) -> None: ... - @typing.overload - def setUniformValue(self, location: int, point: QtCore.QPoint) -> None: ... - @typing.overload - def setUniformValue(self, location: int, point: typing.Union[QtCore.QPointF, QtCore.QPoint]) -> None: ... - @typing.overload - def setUniformValue(self, location: int, size: QtCore.QSize) -> None: ... - @typing.overload - def setUniformValue(self, location: int, size: QtCore.QSizeF) -> None: ... - @typing.overload - def setUniformValue(self, location: int, value: QMatrix2x2) -> None: ... - @typing.overload - def setUniformValue(self, location: int, value: QMatrix2x3) -> None: ... - @typing.overload - def setUniformValue(self, location: int, value: QMatrix2x4) -> None: ... - @typing.overload - def setUniformValue(self, location: int, value: QMatrix3x2) -> None: ... - @typing.overload - def setUniformValue(self, location: int, value: QMatrix3x3) -> None: ... - @typing.overload - def setUniformValue(self, location: int, value: QMatrix3x4) -> None: ... - @typing.overload - def setUniformValue(self, location: int, value: QMatrix4x2) -> None: ... - @typing.overload - def setUniformValue(self, location: int, value: QMatrix4x3) -> None: ... - @typing.overload - def setUniformValue(self, location: int, value: QMatrix4x4) -> None: ... - @typing.overload - def setUniformValue(self, location: int, value: 'QTransform') -> None: ... - @typing.overload - def setUniformValue(self, name: str, value: int) -> None: ... - @typing.overload - def setUniformValue(self, name: str, value: float) -> None: ... - @typing.overload - def setUniformValue(self, name: str, x: float, y: float) -> None: ... - @typing.overload - def setUniformValue(self, name: str, x: float, y: float, z: float) -> None: ... - @typing.overload - def setUniformValue(self, name: str, x: float, y: float, z: float, w: float) -> None: ... - @typing.overload - def setUniformValue(self, name: str, value: 'QVector2D') -> None: ... - @typing.overload - def setUniformValue(self, name: str, value: 'QVector3D') -> None: ... - @typing.overload - def setUniformValue(self, name: str, value: 'QVector4D') -> None: ... - @typing.overload - def setUniformValue(self, name: str, color: typing.Union[QColor, QtCore.Qt.GlobalColor, QGradient]) -> None: ... - @typing.overload - def setUniformValue(self, name: str, point: QtCore.QPoint) -> None: ... - @typing.overload - def setUniformValue(self, name: str, point: typing.Union[QtCore.QPointF, QtCore.QPoint]) -> None: ... - @typing.overload - def setUniformValue(self, name: str, size: QtCore.QSize) -> None: ... - @typing.overload - def setUniformValue(self, name: str, size: QtCore.QSizeF) -> None: ... - @typing.overload - def setUniformValue(self, name: str, value: QMatrix2x2) -> None: ... - @typing.overload - def setUniformValue(self, name: str, value: QMatrix2x3) -> None: ... - @typing.overload - def setUniformValue(self, name: str, value: QMatrix2x4) -> None: ... - @typing.overload - def setUniformValue(self, name: str, value: QMatrix3x2) -> None: ... - @typing.overload - def setUniformValue(self, name: str, value: QMatrix3x3) -> None: ... - @typing.overload - def setUniformValue(self, name: str, value: QMatrix3x4) -> None: ... - @typing.overload - def setUniformValue(self, name: str, value: QMatrix4x2) -> None: ... - @typing.overload - def setUniformValue(self, name: str, value: QMatrix4x3) -> None: ... - @typing.overload - def setUniformValue(self, name: str, value: QMatrix4x4) -> None: ... - @typing.overload - def setUniformValue(self, name: str, value: 'QTransform') -> None: ... - @typing.overload - def uniformLocation(self, name: typing.Union[QtCore.QByteArray, bytes, bytearray]) -> int: ... - @typing.overload - def uniformLocation(self, name: str) -> int: ... - @typing.overload - def disableAttributeArray(self, location: int) -> None: ... - @typing.overload - def disableAttributeArray(self, name: str) -> None: ... - @typing.overload - def enableAttributeArray(self, location: int) -> None: ... - @typing.overload - def enableAttributeArray(self, name: str) -> None: ... - @typing.overload - def setAttributeBuffer(self, location: int, type: int, offset: int, tupleSize: int, stride: int = ...) -> None: ... - @typing.overload - def setAttributeBuffer(self, name: str, type: int, offset: int, tupleSize: int, stride: int = ...) -> None: ... - @typing.overload - def setAttributeArray(self, location: int, values: PYQT_SHADER_ATTRIBUTE_ARRAY) -> None: ... - @typing.overload - def setAttributeArray(self, name: str, values: PYQT_SHADER_ATTRIBUTE_ARRAY) -> None: ... - @typing.overload - def setAttributeValue(self, location: int, value: float) -> None: ... - @typing.overload - def setAttributeValue(self, location: int, x: float, y: float) -> None: ... - @typing.overload - def setAttributeValue(self, location: int, x: float, y: float, z: float) -> None: ... - @typing.overload - def setAttributeValue(self, location: int, x: float, y: float, z: float, w: float) -> None: ... - @typing.overload - def setAttributeValue(self, location: int, value: 'QVector2D') -> None: ... - @typing.overload - def setAttributeValue(self, location: int, value: 'QVector3D') -> None: ... - @typing.overload - def setAttributeValue(self, location: int, value: 'QVector4D') -> None: ... - @typing.overload - def setAttributeValue(self, location: int, value: typing.Union[QColor, QtCore.Qt.GlobalColor, QGradient]) -> None: ... - @typing.overload - def setAttributeValue(self, name: str, value: float) -> None: ... - @typing.overload - def setAttributeValue(self, name: str, x: float, y: float) -> None: ... - @typing.overload - def setAttributeValue(self, name: str, x: float, y: float, z: float) -> None: ... - @typing.overload - def setAttributeValue(self, name: str, x: float, y: float, z: float, w: float) -> None: ... - @typing.overload - def setAttributeValue(self, name: str, value: 'QVector2D') -> None: ... - @typing.overload - def setAttributeValue(self, name: str, value: 'QVector3D') -> None: ... - @typing.overload - def setAttributeValue(self, name: str, value: 'QVector4D') -> None: ... - @typing.overload - def setAttributeValue(self, name: str, value: typing.Union[QColor, QtCore.Qt.GlobalColor, QGradient]) -> None: ... - @typing.overload - def attributeLocation(self, name: typing.Union[QtCore.QByteArray, bytes, bytearray]) -> int: ... - @typing.overload - def attributeLocation(self, name: str) -> int: ... - @typing.overload - def bindAttributeLocation(self, name: typing.Union[QtCore.QByteArray, bytes, bytearray], location: int) -> None: ... - @typing.overload - def bindAttributeLocation(self, name: str, location: int) -> None: ... - def programId(self) -> int: ... - def release(self) -> None: ... - def bind(self) -> bool: ... - def log(self) -> str: ... - def isLinked(self) -> bool: ... - def link(self) -> bool: ... - def removeAllShaders(self) -> None: ... - def addShaderFromSourceFile(self, type: typing.Union[QOpenGLShader.ShaderType, QOpenGLShader.ShaderTypeBit], fileName: str) -> bool: ... - @typing.overload - def addShaderFromSourceCode(self, type: typing.Union[QOpenGLShader.ShaderType, QOpenGLShader.ShaderTypeBit], source: typing.Union[QtCore.QByteArray, bytes, bytearray]) -> bool: ... - @typing.overload - def addShaderFromSourceCode(self, type: typing.Union[QOpenGLShader.ShaderType, QOpenGLShader.ShaderTypeBit], source: str) -> bool: ... - def shaders(self) -> typing.Any: ... - def removeShader(self, shader: QOpenGLShader) -> None: ... - def addShader(self, shader: QOpenGLShader) -> bool: ... - - -class QOpenGLTexture(sip.simplewrapper): - - class ComparisonMode(int): ... - CompareRefToTexture = ... # type: 'QOpenGLTexture.ComparisonMode' - CompareNone = ... # type: 'QOpenGLTexture.ComparisonMode' - - class ComparisonFunction(int): ... - CompareLessEqual = ... # type: 'QOpenGLTexture.ComparisonFunction' - CompareGreaterEqual = ... # type: 'QOpenGLTexture.ComparisonFunction' - CompareLess = ... # type: 'QOpenGLTexture.ComparisonFunction' - CompareGreater = ... # type: 'QOpenGLTexture.ComparisonFunction' - CompareEqual = ... # type: 'QOpenGLTexture.ComparisonFunction' - CommpareNotEqual = ... # type: 'QOpenGLTexture.ComparisonFunction' - CompareAlways = ... # type: 'QOpenGLTexture.ComparisonFunction' - CompareNever = ... # type: 'QOpenGLTexture.ComparisonFunction' - - class CoordinateDirection(int): ... - DirectionS = ... # type: 'QOpenGLTexture.CoordinateDirection' - DirectionT = ... # type: 'QOpenGLTexture.CoordinateDirection' - DirectionR = ... # type: 'QOpenGLTexture.CoordinateDirection' - - class WrapMode(int): ... - Repeat = ... # type: 'QOpenGLTexture.WrapMode' - MirroredRepeat = ... # type: 'QOpenGLTexture.WrapMode' - ClampToEdge = ... # type: 'QOpenGLTexture.WrapMode' - ClampToBorder = ... # type: 'QOpenGLTexture.WrapMode' - - class Filter(int): ... - Nearest = ... # type: 'QOpenGLTexture.Filter' - Linear = ... # type: 'QOpenGLTexture.Filter' - NearestMipMapNearest = ... # type: 'QOpenGLTexture.Filter' - NearestMipMapLinear = ... # type: 'QOpenGLTexture.Filter' - LinearMipMapNearest = ... # type: 'QOpenGLTexture.Filter' - LinearMipMapLinear = ... # type: 'QOpenGLTexture.Filter' - - class DepthStencilMode(int): ... - DepthMode = ... # type: 'QOpenGLTexture.DepthStencilMode' - StencilMode = ... # type: 'QOpenGLTexture.DepthStencilMode' - - class SwizzleValue(int): ... - RedValue = ... # type: 'QOpenGLTexture.SwizzleValue' - GreenValue = ... # type: 'QOpenGLTexture.SwizzleValue' - BlueValue = ... # type: 'QOpenGLTexture.SwizzleValue' - AlphaValue = ... # type: 'QOpenGLTexture.SwizzleValue' - ZeroValue = ... # type: 'QOpenGLTexture.SwizzleValue' - OneValue = ... # type: 'QOpenGLTexture.SwizzleValue' - - class SwizzleComponent(int): ... - SwizzleRed = ... # type: 'QOpenGLTexture.SwizzleComponent' - SwizzleGreen = ... # type: 'QOpenGLTexture.SwizzleComponent' - SwizzleBlue = ... # type: 'QOpenGLTexture.SwizzleComponent' - SwizzleAlpha = ... # type: 'QOpenGLTexture.SwizzleComponent' - - class Feature(int): ... - ImmutableStorage = ... # type: 'QOpenGLTexture.Feature' - ImmutableMultisampleStorage = ... # type: 'QOpenGLTexture.Feature' - TextureRectangle = ... # type: 'QOpenGLTexture.Feature' - TextureArrays = ... # type: 'QOpenGLTexture.Feature' - Texture3D = ... # type: 'QOpenGLTexture.Feature' - TextureMultisample = ... # type: 'QOpenGLTexture.Feature' - TextureBuffer = ... # type: 'QOpenGLTexture.Feature' - TextureCubeMapArrays = ... # type: 'QOpenGLTexture.Feature' - Swizzle = ... # type: 'QOpenGLTexture.Feature' - StencilTexturing = ... # type: 'QOpenGLTexture.Feature' - AnisotropicFiltering = ... # type: 'QOpenGLTexture.Feature' - NPOTTextures = ... # type: 'QOpenGLTexture.Feature' - NPOTTextureRepeat = ... # type: 'QOpenGLTexture.Feature' - Texture1D = ... # type: 'QOpenGLTexture.Feature' - TextureComparisonOperators = ... # type: 'QOpenGLTexture.Feature' - TextureMipMapLevel = ... # type: 'QOpenGLTexture.Feature' - - class PixelType(int): ... - NoPixelType = ... # type: 'QOpenGLTexture.PixelType' - Int8 = ... # type: 'QOpenGLTexture.PixelType' - UInt8 = ... # type: 'QOpenGLTexture.PixelType' - Int16 = ... # type: 'QOpenGLTexture.PixelType' - UInt16 = ... # type: 'QOpenGLTexture.PixelType' - Int32 = ... # type: 'QOpenGLTexture.PixelType' - UInt32 = ... # type: 'QOpenGLTexture.PixelType' - Float16 = ... # type: 'QOpenGLTexture.PixelType' - Float16OES = ... # type: 'QOpenGLTexture.PixelType' - Float32 = ... # type: 'QOpenGLTexture.PixelType' - UInt32_RGB9_E5 = ... # type: 'QOpenGLTexture.PixelType' - UInt32_RG11B10F = ... # type: 'QOpenGLTexture.PixelType' - UInt8_RG3B2 = ... # type: 'QOpenGLTexture.PixelType' - UInt8_RG3B2_Rev = ... # type: 'QOpenGLTexture.PixelType' - UInt16_RGB5A1 = ... # type: 'QOpenGLTexture.PixelType' - UInt16_RGB5A1_Rev = ... # type: 'QOpenGLTexture.PixelType' - UInt16_R5G6B5 = ... # type: 'QOpenGLTexture.PixelType' - UInt16_R5G6B5_Rev = ... # type: 'QOpenGLTexture.PixelType' - UInt16_RGBA4 = ... # type: 'QOpenGLTexture.PixelType' - UInt16_RGBA4_Rev = ... # type: 'QOpenGLTexture.PixelType' - UInt32_RGB10A2 = ... # type: 'QOpenGLTexture.PixelType' - UInt32_RGB10A2_Rev = ... # type: 'QOpenGLTexture.PixelType' - UInt32_RGBA8 = ... # type: 'QOpenGLTexture.PixelType' - UInt32_RGBA8_Rev = ... # type: 'QOpenGLTexture.PixelType' - UInt32_D24S8 = ... # type: 'QOpenGLTexture.PixelType' - Float32_D32_UInt32_S8_X24 = ... # type: 'QOpenGLTexture.PixelType' - - class PixelFormat(int): ... - NoSourceFormat = ... # type: 'QOpenGLTexture.PixelFormat' - Red = ... # type: 'QOpenGLTexture.PixelFormat' - RG = ... # type: 'QOpenGLTexture.PixelFormat' - RGB = ... # type: 'QOpenGLTexture.PixelFormat' - BGR = ... # type: 'QOpenGLTexture.PixelFormat' - RGBA = ... # type: 'QOpenGLTexture.PixelFormat' - BGRA = ... # type: 'QOpenGLTexture.PixelFormat' - Red_Integer = ... # type: 'QOpenGLTexture.PixelFormat' - RG_Integer = ... # type: 'QOpenGLTexture.PixelFormat' - RGB_Integer = ... # type: 'QOpenGLTexture.PixelFormat' - BGR_Integer = ... # type: 'QOpenGLTexture.PixelFormat' - RGBA_Integer = ... # type: 'QOpenGLTexture.PixelFormat' - BGRA_Integer = ... # type: 'QOpenGLTexture.PixelFormat' - Depth = ... # type: 'QOpenGLTexture.PixelFormat' - DepthStencil = ... # type: 'QOpenGLTexture.PixelFormat' - Alpha = ... # type: 'QOpenGLTexture.PixelFormat' - Luminance = ... # type: 'QOpenGLTexture.PixelFormat' - LuminanceAlpha = ... # type: 'QOpenGLTexture.PixelFormat' - Stencil = ... # type: 'QOpenGLTexture.PixelFormat' - - class CubeMapFace(int): ... - CubeMapPositiveX = ... # type: 'QOpenGLTexture.CubeMapFace' - CubeMapNegativeX = ... # type: 'QOpenGLTexture.CubeMapFace' - CubeMapPositiveY = ... # type: 'QOpenGLTexture.CubeMapFace' - CubeMapNegativeY = ... # type: 'QOpenGLTexture.CubeMapFace' - CubeMapPositiveZ = ... # type: 'QOpenGLTexture.CubeMapFace' - CubeMapNegativeZ = ... # type: 'QOpenGLTexture.CubeMapFace' - - class TextureFormat(int): ... - NoFormat = ... # type: 'QOpenGLTexture.TextureFormat' - R8_UNorm = ... # type: 'QOpenGLTexture.TextureFormat' - RG8_UNorm = ... # type: 'QOpenGLTexture.TextureFormat' - RGB8_UNorm = ... # type: 'QOpenGLTexture.TextureFormat' - RGBA8_UNorm = ... # type: 'QOpenGLTexture.TextureFormat' - R16_UNorm = ... # type: 'QOpenGLTexture.TextureFormat' - RG16_UNorm = ... # type: 'QOpenGLTexture.TextureFormat' - RGB16_UNorm = ... # type: 'QOpenGLTexture.TextureFormat' - RGBA16_UNorm = ... # type: 'QOpenGLTexture.TextureFormat' - R8_SNorm = ... # type: 'QOpenGLTexture.TextureFormat' - RG8_SNorm = ... # type: 'QOpenGLTexture.TextureFormat' - RGB8_SNorm = ... # type: 'QOpenGLTexture.TextureFormat' - RGBA8_SNorm = ... # type: 'QOpenGLTexture.TextureFormat' - R16_SNorm = ... # type: 'QOpenGLTexture.TextureFormat' - RG16_SNorm = ... # type: 'QOpenGLTexture.TextureFormat' - RGB16_SNorm = ... # type: 'QOpenGLTexture.TextureFormat' - RGBA16_SNorm = ... # type: 'QOpenGLTexture.TextureFormat' - R8U = ... # type: 'QOpenGLTexture.TextureFormat' - RG8U = ... # type: 'QOpenGLTexture.TextureFormat' - RGB8U = ... # type: 'QOpenGLTexture.TextureFormat' - RGBA8U = ... # type: 'QOpenGLTexture.TextureFormat' - R16U = ... # type: 'QOpenGLTexture.TextureFormat' - RG16U = ... # type: 'QOpenGLTexture.TextureFormat' - RGB16U = ... # type: 'QOpenGLTexture.TextureFormat' - RGBA16U = ... # type: 'QOpenGLTexture.TextureFormat' - R32U = ... # type: 'QOpenGLTexture.TextureFormat' - RG32U = ... # type: 'QOpenGLTexture.TextureFormat' - RGB32U = ... # type: 'QOpenGLTexture.TextureFormat' - RGBA32U = ... # type: 'QOpenGLTexture.TextureFormat' - R8I = ... # type: 'QOpenGLTexture.TextureFormat' - RG8I = ... # type: 'QOpenGLTexture.TextureFormat' - RGB8I = ... # type: 'QOpenGLTexture.TextureFormat' - RGBA8I = ... # type: 'QOpenGLTexture.TextureFormat' - R16I = ... # type: 'QOpenGLTexture.TextureFormat' - RG16I = ... # type: 'QOpenGLTexture.TextureFormat' - RGB16I = ... # type: 'QOpenGLTexture.TextureFormat' - RGBA16I = ... # type: 'QOpenGLTexture.TextureFormat' - R32I = ... # type: 'QOpenGLTexture.TextureFormat' - RG32I = ... # type: 'QOpenGLTexture.TextureFormat' - RGB32I = ... # type: 'QOpenGLTexture.TextureFormat' - RGBA32I = ... # type: 'QOpenGLTexture.TextureFormat' - R16F = ... # type: 'QOpenGLTexture.TextureFormat' - RG16F = ... # type: 'QOpenGLTexture.TextureFormat' - RGB16F = ... # type: 'QOpenGLTexture.TextureFormat' - RGBA16F = ... # type: 'QOpenGLTexture.TextureFormat' - R32F = ... # type: 'QOpenGLTexture.TextureFormat' - RG32F = ... # type: 'QOpenGLTexture.TextureFormat' - RGB32F = ... # type: 'QOpenGLTexture.TextureFormat' - RGBA32F = ... # type: 'QOpenGLTexture.TextureFormat' - RGB9E5 = ... # type: 'QOpenGLTexture.TextureFormat' - RG11B10F = ... # type: 'QOpenGLTexture.TextureFormat' - RG3B2 = ... # type: 'QOpenGLTexture.TextureFormat' - R5G6B5 = ... # type: 'QOpenGLTexture.TextureFormat' - RGB5A1 = ... # type: 'QOpenGLTexture.TextureFormat' - RGBA4 = ... # type: 'QOpenGLTexture.TextureFormat' - RGB10A2 = ... # type: 'QOpenGLTexture.TextureFormat' - D16 = ... # type: 'QOpenGLTexture.TextureFormat' - D24 = ... # type: 'QOpenGLTexture.TextureFormat' - D24S8 = ... # type: 'QOpenGLTexture.TextureFormat' - D32 = ... # type: 'QOpenGLTexture.TextureFormat' - D32F = ... # type: 'QOpenGLTexture.TextureFormat' - D32FS8X24 = ... # type: 'QOpenGLTexture.TextureFormat' - RGB_DXT1 = ... # type: 'QOpenGLTexture.TextureFormat' - RGBA_DXT1 = ... # type: 'QOpenGLTexture.TextureFormat' - RGBA_DXT3 = ... # type: 'QOpenGLTexture.TextureFormat' - RGBA_DXT5 = ... # type: 'QOpenGLTexture.TextureFormat' - R_ATI1N_UNorm = ... # type: 'QOpenGLTexture.TextureFormat' - R_ATI1N_SNorm = ... # type: 'QOpenGLTexture.TextureFormat' - RG_ATI2N_UNorm = ... # type: 'QOpenGLTexture.TextureFormat' - RG_ATI2N_SNorm = ... # type: 'QOpenGLTexture.TextureFormat' - RGB_BP_UNSIGNED_FLOAT = ... # type: 'QOpenGLTexture.TextureFormat' - RGB_BP_SIGNED_FLOAT = ... # type: 'QOpenGLTexture.TextureFormat' - RGB_BP_UNorm = ... # type: 'QOpenGLTexture.TextureFormat' - SRGB8 = ... # type: 'QOpenGLTexture.TextureFormat' - SRGB8_Alpha8 = ... # type: 'QOpenGLTexture.TextureFormat' - SRGB_DXT1 = ... # type: 'QOpenGLTexture.TextureFormat' - SRGB_Alpha_DXT1 = ... # type: 'QOpenGLTexture.TextureFormat' - SRGB_Alpha_DXT3 = ... # type: 'QOpenGLTexture.TextureFormat' - SRGB_Alpha_DXT5 = ... # type: 'QOpenGLTexture.TextureFormat' - SRGB_BP_UNorm = ... # type: 'QOpenGLTexture.TextureFormat' - DepthFormat = ... # type: 'QOpenGLTexture.TextureFormat' - AlphaFormat = ... # type: 'QOpenGLTexture.TextureFormat' - RGBFormat = ... # type: 'QOpenGLTexture.TextureFormat' - RGBAFormat = ... # type: 'QOpenGLTexture.TextureFormat' - LuminanceFormat = ... # type: 'QOpenGLTexture.TextureFormat' - LuminanceAlphaFormat = ... # type: 'QOpenGLTexture.TextureFormat' - S8 = ... # type: 'QOpenGLTexture.TextureFormat' - R11_EAC_UNorm = ... # type: 'QOpenGLTexture.TextureFormat' - R11_EAC_SNorm = ... # type: 'QOpenGLTexture.TextureFormat' - RG11_EAC_UNorm = ... # type: 'QOpenGLTexture.TextureFormat' - RG11_EAC_SNorm = ... # type: 'QOpenGLTexture.TextureFormat' - RGB8_ETC2 = ... # type: 'QOpenGLTexture.TextureFormat' - SRGB8_ETC2 = ... # type: 'QOpenGLTexture.TextureFormat' - RGB8_PunchThrough_Alpha1_ETC2 = ... # type: 'QOpenGLTexture.TextureFormat' - SRGB8_PunchThrough_Alpha1_ETC2 = ... # type: 'QOpenGLTexture.TextureFormat' - RGBA8_ETC2_EAC = ... # type: 'QOpenGLTexture.TextureFormat' - SRGB8_Alpha8_ETC2_EAC = ... # type: 'QOpenGLTexture.TextureFormat' - RGB8_ETC1 = ... # type: 'QOpenGLTexture.TextureFormat' - - class TextureUnitReset(int): ... - ResetTextureUnit = ... # type: 'QOpenGLTexture.TextureUnitReset' - DontResetTextureUnit = ... # type: 'QOpenGLTexture.TextureUnitReset' - - class MipMapGeneration(int): ... - GenerateMipMaps = ... # type: 'QOpenGLTexture.MipMapGeneration' - DontGenerateMipMaps = ... # type: 'QOpenGLTexture.MipMapGeneration' - - class BindingTarget(int): ... - BindingTarget1D = ... # type: 'QOpenGLTexture.BindingTarget' - BindingTarget1DArray = ... # type: 'QOpenGLTexture.BindingTarget' - BindingTarget2D = ... # type: 'QOpenGLTexture.BindingTarget' - BindingTarget2DArray = ... # type: 'QOpenGLTexture.BindingTarget' - BindingTarget3D = ... # type: 'QOpenGLTexture.BindingTarget' - BindingTargetCubeMap = ... # type: 'QOpenGLTexture.BindingTarget' - BindingTargetCubeMapArray = ... # type: 'QOpenGLTexture.BindingTarget' - BindingTarget2DMultisample = ... # type: 'QOpenGLTexture.BindingTarget' - BindingTarget2DMultisampleArray = ... # type: 'QOpenGLTexture.BindingTarget' - BindingTargetRectangle = ... # type: 'QOpenGLTexture.BindingTarget' - BindingTargetBuffer = ... # type: 'QOpenGLTexture.BindingTarget' - - class Target(int): ... - Target1D = ... # type: 'QOpenGLTexture.Target' - Target1DArray = ... # type: 'QOpenGLTexture.Target' - Target2D = ... # type: 'QOpenGLTexture.Target' - Target2DArray = ... # type: 'QOpenGLTexture.Target' - Target3D = ... # type: 'QOpenGLTexture.Target' - TargetCubeMap = ... # type: 'QOpenGLTexture.Target' - TargetCubeMapArray = ... # type: 'QOpenGLTexture.Target' - Target2DMultisample = ... # type: 'QOpenGLTexture.Target' - Target2DMultisampleArray = ... # type: 'QOpenGLTexture.Target' - TargetRectangle = ... # type: 'QOpenGLTexture.Target' - TargetBuffer = ... # type: 'QOpenGLTexture.Target' - - class Features(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QOpenGLTexture.Features', 'QOpenGLTexture.Feature']) -> None: ... - @typing.overload - def __init__(self, a0: 'QOpenGLTexture.Features') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QOpenGLTexture.Features': ... - def __int__(self) -> int: ... - - @typing.overload - def __init__(self, target: 'QOpenGLTexture.Target') -> None: ... - @typing.overload - def __init__(self, image: QImage, genMipMaps: 'QOpenGLTexture.MipMapGeneration' = ...) -> None: ... - - def comparisonMode(self) -> 'QOpenGLTexture.ComparisonMode': ... - def setComparisonMode(self, mode: 'QOpenGLTexture.ComparisonMode') -> None: ... - def comparisonFunction(self) -> 'QOpenGLTexture.ComparisonFunction': ... - def setComparisonFunction(self, function: 'QOpenGLTexture.ComparisonFunction') -> None: ... - def isFixedSamplePositions(self) -> bool: ... - def setFixedSamplePositions(self, fixed: bool) -> None: ... - def samples(self) -> int: ... - def setSamples(self, samples: int) -> None: ... - def target(self) -> 'QOpenGLTexture.Target': ... - def levelofDetailBias(self) -> float: ... - def setLevelofDetailBias(self, bias: float) -> None: ... - def levelOfDetailRange(self) -> typing.Tuple[float, float]: ... - def setLevelOfDetailRange(self, min: float, max: float) -> None: ... - def maximumLevelOfDetail(self) -> float: ... - def setMaximumLevelOfDetail(self, value: float) -> None: ... - def minimumLevelOfDetail(self) -> float: ... - def setMinimumLevelOfDetail(self, value: float) -> None: ... - def borderColor(self) -> QColor: ... - def setBorderColor(self, color: typing.Union[QColor, QtCore.Qt.GlobalColor, QGradient]) -> None: ... - def wrapMode(self, direction: 'QOpenGLTexture.CoordinateDirection') -> 'QOpenGLTexture.WrapMode': ... - @typing.overload - def setWrapMode(self, mode: 'QOpenGLTexture.WrapMode') -> None: ... - @typing.overload - def setWrapMode(self, direction: 'QOpenGLTexture.CoordinateDirection', mode: 'QOpenGLTexture.WrapMode') -> None: ... - def maximumAnisotropy(self) -> float: ... - def setMaximumAnisotropy(self, anisotropy: float) -> None: ... - def minMagFilters(self) -> typing.Tuple['QOpenGLTexture.Filter', 'QOpenGLTexture.Filter']: ... - def setMinMagFilters(self, minificationFilter: 'QOpenGLTexture.Filter', magnificationFilter: 'QOpenGLTexture.Filter') -> None: ... - def magnificationFilter(self) -> 'QOpenGLTexture.Filter': ... - def setMagnificationFilter(self, filter: 'QOpenGLTexture.Filter') -> None: ... - def minificationFilter(self) -> 'QOpenGLTexture.Filter': ... - def setMinificationFilter(self, filter: 'QOpenGLTexture.Filter') -> None: ... - def depthStencilMode(self) -> 'QOpenGLTexture.DepthStencilMode': ... - def setDepthStencilMode(self, mode: 'QOpenGLTexture.DepthStencilMode') -> None: ... - def swizzleMask(self, component: 'QOpenGLTexture.SwizzleComponent') -> 'QOpenGLTexture.SwizzleValue': ... - @typing.overload - def setSwizzleMask(self, component: 'QOpenGLTexture.SwizzleComponent', value: 'QOpenGLTexture.SwizzleValue') -> None: ... - @typing.overload - def setSwizzleMask(self, r: 'QOpenGLTexture.SwizzleValue', g: 'QOpenGLTexture.SwizzleValue', b: 'QOpenGLTexture.SwizzleValue', a: 'QOpenGLTexture.SwizzleValue') -> None: ... - @typing.overload - def generateMipMaps(self) -> None: ... - @typing.overload - def generateMipMaps(self, baseLevel: int, resetBaseLevel: bool = ...) -> None: ... - def isAutoMipMapGenerationEnabled(self) -> bool: ... - def setAutoMipMapGenerationEnabled(self, enabled: bool) -> None: ... - def mipLevelRange(self) -> typing.Tuple[int, int]: ... - def setMipLevelRange(self, baseLevel: int, maxLevel: int) -> None: ... - def mipMaxLevel(self) -> int: ... - def setMipMaxLevel(self, maxLevel: int) -> None: ... - def mipBaseLevel(self) -> int: ... - def setMipBaseLevel(self, baseLevel: int) -> None: ... - @staticmethod - def hasFeature(feature: 'QOpenGLTexture.Feature') -> bool: ... - @typing.overload - def setCompressedData(self, mipLevel: int, layer: int, cubeFace: 'QOpenGLTexture.CubeMapFace', dataSize: int, data: sip.voidptr, options: typing.Optional[QOpenGLPixelTransferOptions] = ...) -> None: ... - @typing.overload - def setCompressedData(self, mipLevel: int, layer: int, dataSize: int, data: sip.voidptr, options: typing.Optional[QOpenGLPixelTransferOptions] = ...) -> None: ... - @typing.overload - def setCompressedData(self, mipLevel: int, dataSize: int, data: sip.voidptr, options: typing.Optional[QOpenGLPixelTransferOptions] = ...) -> None: ... - @typing.overload - def setCompressedData(self, dataSize: int, data: sip.voidptr, options: typing.Optional[QOpenGLPixelTransferOptions] = ...) -> None: ... - @typing.overload - def setData(self, mipLevel: int, layer: int, cubeFace: 'QOpenGLTexture.CubeMapFace', sourceFormat: 'QOpenGLTexture.PixelFormat', sourceType: 'QOpenGLTexture.PixelType', data: sip.voidptr, options: typing.Optional[QOpenGLPixelTransferOptions] = ...) -> None: ... - @typing.overload - def setData(self, mipLevel: int, layer: int, sourceFormat: 'QOpenGLTexture.PixelFormat', sourceType: 'QOpenGLTexture.PixelType', data: sip.voidptr, options: typing.Optional[QOpenGLPixelTransferOptions] = ...) -> None: ... - @typing.overload - def setData(self, mipLevel: int, sourceFormat: 'QOpenGLTexture.PixelFormat', sourceType: 'QOpenGLTexture.PixelType', data: sip.voidptr, options: typing.Optional[QOpenGLPixelTransferOptions] = ...) -> None: ... - @typing.overload - def setData(self, sourceFormat: 'QOpenGLTexture.PixelFormat', sourceType: 'QOpenGLTexture.PixelType', data: sip.voidptr, options: typing.Optional[QOpenGLPixelTransferOptions] = ...) -> None: ... - @typing.overload - def setData(self, image: QImage, genMipMaps: 'QOpenGLTexture.MipMapGeneration' = ...) -> None: ... - def isTextureView(self) -> bool: ... - def createTextureView(self, target: 'QOpenGLTexture.Target', viewFormat: 'QOpenGLTexture.TextureFormat', minimumMipmapLevel: int, maximumMipmapLevel: int, minimumLayer: int, maximumLayer: int) -> 'QOpenGLTexture': ... - def isStorageAllocated(self) -> bool: ... - @typing.overload - def allocateStorage(self) -> None: ... - @typing.overload - def allocateStorage(self, pixelFormat: 'QOpenGLTexture.PixelFormat', pixelType: 'QOpenGLTexture.PixelType') -> None: ... - def faces(self) -> int: ... - def layers(self) -> int: ... - def setLayers(self, layers: int) -> None: ... - def maximumMipLevels(self) -> int: ... - def mipLevels(self) -> int: ... - def setMipLevels(self, levels: int) -> None: ... - def depth(self) -> int: ... - def height(self) -> int: ... - def width(self) -> int: ... - def setSize(self, width: int, height: int = ..., depth: int = ...) -> None: ... - def format(self) -> 'QOpenGLTexture.TextureFormat': ... - def setFormat(self, format: 'QOpenGLTexture.TextureFormat') -> None: ... - @typing.overload - @staticmethod - def boundTextureId(target: 'QOpenGLTexture.BindingTarget') -> int: ... - @typing.overload - @staticmethod - def boundTextureId(unit: int, target: 'QOpenGLTexture.BindingTarget') -> int: ... - @typing.overload - def isBound(self) -> bool: ... - @typing.overload - def isBound(self, unit: int) -> bool: ... - @typing.overload - def release(self) -> None: ... - @typing.overload - def release(self, unit: int, reset: 'QOpenGLTexture.TextureUnitReset' = ...) -> None: ... - @typing.overload - def bind(self) -> None: ... - @typing.overload - def bind(self, unit: int, reset: 'QOpenGLTexture.TextureUnitReset' = ...) -> None: ... - def textureId(self) -> int: ... - def isCreated(self) -> bool: ... - def destroy(self) -> None: ... - def create(self) -> bool: ... - - -class QOpenGLTimerQuery(QtCore.QObject): - - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def waitForResult(self) -> int: ... - def isResultAvailable(self) -> bool: ... - def recordTimestamp(self) -> None: ... - def waitForTimestamp(self) -> int: ... - def end(self) -> None: ... - def begin(self) -> None: ... - def objectId(self) -> int: ... - def isCreated(self) -> bool: ... - def destroy(self) -> None: ... - def create(self) -> bool: ... - - -class QOpenGLTimeMonitor(QtCore.QObject): - - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def reset(self) -> None: ... - def waitForIntervals(self) -> typing.List[int]: ... - def waitForSamples(self) -> typing.List[int]: ... - def isResultAvailable(self) -> bool: ... - def recordSample(self) -> int: ... - def objectIds(self) -> typing.List[int]: ... - def isCreated(self) -> bool: ... - def destroy(self) -> None: ... - def create(self) -> bool: ... - def sampleCount(self) -> int: ... - def setSampleCount(self, sampleCount: int) -> None: ... - - -class QAbstractOpenGLFunctions(sip.wrapper): ... - - -class QOpenGLVertexArrayObject(QtCore.QObject): - - class Binder(sip.simplewrapper): - - def __init__(self, v: 'QOpenGLVertexArrayObject') -> None: ... - - def __exit__(self, type: typing.Any, value: typing.Any, traceback: typing.Any) -> None: ... - def __enter__(self) -> typing.Any: ... - def rebind(self) -> None: ... - def release(self) -> None: ... - - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def release(self) -> None: ... - def bind(self) -> None: ... - def objectId(self) -> int: ... - def isCreated(self) -> bool: ... - def destroy(self) -> None: ... - def create(self) -> bool: ... - - -class QWindow(QtCore.QObject, QSurface): - - class Visibility(int): ... - Hidden = ... # type: 'QWindow.Visibility' - AutomaticVisibility = ... # type: 'QWindow.Visibility' - Windowed = ... # type: 'QWindow.Visibility' - Minimized = ... # type: 'QWindow.Visibility' - Maximized = ... # type: 'QWindow.Visibility' - FullScreen = ... # type: 'QWindow.Visibility' - - class AncestorMode(int): ... - ExcludeTransients = ... # type: 'QWindow.AncestorMode' - IncludeTransients = ... # type: 'QWindow.AncestorMode' - - @typing.overload - def __init__(self, screen: typing.Optional['QScreen'] = ...) -> None: ... - @typing.overload - def __init__(self, parent: 'QWindow') -> None: ... - - def opacityChanged(self, opacity: float) -> None: ... - def activeChanged(self) -> None: ... - def visibilityChanged(self, visibility: 'QWindow.Visibility') -> None: ... - @staticmethod - def fromWinId(id: sip.voidptr) -> 'QWindow': ... - def mask(self) -> 'QRegion': ... - def setMask(self, region: 'QRegion') -> None: ... - def opacity(self) -> float: ... - def setVisibility(self, v: 'QWindow.Visibility') -> None: ... - def visibility(self) -> 'QWindow.Visibility': ... - def tabletEvent(self, a0: QTabletEvent) -> None: ... - def touchEvent(self, a0: QTouchEvent) -> None: ... - def wheelEvent(self, a0: QWheelEvent) -> None: ... - def mouseMoveEvent(self, a0: QMouseEvent) -> None: ... - def mouseDoubleClickEvent(self, a0: QMouseEvent) -> None: ... - def mouseReleaseEvent(self, a0: QMouseEvent) -> None: ... - def mousePressEvent(self, a0: QMouseEvent) -> None: ... - def keyReleaseEvent(self, a0: QKeyEvent) -> None: ... - def keyPressEvent(self, a0: QKeyEvent) -> None: ... - def event(self, a0: QtCore.QEvent) -> bool: ... - def hideEvent(self, a0: QHideEvent) -> None: ... - def showEvent(self, a0: QShowEvent) -> None: ... - def focusOutEvent(self, a0: QFocusEvent) -> None: ... - def focusInEvent(self, a0: QFocusEvent) -> None: ... - def moveEvent(self, a0: QMoveEvent) -> None: ... - def resizeEvent(self, a0: QResizeEvent) -> None: ... - def exposeEvent(self, a0: QExposeEvent) -> None: ... - def windowTitleChanged(self, title: str) -> None: ... - def focusObjectChanged(self, object: QtCore.QObject) -> None: ... - def contentOrientationChanged(self, orientation: QtCore.Qt.ScreenOrientation) -> None: ... - def visibleChanged(self, arg: bool) -> None: ... - def maximumHeightChanged(self, arg: int) -> None: ... - def maximumWidthChanged(self, arg: int) -> None: ... - def minimumHeightChanged(self, arg: int) -> None: ... - def minimumWidthChanged(self, arg: int) -> None: ... - def heightChanged(self, arg: int) -> None: ... - def widthChanged(self, arg: int) -> None: ... - def yChanged(self, arg: int) -> None: ... - def xChanged(self, arg: int) -> None: ... - def windowStateChanged(self, windowState: QtCore.Qt.WindowState) -> None: ... - def modalityChanged(self, modality: QtCore.Qt.WindowModality) -> None: ... - def screenChanged(self, screen: 'QScreen') -> None: ... - def requestUpdate(self) -> None: ... - def alert(self, msec: int) -> None: ... - def setMaximumHeight(self, h: int) -> None: ... - def setMaximumWidth(self, w: int) -> None: ... - def setMinimumHeight(self, h: int) -> None: ... - def setMinimumWidth(self, w: int) -> None: ... - def setHeight(self, arg: int) -> None: ... - def setWidth(self, arg: int) -> None: ... - def setY(self, arg: int) -> None: ... - def setX(self, arg: int) -> None: ... - def setTitle(self, a0: str) -> None: ... - def lower(self) -> None: ... - def raise_(self) -> None: ... - def close(self) -> bool: ... - def showNormal(self) -> None: ... - def showFullScreen(self) -> None: ... - def showMaximized(self) -> None: ... - def showMinimized(self) -> None: ... - def hide(self) -> None: ... - def show(self) -> None: ... - def setVisible(self, visible: bool) -> None: ... - def unsetCursor(self) -> None: ... - def setCursor(self, a0: typing.Union[QCursor, QtCore.Qt.CursorShape]) -> None: ... - def cursor(self) -> QCursor: ... - def mapFromGlobal(self, pos: QtCore.QPoint) -> QtCore.QPoint: ... - def mapToGlobal(self, pos: QtCore.QPoint) -> QtCore.QPoint: ... - def focusObject(self) -> QtCore.QObject: ... - def setScreen(self, screen: 'QScreen') -> None: ... - def screen(self) -> 'QScreen': ... - def setMouseGrabEnabled(self, grab: bool) -> bool: ... - def setKeyboardGrabEnabled(self, grab: bool) -> bool: ... - def destroy(self) -> None: ... - def icon(self) -> QIcon: ... - def setIcon(self, icon: QIcon) -> None: ... - def filePath(self) -> str: ... - def setFilePath(self, filePath: str) -> None: ... - @typing.overload - def resize(self, newSize: QtCore.QSize) -> None: ... - @typing.overload - def resize(self, w: int, h: int) -> None: ... - @typing.overload - def setPosition(self, pt: QtCore.QPoint) -> None: ... - @typing.overload - def setPosition(self, posx: int, posy: int) -> None: ... - def position(self) -> QtCore.QPoint: ... - def size(self) -> QtCore.QSize: ... - def y(self) -> int: ... - def x(self) -> int: ... - def height(self) -> int: ... - def width(self) -> int: ... - def setFramePosition(self, point: QtCore.QPoint) -> None: ... - def framePosition(self) -> QtCore.QPoint: ... - def frameGeometry(self) -> QtCore.QRect: ... - def frameMargins(self) -> QtCore.QMargins: ... - def geometry(self) -> QtCore.QRect: ... - @typing.overload - def setGeometry(self, posx: int, posy: int, w: int, h: int) -> None: ... - @typing.overload - def setGeometry(self, rect: QtCore.QRect) -> None: ... - def setSizeIncrement(self, size: QtCore.QSize) -> None: ... - def setBaseSize(self, size: QtCore.QSize) -> None: ... - def setMaximumSize(self, size: QtCore.QSize) -> None: ... - def setMinimumSize(self, size: QtCore.QSize) -> None: ... - def sizeIncrement(self) -> QtCore.QSize: ... - def baseSize(self) -> QtCore.QSize: ... - def maximumSize(self) -> QtCore.QSize: ... - def minimumSize(self) -> QtCore.QSize: ... - def maximumHeight(self) -> int: ... - def maximumWidth(self) -> int: ... - def minimumHeight(self) -> int: ... - def minimumWidth(self) -> int: ... - def isExposed(self) -> bool: ... - def isAncestorOf(self, child: 'QWindow', mode: 'QWindow.AncestorMode' = ...) -> bool: ... - def transientParent(self) -> 'QWindow': ... - def setTransientParent(self, parent: 'QWindow') -> None: ... - def setWindowState(self, state: QtCore.Qt.WindowState) -> None: ... - def windowState(self) -> QtCore.Qt.WindowState: ... - def devicePixelRatio(self) -> float: ... - def contentOrientation(self) -> QtCore.Qt.ScreenOrientation: ... - def reportContentOrientationChange(self, orientation: QtCore.Qt.ScreenOrientation) -> None: ... - def isActive(self) -> bool: ... - def requestActivate(self) -> None: ... - def setOpacity(self, level: float) -> None: ... - def title(self) -> str: ... - def type(self) -> QtCore.Qt.WindowType: ... - def flags(self) -> QtCore.Qt.WindowFlags: ... - def setFlags(self, flags: typing.Union[QtCore.Qt.WindowFlags, QtCore.Qt.WindowType]) -> None: ... - def requestedFormat(self) -> 'QSurfaceFormat': ... - def format(self) -> 'QSurfaceFormat': ... - def setFormat(self, format: 'QSurfaceFormat') -> None: ... - def setModality(self, modality: QtCore.Qt.WindowModality) -> None: ... - def modality(self) -> QtCore.Qt.WindowModality: ... - def isModal(self) -> bool: ... - def isTopLevel(self) -> bool: ... - # def setParent(self, parent: 'QWindow') -> None: ... - def parent(self) -> 'QWindow': ... - def winId(self) -> sip.voidptr: ... - def create(self) -> None: ... - def isVisible(self) -> bool: ... - def surfaceType(self) -> QSurface.SurfaceType: ... - def setSurfaceType(self, surfaceType: QSurface.SurfaceType) -> None: ... - - -class QPaintDeviceWindow(QWindow, QPaintDevice): - - def event(self, event: QtCore.QEvent) -> bool: ... - def exposeEvent(self, a0: QExposeEvent) -> None: ... - def metric(self, metric: QPaintDevice.PaintDeviceMetric) -> int: ... - def paintEvent(self, event: QPaintEvent) -> None: ... - @typing.overload - def update(self, rect: QtCore.QRect) -> None: ... - @typing.overload - def update(self, region: 'QRegion') -> None: ... - @typing.overload - def update(self) -> None: ... - - -class QOpenGLWindow(QPaintDeviceWindow): - - class UpdateBehavior(int): ... - NoPartialUpdate = ... # type: 'QOpenGLWindow.UpdateBehavior' - PartialUpdateBlit = ... # type: 'QOpenGLWindow.UpdateBehavior' - PartialUpdateBlend = ... # type: 'QOpenGLWindow.UpdateBehavior' - - @typing.overload - def __init__(self, updateBehavior: 'QOpenGLWindow.UpdateBehavior' = ..., parent: typing.Optional[QWindow] = ...) -> None: ... - @typing.overload - def __init__(self, shareContext: QOpenGLContext, updateBehavior: 'QOpenGLWindow.UpdateBehavior' = ..., parent: typing.Optional[QWindow] = ...) -> None: ... - - def metric(self, metric: QPaintDevice.PaintDeviceMetric) -> int: ... - def resizeEvent(self, event: QResizeEvent) -> None: ... - def paintEvent(self, event: QPaintEvent) -> None: ... - def paintOverGL(self) -> None: ... - def paintUnderGL(self) -> None: ... - def paintGL(self) -> None: ... - def resizeGL(self, w: int, h: int) -> None: ... - def initializeGL(self) -> None: ... - def frameSwapped(self) -> None: ... - def shareContext(self) -> QOpenGLContext: ... - def grabFramebuffer(self) -> QImage: ... - def defaultFramebufferObject(self) -> int: ... - def context(self) -> QOpenGLContext: ... - def doneCurrent(self) -> None: ... - def makeCurrent(self) -> None: ... - def isValid(self) -> bool: ... - def updateBehavior(self) -> 'QOpenGLWindow.UpdateBehavior': ... - - -class QPagedPaintDevice(QPaintDevice): - - class PageSize(int): ... - A4 = ... # type: 'QPagedPaintDevice.PageSize' - B5 = ... # type: 'QPagedPaintDevice.PageSize' - Letter = ... # type: 'QPagedPaintDevice.PageSize' - Legal = ... # type: 'QPagedPaintDevice.PageSize' - Executive = ... # type: 'QPagedPaintDevice.PageSize' - A0 = ... # type: 'QPagedPaintDevice.PageSize' - A1 = ... # type: 'QPagedPaintDevice.PageSize' - A2 = ... # type: 'QPagedPaintDevice.PageSize' - A3 = ... # type: 'QPagedPaintDevice.PageSize' - A5 = ... # type: 'QPagedPaintDevice.PageSize' - A6 = ... # type: 'QPagedPaintDevice.PageSize' - A7 = ... # type: 'QPagedPaintDevice.PageSize' - A8 = ... # type: 'QPagedPaintDevice.PageSize' - A9 = ... # type: 'QPagedPaintDevice.PageSize' - B0 = ... # type: 'QPagedPaintDevice.PageSize' - B1 = ... # type: 'QPagedPaintDevice.PageSize' - B10 = ... # type: 'QPagedPaintDevice.PageSize' - B2 = ... # type: 'QPagedPaintDevice.PageSize' - B3 = ... # type: 'QPagedPaintDevice.PageSize' - B4 = ... # type: 'QPagedPaintDevice.PageSize' - B6 = ... # type: 'QPagedPaintDevice.PageSize' - B7 = ... # type: 'QPagedPaintDevice.PageSize' - B8 = ... # type: 'QPagedPaintDevice.PageSize' - B9 = ... # type: 'QPagedPaintDevice.PageSize' - C5E = ... # type: 'QPagedPaintDevice.PageSize' - Comm10E = ... # type: 'QPagedPaintDevice.PageSize' - DLE = ... # type: 'QPagedPaintDevice.PageSize' - Folio = ... # type: 'QPagedPaintDevice.PageSize' - Ledger = ... # type: 'QPagedPaintDevice.PageSize' - Tabloid = ... # type: 'QPagedPaintDevice.PageSize' - Custom = ... # type: 'QPagedPaintDevice.PageSize' - A10 = ... # type: 'QPagedPaintDevice.PageSize' - A3Extra = ... # type: 'QPagedPaintDevice.PageSize' - A4Extra = ... # type: 'QPagedPaintDevice.PageSize' - A4Plus = ... # type: 'QPagedPaintDevice.PageSize' - A4Small = ... # type: 'QPagedPaintDevice.PageSize' - A5Extra = ... # type: 'QPagedPaintDevice.PageSize' - B5Extra = ... # type: 'QPagedPaintDevice.PageSize' - JisB0 = ... # type: 'QPagedPaintDevice.PageSize' - JisB1 = ... # type: 'QPagedPaintDevice.PageSize' - JisB2 = ... # type: 'QPagedPaintDevice.PageSize' - JisB3 = ... # type: 'QPagedPaintDevice.PageSize' - JisB4 = ... # type: 'QPagedPaintDevice.PageSize' - JisB5 = ... # type: 'QPagedPaintDevice.PageSize' - JisB6 = ... # type: 'QPagedPaintDevice.PageSize' - JisB7 = ... # type: 'QPagedPaintDevice.PageSize' - JisB8 = ... # type: 'QPagedPaintDevice.PageSize' - JisB9 = ... # type: 'QPagedPaintDevice.PageSize' - JisB10 = ... # type: 'QPagedPaintDevice.PageSize' - AnsiC = ... # type: 'QPagedPaintDevice.PageSize' - AnsiD = ... # type: 'QPagedPaintDevice.PageSize' - AnsiE = ... # type: 'QPagedPaintDevice.PageSize' - LegalExtra = ... # type: 'QPagedPaintDevice.PageSize' - LetterExtra = ... # type: 'QPagedPaintDevice.PageSize' - LetterPlus = ... # type: 'QPagedPaintDevice.PageSize' - LetterSmall = ... # type: 'QPagedPaintDevice.PageSize' - TabloidExtra = ... # type: 'QPagedPaintDevice.PageSize' - ArchA = ... # type: 'QPagedPaintDevice.PageSize' - ArchB = ... # type: 'QPagedPaintDevice.PageSize' - ArchC = ... # type: 'QPagedPaintDevice.PageSize' - ArchD = ... # type: 'QPagedPaintDevice.PageSize' - ArchE = ... # type: 'QPagedPaintDevice.PageSize' - Imperial7x9 = ... # type: 'QPagedPaintDevice.PageSize' - Imperial8x10 = ... # type: 'QPagedPaintDevice.PageSize' - Imperial9x11 = ... # type: 'QPagedPaintDevice.PageSize' - Imperial9x12 = ... # type: 'QPagedPaintDevice.PageSize' - Imperial10x11 = ... # type: 'QPagedPaintDevice.PageSize' - Imperial10x13 = ... # type: 'QPagedPaintDevice.PageSize' - Imperial10x14 = ... # type: 'QPagedPaintDevice.PageSize' - Imperial12x11 = ... # type: 'QPagedPaintDevice.PageSize' - Imperial15x11 = ... # type: 'QPagedPaintDevice.PageSize' - ExecutiveStandard = ... # type: 'QPagedPaintDevice.PageSize' - Note = ... # type: 'QPagedPaintDevice.PageSize' - Quarto = ... # type: 'QPagedPaintDevice.PageSize' - Statement = ... # type: 'QPagedPaintDevice.PageSize' - SuperA = ... # type: 'QPagedPaintDevice.PageSize' - SuperB = ... # type: 'QPagedPaintDevice.PageSize' - Postcard = ... # type: 'QPagedPaintDevice.PageSize' - DoublePostcard = ... # type: 'QPagedPaintDevice.PageSize' - Prc16K = ... # type: 'QPagedPaintDevice.PageSize' - Prc32K = ... # type: 'QPagedPaintDevice.PageSize' - Prc32KBig = ... # type: 'QPagedPaintDevice.PageSize' - FanFoldUS = ... # type: 'QPagedPaintDevice.PageSize' - FanFoldGerman = ... # type: 'QPagedPaintDevice.PageSize' - FanFoldGermanLegal = ... # type: 'QPagedPaintDevice.PageSize' - EnvelopeB4 = ... # type: 'QPagedPaintDevice.PageSize' - EnvelopeB5 = ... # type: 'QPagedPaintDevice.PageSize' - EnvelopeB6 = ... # type: 'QPagedPaintDevice.PageSize' - EnvelopeC0 = ... # type: 'QPagedPaintDevice.PageSize' - EnvelopeC1 = ... # type: 'QPagedPaintDevice.PageSize' - EnvelopeC2 = ... # type: 'QPagedPaintDevice.PageSize' - EnvelopeC3 = ... # type: 'QPagedPaintDevice.PageSize' - EnvelopeC4 = ... # type: 'QPagedPaintDevice.PageSize' - EnvelopeC6 = ... # type: 'QPagedPaintDevice.PageSize' - EnvelopeC65 = ... # type: 'QPagedPaintDevice.PageSize' - EnvelopeC7 = ... # type: 'QPagedPaintDevice.PageSize' - Envelope9 = ... # type: 'QPagedPaintDevice.PageSize' - Envelope11 = ... # type: 'QPagedPaintDevice.PageSize' - Envelope12 = ... # type: 'QPagedPaintDevice.PageSize' - Envelope14 = ... # type: 'QPagedPaintDevice.PageSize' - EnvelopeMonarch = ... # type: 'QPagedPaintDevice.PageSize' - EnvelopePersonal = ... # type: 'QPagedPaintDevice.PageSize' - EnvelopeChou3 = ... # type: 'QPagedPaintDevice.PageSize' - EnvelopeChou4 = ... # type: 'QPagedPaintDevice.PageSize' - EnvelopeInvite = ... # type: 'QPagedPaintDevice.PageSize' - EnvelopeItalian = ... # type: 'QPagedPaintDevice.PageSize' - EnvelopeKaku2 = ... # type: 'QPagedPaintDevice.PageSize' - EnvelopeKaku3 = ... # type: 'QPagedPaintDevice.PageSize' - EnvelopePrc1 = ... # type: 'QPagedPaintDevice.PageSize' - EnvelopePrc2 = ... # type: 'QPagedPaintDevice.PageSize' - EnvelopePrc3 = ... # type: 'QPagedPaintDevice.PageSize' - EnvelopePrc4 = ... # type: 'QPagedPaintDevice.PageSize' - EnvelopePrc5 = ... # type: 'QPagedPaintDevice.PageSize' - EnvelopePrc6 = ... # type: 'QPagedPaintDevice.PageSize' - EnvelopePrc7 = ... # type: 'QPagedPaintDevice.PageSize' - EnvelopePrc8 = ... # type: 'QPagedPaintDevice.PageSize' - EnvelopePrc9 = ... # type: 'QPagedPaintDevice.PageSize' - EnvelopePrc10 = ... # type: 'QPagedPaintDevice.PageSize' - EnvelopeYou4 = ... # type: 'QPagedPaintDevice.PageSize' - NPaperSize = ... # type: 'QPagedPaintDevice.PageSize' - AnsiA = ... # type: 'QPagedPaintDevice.PageSize' - AnsiB = ... # type: 'QPagedPaintDevice.PageSize' - EnvelopeC5 = ... # type: 'QPagedPaintDevice.PageSize' - EnvelopeDL = ... # type: 'QPagedPaintDevice.PageSize' - Envelope10 = ... # type: 'QPagedPaintDevice.PageSize' - LastPageSize = ... # type: 'QPagedPaintDevice.PageSize' - - class Margins(sip.simplewrapper): - - bottom = ... # type: float - left = ... # type: float - right = ... # type: float - top = ... # type: float - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QPagedPaintDevice.Margins') -> None: ... - - def __init__(self) -> None: ... - - def pageLayout(self) -> 'QPageLayout': ... - @typing.overload - def setPageMargins(self, margins: QtCore.QMarginsF) -> bool: ... - @typing.overload - def setPageMargins(self, margins: QtCore.QMarginsF, units: 'QPageLayout.Unit') -> bool: ... - def setPageOrientation(self, orientation: 'QPageLayout.Orientation') -> bool: ... - def setPageLayout(self, pageLayout: 'QPageLayout') -> bool: ... - def margins(self) -> 'QPagedPaintDevice.Margins': ... - def setMargins(self, margins: 'QPagedPaintDevice.Margins') -> None: ... - def pageSizeMM(self) -> QtCore.QSizeF: ... - def setPageSizeMM(self, size: QtCore.QSizeF) -> None: ... - def pageSize(self) -> 'QPagedPaintDevice.PageSize': ... - @typing.overload - def setPageSize(self, size: 'QPagedPaintDevice.PageSize') -> None: ... - @typing.overload - def setPageSize(self, pageSize: 'QPageSize') -> bool: ... - def newPage(self) -> bool: ... - - -class QPageLayout(sip.simplewrapper): - - class Mode(int): ... - StandardMode = ... # type: 'QPageLayout.Mode' - FullPageMode = ... # type: 'QPageLayout.Mode' - - class Orientation(int): ... - Portrait = ... # type: 'QPageLayout.Orientation' - Landscape = ... # type: 'QPageLayout.Orientation' - - class Unit(int): ... - Millimeter = ... # type: 'QPageLayout.Unit' - Point = ... # type: 'QPageLayout.Unit' - Inch = ... # type: 'QPageLayout.Unit' - Pica = ... # type: 'QPageLayout.Unit' - Didot = ... # type: 'QPageLayout.Unit' - Cicero = ... # type: 'QPageLayout.Unit' - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, pageSize: 'QPageSize', orientation: 'QPageLayout.Orientation', margins: QtCore.QMarginsF, units: 'QPageLayout.Unit' = ..., minMargins: QtCore.QMarginsF = ...) -> None: ... - @typing.overload - def __init__(self, other: 'QPageLayout') -> None: ... - - def paintRectPixels(self, resolution: int) -> QtCore.QRect: ... - def paintRectPoints(self) -> QtCore.QRect: ... - @typing.overload - def paintRect(self) -> QtCore.QRectF: ... - @typing.overload - def paintRect(self, units: 'QPageLayout.Unit') -> QtCore.QRectF: ... - def fullRectPixels(self, resolution: int) -> QtCore.QRect: ... - def fullRectPoints(self) -> QtCore.QRect: ... - @typing.overload - def fullRect(self) -> QtCore.QRectF: ... - @typing.overload - def fullRect(self, units: 'QPageLayout.Unit') -> QtCore.QRectF: ... - def maximumMargins(self) -> QtCore.QMarginsF: ... - def minimumMargins(self) -> QtCore.QMarginsF: ... - def setMinimumMargins(self, minMargins: QtCore.QMarginsF) -> None: ... - def marginsPixels(self, resolution: int) -> QtCore.QMargins: ... - def marginsPoints(self) -> QtCore.QMargins: ... - @typing.overload - def margins(self) -> QtCore.QMarginsF: ... - @typing.overload - def margins(self, units: 'QPageLayout.Unit') -> QtCore.QMarginsF: ... - def setBottomMargin(self, bottomMargin: float) -> bool: ... - def setTopMargin(self, topMargin: float) -> bool: ... - def setRightMargin(self, rightMargin: float) -> bool: ... - def setLeftMargin(self, leftMargin: float) -> bool: ... - def setMargins(self, margins: QtCore.QMarginsF) -> bool: ... - def units(self) -> 'QPageLayout.Unit': ... - def setUnits(self, units: 'QPageLayout.Unit') -> None: ... - def orientation(self) -> 'QPageLayout.Orientation': ... - def setOrientation(self, orientation: 'QPageLayout.Orientation') -> None: ... - def pageSize(self) -> 'QPageSize': ... - def setPageSize(self, pageSize: 'QPageSize', minMargins: QtCore.QMarginsF = ...) -> None: ... - def mode(self) -> 'QPageLayout.Mode': ... - def setMode(self, mode: 'QPageLayout.Mode') -> None: ... - def isValid(self) -> bool: ... - def isEquivalentTo(self, other: 'QPageLayout') -> bool: ... - def swap(self, other: 'QPageLayout') -> None: ... - - -class QPageSize(sip.simplewrapper): - - class SizeMatchPolicy(int): ... - FuzzyMatch = ... # type: 'QPageSize.SizeMatchPolicy' - FuzzyOrientationMatch = ... # type: 'QPageSize.SizeMatchPolicy' - ExactMatch = ... # type: 'QPageSize.SizeMatchPolicy' - - class Unit(int): ... - Millimeter = ... # type: 'QPageSize.Unit' - Point = ... # type: 'QPageSize.Unit' - Inch = ... # type: 'QPageSize.Unit' - Pica = ... # type: 'QPageSize.Unit' - Didot = ... # type: 'QPageSize.Unit' - Cicero = ... # type: 'QPageSize.Unit' - - class PageSizeId(int): ... - A4 = ... # type: 'QPageSize.PageSizeId' - B5 = ... # type: 'QPageSize.PageSizeId' - Letter = ... # type: 'QPageSize.PageSizeId' - Legal = ... # type: 'QPageSize.PageSizeId' - Executive = ... # type: 'QPageSize.PageSizeId' - A0 = ... # type: 'QPageSize.PageSizeId' - A1 = ... # type: 'QPageSize.PageSizeId' - A2 = ... # type: 'QPageSize.PageSizeId' - A3 = ... # type: 'QPageSize.PageSizeId' - A5 = ... # type: 'QPageSize.PageSizeId' - A6 = ... # type: 'QPageSize.PageSizeId' - A7 = ... # type: 'QPageSize.PageSizeId' - A8 = ... # type: 'QPageSize.PageSizeId' - A9 = ... # type: 'QPageSize.PageSizeId' - B0 = ... # type: 'QPageSize.PageSizeId' - B1 = ... # type: 'QPageSize.PageSizeId' - B10 = ... # type: 'QPageSize.PageSizeId' - B2 = ... # type: 'QPageSize.PageSizeId' - B3 = ... # type: 'QPageSize.PageSizeId' - B4 = ... # type: 'QPageSize.PageSizeId' - B6 = ... # type: 'QPageSize.PageSizeId' - B7 = ... # type: 'QPageSize.PageSizeId' - B8 = ... # type: 'QPageSize.PageSizeId' - B9 = ... # type: 'QPageSize.PageSizeId' - C5E = ... # type: 'QPageSize.PageSizeId' - Comm10E = ... # type: 'QPageSize.PageSizeId' - DLE = ... # type: 'QPageSize.PageSizeId' - Folio = ... # type: 'QPageSize.PageSizeId' - Ledger = ... # type: 'QPageSize.PageSizeId' - Tabloid = ... # type: 'QPageSize.PageSizeId' - Custom = ... # type: 'QPageSize.PageSizeId' - A10 = ... # type: 'QPageSize.PageSizeId' - A3Extra = ... # type: 'QPageSize.PageSizeId' - A4Extra = ... # type: 'QPageSize.PageSizeId' - A4Plus = ... # type: 'QPageSize.PageSizeId' - A4Small = ... # type: 'QPageSize.PageSizeId' - A5Extra = ... # type: 'QPageSize.PageSizeId' - B5Extra = ... # type: 'QPageSize.PageSizeId' - JisB0 = ... # type: 'QPageSize.PageSizeId' - JisB1 = ... # type: 'QPageSize.PageSizeId' - JisB2 = ... # type: 'QPageSize.PageSizeId' - JisB3 = ... # type: 'QPageSize.PageSizeId' - JisB4 = ... # type: 'QPageSize.PageSizeId' - JisB5 = ... # type: 'QPageSize.PageSizeId' - JisB6 = ... # type: 'QPageSize.PageSizeId' - JisB7 = ... # type: 'QPageSize.PageSizeId' - JisB8 = ... # type: 'QPageSize.PageSizeId' - JisB9 = ... # type: 'QPageSize.PageSizeId' - JisB10 = ... # type: 'QPageSize.PageSizeId' - AnsiC = ... # type: 'QPageSize.PageSizeId' - AnsiD = ... # type: 'QPageSize.PageSizeId' - AnsiE = ... # type: 'QPageSize.PageSizeId' - LegalExtra = ... # type: 'QPageSize.PageSizeId' - LetterExtra = ... # type: 'QPageSize.PageSizeId' - LetterPlus = ... # type: 'QPageSize.PageSizeId' - LetterSmall = ... # type: 'QPageSize.PageSizeId' - TabloidExtra = ... # type: 'QPageSize.PageSizeId' - ArchA = ... # type: 'QPageSize.PageSizeId' - ArchB = ... # type: 'QPageSize.PageSizeId' - ArchC = ... # type: 'QPageSize.PageSizeId' - ArchD = ... # type: 'QPageSize.PageSizeId' - ArchE = ... # type: 'QPageSize.PageSizeId' - Imperial7x9 = ... # type: 'QPageSize.PageSizeId' - Imperial8x10 = ... # type: 'QPageSize.PageSizeId' - Imperial9x11 = ... # type: 'QPageSize.PageSizeId' - Imperial9x12 = ... # type: 'QPageSize.PageSizeId' - Imperial10x11 = ... # type: 'QPageSize.PageSizeId' - Imperial10x13 = ... # type: 'QPageSize.PageSizeId' - Imperial10x14 = ... # type: 'QPageSize.PageSizeId' - Imperial12x11 = ... # type: 'QPageSize.PageSizeId' - Imperial15x11 = ... # type: 'QPageSize.PageSizeId' - ExecutiveStandard = ... # type: 'QPageSize.PageSizeId' - Note = ... # type: 'QPageSize.PageSizeId' - Quarto = ... # type: 'QPageSize.PageSizeId' - Statement = ... # type: 'QPageSize.PageSizeId' - SuperA = ... # type: 'QPageSize.PageSizeId' - SuperB = ... # type: 'QPageSize.PageSizeId' - Postcard = ... # type: 'QPageSize.PageSizeId' - DoublePostcard = ... # type: 'QPageSize.PageSizeId' - Prc16K = ... # type: 'QPageSize.PageSizeId' - Prc32K = ... # type: 'QPageSize.PageSizeId' - Prc32KBig = ... # type: 'QPageSize.PageSizeId' - FanFoldUS = ... # type: 'QPageSize.PageSizeId' - FanFoldGerman = ... # type: 'QPageSize.PageSizeId' - FanFoldGermanLegal = ... # type: 'QPageSize.PageSizeId' - EnvelopeB4 = ... # type: 'QPageSize.PageSizeId' - EnvelopeB5 = ... # type: 'QPageSize.PageSizeId' - EnvelopeB6 = ... # type: 'QPageSize.PageSizeId' - EnvelopeC0 = ... # type: 'QPageSize.PageSizeId' - EnvelopeC1 = ... # type: 'QPageSize.PageSizeId' - EnvelopeC2 = ... # type: 'QPageSize.PageSizeId' - EnvelopeC3 = ... # type: 'QPageSize.PageSizeId' - EnvelopeC4 = ... # type: 'QPageSize.PageSizeId' - EnvelopeC6 = ... # type: 'QPageSize.PageSizeId' - EnvelopeC65 = ... # type: 'QPageSize.PageSizeId' - EnvelopeC7 = ... # type: 'QPageSize.PageSizeId' - Envelope9 = ... # type: 'QPageSize.PageSizeId' - Envelope11 = ... # type: 'QPageSize.PageSizeId' - Envelope12 = ... # type: 'QPageSize.PageSizeId' - Envelope14 = ... # type: 'QPageSize.PageSizeId' - EnvelopeMonarch = ... # type: 'QPageSize.PageSizeId' - EnvelopePersonal = ... # type: 'QPageSize.PageSizeId' - EnvelopeChou3 = ... # type: 'QPageSize.PageSizeId' - EnvelopeChou4 = ... # type: 'QPageSize.PageSizeId' - EnvelopeInvite = ... # type: 'QPageSize.PageSizeId' - EnvelopeItalian = ... # type: 'QPageSize.PageSizeId' - EnvelopeKaku2 = ... # type: 'QPageSize.PageSizeId' - EnvelopeKaku3 = ... # type: 'QPageSize.PageSizeId' - EnvelopePrc1 = ... # type: 'QPageSize.PageSizeId' - EnvelopePrc2 = ... # type: 'QPageSize.PageSizeId' - EnvelopePrc3 = ... # type: 'QPageSize.PageSizeId' - EnvelopePrc4 = ... # type: 'QPageSize.PageSizeId' - EnvelopePrc5 = ... # type: 'QPageSize.PageSizeId' - EnvelopePrc6 = ... # type: 'QPageSize.PageSizeId' - EnvelopePrc7 = ... # type: 'QPageSize.PageSizeId' - EnvelopePrc8 = ... # type: 'QPageSize.PageSizeId' - EnvelopePrc9 = ... # type: 'QPageSize.PageSizeId' - EnvelopePrc10 = ... # type: 'QPageSize.PageSizeId' - EnvelopeYou4 = ... # type: 'QPageSize.PageSizeId' - NPageSize = ... # type: 'QPageSize.PageSizeId' - NPaperSize = ... # type: 'QPageSize.PageSizeId' - AnsiA = ... # type: 'QPageSize.PageSizeId' - AnsiB = ... # type: 'QPageSize.PageSizeId' - EnvelopeC5 = ... # type: 'QPageSize.PageSizeId' - EnvelopeDL = ... # type: 'QPageSize.PageSizeId' - Envelope10 = ... # type: 'QPageSize.PageSizeId' - LastPageSize = ... # type: 'QPageSize.PageSizeId' - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, pageSizeId: 'QPageSize.PageSizeId') -> None: ... - @typing.overload - def __init__(self, pointSize: QtCore.QSize, name: str = ..., matchPolicy: 'QPageSize.SizeMatchPolicy' = ...) -> None: ... - @typing.overload - def __init__(self, size: QtCore.QSizeF, units: 'QPageSize.Unit', name: str = ..., matchPolicy: 'QPageSize.SizeMatchPolicy' = ...) -> None: ... - @typing.overload - def __init__(self, other: 'QPageSize') -> None: ... - - def rectPixels(self, resolution: int) -> QtCore.QRect: ... - def rectPoints(self) -> QtCore.QRect: ... - def rect(self, units: 'QPageSize.Unit') -> QtCore.QRectF: ... - @typing.overload - def sizePixels(self, resolution: int) -> QtCore.QSize: ... - @typing.overload - @staticmethod - def sizePixels(pageSizeId: 'QPageSize.PageSizeId', resolution: int) -> QtCore.QSize: ... - @typing.overload - def sizePoints(self) -> QtCore.QSize: ... - @typing.overload - @staticmethod - def sizePoints(pageSizeId: 'QPageSize.PageSizeId') -> QtCore.QSize: ... - @typing.overload - def size(self, units: 'QPageSize.Unit') -> QtCore.QSizeF: ... - @typing.overload - @staticmethod - def size(pageSizeId: 'QPageSize.PageSizeId', units: 'QPageSize.Unit') -> QtCore.QSizeF: ... - @typing.overload - def definitionUnits(self) -> 'QPageSize.Unit': ... - @typing.overload - @staticmethod - def definitionUnits(pageSizeId: 'QPageSize.PageSizeId') -> 'QPageSize.Unit': ... - @typing.overload - def definitionSize(self) -> QtCore.QSizeF: ... - @typing.overload - @staticmethod - def definitionSize(pageSizeId: 'QPageSize.PageSizeId') -> QtCore.QSizeF: ... - @typing.overload - def windowsId(self) -> int: ... - @typing.overload - @staticmethod - def windowsId(pageSizeId: 'QPageSize.PageSizeId') -> int: ... - @typing.overload - def id(self) -> 'QPageSize.PageSizeId': ... - @typing.overload - @staticmethod - def id(pointSize: QtCore.QSize, matchPolicy: 'QPageSize.SizeMatchPolicy' = ...) -> 'QPageSize.PageSizeId': ... - @typing.overload - @staticmethod - def id(size: QtCore.QSizeF, units: 'QPageSize.Unit', matchPolicy: 'QPageSize.SizeMatchPolicy' = ...) -> 'QPageSize.PageSizeId': ... - @typing.overload - @staticmethod - def id(windowsId: int) -> 'QPageSize.PageSizeId': ... - @typing.overload - def name(self) -> str: ... - @typing.overload - @staticmethod - def name(pageSizeId: 'QPageSize.PageSizeId') -> str: ... - @typing.overload - def key(self) -> str: ... - @typing.overload - @staticmethod - def key(pageSizeId: 'QPageSize.PageSizeId') -> str: ... - def isValid(self) -> bool: ... - def isEquivalentTo(self, other: 'QPageSize') -> bool: ... - def swap(self, other: 'QPageSize') -> None: ... - - -class QPainter(sip.simplewrapper): - - class PixmapFragmentHint(int): ... - OpaqueHint = ... # type: 'QPainter.PixmapFragmentHint' - - class CompositionMode(int): ... - CompositionMode_SourceOver = ... # type: 'QPainter.CompositionMode' - CompositionMode_DestinationOver = ... # type: 'QPainter.CompositionMode' - CompositionMode_Clear = ... # type: 'QPainter.CompositionMode' - CompositionMode_Source = ... # type: 'QPainter.CompositionMode' - CompositionMode_Destination = ... # type: 'QPainter.CompositionMode' - CompositionMode_SourceIn = ... # type: 'QPainter.CompositionMode' - CompositionMode_DestinationIn = ... # type: 'QPainter.CompositionMode' - CompositionMode_SourceOut = ... # type: 'QPainter.CompositionMode' - CompositionMode_DestinationOut = ... # type: 'QPainter.CompositionMode' - CompositionMode_SourceAtop = ... # type: 'QPainter.CompositionMode' - CompositionMode_DestinationAtop = ... # type: 'QPainter.CompositionMode' - CompositionMode_Xor = ... # type: 'QPainter.CompositionMode' - CompositionMode_Plus = ... # type: 'QPainter.CompositionMode' - CompositionMode_Multiply = ... # type: 'QPainter.CompositionMode' - CompositionMode_Screen = ... # type: 'QPainter.CompositionMode' - CompositionMode_Overlay = ... # type: 'QPainter.CompositionMode' - CompositionMode_Darken = ... # type: 'QPainter.CompositionMode' - CompositionMode_Lighten = ... # type: 'QPainter.CompositionMode' - CompositionMode_ColorDodge = ... # type: 'QPainter.CompositionMode' - CompositionMode_ColorBurn = ... # type: 'QPainter.CompositionMode' - CompositionMode_HardLight = ... # type: 'QPainter.CompositionMode' - CompositionMode_SoftLight = ... # type: 'QPainter.CompositionMode' - CompositionMode_Difference = ... # type: 'QPainter.CompositionMode' - CompositionMode_Exclusion = ... # type: 'QPainter.CompositionMode' - RasterOp_SourceOrDestination = ... # type: 'QPainter.CompositionMode' - RasterOp_SourceAndDestination = ... # type: 'QPainter.CompositionMode' - RasterOp_SourceXorDestination = ... # type: 'QPainter.CompositionMode' - RasterOp_NotSourceAndNotDestination = ... # type: 'QPainter.CompositionMode' - RasterOp_NotSourceOrNotDestination = ... # type: 'QPainter.CompositionMode' - RasterOp_NotSourceXorDestination = ... # type: 'QPainter.CompositionMode' - RasterOp_NotSource = ... # type: 'QPainter.CompositionMode' - RasterOp_NotSourceAndDestination = ... # type: 'QPainter.CompositionMode' - RasterOp_SourceAndNotDestination = ... # type: 'QPainter.CompositionMode' - RasterOp_NotSourceOrDestination = ... # type: 'QPainter.CompositionMode' - RasterOp_SourceOrNotDestination = ... # type: 'QPainter.CompositionMode' - RasterOp_ClearDestination = ... # type: 'QPainter.CompositionMode' - RasterOp_SetDestination = ... # type: 'QPainter.CompositionMode' - RasterOp_NotDestination = ... # type: 'QPainter.CompositionMode' - - class RenderHint(int): ... - Antialiasing = ... # type: 'QPainter.RenderHint' - TextAntialiasing = ... # type: 'QPainter.RenderHint' - SmoothPixmapTransform = ... # type: 'QPainter.RenderHint' - HighQualityAntialiasing = ... # type: 'QPainter.RenderHint' - NonCosmeticDefaultPen = ... # type: 'QPainter.RenderHint' - Qt4CompatiblePainting = ... # type: 'QPainter.RenderHint' - - class RenderHints(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QPainter.RenderHints', 'QPainter.RenderHint']) -> None: ... - @typing.overload - def __init__(self, a0: 'QPainter.RenderHints') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QPainter.RenderHints': ... - def __int__(self) -> int: ... - - class PixmapFragment(sip.simplewrapper): - - height = ... # type: float - opacity = ... # type: float - rotation = ... # type: float - scaleX = ... # type: float - scaleY = ... # type: float - sourceLeft = ... # type: float - sourceTop = ... # type: float - width = ... # type: float - x = ... # type: float - y = ... # type: float - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QPainter.PixmapFragment') -> None: ... - - @staticmethod - def create(pos: typing.Union[QtCore.QPointF, QtCore.QPoint], sourceRect: QtCore.QRectF, scaleX: float = ..., scaleY: float = ..., rotation: float = ..., opacity: float = ...) -> 'QPainter.PixmapFragment': ... - - class PixmapFragmentHints(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QPainter.PixmapFragmentHints', 'QPainter.PixmapFragmentHint']) -> None: ... - @typing.overload - def __init__(self, a0: 'QPainter.PixmapFragmentHints') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QPainter.PixmapFragmentHints': ... - def __int__(self) -> int: ... - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: QPaintDevice) -> None: ... - - def drawGlyphRun(self, position: typing.Union[QtCore.QPointF, QtCore.QPoint], glyphRun: QGlyphRun) -> None: ... - def clipBoundingRect(self) -> QtCore.QRectF: ... - @typing.overload - def drawStaticText(self, topLeftPosition: typing.Union[QtCore.QPointF, QtCore.QPoint], staticText: 'QStaticText') -> None: ... - @typing.overload - def drawStaticText(self, p: QtCore.QPoint, staticText: 'QStaticText') -> None: ... - @typing.overload - def drawStaticText(self, x: int, y: int, staticText: 'QStaticText') -> None: ... - def drawPixmapFragments(self, fragments: typing.List['QPainter.PixmapFragment'], pixmap: QPixmap, hints: 'QPainter.PixmapFragmentHints' = ...) -> None: ... - def endNativePainting(self) -> None: ... - def beginNativePainting(self) -> None: ... - @typing.overload - def drawRoundedRect(self, rect: QtCore.QRectF, xRadius: float, yRadius: float, mode: QtCore.Qt.SizeMode = ...) -> None: ... - @typing.overload - def drawRoundedRect(self, x: int, y: int, w: int, h: int, xRadius: float, yRadius: float, mode: QtCore.Qt.SizeMode = ...) -> None: ... - @typing.overload - def drawRoundedRect(self, rect: QtCore.QRect, xRadius: float, yRadius: float, mode: QtCore.Qt.SizeMode = ...) -> None: ... - def testRenderHint(self, hint: 'QPainter.RenderHint') -> bool: ... - def combinedTransform(self) -> 'QTransform': ... - def worldTransform(self) -> 'QTransform': ... - def setWorldTransform(self, matrix: 'QTransform', combine: bool = ...) -> None: ... - def resetTransform(self) -> None: ... - def deviceTransform(self) -> 'QTransform': ... - def transform(self) -> 'QTransform': ... - def setTransform(self, transform: 'QTransform', combine: bool = ...) -> None: ... - def setWorldMatrixEnabled(self, enabled: bool) -> None: ... - def worldMatrixEnabled(self) -> bool: ... - def setOpacity(self, opacity: float) -> None: ... - def opacity(self) -> float: ... - @typing.overload - def drawImage(self, targetRect: QtCore.QRectF, image: QImage, sourceRect: QtCore.QRectF, flags: typing.Union[QtCore.Qt.ImageConversionFlags, QtCore.Qt.ImageConversionFlag] = ...) -> None: ... - @typing.overload - def drawImage(self, targetRect: QtCore.QRect, image: QImage, sourceRect: QtCore.QRect, flags: typing.Union[QtCore.Qt.ImageConversionFlags, QtCore.Qt.ImageConversionFlag] = ...) -> None: ... - @typing.overload - def drawImage(self, p: typing.Union[QtCore.QPointF, QtCore.QPoint], image: QImage, sr: QtCore.QRectF, flags: typing.Union[QtCore.Qt.ImageConversionFlags, QtCore.Qt.ImageConversionFlag] = ...) -> None: ... - @typing.overload - def drawImage(self, p: QtCore.QPoint, image: QImage, sr: QtCore.QRect, flags: typing.Union[QtCore.Qt.ImageConversionFlags, QtCore.Qt.ImageConversionFlag] = ...) -> None: ... - @typing.overload - def drawImage(self, r: QtCore.QRectF, image: QImage) -> None: ... - @typing.overload - def drawImage(self, r: QtCore.QRect, image: QImage) -> None: ... - @typing.overload - def drawImage(self, p: typing.Union[QtCore.QPointF, QtCore.QPoint], image: QImage) -> None: ... - @typing.overload - def drawImage(self, p: QtCore.QPoint, image: QImage) -> None: ... - @typing.overload - def drawImage(self, x: int, y: int, image: QImage, sx: int = ..., sy: int = ..., sw: int = ..., sh: int = ..., flags: typing.Union[QtCore.Qt.ImageConversionFlags, QtCore.Qt.ImageConversionFlag] = ...) -> None: ... - @typing.overload - def drawPoint(self, p: typing.Union[QtCore.QPointF, QtCore.QPoint]) -> None: ... - @typing.overload - def drawPoint(self, x: int, y: int) -> None: ... - @typing.overload - def drawPoint(self, p: QtCore.QPoint) -> None: ... - @typing.overload - def drawRect(self, rect: QtCore.QRectF) -> None: ... - @typing.overload - def drawRect(self, x: int, y: int, w: int, h: int) -> None: ... - @typing.overload - def drawRect(self, r: QtCore.QRect) -> None: ... - @typing.overload - def drawLine(self, l: QtCore.QLineF) -> None: ... - @typing.overload - def drawLine(self, line: QtCore.QLine) -> None: ... - @typing.overload - def drawLine(self, x1: int, y1: int, x2: int, y2: int) -> None: ... - @typing.overload - def drawLine(self, p1: QtCore.QPoint, p2: QtCore.QPoint) -> None: ... - @typing.overload - def drawLine(self, p1: typing.Union[QtCore.QPointF, QtCore.QPoint], p2: typing.Union[QtCore.QPointF, QtCore.QPoint]) -> None: ... - def paintEngine(self) -> 'QPaintEngine': ... - def setRenderHints(self, hints: typing.Union['QPainter.RenderHints', 'QPainter.RenderHint'], on: bool = ...) -> None: ... - def renderHints(self) -> 'QPainter.RenderHints': ... - def setRenderHint(self, hint: 'QPainter.RenderHint', on: bool = ...) -> None: ... - @typing.overload - def eraseRect(self, a0: QtCore.QRectF) -> None: ... - @typing.overload - def eraseRect(self, rect: QtCore.QRect) -> None: ... - @typing.overload - def eraseRect(self, x: int, y: int, w: int, h: int) -> None: ... - @typing.overload - def fillRect(self, a0: QtCore.QRectF, a1: typing.Union[QBrush, QColor, QtCore.Qt.GlobalColor, QGradient]) -> None: ... - @typing.overload - def fillRect(self, a0: QtCore.QRect, a1: typing.Union[QBrush, QColor, QtCore.Qt.GlobalColor, QGradient]) -> None: ... - @typing.overload - def fillRect(self, x: int, y: int, w: int, h: int, b: typing.Union[QBrush, QColor, QtCore.Qt.GlobalColor, QGradient]) -> None: ... - @typing.overload - def fillRect(self, a0: QtCore.QRectF, color: typing.Union[QColor, QtCore.Qt.GlobalColor, QGradient]) -> None: ... - @typing.overload - def fillRect(self, a0: QtCore.QRect, color: typing.Union[QColor, QtCore.Qt.GlobalColor, QGradient]) -> None: ... - @typing.overload - def fillRect(self, x: int, y: int, w: int, h: int, b: typing.Union[QColor, QtCore.Qt.GlobalColor, QGradient]) -> None: ... - @typing.overload - def fillRect(self, x: int, y: int, w: int, h: int, c: QtCore.Qt.GlobalColor) -> None: ... - @typing.overload - def fillRect(self, r: QtCore.QRect, c: QtCore.Qt.GlobalColor) -> None: ... - @typing.overload - def fillRect(self, r: QtCore.QRectF, c: QtCore.Qt.GlobalColor) -> None: ... - @typing.overload - def fillRect(self, x: int, y: int, w: int, h: int, style: QtCore.Qt.BrushStyle) -> None: ... - @typing.overload - def fillRect(self, r: QtCore.QRect, style: QtCore.Qt.BrushStyle) -> None: ... - @typing.overload - def fillRect(self, r: QtCore.QRectF, style: QtCore.Qt.BrushStyle) -> None: ... - @typing.overload - def boundingRect(self, rect: QtCore.QRectF, flags: int, text: str) -> QtCore.QRectF: ... - @typing.overload - def boundingRect(self, rect: QtCore.QRect, flags: int, text: str) -> QtCore.QRect: ... - @typing.overload - def boundingRect(self, rectangle: QtCore.QRectF, text: str, option: 'QTextOption' = ...) -> QtCore.QRectF: ... - @typing.overload - def boundingRect(self, x: int, y: int, w: int, h: int, flags: int, text: str) -> QtCore.QRect: ... - @typing.overload - def drawText(self, p: typing.Union[QtCore.QPointF, QtCore.QPoint], s: str) -> None: ... - @typing.overload - def drawText(self, rectangle: QtCore.QRectF, flags: int, text: str) -> QtCore.QRectF: ... - @typing.overload - def drawText(self, rectangle: QtCore.QRect, flags: int, text: str) -> QtCore.QRect: ... - @typing.overload - def drawText(self, rectangle: QtCore.QRectF, text: str, option: 'QTextOption' = ...) -> None: ... - @typing.overload - def drawText(self, p: QtCore.QPoint, s: str) -> None: ... - @typing.overload - def drawText(self, x: int, y: int, width: int, height: int, flags: int, text: str) -> QtCore.QRect: ... - @typing.overload - def drawText(self, x: int, y: int, s: str) -> None: ... - def layoutDirection(self) -> QtCore.Qt.LayoutDirection: ... - def setLayoutDirection(self, direction: QtCore.Qt.LayoutDirection) -> None: ... - @typing.overload - def drawPixmap(self, targetRect: QtCore.QRectF, pixmap: QPixmap, sourceRect: QtCore.QRectF) -> None: ... - @typing.overload - def drawPixmap(self, targetRect: QtCore.QRect, pixmap: QPixmap, sourceRect: QtCore.QRect) -> None: ... - @typing.overload - def drawPixmap(self, p: typing.Union[QtCore.QPointF, QtCore.QPoint], pm: QPixmap) -> None: ... - @typing.overload - def drawPixmap(self, p: QtCore.QPoint, pm: QPixmap) -> None: ... - @typing.overload - def drawPixmap(self, r: QtCore.QRect, pm: QPixmap) -> None: ... - @typing.overload - def drawPixmap(self, x: int, y: int, pm: QPixmap) -> None: ... - @typing.overload - def drawPixmap(self, x: int, y: int, w: int, h: int, pm: QPixmap) -> None: ... - @typing.overload - def drawPixmap(self, x: int, y: int, w: int, h: int, pm: QPixmap, sx: int, sy: int, sw: int, sh: int) -> None: ... - @typing.overload - def drawPixmap(self, x: int, y: int, pm: QPixmap, sx: int, sy: int, sw: int, sh: int) -> None: ... - @typing.overload - def drawPixmap(self, p: typing.Union[QtCore.QPointF, QtCore.QPoint], pm: QPixmap, sr: QtCore.QRectF) -> None: ... - @typing.overload - def drawPixmap(self, p: QtCore.QPoint, pm: QPixmap, sr: QtCore.QRect) -> None: ... - @typing.overload - def drawPicture(self, p: typing.Union[QtCore.QPointF, QtCore.QPoint], picture: 'QPicture') -> None: ... - @typing.overload - def drawPicture(self, x: int, y: int, p: 'QPicture') -> None: ... - @typing.overload - def drawPicture(self, pt: QtCore.QPoint, p: 'QPicture') -> None: ... - @typing.overload - def drawTiledPixmap(self, rectangle: QtCore.QRectF, pixmap: QPixmap, pos: typing.Union[QtCore.QPointF, QtCore.QPoint] = ...) -> None: ... - @typing.overload - def drawTiledPixmap(self, rectangle: QtCore.QRect, pixmap: QPixmap, pos: QtCore.QPoint = ...) -> None: ... - @typing.overload - def drawTiledPixmap(self, x: int, y: int, width: int, height: int, pixmap: QPixmap, sx: int = ..., sy: int = ...) -> None: ... - @typing.overload - def drawChord(self, rect: QtCore.QRectF, a: int, alen: int) -> None: ... - @typing.overload - def drawChord(self, rect: QtCore.QRect, a: int, alen: int) -> None: ... - @typing.overload - def drawChord(self, x: int, y: int, w: int, h: int, a: int, alen: int) -> None: ... - @typing.overload - def drawPie(self, rect: QtCore.QRectF, a: int, alen: int) -> None: ... - @typing.overload - def drawPie(self, rect: QtCore.QRect, a: int, alen: int) -> None: ... - @typing.overload - def drawPie(self, x: int, y: int, w: int, h: int, a: int, alen: int) -> None: ... - @typing.overload - def drawArc(self, rect: QtCore.QRectF, a: int, alen: int) -> None: ... - @typing.overload - def drawArc(self, r: QtCore.QRect, a: int, alen: int) -> None: ... - @typing.overload - def drawArc(self, x: int, y: int, w: int, h: int, a: int, alen: int) -> None: ... - @typing.overload - def drawConvexPolygon(self, point: typing.Union[QtCore.QPointF, QtCore.QPoint], *a1) -> None: ... - @typing.overload - def drawConvexPolygon(self, poly: 'QPolygonF') -> None: ... - @typing.overload - def drawConvexPolygon(self, point: QtCore.QPoint, *a1) -> None: ... - @typing.overload - def drawConvexPolygon(self, poly: 'QPolygon') -> None: ... - @typing.overload - def drawPolygon(self, point: typing.Union[QtCore.QPointF, QtCore.QPoint], *a1) -> None: ... - @typing.overload - def drawPolygon(self, points: 'QPolygonF', fillRule: QtCore.Qt.FillRule = ...) -> None: ... - @typing.overload - def drawPolygon(self, point: QtCore.QPoint, *a1) -> None: ... - @typing.overload - def drawPolygon(self, points: 'QPolygon', fillRule: QtCore.Qt.FillRule = ...) -> None: ... - @typing.overload - def drawPolyline(self, point: typing.Union[QtCore.QPointF, QtCore.QPoint], *a1) -> None: ... - @typing.overload - def drawPolyline(self, polyline: 'QPolygonF') -> None: ... - @typing.overload - def drawPolyline(self, point: QtCore.QPoint, *a1) -> None: ... - @typing.overload - def drawPolyline(self, polyline: 'QPolygon') -> None: ... - @typing.overload - def drawEllipse(self, r: QtCore.QRectF) -> None: ... - @typing.overload - def drawEllipse(self, r: QtCore.QRect) -> None: ... - @typing.overload - def drawEllipse(self, x: int, y: int, w: int, h: int) -> None: ... - @typing.overload - def drawEllipse(self, center: typing.Union[QtCore.QPointF, QtCore.QPoint], rx: float, ry: float) -> None: ... - @typing.overload - def drawEllipse(self, center: QtCore.QPoint, rx: int, ry: int) -> None: ... - @typing.overload - def drawRects(self, rect: QtCore.QRectF, *a1) -> None: ... - @typing.overload - def drawRects(self, rects: typing.Any) -> None: ... - @typing.overload - def drawRects(self, rect: QtCore.QRect, *a1) -> None: ... - @typing.overload - def drawRects(self, rects: typing.Any) -> None: ... - @typing.overload - def drawLines(self, line: QtCore.QLineF, *a1) -> None: ... - @typing.overload - def drawLines(self, lines: typing.Any) -> None: ... - @typing.overload - def drawLines(self, pointPair: typing.Union[QtCore.QPointF, QtCore.QPoint], *a1) -> None: ... - @typing.overload - def drawLines(self, pointPairs: typing.Iterable[typing.Union[QtCore.QPointF, QtCore.QPoint]]) -> None: ... - @typing.overload - def drawLines(self, line: QtCore.QLine, *a1) -> None: ... - @typing.overload - def drawLines(self, lines: typing.Any) -> None: ... - @typing.overload - def drawLines(self, pointPair: QtCore.QPoint, *a1) -> None: ... - @typing.overload - def drawLines(self, pointPairs: typing.Any) -> None: ... - @typing.overload - def drawPoints(self, point: typing.Union[QtCore.QPointF, QtCore.QPoint], *a1) -> None: ... - @typing.overload - def drawPoints(self, points: 'QPolygonF') -> None: ... - @typing.overload - def drawPoints(self, point: QtCore.QPoint, *a1) -> None: ... - @typing.overload - def drawPoints(self, points: 'QPolygon') -> None: ... - def drawPath(self, path: 'QPainterPath') -> None: ... - def fillPath(self, path: 'QPainterPath', brush: typing.Union[QBrush, QColor, QtCore.Qt.GlobalColor, QGradient]) -> None: ... - def strokePath(self, path: 'QPainterPath', pen: typing.Union['QPen', QColor, QtCore.Qt.GlobalColor, QGradient]) -> None: ... - def viewTransformEnabled(self) -> bool: ... - def setViewTransformEnabled(self, enable: bool) -> None: ... - @typing.overload - def setViewport(self, viewport: QtCore.QRect) -> None: ... - @typing.overload - def setViewport(self, x: int, y: int, w: int, h: int) -> None: ... - def viewport(self) -> QtCore.QRect: ... - @typing.overload - def setWindow(self, window: QtCore.QRect) -> None: ... - @typing.overload - def setWindow(self, x: int, y: int, w: int, h: int) -> None: ... - def window(self) -> QtCore.QRect: ... - @typing.overload - def translate(self, offset: typing.Union[QtCore.QPointF, QtCore.QPoint]) -> None: ... - @typing.overload - def translate(self, dx: float, dy: float) -> None: ... - @typing.overload - def translate(self, offset: QtCore.QPoint) -> None: ... - def rotate(self, a: float) -> None: ... - def shear(self, sh: float, sv: float) -> None: ... - def scale(self, sx: float, sy: float) -> None: ... - def restore(self) -> None: ... - def save(self) -> None: ... - def hasClipping(self) -> bool: ... - def setClipping(self, enable: bool) -> None: ... - def setClipPath(self, path: 'QPainterPath', operation: QtCore.Qt.ClipOperation = ...) -> None: ... - def setClipRegion(self, region: 'QRegion', operation: QtCore.Qt.ClipOperation = ...) -> None: ... - @typing.overload - def setClipRect(self, rectangle: QtCore.QRectF, operation: QtCore.Qt.ClipOperation = ...) -> None: ... - @typing.overload - def setClipRect(self, x: int, y: int, width: int, height: int, operation: QtCore.Qt.ClipOperation = ...) -> None: ... - @typing.overload - def setClipRect(self, rectangle: QtCore.QRect, operation: QtCore.Qt.ClipOperation = ...) -> None: ... - def clipPath(self) -> 'QPainterPath': ... - def clipRegion(self) -> 'QRegion': ... - def background(self) -> QBrush: ... - def setBackground(self, bg: typing.Union[QBrush, QColor, QtCore.Qt.GlobalColor, QGradient]) -> None: ... - @typing.overload - def setBrushOrigin(self, a0: typing.Union[QtCore.QPointF, QtCore.QPoint]) -> None: ... - @typing.overload - def setBrushOrigin(self, x: int, y: int) -> None: ... - @typing.overload - def setBrushOrigin(self, p: QtCore.QPoint) -> None: ... - def brushOrigin(self) -> QtCore.QPoint: ... - def backgroundMode(self) -> QtCore.Qt.BGMode: ... - def setBackgroundMode(self, mode: QtCore.Qt.BGMode) -> None: ... - def brush(self) -> QBrush: ... - @typing.overload - def setBrush(self, brush: typing.Union[QBrush, QColor, QtCore.Qt.GlobalColor, QGradient]) -> None: ... - @typing.overload - def setBrush(self, style: QtCore.Qt.BrushStyle) -> None: ... - def pen(self) -> 'QPen': ... - @typing.overload - def setPen(self, color: typing.Union[QColor, QtCore.Qt.GlobalColor, QGradient]) -> None: ... - @typing.overload - def setPen(self, pen: typing.Union['QPen', QColor, QtCore.Qt.GlobalColor, QGradient]) -> None: ... - @typing.overload - def setPen(self, style: QtCore.Qt.PenStyle) -> None: ... - def fontInfo(self) -> QFontInfo: ... - def fontMetrics(self) -> QFontMetrics: ... - def setFont(self, f: QFont) -> None: ... - def font(self) -> QFont: ... - def compositionMode(self) -> 'QPainter.CompositionMode': ... - def setCompositionMode(self, mode: 'QPainter.CompositionMode') -> None: ... - def isActive(self) -> bool: ... - def end(self) -> bool: ... - def begin(self, a0: QPaintDevice) -> bool: ... - def device(self) -> QPaintDevice: ... - def __exit__(self, type: typing.Any, value: typing.Any, traceback: typing.Any) -> None: ... - def __enter__(self) -> typing.Any: ... - - -class QTextItem(sip.simplewrapper): - - class RenderFlag(int): ... - RightToLeft = ... # type: 'QTextItem.RenderFlag' - Overline = ... # type: 'QTextItem.RenderFlag' - Underline = ... # type: 'QTextItem.RenderFlag' - StrikeOut = ... # type: 'QTextItem.RenderFlag' - - class RenderFlags(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QTextItem.RenderFlags', 'QTextItem.RenderFlag']) -> None: ... - @typing.overload - def __init__(self, a0: 'QTextItem.RenderFlags') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QTextItem.RenderFlags': ... - def __int__(self) -> int: ... - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QTextItem') -> None: ... - - def font(self) -> QFont: ... - def text(self) -> str: ... - def renderFlags(self) -> 'QTextItem.RenderFlags': ... - def width(self) -> float: ... - def ascent(self) -> float: ... - def descent(self) -> float: ... - - -class QPaintEngine(sip.simplewrapper): - - class Type(int): ... - X11 = ... # type: 'QPaintEngine.Type' - Windows = ... # type: 'QPaintEngine.Type' - QuickDraw = ... # type: 'QPaintEngine.Type' - CoreGraphics = ... # type: 'QPaintEngine.Type' - MacPrinter = ... # type: 'QPaintEngine.Type' - QWindowSystem = ... # type: 'QPaintEngine.Type' - PostScript = ... # type: 'QPaintEngine.Type' - OpenGL = ... # type: 'QPaintEngine.Type' - Picture = ... # type: 'QPaintEngine.Type' - SVG = ... # type: 'QPaintEngine.Type' - Raster = ... # type: 'QPaintEngine.Type' - Direct3D = ... # type: 'QPaintEngine.Type' - Pdf = ... # type: 'QPaintEngine.Type' - OpenVG = ... # type: 'QPaintEngine.Type' - OpenGL2 = ... # type: 'QPaintEngine.Type' - PaintBuffer = ... # type: 'QPaintEngine.Type' - Blitter = ... # type: 'QPaintEngine.Type' - Direct2D = ... # type: 'QPaintEngine.Type' - User = ... # type: 'QPaintEngine.Type' - MaxUser = ... # type: 'QPaintEngine.Type' - - class PolygonDrawMode(int): ... - OddEvenMode = ... # type: 'QPaintEngine.PolygonDrawMode' - WindingMode = ... # type: 'QPaintEngine.PolygonDrawMode' - ConvexMode = ... # type: 'QPaintEngine.PolygonDrawMode' - PolylineMode = ... # type: 'QPaintEngine.PolygonDrawMode' - - class DirtyFlag(int): ... - DirtyPen = ... # type: 'QPaintEngine.DirtyFlag' - DirtyBrush = ... # type: 'QPaintEngine.DirtyFlag' - DirtyBrushOrigin = ... # type: 'QPaintEngine.DirtyFlag' - DirtyFont = ... # type: 'QPaintEngine.DirtyFlag' - DirtyBackground = ... # type: 'QPaintEngine.DirtyFlag' - DirtyBackgroundMode = ... # type: 'QPaintEngine.DirtyFlag' - DirtyTransform = ... # type: 'QPaintEngine.DirtyFlag' - DirtyClipRegion = ... # type: 'QPaintEngine.DirtyFlag' - DirtyClipPath = ... # type: 'QPaintEngine.DirtyFlag' - DirtyHints = ... # type: 'QPaintEngine.DirtyFlag' - DirtyCompositionMode = ... # type: 'QPaintEngine.DirtyFlag' - DirtyClipEnabled = ... # type: 'QPaintEngine.DirtyFlag' - DirtyOpacity = ... # type: 'QPaintEngine.DirtyFlag' - AllDirty = ... # type: 'QPaintEngine.DirtyFlag' - - class PaintEngineFeature(int): ... - PrimitiveTransform = ... # type: 'QPaintEngine.PaintEngineFeature' - PatternTransform = ... # type: 'QPaintEngine.PaintEngineFeature' - PixmapTransform = ... # type: 'QPaintEngine.PaintEngineFeature' - PatternBrush = ... # type: 'QPaintEngine.PaintEngineFeature' - LinearGradientFill = ... # type: 'QPaintEngine.PaintEngineFeature' - RadialGradientFill = ... # type: 'QPaintEngine.PaintEngineFeature' - ConicalGradientFill = ... # type: 'QPaintEngine.PaintEngineFeature' - AlphaBlend = ... # type: 'QPaintEngine.PaintEngineFeature' - PorterDuff = ... # type: 'QPaintEngine.PaintEngineFeature' - PainterPaths = ... # type: 'QPaintEngine.PaintEngineFeature' - Antialiasing = ... # type: 'QPaintEngine.PaintEngineFeature' - BrushStroke = ... # type: 'QPaintEngine.PaintEngineFeature' - ConstantOpacity = ... # type: 'QPaintEngine.PaintEngineFeature' - MaskedBrush = ... # type: 'QPaintEngine.PaintEngineFeature' - PaintOutsidePaintEvent = ... # type: 'QPaintEngine.PaintEngineFeature' - PerspectiveTransform = ... # type: 'QPaintEngine.PaintEngineFeature' - BlendModes = ... # type: 'QPaintEngine.PaintEngineFeature' - ObjectBoundingModeGradients = ... # type: 'QPaintEngine.PaintEngineFeature' - RasterOpModes = ... # type: 'QPaintEngine.PaintEngineFeature' - AllFeatures = ... # type: 'QPaintEngine.PaintEngineFeature' - - class PaintEngineFeatures(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QPaintEngine.PaintEngineFeatures', 'QPaintEngine.PaintEngineFeature']) -> None: ... - @typing.overload - def __init__(self, a0: 'QPaintEngine.PaintEngineFeatures') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QPaintEngine.PaintEngineFeatures': ... - def __int__(self) -> int: ... - - class DirtyFlags(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QPaintEngine.DirtyFlags', 'QPaintEngine.DirtyFlag']) -> None: ... - @typing.overload - def __init__(self, a0: 'QPaintEngine.DirtyFlags') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QPaintEngine.DirtyFlags': ... - def __int__(self) -> int: ... - - def __init__(self, features: typing.Union['QPaintEngine.PaintEngineFeatures', 'QPaintEngine.PaintEngineFeature'] = ...) -> None: ... - - def hasFeature(self, feature: typing.Union['QPaintEngine.PaintEngineFeatures', 'QPaintEngine.PaintEngineFeature']) -> bool: ... - def painter(self) -> QPainter: ... - def type(self) -> 'QPaintEngine.Type': ... - def paintDevice(self) -> QPaintDevice: ... - def setPaintDevice(self, device: QPaintDevice) -> None: ... - def drawImage(self, r: QtCore.QRectF, pm: QImage, sr: QtCore.QRectF, flags: typing.Union[QtCore.Qt.ImageConversionFlags, QtCore.Qt.ImageConversionFlag] = ...) -> None: ... - def drawTiledPixmap(self, r: QtCore.QRectF, pixmap: QPixmap, s: typing.Union[QtCore.QPointF, QtCore.QPoint]) -> None: ... - def drawTextItem(self, p: typing.Union[QtCore.QPointF, QtCore.QPoint], textItem: QTextItem) -> None: ... - def drawPixmap(self, r: QtCore.QRectF, pm: QPixmap, sr: QtCore.QRectF) -> None: ... - @typing.overload - def drawPolygon(self, points: typing.Union[QtCore.QPointF, QtCore.QPoint], mode: 'QPaintEngine.PolygonDrawMode') -> None: ... - @typing.overload - def drawPolygon(self, points: QtCore.QPoint, mode: 'QPaintEngine.PolygonDrawMode') -> None: ... - @typing.overload - def drawPoints(self, points: typing.Union[QtCore.QPointF, QtCore.QPoint]) -> None: ... - @typing.overload - def drawPoints(self, points: QtCore.QPoint) -> None: ... - def drawPath(self, path: 'QPainterPath') -> None: ... - @typing.overload - def drawEllipse(self, r: QtCore.QRectF) -> None: ... - @typing.overload - def drawEllipse(self, r: QtCore.QRect) -> None: ... - @typing.overload - def drawLines(self, lines: QtCore.QLine) -> None: ... - @typing.overload - def drawLines(self, lines: QtCore.QLineF) -> None: ... - @typing.overload - def drawRects(self, rects: QtCore.QRect) -> None: ... - @typing.overload - def drawRects(self, rects: QtCore.QRectF) -> None: ... - def updateState(self, state: 'QPaintEngineState') -> None: ... - def end(self) -> bool: ... - def begin(self, pdev: QPaintDevice) -> bool: ... - def setActive(self, newState: bool) -> None: ... - def isActive(self) -> bool: ... - - -class QPaintEngineState(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QPaintEngineState') -> None: ... - - def penNeedsResolving(self) -> bool: ... - def brushNeedsResolving(self) -> bool: ... - def transform(self) -> 'QTransform': ... - def painter(self) -> QPainter: ... - def compositionMode(self) -> QPainter.CompositionMode: ... - def renderHints(self) -> QPainter.RenderHints: ... - def isClipEnabled(self) -> bool: ... - def clipPath(self) -> 'QPainterPath': ... - def clipRegion(self) -> 'QRegion': ... - def clipOperation(self) -> QtCore.Qt.ClipOperation: ... - def opacity(self) -> float: ... - def font(self) -> QFont: ... - def backgroundMode(self) -> QtCore.Qt.BGMode: ... - def backgroundBrush(self) -> QBrush: ... - def brushOrigin(self) -> QtCore.QPointF: ... - def brush(self) -> QBrush: ... - def pen(self) -> 'QPen': ... - def state(self) -> QPaintEngine.DirtyFlags: ... - - -class QPainterPath(sip.simplewrapper): - - class ElementType(int): ... - MoveToElement = ... # type: 'QPainterPath.ElementType' - LineToElement = ... # type: 'QPainterPath.ElementType' - CurveToElement = ... # type: 'QPainterPath.ElementType' - CurveToDataElement = ... # type: 'QPainterPath.ElementType' - - class Element(sip.simplewrapper): - - type = ... # type: 'QPainterPath.ElementType' - x = ... # type: float - y = ... # type: float - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QPainterPath.Element') -> None: ... - - def isCurveTo(self) -> bool: ... - def isLineTo(self) -> bool: ... - def isMoveTo(self) -> bool: ... - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, startPoint: typing.Union[QtCore.QPointF, QtCore.QPoint]) -> None: ... - @typing.overload - def __init__(self, other: 'QPainterPath') -> None: ... - - def swap(self, other: 'QPainterPath') -> None: ... - @typing.overload - def translated(self, dx: float, dy: float) -> 'QPainterPath': ... - @typing.overload - def translated(self, offset: typing.Union[QtCore.QPointF, QtCore.QPoint]) -> 'QPainterPath': ... - @typing.overload - def translate(self, dx: float, dy: float) -> None: ... - @typing.overload - def translate(self, offset: typing.Union[QtCore.QPointF, QtCore.QPoint]) -> None: ... - def simplified(self) -> 'QPainterPath': ... - @typing.overload - def addRoundedRect(self, rect: QtCore.QRectF, xRadius: float, yRadius: float, mode: QtCore.Qt.SizeMode = ...) -> None: ... - @typing.overload - def addRoundedRect(self, x: float, y: float, w: float, h: float, xRadius: float, yRadius: float, mode: QtCore.Qt.SizeMode = ...) -> None: ... - def subtracted(self, r: 'QPainterPath') -> 'QPainterPath': ... - def intersected(self, r: 'QPainterPath') -> 'QPainterPath': ... - def united(self, r: 'QPainterPath') -> 'QPainterPath': ... - def slopeAtPercent(self, t: float) -> float: ... - def angleAtPercent(self, t: float) -> float: ... - def pointAtPercent(self, t: float) -> QtCore.QPointF: ... - def percentAtLength(self, t: float) -> float: ... - def length(self) -> float: ... - def toFillPolygon(self, matrix: 'QTransform') -> 'QPolygonF': ... - def toFillPolygons(self, matrix: 'QTransform') -> typing.List['QPolygonF']: ... - def toSubpathPolygons(self, matrix: 'QTransform') -> typing.Any: ... - def setElementPositionAt(self, i: int, x: float, y: float) -> None: ... - def elementAt(self, i: int) -> 'QPainterPath.Element': ... - def elementCount(self) -> int: ... - def isEmpty(self) -> bool: ... - @typing.overload - def arcMoveTo(self, rect: QtCore.QRectF, angle: float) -> None: ... - @typing.overload - def arcMoveTo(self, x: float, y: float, w: float, h: float, angle: float) -> None: ... - def toReversed(self) -> 'QPainterPath': ... - def setFillRule(self, fillRule: QtCore.Qt.FillRule) -> None: ... - def fillRule(self) -> QtCore.Qt.FillRule: ... - def controlPointRect(self) -> QtCore.QRectF: ... - def boundingRect(self) -> QtCore.QRectF: ... - @typing.overload - def intersects(self, rect: QtCore.QRectF) -> bool: ... - @typing.overload - def intersects(self, p: 'QPainterPath') -> bool: ... - @typing.overload - def contains(self, pt: typing.Union[QtCore.QPointF, QtCore.QPoint]) -> bool: ... - @typing.overload - def contains(self, rect: QtCore.QRectF) -> bool: ... - @typing.overload - def contains(self, p: 'QPainterPath') -> bool: ... - def connectPath(self, path: 'QPainterPath') -> None: ... - def addRegion(self, region: 'QRegion') -> None: ... - def addPath(self, path: 'QPainterPath') -> None: ... - @typing.overload - def addText(self, point: typing.Union[QtCore.QPointF, QtCore.QPoint], f: QFont, text: str) -> None: ... - @typing.overload - def addText(self, x: float, y: float, f: QFont, text: str) -> None: ... - def addPolygon(self, polygon: 'QPolygonF') -> None: ... - @typing.overload - def addEllipse(self, rect: QtCore.QRectF) -> None: ... - @typing.overload - def addEllipse(self, x: float, y: float, w: float, h: float) -> None: ... - @typing.overload - def addEllipse(self, center: typing.Union[QtCore.QPointF, QtCore.QPoint], rx: float, ry: float) -> None: ... - @typing.overload - def addRect(self, rect: QtCore.QRectF) -> None: ... - @typing.overload - def addRect(self, x: float, y: float, w: float, h: float) -> None: ... - def currentPosition(self) -> QtCore.QPointF: ... - @typing.overload - def quadTo(self, ctrlPt: typing.Union[QtCore.QPointF, QtCore.QPoint], endPt: typing.Union[QtCore.QPointF, QtCore.QPoint]) -> None: ... - @typing.overload - def quadTo(self, ctrlPtx: float, ctrlPty: float, endPtx: float, endPty: float) -> None: ... - @typing.overload - def cubicTo(self, ctrlPt1: typing.Union[QtCore.QPointF, QtCore.QPoint], ctrlPt2: typing.Union[QtCore.QPointF, QtCore.QPoint], endPt: typing.Union[QtCore.QPointF, QtCore.QPoint]) -> None: ... - @typing.overload - def cubicTo(self, ctrlPt1x: float, ctrlPt1y: float, ctrlPt2x: float, ctrlPt2y: float, endPtx: float, endPty: float) -> None: ... - @typing.overload - def arcTo(self, rect: QtCore.QRectF, startAngle: float, arcLength: float) -> None: ... - @typing.overload - def arcTo(self, x: float, y: float, w: float, h: float, startAngle: float, arcLenght: float) -> None: ... - @typing.overload - def lineTo(self, p: typing.Union[QtCore.QPointF, QtCore.QPoint]) -> None: ... - @typing.overload - def lineTo(self, x: float, y: float) -> None: ... - @typing.overload - def moveTo(self, p: typing.Union[QtCore.QPointF, QtCore.QPoint]) -> None: ... - @typing.overload - def moveTo(self, x: float, y: float) -> None: ... - def closeSubpath(self) -> None: ... - - -class QPainterPathStroker(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, pen: typing.Union['QPen', QColor, QtCore.Qt.GlobalColor, QGradient]) -> None: ... - - def dashOffset(self) -> float: ... - def setDashOffset(self, offset: float) -> None: ... - def createStroke(self, path: QPainterPath) -> QPainterPath: ... - def dashPattern(self) -> typing.List[float]: ... - @typing.overload - def setDashPattern(self, a0: QtCore.Qt.PenStyle) -> None: ... - @typing.overload - def setDashPattern(self, dashPattern: typing.Iterable[float]) -> None: ... - def curveThreshold(self) -> float: ... - def setCurveThreshold(self, threshold: float) -> None: ... - def miterLimit(self) -> float: ... - def setMiterLimit(self, length: float) -> None: ... - def joinStyle(self) -> QtCore.Qt.PenJoinStyle: ... - def setJoinStyle(self, style: QtCore.Qt.PenJoinStyle) -> None: ... - def capStyle(self) -> QtCore.Qt.PenCapStyle: ... - def setCapStyle(self, style: QtCore.Qt.PenCapStyle) -> None: ... - def width(self) -> float: ... - def setWidth(self, width: float) -> None: ... - - -class QPalette(sip.simplewrapper): - - class ColorRole(int): ... - WindowText = ... # type: 'QPalette.ColorRole' - Foreground = ... # type: 'QPalette.ColorRole' - Button = ... # type: 'QPalette.ColorRole' - Light = ... # type: 'QPalette.ColorRole' - Midlight = ... # type: 'QPalette.ColorRole' - Dark = ... # type: 'QPalette.ColorRole' - Mid = ... # type: 'QPalette.ColorRole' - Text = ... # type: 'QPalette.ColorRole' - BrightText = ... # type: 'QPalette.ColorRole' - ButtonText = ... # type: 'QPalette.ColorRole' - Base = ... # type: 'QPalette.ColorRole' - Window = ... # type: 'QPalette.ColorRole' - Background = ... # type: 'QPalette.ColorRole' - Shadow = ... # type: 'QPalette.ColorRole' - Highlight = ... # type: 'QPalette.ColorRole' - HighlightedText = ... # type: 'QPalette.ColorRole' - Link = ... # type: 'QPalette.ColorRole' - LinkVisited = ... # type: 'QPalette.ColorRole' - AlternateBase = ... # type: 'QPalette.ColorRole' - ToolTipBase = ... # type: 'QPalette.ColorRole' - ToolTipText = ... # type: 'QPalette.ColorRole' - NColorRoles = ... # type: 'QPalette.ColorRole' - NoRole = ... # type: 'QPalette.ColorRole' - - class ColorGroup(int): ... - Active = ... # type: 'QPalette.ColorGroup' - Disabled = ... # type: 'QPalette.ColorGroup' - Inactive = ... # type: 'QPalette.ColorGroup' - NColorGroups = ... # type: 'QPalette.ColorGroup' - Current = ... # type: 'QPalette.ColorGroup' - All = ... # type: 'QPalette.ColorGroup' - Normal = ... # type: 'QPalette.ColorGroup' - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, button: typing.Union[QColor, QtCore.Qt.GlobalColor, QGradient]) -> None: ... - @typing.overload - def __init__(self, button: QtCore.Qt.GlobalColor) -> None: ... - @typing.overload - def __init__(self, button: typing.Union[QColor, QtCore.Qt.GlobalColor, QGradient], background: typing.Union[QColor, QtCore.Qt.GlobalColor, QGradient]) -> None: ... - @typing.overload - def __init__(self, foreground: typing.Union[QBrush, QColor, QtCore.Qt.GlobalColor, QGradient], button: typing.Union[QBrush, QColor, QtCore.Qt.GlobalColor, QGradient], light: typing.Union[QBrush, QColor, QtCore.Qt.GlobalColor, QGradient], dark: typing.Union[QBrush, QColor, QtCore.Qt.GlobalColor, QGradient], mid: typing.Union[QBrush, QColor, QtCore.Qt.GlobalColor, QGradient], text: typing.Union[QBrush, QColor, QtCore.Qt.GlobalColor, QGradient], bright_text: typing.Union[QBrush, QColor, QtCore.Qt.GlobalColor, QGradient], base: typing.Union[QBrush, QColor, QtCore.Qt.GlobalColor, QGradient], background: typing.Union[QBrush, QColor, QtCore.Qt.GlobalColor, QGradient]) -> None: ... - @typing.overload - def __init__(self, palette: 'QPalette') -> None: ... - @typing.overload - def __init__(self, variant: typing.Any) -> None: ... - - def swap(self, other: 'QPalette') -> None: ... - def cacheKey(self) -> int: ... - def isBrushSet(self, cg: 'QPalette.ColorGroup', cr: 'QPalette.ColorRole') -> bool: ... - @typing.overload - def setColor(self, acg: 'QPalette.ColorGroup', acr: 'QPalette.ColorRole', acolor: typing.Union[QColor, QtCore.Qt.GlobalColor, QGradient]) -> None: ... - @typing.overload - def setColor(self, acr: 'QPalette.ColorRole', acolor: typing.Union[QColor, QtCore.Qt.GlobalColor, QGradient]) -> None: ... - @typing.overload - def resolve(self, a0: 'QPalette') -> 'QPalette': ... - @typing.overload - def resolve(self) -> int: ... - @typing.overload - def resolve(self, mask: int) -> None: ... - def isCopyOf(self, p: 'QPalette') -> bool: ... - def toolTipText(self) -> QBrush: ... - def toolTipBase(self) -> QBrush: ... - def linkVisited(self) -> QBrush: ... - def link(self) -> QBrush: ... - def highlightedText(self) -> QBrush: ... - def highlight(self) -> QBrush: ... - def shadow(self) -> QBrush: ... - def buttonText(self) -> QBrush: ... - def brightText(self) -> QBrush: ... - def midlight(self) -> QBrush: ... - def window(self) -> QBrush: ... - def alternateBase(self) -> QBrush: ... - def base(self) -> QBrush: ... - def text(self) -> QBrush: ... - def mid(self) -> QBrush: ... - def dark(self) -> QBrush: ... - def light(self) -> QBrush: ... - def button(self) -> QBrush: ... - def windowText(self) -> QBrush: ... - def isEqual(self, cr1: 'QPalette.ColorGroup', cr2: 'QPalette.ColorGroup') -> bool: ... - def setColorGroup(self, cr: 'QPalette.ColorGroup', foreground: typing.Union[QBrush, QColor, QtCore.Qt.GlobalColor, QGradient], button: typing.Union[QBrush, QColor, QtCore.Qt.GlobalColor, QGradient], light: typing.Union[QBrush, QColor, QtCore.Qt.GlobalColor, QGradient], dark: typing.Union[QBrush, QColor, QtCore.Qt.GlobalColor, QGradient], mid: typing.Union[QBrush, QColor, QtCore.Qt.GlobalColor, QGradient], text: typing.Union[QBrush, QColor, QtCore.Qt.GlobalColor, QGradient], bright_text: typing.Union[QBrush, QColor, QtCore.Qt.GlobalColor, QGradient], base: typing.Union[QBrush, QColor, QtCore.Qt.GlobalColor, QGradient], background: typing.Union[QBrush, QColor, QtCore.Qt.GlobalColor, QGradient]) -> None: ... - @typing.overload - def setBrush(self, cg: 'QPalette.ColorGroup', cr: 'QPalette.ColorRole', brush: typing.Union[QBrush, QColor, QtCore.Qt.GlobalColor, QGradient]) -> None: ... - @typing.overload - def setBrush(self, acr: 'QPalette.ColorRole', abrush: typing.Union[QBrush, QColor, QtCore.Qt.GlobalColor, QGradient]) -> None: ... - @typing.overload - def brush(self, cg: 'QPalette.ColorGroup', cr: 'QPalette.ColorRole') -> QBrush: ... - @typing.overload - def brush(self, cr: 'QPalette.ColorRole') -> QBrush: ... - @typing.overload - def color(self, cg: 'QPalette.ColorGroup', cr: 'QPalette.ColorRole') -> QColor: ... - @typing.overload - def color(self, cr: 'QPalette.ColorRole') -> QColor: ... - def setCurrentColorGroup(self, cg: 'QPalette.ColorGroup') -> None: ... - def currentColorGroup(self) -> 'QPalette.ColorGroup': ... - - -class QPdfWriter(QtCore.QObject, QPagedPaintDevice): - - @typing.overload - def __init__(self, filename: str) -> None: ... - @typing.overload - def __init__(self, device: QtCore.QIODevice) -> None: ... - - def resolution(self) -> int: ... - def setResolution(self, resolution: int) -> None: ... - def metric(self, id: QPaintDevice.PaintDeviceMetric) -> int: ... - def paintEngine(self) -> QPaintEngine: ... - def setMargins(self, m: QPagedPaintDevice.Margins) -> None: ... - def setPageSizeMM(self, size: QtCore.QSizeF) -> None: ... - # def setPageSize(self, size: QPagedPaintDevice.PageSize) -> None: ... - def newPage(self) -> bool: ... - def setCreator(self, creator: str) -> None: ... - def creator(self) -> str: ... - def setTitle(self, title: str) -> None: ... - def title(self) -> str: ... - - -class QPen(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: QtCore.Qt.PenStyle) -> None: ... - @typing.overload - def __init__(self, brush: typing.Union[QBrush, QColor, QtCore.Qt.GlobalColor, QGradient], width: float, style: QtCore.Qt.PenStyle = ..., cap: QtCore.Qt.PenCapStyle = ..., join: QtCore.Qt.PenJoinStyle = ...) -> None: ... - @typing.overload - def __init__(self, pen: typing.Union['QPen', QColor, QtCore.Qt.GlobalColor, QGradient]) -> None: ... - @typing.overload - def __init__(self, variant: typing.Any) -> None: ... - - def swap(self, other: 'QPen') -> None: ... - def setCosmetic(self, cosmetic: bool) -> None: ... - def isCosmetic(self) -> bool: ... - def setDashOffset(self, doffset: float) -> None: ... - def dashOffset(self) -> float: ... - def setMiterLimit(self, limit: float) -> None: ... - def miterLimit(self) -> float: ... - def setDashPattern(self, pattern: typing.Iterable[float]) -> None: ... - def dashPattern(self) -> typing.List[float]: ... - def setJoinStyle(self, pcs: QtCore.Qt.PenJoinStyle) -> None: ... - def joinStyle(self) -> QtCore.Qt.PenJoinStyle: ... - def setCapStyle(self, pcs: QtCore.Qt.PenCapStyle) -> None: ... - def capStyle(self) -> QtCore.Qt.PenCapStyle: ... - def isSolid(self) -> bool: ... - def setBrush(self, brush: typing.Union[QBrush, QColor, QtCore.Qt.GlobalColor, QGradient]) -> None: ... - def brush(self) -> QBrush: ... - def setColor(self, color: typing.Union[QColor, QtCore.Qt.GlobalColor, QGradient]) -> None: ... - def color(self) -> QColor: ... - def setWidth(self, width: int) -> None: ... - def width(self) -> int: ... - def setWidthF(self, width: float) -> None: ... - def widthF(self) -> float: ... - def setStyle(self, a0: QtCore.Qt.PenStyle) -> None: ... - def style(self) -> QtCore.Qt.PenStyle: ... - - -class QPicture(QPaintDevice): - - @typing.overload - def __init__(self, formatVersion: int = ...) -> None: ... - @typing.overload - def __init__(self, a0: 'QPicture') -> None: ... - - def swap(self, other: 'QPicture') -> None: ... - def metric(self, m: QPaintDevice.PaintDeviceMetric) -> int: ... - def paintEngine(self) -> QPaintEngine: ... - def isDetached(self) -> bool: ... - def detach(self) -> None: ... - def setBoundingRect(self, r: QtCore.QRect) -> None: ... - def boundingRect(self) -> QtCore.QRect: ... - @typing.overload - def save(self, dev: QtCore.QIODevice, format: typing.Optional[str] = ...) -> bool: ... - @typing.overload - def save(self, fileName: str, format: typing.Optional[str] = ...) -> bool: ... - @typing.overload - def load(self, dev: QtCore.QIODevice, format: typing.Optional[str] = ...) -> bool: ... - @typing.overload - def load(self, fileName: str, format: typing.Optional[str] = ...) -> bool: ... - def play(self, p: QPainter) -> bool: ... - def setData(self, data: bytes) -> None: ... - def data(self) -> str: ... - def size(self) -> int: ... - def devType(self) -> int: ... - def isNull(self) -> bool: ... - - -class QPictureIO(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, ioDevice: QtCore.QIODevice, format: str) -> None: ... - @typing.overload - def __init__(self, fileName: str, format: str) -> None: ... - - @staticmethod - def defineIOHandler(format: str, header: str, flags: str, read_picture: typing.Optional[typing.Callable[[], None]], write_picture: typing.Optional[typing.Callable[[], None]]) -> None: ... - @staticmethod - def outputFormats() -> typing.List[QtCore.QByteArray]: ... - @staticmethod - def inputFormats() -> typing.List[QtCore.QByteArray]: ... - @typing.overload - @staticmethod - def pictureFormat(fileName: str) -> QtCore.QByteArray: ... - @typing.overload - @staticmethod - def pictureFormat(a0: QtCore.QIODevice) -> QtCore.QByteArray: ... - def write(self) -> bool: ... - def read(self) -> bool: ... - def setGamma(self, a0: float) -> None: ... - def setParameters(self, a0: str) -> None: ... - def setDescription(self, a0: str) -> None: ... - def setQuality(self, a0: int) -> None: ... - def setFileName(self, a0: str) -> None: ... - def setIODevice(self, a0: QtCore.QIODevice) -> None: ... - def setFormat(self, a0: str) -> None: ... - def setStatus(self, a0: int) -> None: ... - def setPicture(self, a0: QPicture) -> None: ... - def gamma(self) -> float: ... - def parameters(self) -> str: ... - def description(self) -> str: ... - def quality(self) -> int: ... - def fileName(self) -> str: ... - def ioDevice(self) -> QtCore.QIODevice: ... - def format(self) -> str: ... - def status(self) -> int: ... - def picture(self) -> QPicture: ... - - -class QPixelFormat(sip.simplewrapper): - - class ByteOrder(int): ... - LittleEndian = ... # type: 'QPixelFormat.ByteOrder' - BigEndian = ... # type: 'QPixelFormat.ByteOrder' - CurrentSystemEndian = ... # type: 'QPixelFormat.ByteOrder' - - class YUVLayout(int): ... - YUV444 = ... # type: 'QPixelFormat.YUVLayout' - YUV422 = ... # type: 'QPixelFormat.YUVLayout' - YUV411 = ... # type: 'QPixelFormat.YUVLayout' - YUV420P = ... # type: 'QPixelFormat.YUVLayout' - YUV420SP = ... # type: 'QPixelFormat.YUVLayout' - YV12 = ... # type: 'QPixelFormat.YUVLayout' - UYVY = ... # type: 'QPixelFormat.YUVLayout' - YUYV = ... # type: 'QPixelFormat.YUVLayout' - NV12 = ... # type: 'QPixelFormat.YUVLayout' - NV21 = ... # type: 'QPixelFormat.YUVLayout' - IMC1 = ... # type: 'QPixelFormat.YUVLayout' - IMC2 = ... # type: 'QPixelFormat.YUVLayout' - IMC3 = ... # type: 'QPixelFormat.YUVLayout' - IMC4 = ... # type: 'QPixelFormat.YUVLayout' - Y8 = ... # type: 'QPixelFormat.YUVLayout' - Y16 = ... # type: 'QPixelFormat.YUVLayout' - - class TypeInterpretation(int): ... - UnsignedInteger = ... # type: 'QPixelFormat.TypeInterpretation' - UnsignedShort = ... # type: 'QPixelFormat.TypeInterpretation' - UnsignedByte = ... # type: 'QPixelFormat.TypeInterpretation' - FloatingPoint = ... # type: 'QPixelFormat.TypeInterpretation' - - class AlphaPremultiplied(int): ... - NotPremultiplied = ... # type: 'QPixelFormat.AlphaPremultiplied' - Premultiplied = ... # type: 'QPixelFormat.AlphaPremultiplied' - - class AlphaPosition(int): ... - AtBeginning = ... # type: 'QPixelFormat.AlphaPosition' - AtEnd = ... # type: 'QPixelFormat.AlphaPosition' - - class AlphaUsage(int): ... - UsesAlpha = ... # type: 'QPixelFormat.AlphaUsage' - IgnoresAlpha = ... # type: 'QPixelFormat.AlphaUsage' - - class ColorModel(int): ... - RGB = ... # type: 'QPixelFormat.ColorModel' - BGR = ... # type: 'QPixelFormat.ColorModel' - Indexed = ... # type: 'QPixelFormat.ColorModel' - Grayscale = ... # type: 'QPixelFormat.ColorModel' - CMYK = ... # type: 'QPixelFormat.ColorModel' - HSL = ... # type: 'QPixelFormat.ColorModel' - HSV = ... # type: 'QPixelFormat.ColorModel' - YUV = ... # type: 'QPixelFormat.ColorModel' - Alpha = ... # type: 'QPixelFormat.ColorModel' - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, mdl: 'QPixelFormat.ColorModel', firstSize: int, secondSize: int, thirdSize: int, fourthSize: int, fifthSize: int, alfa: int, usage: 'QPixelFormat.AlphaUsage', position: 'QPixelFormat.AlphaPosition', premult: 'QPixelFormat.AlphaPremultiplied', typeInterp: 'QPixelFormat.TypeInterpretation', byteOrder: 'QPixelFormat.ByteOrder' = ..., subEnum: int = ...) -> None: ... - @typing.overload - def __init__(self, a0: 'QPixelFormat') -> None: ... - - def subEnum(self) -> int: ... - def yuvLayout(self) -> 'QPixelFormat.YUVLayout': ... - def byteOrder(self) -> 'QPixelFormat.ByteOrder': ... - def typeInterpretation(self) -> 'QPixelFormat.TypeInterpretation': ... - def premultiplied(self) -> 'QPixelFormat.AlphaPremultiplied': ... - def alphaPosition(self) -> 'QPixelFormat.AlphaPosition': ... - def alphaUsage(self) -> 'QPixelFormat.AlphaUsage': ... - def bitsPerPixel(self) -> int: ... - def alphaSize(self) -> int: ... - def brightnessSize(self) -> int: ... - def lightnessSize(self) -> int: ... - def saturationSize(self) -> int: ... - def hueSize(self) -> int: ... - def blackSize(self) -> int: ... - def yellowSize(self) -> int: ... - def magentaSize(self) -> int: ... - def cyanSize(self) -> int: ... - def blueSize(self) -> int: ... - def greenSize(self) -> int: ... - def redSize(self) -> int: ... - def channelCount(self) -> int: ... - def colorModel(self) -> 'QPixelFormat.ColorModel': ... - - -class QPixmapCache(sip.simplewrapper): - - class Key(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, other: 'QPixmapCache.Key') -> None: ... - - def isValid(self) -> bool: ... - def swap(self, other: 'QPixmapCache.Key') -> None: ... - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QPixmapCache') -> None: ... - - @staticmethod - def setCacheLimit(a0: int) -> None: ... - @staticmethod - def replace(key: 'QPixmapCache.Key', pixmap: QPixmap) -> bool: ... - @typing.overload - @staticmethod - def remove(key: str) -> None: ... - @typing.overload - @staticmethod - def remove(key: 'QPixmapCache.Key') -> None: ... - @typing.overload - @staticmethod - def insert(key: str, a1: QPixmap) -> bool: ... - @typing.overload - @staticmethod - def insert(pixmap: QPixmap) -> 'QPixmapCache.Key': ... - @typing.overload - @staticmethod - def find(key: str) -> QPixmap: ... - @typing.overload - @staticmethod - def find(key: 'QPixmapCache.Key') -> QPixmap: ... - @staticmethod - def clear() -> None: ... - @staticmethod - def cacheLimit() -> int: ... - - -class QPolygon(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a: 'QPolygon') -> None: ... - @typing.overload - def __init__(self, v: typing.Iterable[QtCore.QPoint]) -> None: ... - @typing.overload - def __init__(self, rectangle: QtCore.QRect, closed: bool = ...) -> None: ... - @typing.overload - def __init__(self, asize: int) -> None: ... - @typing.overload - def __init__(self, points: typing.List[int]) -> None: ... - @typing.overload - def __init__(self, variant: typing.Any) -> None: ... - - def swap(self, other: 'QPolygon') -> None: ... - def __contains__(self, value: QtCore.QPoint) -> int: ... - @typing.overload - def __delitem__(self, i: int) -> None: ... - @typing.overload - def __delitem__(self, slice: slice) -> None: ... - @typing.overload - def __setitem__(self, i: int, value: QtCore.QPoint) -> None: ... - @typing.overload - def __setitem__(self, slice: slice, list: 'QPolygon') -> None: ... - @typing.overload - def __getitem__(self, i: int) -> QtCore.QPoint: ... - @typing.overload - def __getitem__(self, slice: slice) -> 'QPolygon': ... - @typing.overload - def value(self, i: int) -> QtCore.QPoint: ... - @typing.overload - def value(self, i: int, defaultValue: QtCore.QPoint) -> QtCore.QPoint: ... - def size(self) -> int: ... - def replace(self, i: int, value: QtCore.QPoint) -> None: ... - @typing.overload - def remove(self, i: int) -> None: ... - @typing.overload - def remove(self, i: int, count: int) -> None: ... - def prepend(self, value: QtCore.QPoint) -> None: ... - def mid(self, pos: int, length: int = ...) -> 'QPolygon': ... - def lastIndexOf(self, value: QtCore.QPoint, from_: int = ...) -> int: ... - def last(self) -> QtCore.QPoint: ... - def isEmpty(self) -> bool: ... - def insert(self, i: int, value: QtCore.QPoint) -> None: ... - def indexOf(self, value: QtCore.QPoint, from_: int = ...) -> int: ... - def first(self) -> QtCore.QPoint: ... - def fill(self, value: QtCore.QPoint, size: int = ...) -> None: ... - def data(self) -> sip.voidptr: ... - def __len__(self) -> int: ... - @typing.overload - def count(self, value: QtCore.QPoint) -> int: ... - @typing.overload - def count(self) -> int: ... - def contains(self, value: QtCore.QPoint) -> bool: ... - def clear(self) -> None: ... - def at(self, i: int) -> QtCore.QPoint: ... - def append(self, value: QtCore.QPoint) -> None: ... - @typing.overload - def translated(self, dx: int, dy: int) -> 'QPolygon': ... - @typing.overload - def translated(self, offset: QtCore.QPoint) -> 'QPolygon': ... - def subtracted(self, r: 'QPolygon') -> 'QPolygon': ... - def intersected(self, r: 'QPolygon') -> 'QPolygon': ... - def united(self, r: 'QPolygon') -> 'QPolygon': ... - def containsPoint(self, pt: QtCore.QPoint, fillRule: QtCore.Qt.FillRule) -> bool: ... - @typing.overload - def setPoint(self, index: int, pt: QtCore.QPoint) -> None: ... - @typing.overload - def setPoint(self, index: int, x: int, y: int) -> None: ... - @typing.overload - def putPoints(self, index: int, firstx: int, firsty: int, *a3) -> None: ... - @typing.overload - def putPoints(self, index: int, nPoints: int, fromPolygon: 'QPolygon', from_: int = ...) -> None: ... - @typing.overload - def setPoints(self, points: typing.List[int]) -> None: ... - @typing.overload - def setPoints(self, firstx: int, firsty: int, *a2) -> None: ... - def point(self, index: int) -> QtCore.QPoint: ... - def boundingRect(self) -> QtCore.QRect: ... - @typing.overload - def translate(self, dx: int, dy: int) -> None: ... - @typing.overload - def translate(self, offset: QtCore.QPoint) -> None: ... - - -class QPolygonF(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a: 'QPolygonF') -> None: ... - @typing.overload - def __init__(self, v: typing.Iterable[typing.Union[QtCore.QPointF, QtCore.QPoint]]) -> None: ... - @typing.overload - def __init__(self, r: QtCore.QRectF) -> None: ... - @typing.overload - def __init__(self, a: QPolygon) -> None: ... - @typing.overload - def __init__(self, asize: int) -> None: ... - - def swap(self, other: 'QPolygonF') -> None: ... - def __contains__(self, value: typing.Union[QtCore.QPointF, QtCore.QPoint]) -> int: ... - @typing.overload - def __delitem__(self, i: int) -> None: ... - @typing.overload - def __delitem__(self, slice: slice) -> None: ... - @typing.overload - def __setitem__(self, i: int, value: typing.Union[QtCore.QPointF, QtCore.QPoint]) -> None: ... - @typing.overload - def __setitem__(self, slice: slice, list: 'QPolygonF') -> None: ... - @typing.overload - def __getitem__(self, i: int) -> QtCore.QPointF: ... - @typing.overload - def __getitem__(self, slice: slice) -> 'QPolygonF': ... - @typing.overload - def value(self, i: int) -> QtCore.QPointF: ... - @typing.overload - def value(self, i: int, defaultValue: typing.Union[QtCore.QPointF, QtCore.QPoint]) -> QtCore.QPointF: ... - def size(self) -> int: ... - def replace(self, i: int, value: typing.Union[QtCore.QPointF, QtCore.QPoint]) -> None: ... - @typing.overload - def remove(self, i: int) -> None: ... - @typing.overload - def remove(self, i: int, count: int) -> None: ... - def prepend(self, value: typing.Union[QtCore.QPointF, QtCore.QPoint]) -> None: ... - def mid(self, pos: int, length: int = ...) -> 'QPolygonF': ... - def lastIndexOf(self, value: typing.Union[QtCore.QPointF, QtCore.QPoint], from_: int = ...) -> int: ... - def last(self) -> QtCore.QPointF: ... - def isEmpty(self) -> bool: ... - def insert(self, i: int, value: typing.Union[QtCore.QPointF, QtCore.QPoint]) -> None: ... - def indexOf(self, value: typing.Union[QtCore.QPointF, QtCore.QPoint], from_: int = ...) -> int: ... - def first(self) -> QtCore.QPointF: ... - def fill(self, value: typing.Union[QtCore.QPointF, QtCore.QPoint], size: int = ...) -> None: ... - def data(self) -> sip.voidptr: ... - def __len__(self) -> int: ... - @typing.overload - def count(self, value: typing.Union[QtCore.QPointF, QtCore.QPoint]) -> int: ... - @typing.overload - def count(self) -> int: ... - def contains(self, value: typing.Union[QtCore.QPointF, QtCore.QPoint]) -> bool: ... - def clear(self) -> None: ... - def at(self, i: int) -> QtCore.QPointF: ... - def append(self, value: typing.Union[QtCore.QPointF, QtCore.QPoint]) -> None: ... - @typing.overload - def translated(self, offset: typing.Union[QtCore.QPointF, QtCore.QPoint]) -> 'QPolygonF': ... - @typing.overload - def translated(self, dx: float, dy: float) -> 'QPolygonF': ... - def subtracted(self, r: 'QPolygonF') -> 'QPolygonF': ... - def intersected(self, r: 'QPolygonF') -> 'QPolygonF': ... - def united(self, r: 'QPolygonF') -> 'QPolygonF': ... - def containsPoint(self, pt: typing.Union[QtCore.QPointF, QtCore.QPoint], fillRule: QtCore.Qt.FillRule) -> bool: ... - def boundingRect(self) -> QtCore.QRectF: ... - def isClosed(self) -> bool: ... - def toPolygon(self) -> QPolygon: ... - @typing.overload - def translate(self, offset: typing.Union[QtCore.QPointF, QtCore.QPoint]) -> None: ... - @typing.overload - def translate(self, dx: float, dy: float) -> None: ... - - -class QQuaternion(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, aScalar: float, xpos: float, ypos: float, zpos: float) -> None: ... - @typing.overload - def __init__(self, aScalar: float, aVector: 'QVector3D') -> None: ... - @typing.overload - def __init__(self, aVector: 'QVector4D') -> None: ... - @typing.overload - def __init__(self, a0: 'QQuaternion') -> None: ... - - def __neg__(self) -> 'QQuaternion': ... - def toEulerAngles(self) -> 'QVector3D': ... - def conjugated(self) -> 'QQuaternion': ... - def inverted(self) -> 'QQuaternion': ... - @staticmethod - def dotProduct(q1: 'QQuaternion', q2: 'QQuaternion') -> float: ... - @staticmethod - def rotationTo(from_: 'QVector3D', to: 'QVector3D') -> 'QQuaternion': ... - @staticmethod - def fromDirection(direction: 'QVector3D', up: 'QVector3D') -> 'QQuaternion': ... - @staticmethod - def fromAxes(xAxis: 'QVector3D', yAxis: 'QVector3D', zAxis: 'QVector3D') -> 'QQuaternion': ... - def getAxes(self) -> typing.Tuple['QVector3D', 'QVector3D', 'QVector3D']: ... - @staticmethod - def fromRotationMatrix(rot3x3: QMatrix3x3) -> 'QQuaternion': ... - def toRotationMatrix(self) -> QMatrix3x3: ... - @typing.overload - @staticmethod - def fromEulerAngles(pitch: float, yaw: float, roll: float) -> 'QQuaternion': ... - @typing.overload - @staticmethod - def fromEulerAngles(eulerAngles: 'QVector3D') -> 'QQuaternion': ... - def getEulerAngles(self) -> typing.Tuple[float, float, float]: ... - def getAxisAndAngle(self) -> typing.Tuple['QVector3D', float]: ... - def toVector4D(self) -> 'QVector4D': ... - def vector(self) -> 'QVector3D': ... - @typing.overload - def setVector(self, aVector: 'QVector3D') -> None: ... - @typing.overload - def setVector(self, aX: float, aY: float, aZ: float) -> None: ... - def conjugate(self) -> 'QQuaternion': ... - def setScalar(self, aScalar: float) -> None: ... - def setZ(self, aZ: float) -> None: ... - def setY(self, aY: float) -> None: ... - def setX(self, aX: float) -> None: ... - def scalar(self) -> float: ... - def z(self) -> float: ... - def y(self) -> float: ... - def x(self) -> float: ... - def isIdentity(self) -> bool: ... - def isNull(self) -> bool: ... - @staticmethod - def nlerp(q1: 'QQuaternion', q2: 'QQuaternion', t: float) -> 'QQuaternion': ... - @staticmethod - def slerp(q1: 'QQuaternion', q2: 'QQuaternion', t: float) -> 'QQuaternion': ... - @typing.overload - @staticmethod - def fromAxisAndAngle(axis: 'QVector3D', angle: float) -> 'QQuaternion': ... - @typing.overload - @staticmethod - def fromAxisAndAngle(x: float, y: float, z: float, angle: float) -> 'QQuaternion': ... - def rotatedVector(self, vector: 'QVector3D') -> 'QVector3D': ... - def normalize(self) -> None: ... - def normalized(self) -> 'QQuaternion': ... - def lengthSquared(self) -> float: ... - def length(self) -> float: ... - def __repr__(self) -> str: ... - - -class QRasterWindow(QPaintDeviceWindow): - - def __init__(self, parent: typing.Optional[QWindow] = ...) -> None: ... - - def metric(self, metric: QPaintDevice.PaintDeviceMetric) -> int: ... - - -class QRawFont(sip.simplewrapper): - - class LayoutFlag(int): ... - SeparateAdvances = ... # type: 'QRawFont.LayoutFlag' - KernedAdvances = ... # type: 'QRawFont.LayoutFlag' - UseDesignMetrics = ... # type: 'QRawFont.LayoutFlag' - - class AntialiasingType(int): ... - PixelAntialiasing = ... # type: 'QRawFont.AntialiasingType' - SubPixelAntialiasing = ... # type: 'QRawFont.AntialiasingType' - - class LayoutFlags(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QRawFont.LayoutFlags', 'QRawFont.LayoutFlag']) -> None: ... - @typing.overload - def __init__(self, a0: 'QRawFont.LayoutFlags') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QRawFont.LayoutFlags': ... - def __int__(self) -> int: ... - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, fileName: str, pixelSize: float, hintingPreference: QFont.HintingPreference = ...) -> None: ... - @typing.overload - def __init__(self, fontData: typing.Union[QtCore.QByteArray, bytes, bytearray], pixelSize: float, hintingPreference: QFont.HintingPreference = ...) -> None: ... - @typing.overload - def __init__(self, other: 'QRawFont') -> None: ... - - def swap(self, other: 'QRawFont') -> None: ... - def underlinePosition(self) -> float: ... - def lineThickness(self) -> float: ... - def boundingRect(self, glyphIndex: int) -> QtCore.QRectF: ... - @staticmethod - def fromFont(font: QFont, writingSystem: QFontDatabase.WritingSystem = ...) -> 'QRawFont': ... - def fontTable(self, tagName: str) -> QtCore.QByteArray: ... - def supportedWritingSystems(self) -> typing.List[QFontDatabase.WritingSystem]: ... - @typing.overload - def supportsCharacter(self, ucs4: int) -> bool: ... - @typing.overload - def supportsCharacter(self, character: str) -> bool: ... - def loadFromData(self, fontData: typing.Union[QtCore.QByteArray, bytes, bytearray], pixelSize: float, hintingPreference: QFont.HintingPreference) -> None: ... - def loadFromFile(self, fileName: str, pixelSize: float, hintingPreference: QFont.HintingPreference) -> None: ... - def unitsPerEm(self) -> float: ... - def maxCharWidth(self) -> float: ... - def averageCharWidth(self) -> float: ... - def xHeight(self) -> float: ... - def leading(self) -> float: ... - def descent(self) -> float: ... - def ascent(self) -> float: ... - def hintingPreference(self) -> QFont.HintingPreference: ... - def pixelSize(self) -> float: ... - def setPixelSize(self, pixelSize: float) -> None: ... - def pathForGlyph(self, glyphIndex: int) -> QPainterPath: ... - def alphaMapForGlyph(self, glyphIndex: int, antialiasingType: 'QRawFont.AntialiasingType' = ..., transform: 'QTransform' = ...) -> QImage: ... - @typing.overload - def advancesForGlyphIndexes(self, glyphIndexes: typing.Iterable[int]) -> typing.List[QtCore.QPointF]: ... - @typing.overload - def advancesForGlyphIndexes(self, glyphIndexes: typing.Iterable[int], layoutFlags: typing.Union['QRawFont.LayoutFlags', 'QRawFont.LayoutFlag']) -> typing.List[QtCore.QPointF]: ... - def glyphIndexesForString(self, text: str) -> typing.List[int]: ... - def weight(self) -> int: ... - def style(self) -> QFont.Style: ... - def styleName(self) -> str: ... - def familyName(self) -> str: ... - def isValid(self) -> bool: ... - - -class QRegion(sip.simplewrapper): - - class RegionType(int): ... - Rectangle = ... # type: 'QRegion.RegionType' - Ellipse = ... # type: 'QRegion.RegionType' - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, x: int, y: int, w: int, h: int, type: 'QRegion.RegionType' = ...) -> None: ... - @typing.overload - def __init__(self, r: QtCore.QRect, type: 'QRegion.RegionType' = ...) -> None: ... - @typing.overload - def __init__(self, a: QPolygon, fillRule: QtCore.Qt.FillRule = ...) -> None: ... - @typing.overload - def __init__(self, bitmap: QBitmap) -> None: ... - @typing.overload - def __init__(self, region: 'QRegion') -> None: ... - @typing.overload - def __init__(self, variant: typing.Any) -> None: ... - - def isNull(self) -> bool: ... - def swap(self, other: 'QRegion') -> None: ... - def rectCount(self) -> int: ... - @typing.overload - def intersects(self, r: 'QRegion') -> bool: ... - @typing.overload - def intersects(self, r: QtCore.QRect) -> bool: ... - def xored(self, r: 'QRegion') -> 'QRegion': ... - def subtracted(self, r: 'QRegion') -> 'QRegion': ... - @typing.overload - def intersected(self, r: 'QRegion') -> 'QRegion': ... - @typing.overload - def intersected(self, r: QtCore.QRect) -> 'QRegion': ... - def rects(self) -> typing.List[QtCore.QRect]: ... - def boundingRect(self) -> QtCore.QRect: ... - @typing.overload - def united(self, r: 'QRegion') -> 'QRegion': ... - @typing.overload - def united(self, r: QtCore.QRect) -> 'QRegion': ... - @typing.overload - def translated(self, dx: int, dy: int) -> 'QRegion': ... - @typing.overload - def translated(self, p: QtCore.QPoint) -> 'QRegion': ... - @typing.overload - def translate(self, dx: int, dy: int) -> None: ... - @typing.overload - def translate(self, p: QtCore.QPoint) -> None: ... - @typing.overload - def __contains__(self, p: QtCore.QPoint) -> int: ... - @typing.overload - def __contains__(self, r: QtCore.QRect) -> int: ... - @typing.overload - def contains(self, p: QtCore.QPoint) -> bool: ... - @typing.overload - def contains(self, r: QtCore.QRect) -> bool: ... - def __bool__(self) -> int: ... - def isEmpty(self) -> bool: ... - - -class QRgba64(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QRgba64') -> None: ... - - def __long__(self) -> int: ... - def unpremultiplied(self) -> 'QRgba64': ... - def premultiplied(self) -> 'QRgba64': ... - def toRgb16(self) -> int: ... - def toArgb32(self) -> int: ... - def alpha8(self) -> int: ... - def blue8(self) -> int: ... - def green8(self) -> int: ... - def red8(self) -> int: ... - def setAlpha(self, _alpha: int) -> None: ... - def setBlue(self, _blue: int) -> None: ... - def setGreen(self, _green: int) -> None: ... - def setRed(self, _red: int) -> None: ... - def alpha(self) -> int: ... - def blue(self) -> int: ... - def green(self) -> int: ... - def red(self) -> int: ... - def isTransparent(self) -> bool: ... - def isOpaque(self) -> bool: ... - @staticmethod - def fromArgb32(rgb: int) -> 'QRgba64': ... - @staticmethod - def fromRgba(red: int, green: int, blue: int, alpha: int) -> 'QRgba64': ... - @typing.overload - @staticmethod - def fromRgba64(c: int) -> 'QRgba64': ... - @typing.overload - @staticmethod - def fromRgba64(red: int, green: int, blue: int, alpha: int) -> 'QRgba64': ... - - -class QScreen(QtCore.QObject): - - def availableGeometryChanged(self, geometry: QtCore.QRect) -> None: ... - def virtualGeometryChanged(self, rect: QtCore.QRect) -> None: ... - def physicalSizeChanged(self, size: QtCore.QSizeF) -> None: ... - def refreshRateChanged(self, refreshRate: float) -> None: ... - def orientationChanged(self, orientation: QtCore.Qt.ScreenOrientation) -> None: ... - def primaryOrientationChanged(self, orientation: QtCore.Qt.ScreenOrientation) -> None: ... - def logicalDotsPerInchChanged(self, dpi: float) -> None: ... - def physicalDotsPerInchChanged(self, dpi: float) -> None: ... - def geometryChanged(self, geometry: QtCore.QRect) -> None: ... - def devicePixelRatio(self) -> float: ... - def refreshRate(self) -> float: ... - def grabWindow(self, window: sip.voidptr, x: int = ..., y: int = ..., width: int = ..., height: int = ...) -> QPixmap: ... - def isLandscape(self, orientation: QtCore.Qt.ScreenOrientation) -> bool: ... - def isPortrait(self, orientation: QtCore.Qt.ScreenOrientation) -> bool: ... - def mapBetween(self, a: QtCore.Qt.ScreenOrientation, b: QtCore.Qt.ScreenOrientation, rect: QtCore.QRect) -> QtCore.QRect: ... - def transformBetween(self, a: QtCore.Qt.ScreenOrientation, b: QtCore.Qt.ScreenOrientation, target: QtCore.QRect) -> 'QTransform': ... - def angleBetween(self, a: QtCore.Qt.ScreenOrientation, b: QtCore.Qt.ScreenOrientation) -> int: ... - def setOrientationUpdateMask(self, mask: typing.Union[QtCore.Qt.ScreenOrientations, QtCore.Qt.ScreenOrientation]) -> None: ... - def orientationUpdateMask(self) -> QtCore.Qt.ScreenOrientations: ... - def orientation(self) -> QtCore.Qt.ScreenOrientation: ... - def primaryOrientation(self) -> QtCore.Qt.ScreenOrientation: ... - def nativeOrientation(self) -> QtCore.Qt.ScreenOrientation: ... - def availableVirtualGeometry(self) -> QtCore.QRect: ... - def availableVirtualSize(self) -> QtCore.QSize: ... - def virtualGeometry(self) -> QtCore.QRect: ... - def virtualSize(self) -> QtCore.QSize: ... - def virtualSiblings(self) -> typing.List['QScreen']: ... - def availableGeometry(self) -> QtCore.QRect: ... - def availableSize(self) -> QtCore.QSize: ... - def logicalDotsPerInch(self) -> float: ... - def logicalDotsPerInchY(self) -> float: ... - def logicalDotsPerInchX(self) -> float: ... - def physicalDotsPerInch(self) -> float: ... - def physicalDotsPerInchY(self) -> float: ... - def physicalDotsPerInchX(self) -> float: ... - def physicalSize(self) -> QtCore.QSizeF: ... - def geometry(self) -> QtCore.QRect: ... - def size(self) -> QtCore.QSize: ... - def depth(self) -> int: ... - def name(self) -> str: ... - - -class QSessionManager(QtCore.QObject): - - class RestartHint(int): ... - RestartIfRunning = ... # type: 'QSessionManager.RestartHint' - RestartAnyway = ... # type: 'QSessionManager.RestartHint' - RestartImmediately = ... # type: 'QSessionManager.RestartHint' - RestartNever = ... # type: 'QSessionManager.RestartHint' - - def requestPhase2(self) -> None: ... - def isPhase2(self) -> bool: ... - @typing.overload - def setManagerProperty(self, name: str, value: str) -> None: ... - @typing.overload - def setManagerProperty(self, name: str, value: typing.Iterable[str]) -> None: ... - def discardCommand(self) -> typing.List[str]: ... - def setDiscardCommand(self, a0: typing.Iterable[str]) -> None: ... - def restartCommand(self) -> typing.List[str]: ... - def setRestartCommand(self, a0: typing.Iterable[str]) -> None: ... - def restartHint(self) -> 'QSessionManager.RestartHint': ... - def setRestartHint(self, a0: 'QSessionManager.RestartHint') -> None: ... - def cancel(self) -> None: ... - def release(self) -> None: ... - def allowsErrorInteraction(self) -> bool: ... - def allowsInteraction(self) -> bool: ... - def sessionKey(self) -> str: ... - def sessionId(self) -> str: ... - - -class QStandardItemModel(QtCore.QAbstractItemModel): - - @typing.overload - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - @typing.overload - def __init__(self, rows: int, columns: int, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def itemChanged(self, item: 'QStandardItem') -> None: ... - def setItemRoleNames(self, roleNames: typing.Dict[int, typing.Union[QtCore.QByteArray, bytes, bytearray]]) -> None: ... - def sibling(self, row: int, column: int, idx: QtCore.QModelIndex) -> QtCore.QModelIndex: ... - def dropMimeData(self, data: QtCore.QMimeData, action: QtCore.Qt.DropAction, row: int, column: int, parent: QtCore.QModelIndex) -> bool: ... - def mimeData(self, indexes: typing.Any) -> QtCore.QMimeData: ... - def mimeTypes(self) -> typing.List[str]: ... - def setSortRole(self, role: int) -> None: ... - def sortRole(self) -> int: ... - def findItems(self, text: str, flags: typing.Union[QtCore.Qt.MatchFlags, QtCore.Qt.MatchFlag] = ..., column: int = ...) -> typing.List['QStandardItem']: ... - def setItemPrototype(self, item: 'QStandardItem') -> None: ... - def itemPrototype(self) -> 'QStandardItem': ... - def takeVerticalHeaderItem(self, row: int) -> 'QStandardItem': ... - def takeHorizontalHeaderItem(self, column: int) -> 'QStandardItem': ... - def takeColumn(self, column: int) -> typing.List['QStandardItem']: ... - def takeRow(self, row: int) -> typing.List['QStandardItem']: ... - def takeItem(self, row: int, column: int = ...) -> 'QStandardItem': ... - @typing.overload - def insertColumn(self, column: int, items: typing.Iterable['QStandardItem']) -> None: ... - @typing.overload - def insertColumn(self, column: int, parent: QtCore.QModelIndex = ...) -> bool: ... - @typing.overload - def insertRow(self, row: int, items: typing.Iterable['QStandardItem']) -> None: ... - @typing.overload - def insertRow(self, arow: int, aitem: 'QStandardItem') -> None: ... - @typing.overload - def insertRow(self, row: int, parent: QtCore.QModelIndex = ...) -> bool: ... - def appendColumn(self, items: typing.Iterable['QStandardItem']) -> None: ... - @typing.overload - def appendRow(self, items: typing.Any) -> None: ... - @typing.overload - def appendRow(self, aitem: 'QStandardItem') -> None: ... - def setColumnCount(self, columns: int) -> None: ... - def setRowCount(self, rows: int) -> None: ... - def setVerticalHeaderLabels(self, labels: typing.Iterable[str]) -> None: ... - def setHorizontalHeaderLabels(self, labels: typing.Iterable[str]) -> None: ... - def setVerticalHeaderItem(self, row: int, item: 'QStandardItem') -> None: ... - def verticalHeaderItem(self, row: int) -> 'QStandardItem': ... - def setHorizontalHeaderItem(self, column: int, item: 'QStandardItem') -> None: ... - def horizontalHeaderItem(self, column: int) -> 'QStandardItem': ... - def invisibleRootItem(self) -> 'QStandardItem': ... - @typing.overload - def setItem(self, row: int, column: int, item: 'QStandardItem') -> None: ... - @typing.overload - def setItem(self, arow: int, aitem: 'QStandardItem') -> None: ... - def item(self, row: int, column: int = ...) -> 'QStandardItem': ... - def indexFromItem(self, item: 'QStandardItem') -> QtCore.QModelIndex: ... - def itemFromIndex(self, index: QtCore.QModelIndex) -> 'QStandardItem': ... - def sort(self, column: int, order: QtCore.Qt.SortOrder = ...) -> None: ... - def setItemData(self, index: QtCore.QModelIndex, roles: typing.Dict[int, typing.Any]) -> bool: ... - def itemData(self, index: QtCore.QModelIndex) -> typing.Dict[int, typing.Any]: ... - def supportedDropActions(self) -> QtCore.Qt.DropActions: ... - def clear(self) -> None: ... - def flags(self, index: QtCore.QModelIndex) -> QtCore.Qt.ItemFlags: ... - def removeColumns(self, column: int, count: int, parent: QtCore.QModelIndex = ...) -> bool: ... - def removeRows(self, row: int, count: int, parent: QtCore.QModelIndex = ...) -> bool: ... - def insertColumns(self, column: int, count: int, parent: QtCore.QModelIndex = ...) -> bool: ... - def insertRows(self, row: int, count: int, parent: QtCore.QModelIndex = ...) -> bool: ... - def setHeaderData(self, section: int, orientation: QtCore.Qt.Orientation, value: typing.Any, role: int = ...) -> bool: ... - def headerData(self, section: int, orientation: QtCore.Qt.Orientation, role: int = ...) -> typing.Any: ... - def setData(self, index: QtCore.QModelIndex, value: typing.Any, role: int = ...) -> bool: ... - def data(self, index: QtCore.QModelIndex, role: int = ...) -> typing.Any: ... - def hasChildren(self, parent: QtCore.QModelIndex = ...) -> bool: ... - def columnCount(self, parent: QtCore.QModelIndex = ...) -> int: ... - def rowCount(self, parent: QtCore.QModelIndex = ...) -> int: ... - @typing.overload - def parent(self, child: QtCore.QModelIndex) -> QtCore.QModelIndex: ... - @typing.overload - def parent(self) -> QtCore.QObject: ... - def index(self, row: int, column: int, parent: QtCore.QModelIndex = ...) -> QtCore.QModelIndex: ... - - -class QStandardItem(sip.wrapper): - - class ItemType(int): ... - Type = ... # type: 'QStandardItem.ItemType' - UserType = ... # type: 'QStandardItem.ItemType' - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, text: str) -> None: ... - @typing.overload - def __init__(self, icon: QIcon, text: str) -> None: ... - @typing.overload - def __init__(self, rows: int, columns: int = ...) -> None: ... - @typing.overload - def __init__(self, other: 'QStandardItem') -> None: ... - - def setUserTristate(self, tristate: bool) -> None: ... - def isUserTristate(self) -> bool: ... - def setAutoTristate(self, tristate: bool) -> None: ... - def isAutoTristate(self) -> bool: ... - def emitDataChanged(self) -> None: ... - def appendRows(self, items: typing.Iterable['QStandardItem']) -> None: ... - def appendColumn(self, items: typing.Iterable['QStandardItem']) -> None: ... - @typing.overload - def appendRow(self, items: typing.Iterable['QStandardItem']) -> None: ... - @typing.overload - def appendRow(self, aitem: 'QStandardItem') -> None: ... - def setAccessibleDescription(self, aaccessibleDescription: str) -> None: ... - def setAccessibleText(self, aaccessibleText: str) -> None: ... - def setCheckState(self, acheckState: QtCore.Qt.CheckState) -> None: ... - def setForeground(self, abrush: typing.Union[QBrush, QColor, QtCore.Qt.GlobalColor, QGradient]) -> None: ... - def setBackground(self, abrush: typing.Union[QBrush, QColor, QtCore.Qt.GlobalColor, QGradient]) -> None: ... - def setTextAlignment(self, atextAlignment: typing.Union[QtCore.Qt.Alignment, QtCore.Qt.AlignmentFlag]) -> None: ... - def setFont(self, afont: QFont) -> None: ... - def setSizeHint(self, asizeHint: QtCore.QSize) -> None: ... - def setWhatsThis(self, awhatsThis: str) -> None: ... - def setStatusTip(self, astatusTip: str) -> None: ... - def setToolTip(self, atoolTip: str) -> None: ... - def setIcon(self, aicon: QIcon) -> None: ... - def setText(self, atext: str) -> None: ... - def write(self, out: QtCore.QDataStream) -> None: ... - def read(self, in_: QtCore.QDataStream) -> None: ... - def type(self) -> int: ... - def clone(self) -> 'QStandardItem': ... - def sortChildren(self, column: int, order: QtCore.Qt.SortOrder = ...) -> None: ... - def takeColumn(self, column: int) -> typing.List['QStandardItem']: ... - def takeRow(self, row: int) -> typing.List['QStandardItem']: ... - def takeChild(self, row: int, column: int = ...) -> 'QStandardItem': ... - def removeColumns(self, column: int, count: int) -> None: ... - def removeRows(self, row: int, count: int) -> None: ... - def removeColumn(self, column: int) -> None: ... - def removeRow(self, row: int) -> None: ... - def insertColumns(self, column: int, count: int) -> None: ... - def insertColumn(self, column: int, items: typing.Iterable['QStandardItem']) -> None: ... - @typing.overload - def insertRows(self, row: int, count: int) -> None: ... - @typing.overload - def insertRows(self, row: int, items: typing.Iterable['QStandardItem']) -> None: ... - @typing.overload - def insertRow(self, row: int, items: typing.Iterable['QStandardItem']) -> None: ... - @typing.overload - def insertRow(self, arow: int, aitem: 'QStandardItem') -> None: ... - @typing.overload - def setChild(self, row: int, column: int, item: 'QStandardItem') -> None: ... - @typing.overload - def setChild(self, arow: int, aitem: 'QStandardItem') -> None: ... - def child(self, row: int, column: int = ...) -> 'QStandardItem': ... - def hasChildren(self) -> bool: ... - def setColumnCount(self, columns: int) -> None: ... - def columnCount(self) -> int: ... - def setRowCount(self, rows: int) -> None: ... - def rowCount(self) -> int: ... - def model(self) -> QStandardItemModel: ... - def index(self) -> QtCore.QModelIndex: ... - def column(self) -> int: ... - def row(self) -> int: ... - def parent(self) -> 'QStandardItem': ... - def setDropEnabled(self, dropEnabled: bool) -> None: ... - def isDropEnabled(self) -> bool: ... - def setDragEnabled(self, dragEnabled: bool) -> None: ... - def isDragEnabled(self) -> bool: ... - def setTristate(self, tristate: bool) -> None: ... - def isTristate(self) -> bool: ... - def setCheckable(self, checkable: bool) -> None: ... - def isCheckable(self) -> bool: ... - def setSelectable(self, selectable: bool) -> None: ... - def isSelectable(self) -> bool: ... - def setEditable(self, editable: bool) -> None: ... - def isEditable(self) -> bool: ... - def setEnabled(self, enabled: bool) -> None: ... - def isEnabled(self) -> bool: ... - def setFlags(self, flags: typing.Union[QtCore.Qt.ItemFlags, QtCore.Qt.ItemFlag]) -> None: ... - def flags(self) -> QtCore.Qt.ItemFlags: ... - def accessibleDescription(self) -> str: ... - def accessibleText(self) -> str: ... - def checkState(self) -> QtCore.Qt.CheckState: ... - def foreground(self) -> QBrush: ... - def background(self) -> QBrush: ... - def textAlignment(self) -> QtCore.Qt.Alignment: ... - def font(self) -> QFont: ... - def sizeHint(self) -> QtCore.QSize: ... - def whatsThis(self) -> str: ... - def statusTip(self) -> str: ... - def toolTip(self) -> str: ... - def icon(self) -> QIcon: ... - def text(self) -> str: ... - def setData(self, value: typing.Any, role: int = ...) -> None: ... - def data(self, role: int = ...) -> typing.Any: ... - - -class QStaticText(sip.simplewrapper): - - class PerformanceHint(int): ... - ModerateCaching = ... # type: 'QStaticText.PerformanceHint' - AggressiveCaching = ... # type: 'QStaticText.PerformanceHint' - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, text: str) -> None: ... - @typing.overload - def __init__(self, other: 'QStaticText') -> None: ... - - def swap(self, other: 'QStaticText') -> None: ... - def performanceHint(self) -> 'QStaticText.PerformanceHint': ... - def setPerformanceHint(self, performanceHint: 'QStaticText.PerformanceHint') -> None: ... - def prepare(self, matrix: 'QTransform' = ..., font: QFont = ...) -> None: ... - def size(self) -> QtCore.QSizeF: ... - def textOption(self) -> 'QTextOption': ... - def setTextOption(self, textOption: 'QTextOption') -> None: ... - def textWidth(self) -> float: ... - def setTextWidth(self, textWidth: float) -> None: ... - def textFormat(self) -> QtCore.Qt.TextFormat: ... - def setTextFormat(self, textFormat: QtCore.Qt.TextFormat) -> None: ... - def text(self) -> str: ... - def setText(self, text: str) -> None: ... - - -class QStyleHints(QtCore.QObject): - - def showIsMaximized(self) -> bool: ... - def tabFocusBehaviorChanged(self, tabFocusBehavior: QtCore.Qt.TabFocusBehavior) -> None: ... - def mousePressAndHoldIntervalChanged(self, mousePressAndHoldInterval: int) -> None: ... - def startDragTimeChanged(self, startDragTime: int) -> None: ... - def startDragDistanceChanged(self, startDragDistance: int) -> None: ... - def mouseDoubleClickIntervalChanged(self, mouseDoubleClickInterval: int) -> None: ... - def keyboardInputIntervalChanged(self, keyboardInputInterval: int) -> None: ... - def cursorFlashTimeChanged(self, cursorFlashTime: int) -> None: ... - def singleClickActivation(self) -> bool: ... - def tabFocusBehavior(self) -> QtCore.Qt.TabFocusBehavior: ... - def mousePressAndHoldInterval(self) -> int: ... - def setFocusOnTouchRelease(self) -> bool: ... - def passwordMaskCharacter(self) -> str: ... - def useRtlExtensions(self) -> bool: ... - def fontSmoothingGamma(self) -> float: ... - def passwordMaskDelay(self) -> int: ... - def showIsFullScreen(self) -> bool: ... - def cursorFlashTime(self) -> int: ... - def keyboardAutoRepeatRate(self) -> int: ... - def keyboardInputInterval(self) -> int: ... - def startDragVelocity(self) -> int: ... - def startDragTime(self) -> int: ... - def startDragDistance(self) -> int: ... - def mouseDoubleClickInterval(self) -> int: ... - - -class QSurfaceFormat(sip.simplewrapper): - - class OpenGLContextProfile(int): ... - NoProfile = ... # type: 'QSurfaceFormat.OpenGLContextProfile' - CoreProfile = ... # type: 'QSurfaceFormat.OpenGLContextProfile' - CompatibilityProfile = ... # type: 'QSurfaceFormat.OpenGLContextProfile' - - class RenderableType(int): ... - DefaultRenderableType = ... # type: 'QSurfaceFormat.RenderableType' - OpenGL = ... # type: 'QSurfaceFormat.RenderableType' - OpenGLES = ... # type: 'QSurfaceFormat.RenderableType' - OpenVG = ... # type: 'QSurfaceFormat.RenderableType' - - class SwapBehavior(int): ... - DefaultSwapBehavior = ... # type: 'QSurfaceFormat.SwapBehavior' - SingleBuffer = ... # type: 'QSurfaceFormat.SwapBehavior' - DoubleBuffer = ... # type: 'QSurfaceFormat.SwapBehavior' - TripleBuffer = ... # type: 'QSurfaceFormat.SwapBehavior' - - class FormatOption(int): ... - StereoBuffers = ... # type: 'QSurfaceFormat.FormatOption' - DebugContext = ... # type: 'QSurfaceFormat.FormatOption' - DeprecatedFunctions = ... # type: 'QSurfaceFormat.FormatOption' - ResetNotification = ... # type: 'QSurfaceFormat.FormatOption' - - class FormatOptions(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QSurfaceFormat.FormatOptions', 'QSurfaceFormat.FormatOption']) -> None: ... - @typing.overload - def __init__(self, a0: 'QSurfaceFormat.FormatOptions') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QSurfaceFormat.FormatOptions': ... - def __int__(self) -> int: ... - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, options: 'QSurfaceFormat.FormatOptions') -> None: ... - @typing.overload - def __init__(self, other: 'QSurfaceFormat') -> None: ... - - @staticmethod - def defaultFormat() -> 'QSurfaceFormat': ... - @staticmethod - def setDefaultFormat(format: 'QSurfaceFormat') -> None: ... - def setSwapInterval(self, interval: int) -> None: ... - def swapInterval(self) -> int: ... - def options(self) -> 'QSurfaceFormat.FormatOptions': ... - def setOptions(self, options: 'QSurfaceFormat.FormatOptions') -> None: ... - def setVersion(self, major: int, minor: int) -> None: ... - def version(self) -> typing.Tuple[int, int]: ... - def stereo(self) -> bool: ... - @typing.overload - def testOption(self, opt: 'QSurfaceFormat.FormatOptions') -> bool: ... - @typing.overload - def testOption(self, option: 'QSurfaceFormat.FormatOption') -> bool: ... - @typing.overload - def setOption(self, opt: 'QSurfaceFormat.FormatOptions') -> None: ... - @typing.overload - def setOption(self, option: 'QSurfaceFormat.FormatOption', on: bool = ...) -> None: ... - def setStereo(self, enable: bool) -> None: ... - def minorVersion(self) -> int: ... - def setMinorVersion(self, minorVersion: int) -> None: ... - def majorVersion(self) -> int: ... - def setMajorVersion(self, majorVersion: int) -> None: ... - def renderableType(self) -> 'QSurfaceFormat.RenderableType': ... - def setRenderableType(self, type: 'QSurfaceFormat.RenderableType') -> None: ... - def profile(self) -> 'QSurfaceFormat.OpenGLContextProfile': ... - def setProfile(self, profile: 'QSurfaceFormat.OpenGLContextProfile') -> None: ... - def hasAlpha(self) -> bool: ... - def swapBehavior(self) -> 'QSurfaceFormat.SwapBehavior': ... - def setSwapBehavior(self, behavior: 'QSurfaceFormat.SwapBehavior') -> None: ... - def samples(self) -> int: ... - def setSamples(self, numSamples: int) -> None: ... - def alphaBufferSize(self) -> int: ... - def setAlphaBufferSize(self, size: int) -> None: ... - def blueBufferSize(self) -> int: ... - def setBlueBufferSize(self, size: int) -> None: ... - def greenBufferSize(self) -> int: ... - def setGreenBufferSize(self, size: int) -> None: ... - def redBufferSize(self) -> int: ... - def setRedBufferSize(self, size: int) -> None: ... - def stencilBufferSize(self) -> int: ... - def setStencilBufferSize(self, size: int) -> None: ... - def depthBufferSize(self) -> int: ... - def setDepthBufferSize(self, size: int) -> None: ... - - -class QSyntaxHighlighter(QtCore.QObject): - - @typing.overload - def __init__(self, parent: 'QTextDocument') -> None: ... - @typing.overload - def __init__(self, parent: QtCore.QObject) -> None: ... - - def currentBlock(self) -> 'QTextBlock': ... - def currentBlockUserData(self) -> 'QTextBlockUserData': ... - def setCurrentBlockUserData(self, data: 'QTextBlockUserData') -> None: ... - def setCurrentBlockState(self, newState: int) -> None: ... - def currentBlockState(self) -> int: ... - def previousBlockState(self) -> int: ... - def format(self, pos: int) -> 'QTextCharFormat': ... - @typing.overload - def setFormat(self, start: int, count: int, format: 'QTextCharFormat') -> None: ... - @typing.overload - def setFormat(self, start: int, count: int, color: typing.Union[QColor, QtCore.Qt.GlobalColor, QGradient]) -> None: ... - @typing.overload - def setFormat(self, start: int, count: int, font: QFont) -> None: ... - def highlightBlock(self, text: str) -> None: ... - def rehighlightBlock(self, block: 'QTextBlock') -> None: ... - def rehighlight(self) -> None: ... - def document(self) -> 'QTextDocument': ... - def setDocument(self, doc: 'QTextDocument') -> None: ... - - -class QTextCursor(sip.simplewrapper): - - class SelectionType(int): ... - WordUnderCursor = ... # type: 'QTextCursor.SelectionType' - LineUnderCursor = ... # type: 'QTextCursor.SelectionType' - BlockUnderCursor = ... # type: 'QTextCursor.SelectionType' - Document = ... # type: 'QTextCursor.SelectionType' - - class MoveOperation(int): ... - NoMove = ... # type: 'QTextCursor.MoveOperation' - Start = ... # type: 'QTextCursor.MoveOperation' - Up = ... # type: 'QTextCursor.MoveOperation' - StartOfLine = ... # type: 'QTextCursor.MoveOperation' - StartOfBlock = ... # type: 'QTextCursor.MoveOperation' - StartOfWord = ... # type: 'QTextCursor.MoveOperation' - PreviousBlock = ... # type: 'QTextCursor.MoveOperation' - PreviousCharacter = ... # type: 'QTextCursor.MoveOperation' - PreviousWord = ... # type: 'QTextCursor.MoveOperation' - Left = ... # type: 'QTextCursor.MoveOperation' - WordLeft = ... # type: 'QTextCursor.MoveOperation' - End = ... # type: 'QTextCursor.MoveOperation' - Down = ... # type: 'QTextCursor.MoveOperation' - EndOfLine = ... # type: 'QTextCursor.MoveOperation' - EndOfWord = ... # type: 'QTextCursor.MoveOperation' - EndOfBlock = ... # type: 'QTextCursor.MoveOperation' - NextBlock = ... # type: 'QTextCursor.MoveOperation' - NextCharacter = ... # type: 'QTextCursor.MoveOperation' - NextWord = ... # type: 'QTextCursor.MoveOperation' - Right = ... # type: 'QTextCursor.MoveOperation' - WordRight = ... # type: 'QTextCursor.MoveOperation' - NextCell = ... # type: 'QTextCursor.MoveOperation' - PreviousCell = ... # type: 'QTextCursor.MoveOperation' - NextRow = ... # type: 'QTextCursor.MoveOperation' - PreviousRow = ... # type: 'QTextCursor.MoveOperation' - - class MoveMode(int): ... - MoveAnchor = ... # type: 'QTextCursor.MoveMode' - KeepAnchor = ... # type: 'QTextCursor.MoveMode' - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, document: 'QTextDocument') -> None: ... - @typing.overload - def __init__(self, frame: 'QTextFrame') -> None: ... - @typing.overload - def __init__(self, block: 'QTextBlock') -> None: ... - @typing.overload - def __init__(self, cursor: 'QTextCursor') -> None: ... - - def swap(self, other: 'QTextCursor') -> None: ... - def keepPositionOnInsert(self) -> bool: ... - def setKeepPositionOnInsert(self, b: bool) -> None: ... - def verticalMovementX(self) -> int: ... - def setVerticalMovementX(self, x: int) -> None: ... - def positionInBlock(self) -> int: ... - def document(self) -> 'QTextDocument': ... - def setVisualNavigation(self, b: bool) -> None: ... - def visualNavigation(self) -> bool: ... - def isCopyOf(self, other: 'QTextCursor') -> bool: ... - def columnNumber(self) -> int: ... - def blockNumber(self) -> int: ... - def endEditBlock(self) -> None: ... - def joinPreviousEditBlock(self) -> None: ... - def beginEditBlock(self) -> None: ... - @typing.overload - def insertImage(self, format: 'QTextImageFormat') -> None: ... - @typing.overload - def insertImage(self, format: 'QTextImageFormat', alignment: 'QTextFrameFormat.Position') -> None: ... - @typing.overload - def insertImage(self, name: str) -> None: ... - @typing.overload - def insertImage(self, image: QImage, name: str = ...) -> None: ... - def insertHtml(self, html: str) -> None: ... - def insertFragment(self, fragment: 'QTextDocumentFragment') -> None: ... - def currentFrame(self) -> 'QTextFrame': ... - def insertFrame(self, format: 'QTextFrameFormat') -> 'QTextFrame': ... - def currentTable(self) -> 'QTextTable': ... - @typing.overload - def insertTable(self, rows: int, cols: int, format: 'QTextTableFormat') -> 'QTextTable': ... - @typing.overload - def insertTable(self, rows: int, cols: int) -> 'QTextTable': ... - def currentList(self) -> 'QTextList': ... - @typing.overload - def createList(self, format: 'QTextListFormat') -> 'QTextList': ... - @typing.overload - def createList(self, style: 'QTextListFormat.Style') -> 'QTextList': ... - @typing.overload - def insertList(self, format: 'QTextListFormat') -> 'QTextList': ... - @typing.overload - def insertList(self, style: 'QTextListFormat.Style') -> 'QTextList': ... - @typing.overload - def insertBlock(self) -> None: ... - @typing.overload - def insertBlock(self, format: 'QTextBlockFormat') -> None: ... - @typing.overload - def insertBlock(self, format: 'QTextBlockFormat', charFormat: 'QTextCharFormat') -> None: ... - def atEnd(self) -> bool: ... - def atStart(self) -> bool: ... - def atBlockEnd(self) -> bool: ... - def atBlockStart(self) -> bool: ... - def mergeBlockCharFormat(self, modifier: 'QTextCharFormat') -> None: ... - def setBlockCharFormat(self, format: 'QTextCharFormat') -> None: ... - def blockCharFormat(self) -> 'QTextCharFormat': ... - def mergeBlockFormat(self, modifier: 'QTextBlockFormat') -> None: ... - def setBlockFormat(self, format: 'QTextBlockFormat') -> None: ... - def blockFormat(self) -> 'QTextBlockFormat': ... - def mergeCharFormat(self, modifier: 'QTextCharFormat') -> None: ... - def setCharFormat(self, format: 'QTextCharFormat') -> None: ... - def charFormat(self) -> 'QTextCharFormat': ... - def block(self) -> 'QTextBlock': ... - def selectedTableCells(self) -> typing.Tuple[int, int, int, int]: ... - def selection(self) -> 'QTextDocumentFragment': ... - def selectedText(self) -> str: ... - def selectionEnd(self) -> int: ... - def selectionStart(self) -> int: ... - def clearSelection(self) -> None: ... - def removeSelectedText(self) -> None: ... - def hasComplexSelection(self) -> bool: ... - def hasSelection(self) -> bool: ... - def select(self, selection: 'QTextCursor.SelectionType') -> None: ... - def deletePreviousChar(self) -> None: ... - def deleteChar(self) -> None: ... - def movePosition(self, op: 'QTextCursor.MoveOperation', mode: 'QTextCursor.MoveMode' = ..., n: int = ...) -> bool: ... - @typing.overload - def insertText(self, text: str) -> None: ... - @typing.overload - def insertText(self, text: str, format: 'QTextCharFormat') -> None: ... - def anchor(self) -> int: ... - def position(self) -> int: ... - def setPosition(self, pos: int, mode: 'QTextCursor.MoveMode' = ...) -> None: ... - def isNull(self) -> bool: ... - - -class Qt(sip.simplewrapper): - - def convertFromPlainText(self, plain: str, mode: QtCore.Qt.WhiteSpaceMode = ...) -> str: ... - def mightBeRichText(self, a0: str) -> bool: ... - - -class QTextDocument(QtCore.QObject): - - class Stacks(int): ... - UndoStack = ... # type: 'QTextDocument.Stacks' - RedoStack = ... # type: 'QTextDocument.Stacks' - UndoAndRedoStacks = ... # type: 'QTextDocument.Stacks' - - class ResourceType(int): ... - HtmlResource = ... # type: 'QTextDocument.ResourceType' - ImageResource = ... # type: 'QTextDocument.ResourceType' - StyleSheetResource = ... # type: 'QTextDocument.ResourceType' - UserResource = ... # type: 'QTextDocument.ResourceType' - - class FindFlag(int): ... - FindBackward = ... # type: 'QTextDocument.FindFlag' - FindCaseSensitively = ... # type: 'QTextDocument.FindFlag' - FindWholeWords = ... # type: 'QTextDocument.FindFlag' - - class MetaInformation(int): ... - DocumentTitle = ... # type: 'QTextDocument.MetaInformation' - DocumentUrl = ... # type: 'QTextDocument.MetaInformation' - - class FindFlags(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QTextDocument.FindFlags', 'QTextDocument.FindFlag']) -> None: ... - @typing.overload - def __init__(self, a0: 'QTextDocument.FindFlags') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QTextDocument.FindFlags': ... - def __int__(self) -> int: ... - - @typing.overload - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - @typing.overload - def __init__(self, text: str, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def baseUrlChanged(self, url: QtCore.QUrl) -> None: ... - def setBaseUrl(self, url: QtCore.QUrl) -> None: ... - def baseUrl(self) -> QtCore.QUrl: ... - def setDefaultCursorMoveStyle(self, style: QtCore.Qt.CursorMoveStyle) -> None: ... - def defaultCursorMoveStyle(self) -> QtCore.Qt.CursorMoveStyle: ... - def clearUndoRedoStacks(self, stacks: 'QTextDocument.Stacks' = ...) -> None: ... - def availableRedoSteps(self) -> int: ... - def availableUndoSteps(self) -> int: ... - def characterCount(self) -> int: ... - def lineCount(self) -> int: ... - def setDocumentMargin(self, margin: float) -> None: ... - def documentMargin(self) -> float: ... - def characterAt(self, pos: int) -> str: ... - def documentLayoutChanged(self) -> None: ... - def undoCommandAdded(self) -> None: ... - def setIndentWidth(self, width: float) -> None: ... - def indentWidth(self) -> float: ... - def lastBlock(self) -> 'QTextBlock': ... - def firstBlock(self) -> 'QTextBlock': ... - def findBlockByLineNumber(self, blockNumber: int) -> 'QTextBlock': ... - def findBlockByNumber(self, blockNumber: int) -> 'QTextBlock': ... - def revision(self) -> int: ... - def setDefaultTextOption(self, option: 'QTextOption') -> None: ... - def defaultTextOption(self) -> 'QTextOption': ... - def setMaximumBlockCount(self, maximum: int) -> None: ... - def maximumBlockCount(self) -> int: ... - def defaultStyleSheet(self) -> str: ... - def setDefaultStyleSheet(self, sheet: str) -> None: ... - def blockCount(self) -> int: ... - def size(self) -> QtCore.QSizeF: ... - def adjustSize(self) -> None: ... - def idealWidth(self) -> float: ... - def textWidth(self) -> float: ... - def setTextWidth(self, width: float) -> None: ... - def drawContents(self, p: QPainter, rect: QtCore.QRectF = ...) -> None: ... - def loadResource(self, type: int, name: QtCore.QUrl) -> typing.Any: ... - def createObject(self, f: 'QTextFormat') -> 'QTextObject': ... - def setModified(self, on: bool = ...) -> None: ... - @typing.overload - def redo(self) -> None: ... - @typing.overload - def redo(self, cursor: QTextCursor) -> None: ... - @typing.overload - def undo(self) -> None: ... - @typing.overload - def undo(self, cursor: QTextCursor) -> None: ... - def undoAvailable(self, a0: bool) -> None: ... - def redoAvailable(self, a0: bool) -> None: ... - def modificationChanged(self, m: bool) -> None: ... - def cursorPositionChanged(self, cursor: QTextCursor) -> None: ... - def contentsChanged(self) -> None: ... - def contentsChange(self, from_: int, charsRemoves: int, charsAdded: int) -> None: ... - def blockCountChanged(self, newBlockCount: int) -> None: ... - def useDesignMetrics(self) -> bool: ... - def setUseDesignMetrics(self, b: bool) -> None: ... - def markContentsDirty(self, from_: int, length: int) -> None: ... - def allFormats(self) -> typing.Any: ... - def addResource(self, type: int, name: QtCore.QUrl, resource: typing.Any) -> None: ... - def resource(self, type: int, name: QtCore.QUrl) -> typing.Any: ... - def print(self, printer: QPagedPaintDevice) -> None: ... - def print_(self, printer: QPagedPaintDevice) -> None: ... - def isModified(self) -> bool: ... - def pageCount(self) -> int: ... - def defaultFont(self) -> QFont: ... - def setDefaultFont(self, font: QFont) -> None: ... - def pageSize(self) -> QtCore.QSizeF: ... - def setPageSize(self, size: QtCore.QSizeF) -> None: ... - def end(self) -> 'QTextBlock': ... - def begin(self) -> 'QTextBlock': ... - def findBlock(self, pos: int) -> 'QTextBlock': ... - def objectForFormat(self, a0: 'QTextFormat') -> 'QTextObject': ... - def object(self, objectIndex: int) -> 'QTextObject': ... - def rootFrame(self) -> 'QTextFrame': ... - @typing.overload - def find(self, subString: str, position: int = ..., options: 'QTextDocument.FindFlags' = ...) -> QTextCursor: ... - @typing.overload - def find(self, expr: QtCore.QRegExp, position: int = ..., options: 'QTextDocument.FindFlags' = ...) -> QTextCursor: ... - @typing.overload - def find(self, expr: QtCore.QRegularExpression, position: int = ..., options: 'QTextDocument.FindFlags' = ...) -> QTextCursor: ... - @typing.overload - def find(self, subString: str, cursor: QTextCursor, options: 'QTextDocument.FindFlags' = ...) -> QTextCursor: ... - @typing.overload - def find(self, expr: QtCore.QRegExp, cursor: QTextCursor, options: 'QTextDocument.FindFlags' = ...) -> QTextCursor: ... - @typing.overload - def find(self, expr: QtCore.QRegularExpression, cursor: QTextCursor, options: 'QTextDocument.FindFlags' = ...) -> QTextCursor: ... - def setPlainText(self, text: str) -> None: ... - def toPlainText(self) -> str: ... - def setHtml(self, html: str) -> None: ... - def toHtml(self, encoding: typing.Union[QtCore.QByteArray, bytes, bytearray] = ...) -> str: ... - def metaInformation(self, info: 'QTextDocument.MetaInformation') -> str: ... - def setMetaInformation(self, info: 'QTextDocument.MetaInformation', a1: str) -> None: ... - def documentLayout(self) -> QAbstractTextDocumentLayout: ... - def setDocumentLayout(self, layout: QAbstractTextDocumentLayout) -> None: ... - def isRedoAvailable(self) -> bool: ... - def isUndoAvailable(self) -> bool: ... - def isUndoRedoEnabled(self) -> bool: ... - def setUndoRedoEnabled(self, enable: bool) -> None: ... - def clear(self) -> None: ... - def isEmpty(self) -> bool: ... - def clone(self, parent: typing.Optional[QtCore.QObject] = ...) -> 'QTextDocument': ... - - -class QTextDocumentFragment(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, document: QTextDocument) -> None: ... - @typing.overload - def __init__(self, range: QTextCursor) -> None: ... - @typing.overload - def __init__(self, rhs: 'QTextDocumentFragment') -> None: ... - - @typing.overload - @staticmethod - def fromHtml(html: str) -> 'QTextDocumentFragment': ... - @typing.overload - @staticmethod - def fromHtml(html: str, resourceProvider: QTextDocument) -> 'QTextDocumentFragment': ... - @staticmethod - def fromPlainText(plainText: str) -> 'QTextDocumentFragment': ... - def toHtml(self, encoding: typing.Union[QtCore.QByteArray, bytes, bytearray] = ...) -> str: ... - def toPlainText(self) -> str: ... - def isEmpty(self) -> bool: ... - - -class QTextDocumentWriter(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, device: QtCore.QIODevice, format: typing.Union[QtCore.QByteArray, bytes, bytearray]) -> None: ... - @typing.overload - def __init__(self, fileName: str, format: typing.Union[QtCore.QByteArray, bytes, bytearray] = ...) -> None: ... - - @staticmethod - def supportedDocumentFormats() -> typing.List[QtCore.QByteArray]: ... - def codec(self) -> QtCore.QTextCodec: ... - def setCodec(self, codec: QtCore.QTextCodec) -> None: ... - @typing.overload - def write(self, document: QTextDocument) -> bool: ... - @typing.overload - def write(self, fragment: QTextDocumentFragment) -> bool: ... - def fileName(self) -> str: ... - def setFileName(self, fileName: str) -> None: ... - def device(self) -> QtCore.QIODevice: ... - def setDevice(self, device: QtCore.QIODevice) -> None: ... - def format(self) -> QtCore.QByteArray: ... - def setFormat(self, format: typing.Union[QtCore.QByteArray, bytes, bytearray]) -> None: ... - - -class QTextLength(sip.simplewrapper): - - class Type(int): ... - VariableLength = ... # type: 'QTextLength.Type' - FixedLength = ... # type: 'QTextLength.Type' - PercentageLength = ... # type: 'QTextLength.Type' - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, atype: 'QTextLength.Type', avalue: float) -> None: ... - @typing.overload - def __init__(self, variant: typing.Any) -> None: ... - @typing.overload - def __init__(self, a0: 'QTextLength') -> None: ... - - def rawValue(self) -> float: ... - def value(self, maximumLength: float) -> float: ... - def type(self) -> 'QTextLength.Type': ... - - -class QTextFormat(sip.simplewrapper): - - class Property(int): ... - ObjectIndex = ... # type: 'QTextFormat.Property' - CssFloat = ... # type: 'QTextFormat.Property' - LayoutDirection = ... # type: 'QTextFormat.Property' - OutlinePen = ... # type: 'QTextFormat.Property' - BackgroundBrush = ... # type: 'QTextFormat.Property' - ForegroundBrush = ... # type: 'QTextFormat.Property' - BlockAlignment = ... # type: 'QTextFormat.Property' - BlockTopMargin = ... # type: 'QTextFormat.Property' - BlockBottomMargin = ... # type: 'QTextFormat.Property' - BlockLeftMargin = ... # type: 'QTextFormat.Property' - BlockRightMargin = ... # type: 'QTextFormat.Property' - TextIndent = ... # type: 'QTextFormat.Property' - BlockIndent = ... # type: 'QTextFormat.Property' - BlockNonBreakableLines = ... # type: 'QTextFormat.Property' - BlockTrailingHorizontalRulerWidth = ... # type: 'QTextFormat.Property' - FontFamily = ... # type: 'QTextFormat.Property' - FontPointSize = ... # type: 'QTextFormat.Property' - FontSizeAdjustment = ... # type: 'QTextFormat.Property' - FontSizeIncrement = ... # type: 'QTextFormat.Property' - FontWeight = ... # type: 'QTextFormat.Property' - FontItalic = ... # type: 'QTextFormat.Property' - FontUnderline = ... # type: 'QTextFormat.Property' - FontOverline = ... # type: 'QTextFormat.Property' - FontStrikeOut = ... # type: 'QTextFormat.Property' - FontFixedPitch = ... # type: 'QTextFormat.Property' - FontPixelSize = ... # type: 'QTextFormat.Property' - TextUnderlineColor = ... # type: 'QTextFormat.Property' - TextVerticalAlignment = ... # type: 'QTextFormat.Property' - TextOutline = ... # type: 'QTextFormat.Property' - IsAnchor = ... # type: 'QTextFormat.Property' - AnchorHref = ... # type: 'QTextFormat.Property' - AnchorName = ... # type: 'QTextFormat.Property' - ObjectType = ... # type: 'QTextFormat.Property' - ListStyle = ... # type: 'QTextFormat.Property' - ListIndent = ... # type: 'QTextFormat.Property' - FrameBorder = ... # type: 'QTextFormat.Property' - FrameMargin = ... # type: 'QTextFormat.Property' - FramePadding = ... # type: 'QTextFormat.Property' - FrameWidth = ... # type: 'QTextFormat.Property' - FrameHeight = ... # type: 'QTextFormat.Property' - TableColumns = ... # type: 'QTextFormat.Property' - TableColumnWidthConstraints = ... # type: 'QTextFormat.Property' - TableCellSpacing = ... # type: 'QTextFormat.Property' - TableCellPadding = ... # type: 'QTextFormat.Property' - TableCellRowSpan = ... # type: 'QTextFormat.Property' - TableCellColumnSpan = ... # type: 'QTextFormat.Property' - ImageName = ... # type: 'QTextFormat.Property' - ImageWidth = ... # type: 'QTextFormat.Property' - ImageHeight = ... # type: 'QTextFormat.Property' - TextUnderlineStyle = ... # type: 'QTextFormat.Property' - TableHeaderRowCount = ... # type: 'QTextFormat.Property' - FullWidthSelection = ... # type: 'QTextFormat.Property' - PageBreakPolicy = ... # type: 'QTextFormat.Property' - TextToolTip = ... # type: 'QTextFormat.Property' - FrameTopMargin = ... # type: 'QTextFormat.Property' - FrameBottomMargin = ... # type: 'QTextFormat.Property' - FrameLeftMargin = ... # type: 'QTextFormat.Property' - FrameRightMargin = ... # type: 'QTextFormat.Property' - FrameBorderBrush = ... # type: 'QTextFormat.Property' - FrameBorderStyle = ... # type: 'QTextFormat.Property' - BackgroundImageUrl = ... # type: 'QTextFormat.Property' - TabPositions = ... # type: 'QTextFormat.Property' - FirstFontProperty = ... # type: 'QTextFormat.Property' - FontCapitalization = ... # type: 'QTextFormat.Property' - FontLetterSpacing = ... # type: 'QTextFormat.Property' - FontWordSpacing = ... # type: 'QTextFormat.Property' - LastFontProperty = ... # type: 'QTextFormat.Property' - TableCellTopPadding = ... # type: 'QTextFormat.Property' - TableCellBottomPadding = ... # type: 'QTextFormat.Property' - TableCellLeftPadding = ... # type: 'QTextFormat.Property' - TableCellRightPadding = ... # type: 'QTextFormat.Property' - FontStyleHint = ... # type: 'QTextFormat.Property' - FontStyleStrategy = ... # type: 'QTextFormat.Property' - FontKerning = ... # type: 'QTextFormat.Property' - LineHeight = ... # type: 'QTextFormat.Property' - LineHeightType = ... # type: 'QTextFormat.Property' - FontHintingPreference = ... # type: 'QTextFormat.Property' - ListNumberPrefix = ... # type: 'QTextFormat.Property' - ListNumberSuffix = ... # type: 'QTextFormat.Property' - FontStretch = ... # type: 'QTextFormat.Property' - FontLetterSpacingType = ... # type: 'QTextFormat.Property' - UserProperty = ... # type: 'QTextFormat.Property' - - class PageBreakFlag(int): ... - PageBreak_Auto = ... # type: 'QTextFormat.PageBreakFlag' - PageBreak_AlwaysBefore = ... # type: 'QTextFormat.PageBreakFlag' - PageBreak_AlwaysAfter = ... # type: 'QTextFormat.PageBreakFlag' - - class ObjectTypes(int): ... - NoObject = ... # type: 'QTextFormat.ObjectTypes' - ImageObject = ... # type: 'QTextFormat.ObjectTypes' - TableObject = ... # type: 'QTextFormat.ObjectTypes' - TableCellObject = ... # type: 'QTextFormat.ObjectTypes' - UserObject = ... # type: 'QTextFormat.ObjectTypes' - - class FormatType(int): ... - InvalidFormat = ... # type: 'QTextFormat.FormatType' - BlockFormat = ... # type: 'QTextFormat.FormatType' - CharFormat = ... # type: 'QTextFormat.FormatType' - ListFormat = ... # type: 'QTextFormat.FormatType' - TableFormat = ... # type: 'QTextFormat.FormatType' - FrameFormat = ... # type: 'QTextFormat.FormatType' - UserFormat = ... # type: 'QTextFormat.FormatType' - - class PageBreakFlags(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QTextFormat.PageBreakFlags', 'QTextFormat.PageBreakFlag']) -> None: ... - @typing.overload - def __init__(self, a0: 'QTextFormat.PageBreakFlags') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QTextFormat.PageBreakFlags': ... - def __int__(self) -> int: ... - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, type: int) -> None: ... - @typing.overload - def __init__(self, rhs: 'QTextFormat') -> None: ... - @typing.overload - def __init__(self, variant: typing.Any) -> None: ... - - def isEmpty(self) -> bool: ... - def swap(self, other: 'QTextFormat') -> None: ... - def toTableCellFormat(self) -> 'QTextTableCellFormat': ... - def isTableCellFormat(self) -> bool: ... - def propertyCount(self) -> int: ... - def setObjectType(self, atype: int) -> None: ... - def clearForeground(self) -> None: ... - def foreground(self) -> QBrush: ... - def setForeground(self, brush: typing.Union[QBrush, QColor, QtCore.Qt.GlobalColor, QGradient]) -> None: ... - def clearBackground(self) -> None: ... - def background(self) -> QBrush: ... - def setBackground(self, brush: typing.Union[QBrush, QColor, QtCore.Qt.GlobalColor, QGradient]) -> None: ... - def layoutDirection(self) -> QtCore.Qt.LayoutDirection: ... - def setLayoutDirection(self, direction: QtCore.Qt.LayoutDirection) -> None: ... - def toImageFormat(self) -> 'QTextImageFormat': ... - def toFrameFormat(self) -> 'QTextFrameFormat': ... - def toTableFormat(self) -> 'QTextTableFormat': ... - def toListFormat(self) -> 'QTextListFormat': ... - def toCharFormat(self) -> 'QTextCharFormat': ... - def toBlockFormat(self) -> 'QTextBlockFormat': ... - def isTableFormat(self) -> bool: ... - def isImageFormat(self) -> bool: ... - def isFrameFormat(self) -> bool: ... - def isListFormat(self) -> bool: ... - def isBlockFormat(self) -> bool: ... - def isCharFormat(self) -> bool: ... - def objectType(self) -> int: ... - def properties(self) -> typing.Dict[int, typing.Any]: ... - def lengthVectorProperty(self, propertyId: int) -> typing.Any: ... - def lengthProperty(self, propertyId: int) -> QTextLength: ... - def brushProperty(self, propertyId: int) -> QBrush: ... - def penProperty(self, propertyId: int) -> QPen: ... - def colorProperty(self, propertyId: int) -> QColor: ... - def stringProperty(self, propertyId: int) -> str: ... - def doubleProperty(self, propertyId: int) -> float: ... - def intProperty(self, propertyId: int) -> int: ... - def boolProperty(self, propertyId: int) -> bool: ... - def hasProperty(self, propertyId: int) -> bool: ... - def clearProperty(self, propertyId: int) -> None: ... - @typing.overload - def setProperty(self, propertyId: int, value: typing.Any) -> None: ... - @typing.overload - def setProperty(self, propertyId: int, lengths: typing.Iterable[QTextLength]) -> None: ... - def property(self, propertyId: int) -> typing.Any: ... - def setObjectIndex(self, object: int) -> None: ... - def objectIndex(self) -> int: ... - def type(self) -> int: ... - def isValid(self) -> bool: ... - def merge(self, other: 'QTextFormat') -> None: ... - - -class QTextCharFormat(QTextFormat): - - class FontPropertiesInheritanceBehavior(int): ... - FontPropertiesSpecifiedOnly = ... # type: 'QTextCharFormat.FontPropertiesInheritanceBehavior' - FontPropertiesAll = ... # type: 'QTextCharFormat.FontPropertiesInheritanceBehavior' - - class UnderlineStyle(int): ... - NoUnderline = ... # type: 'QTextCharFormat.UnderlineStyle' - SingleUnderline = ... # type: 'QTextCharFormat.UnderlineStyle' - DashUnderline = ... # type: 'QTextCharFormat.UnderlineStyle' - DotLine = ... # type: 'QTextCharFormat.UnderlineStyle' - DashDotLine = ... # type: 'QTextCharFormat.UnderlineStyle' - DashDotDotLine = ... # type: 'QTextCharFormat.UnderlineStyle' - WaveUnderline = ... # type: 'QTextCharFormat.UnderlineStyle' - SpellCheckUnderline = ... # type: 'QTextCharFormat.UnderlineStyle' - - class VerticalAlignment(int): ... - AlignNormal = ... # type: 'QTextCharFormat.VerticalAlignment' - AlignSuperScript = ... # type: 'QTextCharFormat.VerticalAlignment' - AlignSubScript = ... # type: 'QTextCharFormat.VerticalAlignment' - AlignMiddle = ... # type: 'QTextCharFormat.VerticalAlignment' - AlignTop = ... # type: 'QTextCharFormat.VerticalAlignment' - AlignBottom = ... # type: 'QTextCharFormat.VerticalAlignment' - AlignBaseline = ... # type: 'QTextCharFormat.VerticalAlignment' - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QTextCharFormat') -> None: ... - - def fontLetterSpacingType(self) -> QFont.SpacingType: ... - def setFontLetterSpacingType(self, letterSpacingType: QFont.SpacingType) -> None: ... - def setFontStretch(self, factor: int) -> None: ... - def fontStretch(self) -> int: ... - def fontHintingPreference(self) -> QFont.HintingPreference: ... - def setFontHintingPreference(self, hintingPreference: QFont.HintingPreference) -> None: ... - def fontKerning(self) -> bool: ... - def setFontKerning(self, enable: bool) -> None: ... - def fontStyleStrategy(self) -> QFont.StyleStrategy: ... - def fontStyleHint(self) -> QFont.StyleHint: ... - def setFontStyleStrategy(self, strategy: QFont.StyleStrategy) -> None: ... - def setFontStyleHint(self, hint: QFont.StyleHint, strategy: QFont.StyleStrategy = ...) -> None: ... - def fontWordSpacing(self) -> float: ... - def setFontWordSpacing(self, spacing: float) -> None: ... - def fontLetterSpacing(self) -> float: ... - def setFontLetterSpacing(self, spacing: float) -> None: ... - def fontCapitalization(self) -> QFont.Capitalization: ... - def setFontCapitalization(self, capitalization: QFont.Capitalization) -> None: ... - def anchorNames(self) -> typing.List[str]: ... - def setAnchorNames(self, names: typing.Iterable[str]) -> None: ... - def toolTip(self) -> str: ... - def setToolTip(self, tip: str) -> None: ... - def underlineStyle(self) -> 'QTextCharFormat.UnderlineStyle': ... - def setUnderlineStyle(self, style: 'QTextCharFormat.UnderlineStyle') -> None: ... - def textOutline(self) -> QPen: ... - def setTextOutline(self, pen: typing.Union[QPen, QColor, QtCore.Qt.GlobalColor, QGradient]) -> None: ... - def setTableCellColumnSpan(self, atableCellColumnSpan: int) -> None: ... - def setTableCellRowSpan(self, atableCellRowSpan: int) -> None: ... - def tableCellColumnSpan(self) -> int: ... - def tableCellRowSpan(self) -> int: ... - def anchorHref(self) -> str: ... - def setAnchorHref(self, value: str) -> None: ... - def isAnchor(self) -> bool: ... - def setAnchor(self, anchor: bool) -> None: ... - def verticalAlignment(self) -> 'QTextCharFormat.VerticalAlignment': ... - def setVerticalAlignment(self, alignment: 'QTextCharFormat.VerticalAlignment') -> None: ... - def fontFixedPitch(self) -> bool: ... - def setFontFixedPitch(self, fixedPitch: bool) -> None: ... - def underlineColor(self) -> QColor: ... - def setUnderlineColor(self, color: typing.Union[QColor, QtCore.Qt.GlobalColor, QGradient]) -> None: ... - def fontStrikeOut(self) -> bool: ... - def setFontStrikeOut(self, strikeOut: bool) -> None: ... - def fontOverline(self) -> bool: ... - def setFontOverline(self, overline: bool) -> None: ... - def fontUnderline(self) -> bool: ... - def setFontUnderline(self, underline: bool) -> None: ... - def fontItalic(self) -> bool: ... - def setFontItalic(self, italic: bool) -> None: ... - def fontWeight(self) -> int: ... - def setFontWeight(self, weight: int) -> None: ... - def fontPointSize(self) -> float: ... - def setFontPointSize(self, size: float) -> None: ... - def fontFamily(self) -> str: ... - def setFontFamily(self, family: str) -> None: ... - def font(self) -> QFont: ... - @typing.overload - def setFont(self, font: QFont) -> None: ... - @typing.overload - def setFont(self, font: QFont, behavior: 'QTextCharFormat.FontPropertiesInheritanceBehavior') -> None: ... - def isValid(self) -> bool: ... - - -class QTextBlockFormat(QTextFormat): - - class LineHeightTypes(int): ... - SingleHeight = ... # type: 'QTextBlockFormat.LineHeightTypes' - ProportionalHeight = ... # type: 'QTextBlockFormat.LineHeightTypes' - FixedHeight = ... # type: 'QTextBlockFormat.LineHeightTypes' - MinimumHeight = ... # type: 'QTextBlockFormat.LineHeightTypes' - LineDistanceHeight = ... # type: 'QTextBlockFormat.LineHeightTypes' - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QTextBlockFormat') -> None: ... - - def lineHeightType(self) -> int: ... - @typing.overload - def lineHeight(self, scriptLineHeight: float, scaling: float) -> float: ... - @typing.overload - def lineHeight(self) -> float: ... - def setLineHeight(self, height: float, heightType: int) -> None: ... - def tabPositions(self) -> typing.List['QTextOption.Tab']: ... - def setTabPositions(self, tabs: typing.Any) -> None: ... - def pageBreakPolicy(self) -> QTextFormat.PageBreakFlags: ... - def setPageBreakPolicy(self, flags: typing.Union[QTextFormat.PageBreakFlags, QTextFormat.PageBreakFlag]) -> None: ... - def setIndent(self, aindent: int) -> None: ... - def setAlignment(self, aalignment: typing.Union[QtCore.Qt.Alignment, QtCore.Qt.AlignmentFlag]) -> None: ... - def nonBreakableLines(self) -> bool: ... - def setNonBreakableLines(self, b: bool) -> None: ... - def indent(self) -> int: ... - def textIndent(self) -> float: ... - def setTextIndent(self, margin: float) -> None: ... - def rightMargin(self) -> float: ... - def setRightMargin(self, margin: float) -> None: ... - def leftMargin(self) -> float: ... - def setLeftMargin(self, margin: float) -> None: ... - def bottomMargin(self) -> float: ... - def setBottomMargin(self, margin: float) -> None: ... - def topMargin(self) -> float: ... - def setTopMargin(self, margin: float) -> None: ... - def alignment(self) -> QtCore.Qt.Alignment: ... - def isValid(self) -> bool: ... - - -class QTextListFormat(QTextFormat): - - class Style(int): ... - ListDisc = ... # type: 'QTextListFormat.Style' - ListCircle = ... # type: 'QTextListFormat.Style' - ListSquare = ... # type: 'QTextListFormat.Style' - ListDecimal = ... # type: 'QTextListFormat.Style' - ListLowerAlpha = ... # type: 'QTextListFormat.Style' - ListUpperAlpha = ... # type: 'QTextListFormat.Style' - ListLowerRoman = ... # type: 'QTextListFormat.Style' - ListUpperRoman = ... # type: 'QTextListFormat.Style' - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QTextListFormat') -> None: ... - - def setNumberSuffix(self, ns: str) -> None: ... - def setNumberPrefix(self, np: str) -> None: ... - def numberSuffix(self) -> str: ... - def numberPrefix(self) -> str: ... - def setIndent(self, aindent: int) -> None: ... - def setStyle(self, astyle: 'QTextListFormat.Style') -> None: ... - def indent(self) -> int: ... - def style(self) -> 'QTextListFormat.Style': ... - def isValid(self) -> bool: ... - - -class QTextImageFormat(QTextCharFormat): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QTextImageFormat') -> None: ... - - def setHeight(self, aheight: float) -> None: ... - def setWidth(self, awidth: float) -> None: ... - def setName(self, aname: str) -> None: ... - def height(self) -> float: ... - def width(self) -> float: ... - def name(self) -> str: ... - def isValid(self) -> bool: ... - - -class QTextFrameFormat(QTextFormat): - - class BorderStyle(int): ... - BorderStyle_None = ... # type: 'QTextFrameFormat.BorderStyle' - BorderStyle_Dotted = ... # type: 'QTextFrameFormat.BorderStyle' - BorderStyle_Dashed = ... # type: 'QTextFrameFormat.BorderStyle' - BorderStyle_Solid = ... # type: 'QTextFrameFormat.BorderStyle' - BorderStyle_Double = ... # type: 'QTextFrameFormat.BorderStyle' - BorderStyle_DotDash = ... # type: 'QTextFrameFormat.BorderStyle' - BorderStyle_DotDotDash = ... # type: 'QTextFrameFormat.BorderStyle' - BorderStyle_Groove = ... # type: 'QTextFrameFormat.BorderStyle' - BorderStyle_Ridge = ... # type: 'QTextFrameFormat.BorderStyle' - BorderStyle_Inset = ... # type: 'QTextFrameFormat.BorderStyle' - BorderStyle_Outset = ... # type: 'QTextFrameFormat.BorderStyle' - - class Position(int): ... - InFlow = ... # type: 'QTextFrameFormat.Position' - FloatLeft = ... # type: 'QTextFrameFormat.Position' - FloatRight = ... # type: 'QTextFrameFormat.Position' - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QTextFrameFormat') -> None: ... - - def setRightMargin(self, amargin: float) -> None: ... - def setLeftMargin(self, amargin: float) -> None: ... - def setBottomMargin(self, amargin: float) -> None: ... - def setTopMargin(self, amargin: float) -> None: ... - def rightMargin(self) -> float: ... - def leftMargin(self) -> float: ... - def bottomMargin(self) -> float: ... - def topMargin(self) -> float: ... - def borderStyle(self) -> 'QTextFrameFormat.BorderStyle': ... - def setBorderStyle(self, style: 'QTextFrameFormat.BorderStyle') -> None: ... - def borderBrush(self) -> QBrush: ... - def setBorderBrush(self, brush: typing.Union[QBrush, QColor, QtCore.Qt.GlobalColor, QGradient]) -> None: ... - def pageBreakPolicy(self) -> QTextFormat.PageBreakFlags: ... - def setPageBreakPolicy(self, flags: typing.Union[QTextFormat.PageBreakFlags, QTextFormat.PageBreakFlag]) -> None: ... - @typing.overload - def setHeight(self, aheight: float) -> None: ... - @typing.overload - def setHeight(self, aheight: QTextLength) -> None: ... - def setPadding(self, apadding: float) -> None: ... - def setMargin(self, amargin: float) -> None: ... - def setBorder(self, aborder: float) -> None: ... - def height(self) -> QTextLength: ... - def width(self) -> QTextLength: ... - @typing.overload - def setWidth(self, length: QTextLength) -> None: ... - @typing.overload - def setWidth(self, awidth: float) -> None: ... - def padding(self) -> float: ... - def margin(self) -> float: ... - def border(self) -> float: ... - def position(self) -> 'QTextFrameFormat.Position': ... - def setPosition(self, f: 'QTextFrameFormat.Position') -> None: ... - def isValid(self) -> bool: ... - - -class QTextTableFormat(QTextFrameFormat): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QTextTableFormat') -> None: ... - - def headerRowCount(self) -> int: ... - def setHeaderRowCount(self, count: int) -> None: ... - def setAlignment(self, aalignment: typing.Union[QtCore.Qt.Alignment, QtCore.Qt.AlignmentFlag]) -> None: ... - def setCellPadding(self, apadding: float) -> None: ... - def setColumns(self, acolumns: int) -> None: ... - def alignment(self) -> QtCore.Qt.Alignment: ... - def cellPadding(self) -> float: ... - def setCellSpacing(self, spacing: float) -> None: ... - def cellSpacing(self) -> float: ... - def clearColumnWidthConstraints(self) -> None: ... - def columnWidthConstraints(self) -> typing.List[QTextLength]: ... - def setColumnWidthConstraints(self, constraints: typing.Iterable[QTextLength]) -> None: ... - def columns(self) -> int: ... - def isValid(self) -> bool: ... - - -class QTextTableCellFormat(QTextCharFormat): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QTextTableCellFormat') -> None: ... - - def setPadding(self, padding: float) -> None: ... - def rightPadding(self) -> float: ... - def setRightPadding(self, padding: float) -> None: ... - def leftPadding(self) -> float: ... - def setLeftPadding(self, padding: float) -> None: ... - def bottomPadding(self) -> float: ... - def setBottomPadding(self, padding: float) -> None: ... - def topPadding(self) -> float: ... - def setTopPadding(self, padding: float) -> None: ... - def isValid(self) -> bool: ... - - -class QTextInlineObject(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QTextInlineObject') -> None: ... - - def format(self) -> QTextFormat: ... - def formatIndex(self) -> int: ... - def textPosition(self) -> int: ... - def setDescent(self, d: float) -> None: ... - def setAscent(self, a: float) -> None: ... - def setWidth(self, w: float) -> None: ... - def textDirection(self) -> QtCore.Qt.LayoutDirection: ... - def height(self) -> float: ... - def descent(self) -> float: ... - def ascent(self) -> float: ... - def width(self) -> float: ... - def rect(self) -> QtCore.QRectF: ... - def isValid(self) -> bool: ... - - -class QTextLayout(sip.simplewrapper): - - class CursorMode(int): ... - SkipCharacters = ... # type: 'QTextLayout.CursorMode' - SkipWords = ... # type: 'QTextLayout.CursorMode' - - class FormatRange(sip.simplewrapper): - - format = ... # type: QTextCharFormat - length = ... # type: int - start = ... # type: int - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QTextLayout.FormatRange') -> None: ... - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, text: str) -> None: ... - @typing.overload - def __init__(self, text: str, font: QFont, paintDevice: typing.Optional[QPaintDevice] = ...) -> None: ... - @typing.overload - def __init__(self, b: 'QTextBlock') -> None: ... - - def clearFormats(self) -> None: ... - def formats(self) -> typing.List['QTextLayout.FormatRange']: ... - def setFormats(self, overrides: typing.Iterable['QTextLayout.FormatRange']) -> None: ... - def glyphRuns(self, from_: int = ..., length: int = ...) -> typing.Any: ... - def rightCursorPosition(self, oldPos: int) -> int: ... - def leftCursorPosition(self, oldPos: int) -> int: ... - def cursorMoveStyle(self) -> QtCore.Qt.CursorMoveStyle: ... - def setCursorMoveStyle(self, style: QtCore.Qt.CursorMoveStyle) -> None: ... - def clearLayout(self) -> None: ... - def maximumWidth(self) -> float: ... - def minimumWidth(self) -> float: ... - def boundingRect(self) -> QtCore.QRectF: ... - def setPosition(self, p: typing.Union[QtCore.QPointF, QtCore.QPoint]) -> None: ... - def position(self) -> QtCore.QPointF: ... - @typing.overload - def drawCursor(self, p: QPainter, pos: typing.Union[QtCore.QPointF, QtCore.QPoint], cursorPosition: int) -> None: ... - @typing.overload - def drawCursor(self, p: QPainter, pos: typing.Union[QtCore.QPointF, QtCore.QPoint], cursorPosition: int, width: int) -> None: ... - def draw(self, p: QPainter, pos: typing.Union[QtCore.QPointF, QtCore.QPoint], selections: typing.Any = ..., clip: QtCore.QRectF = ...) -> None: ... - def previousCursorPosition(self, oldPos: int, mode: 'QTextLayout.CursorMode' = ...) -> int: ... - def nextCursorPosition(self, oldPos: int, mode: 'QTextLayout.CursorMode' = ...) -> int: ... - def isValidCursorPosition(self, pos: int) -> bool: ... - def lineForTextPosition(self, pos: int) -> 'QTextLine': ... - def lineAt(self, i: int) -> 'QTextLine': ... - def lineCount(self) -> int: ... - def createLine(self) -> 'QTextLine': ... - def endLayout(self) -> None: ... - def beginLayout(self) -> None: ... - def cacheEnabled(self) -> bool: ... - def setCacheEnabled(self, enable: bool) -> None: ... - def clearAdditionalFormats(self) -> None: ... - def additionalFormats(self) -> typing.List['QTextLayout.FormatRange']: ... - def setAdditionalFormats(self, overrides: typing.Any) -> None: ... - def preeditAreaText(self) -> str: ... - def preeditAreaPosition(self) -> int: ... - def setPreeditArea(self, position: int, text: str) -> None: ... - def textOption(self) -> 'QTextOption': ... - def setTextOption(self, option: 'QTextOption') -> None: ... - def text(self) -> str: ... - def setText(self, string: str) -> None: ... - def font(self) -> QFont: ... - def setFont(self, f: QFont) -> None: ... - - -class QTextLine(sip.simplewrapper): - - class CursorPosition(int): ... - CursorBetweenCharacters = ... # type: 'QTextLine.CursorPosition' - CursorOnCharacter = ... # type: 'QTextLine.CursorPosition' - - class Edge(int): ... - Leading = ... # type: 'QTextLine.Edge' - Trailing = ... # type: 'QTextLine.Edge' - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QTextLine') -> None: ... - - def glyphRuns(self, from_: int = ..., length: int = ...) -> typing.List[QGlyphRun]: ... - def horizontalAdvance(self) -> float: ... - def leadingIncluded(self) -> bool: ... - def setLeadingIncluded(self, included: bool) -> None: ... - def leading(self) -> float: ... - def position(self) -> QtCore.QPointF: ... - def draw(self, painter: QPainter, position: typing.Union[QtCore.QPointF, QtCore.QPoint], selection: typing.Optional[QTextLayout.FormatRange] = ...) -> None: ... - def lineNumber(self) -> int: ... - def textLength(self) -> int: ... - def textStart(self) -> int: ... - def setPosition(self, pos: typing.Union[QtCore.QPointF, QtCore.QPoint]) -> None: ... - @typing.overload - def setNumColumns(self, columns: int) -> None: ... - @typing.overload - def setNumColumns(self, columns: int, alignmentWidth: float) -> None: ... - def setLineWidth(self, width: float) -> None: ... - def xToCursor(self, x: float, edge: 'QTextLine.CursorPosition' = ...) -> int: ... - def cursorToX(self, cursorPos: int, edge: 'QTextLine.Edge' = ...) -> typing.Tuple[float, int]: ... - def naturalTextRect(self) -> QtCore.QRectF: ... - def naturalTextWidth(self) -> float: ... - def height(self) -> float: ... - def descent(self) -> float: ... - def ascent(self) -> float: ... - def width(self) -> float: ... - def y(self) -> float: ... - def x(self) -> float: ... - def rect(self) -> QtCore.QRectF: ... - def isValid(self) -> bool: ... - - -class QTextObject(QtCore.QObject): - - def __init__(self, doc: QTextDocument) -> None: ... - - def objectIndex(self) -> int: ... - def document(self) -> QTextDocument: ... - def formatIndex(self) -> int: ... - def format(self) -> QTextFormat: ... - def setFormat(self, format: QTextFormat) -> None: ... - - -class QTextBlockGroup(QTextObject): - - def __init__(self, doc: QTextDocument) -> None: ... - - def blockList(self) -> typing.Any: ... - def blockFormatChanged(self, block: 'QTextBlock') -> None: ... - def blockRemoved(self, block: 'QTextBlock') -> None: ... - def blockInserted(self, block: 'QTextBlock') -> None: ... - - -class QTextList(QTextBlockGroup): - - def __init__(self, doc: QTextDocument) -> None: ... - - # def setFormat(self, aformat: QTextListFormat) -> None: ... - def format(self) -> QTextListFormat: ... - def add(self, block: 'QTextBlock') -> None: ... - def remove(self, a0: 'QTextBlock') -> None: ... - def removeItem(self, i: int) -> None: ... - def itemText(self, a0: 'QTextBlock') -> str: ... - def itemNumber(self, a0: 'QTextBlock') -> int: ... - def item(self, i: int) -> 'QTextBlock': ... - def __len__(self) -> int: ... - def count(self) -> int: ... - - -class QTextFrame(QTextObject): - - class iterator(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, o: 'QTextFrame.iterator') -> None: ... - - def atEnd(self) -> bool: ... - def currentBlock(self) -> 'QTextBlock': ... - def currentFrame(self) -> 'QTextFrame': ... - def parentFrame(self) -> 'QTextFrame': ... - - def __init__(self, doc: QTextDocument) -> None: ... - - def setFrameFormat(self, aformat: QTextFrameFormat) -> None: ... - def end(self) -> 'QTextFrame.iterator': ... - def begin(self) -> 'QTextFrame.iterator': ... - def parentFrame(self) -> 'QTextFrame': ... - def childFrames(self) -> typing.Any: ... - def lastPosition(self) -> int: ... - def firstPosition(self) -> int: ... - def lastCursorPosition(self) -> QTextCursor: ... - def firstCursorPosition(self) -> QTextCursor: ... - def frameFormat(self) -> QTextFrameFormat: ... - - -class QTextBlock(sip.wrapper): - - class iterator(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, o: 'QTextBlock.iterator') -> None: ... - - def atEnd(self) -> bool: ... - def fragment(self) -> 'QTextFragment': ... - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, o: 'QTextBlock') -> None: ... - - def textFormats(self) -> typing.List[QTextLayout.FormatRange]: ... - def textDirection(self) -> QtCore.Qt.LayoutDirection: ... - def lineCount(self) -> int: ... - def setLineCount(self, count: int) -> None: ... - def firstLineNumber(self) -> int: ... - def blockNumber(self) -> int: ... - def setVisible(self, visible: bool) -> None: ... - def isVisible(self) -> bool: ... - def setRevision(self, rev: int) -> None: ... - def revision(self) -> int: ... - def clearLayout(self) -> None: ... - def setUserState(self, state: int) -> None: ... - def userState(self) -> int: ... - def setUserData(self, data: 'QTextBlockUserData') -> None: ... - def userData(self) -> 'QTextBlockUserData': ... - def previous(self) -> 'QTextBlock': ... - def next(self) -> 'QTextBlock': ... - def end(self) -> 'QTextBlock.iterator': ... - def begin(self) -> 'QTextBlock.iterator': ... - def textList(self) -> QTextList: ... - def document(self) -> QTextDocument: ... - def text(self) -> str: ... - def charFormatIndex(self) -> int: ... - def charFormat(self) -> QTextCharFormat: ... - def blockFormatIndex(self) -> int: ... - def blockFormat(self) -> QTextBlockFormat: ... - def layout(self) -> QTextLayout: ... - def contains(self, position: int) -> bool: ... - def length(self) -> int: ... - def position(self) -> int: ... - def isValid(self) -> bool: ... - - -class QTextFragment(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, o: 'QTextFragment') -> None: ... - - def glyphRuns(self, from_: int = ..., length: int = ...) -> typing.List[QGlyphRun]: ... - def text(self) -> str: ... - def charFormatIndex(self) -> int: ... - def charFormat(self) -> QTextCharFormat: ... - def contains(self, position: int) -> bool: ... - def length(self) -> int: ... - def position(self) -> int: ... - def isValid(self) -> bool: ... - - -class QTextBlockUserData(sip.wrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QTextBlockUserData') -> None: ... - - -class QTextOption(sip.simplewrapper): - - class TabType(int): ... - LeftTab = ... # type: 'QTextOption.TabType' - RightTab = ... # type: 'QTextOption.TabType' - CenterTab = ... # type: 'QTextOption.TabType' - DelimiterTab = ... # type: 'QTextOption.TabType' - - class Flag(int): ... - IncludeTrailingSpaces = ... # type: 'QTextOption.Flag' - ShowTabsAndSpaces = ... # type: 'QTextOption.Flag' - ShowLineAndParagraphSeparators = ... # type: 'QTextOption.Flag' - AddSpaceForLineAndParagraphSeparators = ... # type: 'QTextOption.Flag' - SuppressColors = ... # type: 'QTextOption.Flag' - ShowDocumentTerminator = ... # type: 'QTextOption.Flag' - - class WrapMode(int): ... - NoWrap = ... # type: 'QTextOption.WrapMode' - WordWrap = ... # type: 'QTextOption.WrapMode' - ManualWrap = ... # type: 'QTextOption.WrapMode' - WrapAnywhere = ... # type: 'QTextOption.WrapMode' - WrapAtWordBoundaryOrAnywhere = ... # type: 'QTextOption.WrapMode' - - class Flags(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QTextOption.Flags', 'QTextOption.Flag']) -> None: ... - @typing.overload - def __init__(self, a0: 'QTextOption.Flags') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QTextOption.Flags': ... - def __int__(self) -> int: ... - - class Tab(sip.simplewrapper): - - delimiter = ... # type: str - position = ... # type: float - type = ... # type: 'QTextOption.TabType' - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, pos: float, tabType: 'QTextOption.TabType', delim: str = ...) -> None: ... - @typing.overload - def __init__(self, a0: 'QTextOption.Tab') -> None: ... - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, alignment: typing.Union[QtCore.Qt.Alignment, QtCore.Qt.AlignmentFlag]) -> None: ... - @typing.overload - def __init__(self, o: 'QTextOption') -> None: ... - - def tabs(self) -> typing.List['QTextOption.Tab']: ... - def setTabs(self, tabStops: typing.Iterable['QTextOption.Tab']) -> None: ... - def setTabStop(self, atabStop: float) -> None: ... - def setFlags(self, flags: typing.Union['QTextOption.Flags', 'QTextOption.Flag']) -> None: ... - def setAlignment(self, aalignment: typing.Union[QtCore.Qt.Alignment, QtCore.Qt.AlignmentFlag]) -> None: ... - def useDesignMetrics(self) -> bool: ... - def setUseDesignMetrics(self, b: bool) -> None: ... - def tabArray(self) -> typing.List[float]: ... - def setTabArray(self, tabStops: typing.Iterable[float]) -> None: ... - def tabStop(self) -> float: ... - def flags(self) -> 'QTextOption.Flags': ... - def wrapMode(self) -> 'QTextOption.WrapMode': ... - def setWrapMode(self, wrap: 'QTextOption.WrapMode') -> None: ... - def textDirection(self) -> QtCore.Qt.LayoutDirection: ... - def setTextDirection(self, aDirection: QtCore.Qt.LayoutDirection) -> None: ... - def alignment(self) -> QtCore.Qt.Alignment: ... - - -class QTextTableCell(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, o: 'QTextTableCell') -> None: ... - - def tableCellFormatIndex(self) -> int: ... - def lastCursorPosition(self) -> QTextCursor: ... - def firstCursorPosition(self) -> QTextCursor: ... - def isValid(self) -> bool: ... - def columnSpan(self) -> int: ... - def rowSpan(self) -> int: ... - def column(self) -> int: ... - def row(self) -> int: ... - def setFormat(self, format: QTextCharFormat) -> None: ... - def format(self) -> QTextCharFormat: ... - - -class QTextTable(QTextFrame): - - def __init__(self, doc: QTextDocument) -> None: ... - - def appendColumns(self, count: int) -> None: ... - def appendRows(self, count: int) -> None: ... - # def setFormat(self, aformat: QTextTableFormat) -> None: ... - # def format(self) -> QTextTableFormat: ... - def rowEnd(self, c: QTextCursor) -> QTextCursor: ... - def rowStart(self, c: QTextCursor) -> QTextCursor: ... - @typing.overload - def cellAt(self, row: int, col: int) -> QTextTableCell: ... - @typing.overload - def cellAt(self, position: int) -> QTextTableCell: ... - @typing.overload - def cellAt(self, c: QTextCursor) -> QTextTableCell: ... - def columns(self) -> int: ... - def rows(self) -> int: ... - def splitCell(self, row: int, col: int, numRows: int, numCols: int) -> None: ... - @typing.overload - def mergeCells(self, row: int, col: int, numRows: int, numCols: int) -> None: ... - @typing.overload - def mergeCells(self, cursor: QTextCursor) -> None: ... - def removeColumns(self, pos: int, num: int) -> None: ... - def removeRows(self, pos: int, num: int) -> None: ... - def insertColumns(self, pos: int, num: int) -> None: ... - def insertRows(self, pos: int, num: int) -> None: ... - def resize(self, rows: int, cols: int) -> None: ... - - -class QTouchDevice(sip.simplewrapper): - - class CapabilityFlag(int): ... - Position = ... # type: 'QTouchDevice.CapabilityFlag' - Area = ... # type: 'QTouchDevice.CapabilityFlag' - Pressure = ... # type: 'QTouchDevice.CapabilityFlag' - Velocity = ... # type: 'QTouchDevice.CapabilityFlag' - RawPositions = ... # type: 'QTouchDevice.CapabilityFlag' - NormalizedPosition = ... # type: 'QTouchDevice.CapabilityFlag' - MouseEmulation = ... # type: 'QTouchDevice.CapabilityFlag' - - class DeviceType(int): ... - TouchScreen = ... # type: 'QTouchDevice.DeviceType' - TouchPad = ... # type: 'QTouchDevice.DeviceType' - - class Capabilities(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QTouchDevice.Capabilities', 'QTouchDevice.CapabilityFlag']) -> None: ... - @typing.overload - def __init__(self, a0: 'QTouchDevice.Capabilities') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QTouchDevice.Capabilities': ... - def __int__(self) -> int: ... - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QTouchDevice') -> None: ... - - def setMaximumTouchPoints(self, max: int) -> None: ... - def maximumTouchPoints(self) -> int: ... - def setCapabilities(self, caps: 'QTouchDevice.Capabilities') -> None: ... - def setType(self, devType: 'QTouchDevice.DeviceType') -> None: ... - def setName(self, name: str) -> None: ... - def capabilities(self) -> 'QTouchDevice.Capabilities': ... - def type(self) -> 'QTouchDevice.DeviceType': ... - def name(self) -> str: ... - @staticmethod - def devices() -> typing.Any: ... - - -class QTransform(sip.simplewrapper): - - class TransformationType(int): ... - TxNone = ... # type: 'QTransform.TransformationType' - TxTranslate = ... # type: 'QTransform.TransformationType' - TxScale = ... # type: 'QTransform.TransformationType' - TxRotate = ... # type: 'QTransform.TransformationType' - TxShear = ... # type: 'QTransform.TransformationType' - TxProject = ... # type: 'QTransform.TransformationType' - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, m11: float, m12: float, m13: float, m21: float, m22: float, m23: float, m31: float, m32: float, m33: float = ...) -> None: ... - @typing.overload - def __init__(self, h11: float, h12: float, h13: float, h21: float, h22: float, h23: float) -> None: ... - @typing.overload - def __init__(self, other: 'QTransform') -> None: ... - - def __hash__(self) -> int: ... - @staticmethod - def fromScale(dx: float, dy: float) -> 'QTransform': ... - @staticmethod - def fromTranslate(dx: float, dy: float) -> 'QTransform': ... - def dy(self) -> float: ... - def dx(self) -> float: ... - def m33(self) -> float: ... - def m32(self) -> float: ... - def m31(self) -> float: ... - def m23(self) -> float: ... - def m22(self) -> float: ... - def m21(self) -> float: ... - def m13(self) -> float: ... - def m12(self) -> float: ... - def m11(self) -> float: ... - def determinant(self) -> float: ... - def isTranslating(self) -> bool: ... - def isRotating(self) -> bool: ... - def isScaling(self) -> bool: ... - def isInvertible(self) -> bool: ... - def isIdentity(self) -> bool: ... - def isAffine(self) -> bool: ... - @typing.overload - def mapRect(self, a0: QtCore.QRect) -> QtCore.QRect: ... - @typing.overload - def mapRect(self, a0: QtCore.QRectF) -> QtCore.QRectF: ... - def mapToPolygon(self, r: QtCore.QRect) -> QPolygon: ... - @typing.overload - def map(self, x: int, y: int) -> typing.Tuple[int, int]: ... - @typing.overload - def map(self, x: float, y: float) -> typing.Tuple[float, float]: ... - # @typing.overload - # def map(self, p: QtCore.QPoint) -> QtCore.QPoint: ... - @typing.overload - def map(self, p: typing.Union[QtCore.QPointF, QtCore.QPoint]) -> QtCore.QPointF: ... - @typing.overload - def map(self, l: QtCore.QLine) -> QtCore.QLine: ... - @typing.overload - def map(self, l: QtCore.QLineF) -> QtCore.QLineF: ... - @typing.overload - def map(self, a: QPolygonF) -> QPolygonF: ... - @typing.overload - def map(self, a: QPolygon) -> QPolygon: ... - @typing.overload - def map(self, r: QRegion) -> QRegion: ... - @typing.overload - def map(self, p: QPainterPath) -> QPainterPath: ... - def reset(self) -> None: ... - @staticmethod - def quadToQuad(one: QPolygonF, two: QPolygonF, result: 'QTransform') -> bool: ... - @staticmethod - def quadToSquare(quad: QPolygonF, result: 'QTransform') -> bool: ... - @staticmethod - def squareToQuad(square: QPolygonF, result: 'QTransform') -> bool: ... - def rotateRadians(self, angle: float, axis: QtCore.Qt.Axis = ...) -> 'QTransform': ... - def rotate(self, angle: float, axis: QtCore.Qt.Axis = ...) -> 'QTransform': ... - def shear(self, sh: float, sv: float) -> 'QTransform': ... - def scale(self, sx: float, sy: float) -> 'QTransform': ... - def translate(self, dx: float, dy: float) -> 'QTransform': ... - def transposed(self) -> 'QTransform': ... - def adjoint(self) -> 'QTransform': ... - def inverted(self) -> typing.Tuple['QTransform', bool]: ... - def setMatrix(self, m11: float, m12: float, m13: float, m21: float, m22: float, m23: float, m31: float, m32: float, m33: float) -> None: ... - def type(self) -> 'QTransform.TransformationType': ... - - -class QValidator(QtCore.QObject): - - class State(int): ... - Invalid = ... # type: 'QValidator.State' - Intermediate = ... # type: 'QValidator.State' - Acceptable = ... # type: 'QValidator.State' - - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def changed(self) -> None: ... - def locale(self) -> QtCore.QLocale: ... - def setLocale(self, locale: QtCore.QLocale) -> None: ... - def fixup(self, a0: str) -> str: ... - def validate(self, a0: str, a1: int) -> typing.Tuple['QValidator.State', str, int]: ... - - -class QIntValidator(QValidator): - - @typing.overload - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - @typing.overload - def __init__(self, bottom: int, top: int, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def top(self) -> int: ... - def bottom(self) -> int: ... - def setRange(self, bottom: int, top: int) -> None: ... - def setTop(self, a0: int) -> None: ... - def setBottom(self, a0: int) -> None: ... - def fixup(self, input: str) -> str: ... - def validate(self, a0: str, a1: int) -> typing.Tuple[QValidator.State, str, int]: ... - - -class QDoubleValidator(QValidator): - - class Notation(int): ... - StandardNotation = ... # type: 'QDoubleValidator.Notation' - ScientificNotation = ... # type: 'QDoubleValidator.Notation' - - @typing.overload - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - @typing.overload - def __init__(self, bottom: float, top: float, decimals: int, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def notation(self) -> 'QDoubleValidator.Notation': ... - def setNotation(self, a0: 'QDoubleValidator.Notation') -> None: ... - def decimals(self) -> int: ... - def top(self) -> float: ... - def bottom(self) -> float: ... - def setDecimals(self, a0: int) -> None: ... - def setTop(self, a0: float) -> None: ... - def setBottom(self, a0: float) -> None: ... - def setRange(self, minimum: float, maximum: float, decimals: int = ...) -> None: ... - def validate(self, a0: str, a1: int) -> typing.Tuple[QValidator.State, str, int]: ... - - -class QRegExpValidator(QValidator): - - @typing.overload - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - @typing.overload - def __init__(self, rx: QtCore.QRegExp, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def regExp(self) -> QtCore.QRegExp: ... - def setRegExp(self, rx: QtCore.QRegExp) -> None: ... - def validate(self, input: str, pos: int) -> typing.Tuple[QValidator.State, str, int]: ... - - -class QRegularExpressionValidator(QValidator): - - @typing.overload - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - @typing.overload - def __init__(self, re: QtCore.QRegularExpression, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def setRegularExpression(self, re: QtCore.QRegularExpression) -> None: ... - def regularExpression(self) -> QtCore.QRegularExpression: ... - def validate(self, input: str, pos: int) -> typing.Tuple[QValidator.State, str, int]: ... - - -class QVector2D(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, xpos: float, ypos: float) -> None: ... - @typing.overload - def __init__(self, point: QtCore.QPoint) -> None: ... - @typing.overload - def __init__(self, point: typing.Union[QtCore.QPointF, QtCore.QPoint]) -> None: ... - @typing.overload - def __init__(self, vector: 'QVector3D') -> None: ... - @typing.overload - def __init__(self, vector: 'QVector4D') -> None: ... - @typing.overload - def __init__(self, a0: 'QVector2D') -> None: ... - - def __neg__(self) -> 'QVector2D': ... - def __getitem__(self, i: int) -> float: ... - def distanceToLine(self, point: 'QVector2D', direction: 'QVector2D') -> float: ... - def distanceToPoint(self, point: 'QVector2D') -> float: ... - def toPointF(self) -> QtCore.QPointF: ... - def toPoint(self) -> QtCore.QPoint: ... - def setY(self, aY: float) -> None: ... - def setX(self, aX: float) -> None: ... - def y(self) -> float: ... - def x(self) -> float: ... - def isNull(self) -> bool: ... - def toVector4D(self) -> 'QVector4D': ... - def toVector3D(self) -> 'QVector3D': ... - @staticmethod - def dotProduct(v1: 'QVector2D', v2: 'QVector2D') -> float: ... - def normalize(self) -> None: ... - def normalized(self) -> 'QVector2D': ... - def lengthSquared(self) -> float: ... - def length(self) -> float: ... - def __repr__(self) -> str: ... - - -class QVector3D(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, xpos: float, ypos: float, zpos: float) -> None: ... - @typing.overload - def __init__(self, point: QtCore.QPoint) -> None: ... - @typing.overload - def __init__(self, point: typing.Union[QtCore.QPointF, QtCore.QPoint]) -> None: ... - @typing.overload - def __init__(self, vector: QVector2D) -> None: ... - @typing.overload - def __init__(self, vector: QVector2D, zpos: float) -> None: ... - @typing.overload - def __init__(self, vector: 'QVector4D') -> None: ... - @typing.overload - def __init__(self, a0: 'QVector3D') -> None: ... - - def __neg__(self) -> 'QVector3D': ... - def unproject(self, modelView: QMatrix4x4, projection: QMatrix4x4, viewport: QtCore.QRect) -> 'QVector3D': ... - def project(self, modelView: QMatrix4x4, projection: QMatrix4x4, viewport: QtCore.QRect) -> 'QVector3D': ... - def __getitem__(self, i: int) -> float: ... - def distanceToPoint(self, point: 'QVector3D') -> float: ... - def toPointF(self) -> QtCore.QPointF: ... - def toPoint(self) -> QtCore.QPoint: ... - def setZ(self, aZ: float) -> None: ... - def setY(self, aY: float) -> None: ... - def setX(self, aX: float) -> None: ... - def z(self) -> float: ... - def y(self) -> float: ... - def x(self) -> float: ... - def isNull(self) -> bool: ... - def toVector4D(self) -> 'QVector4D': ... - def toVector2D(self) -> QVector2D: ... - def distanceToLine(self, point: 'QVector3D', direction: 'QVector3D') -> float: ... - @typing.overload - def distanceToPlane(self, plane: 'QVector3D', normal: 'QVector3D') -> float: ... - @typing.overload - def distanceToPlane(self, plane1: 'QVector3D', plane2: 'QVector3D', plane3: 'QVector3D') -> float: ... - @typing.overload - @staticmethod - def normal(v1: 'QVector3D', v2: 'QVector3D') -> 'QVector3D': ... - @typing.overload - @staticmethod - def normal(v1: 'QVector3D', v2: 'QVector3D', v3: 'QVector3D') -> 'QVector3D': ... - @staticmethod - def crossProduct(v1: 'QVector3D', v2: 'QVector3D') -> 'QVector3D': ... - @staticmethod - def dotProduct(v1: 'QVector3D', v2: 'QVector3D') -> float: ... - def normalize(self) -> None: ... - def normalized(self) -> 'QVector3D': ... - def lengthSquared(self) -> float: ... - def length(self) -> float: ... - def __repr__(self) -> str: ... - - -class QVector4D(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, xpos: float, ypos: float, zpos: float, wpos: float) -> None: ... - @typing.overload - def __init__(self, point: QtCore.QPoint) -> None: ... - @typing.overload - def __init__(self, point: typing.Union[QtCore.QPointF, QtCore.QPoint]) -> None: ... - @typing.overload - def __init__(self, vector: QVector2D) -> None: ... - @typing.overload - def __init__(self, vector: QVector2D, zpos: float, wpos: float) -> None: ... - @typing.overload - def __init__(self, vector: QVector3D) -> None: ... - @typing.overload - def __init__(self, vector: QVector3D, wpos: float) -> None: ... - @typing.overload - def __init__(self, a0: 'QVector4D') -> None: ... - - def __neg__(self) -> 'QVector4D': ... - def __getitem__(self, i: int) -> float: ... - def toPointF(self) -> QtCore.QPointF: ... - def toPoint(self) -> QtCore.QPoint: ... - def setW(self, aW: float) -> None: ... - def setZ(self, aZ: float) -> None: ... - def setY(self, aY: float) -> None: ... - def setX(self, aX: float) -> None: ... - def w(self) -> float: ... - def z(self) -> float: ... - def y(self) -> float: ... - def x(self) -> float: ... - def isNull(self) -> bool: ... - def toVector3DAffine(self) -> QVector3D: ... - def toVector3D(self) -> QVector3D: ... - def toVector2DAffine(self) -> QVector2D: ... - def toVector2D(self) -> QVector2D: ... - @staticmethod - def dotProduct(v1: 'QVector4D', v2: 'QVector4D') -> float: ... - def normalize(self) -> None: ... - def normalized(self) -> 'QVector4D': ... - def lengthSquared(self) -> float: ... - def length(self) -> float: ... - def __repr__(self) -> str: ... - - -def qIsGray(rgb: int) -> bool: ... -@typing.overload -def qGray(r: int, g: int, b: int) -> int: ... -@typing.overload -def qGray(rgb: int) -> int: ... -def qRgba(r: int, g: int, b: int, a: int) -> int: ... -def qRgb(r: int, g: int, b: int) -> int: ... -@typing.overload -def qAlpha(rgb: QRgba64) -> int: ... -@typing.overload -def qAlpha(rgb: int) -> int: ... -@typing.overload -def qBlue(rgb: QRgba64) -> int: ... -@typing.overload -def qBlue(rgb: int) -> int: ... -@typing.overload -def qGreen(rgb: QRgba64) -> int: ... -@typing.overload -def qGreen(rgb: int) -> int: ... -@typing.overload -def qRed(rgb: QRgba64) -> int: ... -@typing.overload -def qRed(rgb: int) -> int: ... -@typing.overload -def qUnpremultiply(c: QRgba64) -> QRgba64: ... -@typing.overload -def qUnpremultiply(p: int) -> int: ... -@typing.overload -def qPremultiply(c: QRgba64) -> QRgba64: ... -@typing.overload -def qPremultiply(x: int) -> int: ... -@typing.overload -def qRgba64(r: int, g: int, b: int, a: int) -> QRgba64: ... -@typing.overload -def qRgba64(c: int) -> QRgba64: ... -def qPixelFormatAlpha(channelSize: int, typeInterpretation: QPixelFormat.TypeInterpretation = ...) -> QPixelFormat: ... -def qPixelFormatYuv(layout: QPixelFormat.YUVLayout, alphaSize: int = ..., alphaUsage: QPixelFormat.AlphaUsage = ..., alphaPosition: QPixelFormat.AlphaPosition = ..., premultiplied: QPixelFormat.AlphaPremultiplied = ..., typeInterpretation: QPixelFormat.TypeInterpretation = ..., byteOrder: QPixelFormat.ByteOrder = ...) -> QPixelFormat: ... -def qPixelFormatHsv(channelSize: int, alphaSize: int = ..., alphaUsage: QPixelFormat.AlphaUsage = ..., alphaPosition: QPixelFormat.AlphaPosition = ..., typeInterpretation: QPixelFormat.TypeInterpretation = ...) -> QPixelFormat: ... -def qPixelFormatHsl(channelSize: int, alphaSize: int = ..., alphaUsage: QPixelFormat.AlphaUsage = ..., alphaPosition: QPixelFormat.AlphaPosition = ..., typeInterpretation: QPixelFormat.TypeInterpretation = ...) -> QPixelFormat: ... -def qPixelFormatCmyk(channelSize: int, alphaSize: int = ..., alphaUsage: QPixelFormat.AlphaUsage = ..., alphaPosition: QPixelFormat.AlphaPosition = ..., typeInterpretation: QPixelFormat.TypeInterpretation = ...) -> QPixelFormat: ... -def qPixelFormatGrayscale(channelSize: int, typeInterpretation: QPixelFormat.TypeInterpretation = ...) -> QPixelFormat: ... -def qPixelFormatRgba(red: int, green: int, blue: int, alfa: int, usage: QPixelFormat.AlphaUsage, position: QPixelFormat.AlphaPosition, premultiplied: QPixelFormat.AlphaPremultiplied = ..., typeInterpretation: QPixelFormat.TypeInterpretation = ...) -> QPixelFormat: ... -@typing.overload -def qFuzzyCompare(m1: QMatrix4x4, m2: QMatrix4x4) -> bool: ... -@typing.overload -def qFuzzyCompare(q1: QQuaternion, q2: QQuaternion) -> bool: ... -@typing.overload -def qFuzzyCompare(t1: QTransform, t2: QTransform) -> bool: ... -@typing.overload -def qFuzzyCompare(v1: QVector2D, v2: QVector2D) -> bool: ... -@typing.overload -def qFuzzyCompare(v1: QVector3D, v2: QVector3D) -> bool: ... -@typing.overload -def qFuzzyCompare(v1: QVector4D, v2: QVector4D) -> bool: ... -def qt_set_sequence_auto_mnemonic(b: bool) -> None: ... diff -Nru uranium-3.3.0/stubs/PyQt5/QtHelp.pyi uranium-4.4.1/stubs/PyQt5/QtHelp.pyi --- uranium-3.3.0/stubs/PyQt5/QtHelp.pyi 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/stubs/PyQt5/QtHelp.pyi 1970-01-01 00:00:00.000000000 +0000 @@ -1,200 +0,0 @@ -# The PEP 484 type hints stub file for the QtHelp module. -# -# Generated by SIP 4.18.1 -# -# Copyright (c) 2016 Riverbank Computing Limited -# -# This file is part of PyQt5. -# -# This file may be used under the terms of the GNU General Public License -# version 3.0 as published by the Free Software Foundation and appearing in -# the file LICENSE included in the packaging of this file. Please review the -# following information to ensure the GNU General Public License version 3.0 -# requirements will be met: http://www.gnu.org/copyleft/gpl.html. -# -# If you do not wish to use this file under the terms of the GPL version 3.0 -# then you may purchase a commercial license. For more information contact -# info@riverbankcomputing.com. -# -# This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -# WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - - -import typing -import sip - -from PyQt5 import QtWidgets -from PyQt5 import QtGui -from PyQt5 import QtCore - -# Support for QDate, QDateTime and QTime. -import datetime - -# Convenient type aliases. -PYQT_SIGNAL = typing.Union[QtCore.pyqtSignal, QtCore.pyqtBoundSignal] -PYQT_SLOT = typing.Union[typing.Callable[..., None], QtCore.pyqtBoundSignal] - -# Convenient aliases for complicated OpenGL types. -PYQT_OPENGL_ARRAY = typing.Union[typing.Sequence[int], typing.Sequence[float], - sip.Buffer, None] -PYQT_OPENGL_BOUND_ARRAY = typing.Union[typing.Sequence[int], - typing.Sequence[float], sip.Buffer, int, None] - - -class QHelpContentItem(sip.simplewrapper): - - def childPosition(self, child: 'QHelpContentItem') -> int: ... - def parent(self) -> 'QHelpContentItem': ... - def row(self) -> int: ... - def url(self) -> QtCore.QUrl: ... - def title(self) -> str: ... - def childCount(self) -> int: ... - def child(self, row: int) -> 'QHelpContentItem': ... - - -class QHelpContentModel(QtCore.QAbstractItemModel): - - def contentsCreated(self) -> None: ... - def contentsCreationStarted(self) -> None: ... - def isCreatingContents(self) -> bool: ... - def columnCount(self, parent: QtCore.QModelIndex = ...) -> int: ... - def rowCount(self, parent: QtCore.QModelIndex = ...) -> int: ... - def parent(self, index: QtCore.QModelIndex) -> QtCore.QModelIndex: ... - def index(self, row: int, column: int, parent: QtCore.QModelIndex = ...) -> QtCore.QModelIndex: ... - def data(self, index: QtCore.QModelIndex, role: int) -> typing.Any: ... - def contentItemAt(self, index: QtCore.QModelIndex) -> QHelpContentItem: ... - def createContents(self, customFilterName: str) -> None: ... - - -class QHelpContentWidget(QtWidgets.QTreeView): - - def linkActivated(self, link: QtCore.QUrl) -> None: ... - def indexOf(self, link: QtCore.QUrl) -> QtCore.QModelIndex: ... - - -class QHelpEngineCore(QtCore.QObject): - - def __init__(self, collectionFile: str, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def readersAboutToBeInvalidated(self) -> None: ... - def warning(self, msg: str) -> None: ... - def currentFilterChanged(self, newFilter: str) -> None: ... - def setupFinished(self) -> None: ... - def setupStarted(self) -> None: ... - def setAutoSaveFilter(self, save: bool) -> None: ... - def autoSaveFilter(self) -> bool: ... - def error(self) -> str: ... - @staticmethod - def metaData(documentationFileName: str, name: str) -> typing.Any: ... - def setCustomValue(self, key: str, value: typing.Any) -> bool: ... - def customValue(self, key: str, defaultValue: typing.Any = ...) -> typing.Any: ... - def removeCustomValue(self, key: str) -> bool: ... - def linksForIdentifier(self, id: str) -> typing.Any: ... - def fileData(self, url: QtCore.QUrl) -> QtCore.QByteArray: ... - def findFile(self, url: QtCore.QUrl) -> QtCore.QUrl: ... - def files(self, namespaceName: str, filterAttributes: typing.Iterable[str], extensionFilter: str = ...) -> typing.List[QtCore.QUrl]: ... - def filterAttributeSets(self, namespaceName: str) -> typing.Any: ... - def registeredDocumentations(self) -> typing.List[str]: ... - def setCurrentFilter(self, filterName: str) -> None: ... - def currentFilter(self) -> str: ... - @typing.overload - def filterAttributes(self) -> typing.List[str]: ... - @typing.overload - def filterAttributes(self, filterName: str) -> typing.List[str]: ... - def addCustomFilter(self, filterName: str, attributes: typing.Iterable[str]) -> bool: ... - def removeCustomFilter(self, filterName: str) -> bool: ... - def customFilters(self) -> typing.List[str]: ... - def documentationFileName(self, namespaceName: str) -> str: ... - def unregisterDocumentation(self, namespaceName: str) -> bool: ... - def registerDocumentation(self, documentationFileName: str) -> bool: ... - @staticmethod - def namespaceName(documentationFileName: str) -> str: ... - def copyCollectionFile(self, fileName: str) -> bool: ... - def setCollectionFile(self, fileName: str) -> None: ... - def collectionFile(self) -> str: ... - def setupData(self) -> bool: ... - - -class QHelpEngine(QHelpEngineCore): - - def __init__(self, collectionFile: str, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def searchEngine(self) -> 'QHelpSearchEngine': ... - def indexWidget(self) -> 'QHelpIndexWidget': ... - def contentWidget(self) -> QHelpContentWidget: ... - def indexModel(self) -> 'QHelpIndexModel': ... - def contentModel(self) -> QHelpContentModel: ... - - -class QHelpIndexModel(QtCore.QStringListModel): - - def indexCreated(self) -> None: ... - def indexCreationStarted(self) -> None: ... - def isCreatingIndex(self) -> bool: ... - def linksForKeyword(self, keyword: str) -> typing.Dict[str, QtCore.QUrl]: ... - def filter(self, filter: str, wildcard: str = ...) -> QtCore.QModelIndex: ... - def createIndex(self, customFilterName: str) -> None: ... - - -class QHelpIndexWidget(QtWidgets.QListView): - - def activateCurrentItem(self) -> None: ... - def filterIndices(self, filter: str, wildcard: str = ...) -> None: ... - def linksActivated(self, links: typing.Dict[str, QtCore.QUrl], keyword: str) -> None: ... - def linkActivated(self, link: QtCore.QUrl, keyword: str) -> None: ... - - -class QHelpSearchQuery(sip.simplewrapper): - - class FieldName(int): ... - DEFAULT = ... # type: 'QHelpSearchQuery.FieldName' - FUZZY = ... # type: 'QHelpSearchQuery.FieldName' - WITHOUT = ... # type: 'QHelpSearchQuery.FieldName' - PHRASE = ... # type: 'QHelpSearchQuery.FieldName' - ALL = ... # type: 'QHelpSearchQuery.FieldName' - ATLEAST = ... # type: 'QHelpSearchQuery.FieldName' - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, field: 'QHelpSearchQuery.FieldName', wordList: typing.Iterable[str]) -> None: ... - @typing.overload - def __init__(self, a0: 'QHelpSearchQuery') -> None: ... - - -class QHelpSearchEngine(QtCore.QObject): - - def __init__(self, helpEngine: QHelpEngineCore, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def searchingFinished(self, hits: int) -> None: ... - def searchingStarted(self) -> None: ... - def indexingFinished(self) -> None: ... - def indexingStarted(self) -> None: ... - def cancelSearching(self) -> None: ... - def search(self, queryList: typing.Iterable[QHelpSearchQuery]) -> None: ... - def cancelIndexing(self) -> None: ... - def reindexDocumentation(self) -> None: ... - def hits(self, start: int, end: int) -> typing.List[typing.Tuple[str, str]]: ... - def hitCount(self) -> int: ... - def resultWidget(self) -> 'QHelpSearchResultWidget': ... - def queryWidget(self) -> 'QHelpSearchQueryWidget': ... - def query(self) -> typing.Any: ... - - -class QHelpSearchQueryWidget(QtWidgets.QWidget): - - def __init__(self, parent: typing.Optional[QtWidgets.QWidget] = ...) -> None: ... - - def setCompactMode(self, on: bool) -> None: ... - def isCompactMode(self) -> bool: ... - def search(self) -> None: ... - def collapseExtendedSearch(self) -> None: ... - def expandExtendedSearch(self) -> None: ... - def setQuery(self, queryList: typing.Iterable[QHelpSearchQuery]) -> None: ... - def query(self) -> typing.List[QHelpSearchQuery]: ... - - -class QHelpSearchResultWidget(QtWidgets.QWidget): - - def requestShowLink(self, url: QtCore.QUrl) -> None: ... - def linkAt(self, point: QtCore.QPoint) -> QtCore.QUrl: ... diff -Nru uranium-3.3.0/stubs/PyQt5/QtLocation.pyi uranium-4.4.1/stubs/PyQt5/QtLocation.pyi --- uranium-3.3.0/stubs/PyQt5/QtLocation.pyi 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/stubs/PyQt5/QtLocation.pyi 1970-01-01 00:00:00.000000000 +0000 @@ -1,1096 +0,0 @@ -# The PEP 484 type hints stub file for the QtLocation module. -# -# Generated by SIP 4.18.1 -# -# Copyright (c) 2016 Riverbank Computing Limited -# -# This file is part of PyQt5. -# -# This file may be used under the terms of the GNU General Public License -# version 3.0 as published by the Free Software Foundation and appearing in -# the file LICENSE included in the packaging of this file. Please review the -# following information to ensure the GNU General Public License version 3.0 -# requirements will be met: http://www.gnu.org/copyleft/gpl.html. -# -# If you do not wish to use this file under the terms of the GPL version 3.0 -# then you may purchase a commercial license. For more information contact -# info@riverbankcomputing.com. -# -# This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -# WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - - -import typing -import sip - -from PyQt5 import QtPositioning -from PyQt5 import QtCore - -# Support for QDate, QDateTime and QTime. -import datetime - -# Convenient type aliases. -PYQT_SIGNAL = typing.Union[QtCore.pyqtSignal, QtCore.pyqtBoundSignal] -PYQT_SLOT = typing.Union[typing.Callable[..., None], QtCore.pyqtBoundSignal] - - -class QGeoCodeReply(QtCore.QObject): - - class Error(int): ... - NoError = ... # type: 'QGeoCodeReply.Error' - EngineNotSetError = ... # type: 'QGeoCodeReply.Error' - CommunicationError = ... # type: 'QGeoCodeReply.Error' - ParseError = ... # type: 'QGeoCodeReply.Error' - UnsupportedOptionError = ... # type: 'QGeoCodeReply.Error' - CombinationError = ... # type: 'QGeoCodeReply.Error' - UnknownError = ... # type: 'QGeoCodeReply.Error' - - @typing.overload - def __init__(self, error: 'QGeoCodeReply.Error', errorString: str, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - @typing.overload - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def setOffset(self, offset: int) -> None: ... - def setLimit(self, limit: int) -> None: ... - def setLocations(self, locations: typing.Iterable[QtPositioning.QGeoLocation]) -> None: ... - def addLocation(self, location: QtPositioning.QGeoLocation) -> None: ... - def setViewport(self, viewport: QtPositioning.QGeoShape) -> None: ... - def setFinished(self, finished: bool) -> None: ... - def setError(self, error: 'QGeoCodeReply.Error', errorString: str) -> None: ... - def finished(self) -> None: ... - def abort(self) -> None: ... - def offset(self) -> int: ... - def limit(self) -> int: ... - def locations(self) -> typing.Any: ... - def viewport(self) -> QtPositioning.QGeoShape: ... - def errorString(self) -> str: ... - @typing.overload - def error(self) -> 'QGeoCodeReply.Error': ... - @typing.overload - def error(self, error: 'QGeoCodeReply.Error', errorString: str = ...) -> None: ... - def isFinished(self) -> bool: ... - - -class QGeoCodingManager(QtCore.QObject): - - def error(self, reply: QGeoCodeReply, error: QGeoCodeReply.Error, errorString: str = ...) -> None: ... - def finished(self, reply: QGeoCodeReply) -> None: ... - def locale(self) -> QtCore.QLocale: ... - def setLocale(self, locale: QtCore.QLocale) -> None: ... - def reverseGeocode(self, coordinate: QtPositioning.QGeoCoordinate, bounds: QtPositioning.QGeoShape = ...) -> QGeoCodeReply: ... - @typing.overload - def geocode(self, address: QtPositioning.QGeoAddress, bounds: QtPositioning.QGeoShape = ...) -> QGeoCodeReply: ... - @typing.overload - def geocode(self, searchString: str, limit: int = ..., offset: int = ..., bounds: QtPositioning.QGeoShape = ...) -> QGeoCodeReply: ... - def managerVersion(self) -> int: ... - def managerName(self) -> str: ... - - -class QGeoCodingManagerEngine(QtCore.QObject): - - def __init__(self, parameters: typing.Dict[str, typing.Any], parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def error(self, reply: QGeoCodeReply, error: QGeoCodeReply.Error, errorString: str = ...) -> None: ... - def finished(self, reply: QGeoCodeReply) -> None: ... - def locale(self) -> QtCore.QLocale: ... - def setLocale(self, locale: QtCore.QLocale) -> None: ... - def reverseGeocode(self, coordinate: QtPositioning.QGeoCoordinate, bounds: QtPositioning.QGeoShape) -> QGeoCodeReply: ... - @typing.overload - def geocode(self, address: QtPositioning.QGeoAddress, bounds: QtPositioning.QGeoShape) -> QGeoCodeReply: ... - @typing.overload - def geocode(self, address: str, limit: int, offset: int, bounds: QtPositioning.QGeoShape) -> QGeoCodeReply: ... - def managerVersion(self) -> int: ... - def managerName(self) -> str: ... - - -class QGeoManeuver(sip.simplewrapper): - - class InstructionDirection(int): ... - NoDirection = ... # type: 'QGeoManeuver.InstructionDirection' - DirectionForward = ... # type: 'QGeoManeuver.InstructionDirection' - DirectionBearRight = ... # type: 'QGeoManeuver.InstructionDirection' - DirectionLightRight = ... # type: 'QGeoManeuver.InstructionDirection' - DirectionRight = ... # type: 'QGeoManeuver.InstructionDirection' - DirectionHardRight = ... # type: 'QGeoManeuver.InstructionDirection' - DirectionUTurnRight = ... # type: 'QGeoManeuver.InstructionDirection' - DirectionUTurnLeft = ... # type: 'QGeoManeuver.InstructionDirection' - DirectionHardLeft = ... # type: 'QGeoManeuver.InstructionDirection' - DirectionLeft = ... # type: 'QGeoManeuver.InstructionDirection' - DirectionLightLeft = ... # type: 'QGeoManeuver.InstructionDirection' - DirectionBearLeft = ... # type: 'QGeoManeuver.InstructionDirection' - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, other: 'QGeoManeuver') -> None: ... - - def waypoint(self) -> QtPositioning.QGeoCoordinate: ... - def setWaypoint(self, coordinate: QtPositioning.QGeoCoordinate) -> None: ... - def distanceToNextInstruction(self) -> float: ... - def setDistanceToNextInstruction(self, distance: float) -> None: ... - def timeToNextInstruction(self) -> int: ... - def setTimeToNextInstruction(self, secs: int) -> None: ... - def direction(self) -> 'QGeoManeuver.InstructionDirection': ... - def setDirection(self, direction: 'QGeoManeuver.InstructionDirection') -> None: ... - def instructionText(self) -> str: ... - def setInstructionText(self, instructionText: str) -> None: ... - def position(self) -> QtPositioning.QGeoCoordinate: ... - def setPosition(self, position: QtPositioning.QGeoCoordinate) -> None: ... - def isValid(self) -> bool: ... - - -class QGeoRoute(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, other: 'QGeoRoute') -> None: ... - - def path(self) -> typing.List[QtPositioning.QGeoCoordinate]: ... - def setPath(self, path: typing.Iterable[QtPositioning.QGeoCoordinate]) -> None: ... - def travelMode(self) -> 'QGeoRouteRequest.TravelMode': ... - def setTravelMode(self, mode: 'QGeoRouteRequest.TravelMode') -> None: ... - def distance(self) -> float: ... - def setDistance(self, distance: float) -> None: ... - def travelTime(self) -> int: ... - def setTravelTime(self, secs: int) -> None: ... - def firstRouteSegment(self) -> 'QGeoRouteSegment': ... - def setFirstRouteSegment(self, routeSegment: 'QGeoRouteSegment') -> None: ... - def bounds(self) -> QtPositioning.QGeoRectangle: ... - def setBounds(self, bounds: QtPositioning.QGeoRectangle) -> None: ... - def request(self) -> 'QGeoRouteRequest': ... - def setRequest(self, request: 'QGeoRouteRequest') -> None: ... - def routeId(self) -> str: ... - def setRouteId(self, id: str) -> None: ... - - -class QGeoRouteReply(QtCore.QObject): - - class Error(int): ... - NoError = ... # type: 'QGeoRouteReply.Error' - EngineNotSetError = ... # type: 'QGeoRouteReply.Error' - CommunicationError = ... # type: 'QGeoRouteReply.Error' - ParseError = ... # type: 'QGeoRouteReply.Error' - UnsupportedOptionError = ... # type: 'QGeoRouteReply.Error' - UnknownError = ... # type: 'QGeoRouteReply.Error' - - @typing.overload - def __init__(self, error: 'QGeoRouteReply.Error', errorString: str, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - @typing.overload - def __init__(self, request: 'QGeoRouteRequest', parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def addRoutes(self, routes: typing.Iterable[QGeoRoute]) -> None: ... - def setRoutes(self, routes: typing.Iterable[QGeoRoute]) -> None: ... - def setFinished(self, finished: bool) -> None: ... - def setError(self, error: 'QGeoRouteReply.Error', errorString: str) -> None: ... - def finished(self) -> None: ... - def abort(self) -> None: ... - def routes(self) -> typing.Any: ... - def request(self) -> 'QGeoRouteRequest': ... - def errorString(self) -> str: ... - @typing.overload - def error(self) -> 'QGeoRouteReply.Error': ... - @typing.overload - def error(self, error: 'QGeoRouteReply.Error', errorString: str = ...) -> None: ... - def isFinished(self) -> bool: ... - - -class QGeoRouteRequest(sip.simplewrapper): - - class ManeuverDetail(int): ... - NoManeuvers = ... # type: 'QGeoRouteRequest.ManeuverDetail' - BasicManeuvers = ... # type: 'QGeoRouteRequest.ManeuverDetail' - - class SegmentDetail(int): ... - NoSegmentData = ... # type: 'QGeoRouteRequest.SegmentDetail' - BasicSegmentData = ... # type: 'QGeoRouteRequest.SegmentDetail' - - class RouteOptimization(int): ... - ShortestRoute = ... # type: 'QGeoRouteRequest.RouteOptimization' - FastestRoute = ... # type: 'QGeoRouteRequest.RouteOptimization' - MostEconomicRoute = ... # type: 'QGeoRouteRequest.RouteOptimization' - MostScenicRoute = ... # type: 'QGeoRouteRequest.RouteOptimization' - - class FeatureWeight(int): ... - NeutralFeatureWeight = ... # type: 'QGeoRouteRequest.FeatureWeight' - PreferFeatureWeight = ... # type: 'QGeoRouteRequest.FeatureWeight' - RequireFeatureWeight = ... # type: 'QGeoRouteRequest.FeatureWeight' - AvoidFeatureWeight = ... # type: 'QGeoRouteRequest.FeatureWeight' - DisallowFeatureWeight = ... # type: 'QGeoRouteRequest.FeatureWeight' - - class FeatureType(int): ... - NoFeature = ... # type: 'QGeoRouteRequest.FeatureType' - TollFeature = ... # type: 'QGeoRouteRequest.FeatureType' - HighwayFeature = ... # type: 'QGeoRouteRequest.FeatureType' - PublicTransitFeature = ... # type: 'QGeoRouteRequest.FeatureType' - FerryFeature = ... # type: 'QGeoRouteRequest.FeatureType' - TunnelFeature = ... # type: 'QGeoRouteRequest.FeatureType' - DirtRoadFeature = ... # type: 'QGeoRouteRequest.FeatureType' - ParksFeature = ... # type: 'QGeoRouteRequest.FeatureType' - MotorPoolLaneFeature = ... # type: 'QGeoRouteRequest.FeatureType' - - class TravelMode(int): ... - CarTravel = ... # type: 'QGeoRouteRequest.TravelMode' - PedestrianTravel = ... # type: 'QGeoRouteRequest.TravelMode' - BicycleTravel = ... # type: 'QGeoRouteRequest.TravelMode' - PublicTransitTravel = ... # type: 'QGeoRouteRequest.TravelMode' - TruckTravel = ... # type: 'QGeoRouteRequest.TravelMode' - - class TravelModes(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QGeoRouteRequest.TravelModes', 'QGeoRouteRequest.TravelMode']) -> None: ... - @typing.overload - def __init__(self, a0: 'QGeoRouteRequest.TravelModes') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QGeoRouteRequest.TravelModes': ... - def __int__(self) -> int: ... - - class FeatureTypes(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QGeoRouteRequest.FeatureTypes', 'QGeoRouteRequest.FeatureType']) -> None: ... - @typing.overload - def __init__(self, a0: 'QGeoRouteRequest.FeatureTypes') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QGeoRouteRequest.FeatureTypes': ... - def __int__(self) -> int: ... - - class FeatureWeights(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QGeoRouteRequest.FeatureWeights', 'QGeoRouteRequest.FeatureWeight']) -> None: ... - @typing.overload - def __init__(self, a0: 'QGeoRouteRequest.FeatureWeights') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QGeoRouteRequest.FeatureWeights': ... - def __int__(self) -> int: ... - - class RouteOptimizations(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QGeoRouteRequest.RouteOptimizations', 'QGeoRouteRequest.RouteOptimization']) -> None: ... - @typing.overload - def __init__(self, a0: 'QGeoRouteRequest.RouteOptimizations') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QGeoRouteRequest.RouteOptimizations': ... - def __int__(self) -> int: ... - - class SegmentDetails(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QGeoRouteRequest.SegmentDetails', 'QGeoRouteRequest.SegmentDetail']) -> None: ... - @typing.overload - def __init__(self, a0: 'QGeoRouteRequest.SegmentDetails') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QGeoRouteRequest.SegmentDetails': ... - def __int__(self) -> int: ... - - class ManeuverDetails(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QGeoRouteRequest.ManeuverDetails', 'QGeoRouteRequest.ManeuverDetail']) -> None: ... - @typing.overload - def __init__(self, a0: 'QGeoRouteRequest.ManeuverDetails') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QGeoRouteRequest.ManeuverDetails': ... - def __int__(self) -> int: ... - - @typing.overload - def __init__(self, waypoints: typing.Iterable[QtPositioning.QGeoCoordinate] = ...) -> None: ... - @typing.overload - def __init__(self, origin: QtPositioning.QGeoCoordinate, destination: QtPositioning.QGeoCoordinate) -> None: ... - @typing.overload - def __init__(self, other: 'QGeoRouteRequest') -> None: ... - - def maneuverDetail(self) -> 'QGeoRouteRequest.ManeuverDetail': ... - def setManeuverDetail(self, maneuverDetail: 'QGeoRouteRequest.ManeuverDetail') -> None: ... - def segmentDetail(self) -> 'QGeoRouteRequest.SegmentDetail': ... - def setSegmentDetail(self, segmentDetail: 'QGeoRouteRequest.SegmentDetail') -> None: ... - def routeOptimization(self) -> 'QGeoRouteRequest.RouteOptimizations': ... - def setRouteOptimization(self, optimization: 'QGeoRouteRequest.RouteOptimizations') -> None: ... - def featureTypes(self) -> typing.Any: ... - def featureWeight(self, featureType: 'QGeoRouteRequest.FeatureType') -> 'QGeoRouteRequest.FeatureWeight': ... - def setFeatureWeight(self, featureType: 'QGeoRouteRequest.FeatureType', featureWeight: 'QGeoRouteRequest.FeatureWeight') -> None: ... - def travelModes(self) -> 'QGeoRouteRequest.TravelModes': ... - def setTravelModes(self, travelModes: 'QGeoRouteRequest.TravelModes') -> None: ... - def numberAlternativeRoutes(self) -> int: ... - def setNumberAlternativeRoutes(self, alternatives: int) -> None: ... - def excludeAreas(self) -> typing.List[QtPositioning.QGeoRectangle]: ... - def setExcludeAreas(self, areas: typing.Any) -> None: ... - def waypoints(self) -> typing.List[QtPositioning.QGeoCoordinate]: ... - def setWaypoints(self, waypoints: typing.Iterable[QtPositioning.QGeoCoordinate]) -> None: ... - - -class QGeoRouteSegment(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, other: 'QGeoRouteSegment') -> None: ... - - def maneuver(self) -> QGeoManeuver: ... - def setManeuver(self, maneuver: QGeoManeuver) -> None: ... - def path(self) -> typing.List[QtPositioning.QGeoCoordinate]: ... - def setPath(self, path: typing.Iterable[QtPositioning.QGeoCoordinate]) -> None: ... - def distance(self) -> float: ... - def setDistance(self, distance: float) -> None: ... - def travelTime(self) -> int: ... - def setTravelTime(self, secs: int) -> None: ... - def nextRouteSegment(self) -> 'QGeoRouteSegment': ... - def setNextRouteSegment(self, routeSegment: 'QGeoRouteSegment') -> None: ... - def isValid(self) -> bool: ... - - -class QGeoRoutingManager(QtCore.QObject): - - def error(self, reply: QGeoRouteReply, error: QGeoRouteReply.Error, errorString: str = ...) -> None: ... - def finished(self, reply: QGeoRouteReply) -> None: ... - def measurementSystem(self) -> QtCore.QLocale.MeasurementSystem: ... - def setMeasurementSystem(self, system: QtCore.QLocale.MeasurementSystem) -> None: ... - def locale(self) -> QtCore.QLocale: ... - def setLocale(self, locale: QtCore.QLocale) -> None: ... - def supportedManeuverDetails(self) -> QGeoRouteRequest.ManeuverDetails: ... - def supportedSegmentDetails(self) -> QGeoRouteRequest.SegmentDetails: ... - def supportedRouteOptimizations(self) -> QGeoRouteRequest.RouteOptimizations: ... - def supportedFeatureWeights(self) -> QGeoRouteRequest.FeatureWeights: ... - def supportedFeatureTypes(self) -> QGeoRouteRequest.FeatureTypes: ... - def supportedTravelModes(self) -> QGeoRouteRequest.TravelModes: ... - def updateRoute(self, route: QGeoRoute, position: QtPositioning.QGeoCoordinate) -> QGeoRouteReply: ... - def calculateRoute(self, request: QGeoRouteRequest) -> QGeoRouteReply: ... - def managerVersion(self) -> int: ... - def managerName(self) -> str: ... - - -class QGeoRoutingManagerEngine(QtCore.QObject): - - def __init__(self, parameters: typing.Dict[str, typing.Any], parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def setSupportedManeuverDetails(self, maneuverDetails: typing.Union[QGeoRouteRequest.ManeuverDetails, QGeoRouteRequest.ManeuverDetail]) -> None: ... - def setSupportedSegmentDetails(self, segmentDetails: typing.Union[QGeoRouteRequest.SegmentDetails, QGeoRouteRequest.SegmentDetail]) -> None: ... - def setSupportedRouteOptimizations(self, optimizations: typing.Union[QGeoRouteRequest.RouteOptimizations, QGeoRouteRequest.RouteOptimization]) -> None: ... - def setSupportedFeatureWeights(self, featureWeights: typing.Union[QGeoRouteRequest.FeatureWeights, QGeoRouteRequest.FeatureWeight]) -> None: ... - def setSupportedFeatureTypes(self, featureTypes: typing.Union[QGeoRouteRequest.FeatureTypes, QGeoRouteRequest.FeatureType]) -> None: ... - def setSupportedTravelModes(self, travelModes: typing.Union[QGeoRouteRequest.TravelModes, QGeoRouteRequest.TravelMode]) -> None: ... - def error(self, reply: QGeoRouteReply, error: QGeoRouteReply.Error, errorString: str = ...) -> None: ... - def finished(self, reply: QGeoRouteReply) -> None: ... - def measurementSystem(self) -> QtCore.QLocale.MeasurementSystem: ... - def setMeasurementSystem(self, system: QtCore.QLocale.MeasurementSystem) -> None: ... - def locale(self) -> QtCore.QLocale: ... - def setLocale(self, locale: QtCore.QLocale) -> None: ... - def supportedManeuverDetails(self) -> QGeoRouteRequest.ManeuverDetails: ... - def supportedSegmentDetails(self) -> QGeoRouteRequest.SegmentDetails: ... - def supportedRouteOptimizations(self) -> QGeoRouteRequest.RouteOptimizations: ... - def supportedFeatureWeights(self) -> QGeoRouteRequest.FeatureWeights: ... - def supportedFeatureTypes(self) -> QGeoRouteRequest.FeatureTypes: ... - def supportedTravelModes(self) -> QGeoRouteRequest.TravelModes: ... - def updateRoute(self, route: QGeoRoute, position: QtPositioning.QGeoCoordinate) -> QGeoRouteReply: ... - def calculateRoute(self, request: QGeoRouteRequest) -> QGeoRouteReply: ... - def managerVersion(self) -> int: ... - def managerName(self) -> str: ... - - -class QGeoServiceProvider(QtCore.QObject): - - class PlacesFeature(int): ... - NoPlacesFeatures = ... # type: 'QGeoServiceProvider.PlacesFeature' - OnlinePlacesFeature = ... # type: 'QGeoServiceProvider.PlacesFeature' - OfflinePlacesFeature = ... # type: 'QGeoServiceProvider.PlacesFeature' - SavePlaceFeature = ... # type: 'QGeoServiceProvider.PlacesFeature' - RemovePlaceFeature = ... # type: 'QGeoServiceProvider.PlacesFeature' - SaveCategoryFeature = ... # type: 'QGeoServiceProvider.PlacesFeature' - RemoveCategoryFeature = ... # type: 'QGeoServiceProvider.PlacesFeature' - PlaceRecommendationsFeature = ... # type: 'QGeoServiceProvider.PlacesFeature' - SearchSuggestionsFeature = ... # type: 'QGeoServiceProvider.PlacesFeature' - LocalizedPlacesFeature = ... # type: 'QGeoServiceProvider.PlacesFeature' - NotificationsFeature = ... # type: 'QGeoServiceProvider.PlacesFeature' - PlaceMatchingFeature = ... # type: 'QGeoServiceProvider.PlacesFeature' - AnyPlacesFeatures = ... # type: 'QGeoServiceProvider.PlacesFeature' - - class MappingFeature(int): ... - NoMappingFeatures = ... # type: 'QGeoServiceProvider.MappingFeature' - OnlineMappingFeature = ... # type: 'QGeoServiceProvider.MappingFeature' - OfflineMappingFeature = ... # type: 'QGeoServiceProvider.MappingFeature' - LocalizedMappingFeature = ... # type: 'QGeoServiceProvider.MappingFeature' - AnyMappingFeatures = ... # type: 'QGeoServiceProvider.MappingFeature' - - class GeocodingFeature(int): ... - NoGeocodingFeatures = ... # type: 'QGeoServiceProvider.GeocodingFeature' - OnlineGeocodingFeature = ... # type: 'QGeoServiceProvider.GeocodingFeature' - OfflineGeocodingFeature = ... # type: 'QGeoServiceProvider.GeocodingFeature' - ReverseGeocodingFeature = ... # type: 'QGeoServiceProvider.GeocodingFeature' - LocalizedGeocodingFeature = ... # type: 'QGeoServiceProvider.GeocodingFeature' - AnyGeocodingFeatures = ... # type: 'QGeoServiceProvider.GeocodingFeature' - - class RoutingFeature(int): ... - NoRoutingFeatures = ... # type: 'QGeoServiceProvider.RoutingFeature' - OnlineRoutingFeature = ... # type: 'QGeoServiceProvider.RoutingFeature' - OfflineRoutingFeature = ... # type: 'QGeoServiceProvider.RoutingFeature' - LocalizedRoutingFeature = ... # type: 'QGeoServiceProvider.RoutingFeature' - RouteUpdatesFeature = ... # type: 'QGeoServiceProvider.RoutingFeature' - AlternativeRoutesFeature = ... # type: 'QGeoServiceProvider.RoutingFeature' - ExcludeAreasRoutingFeature = ... # type: 'QGeoServiceProvider.RoutingFeature' - AnyRoutingFeatures = ... # type: 'QGeoServiceProvider.RoutingFeature' - - class Error(int): ... - NoError = ... # type: 'QGeoServiceProvider.Error' - NotSupportedError = ... # type: 'QGeoServiceProvider.Error' - UnknownParameterError = ... # type: 'QGeoServiceProvider.Error' - MissingRequiredParameterError = ... # type: 'QGeoServiceProvider.Error' - ConnectionError = ... # type: 'QGeoServiceProvider.Error' - - class RoutingFeatures(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QGeoServiceProvider.RoutingFeatures', 'QGeoServiceProvider.RoutingFeature']) -> None: ... - @typing.overload - def __init__(self, a0: 'QGeoServiceProvider.RoutingFeatures') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QGeoServiceProvider.RoutingFeatures': ... - def __int__(self) -> int: ... - - class GeocodingFeatures(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QGeoServiceProvider.GeocodingFeatures', 'QGeoServiceProvider.GeocodingFeature']) -> None: ... - @typing.overload - def __init__(self, a0: 'QGeoServiceProvider.GeocodingFeatures') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QGeoServiceProvider.GeocodingFeatures': ... - def __int__(self) -> int: ... - - class MappingFeatures(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QGeoServiceProvider.MappingFeatures', 'QGeoServiceProvider.MappingFeature']) -> None: ... - @typing.overload - def __init__(self, a0: 'QGeoServiceProvider.MappingFeatures') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QGeoServiceProvider.MappingFeatures': ... - def __int__(self) -> int: ... - - class PlacesFeatures(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QGeoServiceProvider.PlacesFeatures', 'QGeoServiceProvider.PlacesFeature']) -> None: ... - @typing.overload - def __init__(self, a0: 'QGeoServiceProvider.PlacesFeatures') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QGeoServiceProvider.PlacesFeatures': ... - def __int__(self) -> int: ... - - def __init__(self, providerName: str, parameters: typing.Dict[str, typing.Any] = ..., allowExperimental: bool = ...) -> None: ... - - def setAllowExperimental(self, allow: bool) -> None: ... - def setLocale(self, locale: QtCore.QLocale) -> None: ... - def setParameters(self, parameters: typing.Dict[str, typing.Any]) -> None: ... - def errorString(self) -> str: ... - def error(self) -> 'QGeoServiceProvider.Error': ... - def placeManager(self) -> 'QPlaceManager': ... - def routingManager(self) -> QGeoRoutingManager: ... - def geocodingManager(self) -> QGeoCodingManager: ... - def placesFeatures(self) -> 'QGeoServiceProvider.PlacesFeatures': ... - def mappingFeatures(self) -> 'QGeoServiceProvider.MappingFeatures': ... - def geocodingFeatures(self) -> 'QGeoServiceProvider.GeocodingFeatures': ... - def routingFeatures(self) -> 'QGeoServiceProvider.RoutingFeatures': ... - @staticmethod - def availableServiceProviders() -> typing.List[str]: ... - - -class QLocation(sip.simplewrapper): - - class Visibility(int): ... - UnspecifiedVisibility = ... # type: 'QLocation.Visibility' - DeviceVisibility = ... # type: 'QLocation.Visibility' - PrivateVisibility = ... # type: 'QLocation.Visibility' - PublicVisibility = ... # type: 'QLocation.Visibility' - - class VisibilityScope(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QLocation.VisibilityScope', 'QLocation.Visibility']) -> None: ... - @typing.overload - def __init__(self, a0: 'QLocation.VisibilityScope') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QLocation.VisibilityScope': ... - def __int__(self) -> int: ... - - -class QPlace(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, other: 'QPlace') -> None: ... - - def isEmpty(self) -> bool: ... - def setVisibility(self, visibility: QLocation.Visibility) -> None: ... - def visibility(self) -> QLocation.Visibility: ... - def removeContactDetails(self, contactType: str) -> None: ... - def appendContactDetail(self, contactType: str, detail: 'QPlaceContactDetail') -> None: ... - def setContactDetails(self, contactType: str, details: typing.Iterable['QPlaceContactDetail']) -> None: ... - def contactDetails(self, contactType: str) -> typing.Any: ... - def contactTypes(self) -> typing.List[str]: ... - def removeExtendedAttribute(self, attributeType: str) -> None: ... - def setExtendedAttribute(self, attributeType: str, attribute: 'QPlaceAttribute') -> None: ... - def extendedAttribute(self, attributeType: str) -> 'QPlaceAttribute': ... - def extendedAttributeTypes(self) -> typing.List[str]: ... - def setDetailsFetched(self, fetched: bool) -> None: ... - def detailsFetched(self) -> bool: ... - def primaryWebsite(self) -> QtCore.QUrl: ... - def primaryEmail(self) -> str: ... - def primaryFax(self) -> str: ... - def primaryPhone(self) -> str: ... - def setPlaceId(self, identifier: str) -> None: ... - def placeId(self) -> str: ... - def setName(self, name: str) -> None: ... - def name(self) -> str: ... - def setTotalContentCount(self, type: 'QPlaceContent.Type', total: int) -> None: ... - def totalContentCount(self, type: 'QPlaceContent.Type') -> int: ... - def insertContent(self, type: 'QPlaceContent.Type', content: typing.Dict[int, 'QPlaceContent']) -> None: ... - def setContent(self, type: 'QPlaceContent.Type', content: typing.Dict[int, 'QPlaceContent']) -> None: ... - def content(self, type: 'QPlaceContent.Type') -> typing.Dict[int, 'QPlaceContent']: ... - def setIcon(self, icon: 'QPlaceIcon') -> None: ... - def icon(self) -> 'QPlaceIcon': ... - def setAttribution(self, attribution: str) -> None: ... - def attribution(self) -> str: ... - def setSupplier(self, supplier: 'QPlaceSupplier') -> None: ... - def supplier(self) -> 'QPlaceSupplier': ... - def setRatings(self, ratings: 'QPlaceRatings') -> None: ... - def ratings(self) -> 'QPlaceRatings': ... - def setLocation(self, location: QtPositioning.QGeoLocation) -> None: ... - def location(self) -> QtPositioning.QGeoLocation: ... - def setCategories(self, categories: typing.Iterable['QPlaceCategory']) -> None: ... - def setCategory(self, category: 'QPlaceCategory') -> None: ... - def categories(self) -> typing.Any: ... - - -class QPlaceAttribute(sip.simplewrapper): - - OpeningHours = ... # type: str - Payment = ... # type: str - Provider = ... # type: str - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, other: 'QPlaceAttribute') -> None: ... - - def isEmpty(self) -> bool: ... - def setText(self, text: str) -> None: ... - def text(self) -> str: ... - def setLabel(self, label: str) -> None: ... - def label(self) -> str: ... - - -class QPlaceCategory(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, other: 'QPlaceCategory') -> None: ... - - def isEmpty(self) -> bool: ... - def setIcon(self, icon: 'QPlaceIcon') -> None: ... - def icon(self) -> 'QPlaceIcon': ... - def setVisibility(self, visibility: QLocation.Visibility) -> None: ... - def visibility(self) -> QLocation.Visibility: ... - def setName(self, name: str) -> None: ... - def name(self) -> str: ... - def setCategoryId(self, identifier: str) -> None: ... - def categoryId(self) -> str: ... - - -class QPlaceContactDetail(sip.simplewrapper): - - Email = ... # type: str - Fax = ... # type: str - Phone = ... # type: str - Website = ... # type: str - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, other: 'QPlaceContactDetail') -> None: ... - - def clear(self) -> None: ... - def setValue(self, value: str) -> None: ... - def value(self) -> str: ... - def setLabel(self, label: str) -> None: ... - def label(self) -> str: ... - - -class QPlaceContent(sip.simplewrapper): - - class Type(int): ... - NoType = ... # type: 'QPlaceContent.Type' - ImageType = ... # type: 'QPlaceContent.Type' - ReviewType = ... # type: 'QPlaceContent.Type' - EditorialType = ... # type: 'QPlaceContent.Type' - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, other: 'QPlaceContent') -> None: ... - - def setAttribution(self, attribution: str) -> None: ... - def attribution(self) -> str: ... - def setUser(self, user: 'QPlaceUser') -> None: ... - def user(self) -> 'QPlaceUser': ... - def setSupplier(self, supplier: 'QPlaceSupplier') -> None: ... - def supplier(self) -> 'QPlaceSupplier': ... - def type(self) -> 'QPlaceContent.Type': ... - - -class QPlaceReply(QtCore.QObject): - - class Type(int): ... - Reply = ... # type: 'QPlaceReply.Type' - DetailsReply = ... # type: 'QPlaceReply.Type' - SearchReply = ... # type: 'QPlaceReply.Type' - SearchSuggestionReply = ... # type: 'QPlaceReply.Type' - ContentReply = ... # type: 'QPlaceReply.Type' - IdReply = ... # type: 'QPlaceReply.Type' - MatchReply = ... # type: 'QPlaceReply.Type' - - class Error(int): ... - NoError = ... # type: 'QPlaceReply.Error' - PlaceDoesNotExistError = ... # type: 'QPlaceReply.Error' - CategoryDoesNotExistError = ... # type: 'QPlaceReply.Error' - CommunicationError = ... # type: 'QPlaceReply.Error' - ParseError = ... # type: 'QPlaceReply.Error' - PermissionsError = ... # type: 'QPlaceReply.Error' - UnsupportedError = ... # type: 'QPlaceReply.Error' - BadArgumentError = ... # type: 'QPlaceReply.Error' - CancelError = ... # type: 'QPlaceReply.Error' - UnknownError = ... # type: 'QPlaceReply.Error' - - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def setError(self, error: 'QPlaceReply.Error', errorString: str) -> None: ... - def setFinished(self, finished: bool) -> None: ... - def finished(self) -> None: ... - def abort(self) -> None: ... - @typing.overload - def error(self) -> 'QPlaceReply.Error': ... - @typing.overload - def error(self, error: 'QPlaceReply.Error', errorString: str = ...) -> None: ... - def errorString(self) -> str: ... - def type(self) -> 'QPlaceReply.Type': ... - def isFinished(self) -> bool: ... - - -class QPlaceContentReply(QPlaceReply): - - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def setNextPageRequest(self, next: 'QPlaceContentRequest') -> None: ... - def setPreviousPageRequest(self, previous: 'QPlaceContentRequest') -> None: ... - def setRequest(self, request: 'QPlaceContentRequest') -> None: ... - def setTotalCount(self, total: int) -> None: ... - def setContent(self, content: typing.Any) -> None: ... - def nextPageRequest(self) -> 'QPlaceContentRequest': ... - def previousPageRequest(self) -> 'QPlaceContentRequest': ... - def request(self) -> 'QPlaceContentRequest': ... - def totalCount(self) -> int: ... - def content(self) -> typing.Any: ... - def type(self) -> QPlaceReply.Type: ... - - -class QPlaceContentRequest(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, other: 'QPlaceContentRequest') -> None: ... - - def clear(self) -> None: ... - def setLimit(self, limit: int) -> None: ... - def limit(self) -> int: ... - def setContentContext(self, context: typing.Any) -> None: ... - def contentContext(self) -> typing.Any: ... - def setPlaceId(self, identifier: str) -> None: ... - def placeId(self) -> str: ... - def setContentType(self, type: QPlaceContent.Type) -> None: ... - def contentType(self) -> QPlaceContent.Type: ... - - -class QPlaceDetailsReply(QPlaceReply): - - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def setPlace(self, place: QPlace) -> None: ... - def place(self) -> QPlace: ... - def type(self) -> QPlaceReply.Type: ... - - -class QPlaceEditorial(QPlaceContent): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, other: QPlaceContent) -> None: ... - @typing.overload - def __init__(self, a0: 'QPlaceEditorial') -> None: ... - - def setLanguage(self, data: str) -> None: ... - def language(self) -> str: ... - def setTitle(self, data: str) -> None: ... - def title(self) -> str: ... - def setText(self, text: str) -> None: ... - def text(self) -> str: ... - - -class QPlaceIcon(sip.simplewrapper): - - SingleUrl = ... # type: str - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, other: 'QPlaceIcon') -> None: ... - - def isEmpty(self) -> bool: ... - def setParameters(self, parameters: typing.Dict[str, typing.Any]) -> None: ... - def parameters(self) -> typing.Dict[str, typing.Any]: ... - def setManager(self, manager: 'QPlaceManager') -> None: ... - def manager(self) -> 'QPlaceManager': ... - def url(self, size: QtCore.QSize = ...) -> QtCore.QUrl: ... - - -class QPlaceIdReply(QPlaceReply): - - class OperationType(int): ... - SavePlace = ... # type: 'QPlaceIdReply.OperationType' - SaveCategory = ... # type: 'QPlaceIdReply.OperationType' - RemovePlace = ... # type: 'QPlaceIdReply.OperationType' - RemoveCategory = ... # type: 'QPlaceIdReply.OperationType' - - def __init__(self, operationType: 'QPlaceIdReply.OperationType', parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def setId(self, identifier: str) -> None: ... - def id(self) -> str: ... - def operationType(self) -> 'QPlaceIdReply.OperationType': ... - def type(self) -> QPlaceReply.Type: ... - - -class QPlaceImage(QPlaceContent): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, other: QPlaceContent) -> None: ... - @typing.overload - def __init__(self, a0: 'QPlaceImage') -> None: ... - - def setMimeType(self, data: str) -> None: ... - def mimeType(self) -> str: ... - def setImageId(self, identifier: str) -> None: ... - def imageId(self) -> str: ... - def setUrl(self, url: QtCore.QUrl) -> None: ... - def url(self) -> QtCore.QUrl: ... - - -class QPlaceManager(QtCore.QObject): - - def dataChanged(self) -> None: ... - def categoryRemoved(self, categoryId: str, parentId: str) -> None: ... - def categoryUpdated(self, category: QPlaceCategory, parentId: str) -> None: ... - def categoryAdded(self, category: QPlaceCategory, parentId: str) -> None: ... - def placeRemoved(self, placeId: str) -> None: ... - def placeUpdated(self, placeId: str) -> None: ... - def placeAdded(self, placeId: str) -> None: ... - def error(self, a0: QPlaceReply, error: QPlaceReply.Error, errorString: str = ...) -> None: ... - def finished(self, reply: QPlaceReply) -> None: ... - def matchingPlaces(self, request: 'QPlaceMatchRequest') -> 'QPlaceMatchReply': ... - def compatiblePlace(self, place: QPlace) -> QPlace: ... - def setLocales(self, locale: typing.Iterable[QtCore.QLocale]) -> None: ... - def setLocale(self, locale: QtCore.QLocale) -> None: ... - def locales(self) -> typing.List[QtCore.QLocale]: ... - def childCategories(self, parentId: str = ...) -> typing.List[QPlaceCategory]: ... - def category(self, categoryId: str) -> QPlaceCategory: ... - def childCategoryIds(self, parentId: str = ...) -> typing.List[str]: ... - def parentCategoryId(self, categoryId: str) -> str: ... - def initializeCategories(self) -> QPlaceReply: ... - def removeCategory(self, categoryId: str) -> QPlaceIdReply: ... - def saveCategory(self, category: QPlaceCategory, parentId: str = ...) -> QPlaceIdReply: ... - def removePlace(self, placeId: str) -> QPlaceIdReply: ... - def savePlace(self, place: QPlace) -> QPlaceIdReply: ... - def searchSuggestions(self, request: 'QPlaceSearchRequest') -> 'QPlaceSearchSuggestionReply': ... - def search(self, query: 'QPlaceSearchRequest') -> 'QPlaceSearchReply': ... - def getPlaceContent(self, request: QPlaceContentRequest) -> QPlaceContentReply: ... - def getPlaceDetails(self, placeId: str) -> QPlaceDetailsReply: ... - def managerVersion(self) -> int: ... - def managerName(self) -> str: ... - - -class QPlaceManagerEngine(QtCore.QObject): - - def __init__(self, parameters: typing.Dict[str, typing.Any], parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def manager(self) -> QPlaceManager: ... - def dataChanged(self) -> None: ... - def categoryRemoved(self, categoryId: str, parentCategoryId: str) -> None: ... - def categoryUpdated(self, category: QPlaceCategory, parentCategoryId: str) -> None: ... - def categoryAdded(self, category: QPlaceCategory, parentCategoryId: str) -> None: ... - def placeRemoved(self, placeId: str) -> None: ... - def placeUpdated(self, placeId: str) -> None: ... - def placeAdded(self, placeId: str) -> None: ... - def error(self, a0: QPlaceReply, error: QPlaceReply.Error, errorString: str = ...) -> None: ... - def finished(self, reply: QPlaceReply) -> None: ... - def matchingPlaces(self, request: 'QPlaceMatchRequest') -> 'QPlaceMatchReply': ... - def compatiblePlace(self, original: QPlace) -> QPlace: ... - def constructIconUrl(self, icon: QPlaceIcon, size: QtCore.QSize) -> QtCore.QUrl: ... - def setLocales(self, locales: typing.Iterable[QtCore.QLocale]) -> None: ... - def locales(self) -> typing.List[QtCore.QLocale]: ... - def childCategories(self, parentId: str) -> typing.List[QPlaceCategory]: ... - def category(self, categoryId: str) -> QPlaceCategory: ... - def childCategoryIds(self, categoryId: str) -> typing.List[str]: ... - def parentCategoryId(self, categoryId: str) -> str: ... - def initializeCategories(self) -> QPlaceReply: ... - def removeCategory(self, categoryId: str) -> QPlaceIdReply: ... - def saveCategory(self, category: QPlaceCategory, parentId: str) -> QPlaceIdReply: ... - def removePlace(self, placeId: str) -> QPlaceIdReply: ... - def savePlace(self, place: QPlace) -> QPlaceIdReply: ... - def searchSuggestions(self, request: 'QPlaceSearchRequest') -> 'QPlaceSearchSuggestionReply': ... - def search(self, request: 'QPlaceSearchRequest') -> 'QPlaceSearchReply': ... - def getPlaceContent(self, request: QPlaceContentRequest) -> QPlaceContentReply: ... - def getPlaceDetails(self, placeId: str) -> QPlaceDetailsReply: ... - def managerVersion(self) -> int: ... - def managerName(self) -> str: ... - - -class QPlaceMatchReply(QPlaceReply): - - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def setRequest(self, request: 'QPlaceMatchRequest') -> None: ... - def setPlaces(self, results: typing.Iterable[QPlace]) -> None: ... - def request(self) -> 'QPlaceMatchRequest': ... - def places(self) -> typing.Any: ... - def type(self) -> QPlaceReply.Type: ... - - -class QPlaceMatchRequest(sip.simplewrapper): - - AlternativeId = ... # type: str - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, other: 'QPlaceMatchRequest') -> None: ... - - def clear(self) -> None: ... - def setParameters(self, parameters: typing.Dict[str, typing.Any]) -> None: ... - def parameters(self) -> typing.Dict[str, typing.Any]: ... - def setResults(self, results: typing.Any) -> None: ... - def setPlaces(self, places: typing.Iterable[QPlace]) -> None: ... - def places(self) -> typing.List[QPlace]: ... - - -class QPlaceSearchResult(sip.simplewrapper): - - class SearchResultType(int): ... - UnknownSearchResult = ... # type: 'QPlaceSearchResult.SearchResultType' - PlaceResult = ... # type: 'QPlaceSearchResult.SearchResultType' - ProposedSearchResult = ... # type: 'QPlaceSearchResult.SearchResultType' - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, other: 'QPlaceSearchResult') -> None: ... - - def setIcon(self, icon: QPlaceIcon) -> None: ... - def icon(self) -> QPlaceIcon: ... - def setTitle(self, title: str) -> None: ... - def title(self) -> str: ... - def type(self) -> 'QPlaceSearchResult.SearchResultType': ... - - -class QPlaceProposedSearchResult(QPlaceSearchResult): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, other: QPlaceSearchResult) -> None: ... - @typing.overload - def __init__(self, a0: 'QPlaceProposedSearchResult') -> None: ... - - def setSearchRequest(self, request: 'QPlaceSearchRequest') -> None: ... - def searchRequest(self) -> 'QPlaceSearchRequest': ... - - -class QPlaceRatings(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, other: 'QPlaceRatings') -> None: ... - - def isEmpty(self) -> bool: ... - def setMaximum(self, max: float) -> None: ... - def maximum(self) -> float: ... - def setCount(self, count: int) -> None: ... - def count(self) -> int: ... - def setAverage(self, average: float) -> None: ... - def average(self) -> float: ... - - -class QPlaceResult(QPlaceSearchResult): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, other: QPlaceSearchResult) -> None: ... - @typing.overload - def __init__(self, a0: 'QPlaceResult') -> None: ... - - def setSponsored(self, sponsored: bool) -> None: ... - def isSponsored(self) -> bool: ... - def setPlace(self, place: QPlace) -> None: ... - def place(self) -> QPlace: ... - def setDistance(self, distance: float) -> None: ... - def distance(self) -> float: ... - - -class QPlaceReview(QPlaceContent): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, other: QPlaceContent) -> None: ... - @typing.overload - def __init__(self, a0: 'QPlaceReview') -> None: ... - - def setTitle(self, data: str) -> None: ... - def title(self) -> str: ... - def setReviewId(self, identifier: str) -> None: ... - def reviewId(self) -> str: ... - def setRating(self, data: float) -> None: ... - def rating(self) -> float: ... - def setLanguage(self, data: str) -> None: ... - def language(self) -> str: ... - def setText(self, text: str) -> None: ... - def text(self) -> str: ... - def setDateTime(self, dt: typing.Union[QtCore.QDateTime, datetime.datetime]) -> None: ... - def dateTime(self) -> QtCore.QDateTime: ... - - -class QPlaceSearchReply(QPlaceReply): - - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def setNextPageRequest(self, next: 'QPlaceSearchRequest') -> None: ... - def setPreviousPageRequest(self, previous: 'QPlaceSearchRequest') -> None: ... - def setRequest(self, request: 'QPlaceSearchRequest') -> None: ... - def setResults(self, results: typing.Iterable[QPlaceSearchResult]) -> None: ... - def nextPageRequest(self) -> 'QPlaceSearchRequest': ... - def previousPageRequest(self) -> 'QPlaceSearchRequest': ... - def request(self) -> 'QPlaceSearchRequest': ... - def results(self) -> typing.List[QPlaceSearchResult]: ... - def type(self) -> QPlaceReply.Type: ... - - -class QPlaceSearchRequest(sip.simplewrapper): - - class RelevanceHint(int): ... - UnspecifiedHint = ... # type: 'QPlaceSearchRequest.RelevanceHint' - DistanceHint = ... # type: 'QPlaceSearchRequest.RelevanceHint' - LexicalPlaceNameHint = ... # type: 'QPlaceSearchRequest.RelevanceHint' - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, other: 'QPlaceSearchRequest') -> None: ... - - def clear(self) -> None: ... - def setLimit(self, limit: int) -> None: ... - def limit(self) -> int: ... - def setRelevanceHint(self, hint: 'QPlaceSearchRequest.RelevanceHint') -> None: ... - def relevanceHint(self) -> 'QPlaceSearchRequest.RelevanceHint': ... - def setVisibilityScope(self, visibilityScopes: typing.Union[QLocation.VisibilityScope, QLocation.Visibility]) -> None: ... - def visibilityScope(self) -> QLocation.VisibilityScope: ... - def setSearchContext(self, context: typing.Any) -> None: ... - def searchContext(self) -> typing.Any: ... - def setRecommendationId(self, recommendationId: str) -> None: ... - def recommendationId(self) -> str: ... - def setSearchArea(self, area: QtPositioning.QGeoShape) -> None: ... - def searchArea(self) -> QtPositioning.QGeoShape: ... - def setCategories(self, categories: typing.Iterable[QPlaceCategory]) -> None: ... - def setCategory(self, category: QPlaceCategory) -> None: ... - def categories(self) -> typing.List[QPlaceCategory]: ... - def setSearchTerm(self, term: str) -> None: ... - def searchTerm(self) -> str: ... - - -class QPlaceSearchSuggestionReply(QPlaceReply): - - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def setSuggestions(self, suggestions: typing.Iterable[str]) -> None: ... - def type(self) -> QPlaceReply.Type: ... - def suggestions(self) -> typing.List[str]: ... - - -class QPlaceSupplier(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, other: 'QPlaceSupplier') -> None: ... - - def isEmpty(self) -> bool: ... - def setIcon(self, icon: QPlaceIcon) -> None: ... - def icon(self) -> QPlaceIcon: ... - def setUrl(self, data: QtCore.QUrl) -> None: ... - def url(self) -> QtCore.QUrl: ... - def setSupplierId(self, identifier: str) -> None: ... - def supplierId(self) -> str: ... - def setName(self, data: str) -> None: ... - def name(self) -> str: ... - - -class QPlaceUser(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, other: 'QPlaceUser') -> None: ... - - def setName(self, name: str) -> None: ... - def name(self) -> str: ... - def setUserId(self, identifier: str) -> None: ... - def userId(self) -> str: ... diff -Nru uranium-3.3.0/stubs/PyQt5/QtMultimedia.pyi uranium-4.4.1/stubs/PyQt5/QtMultimedia.pyi --- uranium-3.3.0/stubs/PyQt5/QtMultimedia.pyi 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/stubs/PyQt5/QtMultimedia.pyi 1970-01-01 00:00:00.000000000 +0000 @@ -1,1865 +0,0 @@ -# The PEP 484 type hints stub file for the QtMultimedia module. -# -# Generated by SIP 4.18.1 -# -# Copyright (c) 2016 Riverbank Computing Limited -# -# This file is part of PyQt5. -# -# This file may be used under the terms of the GNU General Public License -# version 3.0 as published by the Free Software Foundation and appearing in -# the file LICENSE included in the packaging of this file. Please review the -# following information to ensure the GNU General Public License version 3.0 -# requirements will be met: http://www.gnu.org/copyleft/gpl.html. -# -# If you do not wish to use this file under the terms of the GPL version 3.0 -# then you may purchase a commercial license. For more information contact -# info@riverbankcomputing.com. -# -# This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -# WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - - -import typing -import sip - -from PyQt5 import QtNetwork -from PyQt5 import QtGui -from PyQt5 import QtCore - -# Support for QDate, QDateTime and QTime. -import datetime - -# Convenient type aliases. -PYQT_SIGNAL = typing.Union[QtCore.pyqtSignal, QtCore.pyqtBoundSignal] -PYQT_SLOT = typing.Union[typing.Callable[..., None], QtCore.pyqtBoundSignal] - -# Convenient aliases for complicated OpenGL types. -PYQT_OPENGL_ARRAY = typing.Union[typing.Sequence[int], typing.Sequence[float], - sip.Buffer, None] -PYQT_OPENGL_BOUND_ARRAY = typing.Union[typing.Sequence[int], - typing.Sequence[float], sip.Buffer, int, None] - - -class QAbstractVideoBuffer(sip.simplewrapper): - - class MapMode(int): ... - NotMapped = ... # type: 'QAbstractVideoBuffer.MapMode' - ReadOnly = ... # type: 'QAbstractVideoBuffer.MapMode' - WriteOnly = ... # type: 'QAbstractVideoBuffer.MapMode' - ReadWrite = ... # type: 'QAbstractVideoBuffer.MapMode' - - class HandleType(int): ... - NoHandle = ... # type: 'QAbstractVideoBuffer.HandleType' - GLTextureHandle = ... # type: 'QAbstractVideoBuffer.HandleType' - XvShmImageHandle = ... # type: 'QAbstractVideoBuffer.HandleType' - CoreImageHandle = ... # type: 'QAbstractVideoBuffer.HandleType' - QPixmapHandle = ... # type: 'QAbstractVideoBuffer.HandleType' - EGLImageHandle = ... # type: 'QAbstractVideoBuffer.HandleType' - UserHandle = ... # type: 'QAbstractVideoBuffer.HandleType' - - def __init__(self, type: 'QAbstractVideoBuffer.HandleType') -> None: ... - - def release(self) -> None: ... - def handle(self) -> typing.Any: ... - def unmap(self) -> None: ... - def map(self, mode: 'QAbstractVideoBuffer.MapMode') -> typing.Tuple[sip.voidptr, int, int]: ... - def mapMode(self) -> 'QAbstractVideoBuffer.MapMode': ... - def handleType(self) -> 'QAbstractVideoBuffer.HandleType': ... - - -class QVideoFilterRunnable(sip.simplewrapper): - - class RunFlag(int): ... - LastInChain = ... # type: 'QVideoFilterRunnable.RunFlag' - - class RunFlags(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QVideoFilterRunnable.RunFlags', 'QVideoFilterRunnable.RunFlag']) -> None: ... - @typing.overload - def __init__(self, a0: 'QVideoFilterRunnable.RunFlags') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QVideoFilterRunnable.RunFlags': ... - def __int__(self) -> int: ... - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QVideoFilterRunnable') -> None: ... - - def run(self, input: 'QVideoFrame', surfaceFormat: 'QVideoSurfaceFormat', flags: typing.Union['QVideoFilterRunnable.RunFlags', 'QVideoFilterRunnable.RunFlag']) -> 'QVideoFrame': ... - - -class QAbstractVideoFilter(QtCore.QObject): - - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def activeChanged(self) -> None: ... - def createFilterRunnable(self) -> QVideoFilterRunnable: ... - def isActive(self) -> bool: ... - - -class QAbstractVideoSurface(QtCore.QObject): - - class Error(int): ... - NoError = ... # type: 'QAbstractVideoSurface.Error' - UnsupportedFormatError = ... # type: 'QAbstractVideoSurface.Error' - IncorrectFormatError = ... # type: 'QAbstractVideoSurface.Error' - StoppedError = ... # type: 'QAbstractVideoSurface.Error' - ResourceError = ... # type: 'QAbstractVideoSurface.Error' - - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def nativeResolutionChanged(self, a0: QtCore.QSize) -> None: ... - def setNativeResolution(self, resolution: QtCore.QSize) -> None: ... - def nativeResolution(self) -> QtCore.QSize: ... - def setError(self, error: 'QAbstractVideoSurface.Error') -> None: ... - def supportedFormatsChanged(self) -> None: ... - def surfaceFormatChanged(self, format: 'QVideoSurfaceFormat') -> None: ... - def activeChanged(self, active: bool) -> None: ... - def error(self) -> 'QAbstractVideoSurface.Error': ... - def present(self, frame: 'QVideoFrame') -> bool: ... - def isActive(self) -> bool: ... - def stop(self) -> None: ... - def start(self, format: 'QVideoSurfaceFormat') -> bool: ... - def surfaceFormat(self) -> 'QVideoSurfaceFormat': ... - def nearestFormat(self, format: 'QVideoSurfaceFormat') -> 'QVideoSurfaceFormat': ... - def isFormatSupported(self, format: 'QVideoSurfaceFormat') -> bool: ... - def supportedPixelFormats(self, type: QAbstractVideoBuffer.HandleType = ...) -> typing.List['QVideoFrame.PixelFormat']: ... - - -class QAudio(sip.simplewrapper): - - class Role(int): ... - UnknownRole = ... # type: 'QAudio.Role' - MusicRole = ... # type: 'QAudio.Role' - VideoRole = ... # type: 'QAudio.Role' - VoiceCommunicationRole = ... # type: 'QAudio.Role' - AlarmRole = ... # type: 'QAudio.Role' - NotificationRole = ... # type: 'QAudio.Role' - RingtoneRole = ... # type: 'QAudio.Role' - AccessibilityRole = ... # type: 'QAudio.Role' - SonificationRole = ... # type: 'QAudio.Role' - GameRole = ... # type: 'QAudio.Role' - - class Mode(int): ... - AudioInput = ... # type: 'QAudio.Mode' - AudioOutput = ... # type: 'QAudio.Mode' - - class State(int): ... - ActiveState = ... # type: 'QAudio.State' - SuspendedState = ... # type: 'QAudio.State' - StoppedState = ... # type: 'QAudio.State' - IdleState = ... # type: 'QAudio.State' - - class Error(int): ... - NoError = ... # type: 'QAudio.Error' - OpenError = ... # type: 'QAudio.Error' - IOError = ... # type: 'QAudio.Error' - UnderrunError = ... # type: 'QAudio.Error' - FatalError = ... # type: 'QAudio.Error' - - -class QAudioBuffer(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, data: typing.Union[QtCore.QByteArray, bytes, bytearray], format: 'QAudioFormat', startTime: int = ...) -> None: ... - @typing.overload - def __init__(self, numFrames: int, format: 'QAudioFormat', startTime: int = ...) -> None: ... - @typing.overload - def __init__(self, other: 'QAudioBuffer') -> None: ... - - def data(self) -> sip.voidptr: ... - def constData(self) -> sip.voidptr: ... - def startTime(self) -> int: ... - def duration(self) -> int: ... - def byteCount(self) -> int: ... - def sampleCount(self) -> int: ... - def frameCount(self) -> int: ... - def format(self) -> 'QAudioFormat': ... - def isValid(self) -> bool: ... - - -class QMediaObject(QtCore.QObject): - - def __init__(self, parent: QtCore.QObject, service: 'QMediaService') -> None: ... - - def removePropertyWatch(self, name: typing.Union[QtCore.QByteArray, bytes, bytearray]) -> None: ... - def addPropertyWatch(self, name: typing.Union[QtCore.QByteArray, bytes, bytearray]) -> None: ... - def availabilityChanged(self, availability: 'QMultimedia.AvailabilityStatus') -> None: ... - @typing.overload - def metaDataChanged(self) -> None: ... - @typing.overload - def metaDataChanged(self, key: str, value: typing.Any) -> None: ... - def metaDataAvailableChanged(self, available: bool) -> None: ... - def notifyIntervalChanged(self, milliSeconds: int) -> None: ... - def availableMetaData(self) -> typing.List[str]: ... - def metaData(self, key: str) -> typing.Any: ... - def isMetaDataAvailable(self) -> bool: ... - def unbind(self, a0: QtCore.QObject) -> None: ... - def bind(self, a0: QtCore.QObject) -> bool: ... - def setNotifyInterval(self, milliSeconds: int) -> None: ... - def notifyInterval(self) -> int: ... - def service(self) -> 'QMediaService': ... - def availability(self) -> 'QMultimedia.AvailabilityStatus': ... - def isAvailable(self) -> bool: ... - - -class QAudioDecoder(QMediaObject): - - class Error(int): ... - NoError = ... # type: 'QAudioDecoder.Error' - ResourceError = ... # type: 'QAudioDecoder.Error' - FormatError = ... # type: 'QAudioDecoder.Error' - AccessDeniedError = ... # type: 'QAudioDecoder.Error' - ServiceMissingError = ... # type: 'QAudioDecoder.Error' - - class State(int): ... - StoppedState = ... # type: 'QAudioDecoder.State' - DecodingState = ... # type: 'QAudioDecoder.State' - - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def unbind(self, a0: QtCore.QObject) -> None: ... - def bind(self, a0: QtCore.QObject) -> bool: ... - def durationChanged(self, duration: int) -> None: ... - def positionChanged(self, position: int) -> None: ... - def sourceChanged(self) -> None: ... - def formatChanged(self, format: 'QAudioFormat') -> None: ... - def stateChanged(self, newState: 'QAudioDecoder.State') -> None: ... - def finished(self) -> None: ... - def bufferReady(self) -> None: ... - def bufferAvailableChanged(self, a0: bool) -> None: ... - def stop(self) -> None: ... - def start(self) -> None: ... - def duration(self) -> int: ... - def position(self) -> int: ... - def bufferAvailable(self) -> bool: ... - def read(self) -> QAudioBuffer: ... - def errorString(self) -> str: ... - @typing.overload - def error(self) -> 'QAudioDecoder.Error': ... - @typing.overload - def error(self, error: 'QAudioDecoder.Error') -> None: ... - def setAudioFormat(self, format: 'QAudioFormat') -> None: ... - def audioFormat(self) -> 'QAudioFormat': ... - def setSourceDevice(self, device: QtCore.QIODevice) -> None: ... - def sourceDevice(self) -> QtCore.QIODevice: ... - def setSourceFilename(self, fileName: str) -> None: ... - def sourceFilename(self) -> str: ... - def state(self) -> 'QAudioDecoder.State': ... - @staticmethod - def hasSupport(mimeType: str, codecs: typing.Iterable[str] = ...) -> 'QMultimedia.SupportEstimate': ... - - -class QAudioDeviceInfo(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, other: 'QAudioDeviceInfo') -> None: ... - - def supportedChannelCounts(self) -> typing.List[int]: ... - def supportedSampleRates(self) -> typing.List[int]: ... - @staticmethod - def availableDevices(mode: QAudio.Mode) -> typing.Any: ... - @staticmethod - def defaultOutputDevice() -> 'QAudioDeviceInfo': ... - @staticmethod - def defaultInputDevice() -> 'QAudioDeviceInfo': ... - def supportedSampleTypes(self) -> typing.List['QAudioFormat.SampleType']: ... - def supportedByteOrders(self) -> typing.List['QAudioFormat.Endian']: ... - def supportedSampleSizes(self) -> typing.List[int]: ... - def supportedCodecs(self) -> typing.List[str]: ... - def nearestFormat(self, format: 'QAudioFormat') -> 'QAudioFormat': ... - def preferredFormat(self) -> 'QAudioFormat': ... - def isFormatSupported(self, format: 'QAudioFormat') -> bool: ... - def deviceName(self) -> str: ... - def isNull(self) -> bool: ... - - -class QAudioFormat(sip.simplewrapper): - - class Endian(int): ... - BigEndian = ... # type: 'QAudioFormat.Endian' - LittleEndian = ... # type: 'QAudioFormat.Endian' - - class SampleType(int): ... - Unknown = ... # type: 'QAudioFormat.SampleType' - SignedInt = ... # type: 'QAudioFormat.SampleType' - UnSignedInt = ... # type: 'QAudioFormat.SampleType' - Float = ... # type: 'QAudioFormat.SampleType' - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, other: 'QAudioFormat') -> None: ... - - def bytesPerFrame(self) -> int: ... - def durationForFrames(self, frameCount: int) -> int: ... - def framesForDuration(self, duration: int) -> int: ... - def framesForBytes(self, byteCount: int) -> int: ... - def bytesForFrames(self, frameCount: int) -> int: ... - def durationForBytes(self, byteCount: int) -> int: ... - def bytesForDuration(self, duration: int) -> int: ... - def channelCount(self) -> int: ... - def setChannelCount(self, channelCount: int) -> None: ... - def sampleRate(self) -> int: ... - def setSampleRate(self, sampleRate: int) -> None: ... - def sampleType(self) -> 'QAudioFormat.SampleType': ... - def setSampleType(self, sampleType: 'QAudioFormat.SampleType') -> None: ... - def byteOrder(self) -> 'QAudioFormat.Endian': ... - def setByteOrder(self, byteOrder: 'QAudioFormat.Endian') -> None: ... - def codec(self) -> str: ... - def setCodec(self, codec: str) -> None: ... - def sampleSize(self) -> int: ... - def setSampleSize(self, sampleSize: int) -> None: ... - def isValid(self) -> bool: ... - - -class QAudioInput(QtCore.QObject): - - @typing.overload - def __init__(self, format: QAudioFormat = ..., parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - @typing.overload - def __init__(self, audioDevice: QAudioDeviceInfo, format: QAudioFormat = ..., parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def volume(self) -> float: ... - def setVolume(self, volume: float) -> None: ... - def notify(self) -> None: ... - def stateChanged(self, a0: QAudio.State) -> None: ... - def state(self) -> QAudio.State: ... - def error(self) -> QAudio.Error: ... - def elapsedUSecs(self) -> int: ... - def processedUSecs(self) -> int: ... - def notifyInterval(self) -> int: ... - def setNotifyInterval(self, milliSeconds: int) -> None: ... - def periodSize(self) -> int: ... - def bytesReady(self) -> int: ... - def bufferSize(self) -> int: ... - def setBufferSize(self, bytes: int) -> None: ... - def resume(self) -> None: ... - def suspend(self) -> None: ... - def reset(self) -> None: ... - def stop(self) -> None: ... - @typing.overload - def start(self, device: QtCore.QIODevice) -> None: ... - @typing.overload - def start(self) -> QtCore.QIODevice: ... - def format(self) -> QAudioFormat: ... - - -class QAudioOutput(QtCore.QObject): - - @typing.overload - def __init__(self, format: QAudioFormat = ..., parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - @typing.overload - def __init__(self, audioDevice: QAudioDeviceInfo, format: QAudioFormat = ..., parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def setCategory(self, category: str) -> None: ... - def category(self) -> str: ... - def volume(self) -> float: ... - def setVolume(self, a0: float) -> None: ... - def notify(self) -> None: ... - def stateChanged(self, a0: QAudio.State) -> None: ... - def state(self) -> QAudio.State: ... - def error(self) -> QAudio.Error: ... - def elapsedUSecs(self) -> int: ... - def processedUSecs(self) -> int: ... - def notifyInterval(self) -> int: ... - def setNotifyInterval(self, milliSeconds: int) -> None: ... - def periodSize(self) -> int: ... - def bytesFree(self) -> int: ... - def bufferSize(self) -> int: ... - def setBufferSize(self, bytes: int) -> None: ... - def resume(self) -> None: ... - def suspend(self) -> None: ... - def reset(self) -> None: ... - def stop(self) -> None: ... - @typing.overload - def start(self, device: QtCore.QIODevice) -> None: ... - @typing.overload - def start(self) -> QtCore.QIODevice: ... - def format(self) -> QAudioFormat: ... - - -class QAudioProbe(QtCore.QObject): - - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def flush(self) -> None: ... - def audioBufferProbed(self, audioBuffer: QAudioBuffer) -> None: ... - def isActive(self) -> bool: ... - @typing.overload - def setSource(self, source: QMediaObject) -> bool: ... - @typing.overload - def setSource(self, source: 'QMediaRecorder') -> bool: ... - - -class QMediaBindableInterface(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QMediaBindableInterface') -> None: ... - - def setMediaObject(self, object: QMediaObject) -> bool: ... - def mediaObject(self) -> QMediaObject: ... - - -class QMediaRecorder(QtCore.QObject, QMediaBindableInterface): - - class Error(int): ... - NoError = ... # type: 'QMediaRecorder.Error' - ResourceError = ... # type: 'QMediaRecorder.Error' - FormatError = ... # type: 'QMediaRecorder.Error' - OutOfSpaceError = ... # type: 'QMediaRecorder.Error' - - class Status(int): ... - UnavailableStatus = ... # type: 'QMediaRecorder.Status' - UnloadedStatus = ... # type: 'QMediaRecorder.Status' - LoadingStatus = ... # type: 'QMediaRecorder.Status' - LoadedStatus = ... # type: 'QMediaRecorder.Status' - StartingStatus = ... # type: 'QMediaRecorder.Status' - RecordingStatus = ... # type: 'QMediaRecorder.Status' - PausedStatus = ... # type: 'QMediaRecorder.Status' - FinalizingStatus = ... # type: 'QMediaRecorder.Status' - - class State(int): ... - StoppedState = ... # type: 'QMediaRecorder.State' - RecordingState = ... # type: 'QMediaRecorder.State' - PausedState = ... # type: 'QMediaRecorder.State' - - def __init__(self, mediaObject: QMediaObject, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def setMediaObject(self, object: QMediaObject) -> bool: ... - def availabilityChanged(self, availability: 'QMultimedia.AvailabilityStatus') -> None: ... - def metaDataChanged(self, key: str, value: typing.Any) -> None: ... - def metaDataWritableChanged(self, writable: bool) -> None: ... - def metaDataAvailableChanged(self, available: bool) -> None: ... - def actualLocationChanged(self, location: QtCore.QUrl) -> None: ... - def volumeChanged(self, volume: float) -> None: ... - def mutedChanged(self, muted: bool) -> None: ... - def durationChanged(self, duration: int) -> None: ... - def statusChanged(self, status: 'QMediaRecorder.Status') -> None: ... - def stateChanged(self, state: 'QMediaRecorder.State') -> None: ... - def setVolume(self, volume: float) -> None: ... - def setMuted(self, muted: bool) -> None: ... - def stop(self) -> None: ... - def pause(self) -> None: ... - def record(self) -> None: ... - def availableMetaData(self) -> typing.List[str]: ... - def setMetaData(self, key: str, value: typing.Any) -> None: ... - def metaData(self, key: str) -> typing.Any: ... - def isMetaDataWritable(self) -> bool: ... - def isMetaDataAvailable(self) -> bool: ... - def setEncodingSettings(self, audio: 'QAudioEncoderSettings', video: 'QVideoEncoderSettings' = ..., container: str = ...) -> None: ... - def setContainerFormat(self, container: str) -> None: ... - def setVideoSettings(self, videoSettings: 'QVideoEncoderSettings') -> None: ... - def setAudioSettings(self, audioSettings: 'QAudioEncoderSettings') -> None: ... - def containerFormat(self) -> str: ... - def videoSettings(self) -> 'QVideoEncoderSettings': ... - def audioSettings(self) -> 'QAudioEncoderSettings': ... - def supportedFrameRates(self, settings: 'QVideoEncoderSettings' = ...) -> typing.Tuple[typing.List[float], bool]: ... - def supportedResolutions(self, settings: 'QVideoEncoderSettings' = ...) -> typing.Tuple[typing.List[QtCore.QSize], bool]: ... - def videoCodecDescription(self, codecName: str) -> str: ... - def supportedVideoCodecs(self) -> typing.List[str]: ... - def supportedAudioSampleRates(self, settings: 'QAudioEncoderSettings' = ...) -> typing.Tuple[typing.List[int], bool]: ... - def audioCodecDescription(self, codecName: str) -> str: ... - def supportedAudioCodecs(self) -> typing.List[str]: ... - def containerDescription(self, format: str) -> str: ... - def supportedContainers(self) -> typing.List[str]: ... - def volume(self) -> float: ... - def isMuted(self) -> bool: ... - def duration(self) -> int: ... - def errorString(self) -> str: ... - @typing.overload - def error(self) -> 'QMediaRecorder.Error': ... - @typing.overload - def error(self, error: 'QMediaRecorder.Error') -> None: ... - def status(self) -> 'QMediaRecorder.Status': ... - def state(self) -> 'QMediaRecorder.State': ... - def actualLocation(self) -> QtCore.QUrl: ... - def setOutputLocation(self, location: QtCore.QUrl) -> bool: ... - def outputLocation(self) -> QtCore.QUrl: ... - def availability(self) -> 'QMultimedia.AvailabilityStatus': ... - def isAvailable(self) -> bool: ... - def mediaObject(self) -> QMediaObject: ... - - -class QAudioRecorder(QMediaRecorder): - - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def availableAudioInputsChanged(self) -> None: ... - def audioInputChanged(self, name: str) -> None: ... - def setAudioInput(self, name: str) -> None: ... - def audioInput(self) -> str: ... - def audioInputDescription(self, name: str) -> str: ... - def defaultAudioInput(self) -> str: ... - def audioInputs(self) -> typing.List[str]: ... - - -class QCamera(QMediaObject): - - class Position(int): ... - UnspecifiedPosition = ... # type: 'QCamera.Position' - BackFace = ... # type: 'QCamera.Position' - FrontFace = ... # type: 'QCamera.Position' - - class LockType(int): ... - NoLock = ... # type: 'QCamera.LockType' - LockExposure = ... # type: 'QCamera.LockType' - LockWhiteBalance = ... # type: 'QCamera.LockType' - LockFocus = ... # type: 'QCamera.LockType' - - class LockChangeReason(int): ... - UserRequest = ... # type: 'QCamera.LockChangeReason' - LockAcquired = ... # type: 'QCamera.LockChangeReason' - LockFailed = ... # type: 'QCamera.LockChangeReason' - LockLost = ... # type: 'QCamera.LockChangeReason' - LockTemporaryLost = ... # type: 'QCamera.LockChangeReason' - - class LockStatus(int): ... - Unlocked = ... # type: 'QCamera.LockStatus' - Searching = ... # type: 'QCamera.LockStatus' - Locked = ... # type: 'QCamera.LockStatus' - - class Error(int): ... - NoError = ... # type: 'QCamera.Error' - CameraError = ... # type: 'QCamera.Error' - InvalidRequestError = ... # type: 'QCamera.Error' - ServiceMissingError = ... # type: 'QCamera.Error' - NotSupportedFeatureError = ... # type: 'QCamera.Error' - - class CaptureMode(int): ... - CaptureViewfinder = ... # type: 'QCamera.CaptureMode' - CaptureStillImage = ... # type: 'QCamera.CaptureMode' - CaptureVideo = ... # type: 'QCamera.CaptureMode' - - class State(int): ... - UnloadedState = ... # type: 'QCamera.State' - LoadedState = ... # type: 'QCamera.State' - ActiveState = ... # type: 'QCamera.State' - - class Status(int): ... - UnavailableStatus = ... # type: 'QCamera.Status' - UnloadedStatus = ... # type: 'QCamera.Status' - LoadingStatus = ... # type: 'QCamera.Status' - UnloadingStatus = ... # type: 'QCamera.Status' - LoadedStatus = ... # type: 'QCamera.Status' - StandbyStatus = ... # type: 'QCamera.Status' - StartingStatus = ... # type: 'QCamera.Status' - StoppingStatus = ... # type: 'QCamera.Status' - ActiveStatus = ... # type: 'QCamera.Status' - - class CaptureModes(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QCamera.CaptureModes', 'QCamera.CaptureMode']) -> None: ... - @typing.overload - def __init__(self, a0: 'QCamera.CaptureModes') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QCamera.CaptureModes': ... - def __int__(self) -> int: ... - - class LockTypes(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QCamera.LockTypes', 'QCamera.LockType']) -> None: ... - @typing.overload - def __init__(self, a0: 'QCamera.LockTypes') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QCamera.LockTypes': ... - def __int__(self) -> int: ... - - class FrameRateRange(sip.simplewrapper): - - maximumFrameRate = ... # type: float - minimumFrameRate = ... # type: float - - @typing.overload - def __init__(self, minimum: float, maximum: float) -> None: ... - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QCamera.FrameRateRange') -> None: ... - - @typing.overload - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - @typing.overload - def __init__(self, device: typing.Union[QtCore.QByteArray, bytes, bytearray], parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - @typing.overload - def __init__(self, cameraInfo: 'QCameraInfo', parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - @typing.overload - def __init__(self, position: 'QCamera.Position', parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def supportedViewfinderPixelFormats(self, settings: 'QCameraViewfinderSettings' = ...) -> typing.List['QVideoFrame.PixelFormat']: ... - def supportedViewfinderFrameRateRanges(self, settings: 'QCameraViewfinderSettings' = ...) -> typing.Any: ... - def supportedViewfinderResolutions(self, settings: 'QCameraViewfinderSettings' = ...) -> typing.List[QtCore.QSize]: ... - def supportedViewfinderSettings(self, settings: 'QCameraViewfinderSettings' = ...) -> typing.Any: ... - def setViewfinderSettings(self, settings: 'QCameraViewfinderSettings') -> None: ... - def viewfinderSettings(self) -> 'QCameraViewfinderSettings': ... - @typing.overload - def lockStatusChanged(self, a0: 'QCamera.LockStatus', a1: 'QCamera.LockChangeReason') -> None: ... - @typing.overload - def lockStatusChanged(self, a0: 'QCamera.LockType', a1: 'QCamera.LockStatus', a2: 'QCamera.LockChangeReason') -> None: ... - def lockFailed(self) -> None: ... - def locked(self) -> None: ... - def statusChanged(self, a0: 'QCamera.Status') -> None: ... - def captureModeChanged(self, a0: typing.Union['QCamera.CaptureModes', 'QCamera.CaptureMode']) -> None: ... - def stateChanged(self, a0: 'QCamera.State') -> None: ... - @typing.overload - def unlock(self) -> None: ... - @typing.overload - def unlock(self, locks: typing.Union['QCamera.LockTypes', 'QCamera.LockType']) -> None: ... - @typing.overload - def searchAndLock(self) -> None: ... - @typing.overload - def searchAndLock(self, locks: typing.Union['QCamera.LockTypes', 'QCamera.LockType']) -> None: ... - def stop(self) -> None: ... - def start(self) -> None: ... - def unload(self) -> None: ... - def load(self) -> None: ... - def setCaptureMode(self, mode: typing.Union['QCamera.CaptureModes', 'QCamera.CaptureMode']) -> None: ... - @typing.overload - def lockStatus(self) -> 'QCamera.LockStatus': ... - @typing.overload - def lockStatus(self, lock: 'QCamera.LockType') -> 'QCamera.LockStatus': ... - def requestedLocks(self) -> 'QCamera.LockTypes': ... - def supportedLocks(self) -> 'QCamera.LockTypes': ... - def errorString(self) -> str: ... - @typing.overload - def error(self) -> 'QCamera.Error': ... - @typing.overload - def error(self, a0: 'QCamera.Error') -> None: ... - @typing.overload - def setViewfinder(self, viewfinder: QVideoWidget) -> None: ... - @typing.overload - def setViewfinder(self, viewfinder: QGraphicsVideoItem) -> None: ... - @typing.overload - def setViewfinder(self, surface: QAbstractVideoSurface) -> None: ... - def imageProcessing(self) -> 'QCameraImageProcessing': ... - def focus(self) -> 'QCameraFocus': ... - def exposure(self) -> 'QCameraExposure': ... - def isCaptureModeSupported(self, mode: typing.Union['QCamera.CaptureModes', 'QCamera.CaptureMode']) -> bool: ... - def captureMode(self) -> 'QCamera.CaptureModes': ... - def status(self) -> 'QCamera.Status': ... - def state(self) -> 'QCamera.State': ... - def availability(self) -> 'QMultimedia.AvailabilityStatus': ... - @staticmethod - def deviceDescription(device: typing.Union[QtCore.QByteArray, bytes, bytearray]) -> str: ... - @staticmethod - def availableDevices() -> typing.List[QtCore.QByteArray]: ... - - -class QCameraExposure(QtCore.QObject): - - class MeteringMode(int): ... - MeteringMatrix = ... # type: 'QCameraExposure.MeteringMode' - MeteringAverage = ... # type: 'QCameraExposure.MeteringMode' - MeteringSpot = ... # type: 'QCameraExposure.MeteringMode' - - class ExposureMode(int): ... - ExposureAuto = ... # type: 'QCameraExposure.ExposureMode' - ExposureManual = ... # type: 'QCameraExposure.ExposureMode' - ExposurePortrait = ... # type: 'QCameraExposure.ExposureMode' - ExposureNight = ... # type: 'QCameraExposure.ExposureMode' - ExposureBacklight = ... # type: 'QCameraExposure.ExposureMode' - ExposureSpotlight = ... # type: 'QCameraExposure.ExposureMode' - ExposureSports = ... # type: 'QCameraExposure.ExposureMode' - ExposureSnow = ... # type: 'QCameraExposure.ExposureMode' - ExposureBeach = ... # type: 'QCameraExposure.ExposureMode' - ExposureLargeAperture = ... # type: 'QCameraExposure.ExposureMode' - ExposureSmallAperture = ... # type: 'QCameraExposure.ExposureMode' - ExposureAction = ... # type: 'QCameraExposure.ExposureMode' - ExposureLandscape = ... # type: 'QCameraExposure.ExposureMode' - ExposureNightPortrait = ... # type: 'QCameraExposure.ExposureMode' - ExposureTheatre = ... # type: 'QCameraExposure.ExposureMode' - ExposureSunset = ... # type: 'QCameraExposure.ExposureMode' - ExposureSteadyPhoto = ... # type: 'QCameraExposure.ExposureMode' - ExposureFireworks = ... # type: 'QCameraExposure.ExposureMode' - ExposureParty = ... # type: 'QCameraExposure.ExposureMode' - ExposureCandlelight = ... # type: 'QCameraExposure.ExposureMode' - ExposureBarcode = ... # type: 'QCameraExposure.ExposureMode' - ExposureModeVendor = ... # type: 'QCameraExposure.ExposureMode' - - class FlashMode(int): ... - FlashAuto = ... # type: 'QCameraExposure.FlashMode' - FlashOff = ... # type: 'QCameraExposure.FlashMode' - FlashOn = ... # type: 'QCameraExposure.FlashMode' - FlashRedEyeReduction = ... # type: 'QCameraExposure.FlashMode' - FlashFill = ... # type: 'QCameraExposure.FlashMode' - FlashTorch = ... # type: 'QCameraExposure.FlashMode' - FlashVideoLight = ... # type: 'QCameraExposure.FlashMode' - FlashSlowSyncFrontCurtain = ... # type: 'QCameraExposure.FlashMode' - FlashSlowSyncRearCurtain = ... # type: 'QCameraExposure.FlashMode' - FlashManual = ... # type: 'QCameraExposure.FlashMode' - - class FlashModes(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QCameraExposure.FlashModes', 'QCameraExposure.FlashMode']) -> None: ... - @typing.overload - def __init__(self, a0: 'QCameraExposure.FlashModes') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QCameraExposure.FlashModes': ... - def __int__(self) -> int: ... - - def exposureCompensationChanged(self, a0: float) -> None: ... - def isoSensitivityChanged(self, a0: int) -> None: ... - def shutterSpeedRangeChanged(self) -> None: ... - def shutterSpeedChanged(self, a0: float) -> None: ... - def apertureRangeChanged(self) -> None: ... - def apertureChanged(self, a0: float) -> None: ... - def flashReady(self, a0: bool) -> None: ... - def setAutoShutterSpeed(self) -> None: ... - def setManualShutterSpeed(self, seconds: float) -> None: ... - def setAutoAperture(self) -> None: ... - def setManualAperture(self, aperture: float) -> None: ... - def setAutoIsoSensitivity(self) -> None: ... - def setManualIsoSensitivity(self, iso: int) -> None: ... - def setExposureCompensation(self, ev: float) -> None: ... - def setMeteringMode(self, mode: 'QCameraExposure.MeteringMode') -> None: ... - def setExposureMode(self, mode: 'QCameraExposure.ExposureMode') -> None: ... - def setFlashMode(self, mode: typing.Union['QCameraExposure.FlashModes', 'QCameraExposure.FlashMode']) -> None: ... - def supportedShutterSpeeds(self) -> typing.Tuple[typing.List[float], bool]: ... - def supportedApertures(self) -> typing.Tuple[typing.List[float], bool]: ... - def supportedIsoSensitivities(self) -> typing.Tuple[typing.List[int], bool]: ... - def requestedShutterSpeed(self) -> float: ... - def requestedAperture(self) -> float: ... - def requestedIsoSensitivity(self) -> int: ... - def shutterSpeed(self) -> float: ... - def aperture(self) -> float: ... - def isoSensitivity(self) -> int: ... - def setSpotMeteringPoint(self, point: typing.Union[QtCore.QPointF, QtCore.QPoint]) -> None: ... - def spotMeteringPoint(self) -> QtCore.QPointF: ... - def isMeteringModeSupported(self, mode: 'QCameraExposure.MeteringMode') -> bool: ... - def meteringMode(self) -> 'QCameraExposure.MeteringMode': ... - def exposureCompensation(self) -> float: ... - def isExposureModeSupported(self, mode: 'QCameraExposure.ExposureMode') -> bool: ... - def exposureMode(self) -> 'QCameraExposure.ExposureMode': ... - def isFlashReady(self) -> bool: ... - def isFlashModeSupported(self, mode: typing.Union['QCameraExposure.FlashModes', 'QCameraExposure.FlashMode']) -> bool: ... - def flashMode(self) -> 'QCameraExposure.FlashModes': ... - def isAvailable(self) -> bool: ... - - -class QCameraFocusZone(sip.simplewrapper): - - class FocusZoneStatus(int): ... - Invalid = ... # type: 'QCameraFocusZone.FocusZoneStatus' - Unused = ... # type: 'QCameraFocusZone.FocusZoneStatus' - Selected = ... # type: 'QCameraFocusZone.FocusZoneStatus' - Focused = ... # type: 'QCameraFocusZone.FocusZoneStatus' - - def __init__(self, other: 'QCameraFocusZone') -> None: ... - - def status(self) -> 'QCameraFocusZone.FocusZoneStatus': ... - def area(self) -> QtCore.QRectF: ... - def isValid(self) -> bool: ... - - -class QCameraFocus(QtCore.QObject): - - class FocusPointMode(int): ... - FocusPointAuto = ... # type: 'QCameraFocus.FocusPointMode' - FocusPointCenter = ... # type: 'QCameraFocus.FocusPointMode' - FocusPointFaceDetection = ... # type: 'QCameraFocus.FocusPointMode' - FocusPointCustom = ... # type: 'QCameraFocus.FocusPointMode' - - class FocusMode(int): ... - ManualFocus = ... # type: 'QCameraFocus.FocusMode' - HyperfocalFocus = ... # type: 'QCameraFocus.FocusMode' - InfinityFocus = ... # type: 'QCameraFocus.FocusMode' - AutoFocus = ... # type: 'QCameraFocus.FocusMode' - ContinuousFocus = ... # type: 'QCameraFocus.FocusMode' - MacroFocus = ... # type: 'QCameraFocus.FocusMode' - - class FocusModes(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QCameraFocus.FocusModes', 'QCameraFocus.FocusMode']) -> None: ... - @typing.overload - def __init__(self, a0: 'QCameraFocus.FocusModes') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QCameraFocus.FocusModes': ... - def __int__(self) -> int: ... - - def maximumDigitalZoomChanged(self, a0: float) -> None: ... - def maximumOpticalZoomChanged(self, a0: float) -> None: ... - def focusZonesChanged(self) -> None: ... - def digitalZoomChanged(self, a0: float) -> None: ... - def opticalZoomChanged(self, a0: float) -> None: ... - def zoomTo(self, opticalZoom: float, digitalZoom: float) -> None: ... - def digitalZoom(self) -> float: ... - def opticalZoom(self) -> float: ... - def maximumDigitalZoom(self) -> float: ... - def maximumOpticalZoom(self) -> float: ... - def focusZones(self) -> typing.Any: ... - def setCustomFocusPoint(self, point: typing.Union[QtCore.QPointF, QtCore.QPoint]) -> None: ... - def customFocusPoint(self) -> QtCore.QPointF: ... - def isFocusPointModeSupported(self, a0: 'QCameraFocus.FocusPointMode') -> bool: ... - def setFocusPointMode(self, mode: 'QCameraFocus.FocusPointMode') -> None: ... - def focusPointMode(self) -> 'QCameraFocus.FocusPointMode': ... - def isFocusModeSupported(self, mode: 'QCameraFocus.FocusModes') -> bool: ... - def setFocusMode(self, mode: 'QCameraFocus.FocusModes') -> None: ... - def focusMode(self) -> 'QCameraFocus.FocusModes': ... - def isAvailable(self) -> bool: ... - - -class QCameraImageCapture(QtCore.QObject, QMediaBindableInterface): - - class CaptureDestination(int): ... - CaptureToFile = ... # type: 'QCameraImageCapture.CaptureDestination' - CaptureToBuffer = ... # type: 'QCameraImageCapture.CaptureDestination' - - class DriveMode(int): ... - SingleImageCapture = ... # type: 'QCameraImageCapture.DriveMode' - - class Error(int): ... - NoError = ... # type: 'QCameraImageCapture.Error' - NotReadyError = ... # type: 'QCameraImageCapture.Error' - ResourceError = ... # type: 'QCameraImageCapture.Error' - OutOfSpaceError = ... # type: 'QCameraImageCapture.Error' - NotSupportedFeatureError = ... # type: 'QCameraImageCapture.Error' - FormatError = ... # type: 'QCameraImageCapture.Error' - - class CaptureDestinations(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QCameraImageCapture.CaptureDestinations', 'QCameraImageCapture.CaptureDestination']) -> None: ... - @typing.overload - def __init__(self, a0: 'QCameraImageCapture.CaptureDestinations') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QCameraImageCapture.CaptureDestinations': ... - def __int__(self) -> int: ... - - def __init__(self, mediaObject: QMediaObject, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def setMediaObject(self, a0: QMediaObject) -> bool: ... - def imageSaved(self, id: int, fileName: str) -> None: ... - def imageAvailable(self, id: int, image: 'QVideoFrame') -> None: ... - def imageMetadataAvailable(self, id: int, key: str, value: typing.Any) -> None: ... - def imageCaptured(self, id: int, preview: QtGui.QImage) -> None: ... - def imageExposed(self, id: int) -> None: ... - def captureDestinationChanged(self, a0: typing.Union['QCameraImageCapture.CaptureDestinations', 'QCameraImageCapture.CaptureDestination']) -> None: ... - def bufferFormatChanged(self, a0: 'QVideoFrame.PixelFormat') -> None: ... - def readyForCaptureChanged(self, a0: bool) -> None: ... - def cancelCapture(self) -> None: ... - def capture(self, file: str = ...) -> int: ... - def setCaptureDestination(self, destination: typing.Union['QCameraImageCapture.CaptureDestinations', 'QCameraImageCapture.CaptureDestination']) -> None: ... - def captureDestination(self) -> 'QCameraImageCapture.CaptureDestinations': ... - def isCaptureDestinationSupported(self, destination: typing.Union['QCameraImageCapture.CaptureDestinations', 'QCameraImageCapture.CaptureDestination']) -> bool: ... - def setBufferFormat(self, format: 'QVideoFrame.PixelFormat') -> None: ... - def bufferFormat(self) -> 'QVideoFrame.PixelFormat': ... - def supportedBufferFormats(self) -> typing.List['QVideoFrame.PixelFormat']: ... - def setEncodingSettings(self, settings: 'QImageEncoderSettings') -> None: ... - def encodingSettings(self) -> 'QImageEncoderSettings': ... - def supportedResolutions(self, settings: 'QImageEncoderSettings' = ...) -> typing.Tuple[typing.List[QtCore.QSize], bool]: ... - def imageCodecDescription(self, codecName: str) -> str: ... - def supportedImageCodecs(self) -> typing.List[str]: ... - def isReadyForCapture(self) -> bool: ... - def errorString(self) -> str: ... - @typing.overload - def error(self) -> 'QCameraImageCapture.Error': ... - @typing.overload - def error(self, id: int, error: 'QCameraImageCapture.Error', errorString: str) -> None: ... - def mediaObject(self) -> QMediaObject: ... - def availability(self) -> 'QMultimedia.AvailabilityStatus': ... - def isAvailable(self) -> bool: ... - - -class QCameraImageProcessing(QtCore.QObject): - - class ColorFilter(int): ... - ColorFilterNone = ... # type: 'QCameraImageProcessing.ColorFilter' - ColorFilterGrayscale = ... # type: 'QCameraImageProcessing.ColorFilter' - ColorFilterNegative = ... # type: 'QCameraImageProcessing.ColorFilter' - ColorFilterSolarize = ... # type: 'QCameraImageProcessing.ColorFilter' - ColorFilterSepia = ... # type: 'QCameraImageProcessing.ColorFilter' - ColorFilterPosterize = ... # type: 'QCameraImageProcessing.ColorFilter' - ColorFilterWhiteboard = ... # type: 'QCameraImageProcessing.ColorFilter' - ColorFilterBlackboard = ... # type: 'QCameraImageProcessing.ColorFilter' - ColorFilterAqua = ... # type: 'QCameraImageProcessing.ColorFilter' - ColorFilterVendor = ... # type: 'QCameraImageProcessing.ColorFilter' - - class WhiteBalanceMode(int): ... - WhiteBalanceAuto = ... # type: 'QCameraImageProcessing.WhiteBalanceMode' - WhiteBalanceManual = ... # type: 'QCameraImageProcessing.WhiteBalanceMode' - WhiteBalanceSunlight = ... # type: 'QCameraImageProcessing.WhiteBalanceMode' - WhiteBalanceCloudy = ... # type: 'QCameraImageProcessing.WhiteBalanceMode' - WhiteBalanceShade = ... # type: 'QCameraImageProcessing.WhiteBalanceMode' - WhiteBalanceTungsten = ... # type: 'QCameraImageProcessing.WhiteBalanceMode' - WhiteBalanceFluorescent = ... # type: 'QCameraImageProcessing.WhiteBalanceMode' - WhiteBalanceFlash = ... # type: 'QCameraImageProcessing.WhiteBalanceMode' - WhiteBalanceSunset = ... # type: 'QCameraImageProcessing.WhiteBalanceMode' - WhiteBalanceVendor = ... # type: 'QCameraImageProcessing.WhiteBalanceMode' - - def setBrightness(self, value: float) -> None: ... - def brightness(self) -> float: ... - def isColorFilterSupported(self, filter: 'QCameraImageProcessing.ColorFilter') -> bool: ... - def setColorFilter(self, filter: 'QCameraImageProcessing.ColorFilter') -> None: ... - def colorFilter(self) -> 'QCameraImageProcessing.ColorFilter': ... - def setDenoisingLevel(self, value: float) -> None: ... - def denoisingLevel(self) -> float: ... - def setSharpeningLevel(self, value: float) -> None: ... - def sharpeningLevel(self) -> float: ... - def setSaturation(self, value: float) -> None: ... - def saturation(self) -> float: ... - def setContrast(self, value: float) -> None: ... - def contrast(self) -> float: ... - def setManualWhiteBalance(self, colorTemperature: float) -> None: ... - def manualWhiteBalance(self) -> float: ... - def isWhiteBalanceModeSupported(self, mode: 'QCameraImageProcessing.WhiteBalanceMode') -> bool: ... - def setWhiteBalanceMode(self, mode: 'QCameraImageProcessing.WhiteBalanceMode') -> None: ... - def whiteBalanceMode(self) -> 'QCameraImageProcessing.WhiteBalanceMode': ... - def isAvailable(self) -> bool: ... - - -class QCameraInfo(sip.simplewrapper): - - @typing.overload - def __init__(self, name: typing.Union[QtCore.QByteArray, bytes, bytearray] = ...) -> None: ... - @typing.overload - def __init__(self, camera: QCamera) -> None: ... - @typing.overload - def __init__(self, other: 'QCameraInfo') -> None: ... - - @staticmethod - def availableCameras(position: QCamera.Position = ...) -> typing.Any: ... - @staticmethod - def defaultCamera() -> 'QCameraInfo': ... - def orientation(self) -> int: ... - def position(self) -> QCamera.Position: ... - def description(self) -> str: ... - def deviceName(self) -> str: ... - def isNull(self) -> bool: ... - - -class QCameraViewfinderSettings(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, other: 'QCameraViewfinderSettings') -> None: ... - - @typing.overload - def setPixelAspectRatio(self, ratio: QtCore.QSize) -> None: ... - @typing.overload - def setPixelAspectRatio(self, horizontal: int, vertical: int) -> None: ... - def pixelAspectRatio(self) -> QtCore.QSize: ... - def setPixelFormat(self, format: 'QVideoFrame.PixelFormat') -> None: ... - def pixelFormat(self) -> 'QVideoFrame.PixelFormat': ... - def setMaximumFrameRate(self, rate: float) -> None: ... - def maximumFrameRate(self) -> float: ... - def setMinimumFrameRate(self, rate: float) -> None: ... - def minimumFrameRate(self) -> float: ... - @typing.overload - def setResolution(self, a0: QtCore.QSize) -> None: ... - @typing.overload - def setResolution(self, width: int, height: int) -> None: ... - def resolution(self) -> QtCore.QSize: ... - def isNull(self) -> bool: ... - def swap(self, other: 'QCameraViewfinderSettings') -> None: ... - - -class QMediaContent(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, contentUrl: QtCore.QUrl) -> None: ... - @typing.overload - def __init__(self, contentRequest: QtNetwork.QNetworkRequest) -> None: ... - @typing.overload - def __init__(self, contentResource: 'QMediaResource') -> None: ... - @typing.overload - def __init__(self, resources: typing.Any) -> None: ... - @typing.overload - def __init__(self, other: 'QMediaContent') -> None: ... - @typing.overload - def __init__(self, playlist: 'QMediaPlaylist', contentUrl: QtCore.QUrl = ...) -> None: ... - - def playlist(self) -> 'QMediaPlaylist': ... - def resources(self) -> typing.Any: ... - def canonicalResource(self) -> 'QMediaResource': ... - def canonicalRequest(self) -> QtNetwork.QNetworkRequest: ... - def canonicalUrl(self) -> QtCore.QUrl: ... - def isNull(self) -> bool: ... - - -class QMediaControl(QtCore.QObject): - - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - -class QAudioEncoderSettings(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, other: 'QAudioEncoderSettings') -> None: ... - - def setEncodingOptions(self, options: typing.Dict[str, typing.Any]) -> None: ... - def setEncodingOption(self, option: str, value: typing.Any) -> None: ... - def encodingOptions(self) -> typing.Dict[str, typing.Any]: ... - def encodingOption(self, option: str) -> typing.Any: ... - def setQuality(self, quality: 'QMultimedia.EncodingQuality') -> None: ... - def quality(self) -> 'QMultimedia.EncodingQuality': ... - def setSampleRate(self, rate: int) -> None: ... - def sampleRate(self) -> int: ... - def setChannelCount(self, channels: int) -> None: ... - def channelCount(self) -> int: ... - def setBitRate(self, bitrate: int) -> None: ... - def bitRate(self) -> int: ... - def setCodec(self, codec: str) -> None: ... - def codec(self) -> str: ... - def setEncodingMode(self, a0: 'QMultimedia.EncodingMode') -> None: ... - def encodingMode(self) -> 'QMultimedia.EncodingMode': ... - def isNull(self) -> bool: ... - - -class QVideoEncoderSettings(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, other: 'QVideoEncoderSettings') -> None: ... - - def setEncodingOptions(self, options: typing.Dict[str, typing.Any]) -> None: ... - def setEncodingOption(self, option: str, value: typing.Any) -> None: ... - def encodingOptions(self) -> typing.Dict[str, typing.Any]: ... - def encodingOption(self, option: str) -> typing.Any: ... - def setQuality(self, quality: 'QMultimedia.EncodingQuality') -> None: ... - def quality(self) -> 'QMultimedia.EncodingQuality': ... - def setBitRate(self, bitrate: int) -> None: ... - def bitRate(self) -> int: ... - def setFrameRate(self, rate: float) -> None: ... - def frameRate(self) -> float: ... - @typing.overload - def setResolution(self, a0: QtCore.QSize) -> None: ... - @typing.overload - def setResolution(self, width: int, height: int) -> None: ... - def resolution(self) -> QtCore.QSize: ... - def setCodec(self, a0: str) -> None: ... - def codec(self) -> str: ... - def setEncodingMode(self, a0: 'QMultimedia.EncodingMode') -> None: ... - def encodingMode(self) -> 'QMultimedia.EncodingMode': ... - def isNull(self) -> bool: ... - - -class QImageEncoderSettings(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, other: 'QImageEncoderSettings') -> None: ... - - def setEncodingOptions(self, options: typing.Dict[str, typing.Any]) -> None: ... - def setEncodingOption(self, option: str, value: typing.Any) -> None: ... - def encodingOptions(self) -> typing.Dict[str, typing.Any]: ... - def encodingOption(self, option: str) -> typing.Any: ... - def setQuality(self, quality: 'QMultimedia.EncodingQuality') -> None: ... - def quality(self) -> 'QMultimedia.EncodingQuality': ... - @typing.overload - def setResolution(self, a0: QtCore.QSize) -> None: ... - @typing.overload - def setResolution(self, width: int, height: int) -> None: ... - def resolution(self) -> QtCore.QSize: ... - def setCodec(self, a0: str) -> None: ... - def codec(self) -> str: ... - def isNull(self) -> bool: ... - - -class QMediaMetaData(sip.simplewrapper): - - AlbumArtist = ... # type: str - AlbumTitle = ... # type: str - AudioBitRate = ... # type: str - AudioCodec = ... # type: str - Author = ... # type: str - AverageLevel = ... # type: str - CameraManufacturer = ... # type: str - CameraModel = ... # type: str - Category = ... # type: str - ChannelCount = ... # type: str - ChapterNumber = ... # type: str - Comment = ... # type: str - Composer = ... # type: str - Conductor = ... # type: str - Contrast = ... # type: str - ContributingArtist = ... # type: str - Copyright = ... # type: str - CoverArtImage = ... # type: str - CoverArtUrlLarge = ... # type: str - CoverArtUrlSmall = ... # type: str - Date = ... # type: str - DateTimeDigitized = ... # type: str - DateTimeOriginal = ... # type: str - Description = ... # type: str - DeviceSettingDescription = ... # type: str - DigitalZoomRatio = ... # type: str - Director = ... # type: str - Duration = ... # type: str - Event = ... # type: str - ExposureBiasValue = ... # type: str - ExposureMode = ... # type: str - ExposureProgram = ... # type: str - ExposureTime = ... # type: str - FNumber = ... # type: str - Flash = ... # type: str - FocalLength = ... # type: str - FocalLengthIn35mmFilm = ... # type: str - GPSAltitude = ... # type: str - GPSAreaInformation = ... # type: str - GPSDOP = ... # type: str - GPSImgDirection = ... # type: str - GPSImgDirectionRef = ... # type: str - GPSLatitude = ... # type: str - GPSLongitude = ... # type: str - GPSMapDatum = ... # type: str - GPSProcessingMethod = ... # type: str - GPSSatellites = ... # type: str - GPSSpeed = ... # type: str - GPSStatus = ... # type: str - GPSTimeStamp = ... # type: str - GPSTrack = ... # type: str - GPSTrackRef = ... # type: str - GainControl = ... # type: str - Genre = ... # type: str - ISOSpeedRatings = ... # type: str - Keywords = ... # type: str - Language = ... # type: str - LeadPerformer = ... # type: str - LightSource = ... # type: str - Lyrics = ... # type: str - MediaType = ... # type: str - MeteringMode = ... # type: str - Mood = ... # type: str - Orientation = ... # type: str - ParentalRating = ... # type: str - PeakValue = ... # type: str - PixelAspectRatio = ... # type: str - PosterImage = ... # type: str - PosterUrl = ... # type: str - Publisher = ... # type: str - RatingOrganization = ... # type: str - Resolution = ... # type: str - SampleRate = ... # type: str - Saturation = ... # type: str - SceneCaptureType = ... # type: str - Sharpness = ... # type: str - Size = ... # type: str - SubTitle = ... # type: str - Subject = ... # type: str - SubjectDistance = ... # type: str - ThumbnailImage = ... # type: str - Title = ... # type: str - TrackCount = ... # type: str - TrackNumber = ... # type: str - UserRating = ... # type: str - VideoBitRate = ... # type: str - VideoCodec = ... # type: str - VideoFrameRate = ... # type: str - WhiteBalance = ... # type: str - Writer = ... # type: str - Year = ... # type: str - - -class QMediaPlayer(QMediaObject): - - class Error(int): ... - NoError = ... # type: 'QMediaPlayer.Error' - ResourceError = ... # type: 'QMediaPlayer.Error' - FormatError = ... # type: 'QMediaPlayer.Error' - NetworkError = ... # type: 'QMediaPlayer.Error' - AccessDeniedError = ... # type: 'QMediaPlayer.Error' - ServiceMissingError = ... # type: 'QMediaPlayer.Error' - - class Flag(int): ... - LowLatency = ... # type: 'QMediaPlayer.Flag' - StreamPlayback = ... # type: 'QMediaPlayer.Flag' - VideoSurface = ... # type: 'QMediaPlayer.Flag' - - class MediaStatus(int): ... - UnknownMediaStatus = ... # type: 'QMediaPlayer.MediaStatus' - NoMedia = ... # type: 'QMediaPlayer.MediaStatus' - LoadingMedia = ... # type: 'QMediaPlayer.MediaStatus' - LoadedMedia = ... # type: 'QMediaPlayer.MediaStatus' - StalledMedia = ... # type: 'QMediaPlayer.MediaStatus' - BufferingMedia = ... # type: 'QMediaPlayer.MediaStatus' - BufferedMedia = ... # type: 'QMediaPlayer.MediaStatus' - EndOfMedia = ... # type: 'QMediaPlayer.MediaStatus' - InvalidMedia = ... # type: 'QMediaPlayer.MediaStatus' - - class State(int): ... - StoppedState = ... # type: 'QMediaPlayer.State' - PlayingState = ... # type: 'QMediaPlayer.State' - PausedState = ... # type: 'QMediaPlayer.State' - - class Flags(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QMediaPlayer.Flags', 'QMediaPlayer.Flag']) -> None: ... - @typing.overload - def __init__(self, a0: 'QMediaPlayer.Flags') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QMediaPlayer.Flags': ... - def __int__(self) -> int: ... - - def __init__(self, parent: typing.Optional[QtCore.QObject] = ..., flags: typing.Union['QMediaPlayer.Flags', 'QMediaPlayer.Flag'] = ...) -> None: ... - - def audioRoleChanged(self, role: QAudio.Role) -> None: ... - def supportedAudioRoles(self) -> typing.List[QAudio.Role]: ... - def setAudioRole(self, audioRole: QAudio.Role) -> None: ... - def audioRole(self) -> QAudio.Role: ... - def unbind(self, a0: QtCore.QObject) -> None: ... - def bind(self, a0: QtCore.QObject) -> bool: ... - def networkConfigurationChanged(self, configuration: QtNetwork.QNetworkConfiguration) -> None: ... - def playbackRateChanged(self, rate: float) -> None: ... - def seekableChanged(self, seekable: bool) -> None: ... - def bufferStatusChanged(self, percentFilled: int) -> None: ... - def videoAvailableChanged(self, videoAvailable: bool) -> None: ... - def audioAvailableChanged(self, available: bool) -> None: ... - def mutedChanged(self, muted: bool) -> None: ... - def volumeChanged(self, volume: int) -> None: ... - def positionChanged(self, position: int) -> None: ... - def durationChanged(self, duration: int) -> None: ... - def mediaStatusChanged(self, status: 'QMediaPlayer.MediaStatus') -> None: ... - def stateChanged(self, newState: 'QMediaPlayer.State') -> None: ... - def currentMediaChanged(self, media: QMediaContent) -> None: ... - def mediaChanged(self, media: QMediaContent) -> None: ... - def setNetworkConfigurations(self, configurations: typing.Iterable[QtNetwork.QNetworkConfiguration]) -> None: ... - def setPlaylist(self, playlist: 'QMediaPlaylist') -> None: ... - def setMedia(self, media: QMediaContent, stream: typing.Optional[QtCore.QIODevice] = ...) -> None: ... - def setPlaybackRate(self, rate: float) -> None: ... - def setMuted(self, muted: bool) -> None: ... - def setVolume(self, volume: int) -> None: ... - def setPosition(self, position: int) -> None: ... - def stop(self) -> None: ... - def pause(self) -> None: ... - def play(self) -> None: ... - def availability(self) -> 'QMultimedia.AvailabilityStatus': ... - def currentNetworkConfiguration(self) -> QtNetwork.QNetworkConfiguration: ... - def errorString(self) -> str: ... - @typing.overload - def error(self) -> 'QMediaPlayer.Error': ... - @typing.overload - def error(self, error: 'QMediaPlayer.Error') -> None: ... - def playbackRate(self) -> float: ... - def isSeekable(self) -> bool: ... - def bufferStatus(self) -> int: ... - def isVideoAvailable(self) -> bool: ... - def isAudioAvailable(self) -> bool: ... - def isMuted(self) -> bool: ... - def volume(self) -> int: ... - def position(self) -> int: ... - def duration(self) -> int: ... - def mediaStatus(self) -> 'QMediaPlayer.MediaStatus': ... - def state(self) -> 'QMediaPlayer.State': ... - def currentMedia(self) -> QMediaContent: ... - def playlist(self) -> 'QMediaPlaylist': ... - def mediaStream(self) -> QtCore.QIODevice: ... - def media(self) -> QMediaContent: ... - @typing.overload - def setVideoOutput(self, a0: QVideoWidget) -> None: ... - @typing.overload - def setVideoOutput(self, a0: QGraphicsVideoItem) -> None: ... - @typing.overload - def setVideoOutput(self, surface: QAbstractVideoSurface) -> None: ... - @staticmethod - def supportedMimeTypes(flags: typing.Union['QMediaPlayer.Flags', 'QMediaPlayer.Flag'] = ...) -> typing.List[str]: ... - @staticmethod - def hasSupport(mimeType: str, codecs: typing.Iterable[str] = ..., flags: typing.Union['QMediaPlayer.Flags', 'QMediaPlayer.Flag'] = ...) -> 'QMultimedia.SupportEstimate': ... - - -class QMediaPlaylist(QtCore.QObject, QMediaBindableInterface): - - class Error(int): ... - NoError = ... # type: 'QMediaPlaylist.Error' - FormatError = ... # type: 'QMediaPlaylist.Error' - FormatNotSupportedError = ... # type: 'QMediaPlaylist.Error' - NetworkError = ... # type: 'QMediaPlaylist.Error' - AccessDeniedError = ... # type: 'QMediaPlaylist.Error' - - class PlaybackMode(int): ... - CurrentItemOnce = ... # type: 'QMediaPlaylist.PlaybackMode' - CurrentItemInLoop = ... # type: 'QMediaPlaylist.PlaybackMode' - Sequential = ... # type: 'QMediaPlaylist.PlaybackMode' - Loop = ... # type: 'QMediaPlaylist.PlaybackMode' - Random = ... # type: 'QMediaPlaylist.PlaybackMode' - - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def setMediaObject(self, object: QMediaObject) -> bool: ... - def loadFailed(self) -> None: ... - def loaded(self) -> None: ... - def mediaChanged(self, start: int, end: int) -> None: ... - def mediaRemoved(self, start: int, end: int) -> None: ... - def mediaAboutToBeRemoved(self, start: int, end: int) -> None: ... - def mediaInserted(self, start: int, end: int) -> None: ... - def mediaAboutToBeInserted(self, start: int, end: int) -> None: ... - def currentMediaChanged(self, a0: QMediaContent) -> None: ... - def playbackModeChanged(self, mode: 'QMediaPlaylist.PlaybackMode') -> None: ... - def currentIndexChanged(self, index: int) -> None: ... - def setCurrentIndex(self, index: int) -> None: ... - def previous(self) -> None: ... - def next(self) -> None: ... - def shuffle(self) -> None: ... - def moveMedia(self, from_: int, to: int) -> bool: ... - def errorString(self) -> str: ... - def error(self) -> 'QMediaPlaylist.Error': ... - @typing.overload - def save(self, location: QtCore.QUrl, format: typing.Optional[str] = ...) -> bool: ... - @typing.overload - def save(self, device: QtCore.QIODevice, format: str) -> bool: ... - @typing.overload - def load(self, request: QtNetwork.QNetworkRequest, format: typing.Optional[str] = ...) -> None: ... - @typing.overload - def load(self, location: QtCore.QUrl, format: typing.Optional[str] = ...) -> None: ... - @typing.overload - def load(self, device: QtCore.QIODevice, format: typing.Optional[str] = ...) -> None: ... - def clear(self) -> bool: ... - @typing.overload - def removeMedia(self, pos: int) -> bool: ... - @typing.overload - def removeMedia(self, start: int, end: int) -> bool: ... - @typing.overload - def insertMedia(self, index: int, content: QMediaContent) -> bool: ... - @typing.overload - def insertMedia(self, index: int, items: typing.Iterable[QMediaContent]) -> bool: ... - @typing.overload - def addMedia(self, content: QMediaContent) -> bool: ... - @typing.overload - def addMedia(self, items: typing.Any) -> bool: ... - def isReadOnly(self) -> bool: ... - def isEmpty(self) -> bool: ... - def mediaCount(self) -> int: ... - def media(self, index: int) -> QMediaContent: ... - def previousIndex(self, steps: int = ...) -> int: ... - def nextIndex(self, steps: int = ...) -> int: ... - def currentMedia(self) -> QMediaContent: ... - def currentIndex(self) -> int: ... - def setPlaybackMode(self, mode: 'QMediaPlaylist.PlaybackMode') -> None: ... - def playbackMode(self) -> 'QMediaPlaylist.PlaybackMode': ... - def mediaObject(self) -> QMediaObject: ... - - -class QMediaResource(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, url: QtCore.QUrl, mimeType: str = ...) -> None: ... - @typing.overload - def __init__(self, request: QtNetwork.QNetworkRequest, mimeType: str = ...) -> None: ... - @typing.overload - def __init__(self, other: 'QMediaResource') -> None: ... - - @typing.overload - def setResolution(self, resolution: QtCore.QSize) -> None: ... - @typing.overload - def setResolution(self, width: int, height: int) -> None: ... - def resolution(self) -> QtCore.QSize: ... - def setVideoBitRate(self, rate: int) -> None: ... - def videoBitRate(self) -> int: ... - def setChannelCount(self, channels: int) -> None: ... - def channelCount(self) -> int: ... - def setSampleRate(self, frequency: int) -> None: ... - def sampleRate(self) -> int: ... - def setAudioBitRate(self, rate: int) -> None: ... - def audioBitRate(self) -> int: ... - def setDataSize(self, size: int) -> None: ... - def dataSize(self) -> int: ... - def setVideoCodec(self, codec: str) -> None: ... - def videoCodec(self) -> str: ... - def setAudioCodec(self, codec: str) -> None: ... - def audioCodec(self) -> str: ... - def setLanguage(self, language: str) -> None: ... - def language(self) -> str: ... - def mimeType(self) -> str: ... - def request(self) -> QtNetwork.QNetworkRequest: ... - def url(self) -> QtCore.QUrl: ... - def isNull(self) -> bool: ... - - -class QMediaService(QtCore.QObject): - - def __init__(self, parent: QtCore.QObject) -> None: ... - - def releaseControl(self, control: QMediaControl) -> None: ... - def requestControl(self, name: str) -> QMediaControl: ... - - -class QMediaTimeInterval(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, start: int, end: int) -> None: ... - @typing.overload - def __init__(self, a0: 'QMediaTimeInterval') -> None: ... - - def translated(self, offset: int) -> 'QMediaTimeInterval': ... - def normalized(self) -> 'QMediaTimeInterval': ... - def isNormal(self) -> bool: ... - def contains(self, time: int) -> bool: ... - def end(self) -> int: ... - def start(self) -> int: ... - - -class QMediaTimeRange(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, start: int, end: int) -> None: ... - @typing.overload - def __init__(self, a0: QMediaTimeInterval) -> None: ... - @typing.overload - def __init__(self, range: 'QMediaTimeRange') -> None: ... - - def clear(self) -> None: ... - def removeTimeRange(self, a0: 'QMediaTimeRange') -> None: ... - @typing.overload - def removeInterval(self, start: int, end: int) -> None: ... - @typing.overload - def removeInterval(self, interval: QMediaTimeInterval) -> None: ... - def addTimeRange(self, a0: 'QMediaTimeRange') -> None: ... - @typing.overload - def addInterval(self, start: int, end: int) -> None: ... - @typing.overload - def addInterval(self, interval: QMediaTimeInterval) -> None: ... - def contains(self, time: int) -> bool: ... - def isContinuous(self) -> bool: ... - def isEmpty(self) -> bool: ... - def intervals(self) -> typing.Any: ... - def latestTime(self) -> int: ... - def earliestTime(self) -> int: ... - - -class QMultimedia(sip.simplewrapper): - - class AvailabilityStatus(int): ... - Available = ... # type: 'QMultimedia.AvailabilityStatus' - ServiceMissing = ... # type: 'QMultimedia.AvailabilityStatus' - Busy = ... # type: 'QMultimedia.AvailabilityStatus' - ResourceError = ... # type: 'QMultimedia.AvailabilityStatus' - - class EncodingMode(int): ... - ConstantQualityEncoding = ... # type: 'QMultimedia.EncodingMode' - ConstantBitRateEncoding = ... # type: 'QMultimedia.EncodingMode' - AverageBitRateEncoding = ... # type: 'QMultimedia.EncodingMode' - TwoPassEncoding = ... # type: 'QMultimedia.EncodingMode' - - class EncodingQuality(int): ... - VeryLowQuality = ... # type: 'QMultimedia.EncodingQuality' - LowQuality = ... # type: 'QMultimedia.EncodingQuality' - NormalQuality = ... # type: 'QMultimedia.EncodingQuality' - HighQuality = ... # type: 'QMultimedia.EncodingQuality' - VeryHighQuality = ... # type: 'QMultimedia.EncodingQuality' - - class SupportEstimate(int): ... - NotSupported = ... # type: 'QMultimedia.SupportEstimate' - MaybeSupported = ... # type: 'QMultimedia.SupportEstimate' - ProbablySupported = ... # type: 'QMultimedia.SupportEstimate' - PreferredService = ... # type: 'QMultimedia.SupportEstimate' - - -class QRadioData(QtCore.QObject, QMediaBindableInterface): - - class ProgramType(int): ... - Undefined = ... # type: 'QRadioData.ProgramType' - News = ... # type: 'QRadioData.ProgramType' - CurrentAffairs = ... # type: 'QRadioData.ProgramType' - Information = ... # type: 'QRadioData.ProgramType' - Sport = ... # type: 'QRadioData.ProgramType' - Education = ... # type: 'QRadioData.ProgramType' - Drama = ... # type: 'QRadioData.ProgramType' - Culture = ... # type: 'QRadioData.ProgramType' - Science = ... # type: 'QRadioData.ProgramType' - Varied = ... # type: 'QRadioData.ProgramType' - PopMusic = ... # type: 'QRadioData.ProgramType' - RockMusic = ... # type: 'QRadioData.ProgramType' - EasyListening = ... # type: 'QRadioData.ProgramType' - LightClassical = ... # type: 'QRadioData.ProgramType' - SeriousClassical = ... # type: 'QRadioData.ProgramType' - OtherMusic = ... # type: 'QRadioData.ProgramType' - Weather = ... # type: 'QRadioData.ProgramType' - Finance = ... # type: 'QRadioData.ProgramType' - ChildrensProgrammes = ... # type: 'QRadioData.ProgramType' - SocialAffairs = ... # type: 'QRadioData.ProgramType' - Religion = ... # type: 'QRadioData.ProgramType' - PhoneIn = ... # type: 'QRadioData.ProgramType' - Travel = ... # type: 'QRadioData.ProgramType' - Leisure = ... # type: 'QRadioData.ProgramType' - JazzMusic = ... # type: 'QRadioData.ProgramType' - CountryMusic = ... # type: 'QRadioData.ProgramType' - NationalMusic = ... # type: 'QRadioData.ProgramType' - OldiesMusic = ... # type: 'QRadioData.ProgramType' - FolkMusic = ... # type: 'QRadioData.ProgramType' - Documentary = ... # type: 'QRadioData.ProgramType' - AlarmTest = ... # type: 'QRadioData.ProgramType' - Alarm = ... # type: 'QRadioData.ProgramType' - Talk = ... # type: 'QRadioData.ProgramType' - ClassicRock = ... # type: 'QRadioData.ProgramType' - AdultHits = ... # type: 'QRadioData.ProgramType' - SoftRock = ... # type: 'QRadioData.ProgramType' - Top40 = ... # type: 'QRadioData.ProgramType' - Soft = ... # type: 'QRadioData.ProgramType' - Nostalgia = ... # type: 'QRadioData.ProgramType' - Classical = ... # type: 'QRadioData.ProgramType' - RhythmAndBlues = ... # type: 'QRadioData.ProgramType' - SoftRhythmAndBlues = ... # type: 'QRadioData.ProgramType' - Language = ... # type: 'QRadioData.ProgramType' - ReligiousMusic = ... # type: 'QRadioData.ProgramType' - ReligiousTalk = ... # type: 'QRadioData.ProgramType' - Personality = ... # type: 'QRadioData.ProgramType' - Public = ... # type: 'QRadioData.ProgramType' - College = ... # type: 'QRadioData.ProgramType' - - class Error(int): ... - NoError = ... # type: 'QRadioData.Error' - ResourceError = ... # type: 'QRadioData.Error' - OpenError = ... # type: 'QRadioData.Error' - OutOfRangeError = ... # type: 'QRadioData.Error' - - def __init__(self, mediaObject: QMediaObject, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def setMediaObject(self, a0: QMediaObject) -> bool: ... - def alternativeFrequenciesEnabledChanged(self, enabled: bool) -> None: ... - def radioTextChanged(self, radioText: str) -> None: ... - def stationNameChanged(self, stationName: str) -> None: ... - def programTypeNameChanged(self, programTypeName: str) -> None: ... - def programTypeChanged(self, programType: 'QRadioData.ProgramType') -> None: ... - def stationIdChanged(self, stationId: str) -> None: ... - def setAlternativeFrequenciesEnabled(self, enabled: bool) -> None: ... - def errorString(self) -> str: ... - @typing.overload - def error(self) -> 'QRadioData.Error': ... - @typing.overload - def error(self, error: 'QRadioData.Error') -> None: ... - def isAlternativeFrequenciesEnabled(self) -> bool: ... - def radioText(self) -> str: ... - def stationName(self) -> str: ... - def programTypeName(self) -> str: ... - def programType(self) -> 'QRadioData.ProgramType': ... - def stationId(self) -> str: ... - def availability(self) -> QMultimedia.AvailabilityStatus: ... - def mediaObject(self) -> QMediaObject: ... - - -class QRadioTuner(QMediaObject): - - class SearchMode(int): ... - SearchFast = ... # type: 'QRadioTuner.SearchMode' - SearchGetStationId = ... # type: 'QRadioTuner.SearchMode' - - class StereoMode(int): ... - ForceStereo = ... # type: 'QRadioTuner.StereoMode' - ForceMono = ... # type: 'QRadioTuner.StereoMode' - Auto = ... # type: 'QRadioTuner.StereoMode' - - class Error(int): ... - NoError = ... # type: 'QRadioTuner.Error' - ResourceError = ... # type: 'QRadioTuner.Error' - OpenError = ... # type: 'QRadioTuner.Error' - OutOfRangeError = ... # type: 'QRadioTuner.Error' - - class Band(int): ... - AM = ... # type: 'QRadioTuner.Band' - FM = ... # type: 'QRadioTuner.Band' - SW = ... # type: 'QRadioTuner.Band' - LW = ... # type: 'QRadioTuner.Band' - FM2 = ... # type: 'QRadioTuner.Band' - - class State(int): ... - ActiveState = ... # type: 'QRadioTuner.State' - StoppedState = ... # type: 'QRadioTuner.State' - - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def antennaConnectedChanged(self, connectionStatus: bool) -> None: ... - def stationFound(self, frequency: int, stationId: str) -> None: ... - def mutedChanged(self, muted: bool) -> None: ... - def volumeChanged(self, volume: int) -> None: ... - def signalStrengthChanged(self, signalStrength: int) -> None: ... - def searchingChanged(self, searching: bool) -> None: ... - def stereoStatusChanged(self, stereo: bool) -> None: ... - def frequencyChanged(self, frequency: int) -> None: ... - def bandChanged(self, band: 'QRadioTuner.Band') -> None: ... - def stateChanged(self, state: 'QRadioTuner.State') -> None: ... - def stop(self) -> None: ... - def start(self) -> None: ... - def setMuted(self, muted: bool) -> None: ... - def setVolume(self, volume: int) -> None: ... - def setFrequency(self, frequency: int) -> None: ... - def setBand(self, band: 'QRadioTuner.Band') -> None: ... - def cancelSearch(self) -> None: ... - def searchAllStations(self, searchMode: 'QRadioTuner.SearchMode' = ...) -> None: ... - def searchBackward(self) -> None: ... - def searchForward(self) -> None: ... - def radioData(self) -> QRadioData: ... - def errorString(self) -> str: ... - @typing.overload - def error(self) -> 'QRadioTuner.Error': ... - @typing.overload - def error(self, error: 'QRadioTuner.Error') -> None: ... - def isAntennaConnected(self) -> bool: ... - def isSearching(self) -> bool: ... - def isMuted(self) -> bool: ... - def volume(self) -> int: ... - def signalStrength(self) -> int: ... - def stereoMode(self) -> 'QRadioTuner.StereoMode': ... - def setStereoMode(self, mode: 'QRadioTuner.StereoMode') -> None: ... - def isStereo(self) -> bool: ... - def frequencyRange(self, band: 'QRadioTuner.Band') -> typing.Tuple[int, int]: ... - def frequencyStep(self, band: 'QRadioTuner.Band') -> int: ... - def frequency(self) -> int: ... - def isBandSupported(self, b: 'QRadioTuner.Band') -> bool: ... - def band(self) -> 'QRadioTuner.Band': ... - def state(self) -> 'QRadioTuner.State': ... - def availability(self) -> QMultimedia.AvailabilityStatus: ... - - -class QSound(QtCore.QObject): - - class Loop(int): ... - Infinite = ... # type: 'QSound.Loop' - - def __init__(self, filename: str, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def stop(self) -> None: ... - def isFinished(self) -> bool: ... - def fileName(self) -> str: ... - def setLoops(self, a0: int) -> None: ... - def loopsRemaining(self) -> int: ... - def loops(self) -> int: ... - @typing.overload - @staticmethod - def play(filename: str) -> None: ... - @typing.overload - def play(self) -> None: ... - - -class QSoundEffect(QtCore.QObject): - - class Status(int): ... - Null = ... # type: 'QSoundEffect.Status' - Loading = ... # type: 'QSoundEffect.Status' - Ready = ... # type: 'QSoundEffect.Status' - Error = ... # type: 'QSoundEffect.Status' - - class Loop(int): ... - Infinite = ... # type: 'QSoundEffect.Loop' - - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def stop(self) -> None: ... - def play(self) -> None: ... - def categoryChanged(self) -> None: ... - def statusChanged(self) -> None: ... - def playingChanged(self) -> None: ... - def loadedChanged(self) -> None: ... - def mutedChanged(self) -> None: ... - def volumeChanged(self) -> None: ... - def loopsRemainingChanged(self) -> None: ... - def loopCountChanged(self) -> None: ... - def sourceChanged(self) -> None: ... - def setCategory(self, category: str) -> None: ... - def category(self) -> str: ... - def status(self) -> 'QSoundEffect.Status': ... - def isPlaying(self) -> bool: ... - def isLoaded(self) -> bool: ... - def setMuted(self, muted: bool) -> None: ... - def isMuted(self) -> bool: ... - def setVolume(self, volume: float) -> None: ... - def volume(self) -> float: ... - def setLoopCount(self, loopCount: int) -> None: ... - def loopsRemaining(self) -> int: ... - def loopCount(self) -> int: ... - def setSource(self, url: QtCore.QUrl) -> None: ... - def source(self) -> QtCore.QUrl: ... - @staticmethod - def supportedMimeTypes() -> typing.List[str]: ... - - -class QVideoFrame(sip.simplewrapper): - - class PixelFormat(int): ... - Format_Invalid = ... # type: 'QVideoFrame.PixelFormat' - Format_ARGB32 = ... # type: 'QVideoFrame.PixelFormat' - Format_ARGB32_Premultiplied = ... # type: 'QVideoFrame.PixelFormat' - Format_RGB32 = ... # type: 'QVideoFrame.PixelFormat' - Format_RGB24 = ... # type: 'QVideoFrame.PixelFormat' - Format_RGB565 = ... # type: 'QVideoFrame.PixelFormat' - Format_RGB555 = ... # type: 'QVideoFrame.PixelFormat' - Format_ARGB8565_Premultiplied = ... # type: 'QVideoFrame.PixelFormat' - Format_BGRA32 = ... # type: 'QVideoFrame.PixelFormat' - Format_BGRA32_Premultiplied = ... # type: 'QVideoFrame.PixelFormat' - Format_BGR32 = ... # type: 'QVideoFrame.PixelFormat' - Format_BGR24 = ... # type: 'QVideoFrame.PixelFormat' - Format_BGR565 = ... # type: 'QVideoFrame.PixelFormat' - Format_BGR555 = ... # type: 'QVideoFrame.PixelFormat' - Format_BGRA5658_Premultiplied = ... # type: 'QVideoFrame.PixelFormat' - Format_AYUV444 = ... # type: 'QVideoFrame.PixelFormat' - Format_AYUV444_Premultiplied = ... # type: 'QVideoFrame.PixelFormat' - Format_YUV444 = ... # type: 'QVideoFrame.PixelFormat' - Format_YUV420P = ... # type: 'QVideoFrame.PixelFormat' - Format_YV12 = ... # type: 'QVideoFrame.PixelFormat' - Format_UYVY = ... # type: 'QVideoFrame.PixelFormat' - Format_YUYV = ... # type: 'QVideoFrame.PixelFormat' - Format_NV12 = ... # type: 'QVideoFrame.PixelFormat' - Format_NV21 = ... # type: 'QVideoFrame.PixelFormat' - Format_IMC1 = ... # type: 'QVideoFrame.PixelFormat' - Format_IMC2 = ... # type: 'QVideoFrame.PixelFormat' - Format_IMC3 = ... # type: 'QVideoFrame.PixelFormat' - Format_IMC4 = ... # type: 'QVideoFrame.PixelFormat' - Format_Y8 = ... # type: 'QVideoFrame.PixelFormat' - Format_Y16 = ... # type: 'QVideoFrame.PixelFormat' - Format_Jpeg = ... # type: 'QVideoFrame.PixelFormat' - Format_CameraRaw = ... # type: 'QVideoFrame.PixelFormat' - Format_AdobeDng = ... # type: 'QVideoFrame.PixelFormat' - Format_User = ... # type: 'QVideoFrame.PixelFormat' - - class FieldType(int): ... - ProgressiveFrame = ... # type: 'QVideoFrame.FieldType' - TopField = ... # type: 'QVideoFrame.FieldType' - BottomField = ... # type: 'QVideoFrame.FieldType' - InterlacedFrame = ... # type: 'QVideoFrame.FieldType' - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, buffer: QAbstractVideoBuffer, size: QtCore.QSize, format: 'QVideoFrame.PixelFormat') -> None: ... - @typing.overload - def __init__(self, bytes: int, size: QtCore.QSize, bytesPerLine: int, format: 'QVideoFrame.PixelFormat') -> None: ... - @typing.overload - def __init__(self, image: QtGui.QImage) -> None: ... - @typing.overload - def __init__(self, other: 'QVideoFrame') -> None: ... - - def planeCount(self) -> int: ... - def setMetaData(self, key: str, value: typing.Any) -> None: ... - def metaData(self, key: str) -> typing.Any: ... - def availableMetaData(self) -> typing.Dict[str, typing.Any]: ... - @staticmethod - def imageFormatFromPixelFormat(format: 'QVideoFrame.PixelFormat') -> QtGui.QImage.Format: ... - @staticmethod - def pixelFormatFromImageFormat(format: QtGui.QImage.Format) -> 'QVideoFrame.PixelFormat': ... - def setEndTime(self, time: int) -> None: ... - def endTime(self) -> int: ... - def setStartTime(self, time: int) -> None: ... - def startTime(self) -> int: ... - def handle(self) -> typing.Any: ... - def mappedBytes(self) -> int: ... - @typing.overload - def bits(self) -> sip.voidptr: ... - @typing.overload - def bits(self, plane: int) -> sip.voidptr: ... - @typing.overload - def bytesPerLine(self) -> int: ... - @typing.overload - def bytesPerLine(self, plane: int) -> int: ... - def unmap(self) -> None: ... - def map(self, mode: QAbstractVideoBuffer.MapMode) -> bool: ... - def mapMode(self) -> QAbstractVideoBuffer.MapMode: ... - def isWritable(self) -> bool: ... - def isReadable(self) -> bool: ... - def isMapped(self) -> bool: ... - def setFieldType(self, a0: 'QVideoFrame.FieldType') -> None: ... - def fieldType(self) -> 'QVideoFrame.FieldType': ... - def height(self) -> int: ... - def width(self) -> int: ... - def size(self) -> QtCore.QSize: ... - def handleType(self) -> QAbstractVideoBuffer.HandleType: ... - def pixelFormat(self) -> 'QVideoFrame.PixelFormat': ... - def isValid(self) -> bool: ... - - -class QVideoProbe(QtCore.QObject): - - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def flush(self) -> None: ... - def videoFrameProbed(self, videoFrame: QVideoFrame) -> None: ... - def isActive(self) -> bool: ... - @typing.overload - def setSource(self, source: QMediaObject) -> bool: ... - @typing.overload - def setSource(self, source: QMediaRecorder) -> bool: ... - - -class QVideoSurfaceFormat(sip.simplewrapper): - - class YCbCrColorSpace(int): ... - YCbCr_Undefined = ... # type: 'QVideoSurfaceFormat.YCbCrColorSpace' - YCbCr_BT601 = ... # type: 'QVideoSurfaceFormat.YCbCrColorSpace' - YCbCr_BT709 = ... # type: 'QVideoSurfaceFormat.YCbCrColorSpace' - YCbCr_xvYCC601 = ... # type: 'QVideoSurfaceFormat.YCbCrColorSpace' - YCbCr_xvYCC709 = ... # type: 'QVideoSurfaceFormat.YCbCrColorSpace' - YCbCr_JPEG = ... # type: 'QVideoSurfaceFormat.YCbCrColorSpace' - - class Direction(int): ... - TopToBottom = ... # type: 'QVideoSurfaceFormat.Direction' - BottomToTop = ... # type: 'QVideoSurfaceFormat.Direction' - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, size: QtCore.QSize, format: QVideoFrame.PixelFormat, type: QAbstractVideoBuffer.HandleType = ...) -> None: ... - @typing.overload - def __init__(self, format: 'QVideoSurfaceFormat') -> None: ... - - def setProperty(self, name: str, value: typing.Any) -> None: ... - def property(self, name: str) -> typing.Any: ... - def propertyNames(self) -> typing.List[QtCore.QByteArray]: ... - def sizeHint(self) -> QtCore.QSize: ... - def setYCbCrColorSpace(self, colorSpace: 'QVideoSurfaceFormat.YCbCrColorSpace') -> None: ... - def yCbCrColorSpace(self) -> 'QVideoSurfaceFormat.YCbCrColorSpace': ... - @typing.overload - def setPixelAspectRatio(self, ratio: QtCore.QSize) -> None: ... - @typing.overload - def setPixelAspectRatio(self, width: int, height: int) -> None: ... - def pixelAspectRatio(self) -> QtCore.QSize: ... - def setFrameRate(self, rate: float) -> None: ... - def frameRate(self) -> float: ... - def setScanLineDirection(self, direction: 'QVideoSurfaceFormat.Direction') -> None: ... - def scanLineDirection(self) -> 'QVideoSurfaceFormat.Direction': ... - def setViewport(self, viewport: QtCore.QRect) -> None: ... - def viewport(self) -> QtCore.QRect: ... - def frameHeight(self) -> int: ... - def frameWidth(self) -> int: ... - @typing.overload - def setFrameSize(self, size: QtCore.QSize) -> None: ... - @typing.overload - def setFrameSize(self, width: int, height: int) -> None: ... - def frameSize(self) -> QtCore.QSize: ... - def handleType(self) -> QAbstractVideoBuffer.HandleType: ... - def pixelFormat(self) -> QVideoFrame.PixelFormat: ... - def isValid(self) -> bool: ... diff -Nru uranium-3.3.0/stubs/PyQt5/QtMultimediaWidgets.pyi uranium-4.4.1/stubs/PyQt5/QtMultimediaWidgets.pyi --- uranium-3.3.0/stubs/PyQt5/QtMultimediaWidgets.pyi 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/stubs/PyQt5/QtMultimediaWidgets.pyi 1970-01-01 00:00:00.000000000 +0000 @@ -1,100 +0,0 @@ -# The PEP 484 type hints stub file for the QtMultimediaWidgets module. -# -# Generated by SIP 4.18.1 -# -# Copyright (c) 2016 Riverbank Computing Limited -# -# This file is part of PyQt5. -# -# This file may be used under the terms of the GNU General Public License -# version 3.0 as published by the Free Software Foundation and appearing in -# the file LICENSE included in the packaging of this file. Please review the -# following information to ensure the GNU General Public License version 3.0 -# requirements will be met: http://www.gnu.org/copyleft/gpl.html. -# -# If you do not wish to use this file under the terms of the GPL version 3.0 -# then you may purchase a commercial license. For more information contact -# info@riverbankcomputing.com. -# -# This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -# WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - - -import typing -import sip - -from PyQt5 import QtWidgets -from PyQt5 import QtMultimedia -from PyQt5 import QtCore - -# Support for QDate, QDateTime and QTime. -import datetime - -# Convenient type aliases. -PYQT_SIGNAL = typing.Union[QtCore.pyqtSignal, QtCore.pyqtBoundSignal] -PYQT_SLOT = typing.Union[typing.Callable[..., None], QtCore.pyqtBoundSignal] - -# Convenient aliases for complicated OpenGL types. -PYQT_OPENGL_ARRAY = typing.Union[typing.Sequence[int], typing.Sequence[float], - sip.Buffer, None] -PYQT_OPENGL_BOUND_ARRAY = typing.Union[typing.Sequence[int], - typing.Sequence[float], sip.Buffer, int, None] - - -class QVideoWidget(QtWidgets.QWidget, QtMultimedia.QMediaBindableInterface): - - def __init__(self, parent: typing.Optional[QtWidgets.QWidget] = ...) -> None: ... - - def setMediaObject(self, object: QtMultimedia.QMediaObject) -> bool: ... - def paintEvent(self, event: QtGui.QPaintEvent) -> None: ... - def moveEvent(self, event: QtGui.QMoveEvent) -> None: ... - def resizeEvent(self, event: QtGui.QResizeEvent) -> None: ... - def hideEvent(self, event: QtGui.QHideEvent) -> None: ... - def showEvent(self, event: QtGui.QShowEvent) -> None: ... - def event(self, event: QtCore.QEvent) -> bool: ... - def saturationChanged(self, saturation: int) -> None: ... - def hueChanged(self, hue: int) -> None: ... - def contrastChanged(self, contrast: int) -> None: ... - def brightnessChanged(self, brightness: int) -> None: ... - def fullScreenChanged(self, fullScreen: bool) -> None: ... - def setSaturation(self, saturation: int) -> None: ... - def setHue(self, hue: int) -> None: ... - def setContrast(self, contrast: int) -> None: ... - def setBrightness(self, brightness: int) -> None: ... - def setAspectRatioMode(self, mode: QtCore.Qt.AspectRatioMode) -> None: ... - def setFullScreen(self, fullScreen: bool) -> None: ... - def sizeHint(self) -> QtCore.QSize: ... - def saturation(self) -> int: ... - def hue(self) -> int: ... - def contrast(self) -> int: ... - def brightness(self) -> int: ... - def aspectRatioMode(self) -> QtCore.Qt.AspectRatioMode: ... - def mediaObject(self) -> QtMultimedia.QMediaObject: ... - - -class QCameraViewfinder(QVideoWidget): - - def __init__(self, parent: typing.Optional[QtWidgets.QWidget] = ...) -> None: ... - - def setMediaObject(self, object: QtMultimedia.QMediaObject) -> bool: ... - def mediaObject(self) -> QtMultimedia.QMediaObject: ... - - -class QGraphicsVideoItem(QtWidgets.QGraphicsObject, QtMultimedia.QMediaBindableInterface): - - def __init__(self, parent: typing.Optional[QtWidgets.QGraphicsItem] = ...) -> None: ... - - def setMediaObject(self, object: QtMultimedia.QMediaObject) -> bool: ... - def itemChange(self, change: QtWidgets.QGraphicsItem.GraphicsItemChange, value: typing.Any) -> typing.Any: ... - def timerEvent(self, event: QtCore.QTimerEvent) -> None: ... - def nativeSizeChanged(self, size: QtCore.QSizeF) -> None: ... - def paint(self, painter: QtGui.QPainter, option: QtWidgets.QStyleOptionGraphicsItem, widget: typing.Optional[QtWidgets.QWidget] = ...) -> None: ... - def boundingRect(self) -> QtCore.QRectF: ... - def nativeSize(self) -> QtCore.QSizeF: ... - def setSize(self, size: QtCore.QSizeF) -> None: ... - def size(self) -> QtCore.QSizeF: ... - def setOffset(self, offset: typing.Union[QtCore.QPointF, QtCore.QPoint]) -> None: ... - def offset(self) -> QtCore.QPointF: ... - def setAspectRatioMode(self, mode: QtCore.Qt.AspectRatioMode) -> None: ... - def aspectRatioMode(self) -> QtCore.Qt.AspectRatioMode: ... - def mediaObject(self) -> QtMultimedia.QMediaObject: ... diff -Nru uranium-3.3.0/stubs/PyQt5/QtNetwork.pyi uranium-4.4.1/stubs/PyQt5/QtNetwork.pyi --- uranium-3.3.0/stubs/PyQt5/QtNetwork.pyi 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/stubs/PyQt5/QtNetwork.pyi 1970-01-01 00:00:00.000000000 +0000 @@ -1,1760 +0,0 @@ -# The PEP 484 type hints stub file for the QtNetwork module. -# -# Generated by SIP 4.18.1 -# -# Copyright (c) 2016 Riverbank Computing Limited -# -# This file is part of PyQt5. -# -# This file may be used under the terms of the GNU General Public License -# version 3.0 as published by the Free Software Foundation and appearing in -# the file LICENSE included in the packaging of this file. Please review the -# following information to ensure the GNU General Public License version 3.0 -# requirements will be met: http://www.gnu.org/copyleft/gpl.html. -# -# If you do not wish to use this file under the terms of the GPL version 3.0 -# then you may purchase a commercial license. For more information contact -# info@riverbankcomputing.com. -# -# This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -# WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - - -import typing -import sip - -from PyQt5 import QtCore - -# Support for QDate, QDateTime and QTime. -import datetime - -# Convenient type aliases. -PYQT_SIGNAL = typing.Union[QtCore.pyqtSignal, QtCore.pyqtBoundSignal] -PYQT_SLOT = typing.Union[typing.Callable[..., None], QtCore.pyqtBoundSignal] - - -class QNetworkCacheMetaData(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, other: 'QNetworkCacheMetaData') -> None: ... - - def swap(self, other: 'QNetworkCacheMetaData') -> None: ... - def setAttributes(self, attributes: typing.Dict['QNetworkRequest.Attribute', typing.Any]) -> None: ... - def attributes(self) -> typing.Dict['QNetworkRequest.Attribute', typing.Any]: ... - def setSaveToDisk(self, allow: bool) -> None: ... - def saveToDisk(self) -> bool: ... - def setExpirationDate(self, dateTime: typing.Union[QtCore.QDateTime, datetime.datetime]) -> None: ... - def expirationDate(self) -> QtCore.QDateTime: ... - def setLastModified(self, dateTime: typing.Union[QtCore.QDateTime, datetime.datetime]) -> None: ... - def lastModified(self) -> QtCore.QDateTime: ... - def setRawHeaders(self, headers: typing.Any) -> None: ... - def rawHeaders(self) -> typing.Any: ... - def setUrl(self, url: QtCore.QUrl) -> None: ... - def url(self) -> QtCore.QUrl: ... - def isValid(self) -> bool: ... - - -class QAbstractNetworkCache(QtCore.QObject): - - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def clear(self) -> None: ... - def insert(self, device: QtCore.QIODevice) -> None: ... - def prepare(self, metaData: QNetworkCacheMetaData) -> QtCore.QIODevice: ... - def cacheSize(self) -> int: ... - def remove(self, url: QtCore.QUrl) -> bool: ... - def data(self, url: QtCore.QUrl) -> QtCore.QIODevice: ... - def updateMetaData(self, metaData: QNetworkCacheMetaData) -> None: ... - def metaData(self, url: QtCore.QUrl) -> QNetworkCacheMetaData: ... - - -class QAbstractSocket(QtCore.QIODevice): - - class PauseMode(int): ... - PauseNever = ... # type: 'QAbstractSocket.PauseMode' - PauseOnSslErrors = ... # type: 'QAbstractSocket.PauseMode' - - class BindFlag(int): ... - DefaultForPlatform = ... # type: 'QAbstractSocket.BindFlag' - ShareAddress = ... # type: 'QAbstractSocket.BindFlag' - DontShareAddress = ... # type: 'QAbstractSocket.BindFlag' - ReuseAddressHint = ... # type: 'QAbstractSocket.BindFlag' - - class SocketOption(int): ... - LowDelayOption = ... # type: 'QAbstractSocket.SocketOption' - KeepAliveOption = ... # type: 'QAbstractSocket.SocketOption' - MulticastTtlOption = ... # type: 'QAbstractSocket.SocketOption' - MulticastLoopbackOption = ... # type: 'QAbstractSocket.SocketOption' - TypeOfServiceOption = ... # type: 'QAbstractSocket.SocketOption' - SendBufferSizeSocketOption = ... # type: 'QAbstractSocket.SocketOption' - ReceiveBufferSizeSocketOption = ... # type: 'QAbstractSocket.SocketOption' - - class SocketState(int): ... - UnconnectedState = ... # type: 'QAbstractSocket.SocketState' - HostLookupState = ... # type: 'QAbstractSocket.SocketState' - ConnectingState = ... # type: 'QAbstractSocket.SocketState' - ConnectedState = ... # type: 'QAbstractSocket.SocketState' - BoundState = ... # type: 'QAbstractSocket.SocketState' - ListeningState = ... # type: 'QAbstractSocket.SocketState' - ClosingState = ... # type: 'QAbstractSocket.SocketState' - - class SocketError(int): ... - ConnectionRefusedError = ... # type: 'QAbstractSocket.SocketError' - RemoteHostClosedError = ... # type: 'QAbstractSocket.SocketError' - HostNotFoundError = ... # type: 'QAbstractSocket.SocketError' - SocketAccessError = ... # type: 'QAbstractSocket.SocketError' - SocketResourceError = ... # type: 'QAbstractSocket.SocketError' - SocketTimeoutError = ... # type: 'QAbstractSocket.SocketError' - DatagramTooLargeError = ... # type: 'QAbstractSocket.SocketError' - NetworkError = ... # type: 'QAbstractSocket.SocketError' - AddressInUseError = ... # type: 'QAbstractSocket.SocketError' - SocketAddressNotAvailableError = ... # type: 'QAbstractSocket.SocketError' - UnsupportedSocketOperationError = ... # type: 'QAbstractSocket.SocketError' - UnfinishedSocketOperationError = ... # type: 'QAbstractSocket.SocketError' - ProxyAuthenticationRequiredError = ... # type: 'QAbstractSocket.SocketError' - SslHandshakeFailedError = ... # type: 'QAbstractSocket.SocketError' - ProxyConnectionRefusedError = ... # type: 'QAbstractSocket.SocketError' - ProxyConnectionClosedError = ... # type: 'QAbstractSocket.SocketError' - ProxyConnectionTimeoutError = ... # type: 'QAbstractSocket.SocketError' - ProxyNotFoundError = ... # type: 'QAbstractSocket.SocketError' - ProxyProtocolError = ... # type: 'QAbstractSocket.SocketError' - OperationError = ... # type: 'QAbstractSocket.SocketError' - SslInternalError = ... # type: 'QAbstractSocket.SocketError' - SslInvalidUserDataError = ... # type: 'QAbstractSocket.SocketError' - TemporaryError = ... # type: 'QAbstractSocket.SocketError' - UnknownSocketError = ... # type: 'QAbstractSocket.SocketError' - - class NetworkLayerProtocol(int): ... - IPv4Protocol = ... # type: 'QAbstractSocket.NetworkLayerProtocol' - IPv6Protocol = ... # type: 'QAbstractSocket.NetworkLayerProtocol' - AnyIPProtocol = ... # type: 'QAbstractSocket.NetworkLayerProtocol' - UnknownNetworkLayerProtocol = ... # type: 'QAbstractSocket.NetworkLayerProtocol' - - class SocketType(int): ... - TcpSocket = ... # type: 'QAbstractSocket.SocketType' - UdpSocket = ... # type: 'QAbstractSocket.SocketType' - UnknownSocketType = ... # type: 'QAbstractSocket.SocketType' - - class BindMode(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QAbstractSocket.BindMode', 'QAbstractSocket.BindFlag']) -> None: ... - @typing.overload - def __init__(self, a0: 'QAbstractSocket.BindMode') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QAbstractSocket.BindMode': ... - def __int__(self) -> int: ... - - class PauseModes(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QAbstractSocket.PauseModes', 'QAbstractSocket.PauseMode']) -> None: ... - @typing.overload - def __init__(self, a0: 'QAbstractSocket.PauseModes') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QAbstractSocket.PauseModes': ... - def __int__(self) -> int: ... - - def __init__(self, socketType: 'QAbstractSocket.SocketType', parent: QtCore.QObject) -> None: ... - - @typing.overload - def bind(self, address: typing.Union['QHostAddress', 'QHostAddress.SpecialAddress'], port: int = ..., mode: typing.Union['QAbstractSocket.BindMode', 'QAbstractSocket.BindFlag'] = ...) -> bool: ... - @typing.overload - def bind(self, port: int = ..., mode: typing.Union['QAbstractSocket.BindMode', 'QAbstractSocket.BindFlag'] = ...) -> bool: ... - def setPauseMode(self, pauseMode: typing.Union['QAbstractSocket.PauseModes', 'QAbstractSocket.PauseMode']) -> None: ... - def pauseMode(self) -> 'QAbstractSocket.PauseModes': ... - def resume(self) -> None: ... - def socketOption(self, option: 'QAbstractSocket.SocketOption') -> typing.Any: ... - def setSocketOption(self, option: 'QAbstractSocket.SocketOption', value: typing.Any) -> None: ... - def setPeerName(self, name: str) -> None: ... - def setPeerAddress(self, address: typing.Union['QHostAddress', 'QHostAddress.SpecialAddress']) -> None: ... - def setPeerPort(self, port: int) -> None: ... - def setLocalAddress(self, address: typing.Union['QHostAddress', 'QHostAddress.SpecialAddress']) -> None: ... - def setLocalPort(self, port: int) -> None: ... - def setSocketError(self, socketError: 'QAbstractSocket.SocketError') -> None: ... - def setSocketState(self, state: 'QAbstractSocket.SocketState') -> None: ... - def writeData(self, data: bytes) -> int: ... - def readLineData(self, maxlen: int) -> bytes: ... - def readData(self, maxlen: int) -> bytes: ... - def proxyAuthenticationRequired(self, proxy: 'QNetworkProxy', authenticator: 'QAuthenticator') -> None: ... - def stateChanged(self, a0: 'QAbstractSocket.SocketState') -> None: ... - def disconnected(self) -> None: ... - def connected(self) -> None: ... - def hostFound(self) -> None: ... - def proxy(self) -> 'QNetworkProxy': ... - def setProxy(self, networkProxy: 'QNetworkProxy') -> None: ... - def waitForDisconnected(self, msecs: int = ...) -> bool: ... - def waitForBytesWritten(self, msecs: int = ...) -> bool: ... - def waitForReadyRead(self, msecs: int = ...) -> bool: ... - def waitForConnected(self, msecs: int = ...) -> bool: ... - def flush(self) -> bool: ... - def atEnd(self) -> bool: ... - def isSequential(self) -> bool: ... - def close(self) -> None: ... - @typing.overload - def error(self) -> 'QAbstractSocket.SocketError': ... - @typing.overload - def error(self, a0: 'QAbstractSocket.SocketError') -> None: ... - def state(self) -> 'QAbstractSocket.SocketState': ... - def socketType(self) -> 'QAbstractSocket.SocketType': ... - def socketDescriptor(self) -> sip.voidptr: ... - def setSocketDescriptor(self, socketDescriptor: sip.voidptr, state: 'QAbstractSocket.SocketState' = ..., mode: typing.Union[QtCore.QIODevice.OpenMode, QtCore.QIODevice.OpenModeFlag] = ...) -> bool: ... - def abort(self) -> None: ... - def setReadBufferSize(self, size: int) -> None: ... - def readBufferSize(self) -> int: ... - def peerName(self) -> str: ... - def peerAddress(self) -> 'QHostAddress': ... - def peerPort(self) -> int: ... - def localAddress(self) -> 'QHostAddress': ... - def localPort(self) -> int: ... - def canReadLine(self) -> bool: ... - def bytesToWrite(self) -> int: ... - def bytesAvailable(self) -> int: ... - def isValid(self) -> bool: ... - def disconnectFromHost(self) -> None: ... - @typing.overload - def connectToHost(self, hostName: str, port: int, mode: typing.Union[QtCore.QIODevice.OpenMode, QtCore.QIODevice.OpenModeFlag] = ..., protocol: 'QAbstractSocket.NetworkLayerProtocol' = ...) -> None: ... - @typing.overload - def connectToHost(self, address: typing.Union['QHostAddress', 'QHostAddress.SpecialAddress'], port: int, mode: typing.Union[QtCore.QIODevice.OpenMode, QtCore.QIODevice.OpenModeFlag] = ...) -> None: ... - - -class QAuthenticator(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, other: 'QAuthenticator') -> None: ... - - def setOption(self, opt: str, value: typing.Any) -> None: ... - def options(self) -> typing.Dict[str, typing.Any]: ... - def option(self, opt: str) -> typing.Any: ... - def isNull(self) -> bool: ... - def realm(self) -> str: ... - def setPassword(self, password: str) -> None: ... - def password(self) -> str: ... - def setUser(self, user: str) -> None: ... - def user(self) -> str: ... - - -class QDnsDomainNameRecord(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, other: 'QDnsDomainNameRecord') -> None: ... - - def value(self) -> str: ... - def timeToLive(self) -> int: ... - def name(self) -> str: ... - def swap(self, other: 'QDnsDomainNameRecord') -> None: ... - - -class QDnsHostAddressRecord(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, other: 'QDnsHostAddressRecord') -> None: ... - - def value(self) -> 'QHostAddress': ... - def timeToLive(self) -> int: ... - def name(self) -> str: ... - def swap(self, other: 'QDnsHostAddressRecord') -> None: ... - - -class QDnsMailExchangeRecord(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, other: 'QDnsMailExchangeRecord') -> None: ... - - def timeToLive(self) -> int: ... - def preference(self) -> int: ... - def name(self) -> str: ... - def exchange(self) -> str: ... - def swap(self, other: 'QDnsMailExchangeRecord') -> None: ... - - -class QDnsServiceRecord(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, other: 'QDnsServiceRecord') -> None: ... - - def weight(self) -> int: ... - def timeToLive(self) -> int: ... - def target(self) -> str: ... - def priority(self) -> int: ... - def port(self) -> int: ... - def name(self) -> str: ... - def swap(self, other: 'QDnsServiceRecord') -> None: ... - - -class QDnsTextRecord(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, other: 'QDnsTextRecord') -> None: ... - - def values(self) -> typing.List[QtCore.QByteArray]: ... - def timeToLive(self) -> int: ... - def name(self) -> str: ... - def swap(self, other: 'QDnsTextRecord') -> None: ... - - -class QDnsLookup(QtCore.QObject): - - class Type(int): ... - A = ... # type: 'QDnsLookup.Type' - AAAA = ... # type: 'QDnsLookup.Type' - ANY = ... # type: 'QDnsLookup.Type' - CNAME = ... # type: 'QDnsLookup.Type' - MX = ... # type: 'QDnsLookup.Type' - NS = ... # type: 'QDnsLookup.Type' - PTR = ... # type: 'QDnsLookup.Type' - SRV = ... # type: 'QDnsLookup.Type' - TXT = ... # type: 'QDnsLookup.Type' - - class Error(int): ... - NoError = ... # type: 'QDnsLookup.Error' - ResolverError = ... # type: 'QDnsLookup.Error' - OperationCancelledError = ... # type: 'QDnsLookup.Error' - InvalidRequestError = ... # type: 'QDnsLookup.Error' - InvalidReplyError = ... # type: 'QDnsLookup.Error' - ServerFailureError = ... # type: 'QDnsLookup.Error' - ServerRefusedError = ... # type: 'QDnsLookup.Error' - NotFoundError = ... # type: 'QDnsLookup.Error' - - @typing.overload - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - @typing.overload - def __init__(self, type: 'QDnsLookup.Type', name: str, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - @typing.overload - def __init__(self, type: 'QDnsLookup.Type', name: str, nameserver: typing.Union['QHostAddress', 'QHostAddress.SpecialAddress'], parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def nameserverChanged(self, nameserver: typing.Union['QHostAddress', 'QHostAddress.SpecialAddress']) -> None: ... - def setNameserver(self, nameserver: typing.Union['QHostAddress', 'QHostAddress.SpecialAddress']) -> None: ... - def nameserver(self) -> 'QHostAddress': ... - def typeChanged(self, type: 'QDnsLookup.Type') -> None: ... - def nameChanged(self, name: str) -> None: ... - def finished(self) -> None: ... - def lookup(self) -> None: ... - def abort(self) -> None: ... - def textRecords(self) -> typing.Any: ... - def serviceRecords(self) -> typing.Any: ... - def pointerRecords(self) -> typing.List[QDnsDomainNameRecord]: ... - def nameServerRecords(self) -> typing.List[QDnsDomainNameRecord]: ... - def mailExchangeRecords(self) -> typing.Any: ... - def hostAddressRecords(self) -> typing.Any: ... - def canonicalNameRecords(self) -> typing.Any: ... - def setType(self, a0: 'QDnsLookup.Type') -> None: ... - def type(self) -> 'QDnsLookup.Type': ... - def setName(self, name: str) -> None: ... - def name(self) -> str: ... - def isFinished(self) -> bool: ... - def errorString(self) -> str: ... - def error(self) -> 'QDnsLookup.Error': ... - - -class QHostAddress(sip.simplewrapper): - - class SpecialAddress(int): ... - Null = ... # type: 'QHostAddress.SpecialAddress' - Broadcast = ... # type: 'QHostAddress.SpecialAddress' - LocalHost = ... # type: 'QHostAddress.SpecialAddress' - LocalHostIPv6 = ... # type: 'QHostAddress.SpecialAddress' - AnyIPv4 = ... # type: 'QHostAddress.SpecialAddress' - AnyIPv6 = ... # type: 'QHostAddress.SpecialAddress' - Any = ... # type: 'QHostAddress.SpecialAddress' - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, address: 'QHostAddress.SpecialAddress') -> None: ... - @typing.overload - def __init__(self, ip4Addr: int) -> None: ... - @typing.overload - def __init__(self, address: str) -> None: ... - @typing.overload - def __init__(self, ip6Addr: typing.Tuple[int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int]) -> None: ... - @typing.overload - def __init__(self, copy: typing.Union['QHostAddress', 'QHostAddress.SpecialAddress']) -> None: ... - - def isMulticast(self) -> bool: ... - def swap(self, other: 'QHostAddress') -> None: ... - @staticmethod - def parseSubnet(subnet: str) -> typing.Tuple['QHostAddress', int]: ... - def isLoopback(self) -> bool: ... - @typing.overload - def isInSubnet(self, subnet: typing.Union['QHostAddress', 'QHostAddress.SpecialAddress'], netmask: int) -> bool: ... - @typing.overload - def isInSubnet(self, subnet: typing.Any) -> bool: ... - def __hash__(self) -> int: ... - def clear(self) -> None: ... - def isNull(self) -> bool: ... - def setScopeId(self, id: str) -> None: ... - def scopeId(self) -> str: ... - def toString(self) -> str: ... - def toIPv6Address(self) -> typing.Tuple[int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int]: ... - def toIPv4Address(self) -> int: ... - def protocol(self) -> QAbstractSocket.NetworkLayerProtocol: ... - # @typing.overload - # def setAddress(self, ip4Addr: int) -> None: ... - # @typing.overload - # def setAddress(self, address: str) -> bool: ... - # @typing.overload - # def setAddress(self, ip6Addr: typing.Tuple[int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int]) -> None: ... - - -class QHostInfo(sip.simplewrapper): - - class HostInfoError(int): ... - NoError = ... # type: 'QHostInfo.HostInfoError' - HostNotFound = ... # type: 'QHostInfo.HostInfoError' - UnknownError = ... # type: 'QHostInfo.HostInfoError' - - @typing.overload - def __init__(self, id: int = ...) -> None: ... - @typing.overload - def __init__(self, d: 'QHostInfo') -> None: ... - - @staticmethod - def localDomainName() -> str: ... - @staticmethod - def localHostName() -> str: ... - @staticmethod - def fromName(name: str) -> 'QHostInfo': ... - @staticmethod - def abortHostLookup(lookupId: int) -> None: ... - @staticmethod - def lookupHost(name: str, slot: PYQT_SLOT) -> int: ... - def lookupId(self) -> int: ... - def setLookupId(self, id: int) -> None: ... - def setErrorString(self, errorString: str) -> None: ... - def errorString(self) -> str: ... - def setError(self, error: 'QHostInfo.HostInfoError') -> None: ... - def error(self) -> 'QHostInfo.HostInfoError': ... - def setAddresses(self, addresses: typing.Iterable[typing.Union[QHostAddress, QHostAddress.SpecialAddress]]) -> None: ... - def addresses(self) -> typing.Any: ... - def setHostName(self, name: str) -> None: ... - def hostName(self) -> str: ... - - -class QHttpPart(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, other: 'QHttpPart') -> None: ... - - def swap(self, other: 'QHttpPart') -> None: ... - def setBodyDevice(self, device: QtCore.QIODevice) -> None: ... - def setBody(self, body: typing.Union[QtCore.QByteArray, bytes, bytearray]) -> None: ... - def setRawHeader(self, headerName: typing.Union[QtCore.QByteArray, bytes, bytearray], headerValue: typing.Union[QtCore.QByteArray, bytes, bytearray]) -> None: ... - def setHeader(self, header: 'QNetworkRequest.KnownHeaders', value: typing.Any) -> None: ... - - -class QHttpMultiPart(QtCore.QObject): - - class ContentType(int): ... - MixedType = ... # type: 'QHttpMultiPart.ContentType' - RelatedType = ... # type: 'QHttpMultiPart.ContentType' - FormDataType = ... # type: 'QHttpMultiPart.ContentType' - AlternativeType = ... # type: 'QHttpMultiPart.ContentType' - - @typing.overload - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - @typing.overload - def __init__(self, contentType: 'QHttpMultiPart.ContentType', parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def setBoundary(self, boundary: typing.Union[QtCore.QByteArray, bytes, bytearray]) -> None: ... - def boundary(self) -> QtCore.QByteArray: ... - def setContentType(self, contentType: 'QHttpMultiPart.ContentType') -> None: ... - def append(self, httpPart: QHttpPart) -> None: ... - - -class QLocalServer(QtCore.QObject): - - class SocketOption(int): ... - UserAccessOption = ... # type: 'QLocalServer.SocketOption' - GroupAccessOption = ... # type: 'QLocalServer.SocketOption' - OtherAccessOption = ... # type: 'QLocalServer.SocketOption' - WorldAccessOption = ... # type: 'QLocalServer.SocketOption' - - class SocketOptions(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QLocalServer.SocketOptions', 'QLocalServer.SocketOption']) -> None: ... - @typing.overload - def __init__(self, a0: 'QLocalServer.SocketOptions') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QLocalServer.SocketOptions': ... - def __int__(self) -> int: ... - - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def socketOptions(self) -> 'QLocalServer.SocketOptions': ... - def setSocketOptions(self, options: typing.Union['QLocalServer.SocketOptions', 'QLocalServer.SocketOption']) -> None: ... - def incomingConnection(self, socketDescriptor: sip.voidptr) -> None: ... - def newConnection(self) -> None: ... - @staticmethod - def removeServer(name: str) -> bool: ... - def waitForNewConnection(self, msecs: int = ...) -> typing.Tuple[bool, bool]: ... - def setMaxPendingConnections(self, numConnections: int) -> None: ... - def serverError(self) -> QAbstractSocket.SocketError: ... - def fullServerName(self) -> str: ... - def serverName(self) -> str: ... - def nextPendingConnection(self) -> 'QLocalSocket': ... - def maxPendingConnections(self) -> int: ... - @typing.overload - def listen(self, name: str) -> bool: ... - @typing.overload - def listen(self, socketDescriptor: sip.voidptr) -> bool: ... - def isListening(self) -> bool: ... - def hasPendingConnections(self) -> bool: ... - def errorString(self) -> str: ... - def close(self) -> None: ... - - -class QLocalSocket(QtCore.QIODevice): - - class LocalSocketState(int): ... - UnconnectedState = ... # type: 'QLocalSocket.LocalSocketState' - ConnectingState = ... # type: 'QLocalSocket.LocalSocketState' - ConnectedState = ... # type: 'QLocalSocket.LocalSocketState' - ClosingState = ... # type: 'QLocalSocket.LocalSocketState' - - class LocalSocketError(int): ... - ConnectionRefusedError = ... # type: 'QLocalSocket.LocalSocketError' - PeerClosedError = ... # type: 'QLocalSocket.LocalSocketError' - ServerNotFoundError = ... # type: 'QLocalSocket.LocalSocketError' - SocketAccessError = ... # type: 'QLocalSocket.LocalSocketError' - SocketResourceError = ... # type: 'QLocalSocket.LocalSocketError' - SocketTimeoutError = ... # type: 'QLocalSocket.LocalSocketError' - DatagramTooLargeError = ... # type: 'QLocalSocket.LocalSocketError' - ConnectionError = ... # type: 'QLocalSocket.LocalSocketError' - UnsupportedSocketOperationError = ... # type: 'QLocalSocket.LocalSocketError' - OperationError = ... # type: 'QLocalSocket.LocalSocketError' - UnknownSocketError = ... # type: 'QLocalSocket.LocalSocketError' - - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def writeData(self, a0: bytes) -> int: ... - def readData(self, maxlen: int) -> bytes: ... - def stateChanged(self, socketState: 'QLocalSocket.LocalSocketState') -> None: ... - def disconnected(self) -> None: ... - def connected(self) -> None: ... - def waitForReadyRead(self, msecs: int = ...) -> bool: ... - def waitForDisconnected(self, msecs: int = ...) -> bool: ... - def waitForConnected(self, msecs: int = ...) -> bool: ... - def waitForBytesWritten(self, msecs: int = ...) -> bool: ... - def state(self) -> 'QLocalSocket.LocalSocketState': ... - def socketDescriptor(self) -> sip.voidptr: ... - def setSocketDescriptor(self, socketDescriptor: sip.voidptr, state: 'QLocalSocket.LocalSocketState' = ..., mode: typing.Union[QtCore.QIODevice.OpenMode, QtCore.QIODevice.OpenModeFlag] = ...) -> bool: ... - def setReadBufferSize(self, size: int) -> None: ... - def readBufferSize(self) -> int: ... - def isValid(self) -> bool: ... - def flush(self) -> bool: ... - @typing.overload - def error(self) -> 'QLocalSocket.LocalSocketError': ... - @typing.overload - def error(self, socketError: 'QLocalSocket.LocalSocketError') -> None: ... - def close(self) -> None: ... - def canReadLine(self) -> bool: ... - def bytesToWrite(self) -> int: ... - def bytesAvailable(self) -> int: ... - def isSequential(self) -> bool: ... - def abort(self) -> None: ... - def fullServerName(self) -> str: ... - def setServerName(self, name: str) -> None: ... - def serverName(self) -> str: ... - def open(self, mode: typing.Union[QtCore.QIODevice.OpenMode, QtCore.QIODevice.OpenModeFlag] = ...) -> bool: ... - def disconnectFromServer(self) -> None: ... - @typing.overload - def connectToServer(self, name: str, mode: typing.Union[QtCore.QIODevice.OpenMode, QtCore.QIODevice.OpenModeFlag] = ...) -> None: ... - @typing.overload - def connectToServer(self, mode: typing.Union[QtCore.QIODevice.OpenMode, QtCore.QIODevice.OpenModeFlag] = ...) -> None: ... - - -class QNetworkAccessManager(QtCore.QObject): - - class NetworkAccessibility(int): ... - UnknownAccessibility = ... # type: 'QNetworkAccessManager.NetworkAccessibility' - NotAccessible = ... # type: 'QNetworkAccessManager.NetworkAccessibility' - Accessible = ... # type: 'QNetworkAccessManager.NetworkAccessibility' - - class Operation(int): ... - HeadOperation = ... # type: 'QNetworkAccessManager.Operation' - GetOperation = ... # type: 'QNetworkAccessManager.Operation' - PutOperation = ... # type: 'QNetworkAccessManager.Operation' - PostOperation = ... # type: 'QNetworkAccessManager.Operation' - DeleteOperation = ... # type: 'QNetworkAccessManager.Operation' - CustomOperation = ... # type: 'QNetworkAccessManager.Operation' - - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def supportedSchemesImplementation(self) -> typing.List[str]: ... - def connectToHost(self, hostName: str, port: int = ...) -> None: ... - def connectToHostEncrypted(self, hostName: str, port: int = ..., sslConfiguration: 'QSslConfiguration' = ...) -> None: ... - def supportedSchemes(self) -> typing.List[str]: ... - def clearAccessCache(self) -> None: ... - def networkAccessible(self) -> 'QNetworkAccessManager.NetworkAccessibility': ... - def setNetworkAccessible(self, accessible: 'QNetworkAccessManager.NetworkAccessibility') -> None: ... - def activeConfiguration(self) -> 'QNetworkConfiguration': ... - def configuration(self) -> 'QNetworkConfiguration': ... - def setConfiguration(self, config: 'QNetworkConfiguration') -> None: ... - def sendCustomRequest(self, request: 'QNetworkRequest', verb: typing.Union[QtCore.QByteArray, bytes, bytearray], data: typing.Optional[QtCore.QIODevice] = ...) -> 'QNetworkReply': ... - def deleteResource(self, request: 'QNetworkRequest') -> 'QNetworkReply': ... - def setCache(self, cache: QAbstractNetworkCache) -> None: ... - def cache(self) -> QAbstractNetworkCache: ... - def setProxyFactory(self, factory: 'QNetworkProxyFactory') -> None: ... - def proxyFactory(self) -> 'QNetworkProxyFactory': ... - def createRequest(self, op: 'QNetworkAccessManager.Operation', request: 'QNetworkRequest', device: typing.Optional[QtCore.QIODevice] = ...) -> 'QNetworkReply': ... - def preSharedKeyAuthenticationRequired(self, reply: 'QNetworkReply', authenticator: 'QSslPreSharedKeyAuthenticator') -> None: ... - def networkAccessibleChanged(self, accessible: 'QNetworkAccessManager.NetworkAccessibility') -> None: ... - def sslErrors(self, reply: 'QNetworkReply', errors: typing.Any) -> None: ... - def encrypted(self, reply: 'QNetworkReply') -> None: ... - def finished(self, reply: 'QNetworkReply') -> None: ... - def authenticationRequired(self, reply: 'QNetworkReply', authenticator: QAuthenticator) -> None: ... - def proxyAuthenticationRequired(self, proxy: 'QNetworkProxy', authenticator: QAuthenticator) -> None: ... - @typing.overload - def put(self, request: 'QNetworkRequest', data: QtCore.QIODevice) -> 'QNetworkReply': ... - @typing.overload - def put(self, request: 'QNetworkRequest', data: typing.Union[QtCore.QByteArray, bytes, bytearray]) -> 'QNetworkReply': ... - @typing.overload - def put(self, request: 'QNetworkRequest', multiPart: QHttpMultiPart) -> 'QNetworkReply': ... - @typing.overload - def post(self, request: 'QNetworkRequest', data: QtCore.QIODevice) -> 'QNetworkReply': ... - @typing.overload - def post(self, request: 'QNetworkRequest', data: typing.Union[QtCore.QByteArray, bytes, bytearray]) -> 'QNetworkReply': ... - @typing.overload - def post(self, request: 'QNetworkRequest', multiPart: QHttpMultiPart) -> 'QNetworkReply': ... - def get(self, request: 'QNetworkRequest') -> 'QNetworkReply': ... - def head(self, request: 'QNetworkRequest') -> 'QNetworkReply': ... - def setCookieJar(self, cookieJar: 'QNetworkCookieJar') -> None: ... - def cookieJar(self) -> 'QNetworkCookieJar': ... - def setProxy(self, proxy: 'QNetworkProxy') -> None: ... - def proxy(self) -> 'QNetworkProxy': ... - - -class QNetworkConfigurationManager(QtCore.QObject): - - class Capability(int): ... - CanStartAndStopInterfaces = ... # type: 'QNetworkConfigurationManager.Capability' - DirectConnectionRouting = ... # type: 'QNetworkConfigurationManager.Capability' - SystemSessionSupport = ... # type: 'QNetworkConfigurationManager.Capability' - ApplicationLevelRoaming = ... # type: 'QNetworkConfigurationManager.Capability' - ForcedRoaming = ... # type: 'QNetworkConfigurationManager.Capability' - DataStatistics = ... # type: 'QNetworkConfigurationManager.Capability' - NetworkSessionRequired = ... # type: 'QNetworkConfigurationManager.Capability' - - class Capabilities(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QNetworkConfigurationManager.Capabilities', 'QNetworkConfigurationManager.Capability']) -> None: ... - @typing.overload - def __init__(self, a0: 'QNetworkConfigurationManager.Capabilities') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QNetworkConfigurationManager.Capabilities': ... - def __int__(self) -> int: ... - - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def updateCompleted(self) -> None: ... - def onlineStateChanged(self, isOnline: bool) -> None: ... - def configurationChanged(self, config: 'QNetworkConfiguration') -> None: ... - def configurationRemoved(self, config: 'QNetworkConfiguration') -> None: ... - def configurationAdded(self, config: 'QNetworkConfiguration') -> None: ... - def isOnline(self) -> bool: ... - def updateConfigurations(self) -> None: ... - def configurationFromIdentifier(self, identifier: str) -> 'QNetworkConfiguration': ... - def allConfigurations(self, flags: typing.Union['QNetworkConfiguration.StateFlags', 'QNetworkConfiguration.StateFlag'] = ...) -> typing.Any: ... - def defaultConfiguration(self) -> 'QNetworkConfiguration': ... - def capabilities(self) -> 'QNetworkConfigurationManager.Capabilities': ... - - -class QNetworkConfiguration(sip.simplewrapper): - - class BearerType(int): ... - BearerUnknown = ... # type: 'QNetworkConfiguration.BearerType' - BearerEthernet = ... # type: 'QNetworkConfiguration.BearerType' - BearerWLAN = ... # type: 'QNetworkConfiguration.BearerType' - Bearer2G = ... # type: 'QNetworkConfiguration.BearerType' - BearerCDMA2000 = ... # type: 'QNetworkConfiguration.BearerType' - BearerWCDMA = ... # type: 'QNetworkConfiguration.BearerType' - BearerHSPA = ... # type: 'QNetworkConfiguration.BearerType' - BearerBluetooth = ... # type: 'QNetworkConfiguration.BearerType' - BearerWiMAX = ... # type: 'QNetworkConfiguration.BearerType' - BearerEVDO = ... # type: 'QNetworkConfiguration.BearerType' - BearerLTE = ... # type: 'QNetworkConfiguration.BearerType' - Bearer3G = ... # type: 'QNetworkConfiguration.BearerType' - Bearer4G = ... # type: 'QNetworkConfiguration.BearerType' - - class StateFlag(int): ... - Undefined = ... # type: 'QNetworkConfiguration.StateFlag' - Defined = ... # type: 'QNetworkConfiguration.StateFlag' - Discovered = ... # type: 'QNetworkConfiguration.StateFlag' - Active = ... # type: 'QNetworkConfiguration.StateFlag' - - class Purpose(int): ... - UnknownPurpose = ... # type: 'QNetworkConfiguration.Purpose' - PublicPurpose = ... # type: 'QNetworkConfiguration.Purpose' - PrivatePurpose = ... # type: 'QNetworkConfiguration.Purpose' - ServiceSpecificPurpose = ... # type: 'QNetworkConfiguration.Purpose' - - class Type(int): ... - InternetAccessPoint = ... # type: 'QNetworkConfiguration.Type' - ServiceNetwork = ... # type: 'QNetworkConfiguration.Type' - UserChoice = ... # type: 'QNetworkConfiguration.Type' - Invalid = ... # type: 'QNetworkConfiguration.Type' - - class StateFlags(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QNetworkConfiguration.StateFlags', 'QNetworkConfiguration.StateFlag']) -> None: ... - @typing.overload - def __init__(self, a0: 'QNetworkConfiguration.StateFlags') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QNetworkConfiguration.StateFlags': ... - def __int__(self) -> int: ... - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, other: 'QNetworkConfiguration') -> None: ... - - def swap(self, other: 'QNetworkConfiguration') -> None: ... - def isValid(self) -> bool: ... - def name(self) -> str: ... - def children(self) -> typing.List['QNetworkConfiguration']: ... - def isRoamingAvailable(self) -> bool: ... - def identifier(self) -> str: ... - def bearerTypeFamily(self) -> 'QNetworkConfiguration.BearerType': ... - def bearerTypeName(self) -> str: ... - def bearerType(self) -> 'QNetworkConfiguration.BearerType': ... - def purpose(self) -> 'QNetworkConfiguration.Purpose': ... - def type(self) -> 'QNetworkConfiguration.Type': ... - def state(self) -> 'QNetworkConfiguration.StateFlags': ... - - -class QNetworkCookie(sip.simplewrapper): - - class RawForm(int): ... - NameAndValueOnly = ... # type: 'QNetworkCookie.RawForm' - Full = ... # type: 'QNetworkCookie.RawForm' - - @typing.overload - def __init__(self, name: typing.Union[QtCore.QByteArray, bytes, bytearray] = ..., value: typing.Union[QtCore.QByteArray, bytes, bytearray] = ...) -> None: ... - @typing.overload - def __init__(self, other: 'QNetworkCookie') -> None: ... - - def normalize(self, url: QtCore.QUrl) -> None: ... - def hasSameIdentifier(self, other: 'QNetworkCookie') -> bool: ... - def swap(self, other: 'QNetworkCookie') -> None: ... - def setHttpOnly(self, enable: bool) -> None: ... - def isHttpOnly(self) -> bool: ... - @staticmethod - def parseCookies(cookieString: typing.Union[QtCore.QByteArray, bytes, bytearray]) -> typing.Any: ... - def toRawForm(self, form: 'QNetworkCookie.RawForm' = ...) -> QtCore.QByteArray: ... - def setValue(self, value: typing.Union[QtCore.QByteArray, bytes, bytearray]) -> None: ... - def value(self) -> QtCore.QByteArray: ... - def setName(self, cookieName: typing.Union[QtCore.QByteArray, bytes, bytearray]) -> None: ... - def name(self) -> QtCore.QByteArray: ... - def setPath(self, path: str) -> None: ... - def path(self) -> str: ... - def setDomain(self, domain: str) -> None: ... - def domain(self) -> str: ... - def setExpirationDate(self, date: typing.Union[QtCore.QDateTime, datetime.datetime]) -> None: ... - def expirationDate(self) -> QtCore.QDateTime: ... - def isSessionCookie(self) -> bool: ... - def setSecure(self, enable: bool) -> None: ... - def isSecure(self) -> bool: ... - - -class QNetworkCookieJar(QtCore.QObject): - - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def validateCookie(self, cookie: QNetworkCookie, url: QtCore.QUrl) -> bool: ... - def allCookies(self) -> typing.List[QNetworkCookie]: ... - def setAllCookies(self, cookieList: typing.Iterable[QNetworkCookie]) -> None: ... - def deleteCookie(self, cookie: QNetworkCookie) -> bool: ... - def updateCookie(self, cookie: QNetworkCookie) -> bool: ... - def insertCookie(self, cookie: QNetworkCookie) -> bool: ... - def setCookiesFromUrl(self, cookieList: typing.Iterable[QNetworkCookie], url: QtCore.QUrl) -> bool: ... - def cookiesForUrl(self, url: QtCore.QUrl) -> typing.List[QNetworkCookie]: ... - - -class QNetworkDiskCache(QAbstractNetworkCache): - - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def expire(self) -> int: ... - def clear(self) -> None: ... - def fileMetaData(self, fileName: str) -> QNetworkCacheMetaData: ... - def insert(self, device: QtCore.QIODevice) -> None: ... - def prepare(self, metaData: QNetworkCacheMetaData) -> QtCore.QIODevice: ... - def remove(self, url: QtCore.QUrl) -> bool: ... - def data(self, url: QtCore.QUrl) -> QtCore.QIODevice: ... - def updateMetaData(self, metaData: QNetworkCacheMetaData) -> None: ... - def metaData(self, url: QtCore.QUrl) -> QNetworkCacheMetaData: ... - def cacheSize(self) -> int: ... - def setMaximumCacheSize(self, size: int) -> None: ... - def maximumCacheSize(self) -> int: ... - def setCacheDirectory(self, cacheDir: str) -> None: ... - def cacheDirectory(self) -> str: ... - - -class QNetworkAddressEntry(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, other: 'QNetworkAddressEntry') -> None: ... - - def swap(self, other: 'QNetworkAddressEntry') -> None: ... - def setPrefixLength(self, length: int) -> None: ... - def prefixLength(self) -> int: ... - def setBroadcast(self, newBroadcast: typing.Union[QHostAddress, QHostAddress.SpecialAddress]) -> None: ... - def broadcast(self) -> QHostAddress: ... - def setNetmask(self, newNetmask: typing.Union[QHostAddress, QHostAddress.SpecialAddress]) -> None: ... - def netmask(self) -> QHostAddress: ... - def setIp(self, newIp: typing.Union[QHostAddress, QHostAddress.SpecialAddress]) -> None: ... - def ip(self) -> QHostAddress: ... - - -class QNetworkInterface(sip.simplewrapper): - - class InterfaceFlag(int): ... - IsUp = ... # type: 'QNetworkInterface.InterfaceFlag' - IsRunning = ... # type: 'QNetworkInterface.InterfaceFlag' - CanBroadcast = ... # type: 'QNetworkInterface.InterfaceFlag' - IsLoopBack = ... # type: 'QNetworkInterface.InterfaceFlag' - IsPointToPoint = ... # type: 'QNetworkInterface.InterfaceFlag' - CanMulticast = ... # type: 'QNetworkInterface.InterfaceFlag' - - class InterfaceFlags(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QNetworkInterface.InterfaceFlags', 'QNetworkInterface.InterfaceFlag']) -> None: ... - @typing.overload - def __init__(self, a0: 'QNetworkInterface.InterfaceFlags') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QNetworkInterface.InterfaceFlags': ... - def __int__(self) -> int: ... - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, other: 'QNetworkInterface') -> None: ... - - @staticmethod - def interfaceNameFromIndex(index: int) -> str: ... - @staticmethod - def interfaceIndexFromName(name: str) -> int: ... - def swap(self, other: 'QNetworkInterface') -> None: ... - def humanReadableName(self) -> str: ... - def index(self) -> int: ... - @staticmethod - def allAddresses() -> typing.List[QHostAddress]: ... - @staticmethod - def allInterfaces() -> typing.Any: ... - @staticmethod - def interfaceFromIndex(index: int) -> 'QNetworkInterface': ... - @staticmethod - def interfaceFromName(name: str) -> 'QNetworkInterface': ... - def addressEntries(self) -> typing.Any: ... - def hardwareAddress(self) -> str: ... - def flags(self) -> 'QNetworkInterface.InterfaceFlags': ... - def name(self) -> str: ... - def isValid(self) -> bool: ... - - -class QNetworkProxy(sip.simplewrapper): - - class Capability(int): ... - TunnelingCapability = ... # type: 'QNetworkProxy.Capability' - ListeningCapability = ... # type: 'QNetworkProxy.Capability' - UdpTunnelingCapability = ... # type: 'QNetworkProxy.Capability' - CachingCapability = ... # type: 'QNetworkProxy.Capability' - HostNameLookupCapability = ... # type: 'QNetworkProxy.Capability' - - class ProxyType(int): ... - DefaultProxy = ... # type: 'QNetworkProxy.ProxyType' - Socks5Proxy = ... # type: 'QNetworkProxy.ProxyType' - NoProxy = ... # type: 'QNetworkProxy.ProxyType' - HttpProxy = ... # type: 'QNetworkProxy.ProxyType' - HttpCachingProxy = ... # type: 'QNetworkProxy.ProxyType' - FtpCachingProxy = ... # type: 'QNetworkProxy.ProxyType' - - class Capabilities(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QNetworkProxy.Capabilities', 'QNetworkProxy.Capability']) -> None: ... - @typing.overload - def __init__(self, a0: 'QNetworkProxy.Capabilities') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QNetworkProxy.Capabilities': ... - def __int__(self) -> int: ... - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, type: 'QNetworkProxy.ProxyType', hostName: str = ..., port: int = ..., user: str = ..., password: str = ...) -> None: ... - @typing.overload - def __init__(self, other: 'QNetworkProxy') -> None: ... - - def setRawHeader(self, headerName: typing.Union[QtCore.QByteArray, bytes, bytearray], value: typing.Union[QtCore.QByteArray, bytes, bytearray]) -> None: ... - def rawHeader(self, headerName: typing.Union[QtCore.QByteArray, bytes, bytearray]) -> QtCore.QByteArray: ... - def rawHeaderList(self) -> typing.List[QtCore.QByteArray]: ... - def hasRawHeader(self, headerName: typing.Union[QtCore.QByteArray, bytes, bytearray]) -> bool: ... - def setHeader(self, header: 'QNetworkRequest.KnownHeaders', value: typing.Any) -> None: ... - def header(self, header: 'QNetworkRequest.KnownHeaders') -> typing.Any: ... - def swap(self, other: 'QNetworkProxy') -> None: ... - def capabilities(self) -> 'QNetworkProxy.Capabilities': ... - def setCapabilities(self, capab: typing.Union['QNetworkProxy.Capabilities', 'QNetworkProxy.Capability']) -> None: ... - def isTransparentProxy(self) -> bool: ... - def isCachingProxy(self) -> bool: ... - @staticmethod - def applicationProxy() -> 'QNetworkProxy': ... - @staticmethod - def setApplicationProxy(proxy: 'QNetworkProxy') -> None: ... - def port(self) -> int: ... - def setPort(self, port: int) -> None: ... - def hostName(self) -> str: ... - def setHostName(self, hostName: str) -> None: ... - def password(self) -> str: ... - def setPassword(self, password: str) -> None: ... - def user(self) -> str: ... - def setUser(self, userName: str) -> None: ... - def type(self) -> 'QNetworkProxy.ProxyType': ... - def setType(self, type: 'QNetworkProxy.ProxyType') -> None: ... - - -class QNetworkProxyQuery(sip.simplewrapper): - - class QueryType(int): ... - TcpSocket = ... # type: 'QNetworkProxyQuery.QueryType' - UdpSocket = ... # type: 'QNetworkProxyQuery.QueryType' - TcpServer = ... # type: 'QNetworkProxyQuery.QueryType' - UrlRequest = ... # type: 'QNetworkProxyQuery.QueryType' - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, requestUrl: QtCore.QUrl, type: 'QNetworkProxyQuery.QueryType' = ...) -> None: ... - @typing.overload - def __init__(self, hostname: str, port: int, protocolTag: str = ..., type: 'QNetworkProxyQuery.QueryType' = ...) -> None: ... - @typing.overload - def __init__(self, bindPort: int, protocolTag: str = ..., type: 'QNetworkProxyQuery.QueryType' = ...) -> None: ... - @typing.overload - def __init__(self, networkConfiguration: QNetworkConfiguration, requestUrl: QtCore.QUrl, queryType: 'QNetworkProxyQuery.QueryType' = ...) -> None: ... - @typing.overload - def __init__(self, networkConfiguration: QNetworkConfiguration, hostname: str, port: int, protocolTag: str = ..., type: 'QNetworkProxyQuery.QueryType' = ...) -> None: ... - @typing.overload - def __init__(self, networkConfiguration: QNetworkConfiguration, bindPort: int, protocolTag: str = ..., type: 'QNetworkProxyQuery.QueryType' = ...) -> None: ... - @typing.overload - def __init__(self, other: 'QNetworkProxyQuery') -> None: ... - - def swap(self, other: 'QNetworkProxyQuery') -> None: ... - def setNetworkConfiguration(self, networkConfiguration: QNetworkConfiguration) -> None: ... - def networkConfiguration(self) -> QNetworkConfiguration: ... - def setUrl(self, url: QtCore.QUrl) -> None: ... - def url(self) -> QtCore.QUrl: ... - def setProtocolTag(self, protocolTag: str) -> None: ... - def protocolTag(self) -> str: ... - def setLocalPort(self, port: int) -> None: ... - def localPort(self) -> int: ... - def setPeerHostName(self, hostname: str) -> None: ... - def peerHostName(self) -> str: ... - def setPeerPort(self, port: int) -> None: ... - def peerPort(self) -> int: ... - def setQueryType(self, type: 'QNetworkProxyQuery.QueryType') -> None: ... - def queryType(self) -> 'QNetworkProxyQuery.QueryType': ... - - -class QNetworkProxyFactory(sip.wrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QNetworkProxyFactory') -> None: ... - - @staticmethod - def setUseSystemConfiguration(enable: bool) -> None: ... - @staticmethod - def systemProxyForQuery(query: QNetworkProxyQuery = ...) -> typing.List[QNetworkProxy]: ... - @staticmethod - def proxyForQuery(query: QNetworkProxyQuery) -> typing.List[QNetworkProxy]: ... - @staticmethod - def setApplicationProxyFactory(factory: 'QNetworkProxyFactory') -> None: ... - def queryProxy(self, query: QNetworkProxyQuery = ...) -> typing.Any: ... - - -class QNetworkReply(QtCore.QIODevice): - - class NetworkError(int): ... - NoError = ... # type: 'QNetworkReply.NetworkError' - ConnectionRefusedError = ... # type: 'QNetworkReply.NetworkError' - RemoteHostClosedError = ... # type: 'QNetworkReply.NetworkError' - HostNotFoundError = ... # type: 'QNetworkReply.NetworkError' - TimeoutError = ... # type: 'QNetworkReply.NetworkError' - OperationCanceledError = ... # type: 'QNetworkReply.NetworkError' - SslHandshakeFailedError = ... # type: 'QNetworkReply.NetworkError' - UnknownNetworkError = ... # type: 'QNetworkReply.NetworkError' - ProxyConnectionRefusedError = ... # type: 'QNetworkReply.NetworkError' - ProxyConnectionClosedError = ... # type: 'QNetworkReply.NetworkError' - ProxyNotFoundError = ... # type: 'QNetworkReply.NetworkError' - ProxyTimeoutError = ... # type: 'QNetworkReply.NetworkError' - ProxyAuthenticationRequiredError = ... # type: 'QNetworkReply.NetworkError' - UnknownProxyError = ... # type: 'QNetworkReply.NetworkError' - ContentAccessDenied = ... # type: 'QNetworkReply.NetworkError' - ContentOperationNotPermittedError = ... # type: 'QNetworkReply.NetworkError' - ContentNotFoundError = ... # type: 'QNetworkReply.NetworkError' - AuthenticationRequiredError = ... # type: 'QNetworkReply.NetworkError' - UnknownContentError = ... # type: 'QNetworkReply.NetworkError' - ProtocolUnknownError = ... # type: 'QNetworkReply.NetworkError' - ProtocolInvalidOperationError = ... # type: 'QNetworkReply.NetworkError' - ProtocolFailure = ... # type: 'QNetworkReply.NetworkError' - ContentReSendError = ... # type: 'QNetworkReply.NetworkError' - TemporaryNetworkFailureError = ... # type: 'QNetworkReply.NetworkError' - NetworkSessionFailedError = ... # type: 'QNetworkReply.NetworkError' - BackgroundRequestNotAllowedError = ... # type: 'QNetworkReply.NetworkError' - ContentConflictError = ... # type: 'QNetworkReply.NetworkError' - ContentGoneError = ... # type: 'QNetworkReply.NetworkError' - InternalServerError = ... # type: 'QNetworkReply.NetworkError' - OperationNotImplementedError = ... # type: 'QNetworkReply.NetworkError' - ServiceUnavailableError = ... # type: 'QNetworkReply.NetworkError' - UnknownServerError = ... # type: 'QNetworkReply.NetworkError' - TooManyRedirectsError = ... # type: 'QNetworkReply.NetworkError' - InsecureRedirectError = ... # type: 'QNetworkReply.NetworkError' - - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def ignoreSslErrorsImplementation(self, a0: typing.Iterable['QSslError']) -> None: ... - def setSslConfigurationImplementation(self, a0: 'QSslConfiguration') -> None: ... - def sslConfigurationImplementation(self, a0: 'QSslConfiguration') -> None: ... - def rawHeaderPairs(self) -> typing.List[typing.Tuple[QtCore.QByteArray, QtCore.QByteArray]]: ... - def isRunning(self) -> bool: ... - def isFinished(self) -> bool: ... - def setFinished(self, finished: bool) -> None: ... - def setAttribute(self, code: 'QNetworkRequest.Attribute', value: typing.Any) -> None: ... - def setRawHeader(self, headerName: typing.Union[QtCore.QByteArray, bytes, bytearray], value: typing.Union[QtCore.QByteArray, bytes, bytearray]) -> None: ... - def setHeader(self, header: 'QNetworkRequest.KnownHeaders', value: typing.Any) -> None: ... - def setUrl(self, url: QtCore.QUrl) -> None: ... - def setError(self, errorCode: 'QNetworkReply.NetworkError', errorString: str) -> None: ... - def setRequest(self, request: 'QNetworkRequest') -> None: ... - def setOperation(self, operation: QNetworkAccessManager.Operation) -> None: ... - def writeData(self, data: bytes) -> int: ... - def redirected(self, url: QtCore.QUrl) -> None: ... - def preSharedKeyAuthenticationRequired(self, authenticator: 'QSslPreSharedKeyAuthenticator') -> None: ... - def downloadProgress(self, bytesReceived: int, bytesTotal: int) -> None: ... - def uploadProgress(self, bytesSent: int, bytesTotal: int) -> None: ... - def sslErrors(self, errors: typing.Iterable['QSslError']) -> None: ... - def encrypted(self) -> None: ... - def finished(self) -> None: ... - def metaDataChanged(self) -> None: ... - @typing.overload - def ignoreSslErrors(self) -> None: ... - @typing.overload - def ignoreSslErrors(self, errors: typing.Iterable['QSslError']) -> None: ... - def setSslConfiguration(self, configuration: 'QSslConfiguration') -> None: ... - def sslConfiguration(self) -> 'QSslConfiguration': ... - def attribute(self, code: 'QNetworkRequest.Attribute') -> typing.Any: ... - def rawHeader(self, headerName: typing.Union[QtCore.QByteArray, bytes, bytearray]) -> QtCore.QByteArray: ... - def rawHeaderList(self) -> typing.List[QtCore.QByteArray]: ... - def hasRawHeader(self, headerName: typing.Union[QtCore.QByteArray, bytes, bytearray]) -> bool: ... - def header(self, header: 'QNetworkRequest.KnownHeaders') -> typing.Any: ... - def url(self) -> QtCore.QUrl: ... - @typing.overload - def error(self) -> 'QNetworkReply.NetworkError': ... - @typing.overload - def error(self, a0: 'QNetworkReply.NetworkError') -> None: ... - def request(self) -> 'QNetworkRequest': ... - def operation(self) -> QNetworkAccessManager.Operation: ... - def manager(self) -> QNetworkAccessManager: ... - def setReadBufferSize(self, size: int) -> None: ... - def readBufferSize(self) -> int: ... - def isSequential(self) -> bool: ... - def close(self) -> None: ... - def abort(self) -> None: ... - - -class QNetworkRequest(sip.simplewrapper): - - class Priority(int): ... - HighPriority = ... # type: 'QNetworkRequest.Priority' - NormalPriority = ... # type: 'QNetworkRequest.Priority' - LowPriority = ... # type: 'QNetworkRequest.Priority' - - class LoadControl(int): ... - Automatic = ... # type: 'QNetworkRequest.LoadControl' - Manual = ... # type: 'QNetworkRequest.LoadControl' - - class CacheLoadControl(int): ... - AlwaysNetwork = ... # type: 'QNetworkRequest.CacheLoadControl' - PreferNetwork = ... # type: 'QNetworkRequest.CacheLoadControl' - PreferCache = ... # type: 'QNetworkRequest.CacheLoadControl' - AlwaysCache = ... # type: 'QNetworkRequest.CacheLoadControl' - - class Attribute(int): ... - HttpStatusCodeAttribute = ... # type: 'QNetworkRequest.Attribute' - HttpReasonPhraseAttribute = ... # type: 'QNetworkRequest.Attribute' - RedirectionTargetAttribute = ... # type: 'QNetworkRequest.Attribute' - ConnectionEncryptedAttribute = ... # type: 'QNetworkRequest.Attribute' - CacheLoadControlAttribute = ... # type: 'QNetworkRequest.Attribute' - CacheSaveControlAttribute = ... # type: 'QNetworkRequest.Attribute' - SourceIsFromCacheAttribute = ... # type: 'QNetworkRequest.Attribute' - DoNotBufferUploadDataAttribute = ... # type: 'QNetworkRequest.Attribute' - HttpPipeliningAllowedAttribute = ... # type: 'QNetworkRequest.Attribute' - HttpPipeliningWasUsedAttribute = ... # type: 'QNetworkRequest.Attribute' - CustomVerbAttribute = ... # type: 'QNetworkRequest.Attribute' - CookieLoadControlAttribute = ... # type: 'QNetworkRequest.Attribute' - AuthenticationReuseAttribute = ... # type: 'QNetworkRequest.Attribute' - CookieSaveControlAttribute = ... # type: 'QNetworkRequest.Attribute' - BackgroundRequestAttribute = ... # type: 'QNetworkRequest.Attribute' - SpdyAllowedAttribute = ... # type: 'QNetworkRequest.Attribute' - SpdyWasUsedAttribute = ... # type: 'QNetworkRequest.Attribute' - EmitAllUploadProgressSignalsAttribute = ... # type: 'QNetworkRequest.Attribute' - FollowRedirectsAttribute = ... # type: 'QNetworkRequest.Attribute' - User = ... # type: 'QNetworkRequest.Attribute' - UserMax = ... # type: 'QNetworkRequest.Attribute' - - class KnownHeaders(int): ... - ContentTypeHeader = ... # type: 'QNetworkRequest.KnownHeaders' - ContentLengthHeader = ... # type: 'QNetworkRequest.KnownHeaders' - LocationHeader = ... # type: 'QNetworkRequest.KnownHeaders' - LastModifiedHeader = ... # type: 'QNetworkRequest.KnownHeaders' - CookieHeader = ... # type: 'QNetworkRequest.KnownHeaders' - SetCookieHeader = ... # type: 'QNetworkRequest.KnownHeaders' - ContentDispositionHeader = ... # type: 'QNetworkRequest.KnownHeaders' - UserAgentHeader = ... # type: 'QNetworkRequest.KnownHeaders' - ServerHeader = ... # type: 'QNetworkRequest.KnownHeaders' - - @typing.overload - def __init__(self, url: QtCore.QUrl = ...) -> None: ... - @typing.overload - def __init__(self, other: 'QNetworkRequest') -> None: ... - - def setMaximumRedirectsAllowed(self, maximumRedirectsAllowed: int) -> None: ... - def maximumRedirectsAllowed(self) -> int: ... - def swap(self, other: 'QNetworkRequest') -> None: ... - def setPriority(self, priority: 'QNetworkRequest.Priority') -> None: ... - def priority(self) -> 'QNetworkRequest.Priority': ... - def originatingObject(self) -> QtCore.QObject: ... - def setOriginatingObject(self, object: QtCore.QObject) -> None: ... - def setSslConfiguration(self, configuration: 'QSslConfiguration') -> None: ... - def sslConfiguration(self) -> 'QSslConfiguration': ... - def setAttribute(self, code: 'QNetworkRequest.Attribute', value: typing.Any) -> None: ... - def attribute(self, code: 'QNetworkRequest.Attribute', defaultValue: typing.Any = ...) -> typing.Any: ... - def setRawHeader(self, headerName: typing.Union[QtCore.QByteArray, bytes, bytearray], value: typing.Union[QtCore.QByteArray, bytes, bytearray]) -> None: ... - def rawHeader(self, headerName: typing.Union[QtCore.QByteArray, bytes, bytearray]) -> QtCore.QByteArray: ... - def rawHeaderList(self) -> typing.List[QtCore.QByteArray]: ... - def hasRawHeader(self, headerName: typing.Union[QtCore.QByteArray, bytes, bytearray]) -> bool: ... - def setHeader(self, header: 'QNetworkRequest.KnownHeaders', value: typing.Any) -> None: ... - def header(self, header: 'QNetworkRequest.KnownHeaders') -> typing.Any: ... - def setUrl(self, url: QtCore.QUrl) -> None: ... - def url(self) -> QtCore.QUrl: ... - - -class QNetworkSession(QtCore.QObject): - - class UsagePolicy(int): ... - NoPolicy = ... # type: 'QNetworkSession.UsagePolicy' - NoBackgroundTrafficPolicy = ... # type: 'QNetworkSession.UsagePolicy' - - class SessionError(int): ... - UnknownSessionError = ... # type: 'QNetworkSession.SessionError' - SessionAbortedError = ... # type: 'QNetworkSession.SessionError' - RoamingError = ... # type: 'QNetworkSession.SessionError' - OperationNotSupportedError = ... # type: 'QNetworkSession.SessionError' - InvalidConfigurationError = ... # type: 'QNetworkSession.SessionError' - - class State(int): ... - Invalid = ... # type: 'QNetworkSession.State' - NotAvailable = ... # type: 'QNetworkSession.State' - Connecting = ... # type: 'QNetworkSession.State' - Connected = ... # type: 'QNetworkSession.State' - Closing = ... # type: 'QNetworkSession.State' - Disconnected = ... # type: 'QNetworkSession.State' - Roaming = ... # type: 'QNetworkSession.State' - - class UsagePolicies(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QNetworkSession.UsagePolicies', 'QNetworkSession.UsagePolicy']) -> None: ... - @typing.overload - def __init__(self, a0: 'QNetworkSession.UsagePolicies') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QNetworkSession.UsagePolicies': ... - def __int__(self) -> int: ... - - def __init__(self, connConfig: QNetworkConfiguration, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def usagePoliciesChanged(self, usagePolicies: typing.Union['QNetworkSession.UsagePolicies', 'QNetworkSession.UsagePolicy']) -> None: ... - def usagePolicies(self) -> 'QNetworkSession.UsagePolicies': ... - def disconnectNotify(self, signal: QtCore.QMetaMethod) -> None: ... - def connectNotify(self, signal: QtCore.QMetaMethod) -> None: ... - def newConfigurationActivated(self) -> None: ... - def preferredConfigurationChanged(self, config: QNetworkConfiguration, isSeamless: bool) -> None: ... - def closed(self) -> None: ... - def opened(self) -> None: ... - def stateChanged(self, a0: 'QNetworkSession.State') -> None: ... - def reject(self) -> None: ... - def accept(self) -> None: ... - def ignore(self) -> None: ... - def migrate(self) -> None: ... - def stop(self) -> None: ... - def close(self) -> None: ... - def open(self) -> None: ... - def waitForOpened(self, msecs: int = ...) -> bool: ... - def activeTime(self) -> int: ... - def bytesReceived(self) -> int: ... - def bytesWritten(self) -> int: ... - def setSessionProperty(self, key: str, value: typing.Any) -> None: ... - def sessionProperty(self, key: str) -> typing.Any: ... - def errorString(self) -> str: ... - @typing.overload - def error(self) -> 'QNetworkSession.SessionError': ... - @typing.overload - def error(self, a0: 'QNetworkSession.SessionError') -> None: ... - def state(self) -> 'QNetworkSession.State': ... - def interface(self) -> QNetworkInterface: ... - def configuration(self) -> QNetworkConfiguration: ... - def isOpen(self) -> bool: ... - - -class QSsl(sip.simplewrapper): - - class SslOption(int): ... - SslOptionDisableEmptyFragments = ... # type: 'QSsl.SslOption' - SslOptionDisableSessionTickets = ... # type: 'QSsl.SslOption' - SslOptionDisableCompression = ... # type: 'QSsl.SslOption' - SslOptionDisableServerNameIndication = ... # type: 'QSsl.SslOption' - SslOptionDisableLegacyRenegotiation = ... # type: 'QSsl.SslOption' - SslOptionDisableSessionSharing = ... # type: 'QSsl.SslOption' - SslOptionDisableSessionPersistence = ... # type: 'QSsl.SslOption' - SslOptionDisableServerCipherPreference = ... # type: 'QSsl.SslOption' - - class SslProtocol(int): ... - UnknownProtocol = ... # type: 'QSsl.SslProtocol' - SslV3 = ... # type: 'QSsl.SslProtocol' - SslV2 = ... # type: 'QSsl.SslProtocol' - TlsV1_0 = ... # type: 'QSsl.SslProtocol' - TlsV1_0OrLater = ... # type: 'QSsl.SslProtocol' - TlsV1_1 = ... # type: 'QSsl.SslProtocol' - TlsV1_1OrLater = ... # type: 'QSsl.SslProtocol' - TlsV1_2 = ... # type: 'QSsl.SslProtocol' - TlsV1_2OrLater = ... # type: 'QSsl.SslProtocol' - AnyProtocol = ... # type: 'QSsl.SslProtocol' - TlsV1SslV3 = ... # type: 'QSsl.SslProtocol' - SecureProtocols = ... # type: 'QSsl.SslProtocol' - - class AlternativeNameEntryType(int): ... - EmailEntry = ... # type: 'QSsl.AlternativeNameEntryType' - DnsEntry = ... # type: 'QSsl.AlternativeNameEntryType' - - class KeyAlgorithm(int): ... - Opaque = ... # type: 'QSsl.KeyAlgorithm' - Rsa = ... # type: 'QSsl.KeyAlgorithm' - Dsa = ... # type: 'QSsl.KeyAlgorithm' - Ec = ... # type: 'QSsl.KeyAlgorithm' - - class EncodingFormat(int): ... - Pem = ... # type: 'QSsl.EncodingFormat' - Der = ... # type: 'QSsl.EncodingFormat' - - class KeyType(int): ... - PrivateKey = ... # type: 'QSsl.KeyType' - PublicKey = ... # type: 'QSsl.KeyType' - - class SslOptions(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QSsl.SslOptions', 'QSsl.SslOption']) -> None: ... - @typing.overload - def __init__(self, a0: 'QSsl.SslOptions') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QSsl.SslOptions': ... - def __int__(self) -> int: ... - - -class QSslCertificate(sip.simplewrapper): - - class SubjectInfo(int): ... - Organization = ... # type: 'QSslCertificate.SubjectInfo' - CommonName = ... # type: 'QSslCertificate.SubjectInfo' - LocalityName = ... # type: 'QSslCertificate.SubjectInfo' - OrganizationalUnitName = ... # type: 'QSslCertificate.SubjectInfo' - CountryName = ... # type: 'QSslCertificate.SubjectInfo' - StateOrProvinceName = ... # type: 'QSslCertificate.SubjectInfo' - DistinguishedNameQualifier = ... # type: 'QSslCertificate.SubjectInfo' - SerialNumber = ... # type: 'QSslCertificate.SubjectInfo' - EmailAddress = ... # type: 'QSslCertificate.SubjectInfo' - - @typing.overload - def __init__(self, device: QtCore.QIODevice, format: QSsl.EncodingFormat = ...) -> None: ... - @typing.overload - def __init__(self, data: typing.Union[QtCore.QByteArray, bytes, bytearray] = ..., format: QSsl.EncodingFormat = ...) -> None: ... - @typing.overload - def __init__(self, other: 'QSslCertificate') -> None: ... - - @staticmethod - def importPkcs12(device: QtCore.QIODevice, key: 'QSslKey', certificate: 'QSslCertificate', caCertificates: typing.Optional[typing.Iterable['QSslCertificate']] = ..., passPhrase: typing.Union[QtCore.QByteArray, bytes, bytearray] = ...) -> bool: ... - def __hash__(self) -> int: ... - def isSelfSigned(self) -> bool: ... - @staticmethod - def verify(certificateChain: typing.Iterable['QSslCertificate'], hostName: str = ...) -> typing.List['QSslError']: ... - def toText(self) -> str: ... - def extensions(self) -> typing.Any: ... - def issuerInfoAttributes(self) -> typing.List[QtCore.QByteArray]: ... - def subjectInfoAttributes(self) -> typing.List[QtCore.QByteArray]: ... - def isBlacklisted(self) -> bool: ... - def swap(self, other: 'QSslCertificate') -> None: ... - def handle(self) -> sip.voidptr: ... - @staticmethod - def fromData(data: typing.Union[QtCore.QByteArray, bytes, bytearray], format: QSsl.EncodingFormat = ...) -> typing.List['QSslCertificate']: ... - @staticmethod - def fromDevice(device: QtCore.QIODevice, format: QSsl.EncodingFormat = ...) -> typing.List['QSslCertificate']: ... - @staticmethod - def fromPath(path: str, format: QSsl.EncodingFormat = ..., syntax: QtCore.QRegExp.PatternSyntax = ...) -> typing.Any: ... - def toDer(self) -> QtCore.QByteArray: ... - def toPem(self) -> QtCore.QByteArray: ... - def publicKey(self) -> 'QSslKey': ... - def expiryDate(self) -> QtCore.QDateTime: ... - def effectiveDate(self) -> QtCore.QDateTime: ... - def subjectAlternativeNames(self) -> typing.Dict[QSsl.AlternativeNameEntryType, typing.List[str]]: ... - @typing.overload - def subjectInfo(self, info: 'QSslCertificate.SubjectInfo') -> typing.List[str]: ... - @typing.overload - def subjectInfo(self, attribute: typing.Union[QtCore.QByteArray, bytes, bytearray]) -> typing.List[str]: ... - @typing.overload - def issuerInfo(self, info: 'QSslCertificate.SubjectInfo') -> typing.List[str]: ... - @typing.overload - def issuerInfo(self, attribute: typing.Union[QtCore.QByteArray, bytes, bytearray]) -> typing.List[str]: ... - def digest(self, algorithm: QtCore.QCryptographicHash.Algorithm = ...) -> QtCore.QByteArray: ... - def serialNumber(self) -> QtCore.QByteArray: ... - def version(self) -> QtCore.QByteArray: ... - def clear(self) -> None: ... - def isNull(self) -> bool: ... - - -class QSslCertificateExtension(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, other: 'QSslCertificateExtension') -> None: ... - - def isSupported(self) -> bool: ... - def isCritical(self) -> bool: ... - def value(self) -> typing.Any: ... - def name(self) -> str: ... - def oid(self) -> str: ... - def swap(self, other: 'QSslCertificateExtension') -> None: ... - - -class QSslCipher(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, name: str) -> None: ... - @typing.overload - def __init__(self, name: str, protocol: QSsl.SslProtocol) -> None: ... - @typing.overload - def __init__(self, other: 'QSslCipher') -> None: ... - - def swap(self, other: 'QSslCipher') -> None: ... - def protocol(self) -> QSsl.SslProtocol: ... - def protocolString(self) -> str: ... - def encryptionMethod(self) -> str: ... - def authenticationMethod(self) -> str: ... - def keyExchangeMethod(self) -> str: ... - def usedBits(self) -> int: ... - def supportedBits(self) -> int: ... - def name(self) -> str: ... - def isNull(self) -> bool: ... - - -class QSslConfiguration(sip.simplewrapper): - - class NextProtocolNegotiationStatus(int): ... - NextProtocolNegotiationNone = ... # type: 'QSslConfiguration.NextProtocolNegotiationStatus' - NextProtocolNegotiationNegotiated = ... # type: 'QSslConfiguration.NextProtocolNegotiationStatus' - NextProtocolNegotiationUnsupported = ... # type: 'QSslConfiguration.NextProtocolNegotiationStatus' - - NextProtocolHttp1_1 = ... # type: str - NextProtocolSpdy3_0 = ... # type: str - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, other: 'QSslConfiguration') -> None: ... - - def ephemeralServerKey(self) -> 'QSslKey': ... - @staticmethod - def supportedEllipticCurves() -> typing.List['QSslEllipticCurve']: ... - def setEllipticCurves(self, curves: typing.Iterable['QSslEllipticCurve']) -> None: ... - def ellipticCurves(self) -> typing.Any: ... - @staticmethod - def systemCaCertificates() -> typing.List[QSslCertificate]: ... - @staticmethod - def supportedCiphers() -> typing.List[QSslCipher]: ... - def sessionProtocol(self) -> QSsl.SslProtocol: ... - def nextProtocolNegotiationStatus(self) -> 'QSslConfiguration.NextProtocolNegotiationStatus': ... - def nextNegotiatedProtocol(self) -> QtCore.QByteArray: ... - def allowedNextProtocols(self) -> typing.List[QtCore.QByteArray]: ... - def setAllowedNextProtocols(self, protocols: typing.Iterable[typing.Union[QtCore.QByteArray, bytes, bytearray]]) -> None: ... - def sessionTicketLifeTimeHint(self) -> int: ... - def setSessionTicket(self, sessionTicket: typing.Union[QtCore.QByteArray, bytes, bytearray]) -> None: ... - def sessionTicket(self) -> QtCore.QByteArray: ... - def setLocalCertificateChain(self, localChain: typing.Iterable[QSslCertificate]) -> None: ... - def localCertificateChain(self) -> typing.List[QSslCertificate]: ... - def swap(self, other: 'QSslConfiguration') -> None: ... - def testSslOption(self, option: QSsl.SslOption) -> bool: ... - def setSslOption(self, option: QSsl.SslOption, on: bool) -> None: ... - @staticmethod - def setDefaultConfiguration(configuration: 'QSslConfiguration') -> None: ... - @staticmethod - def defaultConfiguration() -> 'QSslConfiguration': ... - def setCaCertificates(self, certificates: typing.Iterable[QSslCertificate]) -> None: ... - def caCertificates(self) -> typing.List[QSslCertificate]: ... - def setCiphers(self, ciphers: typing.Iterable[QSslCipher]) -> None: ... - def ciphers(self) -> typing.Any: ... - def setPrivateKey(self, key: 'QSslKey') -> None: ... - def privateKey(self) -> 'QSslKey': ... - def sessionCipher(self) -> QSslCipher: ... - def peerCertificateChain(self) -> typing.List[QSslCertificate]: ... - def peerCertificate(self) -> QSslCertificate: ... - def setLocalCertificate(self, certificate: QSslCertificate) -> None: ... - def localCertificate(self) -> QSslCertificate: ... - def setPeerVerifyDepth(self, depth: int) -> None: ... - def peerVerifyDepth(self) -> int: ... - def setPeerVerifyMode(self, mode: 'QSslSocket.PeerVerifyMode') -> None: ... - def peerVerifyMode(self) -> 'QSslSocket.PeerVerifyMode': ... - def setProtocol(self, protocol: QSsl.SslProtocol) -> None: ... - def protocol(self) -> QSsl.SslProtocol: ... - def isNull(self) -> bool: ... - - -class QSslEllipticCurve(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QSslEllipticCurve') -> None: ... - - def __hash__(self) -> int: ... - def isTlsNamedCurve(self) -> bool: ... - def isValid(self) -> bool: ... - def longName(self) -> str: ... - def shortName(self) -> str: ... - @staticmethod - def fromLongName(name: str) -> 'QSslEllipticCurve': ... - @staticmethod - def fromShortName(name: str) -> 'QSslEllipticCurve': ... - - -class QSslError(sip.simplewrapper): - - class SslError(int): ... - UnspecifiedError = ... # type: 'QSslError.SslError' - NoError = ... # type: 'QSslError.SslError' - UnableToGetIssuerCertificate = ... # type: 'QSslError.SslError' - UnableToDecryptCertificateSignature = ... # type: 'QSslError.SslError' - UnableToDecodeIssuerPublicKey = ... # type: 'QSslError.SslError' - CertificateSignatureFailed = ... # type: 'QSslError.SslError' - CertificateNotYetValid = ... # type: 'QSslError.SslError' - CertificateExpired = ... # type: 'QSslError.SslError' - InvalidNotBeforeField = ... # type: 'QSslError.SslError' - InvalidNotAfterField = ... # type: 'QSslError.SslError' - SelfSignedCertificate = ... # type: 'QSslError.SslError' - SelfSignedCertificateInChain = ... # type: 'QSslError.SslError' - UnableToGetLocalIssuerCertificate = ... # type: 'QSslError.SslError' - UnableToVerifyFirstCertificate = ... # type: 'QSslError.SslError' - CertificateRevoked = ... # type: 'QSslError.SslError' - InvalidCaCertificate = ... # type: 'QSslError.SslError' - PathLengthExceeded = ... # type: 'QSslError.SslError' - InvalidPurpose = ... # type: 'QSslError.SslError' - CertificateUntrusted = ... # type: 'QSslError.SslError' - CertificateRejected = ... # type: 'QSslError.SslError' - SubjectIssuerMismatch = ... # type: 'QSslError.SslError' - AuthorityIssuerSerialNumberMismatch = ... # type: 'QSslError.SslError' - NoPeerCertificate = ... # type: 'QSslError.SslError' - HostNameMismatch = ... # type: 'QSslError.SslError' - NoSslSupport = ... # type: 'QSslError.SslError' - CertificateBlacklisted = ... # type: 'QSslError.SslError' - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, error: 'QSslError.SslError') -> None: ... - @typing.overload - def __init__(self, error: 'QSslError.SslError', certificate: QSslCertificate) -> None: ... - @typing.overload - def __init__(self, other: 'QSslError') -> None: ... - - def __hash__(self) -> int: ... - def swap(self, other: 'QSslError') -> None: ... - def certificate(self) -> QSslCertificate: ... - def errorString(self) -> str: ... - def error(self) -> 'QSslError.SslError': ... - - -class QSslKey(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, encoded: typing.Union[QtCore.QByteArray, bytes, bytearray], algorithm: QSsl.KeyAlgorithm, encoding: QSsl.EncodingFormat = ..., type: QSsl.KeyType = ..., passPhrase: typing.Union[QtCore.QByteArray, bytes, bytearray] = ...) -> None: ... - @typing.overload - def __init__(self, device: QtCore.QIODevice, algorithm: QSsl.KeyAlgorithm, encoding: QSsl.EncodingFormat = ..., type: QSsl.KeyType = ..., passPhrase: typing.Union[QtCore.QByteArray, bytes, bytearray] = ...) -> None: ... - @typing.overload - def __init__(self, handle: sip.voidptr, type: QSsl.KeyType = ...) -> None: ... - @typing.overload - def __init__(self, other: 'QSslKey') -> None: ... - - def swap(self, other: 'QSslKey') -> None: ... - def handle(self) -> sip.voidptr: ... - def toDer(self, passPhrase: typing.Union[QtCore.QByteArray, bytes, bytearray] = ...) -> QtCore.QByteArray: ... - def toPem(self, passPhrase: typing.Union[QtCore.QByteArray, bytes, bytearray] = ...) -> QtCore.QByteArray: ... - def algorithm(self) -> QSsl.KeyAlgorithm: ... - def type(self) -> QSsl.KeyType: ... - def length(self) -> int: ... - def clear(self) -> None: ... - def isNull(self) -> bool: ... - - -class QSslPreSharedKeyAuthenticator(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, authenticator: 'QSslPreSharedKeyAuthenticator') -> None: ... - - def maximumPreSharedKeyLength(self) -> int: ... - def preSharedKey(self) -> QtCore.QByteArray: ... - def setPreSharedKey(self, preSharedKey: typing.Union[QtCore.QByteArray, bytes, bytearray]) -> None: ... - def maximumIdentityLength(self) -> int: ... - def identity(self) -> QtCore.QByteArray: ... - def setIdentity(self, identity: typing.Union[QtCore.QByteArray, bytes, bytearray]) -> None: ... - def identityHint(self) -> QtCore.QByteArray: ... - def swap(self, authenticator: 'QSslPreSharedKeyAuthenticator') -> None: ... - - -class QTcpSocket(QAbstractSocket): - - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - -class QSslSocket(QTcpSocket): - - class PeerVerifyMode(int): ... - VerifyNone = ... # type: 'QSslSocket.PeerVerifyMode' - QueryPeer = ... # type: 'QSslSocket.PeerVerifyMode' - VerifyPeer = ... # type: 'QSslSocket.PeerVerifyMode' - AutoVerifyPeer = ... # type: 'QSslSocket.PeerVerifyMode' - - class SslMode(int): ... - UnencryptedMode = ... # type: 'QSslSocket.SslMode' - SslClientMode = ... # type: 'QSslSocket.SslMode' - SslServerMode = ... # type: 'QSslSocket.SslMode' - - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - @staticmethod - def sslLibraryBuildVersionString() -> str: ... - @staticmethod - def sslLibraryBuildVersionNumber() -> int: ... - def sessionProtocol(self) -> QSsl.SslProtocol: ... - def localCertificateChain(self) -> typing.List[QSslCertificate]: ... - def setLocalCertificateChain(self, localChain: typing.Iterable[QSslCertificate]) -> None: ... - @staticmethod - def sslLibraryVersionString() -> str: ... - @staticmethod - def sslLibraryVersionNumber() -> int: ... - def disconnectFromHost(self) -> None: ... - # def connectToHost(self, hostName: str, port: int, mode: typing.Union[QtCore.QIODevice.OpenMode, QtCore.QIODevice.OpenModeFlag] = ..., protocol: QAbstractSocket.NetworkLayerProtocol = ...) -> None: ... - def resume(self) -> None: ... - def setPeerVerifyName(self, hostName: str) -> None: ... - def peerVerifyName(self) -> str: ... - def socketOption(self, option: QAbstractSocket.SocketOption) -> typing.Any: ... - def setSocketOption(self, option: QAbstractSocket.SocketOption, value: typing.Any) -> None: ... - def encryptedBytesWritten(self, totalBytes: int) -> None: ... - def peerVerifyError(self, error: QSslError) -> None: ... - def setSslConfiguration(self, config: QSslConfiguration) -> None: ... - def sslConfiguration(self) -> QSslConfiguration: ... - def encryptedBytesToWrite(self) -> int: ... - def encryptedBytesAvailable(self) -> int: ... - def setReadBufferSize(self, size: int) -> None: ... - def setPeerVerifyDepth(self, depth: int) -> None: ... - def peerVerifyDepth(self) -> int: ... - def setPeerVerifyMode(self, mode: 'QSslSocket.PeerVerifyMode') -> None: ... - def peerVerifyMode(self) -> 'QSslSocket.PeerVerifyMode': ... - def writeData(self, data: bytes) -> int: ... - def readData(self, maxlen: int) -> bytes: ... - def preSharedKeyAuthenticationRequired(self, authenticator: QSslPreSharedKeyAuthenticator) -> None: ... - def modeChanged(self, newMode: 'QSslSocket.SslMode') -> None: ... - def encrypted(self) -> None: ... - @typing.overload - def ignoreSslErrors(self) -> None: ... - @typing.overload - def ignoreSslErrors(self, errors: typing.Iterable[QSslError]) -> None: ... - def startServerEncryption(self) -> None: ... - def startClientEncryption(self) -> None: ... - @staticmethod - def supportsSsl() -> bool: ... - @typing.overload - def sslErrors(self) -> typing.List[QSslError]: ... - @typing.overload - def sslErrors(self, errors: typing.Iterable[QSslError]) -> None: ... - def waitForDisconnected(self, msecs: int = ...) -> bool: ... - def waitForBytesWritten(self, msecs: int = ...) -> bool: ... - def waitForReadyRead(self, msecs: int = ...) -> bool: ... - def waitForEncrypted(self, msecs: int = ...) -> bool: ... - def waitForConnected(self, msecs: int = ...) -> bool: ... - @staticmethod - def systemCaCertificates() -> typing.List[QSslCertificate]: ... - @staticmethod - def defaultCaCertificates() -> typing.List[QSslCertificate]: ... - @staticmethod - def setDefaultCaCertificates(certificates: typing.Iterable[QSslCertificate]) -> None: ... - @staticmethod - def addDefaultCaCertificate(certificate: QSslCertificate) -> bool: ... - @typing.overload - @staticmethod - def addDefaultCaCertificates(path: str, format: QSsl.EncodingFormat = ..., syntax: QtCore.QRegExp.PatternSyntax = ...) -> bool: ... - @typing.overload - @staticmethod - def addDefaultCaCertificates(certificates: typing.Iterable[QSslCertificate]) -> bool: ... - def caCertificates(self) -> typing.List[QSslCertificate]: ... - def setCaCertificates(self, certificates: typing.Iterable[QSslCertificate]) -> None: ... - def addCaCertificate(self, certificate: QSslCertificate) -> None: ... - @typing.overload - def addCaCertificates(self, path: str, format: QSsl.EncodingFormat = ..., syntax: QtCore.QRegExp.PatternSyntax = ...) -> bool: ... - @typing.overload - def addCaCertificates(self, certificates: typing.Iterable[QSslCertificate]) -> bool: ... - @staticmethod - def supportedCiphers() -> typing.List[QSslCipher]: ... - @staticmethod - def defaultCiphers() -> typing.List[QSslCipher]: ... - @staticmethod - def setDefaultCiphers(ciphers: typing.Iterable[QSslCipher]) -> None: ... - @typing.overload - def setCiphers(self, ciphers: typing.Iterable[QSslCipher]) -> None: ... - @typing.overload - def setCiphers(self, ciphers: str) -> None: ... - def ciphers(self) -> typing.List[QSslCipher]: ... - def privateKey(self) -> QSslKey: ... - @typing.overload - def setPrivateKey(self, key: QSslKey) -> None: ... - @typing.overload - def setPrivateKey(self, fileName: str, algorithm: QSsl.KeyAlgorithm = ..., format: QSsl.EncodingFormat = ..., passPhrase: typing.Union[QtCore.QByteArray, bytes, bytearray] = ...) -> None: ... - def sessionCipher(self) -> QSslCipher: ... - def peerCertificateChain(self) -> typing.List[QSslCertificate]: ... - def peerCertificate(self) -> QSslCertificate: ... - def localCertificate(self) -> QSslCertificate: ... - @typing.overload - def setLocalCertificate(self, certificate: QSslCertificate) -> None: ... - @typing.overload - def setLocalCertificate(self, path: str, format: QSsl.EncodingFormat = ...) -> None: ... - def abort(self) -> None: ... - def flush(self) -> bool: ... - def atEnd(self) -> bool: ... - def close(self) -> None: ... - def canReadLine(self) -> bool: ... - def bytesToWrite(self) -> int: ... - def bytesAvailable(self) -> int: ... - def setProtocol(self, protocol: QSsl.SslProtocol) -> None: ... - def protocol(self) -> QSsl.SslProtocol: ... - def isEncrypted(self) -> bool: ... - def mode(self) -> 'QSslSocket.SslMode': ... - def setSocketDescriptor(self, socketDescriptor: sip.voidptr, state: QAbstractSocket.SocketState = ..., mode: typing.Union[QtCore.QIODevice.OpenMode, QtCore.QIODevice.OpenModeFlag] = ...) -> bool: ... - @typing.overload - def connectToHostEncrypted(self, hostName: str, port: int, mode: typing.Union[QtCore.QIODevice.OpenMode, QtCore.QIODevice.OpenModeFlag] = ..., protocol: QAbstractSocket.NetworkLayerProtocol = ...) -> None: ... - @typing.overload - def connectToHostEncrypted(self, hostName: str, port: int, sslPeerName: str, mode: typing.Union[QtCore.QIODevice.OpenMode, QtCore.QIODevice.OpenModeFlag] = ..., protocol: QAbstractSocket.NetworkLayerProtocol = ...) -> None: ... - - -class QTcpServer(QtCore.QObject): - - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def acceptError(self, socketError: QAbstractSocket.SocketError) -> None: ... - def newConnection(self) -> None: ... - def addPendingConnection(self, socket: QTcpSocket) -> None: ... - def incomingConnection(self, handle: sip.voidptr) -> None: ... - def resumeAccepting(self) -> None: ... - def pauseAccepting(self) -> None: ... - def proxy(self) -> QNetworkProxy: ... - def setProxy(self, networkProxy: QNetworkProxy) -> None: ... - def errorString(self) -> str: ... - def serverError(self) -> QAbstractSocket.SocketError: ... - def nextPendingConnection(self) -> QTcpSocket: ... - def hasPendingConnections(self) -> bool: ... - def waitForNewConnection(self, msecs: int = ...) -> typing.Tuple[bool, bool]: ... - def setSocketDescriptor(self, socketDescriptor: sip.voidptr) -> bool: ... - def socketDescriptor(self) -> sip.voidptr: ... - def serverAddress(self) -> QHostAddress: ... - def serverPort(self) -> int: ... - def maxPendingConnections(self) -> int: ... - def setMaxPendingConnections(self, numConnections: int) -> None: ... - def isListening(self) -> bool: ... - def close(self) -> None: ... - def listen(self, address: typing.Union[QHostAddress, QHostAddress.SpecialAddress] = ..., port: int = ...) -> bool: ... - - -class QUdpSocket(QAbstractSocket): - - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def setMulticastInterface(self, iface: QNetworkInterface) -> None: ... - def multicastInterface(self) -> QNetworkInterface: ... - @typing.overload - def leaveMulticastGroup(self, groupAddress: typing.Union[QHostAddress, QHostAddress.SpecialAddress]) -> bool: ... - @typing.overload - def leaveMulticastGroup(self, groupAddress: typing.Union[QHostAddress, QHostAddress.SpecialAddress], iface: QNetworkInterface) -> bool: ... - @typing.overload - def joinMulticastGroup(self, groupAddress: typing.Union[QHostAddress, QHostAddress.SpecialAddress]) -> bool: ... - @typing.overload - def joinMulticastGroup(self, groupAddress: typing.Union[QHostAddress, QHostAddress.SpecialAddress], iface: QNetworkInterface) -> bool: ... - @typing.overload - def writeDatagram(self, data: bytes, host: typing.Union[QHostAddress, QHostAddress.SpecialAddress], port: int) -> int: ... - @typing.overload - def writeDatagram(self, datagram: typing.Union[QtCore.QByteArray, bytes, bytearray], host: typing.Union[QHostAddress, QHostAddress.SpecialAddress], port: int) -> int: ... - def readDatagram(self, maxlen: int) -> typing.Tuple[bytes, QHostAddress, int]: ... - def pendingDatagramSize(self) -> int: ... - def hasPendingDatagrams(self) -> bool: ... diff -Nru uranium-3.3.0/stubs/PyQt5/QtNfc.pyi uranium-4.4.1/stubs/PyQt5/QtNfc.pyi --- uranium-3.3.0/stubs/PyQt5/QtNfc.pyi 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/stubs/PyQt5/QtNfc.pyi 1970-01-01 00:00:00.000000000 +0000 @@ -1,414 +0,0 @@ -# The PEP 484 type hints stub file for the QtNfc module. -# -# Generated by SIP 4.18.1 -# -# Copyright (c) 2016 Riverbank Computing Limited -# -# This file is part of PyQt5. -# -# This file may be used under the terms of the GNU General Public License -# version 3.0 as published by the Free Software Foundation and appearing in -# the file LICENSE included in the packaging of this file. Please review the -# following information to ensure the GNU General Public License version 3.0 -# requirements will be met: http://www.gnu.org/copyleft/gpl.html. -# -# If you do not wish to use this file under the terms of the GPL version 3.0 -# then you may purchase a commercial license. For more information contact -# info@riverbankcomputing.com. -# -# This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -# WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - - -import typing -import sip - -from PyQt5 import QtCore - -# Support for QDate, QDateTime and QTime. -import datetime - -# Convenient type aliases. -PYQT_SIGNAL = typing.Union[QtCore.pyqtSignal, QtCore.pyqtBoundSignal] -PYQT_SLOT = typing.Union[typing.Callable[..., None], QtCore.pyqtBoundSignal] - - -class QNdefFilter(sip.simplewrapper): - - class Record(sip.simplewrapper): - - maximum = ... # type: int - minimum = ... # type: int - type = ... # type: typing.Union[QtCore.QByteArray, bytes, bytearray] - typeNameFormat = ... # type: 'QNdefRecord.TypeNameFormat' - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QNdefFilter.Record') -> None: ... - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, other: 'QNdefFilter') -> None: ... - - def recordAt(self, i: int) -> 'QNdefFilter.Record': ... - def __len__(self) -> int: ... - def recordCount(self) -> int: ... - @typing.overload - def appendRecord(self, typeNameFormat: 'QNdefRecord.TypeNameFormat', type: typing.Union[QtCore.QByteArray, bytes, bytearray], min: int = ..., max: int = ...) -> None: ... - @typing.overload - def appendRecord(self, record: 'QNdefFilter.Record') -> None: ... - def orderMatch(self) -> bool: ... - def setOrderMatch(self, on: bool) -> None: ... - def clear(self) -> None: ... - - -class QNdefMessage(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, record: 'QNdefRecord') -> None: ... - @typing.overload - def __init__(self, message: 'QNdefMessage') -> None: ... - @typing.overload - def __init__(self, records: typing.Any) -> None: ... - - @staticmethod - def fromByteArray(message: typing.Union[QtCore.QByteArray, bytes, bytearray]) -> 'QNdefMessage': ... - def __delitem__(self, i: int) -> None: ... - def __setitem__(self, i: int, value: 'QNdefRecord') -> None: ... - def __getitem__(self, i: int) -> 'QNdefRecord': ... - def __len__(self) -> int: ... - def toByteArray(self) -> QtCore.QByteArray: ... - - -class QNdefRecord(sip.simplewrapper): - - class TypeNameFormat(int): ... - Empty = ... # type: 'QNdefRecord.TypeNameFormat' - NfcRtd = ... # type: 'QNdefRecord.TypeNameFormat' - Mime = ... # type: 'QNdefRecord.TypeNameFormat' - Uri = ... # type: 'QNdefRecord.TypeNameFormat' - ExternalRtd = ... # type: 'QNdefRecord.TypeNameFormat' - Unknown = ... # type: 'QNdefRecord.TypeNameFormat' - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, other: 'QNdefRecord') -> None: ... - - def __hash__(self) -> int: ... - def isEmpty(self) -> bool: ... - def payload(self) -> QtCore.QByteArray: ... - def setPayload(self, payload: typing.Union[QtCore.QByteArray, bytes, bytearray]) -> None: ... - def id(self) -> QtCore.QByteArray: ... - def setId(self, id: typing.Union[QtCore.QByteArray, bytes, bytearray]) -> None: ... - def type(self) -> QtCore.QByteArray: ... - def setType(self, type: typing.Union[QtCore.QByteArray, bytes, bytearray]) -> None: ... - def typeNameFormat(self) -> 'QNdefRecord.TypeNameFormat': ... - def setTypeNameFormat(self, typeNameFormat: 'QNdefRecord.TypeNameFormat') -> None: ... - - -class QNdefNfcIconRecord(QNdefRecord): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, other: QNdefRecord) -> None: ... - @typing.overload - def __init__(self, a0: 'QNdefNfcIconRecord') -> None: ... - - def data(self) -> QtCore.QByteArray: ... - def setData(self, data: typing.Union[QtCore.QByteArray, bytes, bytearray]) -> None: ... - - -class QNdefNfcSmartPosterRecord(QNdefRecord): - - class Action(int): ... - UnspecifiedAction = ... # type: 'QNdefNfcSmartPosterRecord.Action' - DoAction = ... # type: 'QNdefNfcSmartPosterRecord.Action' - SaveAction = ... # type: 'QNdefNfcSmartPosterRecord.Action' - EditAction = ... # type: 'QNdefNfcSmartPosterRecord.Action' - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, other: 'QNdefNfcSmartPosterRecord') -> None: ... - @typing.overload - def __init__(self, other: QNdefRecord) -> None: ... - - def setTypeInfo(self, type: typing.Union[QtCore.QByteArray, bytes, bytearray]) -> None: ... - def typeInfo(self) -> QtCore.QByteArray: ... - def setSize(self, size: int) -> None: ... - def size(self) -> int: ... - def setIcons(self, icons: typing.Iterable[QNdefNfcIconRecord]) -> None: ... - @typing.overload - def removeIcon(self, icon: QNdefNfcIconRecord) -> bool: ... - @typing.overload - def removeIcon(self, type: typing.Union[QtCore.QByteArray, bytes, bytearray]) -> bool: ... - @typing.overload - def addIcon(self, icon: QNdefNfcIconRecord) -> None: ... - @typing.overload - def addIcon(self, type: typing.Union[QtCore.QByteArray, bytes, bytearray], data: typing.Union[QtCore.QByteArray, bytes, bytearray]) -> None: ... - def iconRecords(self) -> typing.Any: ... - def iconRecord(self, index: int) -> QNdefNfcIconRecord: ... - def icon(self, mimetype: typing.Union[QtCore.QByteArray, bytes, bytearray] = ...) -> QtCore.QByteArray: ... - def iconCount(self) -> int: ... - def setAction(self, act: 'QNdefNfcSmartPosterRecord.Action') -> None: ... - def action(self) -> 'QNdefNfcSmartPosterRecord.Action': ... - @typing.overload - def setUri(self, url: 'QNdefNfcUriRecord') -> None: ... - @typing.overload - def setUri(self, url: QtCore.QUrl) -> None: ... - def uriRecord(self) -> 'QNdefNfcUriRecord': ... - def uri(self) -> QtCore.QUrl: ... - def setTitles(self, titles: typing.Iterable['QNdefNfcTextRecord']) -> None: ... - @typing.overload - def removeTitle(self, text: 'QNdefNfcTextRecord') -> bool: ... - @typing.overload - def removeTitle(self, locale: str) -> bool: ... - @typing.overload - def addTitle(self, text: 'QNdefNfcTextRecord') -> bool: ... - @typing.overload - def addTitle(self, text: str, locale: str, encoding: 'QNdefNfcTextRecord.Encoding') -> bool: ... - def titleRecords(self) -> typing.Any: ... - def titleRecord(self, index: int) -> 'QNdefNfcTextRecord': ... - def title(self, locale: str = ...) -> str: ... - def titleCount(self) -> int: ... - def hasTypeInfo(self) -> bool: ... - def hasSize(self) -> bool: ... - def hasIcon(self, mimetype: typing.Union[QtCore.QByteArray, bytes, bytearray] = ...) -> bool: ... - def hasAction(self) -> bool: ... - def hasTitle(self, locale: str = ...) -> bool: ... - def setPayload(self, payload: typing.Union[QtCore.QByteArray, bytes, bytearray]) -> None: ... - - -class QNdefNfcTextRecord(QNdefRecord): - - class Encoding(int): ... - Utf8 = ... # type: 'QNdefNfcTextRecord.Encoding' - Utf16 = ... # type: 'QNdefNfcTextRecord.Encoding' - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, other: QNdefRecord) -> None: ... - @typing.overload - def __init__(self, a0: 'QNdefNfcTextRecord') -> None: ... - - def setEncoding(self, encoding: 'QNdefNfcTextRecord.Encoding') -> None: ... - def encoding(self) -> 'QNdefNfcTextRecord.Encoding': ... - def setText(self, text: str) -> None: ... - def text(self) -> str: ... - def setLocale(self, locale: str) -> None: ... - def locale(self) -> str: ... - - -class QNdefNfcUriRecord(QNdefRecord): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, other: QNdefRecord) -> None: ... - @typing.overload - def __init__(self, a0: 'QNdefNfcUriRecord') -> None: ... - - def setUri(self, uri: QtCore.QUrl) -> None: ... - def uri(self) -> QtCore.QUrl: ... - - -class QNearFieldManager(QtCore.QObject): - - class TargetAccessMode(int): ... - NoTargetAccess = ... # type: 'QNearFieldManager.TargetAccessMode' - NdefReadTargetAccess = ... # type: 'QNearFieldManager.TargetAccessMode' - NdefWriteTargetAccess = ... # type: 'QNearFieldManager.TargetAccessMode' - TagTypeSpecificTargetAccess = ... # type: 'QNearFieldManager.TargetAccessMode' - - class TargetAccessModes(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QNearFieldManager.TargetAccessModes', 'QNearFieldManager.TargetAccessMode']) -> None: ... - @typing.overload - def __init__(self, a0: 'QNearFieldManager.TargetAccessModes') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QNearFieldManager.TargetAccessModes': ... - def __int__(self) -> int: ... - - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def targetLost(self, target: 'QNearFieldTarget') -> None: ... - def targetDetected(self, target: 'QNearFieldTarget') -> None: ... - def unregisterNdefMessageHandler(self, handlerId: int) -> bool: ... - @typing.overload - def registerNdefMessageHandler(self, slot: PYQT_SLOT) -> int: ... - @typing.overload - def registerNdefMessageHandler(self, typeNameFormat: QNdefRecord.TypeNameFormat, type: typing.Union[QtCore.QByteArray, bytes, bytearray], slot: PYQT_SLOT) -> int: ... - @typing.overload - def registerNdefMessageHandler(self, filter: QNdefFilter, slot: PYQT_SLOT) -> int: ... - def stopTargetDetection(self) -> None: ... - def startTargetDetection(self) -> bool: ... - def targetAccessModes(self) -> 'QNearFieldManager.TargetAccessModes': ... - def setTargetAccessModes(self, accessModes: typing.Union['QNearFieldManager.TargetAccessModes', 'QNearFieldManager.TargetAccessMode']) -> None: ... - def isAvailable(self) -> bool: ... - - -class QNearFieldShareManager(QtCore.QObject): - - class ShareMode(int): ... - NoShare = ... # type: 'QNearFieldShareManager.ShareMode' - NdefShare = ... # type: 'QNearFieldShareManager.ShareMode' - FileShare = ... # type: 'QNearFieldShareManager.ShareMode' - - class ShareError(int): ... - NoError = ... # type: 'QNearFieldShareManager.ShareError' - UnknownError = ... # type: 'QNearFieldShareManager.ShareError' - InvalidShareContentError = ... # type: 'QNearFieldShareManager.ShareError' - ShareCanceledError = ... # type: 'QNearFieldShareManager.ShareError' - ShareInterruptedError = ... # type: 'QNearFieldShareManager.ShareError' - ShareRejectedError = ... # type: 'QNearFieldShareManager.ShareError' - UnsupportedShareModeError = ... # type: 'QNearFieldShareManager.ShareError' - ShareAlreadyInProgressError = ... # type: 'QNearFieldShareManager.ShareError' - SharePermissionDeniedError = ... # type: 'QNearFieldShareManager.ShareError' - - class ShareModes(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QNearFieldShareManager.ShareModes', 'QNearFieldShareManager.ShareMode']) -> None: ... - @typing.overload - def __init__(self, a0: 'QNearFieldShareManager.ShareModes') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QNearFieldShareManager.ShareModes': ... - def __int__(self) -> int: ... - - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def error(self, error: 'QNearFieldShareManager.ShareError') -> None: ... - def shareModesChanged(self, modes: typing.Union['QNearFieldShareManager.ShareModes', 'QNearFieldShareManager.ShareMode']) -> None: ... - def targetDetected(self, shareTarget: 'QNearFieldShareTarget') -> None: ... - def shareError(self) -> 'QNearFieldShareManager.ShareError': ... - def shareModes(self) -> 'QNearFieldShareManager.ShareModes': ... - def setShareModes(self, modes: typing.Union['QNearFieldShareManager.ShareModes', 'QNearFieldShareManager.ShareMode']) -> None: ... - @staticmethod - def supportedShareModes() -> 'QNearFieldShareManager.ShareModes': ... - - -class QNearFieldShareTarget(QtCore.QObject): - - def shareFinished(self) -> None: ... - def error(self, error: QNearFieldShareManager.ShareError) -> None: ... - def shareError(self) -> QNearFieldShareManager.ShareError: ... - def isShareInProgress(self) -> bool: ... - def cancel(self) -> None: ... - @typing.overload - def share(self, message: QNdefMessage) -> bool: ... - @typing.overload - def share(self, files: typing.Iterable[QtCore.QFileInfo]) -> bool: ... - def shareModes(self) -> QNearFieldShareManager.ShareModes: ... - - -class QNearFieldTarget(QtCore.QObject): - - class Error(int): ... - NoError = ... # type: 'QNearFieldTarget.Error' - UnknownError = ... # type: 'QNearFieldTarget.Error' - UnsupportedError = ... # type: 'QNearFieldTarget.Error' - TargetOutOfRangeError = ... # type: 'QNearFieldTarget.Error' - NoResponseError = ... # type: 'QNearFieldTarget.Error' - ChecksumMismatchError = ... # type: 'QNearFieldTarget.Error' - InvalidParametersError = ... # type: 'QNearFieldTarget.Error' - NdefReadError = ... # type: 'QNearFieldTarget.Error' - NdefWriteError = ... # type: 'QNearFieldTarget.Error' - - class AccessMethod(int): ... - UnknownAccess = ... # type: 'QNearFieldTarget.AccessMethod' - NdefAccess = ... # type: 'QNearFieldTarget.AccessMethod' - TagTypeSpecificAccess = ... # type: 'QNearFieldTarget.AccessMethod' - LlcpAccess = ... # type: 'QNearFieldTarget.AccessMethod' - - class Type(int): ... - ProprietaryTag = ... # type: 'QNearFieldTarget.Type' - NfcTagType1 = ... # type: 'QNearFieldTarget.Type' - NfcTagType2 = ... # type: 'QNearFieldTarget.Type' - NfcTagType3 = ... # type: 'QNearFieldTarget.Type' - NfcTagType4 = ... # type: 'QNearFieldTarget.Type' - MifareTag = ... # type: 'QNearFieldTarget.Type' - - class AccessMethods(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QNearFieldTarget.AccessMethods', 'QNearFieldTarget.AccessMethod']) -> None: ... - @typing.overload - def __init__(self, a0: 'QNearFieldTarget.AccessMethods') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QNearFieldTarget.AccessMethods': ... - def __int__(self) -> int: ... - - class RequestId(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, other: 'QNearFieldTarget.RequestId') -> None: ... - - def refCount(self) -> int: ... - def isValid(self) -> bool: ... - - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def error(self, error: 'QNearFieldTarget.Error', id: 'QNearFieldTarget.RequestId') -> None: ... - def requestCompleted(self, id: 'QNearFieldTarget.RequestId') -> None: ... - def ndefMessagesWritten(self) -> None: ... - def ndefMessageRead(self, message: QNdefMessage) -> None: ... - def disconnected(self) -> None: ... - def handleResponse(self, id: 'QNearFieldTarget.RequestId', response: typing.Union[QtCore.QByteArray, bytes, bytearray]) -> bool: ... - def setResponseForRequest(self, id: 'QNearFieldTarget.RequestId', response: typing.Any, emitRequestCompleted: bool = ...) -> None: ... - def requestResponse(self, id: 'QNearFieldTarget.RequestId') -> typing.Any: ... - def waitForRequestCompleted(self, id: 'QNearFieldTarget.RequestId', msecs: int = ...) -> bool: ... - def sendCommands(self, commands: typing.Iterable[typing.Union[QtCore.QByteArray, bytes, bytearray]]) -> 'QNearFieldTarget.RequestId': ... - def sendCommand(self, command: typing.Union[QtCore.QByteArray, bytes, bytearray]) -> 'QNearFieldTarget.RequestId': ... - def writeNdefMessages(self, messages: typing.Any) -> 'QNearFieldTarget.RequestId': ... - def readNdefMessages(self) -> 'QNearFieldTarget.RequestId': ... - def hasNdefMessage(self) -> bool: ... - def isProcessingCommand(self) -> bool: ... - def accessMethods(self) -> 'QNearFieldTarget.AccessMethods': ... - def type(self) -> 'QNearFieldTarget.Type': ... - def url(self) -> QtCore.QUrl: ... - def uid(self) -> QtCore.QByteArray: ... - - -class QQmlNdefRecord(QtCore.QObject): - - class TypeNameFormat(int): ... - Empty = ... # type: 'QQmlNdefRecord.TypeNameFormat' - NfcRtd = ... # type: 'QQmlNdefRecord.TypeNameFormat' - Mime = ... # type: 'QQmlNdefRecord.TypeNameFormat' - Uri = ... # type: 'QQmlNdefRecord.TypeNameFormat' - ExternalRtd = ... # type: 'QQmlNdefRecord.TypeNameFormat' - Unknown = ... # type: 'QQmlNdefRecord.TypeNameFormat' - - @typing.overload - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - @typing.overload - def __init__(self, record: QNdefRecord, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def recordChanged(self) -> None: ... - def typeNameFormatChanged(self) -> None: ... - def typeChanged(self) -> None: ... - def setRecord(self, record: QNdefRecord) -> None: ... - def record(self) -> QNdefRecord: ... - def typeNameFormat(self) -> 'QQmlNdefRecord.TypeNameFormat': ... - def setTypeNameFormat(self, typeNameFormat: 'QQmlNdefRecord.TypeNameFormat') -> None: ... - def setType(self, t: str) -> None: ... - def type(self) -> str: ... diff -Nru uranium-3.3.0/stubs/PyQt5/QtOpenGL.pyi uranium-4.4.1/stubs/PyQt5/QtOpenGL.pyi --- uranium-3.3.0/stubs/PyQt5/QtOpenGL.pyi 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/stubs/PyQt5/QtOpenGL.pyi 1970-01-01 00:00:00.000000000 +0000 @@ -1,327 +0,0 @@ -# The PEP 484 type hints stub file for the QtOpenGL module. -# -# Generated by SIP 4.18.1 -# -# Copyright (c) 2016 Riverbank Computing Limited -# -# This file is part of PyQt5. -# -# This file may be used under the terms of the GNU General Public License -# version 3.0 as published by the Free Software Foundation and appearing in -# the file LICENSE included in the packaging of this file. Please review the -# following information to ensure the GNU General Public License version 3.0 -# requirements will be met: http://www.gnu.org/copyleft/gpl.html. -# -# If you do not wish to use this file under the terms of the GPL version 3.0 -# then you may purchase a commercial license. For more information contact -# info@riverbankcomputing.com. -# -# This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -# WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - - -import typing -import sip - -from PyQt5 import QtWidgets -from PyQt5 import QtGui -from PyQt5 import QtCore - -# Support for QDate, QDateTime and QTime. -import datetime - -# Convenient type aliases. -PYQT_SIGNAL = typing.Union[QtCore.pyqtSignal, QtCore.pyqtBoundSignal] -PYQT_SLOT = typing.Union[typing.Callable[..., None], QtCore.pyqtBoundSignal] - -# Convenient aliases for complicated OpenGL types. -PYQT_OPENGL_ARRAY = typing.Union[typing.Sequence[int], typing.Sequence[float], - sip.Buffer, None] -PYQT_OPENGL_BOUND_ARRAY = typing.Union[typing.Sequence[int], - typing.Sequence[float], sip.Buffer, int, None] - - -class QGL(sip.simplewrapper): - - class FormatOption(int): ... - DoubleBuffer = ... # type: 'QGL.FormatOption' - DepthBuffer = ... # type: 'QGL.FormatOption' - Rgba = ... # type: 'QGL.FormatOption' - AlphaChannel = ... # type: 'QGL.FormatOption' - AccumBuffer = ... # type: 'QGL.FormatOption' - StencilBuffer = ... # type: 'QGL.FormatOption' - StereoBuffers = ... # type: 'QGL.FormatOption' - DirectRendering = ... # type: 'QGL.FormatOption' - HasOverlay = ... # type: 'QGL.FormatOption' - SampleBuffers = ... # type: 'QGL.FormatOption' - SingleBuffer = ... # type: 'QGL.FormatOption' - NoDepthBuffer = ... # type: 'QGL.FormatOption' - ColorIndex = ... # type: 'QGL.FormatOption' - NoAlphaChannel = ... # type: 'QGL.FormatOption' - NoAccumBuffer = ... # type: 'QGL.FormatOption' - NoStencilBuffer = ... # type: 'QGL.FormatOption' - NoStereoBuffers = ... # type: 'QGL.FormatOption' - IndirectRendering = ... # type: 'QGL.FormatOption' - NoOverlay = ... # type: 'QGL.FormatOption' - NoSampleBuffers = ... # type: 'QGL.FormatOption' - DeprecatedFunctions = ... # type: 'QGL.FormatOption' - NoDeprecatedFunctions = ... # type: 'QGL.FormatOption' - - class FormatOptions(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QGL.FormatOptions', 'QGL.FormatOption']) -> None: ... - @typing.overload - def __init__(self, a0: 'QGL.FormatOptions') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QGL.FormatOptions': ... - def __int__(self) -> int: ... - - -class QGLFormat(sip.simplewrapper): - - class OpenGLContextProfile(int): ... - NoProfile = ... # type: 'QGLFormat.OpenGLContextProfile' - CoreProfile = ... # type: 'QGLFormat.OpenGLContextProfile' - CompatibilityProfile = ... # type: 'QGLFormat.OpenGLContextProfile' - - class OpenGLVersionFlag(int): ... - OpenGL_Version_None = ... # type: 'QGLFormat.OpenGLVersionFlag' - OpenGL_Version_1_1 = ... # type: 'QGLFormat.OpenGLVersionFlag' - OpenGL_Version_1_2 = ... # type: 'QGLFormat.OpenGLVersionFlag' - OpenGL_Version_1_3 = ... # type: 'QGLFormat.OpenGLVersionFlag' - OpenGL_Version_1_4 = ... # type: 'QGLFormat.OpenGLVersionFlag' - OpenGL_Version_1_5 = ... # type: 'QGLFormat.OpenGLVersionFlag' - OpenGL_Version_2_0 = ... # type: 'QGLFormat.OpenGLVersionFlag' - OpenGL_Version_2_1 = ... # type: 'QGLFormat.OpenGLVersionFlag' - OpenGL_Version_3_0 = ... # type: 'QGLFormat.OpenGLVersionFlag' - OpenGL_Version_3_1 = ... # type: 'QGLFormat.OpenGLVersionFlag' - OpenGL_Version_3_2 = ... # type: 'QGLFormat.OpenGLVersionFlag' - OpenGL_Version_3_3 = ... # type: 'QGLFormat.OpenGLVersionFlag' - OpenGL_Version_4_0 = ... # type: 'QGLFormat.OpenGLVersionFlag' - OpenGL_Version_4_1 = ... # type: 'QGLFormat.OpenGLVersionFlag' - OpenGL_Version_4_2 = ... # type: 'QGLFormat.OpenGLVersionFlag' - OpenGL_Version_4_3 = ... # type: 'QGLFormat.OpenGLVersionFlag' - OpenGL_ES_Common_Version_1_0 = ... # type: 'QGLFormat.OpenGLVersionFlag' - OpenGL_ES_CommonLite_Version_1_0 = ... # type: 'QGLFormat.OpenGLVersionFlag' - OpenGL_ES_Common_Version_1_1 = ... # type: 'QGLFormat.OpenGLVersionFlag' - OpenGL_ES_CommonLite_Version_1_1 = ... # type: 'QGLFormat.OpenGLVersionFlag' - OpenGL_ES_Version_2_0 = ... # type: 'QGLFormat.OpenGLVersionFlag' - - class OpenGLVersionFlags(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QGLFormat.OpenGLVersionFlags', 'QGLFormat.OpenGLVersionFlag']) -> None: ... - @typing.overload - def __init__(self, a0: 'QGLFormat.OpenGLVersionFlags') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QGLFormat.OpenGLVersionFlags': ... - def __int__(self) -> int: ... - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, options: typing.Union[QGL.FormatOptions, QGL.FormatOption], plane: int = ...) -> None: ... - @typing.overload - def __init__(self, other: 'QGLFormat') -> None: ... - - def profile(self) -> 'QGLFormat.OpenGLContextProfile': ... - def setProfile(self, profile: 'QGLFormat.OpenGLContextProfile') -> None: ... - def minorVersion(self) -> int: ... - def majorVersion(self) -> int: ... - def setVersion(self, major: int, minor: int) -> None: ... - @staticmethod - def openGLVersionFlags() -> 'QGLFormat.OpenGLVersionFlags': ... - def swapInterval(self) -> int: ... - def setSwapInterval(self, interval: int) -> None: ... - def blueBufferSize(self) -> int: ... - def setBlueBufferSize(self, size: int) -> None: ... - def greenBufferSize(self) -> int: ... - def setGreenBufferSize(self, size: int) -> None: ... - def redBufferSize(self) -> int: ... - def setRedBufferSize(self, size: int) -> None: ... - def sampleBuffers(self) -> bool: ... - def hasOverlay(self) -> bool: ... - def directRendering(self) -> bool: ... - def stereo(self) -> bool: ... - def stencil(self) -> bool: ... - def accum(self) -> bool: ... - def alpha(self) -> bool: ... - def rgba(self) -> bool: ... - def depth(self) -> bool: ... - def doubleBuffer(self) -> bool: ... - @staticmethod - def hasOpenGLOverlays() -> bool: ... - @staticmethod - def hasOpenGL() -> bool: ... - @staticmethod - def setDefaultOverlayFormat(f: 'QGLFormat') -> None: ... - @staticmethod - def defaultOverlayFormat() -> 'QGLFormat': ... - @staticmethod - def setDefaultFormat(f: 'QGLFormat') -> None: ... - @staticmethod - def defaultFormat() -> 'QGLFormat': ... - def testOption(self, opt: typing.Union[QGL.FormatOptions, QGL.FormatOption]) -> bool: ... - def setOption(self, opt: typing.Union[QGL.FormatOptions, QGL.FormatOption]) -> None: ... - def setPlane(self, plane: int) -> None: ... - def plane(self) -> int: ... - def setOverlay(self, enable: bool) -> None: ... - def setDirectRendering(self, enable: bool) -> None: ... - def setStereo(self, enable: bool) -> None: ... - def setStencil(self, enable: bool) -> None: ... - def setAccum(self, enable: bool) -> None: ... - def setAlpha(self, enable: bool) -> None: ... - def setRgba(self, enable: bool) -> None: ... - def setDepth(self, enable: bool) -> None: ... - def setDoubleBuffer(self, enable: bool) -> None: ... - def samples(self) -> int: ... - def setSamples(self, numSamples: int) -> None: ... - def setSampleBuffers(self, enable: bool) -> None: ... - def stencilBufferSize(self) -> int: ... - def setStencilBufferSize(self, size: int) -> None: ... - def alphaBufferSize(self) -> int: ... - def setAlphaBufferSize(self, size: int) -> None: ... - def accumBufferSize(self) -> int: ... - def setAccumBufferSize(self, size: int) -> None: ... - def depthBufferSize(self) -> int: ... - def setDepthBufferSize(self, size: int) -> None: ... - - -class QGLContext(sip.wrapper): - - class BindOption(int): ... - NoBindOption = ... # type: 'QGLContext.BindOption' - InvertedYBindOption = ... # type: 'QGLContext.BindOption' - MipmapBindOption = ... # type: 'QGLContext.BindOption' - PremultipliedAlphaBindOption = ... # type: 'QGLContext.BindOption' - LinearFilteringBindOption = ... # type: 'QGLContext.BindOption' - DefaultBindOption = ... # type: 'QGLContext.BindOption' - - class BindOptions(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QGLContext.BindOptions', 'QGLContext.BindOption']) -> None: ... - @typing.overload - def __init__(self, a0: 'QGLContext.BindOptions') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QGLContext.BindOptions': ... - def __int__(self) -> int: ... - - def __init__(self, format: QGLFormat) -> None: ... - - def moveToThread(self, thread: QtCore.QThread) -> None: ... - @staticmethod - def areSharing(context1: 'QGLContext', context2: 'QGLContext') -> bool: ... - def setInitialized(self, on: bool) -> None: ... - def initialized(self) -> bool: ... - def setWindowCreated(self, on: bool) -> None: ... - def windowCreated(self) -> bool: ... - def deviceIsPixmap(self) -> bool: ... - def chooseContext(self, shareContext: typing.Optional['QGLContext'] = ...) -> bool: ... - @staticmethod - def currentContext() -> 'QGLContext': ... - def overlayTransparentColor(self) -> QtGui.QColor: ... - def device(self) -> QtGui.QPaintDevice: ... - def getProcAddress(self, proc: str) -> sip.voidptr: ... - @staticmethod - def textureCacheLimit() -> int: ... - @staticmethod - def setTextureCacheLimit(size: int) -> None: ... - def deleteTexture(self, tx_id: int) -> None: ... - @typing.overload - def drawTexture(self, target: QtCore.QRectF, textureId: int, textureTarget: int = ...) -> None: ... - @typing.overload - def drawTexture(self, point: typing.Union[QtCore.QPointF, QtCore.QPoint], textureId: int, textureTarget: int = ...) -> None: ... - @typing.overload - def bindTexture(self, image: QtGui.QImage, target: int = ..., format: int = ...) -> int: ... - @typing.overload - def bindTexture(self, pixmap: QtGui.QPixmap, target: int = ..., format: int = ...) -> int: ... - @typing.overload - def bindTexture(self, fileName: str) -> int: ... - @typing.overload - def bindTexture(self, image: QtGui.QImage, target: int, format: int, options: typing.Union['QGLContext.BindOptions', 'QGLContext.BindOption']) -> int: ... - @typing.overload - def bindTexture(self, pixmap: QtGui.QPixmap, target: int, format: int, options: typing.Union['QGLContext.BindOptions', 'QGLContext.BindOption']) -> int: ... - def swapBuffers(self) -> None: ... - def doneCurrent(self) -> None: ... - def makeCurrent(self) -> None: ... - def setFormat(self, format: QGLFormat) -> None: ... - def requestedFormat(self) -> QGLFormat: ... - def format(self) -> QGLFormat: ... - def reset(self) -> None: ... - def isSharing(self) -> bool: ... - def isValid(self) -> bool: ... - def create(self, shareContext: typing.Optional['QGLContext'] = ...) -> bool: ... - - -class QGLWidget(QtWidgets.QWidget): - - @typing.overload - def __init__(self, parent: typing.Optional[QtWidgets.QWidget] = ..., shareWidget: typing.Optional['QGLWidget'] = ..., flags: typing.Union[QtCore.Qt.WindowFlags, QtCore.Qt.WindowType] = ...) -> None: ... - @typing.overload - def __init__(self, context: QGLContext, parent: typing.Optional[QtWidgets.QWidget] = ..., shareWidget: typing.Optional['QGLWidget'] = ..., flags: typing.Union[QtCore.Qt.WindowFlags, QtCore.Qt.WindowType] = ...) -> None: ... - @typing.overload - def __init__(self, format: QGLFormat, parent: typing.Optional[QtWidgets.QWidget] = ..., shareWidget: typing.Optional['QGLWidget'] = ..., flags: typing.Union[QtCore.Qt.WindowFlags, QtCore.Qt.WindowType] = ...) -> None: ... - - def glDraw(self) -> None: ... - def glInit(self) -> None: ... - def resizeEvent(self, a0: QtGui.QResizeEvent) -> None: ... - def paintEvent(self, a0: QtGui.QPaintEvent) -> None: ... - def autoBufferSwap(self) -> bool: ... - def setAutoBufferSwap(self, on: bool) -> None: ... - def paintOverlayGL(self) -> None: ... - def resizeOverlayGL(self, w: int, h: int) -> None: ... - def initializeOverlayGL(self) -> None: ... - def paintGL(self) -> None: ... - def resizeGL(self, w: int, h: int) -> None: ... - def initializeGL(self) -> None: ... - def event(self, a0: QtCore.QEvent) -> bool: ... - def updateOverlayGL(self) -> None: ... - def updateGL(self) -> None: ... - def deleteTexture(self, tx_id: int) -> None: ... - @typing.overload - def drawTexture(self, target: QtCore.QRectF, textureId: int, textureTarget: int = ...) -> None: ... - @typing.overload - def drawTexture(self, point: typing.Union[QtCore.QPointF, QtCore.QPoint], textureId: int, textureTarget: int = ...) -> None: ... - @typing.overload - def bindTexture(self, image: QtGui.QImage, target: int = ..., format: int = ...) -> int: ... - @typing.overload - def bindTexture(self, pixmap: QtGui.QPixmap, target: int = ..., format: int = ...) -> int: ... - @typing.overload - def bindTexture(self, fileName: str) -> int: ... - @typing.overload - def bindTexture(self, image: QtGui.QImage, target: int, format: int, options: typing.Union[QGLContext.BindOptions, QGLContext.BindOption]) -> int: ... - @typing.overload - def bindTexture(self, pixmap: QtGui.QPixmap, target: int, format: int, options: typing.Union[QGLContext.BindOptions, QGLContext.BindOption]) -> int: ... - def paintEngine(self) -> QtGui.QPaintEngine: ... - @typing.overload - def renderText(self, x: int, y: int, str: str, font: QtGui.QFont = ...) -> None: ... - @typing.overload - def renderText(self, x: float, y: float, z: float, str: str, font: QtGui.QFont = ...) -> None: ... - @staticmethod - def convertToGLFormat(img: QtGui.QImage) -> QtGui.QImage: ... - def overlayContext(self) -> QGLContext: ... - def makeOverlayCurrent(self) -> None: ... - def grabFrameBuffer(self, withAlpha: bool = ...) -> QtGui.QImage: ... - def renderPixmap(self, width: int = ..., height: int = ..., useContext: bool = ...) -> QtGui.QPixmap: ... - def setContext(self, context: QGLContext, shareContext: typing.Optional[QGLContext] = ..., deleteOldContext: bool = ...) -> None: ... - def context(self) -> QGLContext: ... - def format(self) -> QGLFormat: ... - def swapBuffers(self) -> None: ... - def doubleBuffer(self) -> bool: ... - def doneCurrent(self) -> None: ... - def makeCurrent(self) -> None: ... - def isSharing(self) -> bool: ... - def isValid(self) -> bool: ... - def qglClearColor(self, c: typing.Union[QtGui.QColor, QtCore.Qt.GlobalColor]) -> None: ... - def qglColor(self, c: typing.Union[QtGui.QColor, QtCore.Qt.GlobalColor]) -> None: ... diff -Nru uranium-3.3.0/stubs/PyQt5/QtPositioning.pyi uranium-4.4.1/stubs/PyQt5/QtPositioning.pyi --- uranium-3.3.0/stubs/PyQt5/QtPositioning.pyi 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/stubs/PyQt5/QtPositioning.pyi 1970-01-01 00:00:00.000000000 +0000 @@ -1,436 +0,0 @@ -# The PEP 484 type hints stub file for the QtPositioning module. -# -# Generated by SIP 4.18.1 -# -# Copyright (c) 2016 Riverbank Computing Limited -# -# This file is part of PyQt5. -# -# This file may be used under the terms of the GNU General Public License -# version 3.0 as published by the Free Software Foundation and appearing in -# the file LICENSE included in the packaging of this file. Please review the -# following information to ensure the GNU General Public License version 3.0 -# requirements will be met: http://www.gnu.org/copyleft/gpl.html. -# -# If you do not wish to use this file under the terms of the GPL version 3.0 -# then you may purchase a commercial license. For more information contact -# info@riverbankcomputing.com. -# -# This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -# WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - - -import typing -import sip - -from PyQt5 import QtCore - -# Support for QDate, QDateTime and QTime. -import datetime - -# Convenient type aliases. -PYQT_SIGNAL = typing.Union[QtCore.pyqtSignal, QtCore.pyqtBoundSignal] -PYQT_SLOT = typing.Union[typing.Callable[..., None], QtCore.pyqtBoundSignal] - - -class QGeoAddress(sip.wrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, other: 'QGeoAddress') -> None: ... - - def isTextGenerated(self) -> bool: ... - def clear(self) -> None: ... - def isEmpty(self) -> bool: ... - def setStreet(self, street: str) -> None: ... - def street(self) -> str: ... - def setPostalCode(self, postalCode: str) -> None: ... - def postalCode(self) -> str: ... - def setDistrict(self, district: str) -> None: ... - def district(self) -> str: ... - def setCity(self, city: str) -> None: ... - def city(self) -> str: ... - def setCounty(self, county: str) -> None: ... - def county(self) -> str: ... - def setState(self, state: str) -> None: ... - def state(self) -> str: ... - def setCountryCode(self, countryCode: str) -> None: ... - def countryCode(self) -> str: ... - def setCountry(self, country: str) -> None: ... - def country(self) -> str: ... - def setText(self, text: str) -> None: ... - def text(self) -> str: ... - - -class QGeoAreaMonitorInfo(sip.wrapper): - - @typing.overload - def __init__(self, name: str = ...) -> None: ... - @typing.overload - def __init__(self, other: 'QGeoAreaMonitorInfo') -> None: ... - - def setNotificationParameters(self, parameters: typing.Dict[str, typing.Any]) -> None: ... - def notificationParameters(self) -> typing.Dict[str, typing.Any]: ... - def setPersistent(self, isPersistent: bool) -> None: ... - def isPersistent(self) -> bool: ... - def setExpiration(self, expiry: typing.Union[QtCore.QDateTime, datetime.datetime]) -> None: ... - def expiration(self) -> QtCore.QDateTime: ... - def setArea(self, newShape: 'QGeoShape') -> None: ... - def area(self) -> 'QGeoShape': ... - def isValid(self) -> bool: ... - def identifier(self) -> str: ... - def setName(self, name: str) -> None: ... - def name(self) -> str: ... - - -class QGeoAreaMonitorSource(QtCore.QObject): - - class AreaMonitorFeature(int): ... - PersistentAreaMonitorFeature = ... # type: 'QGeoAreaMonitorSource.AreaMonitorFeature' - AnyAreaMonitorFeature = ... # type: 'QGeoAreaMonitorSource.AreaMonitorFeature' - - class Error(int): ... - AccessError = ... # type: 'QGeoAreaMonitorSource.Error' - InsufficientPositionInfo = ... # type: 'QGeoAreaMonitorSource.Error' - UnknownSourceError = ... # type: 'QGeoAreaMonitorSource.Error' - NoError = ... # type: 'QGeoAreaMonitorSource.Error' - - class AreaMonitorFeatures(sip.wrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QGeoAreaMonitorSource.AreaMonitorFeatures', 'QGeoAreaMonitorSource.AreaMonitorFeature']) -> None: ... - @typing.overload - def __init__(self, a0: 'QGeoAreaMonitorSource.AreaMonitorFeatures') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QGeoAreaMonitorSource.AreaMonitorFeatures': ... - def __int__(self) -> int: ... - - def __init__(self, parent: QtCore.QObject) -> None: ... - - def monitorExpired(self, monitor: QGeoAreaMonitorInfo) -> None: ... - def areaExited(self, monitor: QGeoAreaMonitorInfo, update: 'QGeoPositionInfo') -> None: ... - def areaEntered(self, monitor: QGeoAreaMonitorInfo, update: 'QGeoPositionInfo') -> None: ... - @typing.overload - def activeMonitors(self) -> typing.Any: ... - @typing.overload - def activeMonitors(self, lookupArea: 'QGeoShape') -> typing.List[QGeoAreaMonitorInfo]: ... - def requestUpdate(self, monitor: QGeoAreaMonitorInfo, signal: str) -> bool: ... - def stopMonitoring(self, monitor: QGeoAreaMonitorInfo) -> bool: ... - def startMonitoring(self, monitor: QGeoAreaMonitorInfo) -> bool: ... - def supportedAreaMonitorFeatures(self) -> 'QGeoAreaMonitorSource.AreaMonitorFeatures': ... - @typing.overload - def error(self) -> 'QGeoAreaMonitorSource.Error': ... - @typing.overload - def error(self, error: 'QGeoAreaMonitorSource.Error') -> None: ... - def sourceName(self) -> str: ... - def positionInfoSource(self) -> 'QGeoPositionInfoSource': ... - def setPositionInfoSource(self, source: 'QGeoPositionInfoSource') -> None: ... - @staticmethod - def availableSources() -> typing.List[str]: ... - @staticmethod - def createSource(sourceName: str, parent: QtCore.QObject) -> 'QGeoAreaMonitorSource': ... - @staticmethod - def createDefaultSource(parent: QtCore.QObject) -> 'QGeoAreaMonitorSource': ... - - -class QGeoShape(sip.wrapper): - - class ShapeType(int): ... - UnknownType = ... # type: 'QGeoShape.ShapeType' - RectangleType = ... # type: 'QGeoShape.ShapeType' - CircleType = ... # type: 'QGeoShape.ShapeType' - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, other: 'QGeoShape') -> None: ... - - def toString(self) -> str: ... - def center(self) -> 'QGeoCoordinate': ... - def extendShape(self, coordinate: 'QGeoCoordinate') -> None: ... - def contains(self, coordinate: 'QGeoCoordinate') -> bool: ... - def isEmpty(self) -> bool: ... - def isValid(self) -> bool: ... - def type(self) -> 'QGeoShape.ShapeType': ... - - -class QGeoCircle(QGeoShape): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, center: 'QGeoCoordinate', radius: float = ...) -> None: ... - @typing.overload - def __init__(self, other: 'QGeoCircle') -> None: ... - @typing.overload - def __init__(self, other: QGeoShape) -> None: ... - - def toString(self) -> str: ... - def translated(self, degreesLatitude: float, degreesLongitude: float) -> 'QGeoCircle': ... - def translate(self, degreesLatitude: float, degreesLongitude: float) -> None: ... - def radius(self) -> float: ... - def setRadius(self, radius: float) -> None: ... - def center(self) -> 'QGeoCoordinate': ... - def setCenter(self, center: 'QGeoCoordinate') -> None: ... - - -class QGeoCoordinate(sip.wrapper): - - class CoordinateFormat(int): ... - Degrees = ... # type: 'QGeoCoordinate.CoordinateFormat' - DegreesWithHemisphere = ... # type: 'QGeoCoordinate.CoordinateFormat' - DegreesMinutes = ... # type: 'QGeoCoordinate.CoordinateFormat' - DegreesMinutesWithHemisphere = ... # type: 'QGeoCoordinate.CoordinateFormat' - DegreesMinutesSeconds = ... # type: 'QGeoCoordinate.CoordinateFormat' - DegreesMinutesSecondsWithHemisphere = ... # type: 'QGeoCoordinate.CoordinateFormat' - - class CoordinateType(int): ... - InvalidCoordinate = ... # type: 'QGeoCoordinate.CoordinateType' - Coordinate2D = ... # type: 'QGeoCoordinate.CoordinateType' - Coordinate3D = ... # type: 'QGeoCoordinate.CoordinateType' - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, latitude: float, longitude: float) -> None: ... - @typing.overload - def __init__(self, latitude: float, longitude: float, altitude: float) -> None: ... - @typing.overload - def __init__(self, other: 'QGeoCoordinate') -> None: ... - - def __hash__(self) -> int: ... - def toString(self, format: 'QGeoCoordinate.CoordinateFormat' = ...) -> str: ... - def atDistanceAndAzimuth(self, distance: float, azimuth: float, distanceUp: float = ...) -> 'QGeoCoordinate': ... - def azimuthTo(self, other: 'QGeoCoordinate') -> float: ... - def distanceTo(self, other: 'QGeoCoordinate') -> float: ... - def altitude(self) -> float: ... - def setAltitude(self, altitude: float) -> None: ... - def longitude(self) -> float: ... - def setLongitude(self, longitude: float) -> None: ... - def latitude(self) -> float: ... - def setLatitude(self, latitude: float) -> None: ... - def type(self) -> 'QGeoCoordinate.CoordinateType': ... - def isValid(self) -> bool: ... - - -class QGeoLocation(sip.wrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, other: 'QGeoLocation') -> None: ... - - def isEmpty(self) -> bool: ... - def setBoundingBox(self, box: 'QGeoRectangle') -> None: ... - def boundingBox(self) -> 'QGeoRectangle': ... - def setCoordinate(self, position: QGeoCoordinate) -> None: ... - def coordinate(self) -> QGeoCoordinate: ... - def setAddress(self, address: QGeoAddress) -> None: ... - def address(self) -> QGeoAddress: ... - - -class QGeoPositionInfo(sip.wrapper): - - class Attribute(int): ... - Direction = ... # type: 'QGeoPositionInfo.Attribute' - GroundSpeed = ... # type: 'QGeoPositionInfo.Attribute' - VerticalSpeed = ... # type: 'QGeoPositionInfo.Attribute' - MagneticVariation = ... # type: 'QGeoPositionInfo.Attribute' - HorizontalAccuracy = ... # type: 'QGeoPositionInfo.Attribute' - VerticalAccuracy = ... # type: 'QGeoPositionInfo.Attribute' - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, coordinate: QGeoCoordinate, updateTime: typing.Union[QtCore.QDateTime, datetime.datetime]) -> None: ... - @typing.overload - def __init__(self, other: 'QGeoPositionInfo') -> None: ... - - def hasAttribute(self, attribute: 'QGeoPositionInfo.Attribute') -> bool: ... - def removeAttribute(self, attribute: 'QGeoPositionInfo.Attribute') -> None: ... - def attribute(self, attribute: 'QGeoPositionInfo.Attribute') -> float: ... - def setAttribute(self, attribute: 'QGeoPositionInfo.Attribute', value: float) -> None: ... - def coordinate(self) -> QGeoCoordinate: ... - def setCoordinate(self, coordinate: QGeoCoordinate) -> None: ... - def timestamp(self) -> QtCore.QDateTime: ... - def setTimestamp(self, timestamp: typing.Union[QtCore.QDateTime, datetime.datetime]) -> None: ... - def isValid(self) -> bool: ... - - -class QGeoPositionInfoSource(QtCore.QObject): - - class PositioningMethod(int): ... - NoPositioningMethods = ... # type: 'QGeoPositionInfoSource.PositioningMethod' - SatellitePositioningMethods = ... # type: 'QGeoPositionInfoSource.PositioningMethod' - NonSatellitePositioningMethods = ... # type: 'QGeoPositionInfoSource.PositioningMethod' - AllPositioningMethods = ... # type: 'QGeoPositionInfoSource.PositioningMethod' - - class Error(int): ... - AccessError = ... # type: 'QGeoPositionInfoSource.Error' - ClosedError = ... # type: 'QGeoPositionInfoSource.Error' - UnknownSourceError = ... # type: 'QGeoPositionInfoSource.Error' - NoError = ... # type: 'QGeoPositionInfoSource.Error' - - class PositioningMethods(sip.wrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QGeoPositionInfoSource.PositioningMethods', 'QGeoPositionInfoSource.PositioningMethod']) -> None: ... - @typing.overload - def __init__(self, a0: 'QGeoPositionInfoSource.PositioningMethods') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QGeoPositionInfoSource.PositioningMethods': ... - def __int__(self) -> int: ... - - def __init__(self, parent: QtCore.QObject) -> None: ... - - def updateTimeout(self) -> None: ... - def positionUpdated(self, update: QGeoPositionInfo) -> None: ... - def requestUpdate(self, timeout: int = ...) -> None: ... - def stopUpdates(self) -> None: ... - def startUpdates(self) -> None: ... - @typing.overload - def error(self) -> 'QGeoPositionInfoSource.Error': ... - @typing.overload - def error(self, a0: 'QGeoPositionInfoSource.Error') -> None: ... - @staticmethod - def availableSources() -> typing.List[str]: ... - @staticmethod - def createSource(sourceName: str, parent: QtCore.QObject) -> 'QGeoPositionInfoSource': ... - @staticmethod - def createDefaultSource(parent: QtCore.QObject) -> 'QGeoPositionInfoSource': ... - def sourceName(self) -> str: ... - def minimumUpdateInterval(self) -> int: ... - def supportedPositioningMethods(self) -> 'QGeoPositionInfoSource.PositioningMethods': ... - def lastKnownPosition(self, fromSatellitePositioningMethodsOnly: bool = ...) -> QGeoPositionInfo: ... - def preferredPositioningMethods(self) -> 'QGeoPositionInfoSource.PositioningMethods': ... - def setPreferredPositioningMethods(self, methods: 'QGeoPositionInfoSource.PositioningMethods') -> None: ... - def updateInterval(self) -> int: ... - def setUpdateInterval(self, msec: int) -> None: ... - - -class QGeoRectangle(QGeoShape): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, center: QGeoCoordinate, degreesWidth: float, degreesHeight: float) -> None: ... - @typing.overload - def __init__(self, topLeft: QGeoCoordinate, bottomRight: QGeoCoordinate) -> None: ... - @typing.overload - def __init__(self, coordinates: typing.Any) -> None: ... - @typing.overload - def __init__(self, other: 'QGeoRectangle') -> None: ... - @typing.overload - def __init__(self, other: QGeoShape) -> None: ... - - def toString(self) -> str: ... - def united(self, rectangle: 'QGeoRectangle') -> 'QGeoRectangle': ... - def translated(self, degreesLatitude: float, degreesLongitude: float) -> 'QGeoRectangle': ... - def translate(self, degreesLatitude: float, degreesLongitude: float) -> None: ... - def intersects(self, rectangle: 'QGeoRectangle') -> bool: ... - def contains(self, rectangle: 'QGeoRectangle') -> bool: ... - def height(self) -> float: ... - def setHeight(self, degreesHeight: float) -> None: ... - def width(self) -> float: ... - def setWidth(self, degreesWidth: float) -> None: ... - def center(self) -> QGeoCoordinate: ... - def setCenter(self, center: QGeoCoordinate) -> None: ... - def bottomRight(self) -> QGeoCoordinate: ... - def setBottomRight(self, bottomRight: QGeoCoordinate) -> None: ... - def bottomLeft(self) -> QGeoCoordinate: ... - def setBottomLeft(self, bottomLeft: QGeoCoordinate) -> None: ... - def topRight(self) -> QGeoCoordinate: ... - def setTopRight(self, topRight: QGeoCoordinate) -> None: ... - def topLeft(self) -> QGeoCoordinate: ... - def setTopLeft(self, topLeft: QGeoCoordinate) -> None: ... - - -class QGeoSatelliteInfo(sip.wrapper): - - class SatelliteSystem(int): ... - Undefined = ... # type: 'QGeoSatelliteInfo.SatelliteSystem' - GPS = ... # type: 'QGeoSatelliteInfo.SatelliteSystem' - GLONASS = ... # type: 'QGeoSatelliteInfo.SatelliteSystem' - - class Attribute(int): ... - Elevation = ... # type: 'QGeoSatelliteInfo.Attribute' - Azimuth = ... # type: 'QGeoSatelliteInfo.Attribute' - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, other: 'QGeoSatelliteInfo') -> None: ... - - def hasAttribute(self, attribute: 'QGeoSatelliteInfo.Attribute') -> bool: ... - def removeAttribute(self, attribute: 'QGeoSatelliteInfo.Attribute') -> None: ... - def attribute(self, attribute: 'QGeoSatelliteInfo.Attribute') -> float: ... - def setAttribute(self, attribute: 'QGeoSatelliteInfo.Attribute', value: float) -> None: ... - def signalStrength(self) -> int: ... - def setSignalStrength(self, signalStrength: int) -> None: ... - def satelliteIdentifier(self) -> int: ... - def setSatelliteIdentifier(self, satId: int) -> None: ... - def satelliteSystem(self) -> 'QGeoSatelliteInfo.SatelliteSystem': ... - def setSatelliteSystem(self, system: 'QGeoSatelliteInfo.SatelliteSystem') -> None: ... - - -class QGeoSatelliteInfoSource(QtCore.QObject): - - class Error(int): ... - AccessError = ... # type: 'QGeoSatelliteInfoSource.Error' - ClosedError = ... # type: 'QGeoSatelliteInfoSource.Error' - NoError = ... # type: 'QGeoSatelliteInfoSource.Error' - UnknownSourceError = ... # type: 'QGeoSatelliteInfoSource.Error' - - def __init__(self, parent: QtCore.QObject) -> None: ... - - def requestTimeout(self) -> None: ... - def satellitesInUseUpdated(self, satellites: typing.Iterable[QGeoSatelliteInfo]) -> None: ... - def satellitesInViewUpdated(self, satellites: typing.Any) -> None: ... - def requestUpdate(self, timeout: int = ...) -> None: ... - def stopUpdates(self) -> None: ... - def startUpdates(self) -> None: ... - @typing.overload - def error(self) -> 'QGeoSatelliteInfoSource.Error': ... - @typing.overload - def error(self, a0: 'QGeoSatelliteInfoSource.Error') -> None: ... - def minimumUpdateInterval(self) -> int: ... - def updateInterval(self) -> int: ... - def setUpdateInterval(self, msec: int) -> None: ... - def sourceName(self) -> str: ... - @staticmethod - def availableSources() -> typing.List[str]: ... - @staticmethod - def createSource(sourceName: str, parent: QtCore.QObject) -> 'QGeoSatelliteInfoSource': ... - @staticmethod - def createDefaultSource(parent: QtCore.QObject) -> 'QGeoSatelliteInfoSource': ... - - -class QNmeaPositionInfoSource(QGeoPositionInfoSource): - - class UpdateMode(int): ... - RealTimeMode = ... # type: 'QNmeaPositionInfoSource.UpdateMode' - SimulationMode = ... # type: 'QNmeaPositionInfoSource.UpdateMode' - - def __init__(self, updateMode: 'QNmeaPositionInfoSource.UpdateMode', parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def userEquivalentRangeError(self) -> float: ... - def setUserEquivalentRangeError(self, uere: float) -> None: ... - def parsePosInfoFromNmeaData(self, data: str, size: int, posInfo: QGeoPositionInfo) -> typing.Tuple[bool, bool]: ... - def requestUpdate(self, timeout: int = ...) -> None: ... - def stopUpdates(self) -> None: ... - def startUpdates(self) -> None: ... - def error(self) -> QGeoPositionInfoSource.Error: ... - def minimumUpdateInterval(self) -> int: ... - def supportedPositioningMethods(self) -> QGeoPositionInfoSource.PositioningMethods: ... - def lastKnownPosition(self, fromSatellitePositioningMethodsOnly: bool = ...) -> QGeoPositionInfo: ... - def setUpdateInterval(self, msec: int) -> None: ... - def device(self) -> QtCore.QIODevice: ... - def setDevice(self, source: QtCore.QIODevice) -> None: ... - def updateMode(self) -> 'QNmeaPositionInfoSource.UpdateMode': ... diff -Nru uranium-3.3.0/stubs/PyQt5/QtPrintSupport.pyi uranium-4.4.1/stubs/PyQt5/QtPrintSupport.pyi --- uranium-3.3.0/stubs/PyQt5/QtPrintSupport.pyi 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/stubs/PyQt5/QtPrintSupport.pyi 1970-01-01 00:00:00.000000000 +0000 @@ -1,432 +0,0 @@ -# The PEP 484 type hints stub file for the QtPrintSupport module. -# -# Generated by SIP 4.18.1 -# -# Copyright (c) 2016 Riverbank Computing Limited -# -# This file is part of PyQt5. -# -# This file may be used under the terms of the GNU General Public License -# version 3.0 as published by the Free Software Foundation and appearing in -# the file LICENSE included in the packaging of this file. Please review the -# following information to ensure the GNU General Public License version 3.0 -# requirements will be met: http://www.gnu.org/copyleft/gpl.html. -# -# If you do not wish to use this file under the terms of the GPL version 3.0 -# then you may purchase a commercial license. For more information contact -# info@riverbankcomputing.com. -# -# This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -# WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - - -import typing -import sip - -from PyQt5 import QtWidgets -from PyQt5 import QtGui -from PyQt5 import QtCore - -# Support for QDate, QDateTime and QTime. -import datetime - -# Convenient type aliases. -PYQT_SIGNAL = typing.Union[QtCore.pyqtSignal, QtCore.pyqtBoundSignal] -PYQT_SLOT = typing.Union[typing.Callable[..., None], QtCore.pyqtBoundSignal] - -# Convenient aliases for complicated OpenGL types. -PYQT_OPENGL_ARRAY = typing.Union[typing.Sequence[int], typing.Sequence[float], - sip.Buffer, None] -PYQT_OPENGL_BOUND_ARRAY = typing.Union[typing.Sequence[int], - typing.Sequence[float], sip.Buffer, int, None] - - -class QAbstractPrintDialog(QtWidgets.QDialog): - - class PrintDialogOption(int): ... - None_ = ... # type: 'QAbstractPrintDialog.PrintDialogOption' - PrintToFile = ... # type: 'QAbstractPrintDialog.PrintDialogOption' - PrintSelection = ... # type: 'QAbstractPrintDialog.PrintDialogOption' - PrintPageRange = ... # type: 'QAbstractPrintDialog.PrintDialogOption' - PrintCollateCopies = ... # type: 'QAbstractPrintDialog.PrintDialogOption' - PrintShowPageSize = ... # type: 'QAbstractPrintDialog.PrintDialogOption' - PrintCurrentPage = ... # type: 'QAbstractPrintDialog.PrintDialogOption' - - class PrintRange(int): ... - AllPages = ... # type: 'QAbstractPrintDialog.PrintRange' - Selection = ... # type: 'QAbstractPrintDialog.PrintRange' - PageRange = ... # type: 'QAbstractPrintDialog.PrintRange' - CurrentPage = ... # type: 'QAbstractPrintDialog.PrintRange' - - class PrintDialogOptions(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QAbstractPrintDialog.PrintDialogOptions', 'QAbstractPrintDialog.PrintDialogOption']) -> None: ... - @typing.overload - def __init__(self, a0: 'QAbstractPrintDialog.PrintDialogOptions') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QAbstractPrintDialog.PrintDialogOptions': ... - def __int__(self) -> int: ... - - def __init__(self, printer: 'QPrinter', parent: typing.Optional[QtWidgets.QWidget] = ...) -> None: ... - - def enabledOptions(self) -> 'QAbstractPrintDialog.PrintDialogOptions': ... - def setEnabledOptions(self, options: typing.Union['QAbstractPrintDialog.PrintDialogOptions', 'QAbstractPrintDialog.PrintDialogOption']) -> None: ... - def setOptionTabs(self, tabs: typing.Iterable[QtWidgets.QWidget]) -> None: ... - def printer(self) -> 'QPrinter': ... - def toPage(self) -> int: ... - def fromPage(self) -> int: ... - def setFromTo(self, fromPage: int, toPage: int) -> None: ... - def maxPage(self) -> int: ... - def minPage(self) -> int: ... - def setMinMax(self, min: int, max: int) -> None: ... - def printRange(self) -> 'QAbstractPrintDialog.PrintRange': ... - def setPrintRange(self, range: 'QAbstractPrintDialog.PrintRange') -> None: ... - def exec(self) -> int: ... - def exec_(self) -> int: ... - - -class QPageSetupDialog(QtWidgets.QDialog): - - @typing.overload - def __init__(self, printer: 'QPrinter', parent: typing.Optional[QtWidgets.QWidget] = ...) -> None: ... - @typing.overload - def __init__(self, parent: typing.Optional[QtWidgets.QWidget] = ...) -> None: ... - - def printer(self) -> 'QPrinter': ... - def done(self, result: int) -> None: ... - @typing.overload - def open(self) -> None: ... - @typing.overload - def open(self, slot: PYQT_SLOT) -> None: ... - def exec(self) -> int: ... - def exec_(self) -> int: ... - def setVisible(self, visible: bool) -> None: ... - - -class QPrintDialog(QAbstractPrintDialog): - - @typing.overload - def __init__(self, printer: 'QPrinter', parent: typing.Optional[QtWidgets.QWidget] = ...) -> None: ... - @typing.overload - def __init__(self, parent: typing.Optional[QtWidgets.QWidget] = ...) -> None: ... - - @typing.overload - def accepted(self) -> None: ... - @typing.overload - def accepted(self, printer: 'QPrinter') -> None: ... - @typing.overload - def open(self) -> None: ... - @typing.overload - def open(self, slot: PYQT_SLOT) -> None: ... - def setVisible(self, visible: bool) -> None: ... - def options(self) -> QAbstractPrintDialog.PrintDialogOptions: ... - def setOptions(self, options: typing.Union[QAbstractPrintDialog.PrintDialogOptions, QAbstractPrintDialog.PrintDialogOption]) -> None: ... - def testOption(self, option: QAbstractPrintDialog.PrintDialogOption) -> bool: ... - def setOption(self, option: QAbstractPrintDialog.PrintDialogOption, on: bool = ...) -> None: ... - def done(self, result: int) -> None: ... - def accept(self) -> None: ... - def exec(self) -> int: ... - def exec_(self) -> int: ... - - -class QPrintEngine(sip.simplewrapper): - - class PrintEnginePropertyKey(int): ... - PPK_CollateCopies = ... # type: 'QPrintEngine.PrintEnginePropertyKey' - PPK_ColorMode = ... # type: 'QPrintEngine.PrintEnginePropertyKey' - PPK_Creator = ... # type: 'QPrintEngine.PrintEnginePropertyKey' - PPK_DocumentName = ... # type: 'QPrintEngine.PrintEnginePropertyKey' - PPK_FullPage = ... # type: 'QPrintEngine.PrintEnginePropertyKey' - PPK_NumberOfCopies = ... # type: 'QPrintEngine.PrintEnginePropertyKey' - PPK_Orientation = ... # type: 'QPrintEngine.PrintEnginePropertyKey' - PPK_OutputFileName = ... # type: 'QPrintEngine.PrintEnginePropertyKey' - PPK_PageOrder = ... # type: 'QPrintEngine.PrintEnginePropertyKey' - PPK_PageRect = ... # type: 'QPrintEngine.PrintEnginePropertyKey' - PPK_PageSize = ... # type: 'QPrintEngine.PrintEnginePropertyKey' - PPK_PaperRect = ... # type: 'QPrintEngine.PrintEnginePropertyKey' - PPK_PaperSource = ... # type: 'QPrintEngine.PrintEnginePropertyKey' - PPK_PrinterName = ... # type: 'QPrintEngine.PrintEnginePropertyKey' - PPK_PrinterProgram = ... # type: 'QPrintEngine.PrintEnginePropertyKey' - PPK_Resolution = ... # type: 'QPrintEngine.PrintEnginePropertyKey' - PPK_SelectionOption = ... # type: 'QPrintEngine.PrintEnginePropertyKey' - PPK_SupportedResolutions = ... # type: 'QPrintEngine.PrintEnginePropertyKey' - PPK_WindowsPageSize = ... # type: 'QPrintEngine.PrintEnginePropertyKey' - PPK_FontEmbedding = ... # type: 'QPrintEngine.PrintEnginePropertyKey' - PPK_Duplex = ... # type: 'QPrintEngine.PrintEnginePropertyKey' - PPK_PaperSources = ... # type: 'QPrintEngine.PrintEnginePropertyKey' - PPK_CustomPaperSize = ... # type: 'QPrintEngine.PrintEnginePropertyKey' - PPK_PageMargins = ... # type: 'QPrintEngine.PrintEnginePropertyKey' - PPK_PaperSize = ... # type: 'QPrintEngine.PrintEnginePropertyKey' - PPK_CopyCount = ... # type: 'QPrintEngine.PrintEnginePropertyKey' - PPK_SupportsMultipleCopies = ... # type: 'QPrintEngine.PrintEnginePropertyKey' - PPK_PaperName = ... # type: 'QPrintEngine.PrintEnginePropertyKey' - PPK_QPageSize = ... # type: 'QPrintEngine.PrintEnginePropertyKey' - PPK_QPageMargins = ... # type: 'QPrintEngine.PrintEnginePropertyKey' - PPK_QPageLayout = ... # type: 'QPrintEngine.PrintEnginePropertyKey' - PPK_CustomBase = ... # type: 'QPrintEngine.PrintEnginePropertyKey' - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QPrintEngine') -> None: ... - - def printerState(self) -> 'QPrinter.PrinterState': ... - def metric(self, a0: QtGui.QPaintDevice.PaintDeviceMetric) -> int: ... - def abort(self) -> bool: ... - def newPage(self) -> bool: ... - def property(self, key: 'QPrintEngine.PrintEnginePropertyKey') -> typing.Any: ... - def setProperty(self, key: 'QPrintEngine.PrintEnginePropertyKey', value: typing.Any) -> None: ... - - -class QPrinter(QtGui.QPagedPaintDevice): - - class DuplexMode(int): ... - DuplexNone = ... # type: 'QPrinter.DuplexMode' - DuplexAuto = ... # type: 'QPrinter.DuplexMode' - DuplexLongSide = ... # type: 'QPrinter.DuplexMode' - DuplexShortSide = ... # type: 'QPrinter.DuplexMode' - - class Unit(int): ... - Millimeter = ... # type: 'QPrinter.Unit' - Point = ... # type: 'QPrinter.Unit' - Inch = ... # type: 'QPrinter.Unit' - Pica = ... # type: 'QPrinter.Unit' - Didot = ... # type: 'QPrinter.Unit' - Cicero = ... # type: 'QPrinter.Unit' - DevicePixel = ... # type: 'QPrinter.Unit' - - class PrintRange(int): ... - AllPages = ... # type: 'QPrinter.PrintRange' - Selection = ... # type: 'QPrinter.PrintRange' - PageRange = ... # type: 'QPrinter.PrintRange' - CurrentPage = ... # type: 'QPrinter.PrintRange' - - class OutputFormat(int): ... - NativeFormat = ... # type: 'QPrinter.OutputFormat' - PdfFormat = ... # type: 'QPrinter.OutputFormat' - - class PrinterState(int): ... - Idle = ... # type: 'QPrinter.PrinterState' - Active = ... # type: 'QPrinter.PrinterState' - Aborted = ... # type: 'QPrinter.PrinterState' - Error = ... # type: 'QPrinter.PrinterState' - - class PaperSource(int): ... - OnlyOne = ... # type: 'QPrinter.PaperSource' - Lower = ... # type: 'QPrinter.PaperSource' - Middle = ... # type: 'QPrinter.PaperSource' - Manual = ... # type: 'QPrinter.PaperSource' - Envelope = ... # type: 'QPrinter.PaperSource' - EnvelopeManual = ... # type: 'QPrinter.PaperSource' - Auto = ... # type: 'QPrinter.PaperSource' - Tractor = ... # type: 'QPrinter.PaperSource' - SmallFormat = ... # type: 'QPrinter.PaperSource' - LargeFormat = ... # type: 'QPrinter.PaperSource' - LargeCapacity = ... # type: 'QPrinter.PaperSource' - Cassette = ... # type: 'QPrinter.PaperSource' - FormSource = ... # type: 'QPrinter.PaperSource' - MaxPageSource = ... # type: 'QPrinter.PaperSource' - Upper = ... # type: 'QPrinter.PaperSource' - CustomSource = ... # type: 'QPrinter.PaperSource' - LastPaperSource = ... # type: 'QPrinter.PaperSource' - - class ColorMode(int): ... - GrayScale = ... # type: 'QPrinter.ColorMode' - Color = ... # type: 'QPrinter.ColorMode' - - class PageOrder(int): ... - FirstPageFirst = ... # type: 'QPrinter.PageOrder' - LastPageFirst = ... # type: 'QPrinter.PageOrder' - - class Orientation(int): ... - Portrait = ... # type: 'QPrinter.Orientation' - Landscape = ... # type: 'QPrinter.Orientation' - - class PrinterMode(int): ... - ScreenResolution = ... # type: 'QPrinter.PrinterMode' - PrinterResolution = ... # type: 'QPrinter.PrinterMode' - HighResolution = ... # type: 'QPrinter.PrinterMode' - - @typing.overload - def __init__(self, mode: 'QPrinter.PrinterMode' = ...) -> None: ... - @typing.overload - def __init__(self, printer: 'QPrinterInfo', mode: 'QPrinter.PrinterMode' = ...) -> None: ... - - def paperName(self) -> str: ... - def setPaperName(self, paperName: str) -> None: ... - def setEngines(self, printEngine: QPrintEngine, paintEngine: QtGui.QPaintEngine) -> None: ... - def metric(self, a0: QtGui.QPaintDevice.PaintDeviceMetric) -> int: ... - def getPageMargins(self, unit: 'QPrinter.Unit') -> typing.Tuple[float, float, float, float]: ... - def setPageMargins(self, left: float, top: float, right: float, bottom: float, unit: 'QPrinter.Unit') -> None: ... - def setMargins(self, m: QtGui.QPagedPaintDevice.Margins) -> None: ... - def printRange(self) -> 'QPrinter.PrintRange': ... - def setPrintRange(self, range: 'QPrinter.PrintRange') -> None: ... - def toPage(self) -> int: ... - def fromPage(self) -> int: ... - def setFromTo(self, fromPage: int, toPage: int) -> None: ... - def printEngine(self) -> QPrintEngine: ... - def paintEngine(self) -> QtGui.QPaintEngine: ... - def printerState(self) -> 'QPrinter.PrinterState': ... - def abort(self) -> bool: ... - def newPage(self) -> bool: ... - def setPrinterSelectionOption(self, a0: str) -> None: ... - def printerSelectionOption(self) -> str: ... - @typing.overload - def pageRect(self) -> QtCore.QRect: ... - @typing.overload - def pageRect(self, a0: 'QPrinter.Unit') -> QtCore.QRectF: ... - @typing.overload - def paperRect(self) -> QtCore.QRect: ... - @typing.overload - def paperRect(self, a0: 'QPrinter.Unit') -> QtCore.QRectF: ... - def doubleSidedPrinting(self) -> bool: ... - def setDoubleSidedPrinting(self, enable: bool) -> None: ... - def fontEmbeddingEnabled(self) -> bool: ... - def setFontEmbeddingEnabled(self, enable: bool) -> None: ... - def supportedResolutions(self) -> typing.List[int]: ... - def duplex(self) -> 'QPrinter.DuplexMode': ... - def setDuplex(self, duplex: 'QPrinter.DuplexMode') -> None: ... - def paperSource(self) -> 'QPrinter.PaperSource': ... - def setPaperSource(self, a0: 'QPrinter.PaperSource') -> None: ... - def supportsMultipleCopies(self) -> bool: ... - def copyCount(self) -> int: ... - def setCopyCount(self, a0: int) -> None: ... - def fullPage(self) -> bool: ... - def setFullPage(self, a0: bool) -> None: ... - def collateCopies(self) -> bool: ... - def setCollateCopies(self, collate: bool) -> None: ... - def colorMode(self) -> 'QPrinter.ColorMode': ... - def setColorMode(self, a0: 'QPrinter.ColorMode') -> None: ... - def resolution(self) -> int: ... - def setResolution(self, a0: int) -> None: ... - def pageOrder(self) -> 'QPrinter.PageOrder': ... - def setPageOrder(self, a0: 'QPrinter.PageOrder') -> None: ... - @typing.overload - def paperSize(self) -> QtGui.QPagedPaintDevice.PageSize: ... - @typing.overload - def paperSize(self, unit: 'QPrinter.Unit') -> QtCore.QSizeF: ... - @typing.overload - def setPaperSize(self, a0: QtGui.QPagedPaintDevice.PageSize) -> None: ... - @typing.overload - def setPaperSize(self, paperSize: QtCore.QSizeF, unit: 'QPrinter.Unit') -> None: ... - def setPageSizeMM(self, size: QtCore.QSizeF) -> None: ... - def orientation(self) -> 'QPrinter.Orientation': ... - def setOrientation(self, a0: 'QPrinter.Orientation') -> None: ... - def creator(self) -> str: ... - def setCreator(self, a0: str) -> None: ... - def docName(self) -> str: ... - def setDocName(self, a0: str) -> None: ... - def printProgram(self) -> str: ... - def setPrintProgram(self, a0: str) -> None: ... - def outputFileName(self) -> str: ... - def setOutputFileName(self, a0: str) -> None: ... - def isValid(self) -> bool: ... - def printerName(self) -> str: ... - def setPrinterName(self, a0: str) -> None: ... - def outputFormat(self) -> 'QPrinter.OutputFormat': ... - def setOutputFormat(self, format: 'QPrinter.OutputFormat') -> None: ... - - -class QPrinterInfo(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, src: 'QPrinterInfo') -> None: ... - @typing.overload - def __init__(self, printer: QPrinter) -> None: ... - - def supportedDuplexModes(self) -> typing.List[QPrinter.DuplexMode]: ... - def defaultDuplexMode(self) -> QPrinter.DuplexMode: ... - @staticmethod - def defaultPrinterName() -> str: ... - @staticmethod - def availablePrinterNames() -> typing.List[str]: ... - def supportedResolutions(self) -> typing.List[int]: ... - def maximumPhysicalPageSize(self) -> QtGui.QPageSize: ... - def minimumPhysicalPageSize(self) -> QtGui.QPageSize: ... - def supportsCustomPageSizes(self) -> bool: ... - def defaultPageSize(self) -> QtGui.QPageSize: ... - def supportedPageSizes(self) -> typing.Any: ... - def state(self) -> QPrinter.PrinterState: ... - def isRemote(self) -> bool: ... - @staticmethod - def printerInfo(printerName: str) -> 'QPrinterInfo': ... - def makeAndModel(self) -> str: ... - def location(self) -> str: ... - def description(self) -> str: ... - @staticmethod - def defaultPrinter() -> 'QPrinterInfo': ... - @staticmethod - def availablePrinters() -> typing.Any: ... - def supportedSizesWithNames(self) -> typing.Any: ... - def supportedPaperSizes(self) -> typing.List[QtGui.QPagedPaintDevice.PageSize]: ... - def isDefault(self) -> bool: ... - def isNull(self) -> bool: ... - def printerName(self) -> str: ... - - -class QPrintPreviewDialog(QtWidgets.QDialog): - - @typing.overload - def __init__(self, parent: typing.Optional[QtWidgets.QWidget] = ..., flags: typing.Union[QtCore.Qt.WindowFlags, QtCore.Qt.WindowType] = ...) -> None: ... - @typing.overload - def __init__(self, printer: QPrinter, parent: typing.Optional[QtWidgets.QWidget] = ..., flags: typing.Union[QtCore.Qt.WindowFlags, QtCore.Qt.WindowType] = ...) -> None: ... - - def paintRequested(self, printer: QPrinter) -> None: ... - def done(self, result: int) -> None: ... - def printer(self) -> QPrinter: ... - @typing.overload - def open(self) -> None: ... - @typing.overload - def open(self, slot: PYQT_SLOT) -> None: ... - def setVisible(self, visible: bool) -> None: ... - - -class QPrintPreviewWidget(QtWidgets.QWidget): - - class ZoomMode(int): ... - CustomZoom = ... # type: 'QPrintPreviewWidget.ZoomMode' - FitToWidth = ... # type: 'QPrintPreviewWidget.ZoomMode' - FitInView = ... # type: 'QPrintPreviewWidget.ZoomMode' - - class ViewMode(int): ... - SinglePageView = ... # type: 'QPrintPreviewWidget.ViewMode' - FacingPagesView = ... # type: 'QPrintPreviewWidget.ViewMode' - AllPagesView = ... # type: 'QPrintPreviewWidget.ViewMode' - - @typing.overload - def __init__(self, printer: QPrinter, parent: typing.Optional[QtWidgets.QWidget] = ..., flags: typing.Union[QtCore.Qt.WindowFlags, QtCore.Qt.WindowType] = ...) -> None: ... - @typing.overload - def __init__(self, parent: typing.Optional[QtWidgets.QWidget] = ..., flags: typing.Union[QtCore.Qt.WindowFlags, QtCore.Qt.WindowType] = ...) -> None: ... - - def pageCount(self) -> int: ... - def previewChanged(self) -> None: ... - def paintRequested(self, printer: QPrinter) -> None: ... - def updatePreview(self) -> None: ... - def setAllPagesViewMode(self) -> None: ... - def setFacingPagesViewMode(self) -> None: ... - def setSinglePageViewMode(self) -> None: ... - def setPortraitOrientation(self) -> None: ... - def setLandscapeOrientation(self) -> None: ... - def fitInView(self) -> None: ... - def fitToWidth(self) -> None: ... - def setCurrentPage(self, pageNumber: int) -> None: ... - def setZoomMode(self, zoomMode: 'QPrintPreviewWidget.ZoomMode') -> None: ... - def setViewMode(self, viewMode: 'QPrintPreviewWidget.ViewMode') -> None: ... - def setOrientation(self, orientation: QPrinter.Orientation) -> None: ... - def setZoomFactor(self, zoomFactor: float) -> None: ... - def zoomOut(self, factor: float = ...) -> None: ... - def zoomIn(self, factor: float = ...) -> None: ... - def print(self) -> None: ... - def print_(self) -> None: ... - def setVisible(self, visible: bool) -> None: ... - def currentPage(self) -> int: ... - def zoomMode(self) -> 'QPrintPreviewWidget.ZoomMode': ... - def viewMode(self) -> 'QPrintPreviewWidget.ViewMode': ... - def orientation(self) -> QPrinter.Orientation: ... - def zoomFactor(self) -> float: ... diff -Nru uranium-3.3.0/stubs/PyQt5/Qt.pyi uranium-4.4.1/stubs/PyQt5/Qt.pyi --- uranium-3.3.0/stubs/PyQt5/Qt.pyi 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/stubs/PyQt5/Qt.pyi 1970-01-01 00:00:00.000000000 +0000 @@ -1,20 +0,0 @@ -# The PEP 484 type hints stub file for the Qt module. -# -# Generated by SIP 4.18 - - -from PyQt5.QtCore import * -from PyQt5.QtDBus import * -from PyQt5.QtGui import * -from PyQt5.QtNetwork import * -from PyQt5.QtQml import * -from PyQt5.QtWidgets import * -from PyQt5.QtXml import * -from PyQt5.QtOpenGL import * -from PyQt5.QtPrintSupport import * -from PyQt5.QtQuick import * -from PyQt5.QtSql import * -from PyQt5.QtSvg import * -from PyQt5.QtTest import * -from PyQt5.QtX11Extras import * -from PyQt5.QtQuickWidgets import * diff -Nru uranium-3.3.0/stubs/PyQt5/QtQml.pyi uranium-4.4.1/stubs/PyQt5/QtQml.pyi --- uranium-3.3.0/stubs/PyQt5/QtQml.pyi 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/stubs/PyQt5/QtQml.pyi 1970-01-01 00:00:00.000000000 +0000 @@ -1,607 +0,0 @@ -# The PEP 484 type hints stub file for the QtQml module. -# -# Generated by SIP 4.18.1 -# -# Copyright (c) 2016 Riverbank Computing Limited -# -# This file is part of PyQt5. -# -# This file may be used under the terms of the GNU General Public License -# version 3.0 as published by the Free Software Foundation and appearing in -# the file LICENSE included in the packaging of this file. Please review the -# following information to ensure the GNU General Public License version 3.0 -# requirements will be met: http://www.gnu.org/copyleft/gpl.html. -# -# If you do not wish to use this file under the terms of the GPL version 3.0 -# then you may purchase a commercial license. For more information contact -# info@riverbankcomputing.com. -# -# This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -# WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - - -import typing -import sip - -from PyQt5 import QtNetwork -from PyQt5 import QtCore - -# Support for QDate, QDateTime and QTime. -import datetime - -# Convenient type aliases. -PYQT_SIGNAL = typing.Union[QtCore.pyqtSignal, QtCore.pyqtBoundSignal] -PYQT_SLOT = typing.Union[typing.Callable[..., None], QtCore.pyqtBoundSignal] - - -class QJSEngine(QtCore.QObject): - - class Extension(int): ... - TranslationExtension = ... # type: 'QJSEngine.Extension' - ConsoleExtension = ... # type: 'QJSEngine.Extension' - GarbageCollectionExtension = ... # type: 'QJSEngine.Extension' - AllExtensions = ... # type: 'QJSEngine.Extension' - - class Extensions(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QJSEngine.Extensions', 'QJSEngine.Extension']) -> None: ... - @typing.overload - def __init__(self, a0: 'QJSEngine.Extensions') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QJSEngine.Extensions': ... - def __int__(self) -> int: ... - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, parent: QtCore.QObject) -> None: ... - - def installExtensions(self, extensions: typing.Union['QJSEngine.Extensions', 'QJSEngine.Extension'], object: typing.Union['QJSValue', 'QJSValue.SpecialValue', bool, int, float, str] = ...) -> None: ... - def installTranslatorFunctions(self, object: typing.Union['QJSValue', 'QJSValue.SpecialValue', bool, int, float, str] = ...) -> None: ... - def collectGarbage(self) -> None: ... - def newQObject(self, object: QtCore.QObject) -> 'QJSValue': ... - def newArray(self, length: int = ...) -> 'QJSValue': ... - def newObject(self) -> 'QJSValue': ... - def evaluate(self, program: str, fileName: str = ..., lineNumber: int = ...) -> 'QJSValue': ... - def globalObject(self) -> 'QJSValue': ... - - -class QJSValue(sip.simplewrapper): - - class SpecialValue(int): ... - NullValue = ... # type: 'QJSValue.SpecialValue' - UndefinedValue = ... # type: 'QJSValue.SpecialValue' - - @typing.overload - def __init__(self, value: 'QJSValue.SpecialValue' = ...) -> None: ... - @typing.overload - def __init__(self, other: typing.Union['QJSValue', 'QJSValue.SpecialValue', bool, int, float, str]) -> None: ... - - def callAsConstructor(self, args: typing.Any = ...) -> 'QJSValue': ... - def callWithInstance(self, instance: typing.Union['QJSValue', 'QJSValue.SpecialValue', bool, int, float, str], args: typing.Any = ...) -> 'QJSValue': ... - def call(self, args: typing.Any = ...) -> 'QJSValue': ... - def isCallable(self) -> bool: ... - def deleteProperty(self, name: str) -> bool: ... - def hasOwnProperty(self, name: str) -> bool: ... - def hasProperty(self, name: str) -> bool: ... - @typing.overload - def setProperty(self, name: str, value: typing.Union['QJSValue', 'QJSValue.SpecialValue', bool, int, float, str]) -> None: ... - @typing.overload - def setProperty(self, arrayIndex: int, value: typing.Union['QJSValue', 'QJSValue.SpecialValue', bool, int, float, str]) -> None: ... - @typing.overload - def property(self, name: str) -> 'QJSValue': ... - @typing.overload - def property(self, arrayIndex: int) -> 'QJSValue': ... - def setPrototype(self, prototype: typing.Union['QJSValue', 'QJSValue.SpecialValue', bool, int, float, str]) -> None: ... - def prototype(self) -> 'QJSValue': ... - def strictlyEquals(self, other: typing.Union['QJSValue', 'QJSValue.SpecialValue', bool, int, float, str]) -> bool: ... - def equals(self, other: typing.Union['QJSValue', 'QJSValue.SpecialValue', bool, int, float, str]) -> bool: ... - def toDateTime(self) -> QtCore.QDateTime: ... - def toQObject(self) -> QtCore.QObject: ... - def toVariant(self) -> typing.Any: ... - def toBool(self) -> bool: ... - def toUInt(self) -> int: ... - def toInt(self) -> int: ... - def toNumber(self) -> float: ... - def toString(self) -> str: ... - def isError(self) -> bool: ... - def isArray(self) -> bool: ... - def isRegExp(self) -> bool: ... - def isDate(self) -> bool: ... - def isObject(self) -> bool: ... - def isQObject(self) -> bool: ... - def isVariant(self) -> bool: ... - def isUndefined(self) -> bool: ... - def isString(self) -> bool: ... - def isNull(self) -> bool: ... - def isNumber(self) -> bool: ... - def isBool(self) -> bool: ... - - -class QJSValueIterator(sip.simplewrapper): - - def __init__(self, value: typing.Union[QJSValue, QJSValue.SpecialValue, bool, int, float, str]) -> None: ... - - def value(self) -> QJSValue: ... - def name(self) -> str: ... - def next(self) -> bool: ... - def hasNext(self) -> bool: ... - - -class QQmlAbstractUrlInterceptor(sip.simplewrapper): - - class DataType(int): ... - QmlFile = ... # type: 'QQmlAbstractUrlInterceptor.DataType' - JavaScriptFile = ... # type: 'QQmlAbstractUrlInterceptor.DataType' - QmldirFile = ... # type: 'QQmlAbstractUrlInterceptor.DataType' - UrlString = ... # type: 'QQmlAbstractUrlInterceptor.DataType' - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QQmlAbstractUrlInterceptor') -> None: ... - - def intercept(self, path: QtCore.QUrl, type: 'QQmlAbstractUrlInterceptor.DataType') -> QtCore.QUrl: ... - - -class QQmlEngine(QJSEngine): - - class ObjectOwnership(int): ... - CppOwnership = ... # type: 'QQmlEngine.ObjectOwnership' - JavaScriptOwnership = ... # type: 'QQmlEngine.ObjectOwnership' - - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def warnings(self, warnings: typing.Iterable['QQmlError']) -> None: ... - def quit(self) -> None: ... - def event(self, a0: QtCore.QEvent) -> bool: ... - @staticmethod - def objectOwnership(a0: QtCore.QObject) -> 'QQmlEngine.ObjectOwnership': ... - @staticmethod - def setObjectOwnership(a0: QtCore.QObject, a1: 'QQmlEngine.ObjectOwnership') -> None: ... - @staticmethod - def setContextForObject(a0: QtCore.QObject, a1: 'QQmlContext') -> None: ... - @staticmethod - def contextForObject(a0: QtCore.QObject) -> 'QQmlContext': ... - def setOutputWarningsToStandardError(self, a0: bool) -> None: ... - def outputWarningsToStandardError(self) -> bool: ... - def setBaseUrl(self, a0: QtCore.QUrl) -> None: ... - def baseUrl(self) -> QtCore.QUrl: ... - def offlineStoragePath(self) -> str: ... - def setOfflineStoragePath(self, dir: str) -> None: ... - def incubationController(self) -> 'QQmlIncubationController': ... - def setIncubationController(self, a0: 'QQmlIncubationController') -> None: ... - def removeImageProvider(self, id: str) -> None: ... - def imageProvider(self, id: str) -> 'QQmlImageProviderBase': ... - def addImageProvider(self, id: str, a1: 'QQmlImageProviderBase') -> None: ... - def networkAccessManager(self) -> QtNetwork.QNetworkAccessManager: ... - def networkAccessManagerFactory(self) -> 'QQmlNetworkAccessManagerFactory': ... - def setNetworkAccessManagerFactory(self, a0: 'QQmlNetworkAccessManagerFactory') -> None: ... - def importPlugin(self, filePath: str, uri: str, errors: typing.Any) -> bool: ... - def addNamedBundle(self, name: str, fileName: str) -> bool: ... - def addPluginPath(self, dir: str) -> None: ... - def setPluginPathList(self, paths: typing.Iterable[str]) -> None: ... - def pluginPathList(self) -> typing.List[str]: ... - def addImportPath(self, dir: str) -> None: ... - def setImportPathList(self, paths: typing.Iterable[str]) -> None: ... - def importPathList(self) -> typing.List[str]: ... - def trimComponentCache(self) -> None: ... - def clearComponentCache(self) -> None: ... - def rootContext(self) -> 'QQmlContext': ... - - -class QQmlApplicationEngine(QQmlEngine): - - @typing.overload - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - @typing.overload - def __init__(self, url: QtCore.QUrl, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - @typing.overload - def __init__(self, filePath: str, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def objectCreated(self, object: QtCore.QObject, url: QtCore.QUrl) -> None: ... - def loadData(self, data: typing.Union[QtCore.QByteArray, bytes, bytearray], url: QtCore.QUrl = ...) -> None: ... - @typing.overload - def load(self, url: QtCore.QUrl) -> None: ... - @typing.overload - def load(self, filePath: str) -> None: ... - def rootObjects(self) -> typing.List[QtCore.QObject]: ... - - -class QQmlComponent(QtCore.QObject): - - class Status(int): ... - Null = ... # type: 'QQmlComponent.Status' - Ready = ... # type: 'QQmlComponent.Status' - Loading = ... # type: 'QQmlComponent.Status' - Error = ... # type: 'QQmlComponent.Status' - - class CompilationMode(int): ... - PreferSynchronous = ... # type: 'QQmlComponent.CompilationMode' - Asynchronous = ... # type: 'QQmlComponent.CompilationMode' - - @typing.overload - def __init__(self, a0: QQmlEngine, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - @typing.overload - def __init__(self, a0: QQmlEngine, fileName: str, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - @typing.overload - def __init__(self, a0: QQmlEngine, fileName: str, mode: 'QQmlComponent.CompilationMode', parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - @typing.overload - def __init__(self, a0: QQmlEngine, url: QtCore.QUrl, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - @typing.overload - def __init__(self, a0: QQmlEngine, url: QtCore.QUrl, mode: 'QQmlComponent.CompilationMode', parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - @typing.overload - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def progressChanged(self, a0: float) -> None: ... - def statusChanged(self, a0: 'QQmlComponent.Status') -> None: ... - def setData(self, a0: typing.Union[QtCore.QByteArray, bytes, bytearray], baseUrl: QtCore.QUrl) -> None: ... - @typing.overload - def loadUrl(self, url: QtCore.QUrl) -> None: ... - @typing.overload - def loadUrl(self, url: QtCore.QUrl, mode: 'QQmlComponent.CompilationMode') -> None: ... - def creationContext(self) -> 'QQmlContext': ... - def completeCreate(self) -> None: ... - def beginCreate(self, a0: 'QQmlContext') -> QtCore.QObject: ... - @typing.overload - def create(self, context: typing.Optional['QQmlContext'] = ...) -> QtCore.QObject: ... - @typing.overload - def create(self, a0: 'QQmlIncubator', context: typing.Optional['QQmlContext'] = ..., forContext: typing.Optional['QQmlContext'] = ...) -> None: ... - def url(self) -> QtCore.QUrl: ... - def progress(self) -> float: ... - def errors(self) -> typing.List['QQmlError']: ... - def isLoading(self) -> bool: ... - def isError(self) -> bool: ... - def isReady(self) -> bool: ... - def isNull(self) -> bool: ... - def status(self) -> 'QQmlComponent.Status': ... - - -class QQmlContext(QtCore.QObject): - - @typing.overload - def __init__(self, engine: QQmlEngine, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - @typing.overload - def __init__(self, parentContext: 'QQmlContext', parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def baseUrl(self) -> QtCore.QUrl: ... - def setBaseUrl(self, a0: QtCore.QUrl) -> None: ... - def resolvedUrl(self, a0: QtCore.QUrl) -> QtCore.QUrl: ... - def nameForObject(self, a0: QtCore.QObject) -> str: ... - @typing.overload - def setContextProperty(self, a0: str, a1: QtCore.QObject) -> None: ... - @typing.overload - def setContextProperty(self, a0: str, a1: typing.Any) -> None: ... - def contextProperty(self, a0: str) -> typing.Any: ... - def setContextObject(self, a0: QtCore.QObject) -> None: ... - def contextObject(self) -> QtCore.QObject: ... - def parentContext(self) -> 'QQmlContext': ... - def engine(self) -> QQmlEngine: ... - def isValid(self) -> bool: ... - - -class QQmlImageProviderBase(sip.wrapper): - - class Flag(int): ... - ForceAsynchronousImageLoading = ... # type: 'QQmlImageProviderBase.Flag' - - class ImageType(int): ... - Image = ... # type: 'QQmlImageProviderBase.ImageType' - Pixmap = ... # type: 'QQmlImageProviderBase.ImageType' - Texture = ... # type: 'QQmlImageProviderBase.ImageType' - ImageResponse = ... # type: 'QQmlImageProviderBase.ImageType' - - class Flags(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QQmlImageProviderBase.Flags', 'QQmlImageProviderBase.Flag']) -> None: ... - @typing.overload - def __init__(self, a0: 'QQmlImageProviderBase.Flags') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QQmlImageProviderBase.Flags': ... - def __int__(self) -> int: ... - - def __init__(self, a0: 'QQmlImageProviderBase') -> None: ... - - def flags(self) -> 'QQmlImageProviderBase.Flags': ... - def imageType(self) -> 'QQmlImageProviderBase.ImageType': ... - - -class QQmlError(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QQmlError') -> None: ... - - def setObject(self, a0: QtCore.QObject) -> None: ... - def object(self) -> QtCore.QObject: ... - def toString(self) -> str: ... - def setColumn(self, a0: int) -> None: ... - def column(self) -> int: ... - def setLine(self, a0: int) -> None: ... - def line(self) -> int: ... - def setDescription(self, a0: str) -> None: ... - def description(self) -> str: ... - def setUrl(self, a0: QtCore.QUrl) -> None: ... - def url(self) -> QtCore.QUrl: ... - def isValid(self) -> bool: ... - - -class QQmlExpression(QtCore.QObject): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: QQmlContext, a1: QtCore.QObject, a2: str, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - @typing.overload - def __init__(self, a0: 'QQmlScriptString', context: typing.Optional[QQmlContext] = ..., scope: typing.Optional[QtCore.QObject] = ..., parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def valueChanged(self) -> None: ... - def evaluate(self) -> typing.Tuple[typing.Any, bool]: ... - def error(self) -> QQmlError: ... - def clearError(self) -> None: ... - def hasError(self) -> bool: ... - def scopeObject(self) -> QtCore.QObject: ... - def setSourceLocation(self, fileName: str, line: int, column: int = ...) -> None: ... - def columnNumber(self) -> int: ... - def lineNumber(self) -> int: ... - def sourceFile(self) -> str: ... - def setNotifyOnValueChanged(self, a0: bool) -> None: ... - def notifyOnValueChanged(self) -> bool: ... - def setExpression(self, a0: str) -> None: ... - def expression(self) -> str: ... - def context(self) -> QQmlContext: ... - def engine(self) -> QQmlEngine: ... - - -class QQmlExtensionPlugin(QtCore.QObject): - - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def baseUrl(self) -> QtCore.QUrl: ... - def initializeEngine(self, engine: QQmlEngine, uri: str) -> None: ... - def registerTypes(self, uri: str) -> None: ... - - -class QQmlFileSelector(QtCore.QObject): - - def __init__(self, engine: QQmlEngine, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def selector(self) -> QtCore.QFileSelector: ... - @staticmethod - def get(a0: QQmlEngine) -> 'QQmlFileSelector': ... - def setExtraSelectors(self, strings: typing.Iterable[str]) -> None: ... - def setSelector(self, selector: QtCore.QFileSelector) -> None: ... - - -class QQmlIncubator(sip.simplewrapper): - - class Status(int): ... - Null = ... # type: 'QQmlIncubator.Status' - Ready = ... # type: 'QQmlIncubator.Status' - Loading = ... # type: 'QQmlIncubator.Status' - Error = ... # type: 'QQmlIncubator.Status' - - class IncubationMode(int): ... - Asynchronous = ... # type: 'QQmlIncubator.IncubationMode' - AsynchronousIfNested = ... # type: 'QQmlIncubator.IncubationMode' - Synchronous = ... # type: 'QQmlIncubator.IncubationMode' - - def __init__(self, mode: 'QQmlIncubator.IncubationMode' = ...) -> None: ... - - def setInitialState(self, a0: QtCore.QObject) -> None: ... - def statusChanged(self, a0: 'QQmlIncubator.Status') -> None: ... - def object(self) -> QtCore.QObject: ... - def status(self) -> 'QQmlIncubator.Status': ... - def incubationMode(self) -> 'QQmlIncubator.IncubationMode': ... - def errors(self) -> typing.List[QQmlError]: ... - def isLoading(self) -> bool: ... - def isError(self) -> bool: ... - def isReady(self) -> bool: ... - def isNull(self) -> bool: ... - def forceCompletion(self) -> None: ... - def clear(self) -> None: ... - - -class QQmlIncubationController(sip.simplewrapper): - - def __init__(self) -> None: ... - - def incubatingObjectCountChanged(self, a0: int) -> None: ... - def incubateFor(self, msecs: int) -> None: ... - def incubatingObjectCount(self) -> int: ... - def engine(self) -> QQmlEngine: ... - - -class QQmlListReference(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: QtCore.QObject, property: str, engine: typing.Optional[QQmlEngine] = ...) -> None: ... - @typing.overload - def __init__(self, a0: 'QQmlListReference') -> None: ... - - def count(self) -> int: ... - def clear(self) -> bool: ... - def at(self, a0: int) -> QtCore.QObject: ... - def append(self, a0: QtCore.QObject) -> bool: ... - def isReadable(self) -> bool: ... - def isManipulable(self) -> bool: ... - def canCount(self) -> bool: ... - def canClear(self) -> bool: ... - def canAt(self) -> bool: ... - def canAppend(self) -> bool: ... - def listElementType(self) -> QtCore.QMetaObject: ... - def object(self) -> QtCore.QObject: ... - def isValid(self) -> bool: ... - - -class QQmlNetworkAccessManagerFactory(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QQmlNetworkAccessManagerFactory') -> None: ... - - def create(self, parent: QtCore.QObject) -> QtNetwork.QNetworkAccessManager: ... - - -class QQmlParserStatus(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QQmlParserStatus') -> None: ... - - def componentComplete(self) -> None: ... - def classBegin(self) -> None: ... - - -class QQmlProperty(sip.simplewrapper): - - class Type(int): ... - Invalid = ... # type: 'QQmlProperty.Type' - Property = ... # type: 'QQmlProperty.Type' - SignalProperty = ... # type: 'QQmlProperty.Type' - - class PropertyTypeCategory(int): ... - InvalidCategory = ... # type: 'QQmlProperty.PropertyTypeCategory' - List = ... # type: 'QQmlProperty.PropertyTypeCategory' - Object = ... # type: 'QQmlProperty.PropertyTypeCategory' - Normal = ... # type: 'QQmlProperty.PropertyTypeCategory' - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: QtCore.QObject) -> None: ... - @typing.overload - def __init__(self, a0: QtCore.QObject, a1: QQmlContext) -> None: ... - @typing.overload - def __init__(self, a0: QtCore.QObject, a1: QQmlEngine) -> None: ... - @typing.overload - def __init__(self, a0: QtCore.QObject, a1: str) -> None: ... - @typing.overload - def __init__(self, a0: QtCore.QObject, a1: str, a2: QQmlContext) -> None: ... - @typing.overload - def __init__(self, a0: QtCore.QObject, a1: str, a2: QQmlEngine) -> None: ... - @typing.overload - def __init__(self, a0: 'QQmlProperty') -> None: ... - - def method(self) -> QtCore.QMetaMethod: ... - def property(self) -> QtCore.QMetaProperty: ... - def index(self) -> int: ... - def object(self) -> QtCore.QObject: ... - def isResettable(self) -> bool: ... - def isDesignable(self) -> bool: ... - def isWritable(self) -> bool: ... - @typing.overload - def connectNotifySignal(self, slot: PYQT_SLOT) -> bool: ... - @typing.overload - def connectNotifySignal(self, dest: QtCore.QObject, method: int) -> bool: ... - def needsNotifySignal(self) -> bool: ... - def hasNotifySignal(self) -> bool: ... - def reset(self) -> bool: ... - @typing.overload - def write(self, a0: typing.Any) -> bool: ... - @typing.overload - @staticmethod - def write(a0: QtCore.QObject, a1: str, a2: typing.Any) -> bool: ... - @typing.overload - @staticmethod - def write(a0: QtCore.QObject, a1: str, a2: typing.Any, a3: QQmlContext) -> bool: ... - @typing.overload - @staticmethod - def write(a0: QtCore.QObject, a1: str, a2: typing.Any, a3: QQmlEngine) -> bool: ... - @typing.overload - def read(self) -> typing.Any: ... - @typing.overload - @staticmethod - def read(a0: QtCore.QObject, a1: str) -> typing.Any: ... - @typing.overload - @staticmethod - def read(a0: QtCore.QObject, a1: str, a2: QQmlContext) -> typing.Any: ... - @typing.overload - @staticmethod - def read(a0: QtCore.QObject, a1: str, a2: QQmlEngine) -> typing.Any: ... - def name(self) -> str: ... - def propertyTypeName(self) -> str: ... - def propertyTypeCategory(self) -> 'QQmlProperty.PropertyTypeCategory': ... - def propertyType(self) -> int: ... - def isSignalProperty(self) -> bool: ... - def isProperty(self) -> bool: ... - def isValid(self) -> bool: ... - def type(self) -> 'QQmlProperty.Type': ... - def __hash__(self) -> int: ... - - -class QQmlPropertyMap(QtCore.QObject): - - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def updateValue(self, key: str, input: typing.Any) -> typing.Any: ... - def valueChanged(self, key: str, value: typing.Any) -> None: ... - def __getitem__(self, key: str) -> typing.Any: ... - def contains(self, key: str) -> bool: ... - def isEmpty(self) -> bool: ... - def __len__(self) -> int: ... - def size(self) -> int: ... - def count(self) -> int: ... - def keys(self) -> typing.List[str]: ... - def clear(self, key: str) -> None: ... - def insert(self, key: str, value: typing.Any) -> None: ... - def value(self, key: str) -> typing.Any: ... - - -class QQmlPropertyValueSource(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QQmlPropertyValueSource') -> None: ... - - def setTarget(self, a0: QQmlProperty) -> None: ... - - -class QQmlScriptString(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QQmlScriptString') -> None: ... - - def booleanLiteral(self) -> typing.Tuple[bool, bool]: ... - def numberLiteral(self) -> typing.Tuple[float, bool]: ... - def stringLiteral(self) -> str: ... - def isNullLiteral(self) -> bool: ... - def isUndefinedLiteral(self) -> bool: ... - def isEmpty(self) -> bool: ... - - -@typing.overload -def qmlRegisterUncreatableType(a0: type, uri: str, major: int, minor: int, qmlName: str, reason: str) -> int: ... -@typing.overload -def qmlRegisterUncreatableType(a0: type, revision: int, uri: str, major: int, minor: int, qmlName: str, reason: str) -> int: ... -@typing.overload -def qmlRegisterType(url: QtCore.QUrl, uri: str, major: int, minor: int, qmlName: str) -> int: ... -@typing.overload -def qmlRegisterType(a0: type, attachedProperties: type = ...) -> int: ... -@typing.overload -def qmlRegisterType(a0: type, uri: str, major: int, minor: int, qmlName: str, attachedProperties: type = ...) -> int: ... -@typing.overload -def qmlRegisterType(a0: type, revision: int, uri: str, major: int, minor: int, qmlName: str, attachedProperties: type = ...) -> int: ... -@typing.overload -def qmlRegisterSingletonType(url: QtCore.QUrl, uri: str, major: int, minor: int, qmlName: str) -> int: ... -@typing.overload -def qmlRegisterSingletonType(a0: type, uri: str, major: int, minor: int, typeName: str, factory: typing.Callable[[], typing.Any]) -> int: ... -def qmlRegisterRevision(a0: type, revision: int, uri: str, major: int, minor: int, attachedProperties: type = ...) -> int: ... -def qmlAttachedPropertiesObject(a0: type, object: QtCore.QObject, create: bool = ...) -> QtCore.QObject: ... -def qjsEngine(a0: QtCore.QObject) -> QJSEngine: ... diff -Nru uranium-3.3.0/stubs/PyQt5/QtQuick.pyi uranium-4.4.1/stubs/PyQt5/QtQuick.pyi --- uranium-3.3.0/stubs/PyQt5/QtQuick.pyi 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/stubs/PyQt5/QtQuick.pyi 1970-01-01 00:00:00.000000000 +0000 @@ -1,1127 +0,0 @@ -# The PEP 484 type hints stub file for the QtQuick module. -# -# Generated by SIP 4.18.1 -# -# Copyright (c) 2016 Riverbank Computing Limited -# -# This file is part of PyQt5. -# -# This file may be used under the terms of the GNU General Public License -# version 3.0 as published by the Free Software Foundation and appearing in -# the file LICENSE included in the packaging of this file. Please review the -# following information to ensure the GNU General Public License version 3.0 -# requirements will be met: http://www.gnu.org/copyleft/gpl.html. -# -# If you do not wish to use this file under the terms of the GPL version 3.0 -# then you may purchase a commercial license. For more information contact -# info@riverbankcomputing.com. -# -# This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -# WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - - -import typing -import sip - -from PyQt5 import QtQml -from PyQt5 import QtGui -from PyQt5 import QtCore - -# Support for QDate, QDateTime and QTime. -import datetime - -# Convenient type aliases. -PYQT_SIGNAL = typing.Union[QtCore.pyqtSignal, QtCore.pyqtBoundSignal] -PYQT_SLOT = typing.Union[typing.Callable[..., None], QtCore.pyqtBoundSignal] - -# Convenient aliases for complicated OpenGL types. -PYQT_OPENGL_ARRAY = typing.Union[typing.Sequence[int], typing.Sequence[float], - sip.Buffer, None] -PYQT_OPENGL_BOUND_ARRAY = typing.Union[typing.Sequence[int], - typing.Sequence[float], sip.Buffer, int, None] - - -class QQuickItem(QtCore.QObject, QtQml.QQmlParserStatus): - - class TransformOrigin(int): ... - TopLeft = ... # type: 'QQuickItem.TransformOrigin' - Top = ... # type: 'QQuickItem.TransformOrigin' - TopRight = ... # type: 'QQuickItem.TransformOrigin' - Left = ... # type: 'QQuickItem.TransformOrigin' - Center = ... # type: 'QQuickItem.TransformOrigin' - Right = ... # type: 'QQuickItem.TransformOrigin' - BottomLeft = ... # type: 'QQuickItem.TransformOrigin' - Bottom = ... # type: 'QQuickItem.TransformOrigin' - BottomRight = ... # type: 'QQuickItem.TransformOrigin' - - class ItemChange(int): ... - ItemChildAddedChange = ... # type: 'QQuickItem.ItemChange' - ItemChildRemovedChange = ... # type: 'QQuickItem.ItemChange' - ItemSceneChange = ... # type: 'QQuickItem.ItemChange' - ItemVisibleHasChanged = ... # type: 'QQuickItem.ItemChange' - ItemParentHasChanged = ... # type: 'QQuickItem.ItemChange' - ItemOpacityHasChanged = ... # type: 'QQuickItem.ItemChange' - ItemActiveFocusHasChanged = ... # type: 'QQuickItem.ItemChange' - ItemRotationHasChanged = ... # type: 'QQuickItem.ItemChange' - ItemAntialiasingHasChanged = ... # type: 'QQuickItem.ItemChange' - ItemDevicePixelRatioHasChanged = ... # type: 'QQuickItem.ItemChange' - - class Flag(int): ... - ItemClipsChildrenToShape = ... # type: 'QQuickItem.Flag' - ItemAcceptsInputMethod = ... # type: 'QQuickItem.Flag' - ItemIsFocusScope = ... # type: 'QQuickItem.Flag' - ItemHasContents = ... # type: 'QQuickItem.Flag' - ItemAcceptsDrops = ... # type: 'QQuickItem.Flag' - - class Flags(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QQuickItem.Flags', 'QQuickItem.Flag']) -> None: ... - @typing.overload - def __init__(self, a0: 'QQuickItem.Flags') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QQuickItem.Flags': ... - def __int__(self) -> int: ... - - class ItemChangeData(sip.simplewrapper): - - boolValue = ... # type: bool - item = ... # type: 'QQuickItem' - realValue = ... # type: float - window = ... # type: 'QQuickWindow' - - @typing.overload - def __init__(self, v: 'QQuickItem') -> None: ... - @typing.overload - def __init__(self, v: 'QQuickWindow') -> None: ... - @typing.overload - def __init__(self, v: float) -> None: ... - @typing.overload - def __init__(self, v: bool) -> None: ... - @typing.overload - def __init__(self, a0: 'QQuickItem.ItemChangeData') -> None: ... - - class UpdatePaintNodeData(sip.simplewrapper): - - transformNode = ... # type: 'QSGTransformNode' - - def __init__(self, a0: 'QQuickItem.UpdatePaintNodeData') -> None: ... - - def __init__(self, parent: typing.Optional['QQuickItem'] = ...) -> None: ... - - def mapFromGlobal(self, point: typing.Union[QtCore.QPointF, QtCore.QPoint]) -> QtCore.QPointF: ... - def mapToGlobal(self, point: typing.Union[QtCore.QPointF, QtCore.QPoint]) -> QtCore.QPointF: ... - def isAncestorOf(self, child: 'QQuickItem') -> bool: ... - def grabToImage(self, targetSize: QtCore.QSize = ...) -> 'QQuickItemGrabResult': ... - def resetAntialiasing(self) -> None: ... - def windowChanged(self, window: 'QQuickWindow') -> None: ... - def nextItemInFocusChain(self, forward: bool = ...) -> 'QQuickItem': ... - def setActiveFocusOnTab(self, a0: bool) -> None: ... - def activeFocusOnTab(self) -> bool: ... - def updatePolish(self) -> None: ... - def releaseResources(self) -> None: ... - def updatePaintNode(self, a0: 'QSGNode', a1: 'QQuickItem.UpdatePaintNodeData') -> 'QSGNode': ... - def geometryChanged(self, newGeometry: QtCore.QRectF, oldGeometry: QtCore.QRectF) -> None: ... - def childMouseEventFilter(self, a0: 'QQuickItem', a1: QtCore.QEvent) -> bool: ... - def dropEvent(self, a0: QtGui.QDropEvent) -> None: ... - def dragLeaveEvent(self, a0: QtGui.QDragLeaveEvent) -> None: ... - def dragMoveEvent(self, a0: QtGui.QDragMoveEvent) -> None: ... - def dragEnterEvent(self, a0: QtGui.QDragEnterEvent) -> None: ... - def hoverLeaveEvent(self, event: QtGui.QHoverEvent) -> None: ... - def hoverMoveEvent(self, event: QtGui.QHoverEvent) -> None: ... - def hoverEnterEvent(self, event: QtGui.QHoverEvent) -> None: ... - def touchEvent(self, event: QtGui.QTouchEvent) -> None: ... - def wheelEvent(self, event: QtGui.QWheelEvent) -> None: ... - def touchUngrabEvent(self) -> None: ... - def mouseUngrabEvent(self) -> None: ... - def mouseDoubleClickEvent(self, event: QtGui.QMouseEvent) -> None: ... - def mouseReleaseEvent(self, event: QtGui.QMouseEvent) -> None: ... - def mouseMoveEvent(self, event: QtGui.QMouseEvent) -> None: ... - def mousePressEvent(self, event: QtGui.QMouseEvent) -> None: ... - def focusOutEvent(self, a0: QtGui.QFocusEvent) -> None: ... - def focusInEvent(self, a0: QtGui.QFocusEvent) -> None: ... - def inputMethodEvent(self, a0: QtGui.QInputMethodEvent) -> None: ... - def keyReleaseEvent(self, event: QtGui.QKeyEvent) -> None: ... - def keyPressEvent(self, event: QtGui.QKeyEvent) -> None: ... - def componentComplete(self) -> None: ... - def classBegin(self) -> None: ... - def heightValid(self) -> bool: ... - def widthValid(self) -> bool: ... - def updateInputMethod(self, queries: typing.Union[QtCore.Qt.InputMethodQueries, QtCore.Qt.InputMethodQuery] = ...) -> None: ... - def itemChange(self, a0: 'QQuickItem.ItemChange', a1: 'QQuickItem.ItemChangeData') -> None: ... - def isComponentComplete(self) -> bool: ... - def event(self, a0: QtCore.QEvent) -> bool: ... - def update(self) -> None: ... - def textureProvider(self) -> 'QSGTextureProvider': ... - def isTextureProvider(self) -> bool: ... - def inputMethodQuery(self, query: QtCore.Qt.InputMethodQuery) -> typing.Any: ... - def childAt(self, x: float, y: float) -> 'QQuickItem': ... - @typing.overload - def forceActiveFocus(self) -> None: ... - @typing.overload - def forceActiveFocus(self, reason: QtCore.Qt.FocusReason) -> None: ... - def polish(self) -> None: ... - def mapRectFromScene(self, rect: QtCore.QRectF) -> QtCore.QRectF: ... - def mapRectFromItem(self, item: 'QQuickItem', rect: QtCore.QRectF) -> QtCore.QRectF: ... - def mapFromScene(self, point: typing.Union[QtCore.QPointF, QtCore.QPoint]) -> QtCore.QPointF: ... - def mapFromItem(self, item: 'QQuickItem', point: typing.Union[QtCore.QPointF, QtCore.QPoint]) -> QtCore.QPointF: ... - def mapRectToScene(self, rect: QtCore.QRectF) -> QtCore.QRectF: ... - def mapRectToItem(self, item: 'QQuickItem', rect: QtCore.QRectF) -> QtCore.QRectF: ... - def mapToScene(self, point: typing.Union[QtCore.QPointF, QtCore.QPoint]) -> QtCore.QPointF: ... - def mapToItem(self, item: 'QQuickItem', point: typing.Union[QtCore.QPointF, QtCore.QPoint]) -> QtCore.QPointF: ... - def contains(self, point: typing.Union[QtCore.QPointF, QtCore.QPoint]) -> bool: ... - def setKeepTouchGrab(self, a0: bool) -> None: ... - def keepTouchGrab(self) -> bool: ... - def ungrabTouchPoints(self) -> None: ... - def grabTouchPoints(self, ids: typing.Iterable[int]) -> None: ... - def setFiltersChildMouseEvents(self, filter: bool) -> None: ... - def filtersChildMouseEvents(self) -> bool: ... - def setKeepMouseGrab(self, a0: bool) -> None: ... - def keepMouseGrab(self) -> bool: ... - def ungrabMouse(self) -> None: ... - def grabMouse(self) -> None: ... - def unsetCursor(self) -> None: ... - def setCursor(self, cursor: typing.Union[QtGui.QCursor, QtCore.Qt.CursorShape]) -> None: ... - def cursor(self) -> QtGui.QCursor: ... - def setAcceptHoverEvents(self, enabled: bool) -> None: ... - def acceptHoverEvents(self) -> bool: ... - def setAcceptedMouseButtons(self, buttons: typing.Union[QtCore.Qt.MouseButtons, QtCore.Qt.MouseButton]) -> None: ... - def acceptedMouseButtons(self) -> QtCore.Qt.MouseButtons: ... - def scopedFocusItem(self) -> 'QQuickItem': ... - def isFocusScope(self) -> bool: ... - @typing.overload - def setFocus(self, a0: bool) -> None: ... - @typing.overload - def setFocus(self, focus: bool, reason: QtCore.Qt.FocusReason) -> None: ... - def hasFocus(self) -> bool: ... - def hasActiveFocus(self) -> bool: ... - def setFlags(self, flags: typing.Union['QQuickItem.Flags', 'QQuickItem.Flag']) -> None: ... - def setFlag(self, flag: 'QQuickItem.Flag', enabled: bool = ...) -> None: ... - def flags(self) -> 'QQuickItem.Flags': ... - def setAntialiasing(self, a0: bool) -> None: ... - def antialiasing(self) -> bool: ... - def setSmooth(self, a0: bool) -> None: ... - def smooth(self) -> bool: ... - def setEnabled(self, a0: bool) -> None: ... - def isEnabled(self) -> bool: ... - def setVisible(self, a0: bool) -> None: ... - def isVisible(self) -> bool: ... - def setOpacity(self, a0: float) -> None: ... - def opacity(self) -> float: ... - def setScale(self, a0: float) -> None: ... - def scale(self) -> float: ... - def setRotation(self, a0: float) -> None: ... - def rotation(self) -> float: ... - def setZ(self, a0: float) -> None: ... - def z(self) -> float: ... - def setTransformOrigin(self, a0: 'QQuickItem.TransformOrigin') -> None: ... - def transformOrigin(self) -> 'QQuickItem.TransformOrigin': ... - def implicitHeight(self) -> float: ... - def setImplicitHeight(self, a0: float) -> None: ... - def resetHeight(self) -> None: ... - def setHeight(self, a0: float) -> None: ... - def height(self) -> float: ... - def implicitWidth(self) -> float: ... - def setImplicitWidth(self, a0: float) -> None: ... - def resetWidth(self) -> None: ... - def setWidth(self, a0: float) -> None: ... - def width(self) -> float: ... - def setY(self, a0: float) -> None: ... - def setX(self, a0: float) -> None: ... - def y(self) -> float: ... - def x(self) -> float: ... - def setBaselineOffset(self, a0: float) -> None: ... - def baselineOffset(self) -> float: ... - def setState(self, a0: str) -> None: ... - def state(self) -> str: ... - def setClip(self, a0: bool) -> None: ... - def clip(self) -> bool: ... - def childItems(self) -> typing.Any: ... - def childrenRect(self) -> QtCore.QRectF: ... - def stackAfter(self, a0: 'QQuickItem') -> None: ... - def stackBefore(self, a0: 'QQuickItem') -> None: ... - def setParentItem(self, parent: 'QQuickItem') -> None: ... - def parentItem(self) -> 'QQuickItem': ... - def window(self) -> 'QQuickWindow': ... - - -class QQuickFramebufferObject(QQuickItem): - - class Renderer(sip.wrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QQuickFramebufferObject.Renderer') -> None: ... - - def invalidateFramebufferObject(self) -> None: ... - def update(self) -> None: ... - def framebufferObject(self) -> QtGui.QOpenGLFramebufferObject: ... - def synchronize(self, a0: 'QQuickFramebufferObject') -> None: ... - def createFramebufferObject(self, size: QtCore.QSize) -> QtGui.QOpenGLFramebufferObject: ... - def render(self) -> None: ... - - def __init__(self, parent: typing.Optional[QQuickItem] = ...) -> None: ... - - def mirrorVerticallyChanged(self, a0: bool) -> None: ... - def setMirrorVertically(self, enable: bool) -> None: ... - def mirrorVertically(self) -> bool: ... - def releaseResources(self) -> None: ... - def textureProvider(self) -> 'QSGTextureProvider': ... - def isTextureProvider(self) -> bool: ... - def textureFollowsItemSizeChanged(self, a0: bool) -> None: ... - def updatePaintNode(self, a0: 'QSGNode', a1: QQuickItem.UpdatePaintNodeData) -> 'QSGNode': ... - def geometryChanged(self, newGeometry: QtCore.QRectF, oldGeometry: QtCore.QRectF) -> None: ... - def createRenderer(self) -> 'QQuickFramebufferObject.Renderer': ... - def setTextureFollowsItemSize(self, follows: bool) -> None: ... - def textureFollowsItemSize(self) -> bool: ... - - -class QQuickTextureFactory(QtCore.QObject): - - def __init__(self) -> None: ... - - @staticmethod - def textureFactoryForImage(image: QtGui.QImage) -> 'QQuickTextureFactory': ... - def image(self) -> QtGui.QImage: ... - def textureByteCount(self) -> int: ... - def textureSize(self) -> QtCore.QSize: ... - def createTexture(self, window: 'QQuickWindow') -> 'QSGTexture': ... - - -class QQuickImageProvider(QtQml.QQmlImageProviderBase): - - @typing.overload - def __init__(self, type: QtQml.QQmlImageProviderBase.ImageType, flags: typing.Union[QtQml.QQmlImageProviderBase.Flags, QtQml.QQmlImageProviderBase.Flag] = ...) -> None: ... - @typing.overload - def __init__(self, a0: 'QQuickImageProvider') -> None: ... - - def requestTexture(self, id: str, requestedSize: QtCore.QSize) -> typing.Tuple[QQuickTextureFactory, QtCore.QSize]: ... - def requestPixmap(self, id: str, requestedSize: QtCore.QSize) -> typing.Tuple[QtGui.QPixmap, QtCore.QSize]: ... - def requestImage(self, id: str, requestedSize: QtCore.QSize) -> typing.Tuple[QtGui.QImage, QtCore.QSize]: ... - def flags(self) -> QtQml.QQmlImageProviderBase.Flags: ... - def imageType(self) -> QtQml.QQmlImageProviderBase.ImageType: ... - - -class QQuickImageResponse(QtCore.QObject): - - def __init__(self) -> None: ... - - def finished(self) -> None: ... - def cancel(self) -> None: ... - def errorString(self) -> str: ... - def textureFactory(self) -> QQuickTextureFactory: ... - - -class QQuickAsyncImageProvider(QQuickImageProvider): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QQuickAsyncImageProvider') -> None: ... - - def requestImageResponse(self, id: str, requestedSize: QtCore.QSize) -> QQuickImageResponse: ... - - -class QQuickItemGrabResult(QtCore.QObject): - - def ready(self) -> None: ... - def event(self, a0: QtCore.QEvent) -> bool: ... - def saveToFile(self, fileName: str) -> bool: ... - def url(self) -> QtCore.QUrl: ... - def image(self) -> QtGui.QImage: ... - - -class QQuickPaintedItem(QQuickItem): - - class PerformanceHint(int): ... - FastFBOResizing = ... # type: 'QQuickPaintedItem.PerformanceHint' - - class RenderTarget(int): ... - Image = ... # type: 'QQuickPaintedItem.RenderTarget' - FramebufferObject = ... # type: 'QQuickPaintedItem.RenderTarget' - InvertedYFramebufferObject = ... # type: 'QQuickPaintedItem.RenderTarget' - - class PerformanceHints(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QQuickPaintedItem.PerformanceHints', 'QQuickPaintedItem.PerformanceHint']) -> None: ... - @typing.overload - def __init__(self, a0: 'QQuickPaintedItem.PerformanceHints') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QQuickPaintedItem.PerformanceHints': ... - def __int__(self) -> int: ... - - def __init__(self, parent: typing.Optional[QQuickItem] = ...) -> None: ... - - def textureSizeChanged(self) -> None: ... - def setTextureSize(self, size: QtCore.QSize) -> None: ... - def textureSize(self) -> QtCore.QSize: ... - def itemChange(self, a0: QQuickItem.ItemChange, a1: QQuickItem.ItemChangeData) -> None: ... - def releaseResources(self) -> None: ... - def textureProvider(self) -> 'QSGTextureProvider': ... - def isTextureProvider(self) -> bool: ... - def updatePaintNode(self, a0: 'QSGNode', a1: QQuickItem.UpdatePaintNodeData) -> 'QSGNode': ... - def renderTargetChanged(self) -> None: ... - def contentsScaleChanged(self) -> None: ... - def contentsSizeChanged(self) -> None: ... - def fillColorChanged(self) -> None: ... - def paint(self, painter: QtGui.QPainter) -> None: ... - def setRenderTarget(self, target: 'QQuickPaintedItem.RenderTarget') -> None: ... - def renderTarget(self) -> 'QQuickPaintedItem.RenderTarget': ... - def setFillColor(self, a0: typing.Union[QtGui.QColor, QtCore.Qt.GlobalColor]) -> None: ... - def fillColor(self) -> QtGui.QColor: ... - def setContentsScale(self, a0: float) -> None: ... - def contentsScale(self) -> float: ... - def resetContentsSize(self) -> None: ... - def setContentsSize(self, a0: QtCore.QSize) -> None: ... - def contentsSize(self) -> QtCore.QSize: ... - def contentsBoundingRect(self) -> QtCore.QRectF: ... - def setPerformanceHints(self, hints: typing.Union['QQuickPaintedItem.PerformanceHints', 'QQuickPaintedItem.PerformanceHint']) -> None: ... - def setPerformanceHint(self, hint: 'QQuickPaintedItem.PerformanceHint', enabled: bool = ...) -> None: ... - def performanceHints(self) -> 'QQuickPaintedItem.PerformanceHints': ... - def setMipmap(self, enable: bool) -> None: ... - def mipmap(self) -> bool: ... - def setAntialiasing(self, enable: bool) -> None: ... - def antialiasing(self) -> bool: ... - def setOpaquePainting(self, opaque: bool) -> None: ... - def opaquePainting(self) -> bool: ... - def update(self, rect: QtCore.QRect = ...) -> None: ... - - -class QQuickRenderControl(QtCore.QObject): - - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def sceneChanged(self) -> None: ... - def renderRequested(self) -> None: ... - def prepareThread(self, targetThread: QtCore.QThread) -> None: ... - def renderWindow(self, offset: QtCore.QPoint) -> QtGui.QWindow: ... - @staticmethod - def renderWindowFor(win: 'QQuickWindow', offset: typing.Optional[QtCore.QPoint] = ...) -> QtGui.QWindow: ... - def grab(self) -> QtGui.QImage: ... - def sync(self) -> bool: ... - def render(self) -> None: ... - def polishItems(self) -> None: ... - def invalidate(self) -> None: ... - def initialize(self, gl: QtGui.QOpenGLContext) -> None: ... - - -class QQuickTextDocument(QtCore.QObject): - - def __init__(self, parent: QQuickItem) -> None: ... - - def textDocument(self) -> QtGui.QTextDocument: ... - - -class QQuickWindow(QtGui.QWindow): - - class RenderStage(int): ... - BeforeSynchronizingStage = ... # type: 'QQuickWindow.RenderStage' - AfterSynchronizingStage = ... # type: 'QQuickWindow.RenderStage' - BeforeRenderingStage = ... # type: 'QQuickWindow.RenderStage' - AfterRenderingStage = ... # type: 'QQuickWindow.RenderStage' - AfterSwapStage = ... # type: 'QQuickWindow.RenderStage' - NoStage = ... # type: 'QQuickWindow.RenderStage' - - class SceneGraphError(int): ... - ContextNotAvailable = ... # type: 'QQuickWindow.SceneGraphError' - - class CreateTextureOption(int): ... - TextureHasAlphaChannel = ... # type: 'QQuickWindow.CreateTextureOption' - TextureHasMipmaps = ... # type: 'QQuickWindow.CreateTextureOption' - TextureOwnsGLTexture = ... # type: 'QQuickWindow.CreateTextureOption' - TextureCanUseAtlas = ... # type: 'QQuickWindow.CreateTextureOption' - TextureIsOpaque = ... # type: 'QQuickWindow.CreateTextureOption' - - class CreateTextureOptions(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QQuickWindow.CreateTextureOptions', 'QQuickWindow.CreateTextureOption']) -> None: ... - @typing.overload - def __init__(self, a0: 'QQuickWindow.CreateTextureOptions') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QQuickWindow.CreateTextureOptions': ... - def __int__(self) -> int: ... - - def __init__(self, parent: typing.Optional[QtGui.QWindow] = ...) -> None: ... - - def isSceneGraphInitialized(self) -> bool: ... - def effectiveDevicePixelRatio(self) -> float: ... - def scheduleRenderJob(self, job: QtCore.QRunnable, schedule: 'QQuickWindow.RenderStage') -> None: ... - def sceneGraphError(self, error: 'QQuickWindow.SceneGraphError', message: str) -> None: ... - def sceneGraphAboutToStop(self) -> None: ... - def afterAnimating(self) -> None: ... - def afterSynchronizing(self) -> None: ... - def openglContextCreated(self, context: QtGui.QOpenGLContext) -> None: ... - def resetOpenGLState(self) -> None: ... - def activeFocusItemChanged(self) -> None: ... - def closing(self, close: 'QQuickCloseEvent') -> None: ... - @staticmethod - def setDefaultAlphaBuffer(useAlpha: bool) -> None: ... - @staticmethod - def hasDefaultAlphaBuffer() -> bool: ... - def wheelEvent(self, a0: QtGui.QWheelEvent) -> None: ... - def mouseMoveEvent(self, a0: QtGui.QMouseEvent) -> None: ... - def mouseDoubleClickEvent(self, a0: QtGui.QMouseEvent) -> None: ... - def mouseReleaseEvent(self, a0: QtGui.QMouseEvent) -> None: ... - def mousePressEvent(self, a0: QtGui.QMouseEvent) -> None: ... - def keyReleaseEvent(self, a0: QtGui.QKeyEvent) -> None: ... - def keyPressEvent(self, a0: QtGui.QKeyEvent) -> None: ... - def event(self, a0: QtCore.QEvent) -> bool: ... - def focusOutEvent(self, a0: QtGui.QFocusEvent) -> None: ... - def focusInEvent(self, a0: QtGui.QFocusEvent) -> None: ... - def hideEvent(self, a0: QtGui.QHideEvent) -> None: ... - def showEvent(self, a0: QtGui.QShowEvent) -> None: ... - def resizeEvent(self, a0: QtGui.QResizeEvent) -> None: ... - def exposeEvent(self, a0: QtGui.QExposeEvent) -> None: ... - def releaseResources(self) -> None: ... - def update(self) -> None: ... - def colorChanged(self, a0: typing.Union[QtGui.QColor, QtCore.Qt.GlobalColor]) -> None: ... - def afterRendering(self) -> None: ... - def beforeRendering(self) -> None: ... - def beforeSynchronizing(self) -> None: ... - def sceneGraphInvalidated(self) -> None: ... - def sceneGraphInitialized(self) -> None: ... - def frameSwapped(self) -> None: ... - def openglContext(self) -> QtGui.QOpenGLContext: ... - def isPersistentSceneGraph(self) -> bool: ... - def setPersistentSceneGraph(self, persistent: bool) -> None: ... - def isPersistentOpenGLContext(self) -> bool: ... - def setPersistentOpenGLContext(self, persistent: bool) -> None: ... - def color(self) -> QtGui.QColor: ... - def setColor(self, color: typing.Union[QtGui.QColor, QtCore.Qt.GlobalColor]) -> None: ... - def clearBeforeRendering(self) -> bool: ... - def setClearBeforeRendering(self, enabled: bool) -> None: ... - def createTextureFromId(self, id: int, size: QtCore.QSize, options: typing.Union['QQuickWindow.CreateTextureOptions', 'QQuickWindow.CreateTextureOption'] = ...) -> 'QSGTexture': ... - @typing.overload - def createTextureFromImage(self, image: QtGui.QImage) -> 'QSGTexture': ... - @typing.overload - def createTextureFromImage(self, image: QtGui.QImage, options: typing.Union['QQuickWindow.CreateTextureOptions', 'QQuickWindow.CreateTextureOption']) -> 'QSGTexture': ... - def incubationController(self) -> QtQml.QQmlIncubationController: ... - def renderTargetSize(self) -> QtCore.QSize: ... - def renderTargetId(self) -> int: ... - def renderTarget(self) -> QtGui.QOpenGLFramebufferObject: ... - @typing.overload - def setRenderTarget(self, fbo: QtGui.QOpenGLFramebufferObject) -> None: ... - @typing.overload - def setRenderTarget(self, fboId: int, size: QtCore.QSize) -> None: ... - def grabWindow(self) -> QtGui.QImage: ... - def sendEvent(self, a0: QQuickItem, a1: QtCore.QEvent) -> bool: ... - def mouseGrabberItem(self) -> QQuickItem: ... - def focusObject(self) -> QtCore.QObject: ... - def activeFocusItem(self) -> QQuickItem: ... - def contentItem(self) -> QQuickItem: ... - - -class QQuickView(QQuickWindow): - - class Status(int): ... - Null = ... # type: 'QQuickView.Status' - Ready = ... # type: 'QQuickView.Status' - Loading = ... # type: 'QQuickView.Status' - Error = ... # type: 'QQuickView.Status' - - class ResizeMode(int): ... - SizeViewToRootObject = ... # type: 'QQuickView.ResizeMode' - SizeRootObjectToView = ... # type: 'QQuickView.ResizeMode' - - @typing.overload - def __init__(self, parent: typing.Optional[QtGui.QWindow] = ...) -> None: ... - @typing.overload - def __init__(self, engine: QtQml.QQmlEngine, parent: QtGui.QWindow) -> None: ... - @typing.overload - def __init__(self, source: QtCore.QUrl, parent: typing.Optional[QtGui.QWindow] = ...) -> None: ... - - def mouseMoveEvent(self, a0: QtGui.QMouseEvent) -> None: ... - def mouseReleaseEvent(self, a0: QtGui.QMouseEvent) -> None: ... - def mousePressEvent(self, a0: QtGui.QMouseEvent) -> None: ... - def keyReleaseEvent(self, a0: QtGui.QKeyEvent) -> None: ... - def keyPressEvent(self, a0: QtGui.QKeyEvent) -> None: ... - def timerEvent(self, a0: QtCore.QTimerEvent) -> None: ... - def resizeEvent(self, a0: QtGui.QResizeEvent) -> None: ... - def statusChanged(self, a0: 'QQuickView.Status') -> None: ... - def setSource(self, a0: QtCore.QUrl) -> None: ... - def initialSize(self) -> QtCore.QSize: ... - def errors(self) -> typing.List[QtQml.QQmlError]: ... - def status(self) -> 'QQuickView.Status': ... - def setResizeMode(self, a0: 'QQuickView.ResizeMode') -> None: ... - def resizeMode(self) -> 'QQuickView.ResizeMode': ... - def rootObject(self) -> QQuickItem: ... - def rootContext(self) -> QtQml.QQmlContext: ... - def engine(self) -> QtQml.QQmlEngine: ... - def source(self) -> QtCore.QUrl: ... - - -class QQuickCloseEvent(sip.simplewrapper): ... - - -class QSGAbstractRenderer(QtCore.QObject): - - class ClearModeBit(int): ... - ClearColorBuffer = ... # type: 'QSGAbstractRenderer.ClearModeBit' - ClearDepthBuffer = ... # type: 'QSGAbstractRenderer.ClearModeBit' - ClearStencilBuffer = ... # type: 'QSGAbstractRenderer.ClearModeBit' - - class ClearMode(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QSGAbstractRenderer.ClearMode', 'QSGAbstractRenderer.ClearModeBit']) -> None: ... - @typing.overload - def __init__(self, a0: 'QSGAbstractRenderer.ClearMode') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QSGAbstractRenderer.ClearMode': ... - def __int__(self) -> int: ... - - def sceneGraphChanged(self) -> None: ... - def renderScene(self, fboId: int = ...) -> None: ... - def clearMode(self) -> 'QSGAbstractRenderer.ClearMode': ... - def setClearMode(self, mode: typing.Union['QSGAbstractRenderer.ClearMode', 'QSGAbstractRenderer.ClearModeBit']) -> None: ... - def clearColor(self) -> QtGui.QColor: ... - def setClearColor(self, color: typing.Union[QtGui.QColor, QtCore.Qt.GlobalColor]) -> None: ... - def projectionMatrix(self) -> QtGui.QMatrix4x4: ... - def setProjectionMatrix(self, matrix: QtGui.QMatrix4x4) -> None: ... - def setProjectionMatrixToRect(self, rect: QtCore.QRectF) -> None: ... - def viewportRect(self) -> QtCore.QRect: ... - @typing.overload - def setViewportRect(self, rect: QtCore.QRect) -> None: ... - @typing.overload - def setViewportRect(self, size: QtCore.QSize) -> None: ... - def deviceRect(self) -> QtCore.QRect: ... - @typing.overload - def setDeviceRect(self, rect: QtCore.QRect) -> None: ... - @typing.overload - def setDeviceRect(self, size: QtCore.QSize) -> None: ... - - -class QSGEngine(QtCore.QObject): - - class CreateTextureOption(int): ... - TextureHasAlphaChannel = ... # type: 'QSGEngine.CreateTextureOption' - TextureOwnsGLTexture = ... # type: 'QSGEngine.CreateTextureOption' - TextureCanUseAtlas = ... # type: 'QSGEngine.CreateTextureOption' - TextureIsOpaque = ... # type: 'QSGEngine.CreateTextureOption' - - class CreateTextureOptions(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QSGEngine.CreateTextureOptions', 'QSGEngine.CreateTextureOption']) -> None: ... - @typing.overload - def __init__(self, a0: 'QSGEngine.CreateTextureOptions') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QSGEngine.CreateTextureOptions': ... - def __int__(self) -> int: ... - - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def createTextureFromId(self, id: int, size: QtCore.QSize, options: typing.Union['QSGEngine.CreateTextureOptions', 'QSGEngine.CreateTextureOption'] = ...) -> 'QSGTexture': ... - def createTextureFromImage(self, image: QtGui.QImage, options: typing.Union['QSGEngine.CreateTextureOptions', 'QSGEngine.CreateTextureOption'] = ...) -> 'QSGTexture': ... - def createRenderer(self) -> QSGAbstractRenderer: ... - def invalidate(self) -> None: ... - def initialize(self, context: QtGui.QOpenGLContext) -> None: ... - - -class QSGMaterial(sip.wrapper): - - class Flag(int): ... - Blending = ... # type: 'QSGMaterial.Flag' - RequiresDeterminant = ... # type: 'QSGMaterial.Flag' - RequiresFullMatrixExceptTranslate = ... # type: 'QSGMaterial.Flag' - RequiresFullMatrix = ... # type: 'QSGMaterial.Flag' - CustomCompileStep = ... # type: 'QSGMaterial.Flag' - - class Flags(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QSGMaterial.Flags', 'QSGMaterial.Flag']) -> None: ... - @typing.overload - def __init__(self, a0: 'QSGMaterial.Flags') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QSGMaterial.Flags': ... - def __int__(self) -> int: ... - - def __init__(self) -> None: ... - - def setFlag(self, flags: 'QSGMaterial.Flags', enabled: bool = ...) -> None: ... - def flags(self) -> 'QSGMaterial.Flags': ... - def compare(self, other: 'QSGMaterial') -> int: ... - def createShader(self) -> 'QSGMaterialShader': ... - def type(self) -> 'QSGMaterialType': ... - - -class QSGFlatColorMaterial(QSGMaterial): - - def __init__(self) -> None: ... - - def compare(self, other: QSGMaterial) -> int: ... - def color(self) -> QtGui.QColor: ... - def setColor(self, color: typing.Union[QtGui.QColor, QtCore.Qt.GlobalColor]) -> None: ... - def createShader(self) -> 'QSGMaterialShader': ... - def type(self) -> 'QSGMaterialType': ... - - -class QSGGeometry(sip.wrapper): - - class DataPattern(int): ... - AlwaysUploadPattern = ... # type: 'QSGGeometry.DataPattern' - StreamPattern = ... # type: 'QSGGeometry.DataPattern' - DynamicPattern = ... # type: 'QSGGeometry.DataPattern' - StaticPattern = ... # type: 'QSGGeometry.DataPattern' - - GL_POINTS = ... # type: int - GL_LINES = ... # type: int - GL_LINE_LOOP = ... # type: int - GL_LINE_STRIP = ... # type: int - GL_TRIANGLES = ... # type: int - GL_TRIANGLE_STRIP = ... # type: int - GL_TRIANGLE_FAN = ... # type: int - - GL_BYTE = ... # type: int - GL_DOUBLE = ... # type: int - GL_FLOAT = ... # type: int - GL_INT = ... # type: int - - class Attribute(sip.simplewrapper): - - isVertexCoordinate = ... # type: int - position = ... # type: int - tupleSize = ... # type: int - type = ... # type: int - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QSGGeometry.Attribute') -> None: ... - - @staticmethod - def create(pos: int, tupleSize: int, primitiveType: int, isPosition: bool = ...) -> 'QSGGeometry.Attribute': ... - - class AttributeSet(sip.simplewrapper): - - attributes = ... # type: sip.array[QSGGeometry.Attribute] - count = ... # type: int - stride = ... # type: int - - def __init__(self, attributes: typing.Iterable['QSGGeometry.Attribute'], stride: int = ...) -> None: ... - - class Point2D(sip.simplewrapper): - - x = ... # type: float - y = ... # type: float - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QSGGeometry.Point2D') -> None: ... - - def set(self, nx: float, ny: float) -> None: ... - - class TexturedPoint2D(sip.simplewrapper): - - tx = ... # type: float - ty = ... # type: float - x = ... # type: float - y = ... # type: float - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QSGGeometry.TexturedPoint2D') -> None: ... - - def set(self, nx: float, ny: float, ntx: float, nty: float) -> None: ... - - class ColoredPoint2D(sip.simplewrapper): - - a = ... # type: int - b = ... # type: int - g = ... # type: int - r = ... # type: int - x = ... # type: float - y = ... # type: float - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QSGGeometry.ColoredPoint2D') -> None: ... - - def set(self, nx: float, ny: float, nr: int, ng: int, nb: int, na: int) -> None: ... - - @typing.overload - def __init__(self, attribs: 'QSGGeometry.AttributeSet', vertexCount: int, indexCount: int = ..., indexType: int = ...) -> None: ... - @typing.overload - def __init__(self, a0: 'QSGGeometry') -> None: ... - - def sizeOfIndex(self) -> int: ... - def vertexDataAsColoredPoint2D(self) -> sip.array[QSGGeometry.ColoredPoint2D]: ... - def vertexDataAsTexturedPoint2D(self) -> sip.array[QSGGeometry.TexturedPoint2D]: ... - def vertexDataAsPoint2D(self) -> sip.array[QSGGeometry.Point2D]: ... - def indexDataAsUShort(self) -> sip.array[int]: ... - def indexDataAsUInt(self) -> sip.array[int]: ... - def setLineWidth(self, w: float) -> None: ... - def lineWidth(self) -> float: ... - def markVertexDataDirty(self) -> None: ... - def markIndexDataDirty(self) -> None: ... - def vertexDataPattern(self) -> 'QSGGeometry.DataPattern': ... - def setVertexDataPattern(self, p: 'QSGGeometry.DataPattern') -> None: ... - def indexDataPattern(self) -> 'QSGGeometry.DataPattern': ... - def setIndexDataPattern(self, p: 'QSGGeometry.DataPattern') -> None: ... - @staticmethod - def updateTexturedRectGeometry(g: 'QSGGeometry', rect: QtCore.QRectF, sourceRect: QtCore.QRectF) -> None: ... - @staticmethod - def updateRectGeometry(g: 'QSGGeometry', rect: QtCore.QRectF) -> None: ... - def sizeOfVertex(self) -> int: ... - def attributes(self) -> sip.array[QSGGeometry.Attribute]: ... - def attributeCount(self) -> int: ... - def indexData(self) -> sip.voidptr: ... - def indexCount(self) -> int: ... - def indexType(self) -> int: ... - def vertexData(self) -> sip.voidptr: ... - def vertexCount(self) -> int: ... - def allocate(self, vertexCount: int, indexCount: int = ...) -> None: ... - def drawingMode(self) -> int: ... - def setDrawingMode(self, mode: int) -> None: ... - @staticmethod - def defaultAttributes_ColoredPoint2D() -> 'QSGGeometry.AttributeSet': ... - @staticmethod - def defaultAttributes_TexturedPoint2D() -> 'QSGGeometry.AttributeSet': ... - @staticmethod - def defaultAttributes_Point2D() -> 'QSGGeometry.AttributeSet': ... - - -class QSGMaterialShader(sip.wrapper): - - class RenderState(sip.simplewrapper): - - class DirtyState(int): ... - DirtyMatrix = ... # type: 'QSGMaterialShader.RenderState.DirtyState' - DirtyOpacity = ... # type: 'QSGMaterialShader.RenderState.DirtyState' - - class DirtyStates(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QSGMaterialShader.RenderState.DirtyStates', 'QSGMaterialShader.RenderState.DirtyState']) -> None: ... - @typing.overload - def __init__(self, a0: 'QSGMaterialShader.RenderState.DirtyStates') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QSGMaterialShader.RenderState.DirtyStates': ... - def __int__(self) -> int: ... - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QSGMaterialShader.RenderState') -> None: ... - - def devicePixelRatio(self) -> float: ... - def projectionMatrix(self) -> QtGui.QMatrix4x4: ... - def context(self) -> QtGui.QOpenGLContext: ... - def determinant(self) -> float: ... - def deviceRect(self) -> QtCore.QRect: ... - def viewportRect(self) -> QtCore.QRect: ... - def modelViewMatrix(self) -> QtGui.QMatrix4x4: ... - def combinedMatrix(self) -> QtGui.QMatrix4x4: ... - def opacity(self) -> float: ... - def isOpacityDirty(self) -> bool: ... - def isMatrixDirty(self) -> bool: ... - def dirtyStates(self) -> 'QSGMaterialShader.RenderState.DirtyStates': ... - - def __init__(self) -> None: ... - - def setShaderSourceFiles(self, type: QtGui.QOpenGLShader.ShaderType, sourceFiles: typing.Iterable[str]) -> None: ... - def setShaderSourceFile(self, type: QtGui.QOpenGLShader.ShaderType, sourceFile: str) -> None: ... - def fragmentShader(self) -> str: ... - def vertexShader(self) -> str: ... - def initialize(self) -> None: ... - def compile(self) -> None: ... - def program(self) -> QtGui.QOpenGLShaderProgram: ... - def attributeNames(self) -> typing.List[str]: ... - def updateState(self, state: 'QSGMaterialShader.RenderState', newMaterial: QSGMaterial, oldMaterial: QSGMaterial) -> None: ... - def deactivate(self) -> None: ... - def activate(self) -> None: ... - - -class QSGMaterialType(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QSGMaterialType') -> None: ... - - -class QSGNode(sip.wrapper): - - class DirtyStateBit(int): ... - DirtyMatrix = ... # type: 'QSGNode.DirtyStateBit' - DirtyNodeAdded = ... # type: 'QSGNode.DirtyStateBit' - DirtyNodeRemoved = ... # type: 'QSGNode.DirtyStateBit' - DirtyGeometry = ... # type: 'QSGNode.DirtyStateBit' - DirtyMaterial = ... # type: 'QSGNode.DirtyStateBit' - DirtyOpacity = ... # type: 'QSGNode.DirtyStateBit' - - class Flag(int): ... - OwnedByParent = ... # type: 'QSGNode.Flag' - UsePreprocess = ... # type: 'QSGNode.Flag' - OwnsGeometry = ... # type: 'QSGNode.Flag' - OwnsMaterial = ... # type: 'QSGNode.Flag' - OwnsOpaqueMaterial = ... # type: 'QSGNode.Flag' - - class NodeType(int): ... - BasicNodeType = ... # type: 'QSGNode.NodeType' - GeometryNodeType = ... # type: 'QSGNode.NodeType' - TransformNodeType = ... # type: 'QSGNode.NodeType' - ClipNodeType = ... # type: 'QSGNode.NodeType' - OpacityNodeType = ... # type: 'QSGNode.NodeType' - - class Flags(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QSGNode.Flags', 'QSGNode.Flag']) -> None: ... - @typing.overload - def __init__(self, a0: 'QSGNode.Flags') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QSGNode.Flags': ... - def __int__(self) -> int: ... - - class DirtyState(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QSGNode.DirtyState', 'QSGNode.DirtyStateBit']) -> None: ... - @typing.overload - def __init__(self, a0: 'QSGNode.DirtyState') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QSGNode.DirtyState': ... - def __int__(self) -> int: ... - - def __init__(self) -> None: ... - - def preprocess(self) -> None: ... - def setFlags(self, a0: typing.Union['QSGNode.Flags', 'QSGNode.Flag'], enabled: bool = ...) -> None: ... - def setFlag(self, a0: 'QSGNode.Flag', enabled: bool = ...) -> None: ... - def flags(self) -> 'QSGNode.Flags': ... - def isSubtreeBlocked(self) -> bool: ... - def markDirty(self, bits: typing.Union['QSGNode.DirtyState', 'QSGNode.DirtyStateBit']) -> None: ... - def type(self) -> 'QSGNode.NodeType': ... - def previousSibling(self) -> 'QSGNode': ... - def nextSibling(self) -> 'QSGNode': ... - def lastChild(self) -> 'QSGNode': ... - def firstChild(self) -> 'QSGNode': ... - def childAtIndex(self, i: int) -> 'QSGNode': ... - def __len__(self) -> int: ... - def childCount(self) -> int: ... - def insertChildNodeAfter(self, node: 'QSGNode', after: 'QSGNode') -> None: ... - def insertChildNodeBefore(self, node: 'QSGNode', before: 'QSGNode') -> None: ... - def appendChildNode(self, node: 'QSGNode') -> None: ... - def prependChildNode(self, node: 'QSGNode') -> None: ... - def removeAllChildNodes(self) -> None: ... - def removeChildNode(self, node: 'QSGNode') -> None: ... - def parent(self) -> 'QSGNode': ... - - -class QSGBasicGeometryNode(QSGNode): - - def geometry(self) -> QSGGeometry: ... - def setGeometry(self, geometry: QSGGeometry) -> None: ... - - -class QSGGeometryNode(QSGBasicGeometryNode): - - def __init__(self) -> None: ... - - def opaqueMaterial(self) -> QSGMaterial: ... - def setOpaqueMaterial(self, material: QSGMaterial) -> None: ... - def material(self) -> QSGMaterial: ... - def setMaterial(self, material: QSGMaterial) -> None: ... - - -class QSGClipNode(QSGBasicGeometryNode): - - def __init__(self) -> None: ... - - def clipRect(self) -> QtCore.QRectF: ... - def setClipRect(self, a0: QtCore.QRectF) -> None: ... - def isRectangular(self) -> bool: ... - def setIsRectangular(self, rectHint: bool) -> None: ... - - -class QSGTransformNode(QSGNode): - - def __init__(self) -> None: ... - - def matrix(self) -> QtGui.QMatrix4x4: ... - def setMatrix(self, matrix: QtGui.QMatrix4x4) -> None: ... - - -class QSGOpacityNode(QSGNode): - - def __init__(self) -> None: ... - - def opacity(self) -> float: ... - def setOpacity(self, opacity: float) -> None: ... - - -class QSGSimpleRectNode(QSGGeometryNode): - - @typing.overload - def __init__(self, rect: QtCore.QRectF, color: typing.Union[QtGui.QColor, QtCore.Qt.GlobalColor]) -> None: ... - @typing.overload - def __init__(self) -> None: ... - - def color(self) -> QtGui.QColor: ... - def setColor(self, color: typing.Union[QtGui.QColor, QtCore.Qt.GlobalColor]) -> None: ... - def rect(self) -> QtCore.QRectF: ... - @typing.overload - def setRect(self, rect: QtCore.QRectF) -> None: ... - @typing.overload - def setRect(self, x: float, y: float, w: float, h: float) -> None: ... - - -class QSGSimpleTextureNode(QSGGeometryNode): - - class TextureCoordinatesTransformFlag(int): ... - NoTransform = ... # type: 'QSGSimpleTextureNode.TextureCoordinatesTransformFlag' - MirrorHorizontally = ... # type: 'QSGSimpleTextureNode.TextureCoordinatesTransformFlag' - MirrorVertically = ... # type: 'QSGSimpleTextureNode.TextureCoordinatesTransformFlag' - - class TextureCoordinatesTransformMode(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QSGSimpleTextureNode.TextureCoordinatesTransformMode', 'QSGSimpleTextureNode.TextureCoordinatesTransformFlag']) -> None: ... - @typing.overload - def __init__(self, a0: 'QSGSimpleTextureNode.TextureCoordinatesTransformMode') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QSGSimpleTextureNode.TextureCoordinatesTransformMode': ... - def __int__(self) -> int: ... - - def __init__(self) -> None: ... - - def sourceRect(self) -> QtCore.QRectF: ... - @typing.overload - def setSourceRect(self, r: QtCore.QRectF) -> None: ... - @typing.overload - def setSourceRect(self, x: float, y: float, w: float, h: float) -> None: ... - def ownsTexture(self) -> bool: ... - def setOwnsTexture(self, owns: bool) -> None: ... - def textureCoordinatesTransform(self) -> 'QSGSimpleTextureNode.TextureCoordinatesTransformMode': ... - def setTextureCoordinatesTransform(self, mode: 'QSGSimpleTextureNode.TextureCoordinatesTransformMode') -> None: ... - def filtering(self) -> 'QSGTexture.Filtering': ... - def setFiltering(self, filtering: 'QSGTexture.Filtering') -> None: ... - def texture(self) -> 'QSGTexture': ... - def setTexture(self, texture: 'QSGTexture') -> None: ... - def rect(self) -> QtCore.QRectF: ... - @typing.overload - def setRect(self, rect: QtCore.QRectF) -> None: ... - @typing.overload - def setRect(self, x: float, y: float, w: float, h: float) -> None: ... - - -class QSGTexture(QtCore.QObject): - - class Filtering(int): ... - # None = ... # type: 'QSGTexture.Filtering' - Nearest = ... # type: 'QSGTexture.Filtering' - Linear = ... # type: 'QSGTexture.Filtering' - - class WrapMode(int): ... - Repeat = ... # type: 'QSGTexture.WrapMode' - ClampToEdge = ... # type: 'QSGTexture.WrapMode' - - def __init__(self) -> None: ... - - def convertToNormalizedSourceRect(self, rect: QtCore.QRectF) -> QtCore.QRectF: ... - def verticalWrapMode(self) -> 'QSGTexture.WrapMode': ... - def setVerticalWrapMode(self, vwrap: 'QSGTexture.WrapMode') -> None: ... - def horizontalWrapMode(self) -> 'QSGTexture.WrapMode': ... - def setHorizontalWrapMode(self, hwrap: 'QSGTexture.WrapMode') -> None: ... - def filtering(self) -> 'QSGTexture.Filtering': ... - def setFiltering(self, filter: 'QSGTexture.Filtering') -> None: ... - def mipmapFiltering(self) -> 'QSGTexture.Filtering': ... - def setMipmapFiltering(self, filter: 'QSGTexture.Filtering') -> None: ... - def updateBindOptions(self, force: bool = ...) -> None: ... - def bind(self) -> None: ... - def removedFromAtlas(self) -> 'QSGTexture': ... - def isAtlasTexture(self) -> bool: ... - def normalizedTextureSubRect(self) -> QtCore.QRectF: ... - def hasMipmaps(self) -> bool: ... - def hasAlphaChannel(self) -> bool: ... - def textureSize(self) -> QtCore.QSize: ... - def textureId(self) -> int: ... - - -class QSGDynamicTexture(QSGTexture): - - def __init__(self) -> None: ... - - def updateTexture(self) -> bool: ... - - -class QSGOpaqueTextureMaterial(QSGMaterial): - - def __init__(self) -> None: ... - - def verticalWrapMode(self) -> QSGTexture.WrapMode: ... - def setVerticalWrapMode(self, mode: QSGTexture.WrapMode) -> None: ... - def horizontalWrapMode(self) -> QSGTexture.WrapMode: ... - def setHorizontalWrapMode(self, mode: QSGTexture.WrapMode) -> None: ... - def filtering(self) -> QSGTexture.Filtering: ... - def setFiltering(self, filtering: QSGTexture.Filtering) -> None: ... - def mipmapFiltering(self) -> QSGTexture.Filtering: ... - def setMipmapFiltering(self, filtering: QSGTexture.Filtering) -> None: ... - def texture(self) -> QSGTexture: ... - def setTexture(self, texture: QSGTexture) -> None: ... - def compare(self, other: QSGMaterial) -> int: ... - def createShader(self) -> QSGMaterialShader: ... - def type(self) -> QSGMaterialType: ... - - -class QSGTextureMaterial(QSGOpaqueTextureMaterial): - - def __init__(self) -> None: ... - - def createShader(self) -> QSGMaterialShader: ... - def type(self) -> QSGMaterialType: ... - - -class QSGTextureProvider(QtCore.QObject): - - def __init__(self) -> None: ... - - def textureChanged(self) -> None: ... - def texture(self) -> QSGTexture: ... - - -class QSGVertexColorMaterial(QSGMaterial): - - def __init__(self) -> None: ... - - def createShader(self) -> QSGMaterialShader: ... - def type(self) -> QSGMaterialType: ... - def compare(self, other: QSGMaterial) -> int: ... diff -Nru uranium-3.3.0/stubs/PyQt5/QtQuickWidgets.pyi uranium-4.4.1/stubs/PyQt5/QtQuickWidgets.pyi --- uranium-3.3.0/stubs/PyQt5/QtQuickWidgets.pyi 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/stubs/PyQt5/QtQuickWidgets.pyi 1970-01-01 00:00:00.000000000 +0000 @@ -1,100 +0,0 @@ -# The PEP 484 type hints stub file for the QtQuickWidgets module. -# -# Generated by SIP 4.18.1 -# -# Copyright (c) 2016 Riverbank Computing Limited -# -# This file is part of PyQt5. -# -# This file may be used under the terms of the GNU General Public License -# version 3.0 as published by the Free Software Foundation and appearing in -# the file LICENSE included in the packaging of this file. Please review the -# following information to ensure the GNU General Public License version 3.0 -# requirements will be met: http://www.gnu.org/copyleft/gpl.html. -# -# If you do not wish to use this file under the terms of the GPL version 3.0 -# then you may purchase a commercial license. For more information contact -# info@riverbankcomputing.com. -# -# This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -# WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - - -import typing -import sip - -from PyQt5 import QtWidgets -from PyQt5 import QtQuick -from PyQt5 import QtQml -from PyQt5 import QtGui -from PyQt5 import QtCore - -# Support for QDate, QDateTime and QTime. -import datetime - -# Convenient type aliases. -PYQT_SIGNAL = typing.Union[QtCore.pyqtSignal, QtCore.pyqtBoundSignal] -PYQT_SLOT = typing.Union[typing.Callable[..., None], QtCore.pyqtBoundSignal] - -# Convenient aliases for complicated OpenGL types. -PYQT_OPENGL_ARRAY = typing.Union[typing.Sequence[int], typing.Sequence[float], - sip.Buffer, None] -PYQT_OPENGL_BOUND_ARRAY = typing.Union[typing.Sequence[int], - typing.Sequence[float], sip.Buffer, int, None] - - -class QQuickWidget(QtWidgets.QWidget): - - class Status(int): ... - Null = ... # type: 'QQuickWidget.Status' - Ready = ... # type: 'QQuickWidget.Status' - Loading = ... # type: 'QQuickWidget.Status' - Error = ... # type: 'QQuickWidget.Status' - - class ResizeMode(int): ... - SizeViewToRootObject = ... # type: 'QQuickWidget.ResizeMode' - SizeRootObjectToView = ... # type: 'QQuickWidget.ResizeMode' - - @typing.overload - def __init__(self, parent: typing.Optional[QtWidgets.QWidget] = ...) -> None: ... - @typing.overload - def __init__(self, engine: QtQml.QQmlEngine, parent: QtWidgets.QWidget) -> None: ... - @typing.overload - def __init__(self, source: QtCore.QUrl, parent: typing.Optional[QtWidgets.QWidget] = ...) -> None: ... - - def quickWindow(self) -> QtQuick.QQuickWindow: ... - def setClearColor(self, color: typing.Union[QtGui.QColor, QtCore.Qt.GlobalColor]) -> None: ... - def grabFramebuffer(self) -> QtGui.QImage: ... - def dropEvent(self, a0: QtGui.QDropEvent) -> None: ... - def dragLeaveEvent(self, a0: QtGui.QDragLeaveEvent) -> None: ... - def dragMoveEvent(self, a0: QtGui.QDragMoveEvent) -> None: ... - def dragEnterEvent(self, a0: QtGui.QDragEnterEvent) -> None: ... - def focusOutEvent(self, event: QtGui.QFocusEvent) -> None: ... - def focusInEvent(self, event: QtGui.QFocusEvent) -> None: ... - def event(self, a0: QtCore.QEvent) -> bool: ... - def wheelEvent(self, a0: QtGui.QWheelEvent) -> None: ... - def hideEvent(self, a0: QtGui.QHideEvent) -> None: ... - def showEvent(self, a0: QtGui.QShowEvent) -> None: ... - def mouseDoubleClickEvent(self, a0: QtGui.QMouseEvent) -> None: ... - def mouseMoveEvent(self, a0: QtGui.QMouseEvent) -> None: ... - def mouseReleaseEvent(self, a0: QtGui.QMouseEvent) -> None: ... - def mousePressEvent(self, a0: QtGui.QMouseEvent) -> None: ... - def keyReleaseEvent(self, a0: QtGui.QKeyEvent) -> None: ... - def keyPressEvent(self, a0: QtGui.QKeyEvent) -> None: ... - def timerEvent(self, a0: QtCore.QTimerEvent) -> None: ... - def resizeEvent(self, a0: QtGui.QResizeEvent) -> None: ... - def sceneGraphError(self, error: QtQuick.QQuickWindow.SceneGraphError, message: str) -> None: ... - def statusChanged(self, a0: 'QQuickWidget.Status') -> None: ... - def setSource(self, a0: QtCore.QUrl) -> None: ... - def format(self) -> QtGui.QSurfaceFormat: ... - def setFormat(self, format: QtGui.QSurfaceFormat) -> None: ... - def initialSize(self) -> QtCore.QSize: ... - def sizeHint(self) -> QtCore.QSize: ... - def errors(self) -> typing.List[QtQml.QQmlError]: ... - def status(self) -> 'QQuickWidget.Status': ... - def setResizeMode(self, a0: 'QQuickWidget.ResizeMode') -> None: ... - def resizeMode(self) -> 'QQuickWidget.ResizeMode': ... - def rootObject(self) -> QtQuick.QQuickItem: ... - def rootContext(self) -> QtQml.QQmlContext: ... - def engine(self) -> QtQml.QQmlEngine: ... - def source(self) -> QtCore.QUrl: ... diff -Nru uranium-3.3.0/stubs/PyQt5/QtSensors.pyi uranium-4.4.1/stubs/PyQt5/QtSensors.pyi --- uranium-3.3.0/stubs/PyQt5/QtSensors.pyi 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/stubs/PyQt5/QtSensors.pyi 1970-01-01 00:00:00.000000000 +0000 @@ -1,611 +0,0 @@ -# The PEP 484 type hints stub file for the QtSensors module. -# -# Generated by SIP 4.18.1 -# -# Copyright (c) 2016 Riverbank Computing Limited -# -# This file is part of PyQt5. -# -# This file may be used under the terms of the GNU General Public License -# version 3.0 as published by the Free Software Foundation and appearing in -# the file LICENSE included in the packaging of this file. Please review the -# following information to ensure the GNU General Public License version 3.0 -# requirements will be met: http://www.gnu.org/copyleft/gpl.html. -# -# If you do not wish to use this file under the terms of the GPL version 3.0 -# then you may purchase a commercial license. For more information contact -# info@riverbankcomputing.com. -# -# This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -# WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - - -import typing -import sip - -from PyQt5 import QtCore - -# Support for QDate, QDateTime and QTime. -import datetime - -# Convenient type aliases. -PYQT_SIGNAL = typing.Union[QtCore.pyqtSignal, QtCore.pyqtBoundSignal] -PYQT_SLOT = typing.Union[typing.Callable[..., None], QtCore.pyqtBoundSignal] - - -class QSensorReading(QtCore.QObject): - - def value(self, index: int) -> typing.Any: ... - def valueCount(self) -> int: ... - def setTimestamp(self, timestamp: int) -> None: ... - def timestamp(self) -> int: ... - - -class QAccelerometerReading(QSensorReading): - - def setZ(self, z: float) -> None: ... - def z(self) -> float: ... - def setY(self, y: float) -> None: ... - def y(self) -> float: ... - def setX(self, x: float) -> None: ... - def x(self) -> float: ... - - -class QSensorFilter(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QSensorFilter') -> None: ... - - def filter(self, reading: QSensorReading) -> bool: ... - - -class QAccelerometerFilter(QSensorFilter): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QAccelerometerFilter') -> None: ... - - def filter(self, reading: QAccelerometerReading) -> bool: ... - - -class QSensor(QtCore.QObject): - - class AxesOrientationMode(int): ... - FixedOrientation = ... # type: 'QSensor.AxesOrientationMode' - AutomaticOrientation = ... # type: 'QSensor.AxesOrientationMode' - UserOrientation = ... # type: 'QSensor.AxesOrientationMode' - - class Feature(int): ... - Buffering = ... # type: 'QSensor.Feature' - AlwaysOn = ... # type: 'QSensor.Feature' - GeoValues = ... # type: 'QSensor.Feature' - FieldOfView = ... # type: 'QSensor.Feature' - AccelerationMode = ... # type: 'QSensor.Feature' - SkipDuplicates = ... # type: 'QSensor.Feature' - AxesOrientation = ... # type: 'QSensor.Feature' - PressureSensorTemperature = ... # type: 'QSensor.Feature' - - def __init__(self, type: typing.Union[QtCore.QByteArray, bytes, bytearray], parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def bufferSizeChanged(self, bufferSize: int) -> None: ... - def efficientBufferSizeChanged(self, efficientBufferSize: int) -> None: ... - def maxBufferSizeChanged(self, maxBufferSize: int) -> None: ... - def userOrientationChanged(self, userOrientation: int) -> None: ... - def currentOrientationChanged(self, currentOrientation: int) -> None: ... - def axesOrientationModeChanged(self, axesOrientationMode: 'QSensor.AxesOrientationMode') -> None: ... - def skipDuplicatesChanged(self, skipDuplicates: bool) -> None: ... - def dataRateChanged(self) -> None: ... - def alwaysOnChanged(self) -> None: ... - def availableSensorsChanged(self) -> None: ... - def sensorError(self, error: int) -> None: ... - def readingChanged(self) -> None: ... - def activeChanged(self) -> None: ... - def busyChanged(self) -> None: ... - def stop(self) -> None: ... - def start(self) -> bool: ... - def setBufferSize(self, bufferSize: int) -> None: ... - def bufferSize(self) -> int: ... - def setEfficientBufferSize(self, efficientBufferSize: int) -> None: ... - def efficientBufferSize(self) -> int: ... - def setMaxBufferSize(self, maxBufferSize: int) -> None: ... - def maxBufferSize(self) -> int: ... - def setUserOrientation(self, userOrientation: int) -> None: ... - def userOrientation(self) -> int: ... - def setCurrentOrientation(self, currentOrientation: int) -> None: ... - def currentOrientation(self) -> int: ... - def setAxesOrientationMode(self, axesOrientationMode: 'QSensor.AxesOrientationMode') -> None: ... - def axesOrientationMode(self) -> 'QSensor.AxesOrientationMode': ... - def isFeatureSupported(self, feature: 'QSensor.Feature') -> bool: ... - @staticmethod - def defaultSensorForType(type: typing.Union[QtCore.QByteArray, bytes, bytearray]) -> QtCore.QByteArray: ... - @staticmethod - def sensorsForType(type: typing.Union[QtCore.QByteArray, bytes, bytearray]) -> typing.List[QtCore.QByteArray]: ... - @staticmethod - def sensorTypes() -> typing.List[QtCore.QByteArray]: ... - def reading(self) -> QSensorReading: ... - def filters(self) -> typing.Any: ... - def removeFilter(self, filter: QSensorFilter) -> None: ... - def addFilter(self, filter: QSensorFilter) -> None: ... - def error(self) -> int: ... - def description(self) -> str: ... - def setOutputRange(self, index: int) -> None: ... - def outputRange(self) -> int: ... - def outputRanges(self) -> typing.Any: ... - def setDataRate(self, rate: int) -> None: ... - def dataRate(self) -> int: ... - def availableDataRates(self) -> typing.List[typing.Tuple[int, int]]: ... - def setSkipDuplicates(self, skipDuplicates: bool) -> None: ... - def skipDuplicates(self) -> bool: ... - def setAlwaysOn(self, alwaysOn: bool) -> None: ... - def isAlwaysOn(self) -> bool: ... - def isActive(self) -> bool: ... - def setActive(self, active: bool) -> None: ... - def isBusy(self) -> bool: ... - def isConnectedToBackend(self) -> bool: ... - def connectToBackend(self) -> bool: ... - def type(self) -> QtCore.QByteArray: ... - def setIdentifier(self, identifier: typing.Union[QtCore.QByteArray, bytes, bytearray]) -> None: ... - def identifier(self) -> QtCore.QByteArray: ... - - -class QAccelerometer(QSensor): - - class AccelerationMode(int): ... - Combined = ... # type: 'QAccelerometer.AccelerationMode' - Gravity = ... # type: 'QAccelerometer.AccelerationMode' - User = ... # type: 'QAccelerometer.AccelerationMode' - - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def accelerationModeChanged(self, accelerationMode: 'QAccelerometer.AccelerationMode') -> None: ... - def reading(self) -> QAccelerometerReading: ... - def setAccelerationMode(self, accelerationMode: 'QAccelerometer.AccelerationMode') -> None: ... - def accelerationMode(self) -> 'QAccelerometer.AccelerationMode': ... - - -class QAltimeterReading(QSensorReading): - - def setAltitude(self, altitude: float) -> None: ... - def altitude(self) -> float: ... - - -class QAltimeterFilter(QSensorFilter): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QAltimeterFilter') -> None: ... - - def filter(self, reading: QAltimeterReading) -> bool: ... - - -class QAltimeter(QSensor): - - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def reading(self) -> QAltimeterReading: ... - - -class QAmbientLightReading(QSensorReading): - - class LightLevel(int): ... - Undefined = ... # type: 'QAmbientLightReading.LightLevel' - Dark = ... # type: 'QAmbientLightReading.LightLevel' - Twilight = ... # type: 'QAmbientLightReading.LightLevel' - Light = ... # type: 'QAmbientLightReading.LightLevel' - Bright = ... # type: 'QAmbientLightReading.LightLevel' - Sunny = ... # type: 'QAmbientLightReading.LightLevel' - - def setLightLevel(self, lightLevel: 'QAmbientLightReading.LightLevel') -> None: ... - def lightLevel(self) -> 'QAmbientLightReading.LightLevel': ... - - -class QAmbientLightFilter(QSensorFilter): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QAmbientLightFilter') -> None: ... - - def filter(self, reading: QAmbientLightReading) -> bool: ... - - -class QAmbientLightSensor(QSensor): - - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def reading(self) -> QAmbientLightReading: ... - - -class QAmbientTemperatureReading(QSensorReading): - - def setTemperature(self, temperature: float) -> None: ... - def temperature(self) -> float: ... - - -class QAmbientTemperatureFilter(QSensorFilter): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QAmbientTemperatureFilter') -> None: ... - - def filter(self, reading: QAmbientTemperatureReading) -> bool: ... - - -class QAmbientTemperatureSensor(QSensor): - - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def reading(self) -> QAmbientTemperatureReading: ... - - -class QCompassReading(QSensorReading): - - def setCalibrationLevel(self, calibrationLevel: float) -> None: ... - def calibrationLevel(self) -> float: ... - def setAzimuth(self, azimuth: float) -> None: ... - def azimuth(self) -> float: ... - - -class QCompassFilter(QSensorFilter): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QCompassFilter') -> None: ... - - def filter(self, reading: QCompassReading) -> bool: ... - - -class QCompass(QSensor): - - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def reading(self) -> QCompassReading: ... - - -class QDistanceReading(QSensorReading): - - def setDistance(self, distance: float) -> None: ... - def distance(self) -> float: ... - - -class QDistanceFilter(QSensorFilter): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QDistanceFilter') -> None: ... - - def filter(self, reading: QDistanceReading) -> bool: ... - - -class QDistanceSensor(QSensor): - - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def reading(self) -> QDistanceReading: ... - - -class QGyroscopeReading(QSensorReading): - - def setZ(self, z: float) -> None: ... - def z(self) -> float: ... - def setY(self, y: float) -> None: ... - def y(self) -> float: ... - def setX(self, x: float) -> None: ... - def x(self) -> float: ... - - -class QGyroscopeFilter(QSensorFilter): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QGyroscopeFilter') -> None: ... - - def filter(self, reading: QGyroscopeReading) -> bool: ... - - -class QGyroscope(QSensor): - - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def reading(self) -> QGyroscopeReading: ... - - -class QHolsterReading(QSensorReading): - - def setHolstered(self, holstered: bool) -> None: ... - def holstered(self) -> bool: ... - - -class QHolsterFilter(QSensorFilter): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QHolsterFilter') -> None: ... - - def filter(self, reading: QHolsterReading) -> bool: ... - - -class QHolsterSensor(QSensor): - - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def reading(self) -> QHolsterReading: ... - - -class QIRProximityReading(QSensorReading): - - def setReflectance(self, reflectance: float) -> None: ... - def reflectance(self) -> float: ... - - -class QIRProximityFilter(QSensorFilter): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QIRProximityFilter') -> None: ... - - def filter(self, reading: QIRProximityReading) -> bool: ... - - -class QIRProximitySensor(QSensor): - - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def reading(self) -> QIRProximityReading: ... - - -class QLightReading(QSensorReading): - - def setLux(self, lux: float) -> None: ... - def lux(self) -> float: ... - - -class QLightFilter(QSensorFilter): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QLightFilter') -> None: ... - - def filter(self, reading: QLightReading) -> bool: ... - - -class QLightSensor(QSensor): - - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def fieldOfViewChanged(self, fieldOfView: float) -> None: ... - def setFieldOfView(self, fieldOfView: float) -> None: ... - def fieldOfView(self) -> float: ... - def reading(self) -> QLightReading: ... - - -class QMagnetometerReading(QSensorReading): - - def setCalibrationLevel(self, calibrationLevel: float) -> None: ... - def calibrationLevel(self) -> float: ... - def setZ(self, z: float) -> None: ... - def z(self) -> float: ... - def setY(self, y: float) -> None: ... - def y(self) -> float: ... - def setX(self, x: float) -> None: ... - def x(self) -> float: ... - - -class QMagnetometerFilter(QSensorFilter): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QMagnetometerFilter') -> None: ... - - def filter(self, reading: QMagnetometerReading) -> bool: ... - - -class QMagnetometer(QSensor): - - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def returnGeoValuesChanged(self, returnGeoValues: bool) -> None: ... - def setReturnGeoValues(self, returnGeoValues: bool) -> None: ... - def returnGeoValues(self) -> bool: ... - def reading(self) -> QMagnetometerReading: ... - - -class QOrientationReading(QSensorReading): - - class Orientation(int): ... - Undefined = ... # type: 'QOrientationReading.Orientation' - TopUp = ... # type: 'QOrientationReading.Orientation' - TopDown = ... # type: 'QOrientationReading.Orientation' - LeftUp = ... # type: 'QOrientationReading.Orientation' - RightUp = ... # type: 'QOrientationReading.Orientation' - FaceUp = ... # type: 'QOrientationReading.Orientation' - FaceDown = ... # type: 'QOrientationReading.Orientation' - - def setOrientation(self, orientation: 'QOrientationReading.Orientation') -> None: ... - def orientation(self) -> 'QOrientationReading.Orientation': ... - - -class QOrientationFilter(QSensorFilter): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QOrientationFilter') -> None: ... - - def filter(self, reading: QOrientationReading) -> bool: ... - - -class QOrientationSensor(QSensor): - - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def reading(self) -> QOrientationReading: ... - - -class QPressureReading(QSensorReading): - - def setTemperature(self, temperature: float) -> None: ... - def temperature(self) -> float: ... - def setPressure(self, pressure: float) -> None: ... - def pressure(self) -> float: ... - - -class QPressureFilter(QSensorFilter): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QPressureFilter') -> None: ... - - def filter(self, reading: QPressureReading) -> bool: ... - - -class QPressureSensor(QSensor): - - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def reading(self) -> QPressureReading: ... - - -class QProximityReading(QSensorReading): - - def setClose(self, close: bool) -> None: ... - def close(self) -> bool: ... - - -class QProximityFilter(QSensorFilter): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QProximityFilter') -> None: ... - - def filter(self, reading: QProximityReading) -> bool: ... - - -class QProximitySensor(QSensor): - - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def reading(self) -> QProximityReading: ... - - -class qoutputrange(sip.simplewrapper): - - accuracy = ... # type: float - maximum = ... # type: float - minimum = ... # type: float - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'qoutputrange') -> None: ... - - -class QTapReading(QSensorReading): - - class TapDirection(int): ... - Undefined = ... # type: 'QTapReading.TapDirection' - X = ... # type: 'QTapReading.TapDirection' - Y = ... # type: 'QTapReading.TapDirection' - Z = ... # type: 'QTapReading.TapDirection' - X_Pos = ... # type: 'QTapReading.TapDirection' - Y_Pos = ... # type: 'QTapReading.TapDirection' - Z_Pos = ... # type: 'QTapReading.TapDirection' - X_Neg = ... # type: 'QTapReading.TapDirection' - Y_Neg = ... # type: 'QTapReading.TapDirection' - Z_Neg = ... # type: 'QTapReading.TapDirection' - X_Both = ... # type: 'QTapReading.TapDirection' - Y_Both = ... # type: 'QTapReading.TapDirection' - Z_Both = ... # type: 'QTapReading.TapDirection' - - def setDoubleTap(self, doubleTap: bool) -> None: ... - def isDoubleTap(self) -> bool: ... - def setTapDirection(self, tapDirection: 'QTapReading.TapDirection') -> None: ... - def tapDirection(self) -> 'QTapReading.TapDirection': ... - - -class QTapFilter(QSensorFilter): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QTapFilter') -> None: ... - - def filter(self, reading: QTapReading) -> bool: ... - - -class QTapSensor(QSensor): - - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def returnDoubleTapEventsChanged(self, returnDoubleTapEvents: bool) -> None: ... - def setReturnDoubleTapEvents(self, returnDoubleTapEvents: bool) -> None: ... - def returnDoubleTapEvents(self) -> bool: ... - def reading(self) -> QTapReading: ... - - -class QTiltReading(QSensorReading): - - def setXRotation(self, x: float) -> None: ... - def xRotation(self) -> float: ... - def setYRotation(self, y: float) -> None: ... - def yRotation(self) -> float: ... - - -class QTiltFilter(QSensorFilter): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QTiltFilter') -> None: ... - - def filter(self, reading: QTiltReading) -> bool: ... - - -class QTiltSensor(QSensor): - - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def calibrate(self) -> None: ... - def reading(self) -> QTiltReading: ... - - -class QRotationReading(QSensorReading): - - def setFromEuler(self, x: float, y: float, z: float) -> None: ... - def z(self) -> float: ... - def y(self) -> float: ... - def x(self) -> float: ... - - -class QRotationFilter(QSensorFilter): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QRotationFilter') -> None: ... - - def filter(self, reading: QRotationReading) -> bool: ... - - -class QRotationSensor(QSensor): - - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def hasZChanged(self, hasZ: bool) -> None: ... - def setHasZ(self, hasZ: bool) -> None: ... - def hasZ(self) -> bool: ... - def reading(self) -> QRotationReading: ... diff -Nru uranium-3.3.0/stubs/PyQt5/QtSerialPort.pyi uranium-4.4.1/stubs/PyQt5/QtSerialPort.pyi --- uranium-3.3.0/stubs/PyQt5/QtSerialPort.pyi 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/stubs/PyQt5/QtSerialPort.pyi 1970-01-01 00:00:00.000000000 +0000 @@ -1,236 +0,0 @@ -# The PEP 484 type hints stub file for the QtSerialPort module. -# -# Generated by SIP 4.18.1 -# -# Copyright (c) 2016 Riverbank Computing Limited -# -# This file is part of PyQt5. -# -# This file may be used under the terms of the GNU General Public License -# version 3.0 as published by the Free Software Foundation and appearing in -# the file LICENSE included in the packaging of this file. Please review the -# following information to ensure the GNU General Public License version 3.0 -# requirements will be met: http://www.gnu.org/copyleft/gpl.html. -# -# If you do not wish to use this file under the terms of the GPL version 3.0 -# then you may purchase a commercial license. For more information contact -# info@riverbankcomputing.com. -# -# This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -# WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - - -import typing -import sip - -from PyQt5 import QtCore - -# Support for QDate, QDateTime and QTime. -import datetime - -# Convenient type aliases. -PYQT_SIGNAL = typing.Union[QtCore.pyqtSignal, QtCore.pyqtBoundSignal] -PYQT_SLOT = typing.Union[typing.Callable[..., None], QtCore.pyqtBoundSignal] - - -class QSerialPort(QtCore.QIODevice): - - class SerialPortError(int): ... - NoError = ... # type: 'QSerialPort.SerialPortError' - DeviceNotFoundError = ... # type: 'QSerialPort.SerialPortError' - PermissionError = ... # type: 'QSerialPort.SerialPortError' - OpenError = ... # type: 'QSerialPort.SerialPortError' - ParityError = ... # type: 'QSerialPort.SerialPortError' - FramingError = ... # type: 'QSerialPort.SerialPortError' - BreakConditionError = ... # type: 'QSerialPort.SerialPortError' - WriteError = ... # type: 'QSerialPort.SerialPortError' - ReadError = ... # type: 'QSerialPort.SerialPortError' - ResourceError = ... # type: 'QSerialPort.SerialPortError' - UnsupportedOperationError = ... # type: 'QSerialPort.SerialPortError' - TimeoutError = ... # type: 'QSerialPort.SerialPortError' - NotOpenError = ... # type: 'QSerialPort.SerialPortError' - UnknownError = ... # type: 'QSerialPort.SerialPortError' - - class DataErrorPolicy(int): ... - SkipPolicy = ... # type: 'QSerialPort.DataErrorPolicy' - PassZeroPolicy = ... # type: 'QSerialPort.DataErrorPolicy' - IgnorePolicy = ... # type: 'QSerialPort.DataErrorPolicy' - StopReceivingPolicy = ... # type: 'QSerialPort.DataErrorPolicy' - UnknownPolicy = ... # type: 'QSerialPort.DataErrorPolicy' - - class PinoutSignal(int): ... - NoSignal = ... # type: 'QSerialPort.PinoutSignal' - TransmittedDataSignal = ... # type: 'QSerialPort.PinoutSignal' - ReceivedDataSignal = ... # type: 'QSerialPort.PinoutSignal' - DataTerminalReadySignal = ... # type: 'QSerialPort.PinoutSignal' - DataCarrierDetectSignal = ... # type: 'QSerialPort.PinoutSignal' - DataSetReadySignal = ... # type: 'QSerialPort.PinoutSignal' - RingIndicatorSignal = ... # type: 'QSerialPort.PinoutSignal' - RequestToSendSignal = ... # type: 'QSerialPort.PinoutSignal' - ClearToSendSignal = ... # type: 'QSerialPort.PinoutSignal' - SecondaryTransmittedDataSignal = ... # type: 'QSerialPort.PinoutSignal' - SecondaryReceivedDataSignal = ... # type: 'QSerialPort.PinoutSignal' - - class FlowControl(int): ... - NoFlowControl = ... # type: 'QSerialPort.FlowControl' - HardwareControl = ... # type: 'QSerialPort.FlowControl' - SoftwareControl = ... # type: 'QSerialPort.FlowControl' - UnknownFlowControl = ... # type: 'QSerialPort.FlowControl' - - class StopBits(int): ... - OneStop = ... # type: 'QSerialPort.StopBits' - OneAndHalfStop = ... # type: 'QSerialPort.StopBits' - TwoStop = ... # type: 'QSerialPort.StopBits' - UnknownStopBits = ... # type: 'QSerialPort.StopBits' - - class Parity(int): ... - NoParity = ... # type: 'QSerialPort.Parity' - EvenParity = ... # type: 'QSerialPort.Parity' - OddParity = ... # type: 'QSerialPort.Parity' - SpaceParity = ... # type: 'QSerialPort.Parity' - MarkParity = ... # type: 'QSerialPort.Parity' - UnknownParity = ... # type: 'QSerialPort.Parity' - - class DataBits(int): ... - Data5 = ... # type: 'QSerialPort.DataBits' - Data6 = ... # type: 'QSerialPort.DataBits' - Data7 = ... # type: 'QSerialPort.DataBits' - Data8 = ... # type: 'QSerialPort.DataBits' - UnknownDataBits = ... # type: 'QSerialPort.DataBits' - - class BaudRate(int): ... - Baud1200 = ... # type: 'QSerialPort.BaudRate' - Baud2400 = ... # type: 'QSerialPort.BaudRate' - Baud4800 = ... # type: 'QSerialPort.BaudRate' - Baud9600 = ... # type: 'QSerialPort.BaudRate' - Baud19200 = ... # type: 'QSerialPort.BaudRate' - Baud38400 = ... # type: 'QSerialPort.BaudRate' - Baud57600 = ... # type: 'QSerialPort.BaudRate' - Baud115200 = ... # type: 'QSerialPort.BaudRate' - UnknownBaud = ... # type: 'QSerialPort.BaudRate' - - class Direction(int): ... - Input = ... # type: 'QSerialPort.Direction' - Output = ... # type: 'QSerialPort.Direction' - AllDirections = ... # type: 'QSerialPort.Direction' - - class Directions(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QSerialPort.Directions', 'QSerialPort.Direction']) -> None: ... - @typing.overload - def __init__(self, a0: 'QSerialPort.Directions') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QSerialPort.Directions': ... - def __int__(self) -> int: ... - - class PinoutSignals(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QSerialPort.PinoutSignals', 'QSerialPort.PinoutSignal']) -> None: ... - @typing.overload - def __init__(self, a0: 'QSerialPort.PinoutSignals') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QSerialPort.PinoutSignals': ... - def __int__(self) -> int: ... - - @typing.overload - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - @typing.overload - def __init__(self, name: str, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - @typing.overload - def __init__(self, info: 'QSerialPortInfo', parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def breakEnabledChanged(self, set: bool) -> None: ... - def isBreakEnabled(self) -> bool: ... - def handle(self) -> int: ... - def writeData(self, data: bytes) -> int: ... - def readLineData(self, maxlen: int) -> bytes: ... - def readData(self, maxlen: int) -> bytes: ... - def settingsRestoredOnCloseChanged(self, restore: bool) -> None: ... - def requestToSendChanged(self, set: bool) -> None: ... - def dataTerminalReadyChanged(self, set: bool) -> None: ... - def dataErrorPolicyChanged(self, policy: 'QSerialPort.DataErrorPolicy') -> None: ... - def flowControlChanged(self, flow: 'QSerialPort.FlowControl') -> None: ... - def stopBitsChanged(self, stopBits: 'QSerialPort.StopBits') -> None: ... - def parityChanged(self, parity: 'QSerialPort.Parity') -> None: ... - def dataBitsChanged(self, dataBits: 'QSerialPort.DataBits') -> None: ... - def baudRateChanged(self, baudRate: int, directions: typing.Union['QSerialPort.Directions', 'QSerialPort.Direction']) -> None: ... - def setBreakEnabled(self, enabled: bool = ...) -> bool: ... - def sendBreak(self, duration: int = ...) -> bool: ... - def waitForBytesWritten(self, msecs: int) -> bool: ... - def waitForReadyRead(self, msecs: int) -> bool: ... - def canReadLine(self) -> bool: ... - def bytesToWrite(self) -> int: ... - def bytesAvailable(self) -> int: ... - def isSequential(self) -> bool: ... - def setReadBufferSize(self, size: int) -> None: ... - def readBufferSize(self) -> int: ... - def clearError(self) -> None: ... - @typing.overload - def error(self) -> 'QSerialPort.SerialPortError': ... - @typing.overload - def error(self, serialPortError: 'QSerialPort.SerialPortError') -> None: ... - def dataErrorPolicy(self) -> 'QSerialPort.DataErrorPolicy': ... - def setDataErrorPolicy(self, policy: 'QSerialPort.DataErrorPolicy' = ...) -> bool: ... - def atEnd(self) -> bool: ... - def clear(self, dir: typing.Union['QSerialPort.Directions', 'QSerialPort.Direction'] = ...) -> bool: ... - def flush(self) -> bool: ... - def pinoutSignals(self) -> 'QSerialPort.PinoutSignals': ... - def isRequestToSend(self) -> bool: ... - def setRequestToSend(self, set: bool) -> bool: ... - def isDataTerminalReady(self) -> bool: ... - def setDataTerminalReady(self, set: bool) -> bool: ... - def flowControl(self) -> 'QSerialPort.FlowControl': ... - def setFlowControl(self, flow: 'QSerialPort.FlowControl') -> bool: ... - def stopBits(self) -> 'QSerialPort.StopBits': ... - def setStopBits(self, stopBits: 'QSerialPort.StopBits') -> bool: ... - def parity(self) -> 'QSerialPort.Parity': ... - def setParity(self, parity: 'QSerialPort.Parity') -> bool: ... - def dataBits(self) -> 'QSerialPort.DataBits': ... - def setDataBits(self, dataBits: 'QSerialPort.DataBits') -> bool: ... - def baudRate(self, dir: typing.Union['QSerialPort.Directions', 'QSerialPort.Direction'] = ...) -> int: ... - def setBaudRate(self, baudRate: int, dir: typing.Union['QSerialPort.Directions', 'QSerialPort.Direction'] = ...) -> bool: ... - def settingsRestoredOnClose(self) -> bool: ... - def setSettingsRestoredOnClose(self, restore: bool) -> None: ... - def close(self) -> None: ... - def open(self, mode: typing.Union[QtCore.QIODevice.OpenMode, QtCore.QIODevice.OpenModeFlag]) -> bool: ... - def setPort(self, info: 'QSerialPortInfo') -> None: ... - def portName(self) -> str: ... - def setPortName(self, name: str) -> None: ... - - -class QSerialPortInfo(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, port: QSerialPort) -> None: ... - @typing.overload - def __init__(self, name: str) -> None: ... - @typing.overload - def __init__(self, other: 'QSerialPortInfo') -> None: ... - - def serialNumber(self) -> str: ... - def isNull(self) -> bool: ... - @staticmethod - def availablePorts() -> typing.Any: ... - @staticmethod - def standardBaudRates() -> typing.List[int]: ... - def isValid(self) -> bool: ... - def isBusy(self) -> bool: ... - def hasProductIdentifier(self) -> bool: ... - def hasVendorIdentifier(self) -> bool: ... - def productIdentifier(self) -> int: ... - def vendorIdentifier(self) -> int: ... - def manufacturer(self) -> str: ... - def description(self) -> str: ... - def systemLocation(self) -> str: ... - def portName(self) -> str: ... - def swap(self, other: 'QSerialPortInfo') -> None: ... diff -Nru uranium-3.3.0/stubs/PyQt5/QtSql.pyi uranium-4.4.1/stubs/PyQt5/QtSql.pyi --- uranium-3.3.0/stubs/PyQt5/QtSql.pyi 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/stubs/PyQt5/QtSql.pyi 1970-01-01 00:00:00.000000000 +0000 @@ -1,652 +0,0 @@ -# The PEP 484 type hints stub file for the QtSql module. -# -# Generated by SIP 4.18.1 -# -# Copyright (c) 2016 Riverbank Computing Limited -# -# This file is part of PyQt5. -# -# This file may be used under the terms of the GNU General Public License -# version 3.0 as published by the Free Software Foundation and appearing in -# the file LICENSE included in the packaging of this file. Please review the -# following information to ensure the GNU General Public License version 3.0 -# requirements will be met: http://www.gnu.org/copyleft/gpl.html. -# -# If you do not wish to use this file under the terms of the GPL version 3.0 -# then you may purchase a commercial license. For more information contact -# info@riverbankcomputing.com. -# -# This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -# WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - - -import typing -import sip - -from PyQt5 import QtWidgets -from PyQt5 import QtCore - -# Support for QDate, QDateTime and QTime. -import datetime - -# Convenient type aliases. -PYQT_SIGNAL = typing.Union[QtCore.pyqtSignal, QtCore.pyqtBoundSignal] -PYQT_SLOT = typing.Union[typing.Callable[..., None], QtCore.pyqtBoundSignal] - -# Convenient aliases for complicated OpenGL types. -PYQT_OPENGL_ARRAY = typing.Union[typing.Sequence[int], typing.Sequence[float], - sip.Buffer, None] -PYQT_OPENGL_BOUND_ARRAY = typing.Union[typing.Sequence[int], - typing.Sequence[float], sip.Buffer, int, None] - - -class QSql(sip.simplewrapper): - - class NumericalPrecisionPolicy(int): ... - LowPrecisionInt32 = ... # type: 'QSql.NumericalPrecisionPolicy' - LowPrecisionInt64 = ... # type: 'QSql.NumericalPrecisionPolicy' - LowPrecisionDouble = ... # type: 'QSql.NumericalPrecisionPolicy' - HighPrecision = ... # type: 'QSql.NumericalPrecisionPolicy' - - class TableType(int): ... - Tables = ... # type: 'QSql.TableType' - SystemTables = ... # type: 'QSql.TableType' - Views = ... # type: 'QSql.TableType' - AllTables = ... # type: 'QSql.TableType' - - class ParamTypeFlag(int): ... - In = ... # type: 'QSql.ParamTypeFlag' - Out = ... # type: 'QSql.ParamTypeFlag' - InOut = ... # type: 'QSql.ParamTypeFlag' - Binary = ... # type: 'QSql.ParamTypeFlag' - - class Location(int): ... - BeforeFirstRow = ... # type: 'QSql.Location' - AfterLastRow = ... # type: 'QSql.Location' - - class ParamType(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QSql.ParamType', 'QSql.ParamTypeFlag']) -> None: ... - @typing.overload - def __init__(self, a0: 'QSql.ParamType') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QSql.ParamType': ... - def __int__(self) -> int: ... - - -class QSqlDriverCreatorBase(sip.wrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QSqlDriverCreatorBase') -> None: ... - - def createObject(self) -> 'QSqlDriver': ... - - -class QSqlDatabase(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, other: 'QSqlDatabase') -> None: ... - @typing.overload - def __init__(self, type: str) -> None: ... - @typing.overload - def __init__(self, driver: 'QSqlDriver') -> None: ... - - def numericalPrecisionPolicy(self) -> QSql.NumericalPrecisionPolicy: ... - def setNumericalPrecisionPolicy(self, precisionPolicy: QSql.NumericalPrecisionPolicy) -> None: ... - @staticmethod - def isDriverAvailable(name: str) -> bool: ... - @staticmethod - def registerSqlDriver(name: str, creator: QSqlDriverCreatorBase) -> None: ... - @staticmethod - def connectionNames() -> typing.List[str]: ... - @staticmethod - def drivers() -> typing.List[str]: ... - @staticmethod - def contains(connectionName: str = ...) -> bool: ... - @staticmethod - def removeDatabase(connectionName: str) -> None: ... - @staticmethod - def database(connectionName: str = ..., open: bool = ...) -> 'QSqlDatabase': ... - @staticmethod - def cloneDatabase(other: 'QSqlDatabase', connectionName: str) -> 'QSqlDatabase': ... - @typing.overload - @staticmethod - def addDatabase(type: str, connectionName: str = ...) -> 'QSqlDatabase': ... - @typing.overload - @staticmethod - def addDatabase(driver: 'QSqlDriver', connectionName: str = ...) -> 'QSqlDatabase': ... - def driver(self) -> 'QSqlDriver': ... - def connectionName(self) -> str: ... - def connectOptions(self) -> str: ... - def port(self) -> int: ... - def driverName(self) -> str: ... - def hostName(self) -> str: ... - def password(self) -> str: ... - def userName(self) -> str: ... - def databaseName(self) -> str: ... - def setConnectOptions(self, options: str = ...) -> None: ... - def setPort(self, p: int) -> None: ... - def setHostName(self, host: str) -> None: ... - def setPassword(self, password: str) -> None: ... - def setUserName(self, name: str) -> None: ... - def setDatabaseName(self, name: str) -> None: ... - def rollback(self) -> bool: ... - def commit(self) -> bool: ... - def transaction(self) -> bool: ... - def isValid(self) -> bool: ... - def lastError(self) -> 'QSqlError': ... - def exec(self, query: str = ...) -> 'QSqlQuery': ... - def exec_(self, query: str = ...) -> 'QSqlQuery': ... - def record(self, tablename: str) -> 'QSqlRecord': ... - def primaryIndex(self, tablename: str) -> 'QSqlIndex': ... - def tables(self, type: QSql.TableType = ...) -> typing.List[str]: ... - def isOpenError(self) -> bool: ... - def isOpen(self) -> bool: ... - def close(self) -> None: ... - @typing.overload - def open(self) -> bool: ... - @typing.overload - def open(self, user: str, password: str) -> bool: ... - - -class QSqlDriver(QtCore.QObject): - - class DbmsType(int): ... - UnknownDbms = ... # type: 'QSqlDriver.DbmsType' - MSSqlServer = ... # type: 'QSqlDriver.DbmsType' - MySqlServer = ... # type: 'QSqlDriver.DbmsType' - PostgreSQL = ... # type: 'QSqlDriver.DbmsType' - Oracle = ... # type: 'QSqlDriver.DbmsType' - Sybase = ... # type: 'QSqlDriver.DbmsType' - SQLite = ... # type: 'QSqlDriver.DbmsType' - Interbase = ... # type: 'QSqlDriver.DbmsType' - DB2 = ... # type: 'QSqlDriver.DbmsType' - - class NotificationSource(int): ... - UnknownSource = ... # type: 'QSqlDriver.NotificationSource' - SelfSource = ... # type: 'QSqlDriver.NotificationSource' - OtherSource = ... # type: 'QSqlDriver.NotificationSource' - - class IdentifierType(int): ... - FieldName = ... # type: 'QSqlDriver.IdentifierType' - TableName = ... # type: 'QSqlDriver.IdentifierType' - - class StatementType(int): ... - WhereStatement = ... # type: 'QSqlDriver.StatementType' - SelectStatement = ... # type: 'QSqlDriver.StatementType' - UpdateStatement = ... # type: 'QSqlDriver.StatementType' - InsertStatement = ... # type: 'QSqlDriver.StatementType' - DeleteStatement = ... # type: 'QSqlDriver.StatementType' - - class DriverFeature(int): ... - Transactions = ... # type: 'QSqlDriver.DriverFeature' - QuerySize = ... # type: 'QSqlDriver.DriverFeature' - BLOB = ... # type: 'QSqlDriver.DriverFeature' - Unicode = ... # type: 'QSqlDriver.DriverFeature' - PreparedQueries = ... # type: 'QSqlDriver.DriverFeature' - NamedPlaceholders = ... # type: 'QSqlDriver.DriverFeature' - PositionalPlaceholders = ... # type: 'QSqlDriver.DriverFeature' - LastInsertId = ... # type: 'QSqlDriver.DriverFeature' - BatchOperations = ... # type: 'QSqlDriver.DriverFeature' - SimpleLocking = ... # type: 'QSqlDriver.DriverFeature' - LowPrecisionNumbers = ... # type: 'QSqlDriver.DriverFeature' - EventNotifications = ... # type: 'QSqlDriver.DriverFeature' - FinishQuery = ... # type: 'QSqlDriver.DriverFeature' - MultipleResultSets = ... # type: 'QSqlDriver.DriverFeature' - - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def dbmsType(self) -> 'QSqlDriver.DbmsType': ... - def numericalPrecisionPolicy(self) -> QSql.NumericalPrecisionPolicy: ... - def setNumericalPrecisionPolicy(self, precisionPolicy: QSql.NumericalPrecisionPolicy) -> None: ... - def stripDelimiters(self, identifier: str, type: 'QSqlDriver.IdentifierType') -> str: ... - def isIdentifierEscaped(self, identifier: str, type: 'QSqlDriver.IdentifierType') -> bool: ... - @typing.overload - def notification(self, name: str) -> None: ... - @typing.overload - def notification(self, name: str, source: 'QSqlDriver.NotificationSource', payload: typing.Any) -> None: ... - def subscribedToNotifications(self) -> typing.List[str]: ... - def unsubscribeFromNotification(self, name: str) -> bool: ... - def subscribeToNotification(self, name: str) -> bool: ... - def setLastError(self, e: 'QSqlError') -> None: ... - def setOpenError(self, e: bool) -> None: ... - def setOpen(self, o: bool) -> None: ... - def open(self, db: str, user: str = ..., password: str = ..., host: str = ..., port: int = ..., options: str = ...) -> bool: ... - def createResult(self) -> 'QSqlResult': ... - def close(self) -> None: ... - def hasFeature(self, f: 'QSqlDriver.DriverFeature') -> bool: ... - def handle(self) -> typing.Any: ... - def lastError(self) -> 'QSqlError': ... - def sqlStatement(self, type: 'QSqlDriver.StatementType', tableName: str, rec: 'QSqlRecord', preparedStatement: bool) -> str: ... - def escapeIdentifier(self, identifier: str, type: 'QSqlDriver.IdentifierType') -> str: ... - def formatValue(self, field: 'QSqlField', trimStrings: bool = ...) -> str: ... - def record(self, tableName: str) -> 'QSqlRecord': ... - def primaryIndex(self, tableName: str) -> 'QSqlIndex': ... - def tables(self, tableType: QSql.TableType) -> typing.List[str]: ... - def rollbackTransaction(self) -> bool: ... - def commitTransaction(self) -> bool: ... - def beginTransaction(self) -> bool: ... - def isOpenError(self) -> bool: ... - def isOpen(self) -> bool: ... - - -class QSqlError(sip.simplewrapper): - - class ErrorType(int): ... - NoError = ... # type: 'QSqlError.ErrorType' - ConnectionError = ... # type: 'QSqlError.ErrorType' - StatementError = ... # type: 'QSqlError.ErrorType' - TransactionError = ... # type: 'QSqlError.ErrorType' - UnknownError = ... # type: 'QSqlError.ErrorType' - - @typing.overload - def __init__(self, driverText: str = ..., databaseText: str = ..., type: 'QSqlError.ErrorType' = ..., errorCode: str = ...) -> None: ... - @typing.overload - def __init__(self, driverText: str, databaseText: str, type: 'QSqlError.ErrorType', number: int) -> None: ... - @typing.overload - def __init__(self, other: 'QSqlError') -> None: ... - - def nativeErrorCode(self) -> str: ... - def isValid(self) -> bool: ... - def text(self) -> str: ... - def setNumber(self, number: int) -> None: ... - def number(self) -> int: ... - def setType(self, type: 'QSqlError.ErrorType') -> None: ... - def type(self) -> 'QSqlError.ErrorType': ... - def setDatabaseText(self, databaseText: str) -> None: ... - def databaseText(self) -> str: ... - def setDriverText(self, driverText: str) -> None: ... - def driverText(self) -> str: ... - - -class QSqlField(sip.simplewrapper): - - class RequiredStatus(int): ... - Unknown = ... # type: 'QSqlField.RequiredStatus' - Optional = ... # type: 'QSqlField.RequiredStatus' - Required = ... # type: 'QSqlField.RequiredStatus' - - @typing.overload - def __init__(self, fieldName: str = ..., type: QtCore.QVariant.Type = ...) -> None: ... - @typing.overload - def __init__(self, other: 'QSqlField') -> None: ... - - def isValid(self) -> bool: ... - def isGenerated(self) -> bool: ... - def typeID(self) -> int: ... - def defaultValue(self) -> typing.Any: ... - def precision(self) -> int: ... - def length(self) -> int: ... - def requiredStatus(self) -> 'QSqlField.RequiredStatus': ... - def setAutoValue(self, autoVal: bool) -> None: ... - def setGenerated(self, gen: bool) -> None: ... - def setSqlType(self, type: int) -> None: ... - def setDefaultValue(self, value: typing.Any) -> None: ... - def setPrecision(self, precision: int) -> None: ... - def setLength(self, fieldLength: int) -> None: ... - def setRequired(self, required: bool) -> None: ... - def setRequiredStatus(self, status: 'QSqlField.RequiredStatus') -> None: ... - def setType(self, type: QtCore.QVariant.Type) -> None: ... - def isAutoValue(self) -> bool: ... - def type(self) -> QtCore.QVariant.Type: ... - def clear(self) -> None: ... - def isReadOnly(self) -> bool: ... - def setReadOnly(self, readOnly: bool) -> None: ... - def isNull(self) -> bool: ... - def name(self) -> str: ... - def setName(self, name: str) -> None: ... - def value(self) -> typing.Any: ... - def setValue(self, value: typing.Any) -> None: ... - - -class QSqlRecord(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, other: 'QSqlRecord') -> None: ... - - def keyValues(self, keyFields: 'QSqlRecord') -> 'QSqlRecord': ... - def __len__(self) -> int: ... - def count(self) -> int: ... - def clearValues(self) -> None: ... - def clear(self) -> None: ... - def contains(self, name: str) -> bool: ... - def isEmpty(self) -> bool: ... - def remove(self, pos: int) -> None: ... - def insert(self, pos: int, field: QSqlField) -> None: ... - def replace(self, pos: int, field: QSqlField) -> None: ... - def append(self, field: QSqlField) -> None: ... - @typing.overload - def setGenerated(self, name: str, generated: bool) -> None: ... - @typing.overload - def setGenerated(self, i: int, generated: bool) -> None: ... - @typing.overload - def isGenerated(self, i: int) -> bool: ... - @typing.overload - def isGenerated(self, name: str) -> bool: ... - @typing.overload - def field(self, i: int) -> QSqlField: ... - @typing.overload - def field(self, name: str) -> QSqlField: ... - def fieldName(self, i: int) -> str: ... - def indexOf(self, name: str) -> int: ... - @typing.overload - def isNull(self, i: int) -> bool: ... - @typing.overload - def isNull(self, name: str) -> bool: ... - @typing.overload - def setNull(self, i: int) -> None: ... - @typing.overload - def setNull(self, name: str) -> None: ... - @typing.overload - def setValue(self, i: int, val: typing.Any) -> None: ... - @typing.overload - def setValue(self, name: str, val: typing.Any) -> None: ... - @typing.overload - def value(self, i: int) -> typing.Any: ... - @typing.overload - def value(self, name: str) -> typing.Any: ... - - -class QSqlIndex(QSqlRecord): - - @typing.overload - def __init__(self, cursorName: str = ..., name: str = ...) -> None: ... - @typing.overload - def __init__(self, other: 'QSqlIndex') -> None: ... - - def setDescending(self, i: int, desc: bool) -> None: ... - def isDescending(self, i: int) -> bool: ... - @typing.overload - def append(self, field: QSqlField) -> None: ... - @typing.overload - def append(self, field: QSqlField, desc: bool) -> None: ... - def name(self) -> str: ... - def setName(self, name: str) -> None: ... - def cursorName(self) -> str: ... - def setCursorName(self, cursorName: str) -> None: ... - - -class QSqlQuery(sip.simplewrapper): - - class BatchExecutionMode(int): ... - ValuesAsRows = ... # type: 'QSqlQuery.BatchExecutionMode' - ValuesAsColumns = ... # type: 'QSqlQuery.BatchExecutionMode' - - @typing.overload - def __init__(self, r: 'QSqlResult') -> None: ... - @typing.overload - def __init__(self, query: str = ..., db: QSqlDatabase = ...) -> None: ... - @typing.overload - def __init__(self, db: QSqlDatabase) -> None: ... - @typing.overload - def __init__(self, other: 'QSqlQuery') -> None: ... - - def nextResult(self) -> bool: ... - def finish(self) -> None: ... - def numericalPrecisionPolicy(self) -> QSql.NumericalPrecisionPolicy: ... - def setNumericalPrecisionPolicy(self, precisionPolicy: QSql.NumericalPrecisionPolicy) -> None: ... - def lastInsertId(self) -> typing.Any: ... - def executedQuery(self) -> str: ... - def boundValues(self) -> typing.Dict[str, typing.Any]: ... - @typing.overload - def boundValue(self, placeholder: str) -> typing.Any: ... - @typing.overload - def boundValue(self, pos: int) -> typing.Any: ... - def addBindValue(self, val: typing.Any, type: typing.Union[QSql.ParamType, QSql.ParamTypeFlag] = ...) -> None: ... - @typing.overload - def bindValue(self, placeholder: str, val: typing.Any, type: typing.Union[QSql.ParamType, QSql.ParamTypeFlag] = ...) -> None: ... - @typing.overload - def bindValue(self, pos: int, val: typing.Any, type: typing.Union[QSql.ParamType, QSql.ParamTypeFlag] = ...) -> None: ... - def prepare(self, query: str) -> bool: ... - def execBatch(self, mode: 'QSqlQuery.BatchExecutionMode' = ...) -> bool: ... - def clear(self) -> None: ... - def last(self) -> bool: ... - def first(self) -> bool: ... - def previous(self) -> bool: ... - def next(self) -> bool: ... - def seek(self, index: int, relative: bool = ...) -> bool: ... - @typing.overload - def value(self, i: int) -> typing.Any: ... - @typing.overload - def value(self, name: str) -> typing.Any: ... - def exec(self, query: str) -> bool: ... - @typing.overload - def exec_(self, query: str) -> bool: ... - @typing.overload - def exec_(self) -> bool: ... - def setForwardOnly(self, forward: bool) -> None: ... - def record(self) -> QSqlRecord: ... - def isForwardOnly(self) -> bool: ... - def result(self) -> 'QSqlResult': ... - def driver(self) -> QSqlDriver: ... - def size(self) -> int: ... - def isSelect(self) -> bool: ... - def lastError(self) -> QSqlError: ... - def numRowsAffected(self) -> int: ... - def lastQuery(self) -> str: ... - def at(self) -> int: ... - @typing.overload - def isNull(self, field: int) -> bool: ... - @typing.overload - def isNull(self, name: str) -> bool: ... - def isActive(self) -> bool: ... - def isValid(self) -> bool: ... - - -class QSqlQueryModel(QtCore.QAbstractTableModel): - - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def endRemoveColumns(self) -> None: ... - def beginRemoveColumns(self, parent: QtCore.QModelIndex, first: int, last: int) -> None: ... - def endInsertColumns(self) -> None: ... - def beginInsertColumns(self, parent: QtCore.QModelIndex, first: int, last: int) -> None: ... - def endRemoveRows(self) -> None: ... - def beginRemoveRows(self, parent: QtCore.QModelIndex, first: int, last: int) -> None: ... - def endInsertRows(self) -> None: ... - def beginInsertRows(self, parent: QtCore.QModelIndex, first: int, last: int) -> None: ... - def endResetModel(self) -> None: ... - def beginResetModel(self) -> None: ... - def setLastError(self, error: QSqlError) -> None: ... - def indexInQuery(self, item: QtCore.QModelIndex) -> QtCore.QModelIndex: ... - def queryChange(self) -> None: ... - def canFetchMore(self, parent: QtCore.QModelIndex = ...) -> bool: ... - def fetchMore(self, parent: QtCore.QModelIndex = ...) -> None: ... - def lastError(self) -> QSqlError: ... - def clear(self) -> None: ... - def query(self) -> QSqlQuery: ... - @typing.overload - def setQuery(self, query: QSqlQuery) -> None: ... - @typing.overload - def setQuery(self, query: str, db: QSqlDatabase = ...) -> None: ... - def removeColumns(self, column: int, count: int, parent: QtCore.QModelIndex = ...) -> bool: ... - def insertColumns(self, column: int, count: int, parent: QtCore.QModelIndex = ...) -> bool: ... - def setHeaderData(self, section: int, orientation: QtCore.Qt.Orientation, value: typing.Any, role: int = ...) -> bool: ... - def headerData(self, section: int, orientation: QtCore.Qt.Orientation, role: int = ...) -> typing.Any: ... - def data(self, item: QtCore.QModelIndex, role: int = ...) -> typing.Any: ... - @typing.overload - def record(self, row: int) -> QSqlRecord: ... - @typing.overload - def record(self) -> QSqlRecord: ... - def columnCount(self, parent: QtCore.QModelIndex = ...) -> int: ... - def rowCount(self, parent: QtCore.QModelIndex = ...) -> int: ... - - -class QSqlRelationalDelegate(QtWidgets.QItemDelegate): - - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def setModelData(self, editor: QtWidgets.QWidget, model: QtCore.QAbstractItemModel, index: QtCore.QModelIndex) -> None: ... - def createEditor(self, parent: QtWidgets.QWidget, option: QtWidgets.QStyleOptionViewItem, index: QtCore.QModelIndex) -> QtWidgets.QWidget: ... - - -class QSqlRelation(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, aTableName: str, indexCol: str, displayCol: str) -> None: ... - @typing.overload - def __init__(self, a0: 'QSqlRelation') -> None: ... - - def isValid(self) -> bool: ... - def displayColumn(self) -> str: ... - def indexColumn(self) -> str: ... - def tableName(self) -> str: ... - - -class QSqlTableModel(QSqlQueryModel): - - class EditStrategy(int): ... - OnFieldChange = ... # type: 'QSqlTableModel.EditStrategy' - OnRowChange = ... # type: 'QSqlTableModel.EditStrategy' - OnManualSubmit = ... # type: 'QSqlTableModel.EditStrategy' - - def __init__(self, parent: typing.Optional[QtCore.QObject] = ..., db: QSqlDatabase = ...) -> None: ... - - def primaryValues(self, row: int) -> QSqlRecord: ... - @typing.overload - def record(self) -> QSqlRecord: ... - @typing.overload - def record(self, row: int) -> QSqlRecord: ... - def selectRow(self, row: int) -> bool: ... - def indexInQuery(self, item: QtCore.QModelIndex) -> QtCore.QModelIndex: ... - def setQuery(self, query: QSqlQuery) -> None: ... - def setPrimaryKey(self, key: QSqlIndex) -> None: ... - def selectStatement(self) -> str: ... - def orderByClause(self) -> str: ... - def deleteRowFromTable(self, row: int) -> bool: ... - def insertRowIntoTable(self, values: QSqlRecord) -> bool: ... - def updateRowInTable(self, row: int, values: QSqlRecord) -> bool: ... - def beforeDelete(self, row: int) -> None: ... - def beforeUpdate(self, row: int, record: QSqlRecord) -> None: ... - def beforeInsert(self, record: QSqlRecord) -> None: ... - def primeInsert(self, row: int, record: QSqlRecord) -> None: ... - def revertAll(self) -> None: ... - def submitAll(self) -> bool: ... - def revert(self) -> None: ... - def submit(self) -> bool: ... - def revertRow(self, row: int) -> None: ... - def setRecord(self, row: int, record: QSqlRecord) -> bool: ... - def insertRecord(self, row: int, record: QSqlRecord) -> bool: ... - def insertRows(self, row: int, count: int, parent: QtCore.QModelIndex = ...) -> bool: ... - def removeRows(self, row: int, count: int, parent: QtCore.QModelIndex = ...) -> bool: ... - def removeColumns(self, column: int, count: int, parent: QtCore.QModelIndex = ...) -> bool: ... - def rowCount(self, parent: QtCore.QModelIndex = ...) -> int: ... - def setFilter(self, filter: str) -> None: ... - def filter(self) -> str: ... - def setSort(self, column: int, order: QtCore.Qt.SortOrder) -> None: ... - def sort(self, column: int, order: QtCore.Qt.SortOrder) -> None: ... - def fieldIndex(self, fieldName: str) -> int: ... - def database(self) -> QSqlDatabase: ... - def primaryKey(self) -> QSqlIndex: ... - def editStrategy(self) -> 'QSqlTableModel.EditStrategy': ... - def setEditStrategy(self, strategy: 'QSqlTableModel.EditStrategy') -> None: ... - def clear(self) -> None: ... - @typing.overload - def isDirty(self, index: QtCore.QModelIndex) -> bool: ... - @typing.overload - def isDirty(self) -> bool: ... - def headerData(self, section: int, orientation: QtCore.Qt.Orientation, role: int = ...) -> typing.Any: ... - def setData(self, index: QtCore.QModelIndex, value: typing.Any, role: int = ...) -> bool: ... - def data(self, index: QtCore.QModelIndex, role: int = ...) -> typing.Any: ... - def flags(self, index: QtCore.QModelIndex) -> QtCore.Qt.ItemFlags: ... - def tableName(self) -> str: ... - def setTable(self, tableName: str) -> None: ... - def select(self) -> bool: ... - - -class QSqlRelationalTableModel(QSqlTableModel): - - class JoinMode(int): ... - InnerJoin = ... # type: 'QSqlRelationalTableModel.JoinMode' - LeftJoin = ... # type: 'QSqlRelationalTableModel.JoinMode' - - def __init__(self, parent: typing.Optional[QtCore.QObject] = ..., db: QSqlDatabase = ...) -> None: ... - - def setJoinMode(self, joinMode: 'QSqlRelationalTableModel.JoinMode') -> None: ... - def insertRowIntoTable(self, values: QSqlRecord) -> bool: ... - def orderByClause(self) -> str: ... - def updateRowInTable(self, row: int, values: QSqlRecord) -> bool: ... - def selectStatement(self) -> str: ... - def removeColumns(self, column: int, count: int, parent: QtCore.QModelIndex = ...) -> bool: ... - def revertRow(self, row: int) -> None: ... - def relationModel(self, column: int) -> QSqlTableModel: ... - def relation(self, column: int) -> QSqlRelation: ... - def setRelation(self, column: int, relation: QSqlRelation) -> None: ... - def setTable(self, tableName: str) -> None: ... - def select(self) -> bool: ... - def clear(self) -> None: ... - def setData(self, index: QtCore.QModelIndex, value: typing.Any, role: int = ...) -> bool: ... - def data(self, index: QtCore.QModelIndex, role: int = ...) -> typing.Any: ... - - -class QSqlResult(sip.wrapper): - - class BindingSyntax(int): ... - PositionalBinding = ... # type: 'QSqlResult.BindingSyntax' - NamedBinding = ... # type: 'QSqlResult.BindingSyntax' - - def __init__(self, db: QSqlDriver) -> None: ... - - def lastInsertId(self) -> typing.Any: ... - def record(self) -> QSqlRecord: ... - def numRowsAffected(self) -> int: ... - def size(self) -> int: ... - def fetchLast(self) -> bool: ... - def fetchFirst(self) -> bool: ... - def fetchPrevious(self) -> bool: ... - def fetchNext(self) -> bool: ... - def fetch(self, i: int) -> bool: ... - def reset(self, sqlquery: str) -> bool: ... - def isNull(self, i: int) -> bool: ... - def data(self, i: int) -> typing.Any: ... - def bindingSyntax(self) -> 'QSqlResult.BindingSyntax': ... - def hasOutValues(self) -> bool: ... - def clear(self) -> None: ... - def boundValueName(self, pos: int) -> str: ... - def executedQuery(self) -> str: ... - def boundValues(self) -> typing.Any: ... - def boundValueCount(self) -> int: ... - @typing.overload - def bindValueType(self, placeholder: str) -> QSql.ParamType: ... - @typing.overload - def bindValueType(self, pos: int) -> QSql.ParamType: ... - @typing.overload - def boundValue(self, placeholder: str) -> typing.Any: ... - @typing.overload - def boundValue(self, pos: int) -> typing.Any: ... - def addBindValue(self, val: typing.Any, type: typing.Union[QSql.ParamType, QSql.ParamTypeFlag]) -> None: ... - @typing.overload - def bindValue(self, pos: int, val: typing.Any, type: typing.Union[QSql.ParamType, QSql.ParamTypeFlag]) -> None: ... - @typing.overload - def bindValue(self, placeholder: str, val: typing.Any, type: typing.Union[QSql.ParamType, QSql.ParamTypeFlag]) -> None: ... - def savePrepare(self, sqlquery: str) -> bool: ... - def prepare(self, query: str) -> bool: ... - def exec(self) -> bool: ... - def exec_(self) -> bool: ... - def setForwardOnly(self, forward: bool) -> None: ... - def setSelect(self, s: bool) -> None: ... - def setQuery(self, query: str) -> None: ... - def setLastError(self, e: QSqlError) -> None: ... - def setActive(self, a: bool) -> None: ... - def setAt(self, at: int) -> None: ... - def driver(self) -> QSqlDriver: ... - def isForwardOnly(self) -> bool: ... - def isSelect(self) -> bool: ... - def isActive(self) -> bool: ... - def isValid(self) -> bool: ... - def lastError(self) -> QSqlError: ... - def lastQuery(self) -> str: ... - def at(self) -> int: ... - def handle(self) -> typing.Any: ... diff -Nru uranium-3.3.0/stubs/PyQt5/QtSvg.pyi uranium-4.4.1/stubs/PyQt5/QtSvg.pyi --- uranium-3.3.0/stubs/PyQt5/QtSvg.pyi 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/stubs/PyQt5/QtSvg.pyi 1970-01-01 00:00:00.000000000 +0000 @@ -1,143 +0,0 @@ -# The PEP 484 type hints stub file for the QtSvg module. -# -# Generated by SIP 4.18.1 -# -# Copyright (c) 2016 Riverbank Computing Limited -# -# This file is part of PyQt5. -# -# This file may be used under the terms of the GNU General Public License -# version 3.0 as published by the Free Software Foundation and appearing in -# the file LICENSE included in the packaging of this file. Please review the -# following information to ensure the GNU General Public License version 3.0 -# requirements will be met: http://www.gnu.org/copyleft/gpl.html. -# -# If you do not wish to use this file under the terms of the GPL version 3.0 -# then you may purchase a commercial license. For more information contact -# info@riverbankcomputing.com. -# -# This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -# WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - - -import typing -import sip - -from PyQt5 import QtWidgets -from PyQt5 import QtGui -from PyQt5 import QtCore - -# Support for QDate, QDateTime and QTime. -import datetime - -# Convenient type aliases. -PYQT_SIGNAL = typing.Union[QtCore.pyqtSignal, QtCore.pyqtBoundSignal] -PYQT_SLOT = typing.Union[typing.Callable[..., None], QtCore.pyqtBoundSignal] - -# Convenient aliases for complicated OpenGL types. -PYQT_OPENGL_ARRAY = typing.Union[typing.Sequence[int], typing.Sequence[float], - sip.Buffer, None] -PYQT_OPENGL_BOUND_ARRAY = typing.Union[typing.Sequence[int], - typing.Sequence[float], sip.Buffer, int, None] - - -class QGraphicsSvgItem(QtWidgets.QGraphicsObject): - - @typing.overload - def __init__(self, parent: typing.Optional[QtWidgets.QGraphicsItem] = ...) -> None: ... - @typing.overload - def __init__(self, fileName: str, parent: typing.Optional[QtWidgets.QGraphicsItem] = ...) -> None: ... - - def type(self) -> int: ... - def paint(self, painter: QtGui.QPainter, option: QtWidgets.QStyleOptionGraphicsItem, widget: typing.Optional[QtWidgets.QWidget] = ...) -> None: ... - def boundingRect(self) -> QtCore.QRectF: ... - def maximumCacheSize(self) -> QtCore.QSize: ... - def setMaximumCacheSize(self, size: QtCore.QSize) -> None: ... - def elementId(self) -> str: ... - def setElementId(self, id: str) -> None: ... - def renderer(self) -> 'QSvgRenderer': ... - def setSharedRenderer(self, renderer: 'QSvgRenderer') -> None: ... - - -class QSvgGenerator(QtGui.QPaintDevice): - - def __init__(self) -> None: ... - - def metric(self, metric: QtGui.QPaintDevice.PaintDeviceMetric) -> int: ... - def paintEngine(self) -> QtGui.QPaintEngine: ... - @typing.overload - def setViewBox(self, viewBox: QtCore.QRect) -> None: ... - @typing.overload - def setViewBox(self, viewBox: QtCore.QRectF) -> None: ... - def viewBoxF(self) -> QtCore.QRectF: ... - def viewBox(self) -> QtCore.QRect: ... - def setDescription(self, description: str) -> None: ... - def description(self) -> str: ... - def setTitle(self, title: str) -> None: ... - def title(self) -> str: ... - def setResolution(self, resolution: int) -> None: ... - def resolution(self) -> int: ... - def setOutputDevice(self, outputDevice: QtCore.QIODevice) -> None: ... - def outputDevice(self) -> QtCore.QIODevice: ... - def setFileName(self, fileName: str) -> None: ... - def fileName(self) -> str: ... - def setSize(self, size: QtCore.QSize) -> None: ... - def size(self) -> QtCore.QSize: ... - - -class QSvgRenderer(QtCore.QObject): - - @typing.overload - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - @typing.overload - def __init__(self, filename: str, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - @typing.overload - def __init__(self, contents: typing.Union[QtCore.QByteArray, bytes, bytearray], parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - @typing.overload - def __init__(self, contents: QtCore.QXmlStreamReader, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def repaintNeeded(self) -> None: ... - @typing.overload - def render(self, p: QtGui.QPainter) -> None: ... - @typing.overload - def render(self, p: QtGui.QPainter, bounds: QtCore.QRectF) -> None: ... - @typing.overload - def render(self, painter: QtGui.QPainter, elementId: str, bounds: QtCore.QRectF = ...) -> None: ... - @typing.overload - def load(self, filename: str) -> bool: ... - @typing.overload - def load(self, contents: typing.Union[QtCore.QByteArray, bytes, bytearray]) -> bool: ... - @typing.overload - def load(self, contents: QtCore.QXmlStreamReader) -> bool: ... - def animationDuration(self) -> int: ... - def setCurrentFrame(self, a0: int) -> None: ... - def currentFrame(self) -> int: ... - def setFramesPerSecond(self, num: int) -> None: ... - def framesPerSecond(self) -> int: ... - def boundsOnElement(self, id: str) -> QtCore.QRectF: ... - def animated(self) -> bool: ... - @typing.overload - def setViewBox(self, viewbox: QtCore.QRect) -> None: ... - @typing.overload - def setViewBox(self, viewbox: QtCore.QRectF) -> None: ... - def viewBoxF(self) -> QtCore.QRectF: ... - def viewBox(self) -> QtCore.QRect: ... - def elementExists(self, id: str) -> bool: ... - def defaultSize(self) -> QtCore.QSize: ... - def isValid(self) -> bool: ... - - -class QSvgWidget(QtWidgets.QWidget): - - @typing.overload - def __init__(self, parent: typing.Optional[QtWidgets.QWidget] = ...) -> None: ... - @typing.overload - def __init__(self, file: str, parent: typing.Optional[QtWidgets.QWidget] = ...) -> None: ... - - def paintEvent(self, event: QtGui.QPaintEvent) -> None: ... - @typing.overload - def load(self, file: str) -> None: ... - @typing.overload - def load(self, contents: typing.Union[QtCore.QByteArray, bytes, bytearray]) -> None: ... - def sizeHint(self) -> QtCore.QSize: ... - def renderer(self) -> QSvgRenderer: ... diff -Nru uranium-3.3.0/stubs/PyQt5/QtTest.pyi uranium-4.4.1/stubs/PyQt5/QtTest.pyi --- uranium-3.3.0/stubs/PyQt5/QtTest.pyi 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/stubs/PyQt5/QtTest.pyi 1970-01-01 00:00:00.000000000 +0000 @@ -1,161 +0,0 @@ -# The PEP 484 type hints stub file for the QtTest module. -# -# Generated by SIP 4.18.1 -# -# Copyright (c) 2016 Riverbank Computing Limited -# -# This file is part of PyQt5. -# -# This file may be used under the terms of the GNU General Public License -# version 3.0 as published by the Free Software Foundation and appearing in -# the file LICENSE included in the packaging of this file. Please review the -# following information to ensure the GNU General Public License version 3.0 -# requirements will be met: http://www.gnu.org/copyleft/gpl.html. -# -# If you do not wish to use this file under the terms of the GPL version 3.0 -# then you may purchase a commercial license. For more information contact -# info@riverbankcomputing.com. -# -# This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -# WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - - -import typing -import sip - -from PyQt5 import QtWidgets -from PyQt5 import QtCore - -# Support for QDate, QDateTime and QTime. -import datetime - -# Convenient type aliases. -PYQT_SIGNAL = typing.Union[QtCore.pyqtSignal, QtCore.pyqtBoundSignal] -PYQT_SLOT = typing.Union[typing.Callable[..., None], QtCore.pyqtBoundSignal] - -# Convenient aliases for complicated OpenGL types. -PYQT_OPENGL_ARRAY = typing.Union[typing.Sequence[int], typing.Sequence[float], - sip.Buffer, None] -PYQT_OPENGL_BOUND_ARRAY = typing.Union[typing.Sequence[int], - typing.Sequence[float], sip.Buffer, int, None] - - -class QSignalSpy(QtCore.QObject): - - def __init__(self, signal: pyqtBoundSignal) -> None: ... - - def __delitem__(self, i: int) -> None: ... - def __setitem__(self, i: int, value: typing.Iterable[typing.Any]) -> None: ... - def __getitem__(self, i: int) -> typing.List[typing.Any]: ... - def __len__(self) -> int: ... - def wait(self, timeout: int = ...) -> bool: ... - def signal(self) -> QtCore.QByteArray: ... - def isValid(self) -> bool: ... - - -class QTest(sip.simplewrapper): - - class MouseAction(int): ... - MousePress = ... # type: 'QTest.MouseAction' - MouseRelease = ... # type: 'QTest.MouseAction' - MouseClick = ... # type: 'QTest.MouseAction' - MouseDClick = ... # type: 'QTest.MouseAction' - MouseMove = ... # type: 'QTest.MouseAction' - - class KeyAction(int): ... - Press = ... # type: 'QTest.KeyAction' - Release = ... # type: 'QTest.KeyAction' - Click = ... # type: 'QTest.KeyAction' - Shortcut = ... # type: 'QTest.KeyAction' - - class QTouchEventSequence(sip.simplewrapper): - - def __init__(self, a0: 'QTest.QTouchEventSequence') -> None: ... - - def commit(self, processEvents: bool = ...) -> None: ... - def stationary(self, touchId: int) -> 'QTest.QTouchEventSequence': ... - @typing.overload - def release(self, touchId: int, pt: QtCore.QPoint, window: typing.Optional[QtGui.QWindow] = ...) -> 'QTest.QTouchEventSequence': ... - @typing.overload - def release(self, touchId: int, pt: QtCore.QPoint, widget: QtWidgets.QWidget) -> 'QTest.QTouchEventSequence': ... - @typing.overload - def move(self, touchId: int, pt: QtCore.QPoint, window: typing.Optional[QtGui.QWindow] = ...) -> 'QTest.QTouchEventSequence': ... - @typing.overload - def move(self, touchId: int, pt: QtCore.QPoint, widget: QtWidgets.QWidget) -> 'QTest.QTouchEventSequence': ... - @typing.overload - def press(self, touchId: int, pt: QtCore.QPoint, window: typing.Optional[QtGui.QWindow] = ...) -> 'QTest.QTouchEventSequence': ... - @typing.overload - def press(self, touchId: int, pt: QtCore.QPoint, widget: QtWidgets.QWidget) -> 'QTest.QTouchEventSequence': ... - - @typing.overload - def touchEvent(self, widget: QtWidgets.QWidget, device: QtGui.QTouchDevice) -> 'QTest.QTouchEventSequence': ... - @typing.overload - def touchEvent(self, window: QtGui.QWindow, device: QtGui.QTouchDevice) -> 'QTest.QTouchEventSequence': ... - @typing.overload - def qWaitForWindowExposed(self, window: QtGui.QWindow, timeout: int = ...) -> bool: ... - @typing.overload - def qWaitForWindowExposed(self, widget: QtWidgets.QWidget, timeout: int = ...) -> bool: ... - @typing.overload - def qWaitForWindowActive(self, window: QtGui.QWindow, timeout: int = ...) -> bool: ... - @typing.overload - def qWaitForWindowActive(self, widget: QtWidgets.QWidget, timeout: int = ...) -> bool: ... - def qWait(self, ms: int) -> None: ... - def waitForEvents(self) -> None: ... - @typing.overload - def mouseEvent(self, action: 'QTest.MouseAction', widget: QtWidgets.QWidget, button: QtCore.Qt.MouseButton, modifier: typing.Union[QtCore.Qt.KeyboardModifiers, QtCore.Qt.KeyboardModifier], pos: QtCore.QPoint, delay: int = ...) -> None: ... - @typing.overload - def mouseEvent(self, action: 'QTest.MouseAction', window: QtGui.QWindow, button: QtCore.Qt.MouseButton, modifier: typing.Union[QtCore.Qt.KeyboardModifiers, QtCore.Qt.KeyboardModifier], pos: QtCore.QPoint, delay: int = ...) -> None: ... - @typing.overload - def mouseRelease(self, widget: QtWidgets.QWidget, button: QtCore.Qt.MouseButton, modifier: typing.Union[QtCore.Qt.KeyboardModifiers, QtCore.Qt.KeyboardModifier] = ..., pos: QtCore.QPoint = ..., delay: int = ...) -> None: ... - @typing.overload - def mouseRelease(self, window: QtGui.QWindow, button: QtCore.Qt.MouseButton, modifier: typing.Union[QtCore.Qt.KeyboardModifiers, QtCore.Qt.KeyboardModifier] = ..., pos: QtCore.QPoint = ..., delay: int = ...) -> None: ... - @typing.overload - def mousePress(self, widget: QtWidgets.QWidget, button: QtCore.Qt.MouseButton, modifier: typing.Union[QtCore.Qt.KeyboardModifiers, QtCore.Qt.KeyboardModifier] = ..., pos: QtCore.QPoint = ..., delay: int = ...) -> None: ... - @typing.overload - def mousePress(self, window: QtGui.QWindow, button: QtCore.Qt.MouseButton, modifier: typing.Union[QtCore.Qt.KeyboardModifiers, QtCore.Qt.KeyboardModifier] = ..., pos: QtCore.QPoint = ..., delay: int = ...) -> None: ... - @typing.overload - def mouseMove(self, widget: QtWidgets.QWidget, pos: QtCore.QPoint = ..., delay: int = ...) -> None: ... - @typing.overload - def mouseMove(self, window: QtGui.QWindow, pos: QtCore.QPoint = ..., delay: int = ...) -> None: ... - @typing.overload - def mouseDClick(self, widget: QtWidgets.QWidget, button: QtCore.Qt.MouseButton, modifier: typing.Union[QtCore.Qt.KeyboardModifiers, QtCore.Qt.KeyboardModifier] = ..., pos: QtCore.QPoint = ..., delay: int = ...) -> None: ... - @typing.overload - def mouseDClick(self, window: QtGui.QWindow, button: QtCore.Qt.MouseButton, modifier: typing.Union[QtCore.Qt.KeyboardModifiers, QtCore.Qt.KeyboardModifier] = ..., pos: QtCore.QPoint = ..., delay: int = ...) -> None: ... - @typing.overload - def mouseClick(self, widget: QtWidgets.QWidget, button: QtCore.Qt.MouseButton, modifier: typing.Union[QtCore.Qt.KeyboardModifiers, QtCore.Qt.KeyboardModifier] = ..., pos: QtCore.QPoint = ..., delay: int = ...) -> None: ... - @typing.overload - def mouseClick(self, window: QtGui.QWindow, button: QtCore.Qt.MouseButton, modifier: typing.Union[QtCore.Qt.KeyboardModifiers, QtCore.Qt.KeyboardModifier] = ..., pos: QtCore.QPoint = ..., delay: int = ...) -> None: ... - @typing.overload - def keyRelease(self, widget: QtWidgets.QWidget, key: QtCore.Qt.Key, modifier: typing.Union[QtCore.Qt.KeyboardModifiers, QtCore.Qt.KeyboardModifier] = ..., delay: int = ...) -> None: ... - @typing.overload - def keyRelease(self, widget: QtWidgets.QWidget, key: str, modifier: typing.Union[QtCore.Qt.KeyboardModifiers, QtCore.Qt.KeyboardModifier] = ..., delay: int = ...) -> None: ... - @typing.overload - def keyRelease(self, window: QtGui.QWindow, key: str, modifier: typing.Union[QtCore.Qt.KeyboardModifiers, QtCore.Qt.KeyboardModifier] = ..., delay: int = ...) -> None: ... - @typing.overload - def keyRelease(self, window: QtGui.QWindow, key: QtCore.Qt.Key, modifier: typing.Union[QtCore.Qt.KeyboardModifiers, QtCore.Qt.KeyboardModifier] = ..., delay: int = ...) -> None: ... - @typing.overload - def keyPress(self, widget: QtWidgets.QWidget, key: QtCore.Qt.Key, modifier: typing.Union[QtCore.Qt.KeyboardModifiers, QtCore.Qt.KeyboardModifier] = ..., delay: int = ...) -> None: ... - @typing.overload - def keyPress(self, widget: QtWidgets.QWidget, key: str, modifier: typing.Union[QtCore.Qt.KeyboardModifiers, QtCore.Qt.KeyboardModifier] = ..., delay: int = ...) -> None: ... - @typing.overload - def keyPress(self, window: QtGui.QWindow, key: str, modifier: typing.Union[QtCore.Qt.KeyboardModifiers, QtCore.Qt.KeyboardModifier] = ..., delay: int = ...) -> None: ... - @typing.overload - def keyPress(self, window: QtGui.QWindow, key: QtCore.Qt.Key, modifier: typing.Union[QtCore.Qt.KeyboardModifiers, QtCore.Qt.KeyboardModifier] = ..., delay: int = ...) -> None: ... - @typing.overload - def keyEvent(self, action: 'QTest.KeyAction', widget: QtWidgets.QWidget, key: QtCore.Qt.Key, modifier: typing.Union[QtCore.Qt.KeyboardModifiers, QtCore.Qt.KeyboardModifier] = ..., delay: int = ...) -> None: ... - @typing.overload - def keyEvent(self, action: 'QTest.KeyAction', widget: QtWidgets.QWidget, ascii: str, modifier: typing.Union[QtCore.Qt.KeyboardModifiers, QtCore.Qt.KeyboardModifier] = ..., delay: int = ...) -> None: ... - @typing.overload - def keyEvent(self, action: 'QTest.KeyAction', window: QtGui.QWindow, ascii: str, modifier: typing.Union[QtCore.Qt.KeyboardModifiers, QtCore.Qt.KeyboardModifier] = ..., delay: int = ...) -> None: ... - @typing.overload - def keyEvent(self, action: 'QTest.KeyAction', window: QtGui.QWindow, key: QtCore.Qt.Key, modifier: typing.Union[QtCore.Qt.KeyboardModifiers, QtCore.Qt.KeyboardModifier] = ..., delay: int = ...) -> None: ... - def keyClicks(self, widget: QtWidgets.QWidget, sequence: str, modifier: typing.Union[QtCore.Qt.KeyboardModifiers, QtCore.Qt.KeyboardModifier] = ..., delay: int = ...) -> None: ... - @typing.overload - def keyClick(self, widget: QtWidgets.QWidget, key: QtCore.Qt.Key, modifier: typing.Union[QtCore.Qt.KeyboardModifiers, QtCore.Qt.KeyboardModifier] = ..., delay: int = ...) -> None: ... - @typing.overload - def keyClick(self, widget: QtWidgets.QWidget, key: str, modifier: typing.Union[QtCore.Qt.KeyboardModifiers, QtCore.Qt.KeyboardModifier] = ..., delay: int = ...) -> None: ... - @typing.overload - def keyClick(self, window: QtGui.QWindow, key: QtCore.Qt.Key, modifier: typing.Union[QtCore.Qt.KeyboardModifiers, QtCore.Qt.KeyboardModifier] = ..., delay: int = ...) -> None: ... - @typing.overload - def keyClick(self, window: QtGui.QWindow, key: str, modifier: typing.Union[QtCore.Qt.KeyboardModifiers, QtCore.Qt.KeyboardModifier] = ..., delay: int = ...) -> None: ... - def qSleep(self, ms: int) -> None: ... diff -Nru uranium-3.3.0/stubs/PyQt5/QtWebChannel.pyi uranium-4.4.1/stubs/PyQt5/QtWebChannel.pyi --- uranium-3.3.0/stubs/PyQt5/QtWebChannel.pyi 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/stubs/PyQt5/QtWebChannel.pyi 1970-01-01 00:00:00.000000000 +0000 @@ -1,56 +0,0 @@ -# The PEP 484 type hints stub file for the QtWebChannel module. -# -# Generated by SIP 4.18.1 -# -# Copyright (c) 2016 Riverbank Computing Limited -# -# This file is part of PyQt5. -# -# This file may be used under the terms of the GNU General Public License -# version 3.0 as published by the Free Software Foundation and appearing in -# the file LICENSE included in the packaging of this file. Please review the -# following information to ensure the GNU General Public License version 3.0 -# requirements will be met: http://www.gnu.org/copyleft/gpl.html. -# -# If you do not wish to use this file under the terms of the GPL version 3.0 -# then you may purchase a commercial license. For more information contact -# info@riverbankcomputing.com. -# -# This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -# WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - - -import typing -import sip - -from PyQt5 import QtCore - -# Support for QDate, QDateTime and QTime. -import datetime - -# Convenient type aliases. -PYQT_SIGNAL = typing.Union[QtCore.pyqtSignal, QtCore.pyqtBoundSignal] -PYQT_SLOT = typing.Union[typing.Callable[..., None], QtCore.pyqtBoundSignal] - - -class QWebChannel(QtCore.QObject): - - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def disconnectFrom(self, transport: 'QWebChannelAbstractTransport') -> None: ... - def connectTo(self, transport: 'QWebChannelAbstractTransport') -> None: ... - def blockUpdatesChanged(self, block: bool) -> None: ... - def setBlockUpdates(self, block: bool) -> None: ... - def blockUpdates(self) -> bool: ... - def deregisterObject(self, object: QtCore.QObject) -> None: ... - def registerObject(self, id: str, object: QtCore.QObject) -> None: ... - def registeredObjects(self) -> typing.Dict[str, QtCore.QObject]: ... - def registerObjects(self, objects: typing.Any) -> None: ... - - -class QWebChannelAbstractTransport(QtCore.QObject): - - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def messageReceived(self, message: typing.Dict[str, typing.Union[QtCore.QJsonValue, QtCore.QJsonValue.Type, typing.Iterable[QtCore.QJsonValue], bool, int, float, str]], transport: 'QWebChannelAbstractTransport') -> None: ... - def sendMessage(self, message: typing.Dict[str, typing.Union[QtCore.QJsonValue, QtCore.QJsonValue.Type, typing.Iterable[QtCore.QJsonValue], bool, int, float, str]]) -> None: ... diff -Nru uranium-3.3.0/stubs/PyQt5/QtWebEngineCore.pyi uranium-4.4.1/stubs/PyQt5/QtWebEngineCore.pyi --- uranium-3.3.0/stubs/PyQt5/QtWebEngineCore.pyi 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/stubs/PyQt5/QtWebEngineCore.pyi 1970-01-01 00:00:00.000000000 +0000 @@ -1,117 +0,0 @@ -# The PEP 484 type hints stub file for the QtWebEngineCore module. -# -# Generated by SIP 4.18.1 -# -# Copyright (c) 2016 Riverbank Computing Limited -# -# This file is part of PyQt5. -# -# This file may be used under the terms of the GNU General Public License -# version 3.0 as published by the Free Software Foundation and appearing in -# the file LICENSE included in the packaging of this file. Please review the -# following information to ensure the GNU General Public License version 3.0 -# requirements will be met: http://www.gnu.org/copyleft/gpl.html. -# -# If you do not wish to use this file under the terms of the GPL version 3.0 -# then you may purchase a commercial license. For more information contact -# info@riverbankcomputing.com. -# -# This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -# WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - - -import typing -import sip - -from PyQt5 import QtNetwork -from PyQt5 import QtCore - -# Support for QDate, QDateTime and QTime. -import datetime - -# Convenient type aliases. -PYQT_SIGNAL = typing.Union[QtCore.pyqtSignal, QtCore.pyqtBoundSignal] -PYQT_SLOT = typing.Union[typing.Callable[..., None], QtCore.pyqtBoundSignal] - - -class QWebEngineCookieStore(QtCore.QObject): - - def cookieRemoved(self, cookie: QtNetwork.QNetworkCookie) -> None: ... - def cookieAdded(self, cookie: QtNetwork.QNetworkCookie) -> None: ... - def loadAllCookies(self) -> None: ... - def deleteAllCookies(self) -> None: ... - def deleteSessionCookies(self) -> None: ... - def deleteCookie(self, cookie: QtNetwork.QNetworkCookie, origin: QtCore.QUrl = ...) -> None: ... - def setCookie(self, cookie: QtNetwork.QNetworkCookie, origin: QtCore.QUrl = ...) -> None: ... - - -class QWebEngineUrlRequestInfo(sip.simplewrapper): - - class NavigationType(int): ... - NavigationTypeLink = ... # type: 'QWebEngineUrlRequestInfo.NavigationType' - NavigationTypeTyped = ... # type: 'QWebEngineUrlRequestInfo.NavigationType' - NavigationTypeFormSubmitted = ... # type: 'QWebEngineUrlRequestInfo.NavigationType' - NavigationTypeBackForward = ... # type: 'QWebEngineUrlRequestInfo.NavigationType' - NavigationTypeReload = ... # type: 'QWebEngineUrlRequestInfo.NavigationType' - NavigationTypeOther = ... # type: 'QWebEngineUrlRequestInfo.NavigationType' - - class ResourceType(int): ... - ResourceTypeMainFrame = ... # type: 'QWebEngineUrlRequestInfo.ResourceType' - ResourceTypeSubFrame = ... # type: 'QWebEngineUrlRequestInfo.ResourceType' - ResourceTypeStylesheet = ... # type: 'QWebEngineUrlRequestInfo.ResourceType' - ResourceTypeScript = ... # type: 'QWebEngineUrlRequestInfo.ResourceType' - ResourceTypeImage = ... # type: 'QWebEngineUrlRequestInfo.ResourceType' - ResourceTypeFontResource = ... # type: 'QWebEngineUrlRequestInfo.ResourceType' - ResourceTypeSubResource = ... # type: 'QWebEngineUrlRequestInfo.ResourceType' - ResourceTypeObject = ... # type: 'QWebEngineUrlRequestInfo.ResourceType' - ResourceTypeMedia = ... # type: 'QWebEngineUrlRequestInfo.ResourceType' - ResourceTypeWorker = ... # type: 'QWebEngineUrlRequestInfo.ResourceType' - ResourceTypeSharedWorker = ... # type: 'QWebEngineUrlRequestInfo.ResourceType' - ResourceTypePrefetch = ... # type: 'QWebEngineUrlRequestInfo.ResourceType' - ResourceTypeFavicon = ... # type: 'QWebEngineUrlRequestInfo.ResourceType' - ResourceTypeXhr = ... # type: 'QWebEngineUrlRequestInfo.ResourceType' - ResourceTypePing = ... # type: 'QWebEngineUrlRequestInfo.ResourceType' - ResourceTypeServiceWorker = ... # type: 'QWebEngineUrlRequestInfo.ResourceType' - ResourceTypeUnknown = ... # type: 'QWebEngineUrlRequestInfo.ResourceType' - ResourceTypeCspReport = ... # type: 'QWebEngineUrlRequestInfo.ResourceType' - ResourceTypePluginResource = ... # type: 'QWebEngineUrlRequestInfo.ResourceType' - - def setHttpHeader(self, name: typing.Union[QtCore.QByteArray, bytes, bytearray], value: typing.Union[QtCore.QByteArray, bytes, bytearray]) -> None: ... - def redirect(self, url: QtCore.QUrl) -> None: ... - def block(self, shouldBlock: bool) -> None: ... - def requestMethod(self) -> QtCore.QByteArray: ... - def firstPartyUrl(self) -> QtCore.QUrl: ... - def requestUrl(self) -> QtCore.QUrl: ... - def navigationType(self) -> 'QWebEngineUrlRequestInfo.NavigationType': ... - def resourceType(self) -> 'QWebEngineUrlRequestInfo.ResourceType': ... - - -class QWebEngineUrlRequestInterceptor(QtCore.QObject): - - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def interceptRequest(self, info: QWebEngineUrlRequestInfo) -> None: ... - - -class QWebEngineUrlRequestJob(QtCore.QObject): - - class Error(int): ... - NoError = ... # type: 'QWebEngineUrlRequestJob.Error' - UrlNotFound = ... # type: 'QWebEngineUrlRequestJob.Error' - UrlInvalid = ... # type: 'QWebEngineUrlRequestJob.Error' - RequestAborted = ... # type: 'QWebEngineUrlRequestJob.Error' - RequestDenied = ... # type: 'QWebEngineUrlRequestJob.Error' - RequestFailed = ... # type: 'QWebEngineUrlRequestJob.Error' - - def redirect(self, url: QtCore.QUrl) -> None: ... - def fail(self, error: 'QWebEngineUrlRequestJob.Error') -> None: ... - def reply(self, contentType: typing.Union[QtCore.QByteArray, bytes, bytearray], device: QtCore.QIODevice) -> None: ... - def requestMethod(self) -> QtCore.QByteArray: ... - def requestUrl(self) -> QtCore.QUrl: ... - - -class QWebEngineUrlSchemeHandler(QtCore.QObject): - - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def requestStarted(self, a0: QWebEngineUrlRequestJob) -> None: ... diff -Nru uranium-3.3.0/stubs/PyQt5/QtWebEngineWidgets.pyi uranium-4.4.1/stubs/PyQt5/QtWebEngineWidgets.pyi --- uranium-3.3.0/stubs/PyQt5/QtWebEngineWidgets.pyi 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/stubs/PyQt5/QtWebEngineWidgets.pyi 1970-01-01 00:00:00.000000000 +0000 @@ -1,554 +0,0 @@ -# The PEP 484 type hints stub file for the QtWebEngineWidgets module. -# -# Generated by SIP 4.18.1 -# -# Copyright (c) 2016 Riverbank Computing Limited -# -# This file is part of PyQt5. -# -# This file may be used under the terms of the GNU General Public License -# version 3.0 as published by the Free Software Foundation and appearing in -# the file LICENSE included in the packaging of this file. Please review the -# following information to ensure the GNU General Public License version 3.0 -# requirements will be met: http://www.gnu.org/copyleft/gpl.html. -# -# If you do not wish to use this file under the terms of the GPL version 3.0 -# then you may purchase a commercial license. For more information contact -# info@riverbankcomputing.com. -# -# This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -# WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - - -import typing -import sip - -from PyQt5 import QtWebEngineCore -from PyQt5 import QtWidgets -from PyQt5 import QtWebChannel -from PyQt5 import QtNetwork -from PyQt5 import QtCore - -# Support for QDate, QDateTime and QTime. -import datetime - -# Convenient type aliases. -PYQT_SIGNAL = typing.Union[QtCore.pyqtSignal, QtCore.pyqtBoundSignal] -PYQT_SLOT = typing.Union[typing.Callable[..., None], QtCore.pyqtBoundSignal] - -# Convenient aliases for complicated OpenGL types. -PYQT_OPENGL_ARRAY = typing.Union[typing.Sequence[int], typing.Sequence[float], - sip.Buffer, None] -PYQT_OPENGL_BOUND_ARRAY = typing.Union[typing.Sequence[int], - typing.Sequence[float], sip.Buffer, int, None] - - -class QWebEngineCertificateError(sip.simplewrapper): - - class Error(int): ... - SslPinnedKeyNotInCertificateChain = ... # type: 'QWebEngineCertificateError.Error' - CertificateCommonNameInvalid = ... # type: 'QWebEngineCertificateError.Error' - CertificateDateInvalid = ... # type: 'QWebEngineCertificateError.Error' - CertificateAuthorityInvalid = ... # type: 'QWebEngineCertificateError.Error' - CertificateContainsErrors = ... # type: 'QWebEngineCertificateError.Error' - CertificateNoRevocationMechanism = ... # type: 'QWebEngineCertificateError.Error' - CertificateUnableToCheckRevocation = ... # type: 'QWebEngineCertificateError.Error' - CertificateRevoked = ... # type: 'QWebEngineCertificateError.Error' - CertificateInvalid = ... # type: 'QWebEngineCertificateError.Error' - CertificateWeakSignatureAlgorithm = ... # type: 'QWebEngineCertificateError.Error' - CertificateNonUniqueName = ... # type: 'QWebEngineCertificateError.Error' - CertificateWeakKey = ... # type: 'QWebEngineCertificateError.Error' - CertificateNameConstraintViolation = ... # type: 'QWebEngineCertificateError.Error' - - def errorDescription(self) -> str: ... - def isOverridable(self) -> bool: ... - def url(self) -> QtCore.QUrl: ... - def error(self) -> 'QWebEngineCertificateError.Error': ... - - -class QWebEngineContextMenuData(sip.simplewrapper): - - class MediaType(int): ... - MediaTypeNone = ... # type: 'QWebEngineContextMenuData.MediaType' - MediaTypeImage = ... # type: 'QWebEngineContextMenuData.MediaType' - MediaTypeVideo = ... # type: 'QWebEngineContextMenuData.MediaType' - MediaTypeAudio = ... # type: 'QWebEngineContextMenuData.MediaType' - MediaTypeCanvas = ... # type: 'QWebEngineContextMenuData.MediaType' - MediaTypeFile = ... # type: 'QWebEngineContextMenuData.MediaType' - MediaTypePlugin = ... # type: 'QWebEngineContextMenuData.MediaType' - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, other: 'QWebEngineContextMenuData') -> None: ... - - def isContentEditable(self) -> bool: ... - def mediaType(self) -> 'QWebEngineContextMenuData.MediaType': ... - def mediaUrl(self) -> QtCore.QUrl: ... - def linkUrl(self) -> QtCore.QUrl: ... - def linkText(self) -> str: ... - def selectedText(self) -> str: ... - def position(self) -> QtCore.QPoint: ... - def isValid(self) -> bool: ... - - -class QWebEngineDownloadItem(QtCore.QObject): - - class SavePageFormat(int): ... - UnknownSaveFormat = ... # type: 'QWebEngineDownloadItem.SavePageFormat' - SingleHtmlSaveFormat = ... # type: 'QWebEngineDownloadItem.SavePageFormat' - CompleteHtmlSaveFormat = ... # type: 'QWebEngineDownloadItem.SavePageFormat' - MimeHtmlSaveFormat = ... # type: 'QWebEngineDownloadItem.SavePageFormat' - - class DownloadState(int): ... - DownloadRequested = ... # type: 'QWebEngineDownloadItem.DownloadState' - DownloadInProgress = ... # type: 'QWebEngineDownloadItem.DownloadState' - DownloadCompleted = ... # type: 'QWebEngineDownloadItem.DownloadState' - DownloadCancelled = ... # type: 'QWebEngineDownloadItem.DownloadState' - DownloadInterrupted = ... # type: 'QWebEngineDownloadItem.DownloadState' - - def setSavePageFormat(self, format: 'QWebEngineDownloadItem.SavePageFormat') -> None: ... - def savePageFormat(self) -> 'QWebEngineDownloadItem.SavePageFormat': ... - def mimeType(self) -> str: ... - def downloadProgress(self, bytesReceived: int, bytesTotal: int) -> None: ... - def stateChanged(self, state: 'QWebEngineDownloadItem.DownloadState') -> None: ... - def finished(self) -> None: ... - def cancel(self) -> None: ... - def accept(self) -> None: ... - def isFinished(self) -> bool: ... - def setPath(self, path: str) -> None: ... - def path(self) -> str: ... - def url(self) -> QtCore.QUrl: ... - def receivedBytes(self) -> int: ... - def totalBytes(self) -> int: ... - def state(self) -> 'QWebEngineDownloadItem.DownloadState': ... - def id(self) -> int: ... - - -class QWebEngineFullScreenRequest(sip.simplewrapper): - - def __init__(self, a0: 'QWebEngineFullScreenRequest') -> None: ... - - def origin(self) -> QtCore.QUrl: ... - def toggleOn(self) -> bool: ... - def accept(self) -> None: ... - def reject(self) -> None: ... - - -class QWebEngineHistoryItem(sip.simplewrapper): - - def __init__(self, other: 'QWebEngineHistoryItem') -> None: ... - - def swap(self, other: 'QWebEngineHistoryItem') -> None: ... - def isValid(self) -> bool: ... - def iconUrl(self) -> QtCore.QUrl: ... - def lastVisited(self) -> QtCore.QDateTime: ... - def title(self) -> str: ... - def url(self) -> QtCore.QUrl: ... - def originalUrl(self) -> QtCore.QUrl: ... - - -class QWebEngineHistory(sip.simplewrapper): - - def __len__(self) -> int: ... - def count(self) -> int: ... - def currentItemIndex(self) -> int: ... - def itemAt(self, i: int) -> QWebEngineHistoryItem: ... - def forwardItem(self) -> QWebEngineHistoryItem: ... - def currentItem(self) -> QWebEngineHistoryItem: ... - def backItem(self) -> QWebEngineHistoryItem: ... - def goToItem(self, item: QWebEngineHistoryItem) -> None: ... - def forward(self) -> None: ... - def back(self) -> None: ... - def canGoForward(self) -> bool: ... - def canGoBack(self) -> bool: ... - def forwardItems(self, maxItems: int) -> typing.List[QWebEngineHistoryItem]: ... - def backItems(self, maxItems: int) -> typing.List[QWebEngineHistoryItem]: ... - def items(self) -> typing.Any: ... - def clear(self) -> None: ... - - -class QWebEnginePage(QtCore.QObject): - - class RenderProcessTerminationStatus(int): ... - NormalTerminationStatus = ... # type: 'QWebEnginePage.RenderProcessTerminationStatus' - AbnormalTerminationStatus = ... # type: 'QWebEnginePage.RenderProcessTerminationStatus' - CrashedTerminationStatus = ... # type: 'QWebEnginePage.RenderProcessTerminationStatus' - KilledTerminationStatus = ... # type: 'QWebEnginePage.RenderProcessTerminationStatus' - - class NavigationType(int): ... - NavigationTypeLinkClicked = ... # type: 'QWebEnginePage.NavigationType' - NavigationTypeTyped = ... # type: 'QWebEnginePage.NavigationType' - NavigationTypeFormSubmitted = ... # type: 'QWebEnginePage.NavigationType' - NavigationTypeBackForward = ... # type: 'QWebEnginePage.NavigationType' - NavigationTypeReload = ... # type: 'QWebEnginePage.NavigationType' - NavigationTypeOther = ... # type: 'QWebEnginePage.NavigationType' - - class JavaScriptConsoleMessageLevel(int): ... - InfoMessageLevel = ... # type: 'QWebEnginePage.JavaScriptConsoleMessageLevel' - WarningMessageLevel = ... # type: 'QWebEnginePage.JavaScriptConsoleMessageLevel' - ErrorMessageLevel = ... # type: 'QWebEnginePage.JavaScriptConsoleMessageLevel' - - class FileSelectionMode(int): ... - FileSelectOpen = ... # type: 'QWebEnginePage.FileSelectionMode' - FileSelectOpenMultiple = ... # type: 'QWebEnginePage.FileSelectionMode' - - class Feature(int): ... - Geolocation = ... # type: 'QWebEnginePage.Feature' - MediaAudioCapture = ... # type: 'QWebEnginePage.Feature' - MediaVideoCapture = ... # type: 'QWebEnginePage.Feature' - MediaAudioVideoCapture = ... # type: 'QWebEnginePage.Feature' - MouseLock = ... # type: 'QWebEnginePage.Feature' - - class PermissionPolicy(int): ... - PermissionUnknown = ... # type: 'QWebEnginePage.PermissionPolicy' - PermissionGrantedByUser = ... # type: 'QWebEnginePage.PermissionPolicy' - PermissionDeniedByUser = ... # type: 'QWebEnginePage.PermissionPolicy' - - class WebWindowType(int): ... - WebBrowserWindow = ... # type: 'QWebEnginePage.WebWindowType' - WebBrowserTab = ... # type: 'QWebEnginePage.WebWindowType' - WebDialog = ... # type: 'QWebEnginePage.WebWindowType' - WebBrowserBackgroundTab = ... # type: 'QWebEnginePage.WebWindowType' - - class FindFlag(int): ... - FindBackward = ... # type: 'QWebEnginePage.FindFlag' - FindCaseSensitively = ... # type: 'QWebEnginePage.FindFlag' - - class WebAction(int): ... - NoWebAction = ... # type: 'QWebEnginePage.WebAction' - Back = ... # type: 'QWebEnginePage.WebAction' - Forward = ... # type: 'QWebEnginePage.WebAction' - Stop = ... # type: 'QWebEnginePage.WebAction' - Reload = ... # type: 'QWebEnginePage.WebAction' - Cut = ... # type: 'QWebEnginePage.WebAction' - Copy = ... # type: 'QWebEnginePage.WebAction' - Paste = ... # type: 'QWebEnginePage.WebAction' - Undo = ... # type: 'QWebEnginePage.WebAction' - Redo = ... # type: 'QWebEnginePage.WebAction' - SelectAll = ... # type: 'QWebEnginePage.WebAction' - ReloadAndBypassCache = ... # type: 'QWebEnginePage.WebAction' - PasteAndMatchStyle = ... # type: 'QWebEnginePage.WebAction' - OpenLinkInThisWindow = ... # type: 'QWebEnginePage.WebAction' - OpenLinkInNewWindow = ... # type: 'QWebEnginePage.WebAction' - OpenLinkInNewTab = ... # type: 'QWebEnginePage.WebAction' - CopyLinkToClipboard = ... # type: 'QWebEnginePage.WebAction' - DownloadLinkToDisk = ... # type: 'QWebEnginePage.WebAction' - CopyImageToClipboard = ... # type: 'QWebEnginePage.WebAction' - CopyImageUrlToClipboard = ... # type: 'QWebEnginePage.WebAction' - DownloadImageToDisk = ... # type: 'QWebEnginePage.WebAction' - CopyMediaUrlToClipboard = ... # type: 'QWebEnginePage.WebAction' - ToggleMediaControls = ... # type: 'QWebEnginePage.WebAction' - ToggleMediaLoop = ... # type: 'QWebEnginePage.WebAction' - ToggleMediaPlayPause = ... # type: 'QWebEnginePage.WebAction' - ToggleMediaMute = ... # type: 'QWebEnginePage.WebAction' - DownloadMediaToDisk = ... # type: 'QWebEnginePage.WebAction' - InspectElement = ... # type: 'QWebEnginePage.WebAction' - ExitFullScreen = ... # type: 'QWebEnginePage.WebAction' - RequestClose = ... # type: 'QWebEnginePage.WebAction' - Unselect = ... # type: 'QWebEnginePage.WebAction' - SavePage = ... # type: 'QWebEnginePage.WebAction' - OpenLinkInNewBackgroundTab = ... # type: 'QWebEnginePage.WebAction' - - class FindFlags(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QWebEnginePage.FindFlags', 'QWebEnginePage.FindFlag']) -> None: ... - @typing.overload - def __init__(self, a0: 'QWebEnginePage.FindFlags') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QWebEnginePage.FindFlags': ... - def __int__(self) -> int: ... - - @typing.overload - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - @typing.overload - def __init__(self, profile: 'QWebEngineProfile', parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def recentlyAudibleChanged(self, recentlyAudible: bool) -> None: ... - def audioMutedChanged(self, muted: bool) -> None: ... - def contentsSizeChanged(self, size: QtCore.QSizeF) -> None: ... - def scrollPositionChanged(self, position: typing.Union[QtCore.QPointF, QtCore.QPoint]) -> None: ... - def iconChanged(self, icon: QtGui.QIcon) -> None: ... - def contextMenuData(self) -> QWebEngineContextMenuData: ... - @typing.overload - def printToPdf(self, filePath: str, pageLayout: QtGui.QPageLayout = ...) -> None: ... - @typing.overload - def printToPdf(self, resultCallback: typing.Callable[..., None], pageLayout: QtGui.QPageLayout = ...) -> None: ... - def recentlyAudible(self) -> bool: ... - def setAudioMuted(self, muted: bool) -> None: ... - def isAudioMuted(self) -> bool: ... - def contentsSize(self) -> QtCore.QSizeF: ... - def scrollPosition(self) -> QtCore.QPointF: ... - def icon(self) -> QtGui.QIcon: ... - def renderProcessTerminated(self, terminationStatus: 'QWebEnginePage.RenderProcessTerminationStatus', exitCode: int) -> None: ... - def fullScreenRequested(self, fullScreenRequest: QWebEngineFullScreenRequest) -> None: ... - def setBackgroundColor(self, color: typing.Union[QtGui.QColor, QtCore.Qt.GlobalColor]) -> None: ... - def backgroundColor(self) -> QtGui.QColor: ... - def acceptNavigationRequest(self, url: QtCore.QUrl, type: 'QWebEnginePage.NavigationType', isMainFrame: bool) -> bool: ... - @typing.overload - def setWebChannel(self, a0: QtWebChannel.QWebChannel) -> None: ... - @typing.overload - def setWebChannel(self, a0: QtWebChannel.QWebChannel, worldId: int) -> None: ... - def webChannel(self) -> QtWebChannel.QWebChannel: ... - def scripts(self) -> 'QWebEngineScriptCollection': ... - def profile(self) -> 'QWebEngineProfile': ... - def certificateError(self, certificateError: QWebEngineCertificateError) -> bool: ... - def javaScriptConsoleMessage(self, level: 'QWebEnginePage.JavaScriptConsoleMessageLevel', message: str, lineNumber: int, sourceID: str) -> None: ... - def javaScriptPrompt(self, securityOrigin: QtCore.QUrl, msg: str, defaultValue: str, result: str) -> bool: ... - def javaScriptConfirm(self, securityOrigin: QtCore.QUrl, msg: str) -> bool: ... - def javaScriptAlert(self, securityOrigin: QtCore.QUrl, msg: str) -> None: ... - def chooseFiles(self, mode: 'QWebEnginePage.FileSelectionMode', oldFiles: typing.Iterable[str], acceptedMimeTypes: typing.Iterable[str]) -> typing.List[str]: ... - def createWindow(self, type: 'QWebEnginePage.WebWindowType') -> 'QWebEnginePage': ... - def iconUrlChanged(self, url: QtCore.QUrl) -> None: ... - def urlChanged(self, url: QtCore.QUrl) -> None: ... - def titleChanged(self, title: str) -> None: ... - def proxyAuthenticationRequired(self, requestUrl: QtCore.QUrl, authenticator: QtNetwork.QAuthenticator, proxyHost: str) -> None: ... - def authenticationRequired(self, requestUrl: QtCore.QUrl, authenticator: QtNetwork.QAuthenticator) -> None: ... - def featurePermissionRequestCanceled(self, securityOrigin: QtCore.QUrl, feature: 'QWebEnginePage.Feature') -> None: ... - def featurePermissionRequested(self, securityOrigin: QtCore.QUrl, feature: 'QWebEnginePage.Feature') -> None: ... - def windowCloseRequested(self) -> None: ... - def geometryChangeRequested(self, geom: QtCore.QRect) -> None: ... - def selectionChanged(self) -> None: ... - def linkHovered(self, url: str) -> None: ... - def loadFinished(self, ok: bool) -> None: ... - def loadProgress(self, progress: int) -> None: ... - def loadStarted(self) -> None: ... - def settings(self) -> 'QWebEngineSettings': ... - @typing.overload - def runJavaScript(self, scriptSource: str, worldId: int) -> None: ... - @typing.overload - def runJavaScript(self, scriptSource: str, worldId: int, resultCallback: typing.Callable[..., None]) -> None: ... - @typing.overload - def runJavaScript(self, scriptSource: str) -> None: ... - @typing.overload - def runJavaScript(self, scriptSource: str, resultCallback: typing.Callable[..., None]) -> None: ... - def setZoomFactor(self, factor: float) -> None: ... - def zoomFactor(self) -> float: ... - def iconUrl(self) -> QtCore.QUrl: ... - def requestedUrl(self) -> QtCore.QUrl: ... - def url(self) -> QtCore.QUrl: ... - def setUrl(self, url: QtCore.QUrl) -> None: ... - def title(self) -> str: ... - def toPlainText(self, resultCallback: typing.Callable[..., None]) -> None: ... - def toHtml(self, resultCallback: typing.Callable[..., None]) -> None: ... - def setContent(self, data: typing.Union[QtCore.QByteArray, bytes, bytearray], mimeType: str = ..., baseUrl: QtCore.QUrl = ...) -> None: ... - def setHtml(self, html: str, baseUrl: QtCore.QUrl = ...) -> None: ... - def load(self, url: QtCore.QUrl) -> None: ... - def setFeaturePermission(self, securityOrigin: QtCore.QUrl, feature: 'QWebEnginePage.Feature', policy: 'QWebEnginePage.PermissionPolicy') -> None: ... - def createStandardContextMenu(self) -> QtWidgets.QMenu: ... - def findText(self, subString: str, options: 'QWebEnginePage.FindFlags' = ..., resultCallback: typing.Optional[typing.Callable[..., None]] = ...) -> None: ... - def event(self, a0: QtCore.QEvent) -> bool: ... - def triggerAction(self, action: 'QWebEnginePage.WebAction', checked: bool = ...) -> None: ... - def action(self, action: 'QWebEnginePage.WebAction') -> QtWidgets.QAction: ... - def selectedText(self) -> str: ... - def hasSelection(self) -> bool: ... - def view(self) -> QtWidgets.QWidget: ... - def setView(self, view: QtWidgets.QWidget) -> None: ... - def history(self) -> QWebEngineHistory: ... - - -class QWebEngineProfile(QtCore.QObject): - - class PersistentCookiesPolicy(int): ... - NoPersistentCookies = ... # type: 'QWebEngineProfile.PersistentCookiesPolicy' - AllowPersistentCookies = ... # type: 'QWebEngineProfile.PersistentCookiesPolicy' - ForcePersistentCookies = ... # type: 'QWebEngineProfile.PersistentCookiesPolicy' - - class HttpCacheType(int): ... - MemoryHttpCache = ... # type: 'QWebEngineProfile.HttpCacheType' - DiskHttpCache = ... # type: 'QWebEngineProfile.HttpCacheType' - NoCache = ... # type: 'QWebEngineProfile.HttpCacheType' - - @typing.overload - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - @typing.overload - def __init__(self, name: str, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def clearHttpCache(self) -> None: ... - def removeAllUrlSchemeHandlers(self) -> None: ... - def removeUrlSchemeHandler(self, a0: QtWebEngineCore.QWebEngineUrlSchemeHandler) -> None: ... - def removeUrlScheme(self, scheme: typing.Union[QtCore.QByteArray, bytes, bytearray]) -> None: ... - def installUrlSchemeHandler(self, scheme: typing.Union[QtCore.QByteArray, bytes, bytearray], a1: QtWebEngineCore.QWebEngineUrlSchemeHandler) -> None: ... - def urlSchemeHandler(self, a0: typing.Union[QtCore.QByteArray, bytes, bytearray]) -> QtWebEngineCore.QWebEngineUrlSchemeHandler: ... - def setRequestInterceptor(self, interceptor: QtWebEngineCore.QWebEngineUrlRequestInterceptor) -> None: ... - def cookieStore(self) -> QtWebEngineCore.QWebEngineCookieStore: ... - def httpAcceptLanguage(self) -> str: ... - def setHttpAcceptLanguage(self, httpAcceptLanguage: str) -> None: ... - def downloadRequested(self, download: QWebEngineDownloadItem) -> None: ... - @staticmethod - def defaultProfile() -> 'QWebEngineProfile': ... - def scripts(self) -> 'QWebEngineScriptCollection': ... - def settings(self) -> 'QWebEngineSettings': ... - def visitedLinksContainsUrl(self, url: QtCore.QUrl) -> bool: ... - def clearVisitedLinks(self, urls: typing.Iterable[QtCore.QUrl]) -> None: ... - def clearAllVisitedLinks(self) -> None: ... - def setHttpCacheMaximumSize(self, maxSize: int) -> None: ... - def httpCacheMaximumSize(self) -> int: ... - def setPersistentCookiesPolicy(self, a0: 'QWebEngineProfile.PersistentCookiesPolicy') -> None: ... - def persistentCookiesPolicy(self) -> 'QWebEngineProfile.PersistentCookiesPolicy': ... - def setHttpCacheType(self, a0: 'QWebEngineProfile.HttpCacheType') -> None: ... - def httpCacheType(self) -> 'QWebEngineProfile.HttpCacheType': ... - def setHttpUserAgent(self, userAgent: str) -> None: ... - def httpUserAgent(self) -> str: ... - def setCachePath(self, path: str) -> None: ... - def cachePath(self) -> str: ... - def setPersistentStoragePath(self, path: str) -> None: ... - def persistentStoragePath(self) -> str: ... - def isOffTheRecord(self) -> bool: ... - def storageName(self) -> str: ... - - -class QWebEngineScript(sip.simplewrapper): - - class ScriptWorldId(int): ... - MainWorld = ... # type: 'QWebEngineScript.ScriptWorldId' - ApplicationWorld = ... # type: 'QWebEngineScript.ScriptWorldId' - UserWorld = ... # type: 'QWebEngineScript.ScriptWorldId' - - class InjectionPoint(int): ... - Deferred = ... # type: 'QWebEngineScript.InjectionPoint' - DocumentReady = ... # type: 'QWebEngineScript.InjectionPoint' - DocumentCreation = ... # type: 'QWebEngineScript.InjectionPoint' - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, other: 'QWebEngineScript') -> None: ... - - def swap(self, other: 'QWebEngineScript') -> None: ... - def setRunsOnSubFrames(self, on: bool) -> None: ... - def runsOnSubFrames(self) -> bool: ... - def setWorldId(self, a0: int) -> None: ... - def worldId(self) -> int: ... - def setInjectionPoint(self, a0: 'QWebEngineScript.InjectionPoint') -> None: ... - def injectionPoint(self) -> 'QWebEngineScript.InjectionPoint': ... - def setSourceCode(self, a0: str) -> None: ... - def sourceCode(self) -> str: ... - def setName(self, a0: str) -> None: ... - def name(self) -> str: ... - def isNull(self) -> bool: ... - - -class QWebEngineScriptCollection(sip.simplewrapper): - - def toList(self) -> typing.List[QWebEngineScript]: ... - def clear(self) -> None: ... - def remove(self, a0: QWebEngineScript) -> bool: ... - @typing.overload - def insert(self, a0: QWebEngineScript) -> None: ... - @typing.overload - def insert(self, list: typing.Iterable[QWebEngineScript]) -> None: ... - def findScripts(self, name: str) -> typing.Any: ... - def findScript(self, name: str) -> QWebEngineScript: ... - def contains(self, value: QWebEngineScript) -> bool: ... - def __len__(self) -> int: ... - def count(self) -> int: ... - def isEmpty(self) -> bool: ... - - -class QWebEngineSettings(sip.simplewrapper): - - class FontSize(int): ... - MinimumFontSize = ... # type: 'QWebEngineSettings.FontSize' - MinimumLogicalFontSize = ... # type: 'QWebEngineSettings.FontSize' - DefaultFontSize = ... # type: 'QWebEngineSettings.FontSize' - DefaultFixedFontSize = ... # type: 'QWebEngineSettings.FontSize' - - class WebAttribute(int): ... - AutoLoadImages = ... # type: 'QWebEngineSettings.WebAttribute' - JavascriptEnabled = ... # type: 'QWebEngineSettings.WebAttribute' - JavascriptCanOpenWindows = ... # type: 'QWebEngineSettings.WebAttribute' - JavascriptCanAccessClipboard = ... # type: 'QWebEngineSettings.WebAttribute' - LinksIncludedInFocusChain = ... # type: 'QWebEngineSettings.WebAttribute' - LocalStorageEnabled = ... # type: 'QWebEngineSettings.WebAttribute' - LocalContentCanAccessRemoteUrls = ... # type: 'QWebEngineSettings.WebAttribute' - XSSAuditingEnabled = ... # type: 'QWebEngineSettings.WebAttribute' - SpatialNavigationEnabled = ... # type: 'QWebEngineSettings.WebAttribute' - LocalContentCanAccessFileUrls = ... # type: 'QWebEngineSettings.WebAttribute' - HyperlinkAuditingEnabled = ... # type: 'QWebEngineSettings.WebAttribute' - ScrollAnimatorEnabled = ... # type: 'QWebEngineSettings.WebAttribute' - ErrorPageEnabled = ... # type: 'QWebEngineSettings.WebAttribute' - PluginsEnabled = ... # type: 'QWebEngineSettings.WebAttribute' - FullScreenSupportEnabled = ... # type: 'QWebEngineSettings.WebAttribute' - ScreenCaptureEnabled = ... # type: 'QWebEngineSettings.WebAttribute' - WebGLEnabled = ... # type: 'QWebEngineSettings.WebAttribute' - Accelerated2dCanvasEnabled = ... # type: 'QWebEngineSettings.WebAttribute' - AutoLoadIconsForPage = ... # type: 'QWebEngineSettings.WebAttribute' - TouchIconsEnabled = ... # type: 'QWebEngineSettings.WebAttribute' - - class FontFamily(int): ... - StandardFont = ... # type: 'QWebEngineSettings.FontFamily' - FixedFont = ... # type: 'QWebEngineSettings.FontFamily' - SerifFont = ... # type: 'QWebEngineSettings.FontFamily' - SansSerifFont = ... # type: 'QWebEngineSettings.FontFamily' - CursiveFont = ... # type: 'QWebEngineSettings.FontFamily' - FantasyFont = ... # type: 'QWebEngineSettings.FontFamily' - PictographFont = ... # type: 'QWebEngineSettings.FontFamily' - - def defaultTextEncoding(self) -> str: ... - def setDefaultTextEncoding(self, encoding: str) -> None: ... - def resetAttribute(self, attr: 'QWebEngineSettings.WebAttribute') -> None: ... - def testAttribute(self, attr: 'QWebEngineSettings.WebAttribute') -> bool: ... - def setAttribute(self, attr: 'QWebEngineSettings.WebAttribute', on: bool) -> None: ... - def resetFontSize(self, type: 'QWebEngineSettings.FontSize') -> None: ... - def fontSize(self, type: 'QWebEngineSettings.FontSize') -> int: ... - def setFontSize(self, type: 'QWebEngineSettings.FontSize', size: int) -> None: ... - def resetFontFamily(self, which: 'QWebEngineSettings.FontFamily') -> None: ... - def fontFamily(self, which: 'QWebEngineSettings.FontFamily') -> str: ... - def setFontFamily(self, which: 'QWebEngineSettings.FontFamily', family: str) -> None: ... - @staticmethod - def globalSettings() -> 'QWebEngineSettings': ... - @staticmethod - def defaultSettings() -> 'QWebEngineSettings': ... - - -class QWebEngineView(QtWidgets.QWidget): - - def __init__(self, parent: typing.Optional[QtWidgets.QWidget] = ...) -> None: ... - - def dropEvent(self, e: QtGui.QDropEvent) -> None: ... - def dragMoveEvent(self, e: QtGui.QDragMoveEvent) -> None: ... - def dragLeaveEvent(self, e: QtGui.QDragLeaveEvent) -> None: ... - def dragEnterEvent(self, e: QtGui.QDragEnterEvent) -> None: ... - def iconChanged(self, a0: QtGui.QIcon) -> None: ... - def icon(self) -> QtGui.QIcon: ... - def hideEvent(self, a0: QtGui.QHideEvent) -> None: ... - def showEvent(self, a0: QtGui.QShowEvent) -> None: ... - def event(self, a0: QtCore.QEvent) -> bool: ... - def contextMenuEvent(self, a0: QtGui.QContextMenuEvent) -> None: ... - def createWindow(self, type: QWebEnginePage.WebWindowType) -> 'QWebEngineView': ... - def renderProcessTerminated(self, terminationStatus: QWebEnginePage.RenderProcessTerminationStatus, exitCode: int) -> None: ... - def iconUrlChanged(self, a0: QtCore.QUrl) -> None: ... - def urlChanged(self, a0: QtCore.QUrl) -> None: ... - def selectionChanged(self) -> None: ... - def titleChanged(self, title: str) -> None: ... - def loadFinished(self, a0: bool) -> None: ... - def loadProgress(self, progress: int) -> None: ... - def loadStarted(self) -> None: ... - def reload(self) -> None: ... - def forward(self) -> None: ... - def back(self) -> None: ... - def stop(self) -> None: ... - def settings(self) -> QWebEngineSettings: ... - def sizeHint(self) -> QtCore.QSize: ... - def findText(self, subString: str, options: QWebEnginePage.FindFlags = ..., resultCallback: typing.Optional[typing.Callable[..., None]] = ...) -> None: ... - def setZoomFactor(self, factor: float) -> None: ... - def zoomFactor(self) -> float: ... - def triggerPageAction(self, action: QWebEnginePage.WebAction, checked: bool = ...) -> None: ... - def pageAction(self, action: QWebEnginePage.WebAction) -> QtWidgets.QAction: ... - def selectedText(self) -> str: ... - def hasSelection(self) -> bool: ... - def iconUrl(self) -> QtCore.QUrl: ... - def url(self) -> QtCore.QUrl: ... - def setUrl(self, url: QtCore.QUrl) -> None: ... - def title(self) -> str: ... - def history(self) -> QWebEngineHistory: ... - def setContent(self, data: typing.Union[QtCore.QByteArray, bytes, bytearray], mimeType: str = ..., baseUrl: QtCore.QUrl = ...) -> None: ... - def setHtml(self, html: str, baseUrl: QtCore.QUrl = ...) -> None: ... - def load(self, url: QtCore.QUrl) -> None: ... - def setPage(self, page: QWebEnginePage) -> None: ... - def page(self) -> QWebEnginePage: ... diff -Nru uranium-3.3.0/stubs/PyQt5/QtWebKit.pyi uranium-4.4.1/stubs/PyQt5/QtWebKit.pyi --- uranium-3.3.0/stubs/PyQt5/QtWebKit.pyi 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/stubs/PyQt5/QtWebKit.pyi 1970-01-01 00:00:00.000000000 +0000 @@ -1,427 +0,0 @@ -# The PEP 484 type hints stub file for the QtWebKit module. -# -# Generated by SIP 4.18.1 -# -# Copyright (c) 2016 Riverbank Computing Limited -# -# This file is part of PyQt5. -# -# This file may be used under the terms of the GNU General Public License -# version 3.0 as published by the Free Software Foundation and appearing in -# the file LICENSE included in the packaging of this file. Please review the -# following information to ensure the GNU General Public License version 3.0 -# requirements will be met: http://www.gnu.org/copyleft/gpl.html. -# -# If you do not wish to use this file under the terms of the GPL version 3.0 -# then you may purchase a commercial license. For more information contact -# info@riverbankcomputing.com. -# -# This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -# WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - - -import typing -import sip - -from PyQt5 import QtNetwork -from PyQt5 import QtGui -from PyQt5 import QtCore - -# Support for QDate, QDateTime and QTime. -import datetime - -# Convenient type aliases. -PYQT_SIGNAL = typing.Union[QtCore.pyqtSignal, QtCore.pyqtBoundSignal] -PYQT_SLOT = typing.Union[typing.Callable[..., None], QtCore.pyqtBoundSignal] - -# Convenient aliases for complicated OpenGL types. -PYQT_OPENGL_ARRAY = typing.Union[typing.Sequence[int], typing.Sequence[float], - sip.Buffer, None] -PYQT_OPENGL_BOUND_ARRAY = typing.Union[typing.Sequence[int], - typing.Sequence[float], sip.Buffer, int, None] - - -class QWebDatabase(sip.simplewrapper): - - def __init__(self, other: 'QWebDatabase') -> None: ... - - @staticmethod - def removeAllDatabases() -> None: ... - @staticmethod - def removeDatabase(db: 'QWebDatabase') -> None: ... - def origin(self) -> 'QWebSecurityOrigin': ... - def fileName(self) -> str: ... - def size(self) -> int: ... - def expectedSize(self) -> int: ... - def displayName(self) -> str: ... - def name(self) -> str: ... - - -class QWebElement(sip.simplewrapper): - - class StyleResolveStrategy(int): ... - InlineStyle = ... # type: 'QWebElement.StyleResolveStrategy' - CascadedStyle = ... # type: 'QWebElement.StyleResolveStrategy' - ComputedStyle = ... # type: 'QWebElement.StyleResolveStrategy' - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QWebElement') -> None: ... - - @typing.overload - def render(self, painter: QtGui.QPainter) -> None: ... - @typing.overload - def render(self, painter: QtGui.QPainter, clip: QtCore.QRect) -> None: ... - def setStyleProperty(self, name: str, value: str) -> None: ... - def styleProperty(self, name: str, strategy: 'QWebElement.StyleResolveStrategy') -> str: ... - def evaluateJavaScript(self, scriptSource: str) -> typing.Any: ... - def removeAllChildren(self) -> None: ... - def removeFromDocument(self) -> None: ... - def takeFromDocument(self) -> 'QWebElement': ... - def clone(self) -> 'QWebElement': ... - @typing.overload - def replace(self, markup: str) -> None: ... - @typing.overload - def replace(self, element: 'QWebElement') -> None: ... - @typing.overload - def encloseWith(self, markup: str) -> None: ... - @typing.overload - def encloseWith(self, element: 'QWebElement') -> None: ... - @typing.overload - def encloseContentsWith(self, element: 'QWebElement') -> None: ... - @typing.overload - def encloseContentsWith(self, markup: str) -> None: ... - @typing.overload - def prependOutside(self, markup: str) -> None: ... - @typing.overload - def prependOutside(self, element: 'QWebElement') -> None: ... - @typing.overload - def appendOutside(self, markup: str) -> None: ... - @typing.overload - def appendOutside(self, element: 'QWebElement') -> None: ... - @typing.overload - def prependInside(self, markup: str) -> None: ... - @typing.overload - def prependInside(self, element: 'QWebElement') -> None: ... - @typing.overload - def appendInside(self, markup: str) -> None: ... - @typing.overload - def appendInside(self, element: 'QWebElement') -> None: ... - def webFrame(self) -> QWebFrame: ... - def document(self) -> 'QWebElement': ... - def previousSibling(self) -> 'QWebElement': ... - def nextSibling(self) -> 'QWebElement': ... - def lastChild(self) -> 'QWebElement': ... - def firstChild(self) -> 'QWebElement': ... - def parent(self) -> 'QWebElement': ... - def namespaceUri(self) -> str: ... - def localName(self) -> str: ... - def prefix(self) -> str: ... - def tagName(self) -> str: ... - def geometry(self) -> QtCore.QRect: ... - def setFocus(self) -> None: ... - def hasFocus(self) -> bool: ... - def toggleClass(self, name: str) -> None: ... - def removeClass(self, name: str) -> None: ... - def addClass(self, name: str) -> None: ... - def hasClass(self, name: str) -> bool: ... - def classes(self) -> typing.List[str]: ... - def attributeNames(self, namespaceUri: str = ...) -> typing.List[str]: ... - def hasAttributes(self) -> bool: ... - def removeAttributeNS(self, namespaceUri: str, name: str) -> None: ... - def removeAttribute(self, name: str) -> None: ... - def hasAttributeNS(self, namespaceUri: str, name: str) -> bool: ... - def hasAttribute(self, name: str) -> bool: ... - def attributeNS(self, namespaceUri: str, name: str, defaultValue: str = ...) -> str: ... - def attribute(self, name: str, defaultValue: str = ...) -> str: ... - def setAttributeNS(self, namespaceUri: str, name: str, value: str) -> None: ... - def setAttribute(self, name: str, value: str) -> None: ... - def toInnerXml(self) -> str: ... - def setInnerXml(self, markup: str) -> None: ... - def toOuterXml(self) -> str: ... - def setOuterXml(self, markup: str) -> None: ... - def toPlainText(self) -> str: ... - def setPlainText(self, text: str) -> None: ... - def findFirst(self, selectorQuery: str) -> 'QWebElement': ... - def findAll(self, selectorQuery: str) -> 'QWebElementCollection': ... - def isNull(self) -> bool: ... - - -class QWebElementCollection(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, contextElement: QWebElement, query: str) -> None: ... - @typing.overload - def __init__(self, a0: 'QWebElementCollection') -> None: ... - - def toList(self) -> typing.Any: ... - def last(self) -> QWebElement: ... - def first(self) -> QWebElement: ... - def __getitem__(self, i: int) -> QWebElement: ... - def at(self, i: int) -> QWebElement: ... - def __len__(self) -> int: ... - def count(self) -> int: ... - def append(self, collection: 'QWebElementCollection') -> None: ... - - -class QWebHistoryItem(sip.simplewrapper): - - def __init__(self, other: 'QWebHistoryItem') -> None: ... - - def isValid(self) -> bool: ... - def setUserData(self, userData: typing.Any) -> None: ... - def userData(self) -> typing.Any: ... - def icon(self) -> QtGui.QIcon: ... - def lastVisited(self) -> QtCore.QDateTime: ... - def title(self) -> str: ... - def url(self) -> QtCore.QUrl: ... - def originalUrl(self) -> QtCore.QUrl: ... - - -class QWebHistory(sip.simplewrapper): - - def setMaximumItemCount(self, count: int) -> None: ... - def maximumItemCount(self) -> int: ... - def currentItemIndex(self) -> int: ... - def __len__(self) -> int: ... - def count(self) -> int: ... - def itemAt(self, i: int) -> QWebHistoryItem: ... - def forwardItem(self) -> QWebHistoryItem: ... - def currentItem(self) -> QWebHistoryItem: ... - def backItem(self) -> QWebHistoryItem: ... - def goToItem(self, item: QWebHistoryItem) -> None: ... - def forward(self) -> None: ... - def back(self) -> None: ... - def canGoForward(self) -> bool: ... - def canGoBack(self) -> bool: ... - def forwardItems(self, maxItems: int) -> typing.List[QWebHistoryItem]: ... - def backItems(self, maxItems: int) -> typing.List[QWebHistoryItem]: ... - def items(self) -> typing.Any: ... - def clear(self) -> None: ... - - -class QWebHistoryInterface(QtCore.QObject): - - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def addHistoryEntry(self, url: str) -> None: ... - def historyContains(self, url: str) -> bool: ... - @staticmethod - def defaultInterface() -> 'QWebHistoryInterface': ... - @staticmethod - def setDefaultInterface(defaultInterface: 'QWebHistoryInterface') -> None: ... - - -class QWebPluginFactory(QtCore.QObject): - - class Extension(int): ... - - class MimeType(sip.simplewrapper): - - description = ... # type: str - fileExtensions = ... # type: typing.Iterable[str] - name = ... # type: str - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QWebPluginFactory.MimeType') -> None: ... - - class Plugin(sip.simplewrapper): - - description = ... # type: str - mimeTypes = ... # type: typing.Any - name = ... # type: str - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QWebPluginFactory.Plugin') -> None: ... - - class ExtensionOption(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QWebPluginFactory.ExtensionOption') -> None: ... - - class ExtensionReturn(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QWebPluginFactory.ExtensionReturn') -> None: ... - - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def supportsExtension(self, extension: 'QWebPluginFactory.Extension') -> bool: ... - def extension(self, extension: 'QWebPluginFactory.Extension', option: typing.Optional['QWebPluginFactory.ExtensionOption'] = ..., output: typing.Optional['QWebPluginFactory.ExtensionReturn'] = ...) -> bool: ... - def create(self, mimeType: str, url: QtCore.QUrl, argumentNames: typing.Iterable[str], argumentValues: typing.Iterable[str]) -> QtCore.QObject: ... - def refreshPlugins(self) -> None: ... - def plugins(self) -> typing.Any: ... - - -class QWebSecurityOrigin(sip.simplewrapper): - - class SubdomainSetting(int): ... - AllowSubdomains = ... # type: 'QWebSecurityOrigin.SubdomainSetting' - DisallowSubdomains = ... # type: 'QWebSecurityOrigin.SubdomainSetting' - - @typing.overload - def __init__(self, url: QtCore.QUrl) -> None: ... - @typing.overload - def __init__(self, other: 'QWebSecurityOrigin') -> None: ... - - def removeAccessWhitelistEntry(self, scheme: str, host: str, subdomainSetting: 'QWebSecurityOrigin.SubdomainSetting') -> None: ... - def addAccessWhitelistEntry(self, scheme: str, host: str, subdomainSetting: 'QWebSecurityOrigin.SubdomainSetting') -> None: ... - def setApplicationCacheQuota(self, quota: int) -> None: ... - @staticmethod - def localSchemes() -> typing.List[str]: ... - @staticmethod - def removeLocalScheme(scheme: str) -> None: ... - @staticmethod - def addLocalScheme(scheme: str) -> None: ... - def databases(self) -> typing.Any: ... - def setDatabaseQuota(self, quota: int) -> None: ... - def databaseQuota(self) -> int: ... - def databaseUsage(self) -> int: ... - def port(self) -> int: ... - def host(self) -> str: ... - def scheme(self) -> str: ... - @staticmethod - def allOrigins() -> typing.Any: ... - - -class QWebSettings(sip.simplewrapper): - - class ThirdPartyCookiePolicy(int): ... - AlwaysAllowThirdPartyCookies = ... # type: 'QWebSettings.ThirdPartyCookiePolicy' - AlwaysBlockThirdPartyCookies = ... # type: 'QWebSettings.ThirdPartyCookiePolicy' - AllowThirdPartyWithExistingCookies = ... # type: 'QWebSettings.ThirdPartyCookiePolicy' - - class FontSize(int): ... - MinimumFontSize = ... # type: 'QWebSettings.FontSize' - MinimumLogicalFontSize = ... # type: 'QWebSettings.FontSize' - DefaultFontSize = ... # type: 'QWebSettings.FontSize' - DefaultFixedFontSize = ... # type: 'QWebSettings.FontSize' - - class WebGraphic(int): ... - MissingImageGraphic = ... # type: 'QWebSettings.WebGraphic' - MissingPluginGraphic = ... # type: 'QWebSettings.WebGraphic' - DefaultFrameIconGraphic = ... # type: 'QWebSettings.WebGraphic' - TextAreaSizeGripCornerGraphic = ... # type: 'QWebSettings.WebGraphic' - InputSpeechButtonGraphic = ... # type: 'QWebSettings.WebGraphic' - SearchCancelButtonGraphic = ... # type: 'QWebSettings.WebGraphic' - SearchCancelButtonPressedGraphic = ... # type: 'QWebSettings.WebGraphic' - - class WebAttribute(int): ... - AutoLoadImages = ... # type: 'QWebSettings.WebAttribute' - JavascriptEnabled = ... # type: 'QWebSettings.WebAttribute' - JavaEnabled = ... # type: 'QWebSettings.WebAttribute' - PluginsEnabled = ... # type: 'QWebSettings.WebAttribute' - PrivateBrowsingEnabled = ... # type: 'QWebSettings.WebAttribute' - JavascriptCanOpenWindows = ... # type: 'QWebSettings.WebAttribute' - JavascriptCanCloseWindows = ... # type: 'QWebSettings.WebAttribute' - JavascriptCanAccessClipboard = ... # type: 'QWebSettings.WebAttribute' - DeveloperExtrasEnabled = ... # type: 'QWebSettings.WebAttribute' - LinksIncludedInFocusChain = ... # type: 'QWebSettings.WebAttribute' - ZoomTextOnly = ... # type: 'QWebSettings.WebAttribute' - PrintElementBackgrounds = ... # type: 'QWebSettings.WebAttribute' - OfflineStorageDatabaseEnabled = ... # type: 'QWebSettings.WebAttribute' - OfflineWebApplicationCacheEnabled = ... # type: 'QWebSettings.WebAttribute' - LocalStorageDatabaseEnabled = ... # type: 'QWebSettings.WebAttribute' - LocalStorageEnabled = ... # type: 'QWebSettings.WebAttribute' - LocalContentCanAccessRemoteUrls = ... # type: 'QWebSettings.WebAttribute' - DnsPrefetchEnabled = ... # type: 'QWebSettings.WebAttribute' - XSSAuditingEnabled = ... # type: 'QWebSettings.WebAttribute' - AcceleratedCompositingEnabled = ... # type: 'QWebSettings.WebAttribute' - SpatialNavigationEnabled = ... # type: 'QWebSettings.WebAttribute' - LocalContentCanAccessFileUrls = ... # type: 'QWebSettings.WebAttribute' - TiledBackingStoreEnabled = ... # type: 'QWebSettings.WebAttribute' - FrameFlatteningEnabled = ... # type: 'QWebSettings.WebAttribute' - SiteSpecificQuirksEnabled = ... # type: 'QWebSettings.WebAttribute' - WebGLEnabled = ... # type: 'QWebSettings.WebAttribute' - HyperlinkAuditingEnabled = ... # type: 'QWebSettings.WebAttribute' - CSSRegionsEnabled = ... # type: 'QWebSettings.WebAttribute' - CSSGridLayoutEnabled = ... # type: 'QWebSettings.WebAttribute' - ScrollAnimatorEnabled = ... # type: 'QWebSettings.WebAttribute' - CaretBrowsingEnabled = ... # type: 'QWebSettings.WebAttribute' - NotificationsEnabled = ... # type: 'QWebSettings.WebAttribute' - WebAudioEnabled = ... # type: 'QWebSettings.WebAttribute' - Accelerated2dCanvasEnabled = ... # type: 'QWebSettings.WebAttribute' - - class FontFamily(int): ... - StandardFont = ... # type: 'QWebSettings.FontFamily' - FixedFont = ... # type: 'QWebSettings.FontFamily' - SerifFont = ... # type: 'QWebSettings.FontFamily' - SansSerifFont = ... # type: 'QWebSettings.FontFamily' - CursiveFont = ... # type: 'QWebSettings.FontFamily' - FantasyFont = ... # type: 'QWebSettings.FontFamily' - - def cssMediaType(self) -> str: ... - def setCSSMediaType(self, a0: str) -> None: ... - def thirdPartyCookiePolicy(self) -> 'QWebSettings.ThirdPartyCookiePolicy': ... - def setThirdPartyCookiePolicy(self, a0: 'QWebSettings.ThirdPartyCookiePolicy') -> None: ... - @staticmethod - def enablePersistentStorage(path: str = ...) -> None: ... - @staticmethod - def clearMemoryCaches() -> None: ... - def localStoragePath(self) -> str: ... - def setLocalStoragePath(self, path: str) -> None: ... - @staticmethod - def offlineWebApplicationCacheQuota() -> int: ... - @staticmethod - def setOfflineWebApplicationCacheQuota(maximumSize: int) -> None: ... - @staticmethod - def offlineWebApplicationCachePath() -> str: ... - @staticmethod - def setOfflineWebApplicationCachePath(path: str) -> None: ... - def defaultTextEncoding(self) -> str: ... - def setDefaultTextEncoding(self, encoding: str) -> None: ... - @staticmethod - def offlineStorageDefaultQuota() -> int: ... - @staticmethod - def setOfflineStorageDefaultQuota(maximumSize: int) -> None: ... - @staticmethod - def offlineStoragePath() -> str: ... - @staticmethod - def setOfflineStoragePath(path: str) -> None: ... - @staticmethod - def setObjectCacheCapacities(cacheMinDeadCapacity: int, cacheMaxDead: int, totalCapacity: int) -> None: ... - @staticmethod - def maximumPagesInCache() -> int: ... - @staticmethod - def setMaximumPagesInCache(pages: int) -> None: ... - @staticmethod - def webGraphic(type: 'QWebSettings.WebGraphic') -> QtGui.QPixmap: ... - @staticmethod - def setWebGraphic(type: 'QWebSettings.WebGraphic', graphic: QtGui.QPixmap) -> None: ... - @staticmethod - def iconForUrl(url: QtCore.QUrl) -> QtGui.QIcon: ... - @staticmethod - def clearIconDatabase() -> None: ... - @staticmethod - def iconDatabasePath() -> str: ... - @staticmethod - def setIconDatabasePath(location: str) -> None: ... - def userStyleSheetUrl(self) -> QtCore.QUrl: ... - def setUserStyleSheetUrl(self, location: QtCore.QUrl) -> None: ... - def resetAttribute(self, attr: 'QWebSettings.WebAttribute') -> None: ... - def testAttribute(self, attr: 'QWebSettings.WebAttribute') -> bool: ... - def setAttribute(self, attr: 'QWebSettings.WebAttribute', on: bool) -> None: ... - def resetFontSize(self, type: 'QWebSettings.FontSize') -> None: ... - def fontSize(self, type: 'QWebSettings.FontSize') -> int: ... - def setFontSize(self, type: 'QWebSettings.FontSize', size: int) -> None: ... - def resetFontFamily(self, which: 'QWebSettings.FontFamily') -> None: ... - def fontFamily(self, which: 'QWebSettings.FontFamily') -> str: ... - def setFontFamily(self, which: 'QWebSettings.FontFamily', family: str) -> None: ... - @staticmethod - def globalSettings() -> 'QWebSettings': ... - - -def qWebKitMinorVersion() -> int: ... -def qWebKitMajorVersion() -> int: ... -def qWebKitVersion() -> str: ... diff -Nru uranium-3.3.0/stubs/PyQt5/QtWebKitWidgets.pyi uranium-4.4.1/stubs/PyQt5/QtWebKitWidgets.pyi --- uranium-3.3.0/stubs/PyQt5/QtWebKitWidgets.pyi 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/stubs/PyQt5/QtWebKitWidgets.pyi 1970-01-01 00:00:00.000000000 +0000 @@ -1,621 +0,0 @@ -# The PEP 484 type hints stub file for the QtWebKitWidgets module. -# -# Generated by SIP 4.18.1 -# -# Copyright (c) 2016 Riverbank Computing Limited -# -# This file is part of PyQt5. -# -# This file may be used under the terms of the GNU General Public License -# version 3.0 as published by the Free Software Foundation and appearing in -# the file LICENSE included in the packaging of this file. Please review the -# following information to ensure the GNU General Public License version 3.0 -# requirements will be met: http://www.gnu.org/copyleft/gpl.html. -# -# If you do not wish to use this file under the terms of the GPL version 3.0 -# then you may purchase a commercial license. For more information contact -# info@riverbankcomputing.com. -# -# This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -# WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - - -import typing -import sip - -from PyQt5 import QtWidgets -from PyQt5 import QtWebKit -from PyQt5 import QtPrintSupport -from PyQt5 import QtNetwork -from PyQt5 import QtCore - -# Support for QDate, QDateTime and QTime. -import datetime - -# Convenient type aliases. -PYQT_SIGNAL = typing.Union[QtCore.pyqtSignal, QtCore.pyqtBoundSignal] -PYQT_SLOT = typing.Union[typing.Callable[..., None], QtCore.pyqtBoundSignal] - -# Convenient aliases for complicated OpenGL types. -PYQT_OPENGL_ARRAY = typing.Union[typing.Sequence[int], typing.Sequence[float], - sip.Buffer, None] -PYQT_OPENGL_BOUND_ARRAY = typing.Union[typing.Sequence[int], - typing.Sequence[float], sip.Buffer, int, None] - - -class QGraphicsWebView(QtWidgets.QGraphicsWidget): - - def __init__(self, parent: typing.Optional[QtWidgets.QGraphicsItem] = ...) -> None: ... - - def setRenderHint(self, hint: QtGui.QPainter.RenderHint, enabled: bool = ...) -> None: ... - def setRenderHints(self, hints: QtGui.QPainter.RenderHints) -> None: ... - def renderHints(self) -> QtGui.QPainter.RenderHints: ... - def setTiledBackingStoreFrozen(self, frozen: bool) -> None: ... - def isTiledBackingStoreFrozen(self) -> bool: ... - def setResizesToContents(self, enabled: bool) -> None: ... - def resizesToContents(self) -> bool: ... - def sceneEvent(self, a0: QtCore.QEvent) -> bool: ... - def focusNextPrevChild(self, next: bool) -> bool: ... - def inputMethodEvent(self, a0: QtGui.QInputMethodEvent) -> None: ... - def focusOutEvent(self, a0: QtGui.QFocusEvent) -> None: ... - def focusInEvent(self, a0: QtGui.QFocusEvent) -> None: ... - def dropEvent(self, a0: QtWidgets.QGraphicsSceneDragDropEvent) -> None: ... - def dragMoveEvent(self, a0: QtWidgets.QGraphicsSceneDragDropEvent) -> None: ... - def dragLeaveEvent(self, a0: QtWidgets.QGraphicsSceneDragDropEvent) -> None: ... - def dragEnterEvent(self, a0: QtWidgets.QGraphicsSceneDragDropEvent) -> None: ... - def contextMenuEvent(self, a0: QtWidgets.QGraphicsSceneContextMenuEvent) -> None: ... - def keyReleaseEvent(self, a0: QtGui.QKeyEvent) -> None: ... - def keyPressEvent(self, a0: QtGui.QKeyEvent) -> None: ... - def wheelEvent(self, a0: QtWidgets.QGraphicsSceneWheelEvent) -> None: ... - def hoverLeaveEvent(self, a0: QtWidgets.QGraphicsSceneHoverEvent) -> None: ... - def hoverMoveEvent(self, a0: QtWidgets.QGraphicsSceneHoverEvent) -> None: ... - def mouseMoveEvent(self, a0: QtWidgets.QGraphicsSceneMouseEvent) -> None: ... - def mouseReleaseEvent(self, a0: QtWidgets.QGraphicsSceneMouseEvent) -> None: ... - def mouseDoubleClickEvent(self, a0: QtWidgets.QGraphicsSceneMouseEvent) -> None: ... - def mousePressEvent(self, a0: QtWidgets.QGraphicsSceneMouseEvent) -> None: ... - def linkClicked(self, a0: QtCore.QUrl) -> None: ... - def statusBarMessage(self, message: str) -> None: ... - def iconChanged(self) -> None: ... - def titleChanged(self, a0: str) -> None: ... - def urlChanged(self, a0: QtCore.QUrl) -> None: ... - def loadProgress(self, progress: int) -> None: ... - def loadFinished(self, a0: bool) -> None: ... - def loadStarted(self) -> None: ... - def reload(self) -> None: ... - def forward(self) -> None: ... - def back(self) -> None: ... - def stop(self) -> None: ... - def inputMethodQuery(self, query: QtCore.Qt.InputMethodQuery) -> typing.Any: ... - def sizeHint(self, which: QtCore.Qt.SizeHint, constraint: QtCore.QSizeF) -> QtCore.QSizeF: ... - def event(self, a0: QtCore.QEvent) -> bool: ... - def itemChange(self, change: QtWidgets.QGraphicsItem.GraphicsItemChange, value: typing.Any) -> typing.Any: ... - def paint(self, painter: QtGui.QPainter, option: QtWidgets.QStyleOptionGraphicsItem, widget: typing.Optional[QtWidgets.QWidget] = ...) -> None: ... - def updateGeometry(self) -> None: ... - def setGeometry(self, rect: QtCore.QRectF) -> None: ... - def findText(self, subString: str, options: 'QWebPage.FindFlags' = ...) -> bool: ... - def triggerPageAction(self, action: 'QWebPage.WebAction', checked: bool = ...) -> None: ... - def pageAction(self, action: 'QWebPage.WebAction') -> QtWidgets.QAction: ... - def settings(self) -> QtWebKit.QWebSettings: ... - def history(self) -> QtWebKit.QWebHistory: ... - def setContent(self, data: typing.Union[QtCore.QByteArray, bytes, bytearray], mimeType: str = ..., baseUrl: QtCore.QUrl = ...) -> None: ... - def setHtml(self, html: str, baseUrl: QtCore.QUrl = ...) -> None: ... - @typing.overload - def load(self, url: QtCore.QUrl) -> None: ... - @typing.overload - def load(self, request: QtNetwork.QNetworkRequest, operation: QtNetwork.QNetworkAccessManager.Operation = ..., body: typing.Union[QtCore.QByteArray, bytes, bytearray] = ...) -> None: ... - def isModified(self) -> bool: ... - def setZoomFactor(self, a0: float) -> None: ... - def zoomFactor(self) -> float: ... - def icon(self) -> QtGui.QIcon: ... - def title(self) -> str: ... - def setUrl(self, a0: QtCore.QUrl) -> None: ... - def url(self) -> QtCore.QUrl: ... - def setPage(self, a0: 'QWebPage') -> None: ... - def page(self) -> 'QWebPage': ... - - -class QWebHitTestResult(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, other: 'QWebHitTestResult') -> None: ... - - def linkTitleString(self) -> str: ... - def mediaUrl(self) -> QtCore.QUrl: ... - def element(self) -> QtWebKit.QWebElement: ... - def linkElement(self) -> QtWebKit.QWebElement: ... - def enclosingBlockElement(self) -> QtWebKit.QWebElement: ... - def boundingRect(self) -> QtCore.QRect: ... - def frame(self) -> 'QWebFrame': ... - def isContentSelected(self) -> bool: ... - def isContentEditable(self) -> bool: ... - def pixmap(self) -> QtGui.QPixmap: ... - def imageUrl(self) -> QtCore.QUrl: ... - def alternateText(self) -> str: ... - def linkTargetFrame(self) -> 'QWebFrame': ... - def linkTitle(self) -> QtCore.QUrl: ... - def linkUrl(self) -> QtCore.QUrl: ... - def linkText(self) -> str: ... - def title(self) -> str: ... - def pos(self) -> QtCore.QPoint: ... - def isNull(self) -> bool: ... - - -class QWebFrame(QtCore.QObject): - - class RenderLayer(int): ... - ContentsLayer = ... # type: 'QWebFrame.RenderLayer' - ScrollBarLayer = ... # type: 'QWebFrame.RenderLayer' - PanIconLayer = ... # type: 'QWebFrame.RenderLayer' - AllLayers = ... # type: 'QWebFrame.RenderLayer' - - class ValueOwnership(int): ... - QtOwnership = ... # type: 'QWebFrame.ValueOwnership' - ScriptOwnership = ... # type: 'QWebFrame.ValueOwnership' - AutoOwnership = ... # type: 'QWebFrame.ValueOwnership' - - class RenderLayers(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QWebFrame.RenderLayers', 'QWebFrame.RenderLayer']) -> None: ... - @typing.overload - def __init__(self, a0: 'QWebFrame.RenderLayers') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QWebFrame.RenderLayers': ... - def __int__(self) -> int: ... - - def scrollToAnchor(self, anchor: str) -> None: ... - def pageChanged(self) -> None: ... - def loadFinished(self, ok: bool) -> None: ... - def loadStarted(self) -> None: ... - def contentsSizeChanged(self, size: QtCore.QSize) -> None: ... - def findFirstElement(self, selectorQuery: str) -> QtWebKit.QWebElement: ... - def findAllElements(self, selectorQuery: str) -> QtWebKit.QWebElementCollection: ... - def documentElement(self) -> QtWebKit.QWebElement: ... - def setFocus(self) -> None: ... - def hasFocus(self) -> bool: ... - @typing.overload - def render(self, a0: QtGui.QPainter, clip: QtGui.QRegion = ...) -> None: ... - @typing.overload - def render(self, a0: QtGui.QPainter, layer: 'QWebFrame.RenderLayers', clip: QtGui.QRegion = ...) -> None: ... - def scrollBarGeometry(self, orientation: QtCore.Qt.Orientation) -> QtCore.QRect: ... - def baseUrl(self) -> QtCore.QUrl: ... - def requestedUrl(self) -> QtCore.QUrl: ... - def securityOrigin(self) -> QtWebKit.QWebSecurityOrigin: ... - def setZoomFactor(self, factor: float) -> None: ... - def zoomFactor(self) -> float: ... - def setScrollPosition(self, pos: QtCore.QPoint) -> None: ... - def scrollPosition(self) -> QtCore.QPoint: ... - def scroll(self, a0: int, a1: int) -> None: ... - def metaData(self) -> typing.Any: ... - def iconChanged(self) -> None: ... - def initialLayoutCompleted(self) -> None: ... - def urlChanged(self, url: QtCore.QUrl) -> None: ... - def titleChanged(self, title: str) -> None: ... - def javaScriptWindowObjectCleared(self) -> None: ... - def print(self, printer: QtPrintSupport.QPrinter) -> None: ... - def print_(self, printer: QtPrintSupport.QPrinter) -> None: ... - def evaluateJavaScript(self, scriptSource: str) -> typing.Any: ... - def event(self, a0: QtCore.QEvent) -> bool: ... - def hitTestContent(self, pos: QtCore.QPoint) -> QWebHitTestResult: ... - def contentsSize(self) -> QtCore.QSize: ... - def geometry(self) -> QtCore.QRect: ... - def pos(self) -> QtCore.QPoint: ... - def scrollBarMaximum(self, orientation: QtCore.Qt.Orientation) -> int: ... - def scrollBarMinimum(self, orientation: QtCore.Qt.Orientation) -> int: ... - def scrollBarValue(self, orientation: QtCore.Qt.Orientation) -> int: ... - def setScrollBarValue(self, orientation: QtCore.Qt.Orientation, value: int) -> None: ... - def setScrollBarPolicy(self, orientation: QtCore.Qt.Orientation, policy: QtCore.Qt.ScrollBarPolicy) -> None: ... - def scrollBarPolicy(self, orientation: QtCore.Qt.Orientation) -> QtCore.Qt.ScrollBarPolicy: ... - def childFrames(self) -> typing.Any: ... - def parentFrame(self) -> 'QWebFrame': ... - def frameName(self) -> str: ... - def icon(self) -> QtGui.QIcon: ... - def url(self) -> QtCore.QUrl: ... - def setUrl(self, url: QtCore.QUrl) -> None: ... - def title(self) -> str: ... - def toPlainText(self) -> str: ... - def toHtml(self) -> str: ... - def addToJavaScriptWindowObject(self, name: str, object: QtCore.QObject, ownership: 'QWebFrame.ValueOwnership' = ...) -> None: ... - def setContent(self, data: typing.Union[QtCore.QByteArray, bytes, bytearray], mimeType: str = ..., baseUrl: QtCore.QUrl = ...) -> None: ... - def setHtml(self, html: str, baseUrl: QtCore.QUrl = ...) -> None: ... - @typing.overload - def load(self, url: QtCore.QUrl) -> None: ... - @typing.overload - def load(self, request: QtNetwork.QNetworkRequest, operation: QtNetwork.QNetworkAccessManager.Operation = ..., body: typing.Union[QtCore.QByteArray, bytes, bytearray] = ...) -> None: ... - def page(self) -> 'QWebPage': ... - - -class QWebInspector(QtWidgets.QWidget): - - def __init__(self, parent: typing.Optional[QtWidgets.QWidget] = ...) -> None: ... - - def closeEvent(self, event: QtGui.QCloseEvent) -> None: ... - def hideEvent(self, event: QtGui.QHideEvent) -> None: ... - def showEvent(self, event: QtGui.QShowEvent) -> None: ... - def resizeEvent(self, event: QtGui.QResizeEvent) -> None: ... - def event(self, a0: QtCore.QEvent) -> bool: ... - def sizeHint(self) -> QtCore.QSize: ... - def page(self) -> 'QWebPage': ... - def setPage(self, page: 'QWebPage') -> None: ... - - -class QWebPage(QtCore.QObject): - - class VisibilityState(int): ... - VisibilityStateVisible = ... # type: 'QWebPage.VisibilityState' - VisibilityStateHidden = ... # type: 'QWebPage.VisibilityState' - VisibilityStatePrerender = ... # type: 'QWebPage.VisibilityState' - VisibilityStateUnloaded = ... # type: 'QWebPage.VisibilityState' - - class Feature(int): ... - Notifications = ... # type: 'QWebPage.Feature' - Geolocation = ... # type: 'QWebPage.Feature' - - class PermissionPolicy(int): ... - PermissionUnknown = ... # type: 'QWebPage.PermissionPolicy' - PermissionGrantedByUser = ... # type: 'QWebPage.PermissionPolicy' - PermissionDeniedByUser = ... # type: 'QWebPage.PermissionPolicy' - - class ErrorDomain(int): ... - QtNetwork = ... # type: 'QWebPage.ErrorDomain' - Http = ... # type: 'QWebPage.ErrorDomain' - WebKit = ... # type: 'QWebPage.ErrorDomain' - - class Extension(int): ... - ChooseMultipleFilesExtension = ... # type: 'QWebPage.Extension' - ErrorPageExtension = ... # type: 'QWebPage.Extension' - - class WebWindowType(int): ... - WebBrowserWindow = ... # type: 'QWebPage.WebWindowType' - WebModalDialog = ... # type: 'QWebPage.WebWindowType' - - class LinkDelegationPolicy(int): ... - DontDelegateLinks = ... # type: 'QWebPage.LinkDelegationPolicy' - DelegateExternalLinks = ... # type: 'QWebPage.LinkDelegationPolicy' - DelegateAllLinks = ... # type: 'QWebPage.LinkDelegationPolicy' - - class FindFlag(int): ... - FindBackward = ... # type: 'QWebPage.FindFlag' - FindCaseSensitively = ... # type: 'QWebPage.FindFlag' - FindWrapsAroundDocument = ... # type: 'QWebPage.FindFlag' - HighlightAllOccurrences = ... # type: 'QWebPage.FindFlag' - FindAtWordBeginningsOnly = ... # type: 'QWebPage.FindFlag' - TreatMedialCapitalAsWordBeginning = ... # type: 'QWebPage.FindFlag' - FindBeginsInSelection = ... # type: 'QWebPage.FindFlag' - - class WebAction(int): ... - NoWebAction = ... # type: 'QWebPage.WebAction' - OpenLink = ... # type: 'QWebPage.WebAction' - OpenLinkInNewWindow = ... # type: 'QWebPage.WebAction' - OpenFrameInNewWindow = ... # type: 'QWebPage.WebAction' - DownloadLinkToDisk = ... # type: 'QWebPage.WebAction' - CopyLinkToClipboard = ... # type: 'QWebPage.WebAction' - OpenImageInNewWindow = ... # type: 'QWebPage.WebAction' - DownloadImageToDisk = ... # type: 'QWebPage.WebAction' - CopyImageToClipboard = ... # type: 'QWebPage.WebAction' - Back = ... # type: 'QWebPage.WebAction' - Forward = ... # type: 'QWebPage.WebAction' - Stop = ... # type: 'QWebPage.WebAction' - Reload = ... # type: 'QWebPage.WebAction' - Cut = ... # type: 'QWebPage.WebAction' - Copy = ... # type: 'QWebPage.WebAction' - Paste = ... # type: 'QWebPage.WebAction' - Undo = ... # type: 'QWebPage.WebAction' - Redo = ... # type: 'QWebPage.WebAction' - MoveToNextChar = ... # type: 'QWebPage.WebAction' - MoveToPreviousChar = ... # type: 'QWebPage.WebAction' - MoveToNextWord = ... # type: 'QWebPage.WebAction' - MoveToPreviousWord = ... # type: 'QWebPage.WebAction' - MoveToNextLine = ... # type: 'QWebPage.WebAction' - MoveToPreviousLine = ... # type: 'QWebPage.WebAction' - MoveToStartOfLine = ... # type: 'QWebPage.WebAction' - MoveToEndOfLine = ... # type: 'QWebPage.WebAction' - MoveToStartOfBlock = ... # type: 'QWebPage.WebAction' - MoveToEndOfBlock = ... # type: 'QWebPage.WebAction' - MoveToStartOfDocument = ... # type: 'QWebPage.WebAction' - MoveToEndOfDocument = ... # type: 'QWebPage.WebAction' - SelectNextChar = ... # type: 'QWebPage.WebAction' - SelectPreviousChar = ... # type: 'QWebPage.WebAction' - SelectNextWord = ... # type: 'QWebPage.WebAction' - SelectPreviousWord = ... # type: 'QWebPage.WebAction' - SelectNextLine = ... # type: 'QWebPage.WebAction' - SelectPreviousLine = ... # type: 'QWebPage.WebAction' - SelectStartOfLine = ... # type: 'QWebPage.WebAction' - SelectEndOfLine = ... # type: 'QWebPage.WebAction' - SelectStartOfBlock = ... # type: 'QWebPage.WebAction' - SelectEndOfBlock = ... # type: 'QWebPage.WebAction' - SelectStartOfDocument = ... # type: 'QWebPage.WebAction' - SelectEndOfDocument = ... # type: 'QWebPage.WebAction' - DeleteStartOfWord = ... # type: 'QWebPage.WebAction' - DeleteEndOfWord = ... # type: 'QWebPage.WebAction' - SetTextDirectionDefault = ... # type: 'QWebPage.WebAction' - SetTextDirectionLeftToRight = ... # type: 'QWebPage.WebAction' - SetTextDirectionRightToLeft = ... # type: 'QWebPage.WebAction' - ToggleBold = ... # type: 'QWebPage.WebAction' - ToggleItalic = ... # type: 'QWebPage.WebAction' - ToggleUnderline = ... # type: 'QWebPage.WebAction' - InspectElement = ... # type: 'QWebPage.WebAction' - InsertParagraphSeparator = ... # type: 'QWebPage.WebAction' - InsertLineSeparator = ... # type: 'QWebPage.WebAction' - SelectAll = ... # type: 'QWebPage.WebAction' - ReloadAndBypassCache = ... # type: 'QWebPage.WebAction' - PasteAndMatchStyle = ... # type: 'QWebPage.WebAction' - RemoveFormat = ... # type: 'QWebPage.WebAction' - ToggleStrikethrough = ... # type: 'QWebPage.WebAction' - ToggleSubscript = ... # type: 'QWebPage.WebAction' - ToggleSuperscript = ... # type: 'QWebPage.WebAction' - InsertUnorderedList = ... # type: 'QWebPage.WebAction' - InsertOrderedList = ... # type: 'QWebPage.WebAction' - Indent = ... # type: 'QWebPage.WebAction' - Outdent = ... # type: 'QWebPage.WebAction' - AlignCenter = ... # type: 'QWebPage.WebAction' - AlignJustified = ... # type: 'QWebPage.WebAction' - AlignLeft = ... # type: 'QWebPage.WebAction' - AlignRight = ... # type: 'QWebPage.WebAction' - StopScheduledPageRefresh = ... # type: 'QWebPage.WebAction' - CopyImageUrlToClipboard = ... # type: 'QWebPage.WebAction' - OpenLinkInThisWindow = ... # type: 'QWebPage.WebAction' - DownloadMediaToDisk = ... # type: 'QWebPage.WebAction' - CopyMediaUrlToClipboard = ... # type: 'QWebPage.WebAction' - ToggleMediaControls = ... # type: 'QWebPage.WebAction' - ToggleMediaLoop = ... # type: 'QWebPage.WebAction' - ToggleMediaPlayPause = ... # type: 'QWebPage.WebAction' - ToggleMediaMute = ... # type: 'QWebPage.WebAction' - ToggleVideoFullscreen = ... # type: 'QWebPage.WebAction' - - class NavigationType(int): ... - NavigationTypeLinkClicked = ... # type: 'QWebPage.NavigationType' - NavigationTypeFormSubmitted = ... # type: 'QWebPage.NavigationType' - NavigationTypeBackOrForward = ... # type: 'QWebPage.NavigationType' - NavigationTypeReload = ... # type: 'QWebPage.NavigationType' - NavigationTypeFormResubmitted = ... # type: 'QWebPage.NavigationType' - NavigationTypeOther = ... # type: 'QWebPage.NavigationType' - - class FindFlags(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QWebPage.FindFlags', 'QWebPage.FindFlag']) -> None: ... - @typing.overload - def __init__(self, a0: 'QWebPage.FindFlags') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QWebPage.FindFlags': ... - def __int__(self) -> int: ... - - class ExtensionOption(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QWebPage.ExtensionOption') -> None: ... - - class ExtensionReturn(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QWebPage.ExtensionReturn') -> None: ... - - class ChooseMultipleFilesExtensionOption('QWebPage.ExtensionOption'): - - parentFrame = ... # type: QWebFrame - suggestedFileNames = ... # type: typing.Iterable[str] - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QWebPage.ChooseMultipleFilesExtensionOption') -> None: ... - - class ChooseMultipleFilesExtensionReturn('QWebPage.ExtensionReturn'): - - fileNames = ... # type: typing.Iterable[str] - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QWebPage.ChooseMultipleFilesExtensionReturn') -> None: ... - - class ErrorPageExtensionOption('QWebPage.ExtensionOption'): - - domain = ... # type: 'QWebPage.ErrorDomain' - error = ... # type: int - errorString = ... # type: str - frame = ... # type: QWebFrame - url = ... # type: QtCore.QUrl - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QWebPage.ErrorPageExtensionOption') -> None: ... - - class ErrorPageExtensionReturn('QWebPage.ExtensionReturn'): - - baseUrl = ... # type: QtCore.QUrl - content = ... # type: typing.Union[QtCore.QByteArray, bytes, bytearray] - contentType = ... # type: str - encoding = ... # type: str - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QWebPage.ErrorPageExtensionReturn') -> None: ... - - class ViewportAttributes(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, other: 'QWebPage.ViewportAttributes') -> None: ... - - def size(self) -> QtCore.QSizeF: ... - def isValid(self) -> bool: ... - def isUserScalable(self) -> bool: ... - def devicePixelRatio(self) -> float: ... - def maximumScaleFactor(self) -> float: ... - def minimumScaleFactor(self) -> float: ... - def initialScaleFactor(self) -> float: ... - - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def setVisibilityState(self, a0: 'QWebPage.VisibilityState') -> None: ... - def visibilityState(self) -> 'QWebPage.VisibilityState': ... - def featurePermissionRequestCanceled(self, frame: QWebFrame, feature: 'QWebPage.Feature') -> None: ... - def featurePermissionRequested(self, frame: QWebFrame, feature: 'QWebPage.Feature') -> None: ... - def viewportChangeRequested(self) -> None: ... - def applicationCacheQuotaExceeded(self, origin: QtWebKit.QWebSecurityOrigin, defaultOriginQuota: int, totalSpaceNeeded: int) -> None: ... - def supportsContentType(self, mimeType: str) -> bool: ... - def supportedContentTypes(self) -> typing.List[str]: ... - def setFeaturePermission(self, frame: QWebFrame, feature: 'QWebPage.Feature', policy: 'QWebPage.PermissionPolicy') -> None: ... - def setActualVisibleContentRect(self, rect: QtCore.QRect) -> None: ... - def viewportAttributesForSize(self, availableSize: QtCore.QSize) -> 'QWebPage.ViewportAttributes': ... - def selectedHtml(self) -> str: ... - def hasSelection(self) -> bool: ... - def shouldInterruptJavaScript(self) -> bool: ... - def setPreferredContentsSize(self, size: QtCore.QSize) -> None: ... - def preferredContentsSize(self) -> QtCore.QSize: ... - def frameAt(self, pos: QtCore.QPoint) -> QWebFrame: ... - def restoreFrameStateRequested(self, frame: QWebFrame) -> None: ... - def saveFrameStateRequested(self, frame: QWebFrame, item: QtWebKit.QWebHistoryItem) -> None: ... - def databaseQuotaExceeded(self, frame: QWebFrame, databaseName: str) -> None: ... - def contentsChanged(self) -> None: ... - def createStandardContextMenu(self) -> QtWidgets.QMenu: ... - def isContentEditable(self) -> bool: ... - def setContentEditable(self, editable: bool) -> None: ... - def userAgentForUrl(self, url: QtCore.QUrl) -> str: ... - def javaScriptConsoleMessage(self, message: str, lineNumber: int, sourceID: str) -> None: ... - def javaScriptPrompt(self, originatingFrame: QWebFrame, msg: str, defaultValue: str) -> typing.Tuple[bool, str]: ... - def javaScriptConfirm(self, originatingFrame: QWebFrame, msg: str) -> bool: ... - def javaScriptAlert(self, originatingFrame: QWebFrame, msg: str) -> None: ... - def chooseFile(self, originatingFrame: QWebFrame, oldFile: str) -> str: ... - def acceptNavigationRequest(self, frame: QWebFrame, request: QtNetwork.QNetworkRequest, type: 'QWebPage.NavigationType') -> bool: ... - def createPlugin(self, classid: str, url: QtCore.QUrl, paramNames: typing.Iterable[str], paramValues: typing.Iterable[str]) -> QtCore.QObject: ... - def createWindow(self, type: 'QWebPage.WebWindowType') -> 'QWebPage': ... - def microFocusChanged(self) -> None: ... - def downloadRequested(self, request: QtNetwork.QNetworkRequest) -> None: ... - def unsupportedContent(self, reply: QtNetwork.QNetworkReply) -> None: ... - def menuBarVisibilityChangeRequested(self, visible: bool) -> None: ... - def statusBarVisibilityChangeRequested(self, visible: bool) -> None: ... - def toolBarVisibilityChangeRequested(self, visible: bool) -> None: ... - def linkClicked(self, url: QtCore.QUrl) -> None: ... - def printRequested(self, frame: QWebFrame) -> None: ... - def windowCloseRequested(self) -> None: ... - def scrollRequested(self, dx: int, dy: int, scrollViewRect: QtCore.QRect) -> None: ... - def repaintRequested(self, dirtyRect: QtCore.QRect) -> None: ... - def geometryChangeRequested(self, geom: QtCore.QRect) -> None: ... - def frameCreated(self, frame: QWebFrame) -> None: ... - def selectionChanged(self) -> None: ... - def statusBarMessage(self, text: str) -> None: ... - def linkHovered(self, link: str, title: str, textContent: str) -> None: ... - def loadStarted(self) -> None: ... - def loadProgress(self, progress: int) -> None: ... - def loadFinished(self, ok: bool) -> None: ... - def supportsExtension(self, extension: 'QWebPage.Extension') -> bool: ... - def extension(self, extension: 'QWebPage.Extension', option: typing.Optional['QWebPage.ExtensionOption'] = ..., output: typing.Optional['QWebPage.ExtensionReturn'] = ...) -> bool: ... - def updatePositionDependentActions(self, pos: QtCore.QPoint) -> None: ... - def swallowContextMenuEvent(self, event: QtGui.QContextMenuEvent) -> bool: ... - def palette(self) -> QtGui.QPalette: ... - def setPalette(self, palette: QtGui.QPalette) -> None: ... - def linkDelegationPolicy(self) -> 'QWebPage.LinkDelegationPolicy': ... - def setLinkDelegationPolicy(self, policy: 'QWebPage.LinkDelegationPolicy') -> None: ... - def forwardUnsupportedContent(self) -> bool: ... - def setForwardUnsupportedContent(self, forward: bool) -> None: ... - def findText(self, subString: str, options: 'QWebPage.FindFlags' = ...) -> bool: ... - def inputMethodQuery(self, property: QtCore.Qt.InputMethodQuery) -> typing.Any: ... - def focusNextPrevChild(self, next: bool) -> bool: ... - def event(self, a0: QtCore.QEvent) -> bool: ... - def setViewportSize(self, size: QtCore.QSize) -> None: ... - def viewportSize(self) -> QtCore.QSize: ... - def triggerAction(self, action: 'QWebPage.WebAction', checked: bool = ...) -> None: ... - def action(self, action: 'QWebPage.WebAction') -> QtWidgets.QAction: ... - def selectedText(self) -> str: ... - def bytesReceived(self) -> int: ... - def totalBytes(self) -> int: ... - def pluginFactory(self) -> QtWebKit.QWebPluginFactory: ... - def setPluginFactory(self, factory: QtWebKit.QWebPluginFactory) -> None: ... - def networkAccessManager(self) -> QtNetwork.QNetworkAccessManager: ... - def setNetworkAccessManager(self, manager: QtNetwork.QNetworkAccessManager) -> None: ... - def undoStack(self) -> QtWidgets.QUndoStack: ... - def isModified(self) -> bool: ... - def view(self) -> QtWidgets.QWidget: ... - def setView(self, view: QtWidgets.QWidget) -> None: ... - def settings(self) -> QtWebKit.QWebSettings: ... - def history(self) -> QtWebKit.QWebHistory: ... - def currentFrame(self) -> QWebFrame: ... - def mainFrame(self) -> QWebFrame: ... - - -class QWebView(QtWidgets.QWidget): - - def __init__(self, parent: typing.Optional[QtWidgets.QWidget] = ...) -> None: ... - - def selectedHtml(self) -> str: ... - def hasSelection(self) -> bool: ... - def setRenderHint(self, hint: QtGui.QPainter.RenderHint, enabled: bool = ...) -> None: ... - def setRenderHints(self, hints: QtGui.QPainter.RenderHints) -> None: ... - def renderHints(self) -> QtGui.QPainter.RenderHints: ... - def setZoomFactor(self, factor: float) -> None: ... - def zoomFactor(self) -> float: ... - def focusNextPrevChild(self, next: bool) -> bool: ... - def inputMethodEvent(self, a0: QtGui.QInputMethodEvent) -> None: ... - def focusOutEvent(self, a0: QtGui.QFocusEvent) -> None: ... - def focusInEvent(self, a0: QtGui.QFocusEvent) -> None: ... - def dropEvent(self, a0: QtGui.QDropEvent) -> None: ... - def dragMoveEvent(self, a0: QtGui.QDragMoveEvent) -> None: ... - def dragLeaveEvent(self, a0: QtGui.QDragLeaveEvent) -> None: ... - def dragEnterEvent(self, a0: QtGui.QDragEnterEvent) -> None: ... - def keyReleaseEvent(self, a0: QtGui.QKeyEvent) -> None: ... - def keyPressEvent(self, a0: QtGui.QKeyEvent) -> None: ... - def wheelEvent(self, a0: QtGui.QWheelEvent) -> None: ... - def contextMenuEvent(self, a0: QtGui.QContextMenuEvent) -> None: ... - def mouseReleaseEvent(self, a0: QtGui.QMouseEvent) -> None: ... - def mouseDoubleClickEvent(self, a0: QtGui.QMouseEvent) -> None: ... - def mousePressEvent(self, a0: QtGui.QMouseEvent) -> None: ... - def mouseMoveEvent(self, a0: QtGui.QMouseEvent) -> None: ... - def changeEvent(self, a0: QtCore.QEvent) -> None: ... - def paintEvent(self, ev: QtGui.QPaintEvent) -> None: ... - def resizeEvent(self, e: QtGui.QResizeEvent) -> None: ... - def createWindow(self, type: QWebPage.WebWindowType) -> 'QWebView': ... - def urlChanged(self, url: QtCore.QUrl) -> None: ... - def iconChanged(self) -> None: ... - def selectionChanged(self) -> None: ... - def linkClicked(self, url: QtCore.QUrl) -> None: ... - def statusBarMessage(self, text: str) -> None: ... - def titleChanged(self, title: str) -> None: ... - def loadFinished(self, a0: bool) -> None: ... - def loadProgress(self, progress: int) -> None: ... - def loadStarted(self) -> None: ... - def print(self, printer: QtPrintSupport.QPrinter) -> None: ... - def print_(self, printer: QtPrintSupport.QPrinter) -> None: ... - def reload(self) -> None: ... - def forward(self) -> None: ... - def back(self) -> None: ... - def stop(self) -> None: ... - def event(self, a0: QtCore.QEvent) -> bool: ... - def findText(self, subString: str, options: QWebPage.FindFlags = ...) -> bool: ... - def sizeHint(self) -> QtCore.QSize: ... - def inputMethodQuery(self, property: QtCore.Qt.InputMethodQuery) -> typing.Any: ... - def isModified(self) -> bool: ... - def triggerPageAction(self, action: QWebPage.WebAction, checked: bool = ...) -> None: ... - def pageAction(self, action: QWebPage.WebAction) -> QtWidgets.QAction: ... - def selectedText(self) -> str: ... - def icon(self) -> QtGui.QIcon: ... - def url(self) -> QtCore.QUrl: ... - def setUrl(self, url: QtCore.QUrl) -> None: ... - def title(self) -> str: ... - def settings(self) -> QtWebKit.QWebSettings: ... - def history(self) -> QtWebKit.QWebHistory: ... - def setContent(self, data: typing.Union[QtCore.QByteArray, bytes, bytearray], mimeType: str = ..., baseUrl: QtCore.QUrl = ...) -> None: ... - def setHtml(self, html: str, baseUrl: QtCore.QUrl = ...) -> None: ... - @typing.overload - def load(self, url: QtCore.QUrl) -> None: ... - @typing.overload - def load(self, request: QtNetwork.QNetworkRequest, operation: QtNetwork.QNetworkAccessManager.Operation = ..., body: typing.Union[QtCore.QByteArray, bytes, bytearray] = ...) -> None: ... - def setPage(self, page: QWebPage) -> None: ... - def page(self) -> QWebPage: ... diff -Nru uranium-3.3.0/stubs/PyQt5/QtWebSockets.pyi uranium-4.4.1/stubs/PyQt5/QtWebSockets.pyi --- uranium-3.3.0/stubs/PyQt5/QtWebSockets.pyi 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/stubs/PyQt5/QtWebSockets.pyi 1970-01-01 00:00:00.000000000 +0000 @@ -1,188 +0,0 @@ -# The PEP 484 type hints stub file for the QtWebSockets module. -# -# Generated by SIP 4.18.1 -# -# Copyright (c) 2016 Riverbank Computing Limited -# -# This file is part of PyQt5. -# -# This file may be used under the terms of the GNU General Public License -# version 3.0 as published by the Free Software Foundation and appearing in -# the file LICENSE included in the packaging of this file. Please review the -# following information to ensure the GNU General Public License version 3.0 -# requirements will be met: http://www.gnu.org/copyleft/gpl.html. -# -# If you do not wish to use this file under the terms of the GPL version 3.0 -# then you may purchase a commercial license. For more information contact -# info@riverbankcomputing.com. -# -# This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -# WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - - -import typing -import sip - -from PyQt5 import QtNetwork -from PyQt5 import QtCore - -# Support for QDate, QDateTime and QTime. -import datetime - -# Convenient type aliases. -PYQT_SIGNAL = typing.Union[QtCore.pyqtSignal, QtCore.pyqtBoundSignal] -PYQT_SLOT = typing.Union[typing.Callable[..., None], QtCore.pyqtBoundSignal] - - -class QMaskGenerator(QtCore.QObject): - - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def nextMask(self) -> int: ... - def seed(self) -> bool: ... - - -class QWebSocket(QtCore.QObject): - - def __init__(self, origin: str = ..., version: 'QWebSocketProtocol.Version' = ..., parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def sslErrors(self, errors: typing.Iterable[QtNetwork.QSslError]) -> None: ... - def bytesWritten(self, bytes: int) -> None: ... - def pong(self, elapsedTime: int, payload: typing.Union[QtCore.QByteArray, bytes, bytearray]) -> None: ... - def binaryMessageReceived(self, message: typing.Union[QtCore.QByteArray, bytes, bytearray]) -> None: ... - def textMessageReceived(self, message: str) -> None: ... - def binaryFrameReceived(self, frame: typing.Union[QtCore.QByteArray, bytes, bytearray], isLastFrame: bool) -> None: ... - def textFrameReceived(self, frame: str, isLastFrame: bool) -> None: ... - def readChannelFinished(self) -> None: ... - def proxyAuthenticationRequired(self, proxy: QtNetwork.QNetworkProxy, pAuthenticator: QtNetwork.QAuthenticator) -> None: ... - def stateChanged(self, state: QtNetwork.QAbstractSocket.SocketState) -> None: ... - def disconnected(self) -> None: ... - def connected(self) -> None: ... - def aboutToClose(self) -> None: ... - def ping(self, payload: typing.Union[QtCore.QByteArray, bytes, bytearray] = ...) -> None: ... - @typing.overload - def open(self, url: QtCore.QUrl) -> None: ... - @typing.overload - def open(self, request: QtNetwork.QNetworkRequest) -> None: ... - def close(self, closeCode: 'QWebSocketProtocol.CloseCode' = ..., reason: str = ...) -> None: ... - def request(self) -> QtNetwork.QNetworkRequest: ... - def sslConfiguration(self) -> QtNetwork.QSslConfiguration: ... - def setSslConfiguration(self, sslConfiguration: QtNetwork.QSslConfiguration) -> None: ... - @typing.overload - def ignoreSslErrors(self, errors: typing.Iterable[QtNetwork.QSslError]) -> None: ... - @typing.overload - def ignoreSslErrors(self) -> None: ... - def sendBinaryMessage(self, data: typing.Union[QtCore.QByteArray, bytes, bytearray]) -> int: ... - def sendTextMessage(self, message: str) -> int: ... - def closeReason(self) -> str: ... - def closeCode(self) -> 'QWebSocketProtocol.CloseCode': ... - def origin(self) -> str: ... - def requestUrl(self) -> QtCore.QUrl: ... - def resourceName(self) -> str: ... - def version(self) -> 'QWebSocketProtocol.Version': ... - def state(self) -> QtNetwork.QAbstractSocket.SocketState: ... - def setPauseMode(self, pauseMode: typing.Union[QtNetwork.QAbstractSocket.PauseModes, QtNetwork.QAbstractSocket.PauseMode]) -> None: ... - def resume(self) -> None: ... - def setReadBufferSize(self, size: int) -> None: ... - def readBufferSize(self) -> int: ... - def maskGenerator(self) -> QMaskGenerator: ... - def setMaskGenerator(self, maskGenerator: QMaskGenerator) -> None: ... - def setProxy(self, networkProxy: QtNetwork.QNetworkProxy) -> None: ... - def proxy(self) -> QtNetwork.QNetworkProxy: ... - def peerPort(self) -> int: ... - def peerName(self) -> str: ... - def peerAddress(self) -> QtNetwork.QHostAddress: ... - def pauseMode(self) -> QtNetwork.QAbstractSocket.PauseModes: ... - def localPort(self) -> int: ... - def localAddress(self) -> QtNetwork.QHostAddress: ... - def isValid(self) -> bool: ... - def flush(self) -> bool: ... - def errorString(self) -> str: ... - @typing.overload - def error(self) -> QtNetwork.QAbstractSocket.SocketError: ... - @typing.overload - def error(self, error: QtNetwork.QAbstractSocket.SocketError) -> None: ... - def abort(self) -> None: ... - - -class QWebSocketCorsAuthenticator(sip.simplewrapper): - - @typing.overload - def __init__(self, origin: str) -> None: ... - @typing.overload - def __init__(self, other: 'QWebSocketCorsAuthenticator') -> None: ... - - def allowed(self) -> bool: ... - def setAllowed(self, allowed: bool) -> None: ... - def origin(self) -> str: ... - def swap(self, other: 'QWebSocketCorsAuthenticator') -> None: ... - - -class QWebSocketProtocol(sip.simplewrapper): - - class CloseCode(int): ... - CloseCodeNormal = ... # type: 'QWebSocketProtocol.CloseCode' - CloseCodeGoingAway = ... # type: 'QWebSocketProtocol.CloseCode' - CloseCodeProtocolError = ... # type: 'QWebSocketProtocol.CloseCode' - CloseCodeDatatypeNotSupported = ... # type: 'QWebSocketProtocol.CloseCode' - CloseCodeReserved1004 = ... # type: 'QWebSocketProtocol.CloseCode' - CloseCodeMissingStatusCode = ... # type: 'QWebSocketProtocol.CloseCode' - CloseCodeAbnormalDisconnection = ... # type: 'QWebSocketProtocol.CloseCode' - CloseCodeWrongDatatype = ... # type: 'QWebSocketProtocol.CloseCode' - CloseCodePolicyViolated = ... # type: 'QWebSocketProtocol.CloseCode' - CloseCodeTooMuchData = ... # type: 'QWebSocketProtocol.CloseCode' - CloseCodeMissingExtension = ... # type: 'QWebSocketProtocol.CloseCode' - CloseCodeBadOperation = ... # type: 'QWebSocketProtocol.CloseCode' - CloseCodeTlsHandshakeFailed = ... # type: 'QWebSocketProtocol.CloseCode' - - class Version(int): ... - VersionUnknown = ... # type: 'QWebSocketProtocol.Version' - Version0 = ... # type: 'QWebSocketProtocol.Version' - Version4 = ... # type: 'QWebSocketProtocol.Version' - Version5 = ... # type: 'QWebSocketProtocol.Version' - Version6 = ... # type: 'QWebSocketProtocol.Version' - Version7 = ... # type: 'QWebSocketProtocol.Version' - Version8 = ... # type: 'QWebSocketProtocol.Version' - Version13 = ... # type: 'QWebSocketProtocol.Version' - VersionLatest = ... # type: 'QWebSocketProtocol.Version' - - -class QWebSocketServer(QtCore.QObject): - - class SslMode(int): ... - SecureMode = ... # type: 'QWebSocketServer.SslMode' - NonSecureMode = ... # type: 'QWebSocketServer.SslMode' - - def __init__(self, serverName: str, secureMode: 'QWebSocketServer.SslMode', parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def closed(self) -> None: ... - def sslErrors(self, errors: typing.Iterable[QtNetwork.QSslError]) -> None: ... - def peerVerifyError(self, error: QtNetwork.QSslError) -> None: ... - def newConnection(self) -> None: ... - def originAuthenticationRequired(self, pAuthenticator: QWebSocketCorsAuthenticator) -> None: ... - def serverError(self, closeCode: QWebSocketProtocol.CloseCode) -> None: ... - def acceptError(self, socketError: QtNetwork.QAbstractSocket.SocketError) -> None: ... - def serverUrl(self) -> QtCore.QUrl: ... - def supportedVersions(self) -> typing.Any: ... - def sslConfiguration(self) -> QtNetwork.QSslConfiguration: ... - def setSslConfiguration(self, sslConfiguration: QtNetwork.QSslConfiguration) -> None: ... - def proxy(self) -> QtNetwork.QNetworkProxy: ... - def setProxy(self, networkProxy: QtNetwork.QNetworkProxy) -> None: ... - def serverName(self) -> str: ... - def setServerName(self, serverName: str) -> None: ... - def resumeAccepting(self) -> None: ... - def pauseAccepting(self) -> None: ... - def errorString(self) -> str: ... - def error(self) -> QWebSocketProtocol.CloseCode: ... - def nextPendingConnection(self) -> QWebSocket: ... - def hasPendingConnections(self) -> bool: ... - def socketDescriptor(self) -> int: ... - def setSocketDescriptor(self, socketDescriptor: int) -> bool: ... - def secureMode(self) -> 'QWebSocketServer.SslMode': ... - def serverAddress(self) -> QtNetwork.QHostAddress: ... - def serverPort(self) -> int: ... - def maxPendingConnections(self) -> int: ... - def setMaxPendingConnections(self, numConnections: int) -> None: ... - def isListening(self) -> bool: ... - def close(self) -> None: ... - def listen(self, address: typing.Union[QtNetwork.QHostAddress, QtNetwork.QHostAddress.SpecialAddress] = ..., port: int = ...) -> bool: ... diff -Nru uranium-3.3.0/stubs/PyQt5/QtWidgets.pyi uranium-4.4.1/stubs/PyQt5/QtWidgets.pyi --- uranium-3.3.0/stubs/PyQt5/QtWidgets.pyi 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/stubs/PyQt5/QtWidgets.pyi 1970-01-01 00:00:00.000000000 +0000 @@ -1,9660 +0,0 @@ -# The PEP 484 type hints stub file for the QtWidgets module. -# -# Generated by SIP 4.18.1 -# -# Copyright (c) 2016 Riverbank Computing Limited -# -# This file is part of PyQt5. -# -# This file may be used under the terms of the GNU General Public License -# version 3.0 as published by the Free Software Foundation and appearing in -# the file LICENSE included in the packaging of this file. Please review the -# following information to ensure the GNU General Public License version 3.0 -# requirements will be met: http://www.gnu.org/copyleft/gpl.html. -# -# If you do not wish to use this file under the terms of the GPL version 3.0 -# then you may purchase a commercial license. For more information contact -# info@riverbankcomputing.com. -# -# This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -# WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - - -import typing -import sip - -from PyQt5 import QtGui -from PyQt5 import QtCore - -# Support for QDate, QDateTime and QTime. -import datetime - -# Convenient type aliases. -PYQT_SIGNAL = typing.Union[QtCore.pyqtSignal, QtCore.pyqtBoundSignal] -PYQT_SLOT = typing.Union[typing.Callable[..., None], QtCore.pyqtBoundSignal] - -# Convenient aliases for complicated OpenGL types. -PYQT_OPENGL_ARRAY = typing.Union[typing.Sequence[int], typing.Sequence[float], - sip.Buffer, None] -PYQT_OPENGL_BOUND_ARRAY = typing.Union[typing.Sequence[int], - typing.Sequence[float], sip.Buffer, int, None] - - -class QWidget(QtCore.QObject, QtGui.QPaintDevice): - - class RenderFlag(int): ... - DrawWindowBackground = ... # type: 'QWidget.RenderFlag' - DrawChildren = ... # type: 'QWidget.RenderFlag' - IgnoreMask = ... # type: 'QWidget.RenderFlag' - - class RenderFlags(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QWidget.RenderFlags', 'QWidget.RenderFlag']) -> None: ... - @typing.overload - def __init__(self, a0: 'QWidget.RenderFlags') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QWidget.RenderFlags': ... - def __int__(self) -> int: ... - - def __init__(self, parent: typing.Optional['QWidget'] = ..., flags: typing.Union[QtCore.Qt.WindowFlags, QtCore.Qt.WindowType] = ...) -> None: ... - - def windowIconTextChanged(self, iconText: str) -> None: ... - def windowIconChanged(self, icon: QtGui.QIcon) -> None: ... - def windowTitleChanged(self, title: str) -> None: ... - def toolTipDuration(self) -> int: ... - def setToolTipDuration(self, msec: int) -> None: ... - def initPainter(self, painter: QtGui.QPainter) -> None: ... - def sharedPainter(self) -> QtGui.QPainter: ... - def nativeEvent(self, eventType: typing.Union[QtCore.QByteArray, bytes, bytearray], message: sip.voidptr) -> typing.Tuple[bool, int]: ... - def windowHandle(self) -> QtGui.QWindow: ... - @staticmethod - def createWindowContainer(window: QtGui.QWindow, parent: typing.Optional['QWidget'] = ..., flags: typing.Union[QtCore.Qt.WindowFlags, QtCore.Qt.WindowType] = ...) -> 'QWidget': ... - def grab(self, rectangle: QtCore.QRect = ...) -> QtGui.QPixmap: ... - def hasHeightForWidth(self) -> bool: ... - def setInputMethodHints(self, hints: typing.Union[QtCore.Qt.InputMethodHints, QtCore.Qt.InputMethodHint]) -> None: ... - def inputMethodHints(self) -> QtCore.Qt.InputMethodHints: ... - def previousInFocusChain(self) -> 'QWidget': ... - def contentsMargins(self) -> QtCore.QMargins: ... - def ungrabGesture(self, type: QtCore.Qt.GestureType) -> None: ... - def grabGesture(self, type: QtCore.Qt.GestureType, flags: typing.Union[QtCore.Qt.GestureFlags, QtCore.Qt.GestureFlag] = ...) -> None: ... - def setGraphicsEffect(self, effect: 'QGraphicsEffect') -> None: ... - def graphicsEffect(self) -> 'QGraphicsEffect': ... - def graphicsProxyWidget(self) -> 'QGraphicsProxyWidget': ... - def windowFilePath(self) -> str: ... - def setWindowFilePath(self, filePath: str) -> None: ... - def nativeParentWidget(self) -> 'QWidget': ... - def effectiveWinId(self) -> sip.voidptr: ... - def unsetLocale(self) -> None: ... - def locale(self) -> QtCore.QLocale: ... - def setLocale(self, locale: QtCore.QLocale) -> None: ... - @typing.overload - def render(self, target: QtGui.QPaintDevice, targetOffset: QtCore.QPoint = ..., sourceRegion: QtGui.QRegion = ..., flags: typing.Union['QWidget.RenderFlags', 'QWidget.RenderFlag'] = ...) -> None: ... - @typing.overload - def render(self, painter: QtGui.QPainter, targetOffset: QtCore.QPoint = ..., sourceRegion: QtGui.QRegion = ..., flags: typing.Union['QWidget.RenderFlags', 'QWidget.RenderFlag'] = ...) -> None: ... - def restoreGeometry(self, geometry: typing.Union[QtCore.QByteArray, bytes, bytearray]) -> bool: ... - def saveGeometry(self) -> QtCore.QByteArray: ... - def setShortcutAutoRepeat(self, id: int, enabled: bool = ...) -> None: ... - def styleSheet(self) -> str: ... - def setStyleSheet(self, styleSheet: str) -> None: ... - def setAutoFillBackground(self, enabled: bool) -> None: ... - def autoFillBackground(self) -> bool: ... - def setWindowModality(self, windowModality: QtCore.Qt.WindowModality) -> None: ... - def windowModality(self) -> QtCore.Qt.WindowModality: ... - def testAttribute(self, attribute: QtCore.Qt.WidgetAttribute) -> bool: ... - def parentWidget(self) -> 'QWidget': ... - def height(self) -> int: ... - def width(self) -> int: ... - def size(self) -> QtCore.QSize: ... - def geometry(self) -> QtCore.QRect: ... - def rect(self) -> QtCore.QRect: ... - def isHidden(self) -> bool: ... - def isVisible(self) -> bool: ... - def updatesEnabled(self) -> bool: ... - def underMouse(self) -> bool: ... - def hasMouseTracking(self) -> bool: ... - def setMouseTracking(self, enable: bool) -> None: ... - def fontInfo(self) -> QtGui.QFontInfo: ... - def fontMetrics(self) -> QtGui.QFontMetrics: ... - def font(self) -> QtGui.QFont: ... - def maximumHeight(self) -> int: ... - def maximumWidth(self) -> int: ... - def minimumHeight(self) -> int: ... - def minimumWidth(self) -> int: ... - def isModal(self) -> bool: ... - def isEnabled(self) -> bool: ... - def isWindow(self) -> bool: ... - def winId(self) -> sip.voidptr: ... - def windowFlags(self) -> QtCore.Qt.WindowFlags: ... - def windowType(self) -> QtCore.Qt.WindowType: ... - def focusPreviousChild(self) -> bool: ... - def focusNextChild(self) -> bool: ... - def focusNextPrevChild(self, next: bool) -> bool: ... - def destroy(self, destroyWindow: bool = ..., destroySubWindows: bool = ...) -> None: ... - def create(self, window: sip.voidptr = ..., initializeWindow: bool = ..., destroyOldWindow: bool = ...) -> None: ... - def updateMicroFocus(self) -> None: ... - def inputMethodQuery(self, a0: QtCore.Qt.InputMethodQuery) -> typing.Any: ... - def inputMethodEvent(self, a0: QtGui.QInputMethodEvent) -> None: ... - def metric(self, a0: QtGui.QPaintDevice.PaintDeviceMetric) -> int: ... - def changeEvent(self, a0: QtCore.QEvent) -> None: ... - def hideEvent(self, a0: QtGui.QHideEvent) -> None: ... - def showEvent(self, a0: QtGui.QShowEvent) -> None: ... - def dropEvent(self, a0: QtGui.QDropEvent) -> None: ... - def dragLeaveEvent(self, a0: QtGui.QDragLeaveEvent) -> None: ... - def dragMoveEvent(self, a0: QtGui.QDragMoveEvent) -> None: ... - def dragEnterEvent(self, a0: QtGui.QDragEnterEvent) -> None: ... - def actionEvent(self, a0: QtGui.QActionEvent) -> None: ... - def tabletEvent(self, a0: QtGui.QTabletEvent) -> None: ... - def contextMenuEvent(self, a0: QtGui.QContextMenuEvent) -> None: ... - def closeEvent(self, a0: QtGui.QCloseEvent) -> None: ... - def resizeEvent(self, a0: QtGui.QResizeEvent) -> None: ... - def moveEvent(self, a0: QtGui.QMoveEvent) -> None: ... - def paintEvent(self, a0: QtGui.QPaintEvent) -> None: ... - def leaveEvent(self, a0: QtCore.QEvent) -> None: ... - def enterEvent(self, a0: QtCore.QEvent) -> None: ... - def focusOutEvent(self, a0: QtGui.QFocusEvent) -> None: ... - def focusInEvent(self, a0: QtGui.QFocusEvent) -> None: ... - def keyReleaseEvent(self, a0: QtGui.QKeyEvent) -> None: ... - def keyPressEvent(self, a0: QtGui.QKeyEvent) -> None: ... - def wheelEvent(self, a0: QtGui.QWheelEvent) -> None: ... - def mouseMoveEvent(self, a0: QtGui.QMouseEvent) -> None: ... - def mouseDoubleClickEvent(self, a0: QtGui.QMouseEvent) -> None: ... - def mouseReleaseEvent(self, a0: QtGui.QMouseEvent) -> None: ... - def mousePressEvent(self, a0: QtGui.QMouseEvent) -> None: ... - def event(self, a0: QtCore.QEvent) -> bool: ... - def customContextMenuRequested(self, pos: QtCore.QPoint) -> None: ... - def isAncestorOf(self, child: 'QWidget') -> bool: ... - def ensurePolished(self) -> None: ... - def paintEngine(self) -> QtGui.QPaintEngine: ... - def setAttribute(self, attribute: QtCore.Qt.WidgetAttribute, on: bool = ...) -> None: ... - @typing.overload - def childAt(self, p: QtCore.QPoint) -> 'QWidget': ... - @typing.overload - def childAt(self, ax: int, ay: int) -> 'QWidget': ... - @staticmethod - # def find(a0: sip.voidptr) -> 'QWidget': ... - def overrideWindowFlags(self, type: typing.Union[QtCore.Qt.WindowFlags, QtCore.Qt.WindowType]) -> None: ... - def setWindowFlags(self, type: typing.Union[QtCore.Qt.WindowFlags, QtCore.Qt.WindowType]) -> None: ... - def actions(self) -> typing.List['QAction']: ... - def removeAction(self, action: 'QAction') -> None: ... - def insertActions(self, before: 'QAction', actions: typing.Iterable['QAction']) -> None: ... - def insertAction(self, before: 'QAction', action: 'QAction') -> None: ... - def addActions(self, actions: typing.Any) -> None: ... - def addAction(self, action: 'QAction') -> None: ... - def setAcceptDrops(self, on: bool) -> None: ... - def acceptDrops(self) -> bool: ... - def nextInFocusChain(self) -> 'QWidget': ... - def focusWidget(self) -> 'QWidget': ... - @typing.overload - def scroll(self, dx: int, dy: int) -> None: ... - @typing.overload - def scroll(self, dx: int, dy: int, a2: QtCore.QRect) -> None: ... - # @typing.overload - # def setParent(self, parent: 'QWidget') -> None: ... - # @typing.overload - # def setParent(self, parent: 'QWidget', f: typing.Union[QtCore.Qt.WindowFlags, QtCore.Qt.WindowType]) -> None: ... - def updateGeometry(self) -> None: ... - def setLayout(self, a0: 'QLayout') -> None: ... - def layout(self) -> 'QLayout': ... - def contentsRect(self) -> QtCore.QRect: ... - def getContentsMargins(self) -> typing.Tuple[int, int, int, int]: ... - @typing.overload - def setContentsMargins(self, left: int, top: int, right: int, bottom: int) -> None: ... - @typing.overload - def setContentsMargins(self, margins: QtCore.QMargins) -> None: ... - def visibleRegion(self) -> QtGui.QRegion: ... - def heightForWidth(self, a0: int) -> int: ... - @typing.overload - def setSizePolicy(self, a0: 'QSizePolicy') -> None: ... - @typing.overload - def setSizePolicy(self, hor: 'QSizePolicy.Policy', ver: 'QSizePolicy.Policy') -> None: ... - def sizePolicy(self) -> 'QSizePolicy': ... - def minimumSizeHint(self) -> QtCore.QSize: ... - def sizeHint(self) -> QtCore.QSize: ... - def overrideWindowState(self, state: typing.Union[QtCore.Qt.WindowStates, QtCore.Qt.WindowState]) -> None: ... - def setWindowState(self, state: typing.Union[QtCore.Qt.WindowStates, QtCore.Qt.WindowState]) -> None: ... - def windowState(self) -> QtCore.Qt.WindowStates: ... - def isFullScreen(self) -> bool: ... - def isMaximized(self) -> bool: ... - def isMinimized(self) -> bool: ... - def isVisibleTo(self, a0: 'QWidget') -> bool: ... - def adjustSize(self) -> None: ... - @typing.overload - def setGeometry(self, a0: QtCore.QRect) -> None: ... - @typing.overload - def setGeometry(self, ax: int, ay: int, aw: int, ah: int) -> None: ... - @typing.overload - def resize(self, a0: QtCore.QSize) -> None: ... - @typing.overload - def resize(self, w: int, h: int) -> None: ... - @typing.overload - def move(self, a0: QtCore.QPoint) -> None: ... - @typing.overload - def move(self, ax: int, ay: int) -> None: ... - def stackUnder(self, a0: 'QWidget') -> None: ... - def lower(self) -> None: ... - def raise_(self) -> None: ... - def close(self) -> bool: ... - def showNormal(self) -> None: ... - def showFullScreen(self) -> None: ... - def showMaximized(self) -> None: ... - def showMinimized(self) -> None: ... - def hide(self) -> None: ... - def show(self) -> None: ... - def setHidden(self, hidden: bool) -> None: ... - def setVisible(self, visible: bool) -> None: ... - @typing.overload - def repaint(self) -> None: ... - @typing.overload - def repaint(self, x: int, y: int, w: int, h: int) -> None: ... - @typing.overload - def repaint(self, a0: QtCore.QRect) -> None: ... - @typing.overload - def repaint(self, a0: QtGui.QRegion) -> None: ... - @typing.overload - def update(self) -> None: ... - @typing.overload - def update(self, a0: QtCore.QRect) -> None: ... - @typing.overload - def update(self, a0: QtGui.QRegion) -> None: ... - @typing.overload - def update(self, ax: int, ay: int, aw: int, ah: int) -> None: ... - def setUpdatesEnabled(self, enable: bool) -> None: ... - @staticmethod - def keyboardGrabber() -> 'QWidget': ... - @staticmethod - def mouseGrabber() -> 'QWidget': ... - def setShortcutEnabled(self, id: int, enabled: bool = ...) -> None: ... - def releaseShortcut(self, id: int) -> None: ... - def grabShortcut(self, key: typing.Union[QtGui.QKeySequence, QtGui.QKeySequence.StandardKey, str, int], context: QtCore.Qt.ShortcutContext = ...) -> int: ... - def releaseKeyboard(self) -> None: ... - def grabKeyboard(self) -> None: ... - def releaseMouse(self) -> None: ... - @typing.overload - def grabMouse(self) -> None: ... - @typing.overload - def grabMouse(self, a0: typing.Union[QtGui.QCursor, QtCore.Qt.CursorShape]) -> None: ... - def setContextMenuPolicy(self, policy: QtCore.Qt.ContextMenuPolicy) -> None: ... - def contextMenuPolicy(self) -> QtCore.Qt.ContextMenuPolicy: ... - def focusProxy(self) -> 'QWidget': ... - def setFocusProxy(self, a0: 'QWidget') -> None: ... - @staticmethod - def setTabOrder(a0: 'QWidget', a1: 'QWidget') -> None: ... - def hasFocus(self) -> bool: ... - def setFocusPolicy(self, policy: QtCore.Qt.FocusPolicy) -> None: ... - def focusPolicy(self) -> QtCore.Qt.FocusPolicy: ... - def clearFocus(self) -> None: ... - def activateWindow(self) -> None: ... - def isActiveWindow(self) -> bool: ... - @typing.overload - def setFocus(self) -> None: ... - @typing.overload - def setFocus(self, reason: QtCore.Qt.FocusReason) -> None: ... - def isLeftToRight(self) -> bool: ... - def isRightToLeft(self) -> bool: ... - def unsetLayoutDirection(self) -> None: ... - def layoutDirection(self) -> QtCore.Qt.LayoutDirection: ... - def setLayoutDirection(self, direction: QtCore.Qt.LayoutDirection) -> None: ... - def setAccessibleDescription(self, description: str) -> None: ... - def accessibleDescription(self) -> str: ... - def setAccessibleName(self, name: str) -> None: ... - def accessibleName(self) -> str: ... - def whatsThis(self) -> str: ... - def setWhatsThis(self, a0: str) -> None: ... - def statusTip(self) -> str: ... - def setStatusTip(self, a0: str) -> None: ... - def toolTip(self) -> str: ... - def setToolTip(self, a0: str) -> None: ... - def isWindowModified(self) -> bool: ... - def windowOpacity(self) -> float: ... - def setWindowOpacity(self, level: float) -> None: ... - def windowRole(self) -> str: ... - def setWindowRole(self, a0: str) -> None: ... - def windowIconText(self) -> str: ... - def setWindowIconText(self, a0: str) -> None: ... - def windowIcon(self) -> QtGui.QIcon: ... - def setWindowIcon(self, icon: QtGui.QIcon) -> None: ... - def windowTitle(self) -> str: ... - def setWindowTitle(self, a0: str) -> None: ... - def clearMask(self) -> None: ... - def mask(self) -> QtGui.QRegion: ... - @typing.overload - def setMask(self, a0: QtGui.QBitmap) -> None: ... - @typing.overload - def setMask(self, a0: QtGui.QRegion) -> None: ... - def unsetCursor(self) -> None: ... - def setCursor(self, a0: typing.Union[QtGui.QCursor, QtCore.Qt.CursorShape]) -> None: ... - def cursor(self) -> QtGui.QCursor: ... - def setFont(self, a0: QtGui.QFont) -> None: ... - def foregroundRole(self) -> QtGui.QPalette.ColorRole: ... - def setForegroundRole(self, a0: QtGui.QPalette.ColorRole) -> None: ... - def backgroundRole(self) -> QtGui.QPalette.ColorRole: ... - def setBackgroundRole(self, a0: QtGui.QPalette.ColorRole) -> None: ... - def setPalette(self, a0: QtGui.QPalette) -> None: ... - def palette(self) -> QtGui.QPalette: ... - def window(self) -> 'QWidget': ... - def mapFrom(self, a0: 'QWidget', a1: QtCore.QPoint) -> QtCore.QPoint: ... - def mapTo(self, a0: 'QWidget', a1: QtCore.QPoint) -> QtCore.QPoint: ... - def mapFromParent(self, a0: QtCore.QPoint) -> QtCore.QPoint: ... - def mapToParent(self, a0: QtCore.QPoint) -> QtCore.QPoint: ... - def mapFromGlobal(self, a0: QtCore.QPoint) -> QtCore.QPoint: ... - def mapToGlobal(self, a0: QtCore.QPoint) -> QtCore.QPoint: ... - def setFixedHeight(self, h: int) -> None: ... - def setFixedWidth(self, w: int) -> None: ... - @typing.overload - def setFixedSize(self, a0: QtCore.QSize) -> None: ... - @typing.overload - def setFixedSize(self, w: int, h: int) -> None: ... - @typing.overload - def setBaseSize(self, basew: int, baseh: int) -> None: ... - @typing.overload - def setBaseSize(self, s: QtCore.QSize) -> None: ... - def baseSize(self) -> QtCore.QSize: ... - @typing.overload - def setSizeIncrement(self, w: int, h: int) -> None: ... - @typing.overload - def setSizeIncrement(self, s: QtCore.QSize) -> None: ... - def sizeIncrement(self) -> QtCore.QSize: ... - def setMaximumHeight(self, maxh: int) -> None: ... - def setMaximumWidth(self, maxw: int) -> None: ... - def setMinimumHeight(self, minh: int) -> None: ... - def setMinimumWidth(self, minw: int) -> None: ... - @typing.overload - def setMaximumSize(self, maxw: int, maxh: int) -> None: ... - @typing.overload - def setMaximumSize(self, s: QtCore.QSize) -> None: ... - @typing.overload - def setMinimumSize(self, minw: int, minh: int) -> None: ... - @typing.overload - def setMinimumSize(self, s: QtCore.QSize) -> None: ... - def maximumSize(self) -> QtCore.QSize: ... - def minimumSize(self) -> QtCore.QSize: ... - def childrenRegion(self) -> QtGui.QRegion: ... - def childrenRect(self) -> QtCore.QRect: ... - def frameSize(self) -> QtCore.QSize: ... - def pos(self) -> QtCore.QPoint: ... - def y(self) -> int: ... - def x(self) -> int: ... - def normalGeometry(self) -> QtCore.QRect: ... - def frameGeometry(self) -> QtCore.QRect: ... - def setWindowModified(self, a0: bool) -> None: ... - def setDisabled(self, a0: bool) -> None: ... - def setEnabled(self, a0: bool) -> None: ... - def isEnabledTo(self, a0: 'QWidget') -> bool: ... - def setStyle(self, a0: 'QStyle') -> None: ... - def style(self) -> 'QStyle': ... - def devType(self) -> int: ... - - -class QAbstractButton(QWidget): - - def __init__(self, parent: typing.Optional[QWidget] = ...) -> None: ... - - def timerEvent(self, e: QtCore.QTimerEvent) -> None: ... - def changeEvent(self, e: QtCore.QEvent) -> None: ... - def focusOutEvent(self, e: QtGui.QFocusEvent) -> None: ... - def focusInEvent(self, e: QtGui.QFocusEvent) -> None: ... - def mouseMoveEvent(self, e: QtGui.QMouseEvent) -> None: ... - def mouseReleaseEvent(self, e: QtGui.QMouseEvent) -> None: ... - def mousePressEvent(self, e: QtGui.QMouseEvent) -> None: ... - def keyReleaseEvent(self, e: QtGui.QKeyEvent) -> None: ... - def keyPressEvent(self, e: QtGui.QKeyEvent) -> None: ... - def event(self, e: QtCore.QEvent) -> bool: ... - def nextCheckState(self) -> None: ... - def checkStateSet(self) -> None: ... - def hitButton(self, pos: QtCore.QPoint) -> bool: ... - def paintEvent(self, e: QtGui.QPaintEvent) -> None: ... - def toggled(self, checked: bool) -> None: ... - def clicked(self, checked: bool = ...) -> None: ... - def released(self) -> None: ... - def pressed(self) -> None: ... - def setChecked(self, a0: bool) -> None: ... - def toggle(self) -> None: ... - def click(self) -> None: ... - def animateClick(self, msecs: int = ...) -> None: ... - def setIconSize(self, size: QtCore.QSize) -> None: ... - def group(self) -> 'QButtonGroup': ... - def autoExclusive(self) -> bool: ... - def setAutoExclusive(self, a0: bool) -> None: ... - def autoRepeat(self) -> bool: ... - def setAutoRepeat(self, a0: bool) -> None: ... - def isDown(self) -> bool: ... - def setDown(self, a0: bool) -> None: ... - def isChecked(self) -> bool: ... - def isCheckable(self) -> bool: ... - def setCheckable(self, a0: bool) -> None: ... - def shortcut(self) -> QtGui.QKeySequence: ... - def setShortcut(self, key: typing.Union[QtGui.QKeySequence, QtGui.QKeySequence.StandardKey, str, int]) -> None: ... - def iconSize(self) -> QtCore.QSize: ... - def icon(self) -> QtGui.QIcon: ... - def setIcon(self, icon: QtGui.QIcon) -> None: ... - def text(self) -> str: ... - def setText(self, text: str) -> None: ... - def autoRepeatInterval(self) -> int: ... - def setAutoRepeatInterval(self, a0: int) -> None: ... - def autoRepeatDelay(self) -> int: ... - def setAutoRepeatDelay(self, a0: int) -> None: ... - - -class QAbstractItemDelegate(QtCore.QObject): - - class EndEditHint(int): ... - NoHint = ... # type: 'QAbstractItemDelegate.EndEditHint' - EditNextItem = ... # type: 'QAbstractItemDelegate.EndEditHint' - EditPreviousItem = ... # type: 'QAbstractItemDelegate.EndEditHint' - SubmitModelCache = ... # type: 'QAbstractItemDelegate.EndEditHint' - RevertModelCache = ... # type: 'QAbstractItemDelegate.EndEditHint' - - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def sizeHintChanged(self, a0: QtCore.QModelIndex) -> None: ... - def closeEditor(self, editor: QWidget, hint: 'QAbstractItemDelegate.EndEditHint' = ...) -> None: ... - def commitData(self, editor: QWidget) -> None: ... - def helpEvent(self, event: QtGui.QHelpEvent, view: 'QAbstractItemView', option: 'QStyleOptionViewItem', index: QtCore.QModelIndex) -> bool: ... - def editorEvent(self, event: QtCore.QEvent, model: QtCore.QAbstractItemModel, option: 'QStyleOptionViewItem', index: QtCore.QModelIndex) -> bool: ... - def destroyEditor(self, editor: QWidget, index: QtCore.QModelIndex) -> None: ... - def updateEditorGeometry(self, editor: QWidget, option: 'QStyleOptionViewItem', index: QtCore.QModelIndex) -> None: ... - def setModelData(self, editor: QWidget, model: QtCore.QAbstractItemModel, index: QtCore.QModelIndex) -> None: ... - def setEditorData(self, editor: QWidget, index: QtCore.QModelIndex) -> None: ... - def createEditor(self, parent: QWidget, option: 'QStyleOptionViewItem', index: QtCore.QModelIndex) -> QWidget: ... - def sizeHint(self, option: 'QStyleOptionViewItem', index: QtCore.QModelIndex) -> QtCore.QSize: ... - def paint(self, painter: QtGui.QPainter, option: 'QStyleOptionViewItem', index: QtCore.QModelIndex) -> None: ... - - -class QFrame(QWidget): - - class StyleMask(int): ... - Shadow_Mask = ... # type: 'QFrame.StyleMask' - Shape_Mask = ... # type: 'QFrame.StyleMask' - - class Shape(int): ... - NoFrame = ... # type: 'QFrame.Shape' - Box = ... # type: 'QFrame.Shape' - Panel = ... # type: 'QFrame.Shape' - WinPanel = ... # type: 'QFrame.Shape' - HLine = ... # type: 'QFrame.Shape' - VLine = ... # type: 'QFrame.Shape' - StyledPanel = ... # type: 'QFrame.Shape' - - class Shadow(int): ... - Plain = ... # type: 'QFrame.Shadow' - Raised = ... # type: 'QFrame.Shadow' - Sunken = ... # type: 'QFrame.Shadow' - - def __init__(self, parent: typing.Optional[QWidget] = ..., flags: typing.Union[QtCore.Qt.WindowFlags, QtCore.Qt.WindowType] = ...) -> None: ... - - def initStyleOption(self, option: 'QStyleOptionFrame') -> None: ... - def drawFrame(self, a0: QtGui.QPainter) -> None: ... - def changeEvent(self, a0: QtCore.QEvent) -> None: ... - def paintEvent(self, a0: QtGui.QPaintEvent) -> None: ... - def event(self, e: QtCore.QEvent) -> bool: ... - def setFrameRect(self, a0: QtCore.QRect) -> None: ... - def frameRect(self) -> QtCore.QRect: ... - def setMidLineWidth(self, a0: int) -> None: ... - def midLineWidth(self) -> int: ... - def setLineWidth(self, a0: int) -> None: ... - def lineWidth(self) -> int: ... - def setFrameShadow(self, a0: 'QFrame.Shadow') -> None: ... - def frameShadow(self) -> 'QFrame.Shadow': ... - def setFrameShape(self, a0: 'QFrame.Shape') -> None: ... - def frameShape(self) -> 'QFrame.Shape': ... - def sizeHint(self) -> QtCore.QSize: ... - def frameWidth(self) -> int: ... - def setFrameStyle(self, a0: int) -> None: ... - def frameStyle(self) -> int: ... - - -class QAbstractScrollArea(QFrame): - - class SizeAdjustPolicy(int): ... - AdjustIgnored = ... # type: 'QAbstractScrollArea.SizeAdjustPolicy' - AdjustToContentsOnFirstShow = ... # type: 'QAbstractScrollArea.SizeAdjustPolicy' - AdjustToContents = ... # type: 'QAbstractScrollArea.SizeAdjustPolicy' - - def __init__(self, parent: typing.Optional[QWidget] = ...) -> None: ... - - def setSizeAdjustPolicy(self, policy: 'QAbstractScrollArea.SizeAdjustPolicy') -> None: ... - def sizeAdjustPolicy(self) -> 'QAbstractScrollArea.SizeAdjustPolicy': ... - def setupViewport(self, viewport: QWidget) -> None: ... - def setViewport(self, widget: QWidget) -> None: ... - def scrollBarWidgets(self, alignment: typing.Union[QtCore.Qt.Alignment, QtCore.Qt.AlignmentFlag]) -> typing.Any: ... - def addScrollBarWidget(self, widget: QWidget, alignment: typing.Union[QtCore.Qt.Alignment, QtCore.Qt.AlignmentFlag]) -> None: ... - def setCornerWidget(self, widget: QWidget) -> None: ... - def cornerWidget(self) -> QWidget: ... - def setHorizontalScrollBar(self, scrollbar: 'QScrollBar') -> None: ... - def setVerticalScrollBar(self, scrollbar: 'QScrollBar') -> None: ... - def scrollContentsBy(self, dx: int, dy: int) -> None: ... - def eventFilter(self, a0: QtCore.QObject, a1: QtCore.QEvent) -> bool: ... - def keyPressEvent(self, a0: QtGui.QKeyEvent) -> None: ... - def dropEvent(self, a0: QtGui.QDropEvent) -> None: ... - def dragLeaveEvent(self, a0: QtGui.QDragLeaveEvent) -> None: ... - def dragMoveEvent(self, a0: QtGui.QDragMoveEvent) -> None: ... - def dragEnterEvent(self, a0: QtGui.QDragEnterEvent) -> None: ... - def contextMenuEvent(self, a0: QtGui.QContextMenuEvent) -> None: ... - def wheelEvent(self, a0: QtGui.QWheelEvent) -> None: ... - def mouseMoveEvent(self, a0: QtGui.QMouseEvent) -> None: ... - def mouseDoubleClickEvent(self, a0: QtGui.QMouseEvent) -> None: ... - def mouseReleaseEvent(self, a0: QtGui.QMouseEvent) -> None: ... - def mousePressEvent(self, a0: QtGui.QMouseEvent) -> None: ... - def paintEvent(self, a0: QtGui.QPaintEvent) -> None: ... - def resizeEvent(self, a0: QtGui.QResizeEvent) -> None: ... - def viewportEvent(self, a0: QtCore.QEvent) -> bool: ... - def event(self, a0: QtCore.QEvent) -> bool: ... - def viewportSizeHint(self) -> QtCore.QSize: ... - def viewportMargins(self) -> QtCore.QMargins: ... - @typing.overload - def setViewportMargins(self, left: int, top: int, right: int, bottom: int) -> None: ... - @typing.overload - def setViewportMargins(self, margins: QtCore.QMargins) -> None: ... - def sizeHint(self) -> QtCore.QSize: ... - def minimumSizeHint(self) -> QtCore.QSize: ... - def maximumViewportSize(self) -> QtCore.QSize: ... - def viewport(self) -> QWidget: ... - def horizontalScrollBar(self) -> 'QScrollBar': ... - def setHorizontalScrollBarPolicy(self, a0: QtCore.Qt.ScrollBarPolicy) -> None: ... - def horizontalScrollBarPolicy(self) -> QtCore.Qt.ScrollBarPolicy: ... - def verticalScrollBar(self) -> 'QScrollBar': ... - def setVerticalScrollBarPolicy(self, a0: QtCore.Qt.ScrollBarPolicy) -> None: ... - def verticalScrollBarPolicy(self) -> QtCore.Qt.ScrollBarPolicy: ... - - -class QAbstractItemView(QAbstractScrollArea): - - class DropIndicatorPosition(int): ... - OnItem = ... # type: 'QAbstractItemView.DropIndicatorPosition' - AboveItem = ... # type: 'QAbstractItemView.DropIndicatorPosition' - BelowItem = ... # type: 'QAbstractItemView.DropIndicatorPosition' - OnViewport = ... # type: 'QAbstractItemView.DropIndicatorPosition' - - class State(int): ... - NoState = ... # type: 'QAbstractItemView.State' - DraggingState = ... # type: 'QAbstractItemView.State' - DragSelectingState = ... # type: 'QAbstractItemView.State' - EditingState = ... # type: 'QAbstractItemView.State' - ExpandingState = ... # type: 'QAbstractItemView.State' - CollapsingState = ... # type: 'QAbstractItemView.State' - AnimatingState = ... # type: 'QAbstractItemView.State' - - class CursorAction(int): ... - MoveUp = ... # type: 'QAbstractItemView.CursorAction' - MoveDown = ... # type: 'QAbstractItemView.CursorAction' - MoveLeft = ... # type: 'QAbstractItemView.CursorAction' - MoveRight = ... # type: 'QAbstractItemView.CursorAction' - MoveHome = ... # type: 'QAbstractItemView.CursorAction' - MoveEnd = ... # type: 'QAbstractItemView.CursorAction' - MovePageUp = ... # type: 'QAbstractItemView.CursorAction' - MovePageDown = ... # type: 'QAbstractItemView.CursorAction' - MoveNext = ... # type: 'QAbstractItemView.CursorAction' - MovePrevious = ... # type: 'QAbstractItemView.CursorAction' - - class SelectionMode(int): ... - NoSelection = ... # type: 'QAbstractItemView.SelectionMode' - SingleSelection = ... # type: 'QAbstractItemView.SelectionMode' - MultiSelection = ... # type: 'QAbstractItemView.SelectionMode' - ExtendedSelection = ... # type: 'QAbstractItemView.SelectionMode' - ContiguousSelection = ... # type: 'QAbstractItemView.SelectionMode' - - class SelectionBehavior(int): ... - SelectItems = ... # type: 'QAbstractItemView.SelectionBehavior' - SelectRows = ... # type: 'QAbstractItemView.SelectionBehavior' - SelectColumns = ... # type: 'QAbstractItemView.SelectionBehavior' - - class ScrollMode(int): ... - ScrollPerItem = ... # type: 'QAbstractItemView.ScrollMode' - ScrollPerPixel = ... # type: 'QAbstractItemView.ScrollMode' - - class ScrollHint(int): ... - EnsureVisible = ... # type: 'QAbstractItemView.ScrollHint' - PositionAtTop = ... # type: 'QAbstractItemView.ScrollHint' - PositionAtBottom = ... # type: 'QAbstractItemView.ScrollHint' - PositionAtCenter = ... # type: 'QAbstractItemView.ScrollHint' - - class EditTrigger(int): ... - NoEditTriggers = ... # type: 'QAbstractItemView.EditTrigger' - CurrentChanged = ... # type: 'QAbstractItemView.EditTrigger' - DoubleClicked = ... # type: 'QAbstractItemView.EditTrigger' - SelectedClicked = ... # type: 'QAbstractItemView.EditTrigger' - EditKeyPressed = ... # type: 'QAbstractItemView.EditTrigger' - AnyKeyPressed = ... # type: 'QAbstractItemView.EditTrigger' - AllEditTriggers = ... # type: 'QAbstractItemView.EditTrigger' - - class DragDropMode(int): ... - NoDragDrop = ... # type: 'QAbstractItemView.DragDropMode' - DragOnly = ... # type: 'QAbstractItemView.DragDropMode' - DropOnly = ... # type: 'QAbstractItemView.DragDropMode' - DragDrop = ... # type: 'QAbstractItemView.DragDropMode' - InternalMove = ... # type: 'QAbstractItemView.DragDropMode' - - class EditTriggers(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QAbstractItemView.EditTriggers', 'QAbstractItemView.EditTrigger']) -> None: ... - @typing.overload - def __init__(self, a0: 'QAbstractItemView.EditTriggers') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QAbstractItemView.EditTriggers': ... - def __int__(self) -> int: ... - - def __init__(self, parent: typing.Optional[QWidget] = ...) -> None: ... - - def resetHorizontalScrollMode(self) -> None: ... - def resetVerticalScrollMode(self) -> None: ... - def defaultDropAction(self) -> QtCore.Qt.DropAction: ... - def setDefaultDropAction(self, dropAction: QtCore.Qt.DropAction) -> None: ... - def viewportSizeHint(self) -> QtCore.QSize: ... - def inputMethodEvent(self, event: QtGui.QInputMethodEvent) -> None: ... - def focusNextPrevChild(self, next: bool) -> bool: ... - def autoScrollMargin(self) -> int: ... - def setAutoScrollMargin(self, margin: int) -> None: ... - def inputMethodQuery(self, query: QtCore.Qt.InputMethodQuery) -> typing.Any: ... - def itemDelegateForColumn(self, column: int) -> QAbstractItemDelegate: ... - def setItemDelegateForColumn(self, column: int, delegate: QAbstractItemDelegate) -> None: ... - def itemDelegateForRow(self, row: int) -> QAbstractItemDelegate: ... - def setItemDelegateForRow(self, row: int, delegate: QAbstractItemDelegate) -> None: ... - def dragDropMode(self) -> 'QAbstractItemView.DragDropMode': ... - def setDragDropMode(self, behavior: 'QAbstractItemView.DragDropMode') -> None: ... - def dragDropOverwriteMode(self) -> bool: ... - def setDragDropOverwriteMode(self, overwrite: bool) -> None: ... - def horizontalScrollMode(self) -> 'QAbstractItemView.ScrollMode': ... - def setHorizontalScrollMode(self, mode: 'QAbstractItemView.ScrollMode') -> None: ... - def verticalScrollMode(self) -> 'QAbstractItemView.ScrollMode': ... - def setVerticalScrollMode(self, mode: 'QAbstractItemView.ScrollMode') -> None: ... - def dropIndicatorPosition(self) -> 'QAbstractItemView.DropIndicatorPosition': ... - def timerEvent(self, e: QtCore.QTimerEvent) -> None: ... - def resizeEvent(self, e: QtGui.QResizeEvent) -> None: ... - def keyPressEvent(self, e: QtGui.QKeyEvent) -> None: ... - def focusOutEvent(self, e: QtGui.QFocusEvent) -> None: ... - def focusInEvent(self, e: QtGui.QFocusEvent) -> None: ... - def dropEvent(self, e: QtGui.QDropEvent) -> None: ... - def dragLeaveEvent(self, e: QtGui.QDragLeaveEvent) -> None: ... - def dragMoveEvent(self, e: QtGui.QDragMoveEvent) -> None: ... - def dragEnterEvent(self, e: QtGui.QDragEnterEvent) -> None: ... - def mouseDoubleClickEvent(self, e: QtGui.QMouseEvent) -> None: ... - def mouseReleaseEvent(self, e: QtGui.QMouseEvent) -> None: ... - def mouseMoveEvent(self, e: QtGui.QMouseEvent) -> None: ... - def mousePressEvent(self, e: QtGui.QMouseEvent) -> None: ... - def viewportEvent(self, e: QtCore.QEvent) -> bool: ... - def event(self, event: QtCore.QEvent) -> bool: ... - def dirtyRegionOffset(self) -> QtCore.QPoint: ... - def setDirtyRegion(self, region: QtGui.QRegion) -> None: ... - def scrollDirtyRegion(self, dx: int, dy: int) -> None: ... - def executeDelayedItemsLayout(self) -> None: ... - def scheduleDelayedItemsLayout(self) -> None: ... - def setState(self, state: 'QAbstractItemView.State') -> None: ... - def state(self) -> 'QAbstractItemView.State': ... - def viewOptions(self) -> 'QStyleOptionViewItem': ... - def startDrag(self, supportedActions: typing.Union[QtCore.Qt.DropActions, QtCore.Qt.DropAction]) -> None: ... - def selectionCommand(self, index: QtCore.QModelIndex, event: typing.Optional[QtCore.QEvent] = ...) -> QtCore.QItemSelectionModel.SelectionFlags: ... - def selectedIndexes(self) -> typing.Any: ... - def visualRegionForSelection(self, selection: QtCore.QItemSelection) -> QtGui.QRegion: ... - def setSelection(self, rect: QtCore.QRect, command: typing.Union[QtCore.QItemSelectionModel.SelectionFlags, QtCore.QItemSelectionModel.SelectionFlag]) -> None: ... - def isIndexHidden(self, index: QtCore.QModelIndex) -> bool: ... - def verticalOffset(self) -> int: ... - def horizontalOffset(self) -> int: ... - def moveCursor(self, cursorAction: 'QAbstractItemView.CursorAction', modifiers: typing.Union[QtCore.Qt.KeyboardModifiers, QtCore.Qt.KeyboardModifier]) -> QtCore.QModelIndex: ... - def iconSizeChanged(self, size: QtCore.QSize) -> None: ... - def viewportEntered(self) -> None: ... - def entered(self, index: QtCore.QModelIndex) -> None: ... - def activated(self, index: QtCore.QModelIndex) -> None: ... - def doubleClicked(self, index: QtCore.QModelIndex) -> None: ... - def clicked(self, index: QtCore.QModelIndex) -> None: ... - def pressed(self, index: QtCore.QModelIndex) -> None: ... - def editorDestroyed(self, editor: QtCore.QObject) -> None: ... - def commitData(self, editor: QWidget) -> None: ... - def closeEditor(self, editor: QWidget, hint: QAbstractItemDelegate.EndEditHint) -> None: ... - def horizontalScrollbarValueChanged(self, value: int) -> None: ... - def verticalScrollbarValueChanged(self, value: int) -> None: ... - def horizontalScrollbarAction(self, action: int) -> None: ... - def verticalScrollbarAction(self, action: int) -> None: ... - def updateGeometries(self) -> None: ... - def updateEditorGeometries(self) -> None: ... - def updateEditorData(self) -> None: ... - def currentChanged(self, current: QtCore.QModelIndex, previous: QtCore.QModelIndex) -> None: ... - def selectionChanged(self, selected: QtCore.QItemSelection, deselected: QtCore.QItemSelection) -> None: ... - def rowsAboutToBeRemoved(self, parent: QtCore.QModelIndex, start: int, end: int) -> None: ... - def rowsInserted(self, parent: QtCore.QModelIndex, start: int, end: int) -> None: ... - def dataChanged(self, topLeft: QtCore.QModelIndex, bottomRight: QtCore.QModelIndex, roles: typing.Iterable[int] = ...) -> None: ... - # @typing.overload - # def update(self) -> None: ... - # @typing.overload - # def update(self, index: QtCore.QModelIndex) -> None: ... - def scrollToBottom(self) -> None: ... - def scrollToTop(self) -> None: ... - def setCurrentIndex(self, index: QtCore.QModelIndex) -> None: ... - def clearSelection(self) -> None: ... - @typing.overload - def edit(self, index: QtCore.QModelIndex) -> None: ... - @typing.overload - def edit(self, index: QtCore.QModelIndex, trigger: 'QAbstractItemView.EditTrigger', event: QtCore.QEvent) -> bool: ... - def selectAll(self) -> None: ... - def setRootIndex(self, index: QtCore.QModelIndex) -> None: ... - def reset(self) -> None: ... - def indexWidget(self, index: QtCore.QModelIndex) -> QWidget: ... - def setIndexWidget(self, index: QtCore.QModelIndex, widget: QWidget) -> None: ... - def closePersistentEditor(self, index: QtCore.QModelIndex) -> None: ... - def openPersistentEditor(self, index: QtCore.QModelIndex) -> None: ... - def sizeHintForColumn(self, column: int) -> int: ... - def sizeHintForRow(self, row: int) -> int: ... - def sizeHintForIndex(self, index: QtCore.QModelIndex) -> QtCore.QSize: ... - def indexAt(self, p: QtCore.QPoint) -> QtCore.QModelIndex: ... - def scrollTo(self, index: QtCore.QModelIndex, hint: 'QAbstractItemView.ScrollHint' = ...) -> None: ... - def visualRect(self, index: QtCore.QModelIndex) -> QtCore.QRect: ... - def keyboardSearch(self, search: str) -> None: ... - def textElideMode(self) -> QtCore.Qt.TextElideMode: ... - def setTextElideMode(self, mode: QtCore.Qt.TextElideMode) -> None: ... - def iconSize(self) -> QtCore.QSize: ... - def setIconSize(self, size: QtCore.QSize) -> None: ... - def alternatingRowColors(self) -> bool: ... - def setAlternatingRowColors(self, enable: bool) -> None: ... - def dragEnabled(self) -> bool: ... - def setDragEnabled(self, enable: bool) -> None: ... - def showDropIndicator(self) -> bool: ... - def setDropIndicatorShown(self, enable: bool) -> None: ... - def tabKeyNavigation(self) -> bool: ... - def setTabKeyNavigation(self, enable: bool) -> None: ... - def hasAutoScroll(self) -> bool: ... - def setAutoScroll(self, enable: bool) -> None: ... - def editTriggers(self) -> 'QAbstractItemView.EditTriggers': ... - def setEditTriggers(self, triggers: typing.Union['QAbstractItemView.EditTriggers', 'QAbstractItemView.EditTrigger']) -> None: ... - def rootIndex(self) -> QtCore.QModelIndex: ... - def currentIndex(self) -> QtCore.QModelIndex: ... - def selectionBehavior(self) -> 'QAbstractItemView.SelectionBehavior': ... - def setSelectionBehavior(self, behavior: 'QAbstractItemView.SelectionBehavior') -> None: ... - def selectionMode(self) -> 'QAbstractItemView.SelectionMode': ... - def setSelectionMode(self, mode: 'QAbstractItemView.SelectionMode') -> None: ... - @typing.overload - def itemDelegate(self) -> QAbstractItemDelegate: ... - @typing.overload - def itemDelegate(self, index: QtCore.QModelIndex) -> QAbstractItemDelegate: ... - def setItemDelegate(self, delegate: QAbstractItemDelegate) -> None: ... - def selectionModel(self) -> QtCore.QItemSelectionModel: ... - def setSelectionModel(self, selectionModel: QtCore.QItemSelectionModel) -> None: ... - def model(self) -> QtCore.QAbstractItemModel: ... - def setModel(self, model: QtCore.QAbstractItemModel) -> None: ... - - -class QAbstractSlider(QWidget): - - class SliderChange(int): ... - SliderRangeChange = ... # type: 'QAbstractSlider.SliderChange' - SliderOrientationChange = ... # type: 'QAbstractSlider.SliderChange' - SliderStepsChange = ... # type: 'QAbstractSlider.SliderChange' - SliderValueChange = ... # type: 'QAbstractSlider.SliderChange' - - class SliderAction(int): ... - SliderNoAction = ... # type: 'QAbstractSlider.SliderAction' - SliderSingleStepAdd = ... # type: 'QAbstractSlider.SliderAction' - SliderSingleStepSub = ... # type: 'QAbstractSlider.SliderAction' - SliderPageStepAdd = ... # type: 'QAbstractSlider.SliderAction' - SliderPageStepSub = ... # type: 'QAbstractSlider.SliderAction' - SliderToMinimum = ... # type: 'QAbstractSlider.SliderAction' - SliderToMaximum = ... # type: 'QAbstractSlider.SliderAction' - SliderMove = ... # type: 'QAbstractSlider.SliderAction' - - def __init__(self, parent: typing.Optional[QWidget] = ...) -> None: ... - - def changeEvent(self, e: QtCore.QEvent) -> None: ... - def wheelEvent(self, e: QtGui.QWheelEvent) -> None: ... - def timerEvent(self, a0: QtCore.QTimerEvent) -> None: ... - def keyPressEvent(self, ev: QtGui.QKeyEvent) -> None: ... - def event(self, e: QtCore.QEvent) -> bool: ... - def sliderChange(self, change: 'QAbstractSlider.SliderChange') -> None: ... - def repeatAction(self) -> 'QAbstractSlider.SliderAction': ... - def setRepeatAction(self, action: 'QAbstractSlider.SliderAction', thresholdTime: int = ..., repeatTime: int = ...) -> None: ... - def actionTriggered(self, action: int) -> None: ... - def rangeChanged(self, min: int, max: int) -> None: ... - def sliderReleased(self) -> None: ... - def sliderMoved(self, position: int) -> None: ... - def sliderPressed(self) -> None: ... - def valueChanged(self, value: int) -> None: ... - def setOrientation(self, a0: QtCore.Qt.Orientation) -> None: ... - def setValue(self, a0: int) -> None: ... - def triggerAction(self, action: 'QAbstractSlider.SliderAction') -> None: ... - def value(self) -> int: ... - def invertedControls(self) -> bool: ... - def setInvertedControls(self, a0: bool) -> None: ... - def invertedAppearance(self) -> bool: ... - def setInvertedAppearance(self, a0: bool) -> None: ... - def sliderPosition(self) -> int: ... - def setSliderPosition(self, a0: int) -> None: ... - def isSliderDown(self) -> bool: ... - def setSliderDown(self, a0: bool) -> None: ... - def hasTracking(self) -> bool: ... - def setTracking(self, enable: bool) -> None: ... - def pageStep(self) -> int: ... - def setPageStep(self, a0: int) -> None: ... - def singleStep(self) -> int: ... - def setSingleStep(self, a0: int) -> None: ... - def setRange(self, min: int, max: int) -> None: ... - def maximum(self) -> int: ... - def setMaximum(self, a0: int) -> None: ... - def minimum(self) -> int: ... - def setMinimum(self, a0: int) -> None: ... - def orientation(self) -> QtCore.Qt.Orientation: ... - - -class QAbstractSpinBox(QWidget): - - class CorrectionMode(int): ... - CorrectToPreviousValue = ... # type: 'QAbstractSpinBox.CorrectionMode' - CorrectToNearestValue = ... # type: 'QAbstractSpinBox.CorrectionMode' - - class ButtonSymbols(int): ... - UpDownArrows = ... # type: 'QAbstractSpinBox.ButtonSymbols' - PlusMinus = ... # type: 'QAbstractSpinBox.ButtonSymbols' - NoButtons = ... # type: 'QAbstractSpinBox.ButtonSymbols' - - class StepEnabledFlag(int): ... - StepNone = ... # type: 'QAbstractSpinBox.StepEnabledFlag' - StepUpEnabled = ... # type: 'QAbstractSpinBox.StepEnabledFlag' - StepDownEnabled = ... # type: 'QAbstractSpinBox.StepEnabledFlag' - - class StepEnabled(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QAbstractSpinBox.StepEnabled', 'QAbstractSpinBox.StepEnabledFlag']) -> None: ... - @typing.overload - def __init__(self, a0: 'QAbstractSpinBox.StepEnabled') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QAbstractSpinBox.StepEnabled': ... - def __int__(self) -> int: ... - - def __init__(self, parent: typing.Optional[QWidget] = ...) -> None: ... - - def isGroupSeparatorShown(self) -> bool: ... - def setGroupSeparatorShown(self, shown: bool) -> None: ... - def inputMethodQuery(self, a0: QtCore.Qt.InputMethodQuery) -> typing.Any: ... - def keyboardTracking(self) -> bool: ... - def setKeyboardTracking(self, kt: bool) -> None: ... - def isAccelerated(self) -> bool: ... - def setAccelerated(self, on: bool) -> None: ... - def hasAcceptableInput(self) -> bool: ... - def correctionMode(self) -> 'QAbstractSpinBox.CorrectionMode': ... - def setCorrectionMode(self, cm: 'QAbstractSpinBox.CorrectionMode') -> None: ... - def initStyleOption(self, option: 'QStyleOptionSpinBox') -> None: ... - def stepEnabled(self) -> 'QAbstractSpinBox.StepEnabled': ... - def setLineEdit(self, e: 'QLineEdit') -> None: ... - def lineEdit(self) -> 'QLineEdit': ... - def showEvent(self, e: QtGui.QShowEvent) -> None: ... - def paintEvent(self, e: QtGui.QPaintEvent) -> None: ... - def timerEvent(self, e: QtCore.QTimerEvent) -> None: ... - def mouseMoveEvent(self, e: QtGui.QMouseEvent) -> None: ... - def mouseReleaseEvent(self, e: QtGui.QMouseEvent) -> None: ... - def mousePressEvent(self, e: QtGui.QMouseEvent) -> None: ... - def hideEvent(self, e: QtGui.QHideEvent) -> None: ... - def closeEvent(self, e: QtGui.QCloseEvent) -> None: ... - def changeEvent(self, e: QtCore.QEvent) -> None: ... - def contextMenuEvent(self, e: QtGui.QContextMenuEvent) -> None: ... - def focusOutEvent(self, e: QtGui.QFocusEvent) -> None: ... - def focusInEvent(self, e: QtGui.QFocusEvent) -> None: ... - def wheelEvent(self, e: QtGui.QWheelEvent) -> None: ... - def keyReleaseEvent(self, e: QtGui.QKeyEvent) -> None: ... - def keyPressEvent(self, e: QtGui.QKeyEvent) -> None: ... - def resizeEvent(self, e: QtGui.QResizeEvent) -> None: ... - def editingFinished(self) -> None: ... - def clear(self) -> None: ... - def selectAll(self) -> None: ... - def stepDown(self) -> None: ... - def stepUp(self) -> None: ... - def stepBy(self, steps: int) -> None: ... - def fixup(self, input: str) -> str: ... - def validate(self, input: str, pos: int) -> typing.Tuple[QtGui.QValidator.State, str, int]: ... - def event(self, event: QtCore.QEvent) -> bool: ... - def interpretText(self) -> None: ... - def minimumSizeHint(self) -> QtCore.QSize: ... - def sizeHint(self) -> QtCore.QSize: ... - def hasFrame(self) -> bool: ... - def setFrame(self, a0: bool) -> None: ... - def alignment(self) -> QtCore.Qt.Alignment: ... - def setAlignment(self, flag: typing.Union[QtCore.Qt.Alignment, QtCore.Qt.AlignmentFlag]) -> None: ... - def isReadOnly(self) -> bool: ... - def setReadOnly(self, r: bool) -> None: ... - def setWrapping(self, w: bool) -> None: ... - def wrapping(self) -> bool: ... - def setSpecialValueText(self, s: str) -> None: ... - def specialValueText(self) -> str: ... - def text(self) -> str: ... - def setButtonSymbols(self, bs: 'QAbstractSpinBox.ButtonSymbols') -> None: ... - def buttonSymbols(self) -> 'QAbstractSpinBox.ButtonSymbols': ... - - -class QAction(QtCore.QObject): - - class Priority(int): ... - LowPriority = ... # type: 'QAction.Priority' - NormalPriority = ... # type: 'QAction.Priority' - HighPriority = ... # type: 'QAction.Priority' - - class MenuRole(int): ... - NoRole = ... # type: 'QAction.MenuRole' - TextHeuristicRole = ... # type: 'QAction.MenuRole' - ApplicationSpecificRole = ... # type: 'QAction.MenuRole' - AboutQtRole = ... # type: 'QAction.MenuRole' - AboutRole = ... # type: 'QAction.MenuRole' - PreferencesRole = ... # type: 'QAction.MenuRole' - QuitRole = ... # type: 'QAction.MenuRole' - - class ActionEvent(int): ... - Trigger = ... # type: 'QAction.ActionEvent' - Hover = ... # type: 'QAction.ActionEvent' - - @typing.overload - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - @typing.overload - def __init__(self, text: str, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - @typing.overload - def __init__(self, icon: QtGui.QIcon, text: str, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def priority(self) -> 'QAction.Priority': ... - def setPriority(self, priority: 'QAction.Priority') -> None: ... - def isIconVisibleInMenu(self) -> bool: ... - def setIconVisibleInMenu(self, visible: bool) -> None: ... - def associatedGraphicsWidgets(self) -> typing.Any: ... - def associatedWidgets(self) -> typing.List[QWidget]: ... - def menuRole(self) -> 'QAction.MenuRole': ... - def setMenuRole(self, menuRole: 'QAction.MenuRole') -> None: ... - def autoRepeat(self) -> bool: ... - def setAutoRepeat(self, a0: bool) -> None: ... - def shortcuts(self) -> typing.List[QtGui.QKeySequence]: ... - @typing.overload - def setShortcuts(self, shortcuts: typing.Iterable[typing.Union[QtGui.QKeySequence, QtGui.QKeySequence.StandardKey, str, int]]) -> None: ... - @typing.overload - def setShortcuts(self, a0: QtGui.QKeySequence.StandardKey) -> None: ... - def toggled(self, a0: bool) -> None: ... - def hovered(self) -> None: ... - def triggered(self, checked: bool = ...) -> None: ... - def changed(self) -> None: ... - def setVisible(self, a0: bool) -> None: ... - def setDisabled(self, b: bool) -> None: ... - def setEnabled(self, a0: bool) -> None: ... - def toggle(self) -> None: ... - def setChecked(self, a0: bool) -> None: ... - def hover(self) -> None: ... - def trigger(self) -> None: ... - def event(self, a0: QtCore.QEvent) -> bool: ... - def parentWidget(self) -> QWidget: ... - def showStatusText(self, widget: typing.Optional[QWidget] = ...) -> bool: ... - def activate(self, event: 'QAction.ActionEvent') -> None: ... - def isVisible(self) -> bool: ... - def isEnabled(self) -> bool: ... - def isChecked(self) -> bool: ... - def setData(self, var: typing.Any) -> None: ... - def data(self) -> typing.Any: ... - def isCheckable(self) -> bool: ... - def setCheckable(self, a0: bool) -> None: ... - def font(self) -> QtGui.QFont: ... - def setFont(self, font: QtGui.QFont) -> None: ... - def shortcutContext(self) -> QtCore.Qt.ShortcutContext: ... - def setShortcutContext(self, context: QtCore.Qt.ShortcutContext) -> None: ... - def shortcut(self) -> QtGui.QKeySequence: ... - def setShortcut(self, shortcut: typing.Union[QtGui.QKeySequence, QtGui.QKeySequence.StandardKey, str, int]) -> None: ... - def isSeparator(self) -> bool: ... - def setSeparator(self, b: bool) -> None: ... - def setMenu(self, menu: 'QMenu') -> None: ... - def menu(self) -> 'QMenu': ... - def whatsThis(self) -> str: ... - def setWhatsThis(self, what: str) -> None: ... - def statusTip(self) -> str: ... - def setStatusTip(self, statusTip: str) -> None: ... - def toolTip(self) -> str: ... - def setToolTip(self, tip: str) -> None: ... - def iconText(self) -> str: ... - def setIconText(self, text: str) -> None: ... - def text(self) -> str: ... - def setText(self, text: str) -> None: ... - def icon(self) -> QtGui.QIcon: ... - def setIcon(self, icon: QtGui.QIcon) -> None: ... - def actionGroup(self) -> 'QActionGroup': ... - def setActionGroup(self, group: 'QActionGroup') -> None: ... - - -class QActionGroup(QtCore.QObject): - - def __init__(self, parent: QtCore.QObject) -> None: ... - - def hovered(self, a0: QAction) -> None: ... - def triggered(self, a0: QAction) -> None: ... - def setExclusive(self, a0: bool) -> None: ... - def setVisible(self, a0: bool) -> None: ... - def setDisabled(self, b: bool) -> None: ... - def setEnabled(self, a0: bool) -> None: ... - def isVisible(self) -> bool: ... - def isEnabled(self) -> bool: ... - def isExclusive(self) -> bool: ... - def checkedAction(self) -> QAction: ... - def actions(self) -> typing.List[QAction]: ... - def removeAction(self, a: QAction) -> None: ... - @typing.overload - def addAction(self, a: QAction) -> QAction: ... - @typing.overload - def addAction(self, text: str) -> QAction: ... - @typing.overload - def addAction(self, icon: QtGui.QIcon, text: str) -> QAction: ... - - -class QApplication(QtGui.QGuiApplication): - - class ColorSpec(int): ... - NormalColor = ... # type: 'QApplication.ColorSpec' - CustomColor = ... # type: 'QApplication.ColorSpec' - ManyColor = ... # type: 'QApplication.ColorSpec' - - def __init__(self, argv: typing.List[str]) -> None: ... - - def event(self, a0: QtCore.QEvent) -> bool: ... - def setStyleSheet(self, sheet: str) -> None: ... - def setAutoSipEnabled(self, enabled: bool) -> None: ... - @staticmethod - def closeAllWindows() -> None: ... - @staticmethod - def aboutQt() -> None: ... - def focusChanged(self, old: QWidget, now: QWidget) -> None: ... - def styleSheet(self) -> str: ... - def autoSipEnabled(self) -> bool: ... - def notify(self, a0: QtCore.QObject, a1: QtCore.QEvent) -> bool: ... - @staticmethod - def exec() -> int: ... - @staticmethod - def exec_() -> int: ... - @staticmethod - def setEffectEnabled(a0: QtCore.Qt.UIEffect, enabled: bool = ...) -> None: ... - @staticmethod - def isEffectEnabled(a0: QtCore.Qt.UIEffect) -> bool: ... - @staticmethod - def startDragDistance() -> int: ... - @staticmethod - def setStartDragDistance(l: int) -> None: ... - @staticmethod - def startDragTime() -> int: ... - @staticmethod - def setStartDragTime(ms: int) -> None: ... - @staticmethod - def globalStrut() -> QtCore.QSize: ... - @staticmethod - def setGlobalStrut(a0: QtCore.QSize) -> None: ... - @staticmethod - def wheelScrollLines() -> int: ... - @staticmethod - def setWheelScrollLines(a0: int) -> None: ... - @staticmethod - def keyboardInputInterval() -> int: ... - @staticmethod - def setKeyboardInputInterval(a0: int) -> None: ... - @staticmethod - def doubleClickInterval() -> int: ... - @staticmethod - def setDoubleClickInterval(a0: int) -> None: ... - @staticmethod - def cursorFlashTime() -> int: ... - @staticmethod - def setCursorFlashTime(a0: int) -> None: ... - @staticmethod - def alert(widget: QWidget, msecs: int = ...) -> None: ... - @staticmethod - def beep() -> None: ... - # @typing.overload - # @staticmethod - # def topLevelAt(p: QtCore.QPoint) -> QWidget: ... - # @typing.overload - # @staticmethod - # def topLevelAt(x: int, y: int) -> QWidget: ... - @typing.overload - @staticmethod - def widgetAt(p: QtCore.QPoint) -> QWidget: ... - @typing.overload - @staticmethod - def widgetAt(x: int, y: int) -> QWidget: ... - @staticmethod - def setActiveWindow(act: QWidget) -> None: ... - @staticmethod - def activeWindow() -> QWidget: ... - @staticmethod - def focusWidget() -> QWidget: ... - @staticmethod - def activeModalWidget() -> QWidget: ... - @staticmethod - def activePopupWidget() -> QWidget: ... - @staticmethod - def desktop() -> 'QDesktopWidget': ... - @staticmethod - def topLevelWidgets() -> typing.Any: ... - @staticmethod - def allWidgets() -> typing.Any: ... - @staticmethod - def windowIcon() -> QtGui.QIcon: ... - @staticmethod - def setWindowIcon(icon: QtGui.QIcon) -> None: ... - @staticmethod - def fontMetrics() -> QtGui.QFontMetrics: ... - @staticmethod - def setFont(a0: QtGui.QFont, className: typing.Optional[str] = ...) -> None: ... - @typing.overload - @staticmethod - def font() -> QtGui.QFont: ... - @typing.overload - @staticmethod - def font(a0: QWidget) -> QtGui.QFont: ... - @typing.overload - @staticmethod - def font(className: str) -> QtGui.QFont: ... - @staticmethod - def setPalette(a0: QtGui.QPalette, className: typing.Optional[str] = ...) -> None: ... - @typing.overload - @staticmethod - def palette() -> QtGui.QPalette: ... - @typing.overload - @staticmethod - def palette(a0: QWidget) -> QtGui.QPalette: ... - @typing.overload - @staticmethod - def palette(className: str) -> QtGui.QPalette: ... - @staticmethod - def setColorSpec(a0: int) -> None: ... - @staticmethod - def colorSpec() -> int: ... - @typing.overload - @staticmethod - def setStyle(a0: 'QStyle') -> None: ... - @typing.overload - @staticmethod - def setStyle(a0: str) -> 'QStyle': ... - @staticmethod - def style() -> 'QStyle': ... - - -class QLayoutItem(sip.wrapper): - - @typing.overload - def __init__(self, alignment: typing.Union[QtCore.Qt.Alignment, QtCore.Qt.AlignmentFlag] = ...) -> None: ... - @typing.overload - def __init__(self, a0: 'QLayoutItem') -> None: ... - - def controlTypes(self) -> 'QSizePolicy.ControlTypes': ... - def setAlignment(self, a: typing.Union[QtCore.Qt.Alignment, QtCore.Qt.AlignmentFlag]) -> None: ... - def alignment(self) -> QtCore.Qt.Alignment: ... - def spacerItem(self) -> 'QSpacerItem': ... - def layout(self) -> 'QLayout': ... - def widget(self) -> QWidget: ... - def invalidate(self) -> None: ... - def minimumHeightForWidth(self, a0: int) -> int: ... - def heightForWidth(self, a0: int) -> int: ... - def hasHeightForWidth(self) -> bool: ... - def isEmpty(self) -> bool: ... - def geometry(self) -> QtCore.QRect: ... - def setGeometry(self, a0: QtCore.QRect) -> None: ... - def expandingDirections(self) -> QtCore.Qt.Orientations: ... - def maximumSize(self) -> QtCore.QSize: ... - def minimumSize(self) -> QtCore.QSize: ... - def sizeHint(self) -> QtCore.QSize: ... - - -class QLayout(QtCore.QObject, QLayoutItem): - - class SizeConstraint(int): ... - SetDefaultConstraint = ... # type: 'QLayout.SizeConstraint' - SetNoConstraint = ... # type: 'QLayout.SizeConstraint' - SetMinimumSize = ... # type: 'QLayout.SizeConstraint' - SetFixedSize = ... # type: 'QLayout.SizeConstraint' - SetMaximumSize = ... # type: 'QLayout.SizeConstraint' - SetMinAndMaxSize = ... # type: 'QLayout.SizeConstraint' - - @typing.overload - def __init__(self, parent: QWidget) -> None: ... - @typing.overload - def __init__(self) -> None: ... - - def replaceWidget(self, from_: QWidget, to: QWidget, options: typing.Union[QtCore.Qt.FindChildOptions, QtCore.Qt.FindChildOption] = ...) -> QLayoutItem: ... - def controlTypes(self) -> 'QSizePolicy.ControlTypes': ... - def contentsMargins(self) -> QtCore.QMargins: ... - def contentsRect(self) -> QtCore.QRect: ... - def getContentsMargins(self) -> typing.Tuple[int, int, int, int]: ... - @typing.overload - def setContentsMargins(self, left: int, top: int, right: int, bottom: int) -> None: ... - @typing.overload - def setContentsMargins(self, margins: QtCore.QMargins) -> None: ... - def alignmentRect(self, a0: QtCore.QRect) -> QtCore.QRect: ... - def addChildWidget(self, w: QWidget) -> None: ... - def addChildLayout(self, l: 'QLayout') -> None: ... - def childEvent(self, e: QtCore.QChildEvent) -> None: ... - def widgetEvent(self, a0: QtCore.QEvent) -> None: ... - @staticmethod - def closestAcceptableSize(w: QWidget, s: QtCore.QSize) -> QtCore.QSize: ... - def isEnabled(self) -> bool: ... - def setEnabled(self, a0: bool) -> None: ... - def layout(self) -> 'QLayout': ... - def totalSizeHint(self) -> QtCore.QSize: ... - def totalMaximumSize(self) -> QtCore.QSize: ... - def totalMinimumSize(self) -> QtCore.QSize: ... - def totalHeightForWidth(self, w: int) -> int: ... - def isEmpty(self) -> bool: ... - def __len__(self) -> int: ... - def count(self) -> int: ... - def indexOf(self, a0: QWidget) -> int: ... - def takeAt(self, index: int) -> QLayoutItem: ... - def itemAt(self, index: int) -> QLayoutItem: ... - def setGeometry(self, a0: QtCore.QRect) -> None: ... - def maximumSize(self) -> QtCore.QSize: ... - def minimumSize(self) -> QtCore.QSize: ... - def expandingDirections(self) -> QtCore.Qt.Orientations: ... - def removeItem(self, a0: QLayoutItem) -> None: ... - def removeWidget(self, w: QWidget) -> None: ... - def addItem(self, a0: QLayoutItem) -> None: ... - def addWidget(self, w: QWidget) -> None: ... - def update(self) -> None: ... - def activate(self) -> bool: ... - def geometry(self) -> QtCore.QRect: ... - def invalidate(self) -> None: ... - def parentWidget(self) -> QWidget: ... - def menuBar(self) -> QWidget: ... - def setMenuBar(self, w: QWidget) -> None: ... - def sizeConstraint(self) -> 'QLayout.SizeConstraint': ... - def setSizeConstraint(self, a0: 'QLayout.SizeConstraint') -> None: ... - @typing.overload - def setAlignment(self, w: QWidget, alignment: typing.Union[QtCore.Qt.Alignment, QtCore.Qt.AlignmentFlag]) -> bool: ... - @typing.overload - def setAlignment(self, l: 'QLayout', alignment: typing.Union[QtCore.Qt.Alignment, QtCore.Qt.AlignmentFlag]) -> bool: ... - @typing.overload - def setAlignment(self, alignment: typing.Union[QtCore.Qt.Alignment, QtCore.Qt.AlignmentFlag]) -> None: ... - def setSpacing(self, a0: int) -> None: ... - def spacing(self) -> int: ... - - -class QBoxLayout(QLayout): - - class Direction(int): ... - LeftToRight = ... # type: 'QBoxLayout.Direction' - RightToLeft = ... # type: 'QBoxLayout.Direction' - TopToBottom = ... # type: 'QBoxLayout.Direction' - BottomToTop = ... # type: 'QBoxLayout.Direction' - Down = ... # type: 'QBoxLayout.Direction' - Up = ... # type: 'QBoxLayout.Direction' - - def __init__(self, direction: 'QBoxLayout.Direction', parent: typing.Optional[QWidget] = ...) -> None: ... - - def insertItem(self, index: int, a1: QLayoutItem) -> None: ... - def stretch(self, index: int) -> int: ... - def setStretch(self, index: int, stretch: int) -> None: ... - def insertSpacerItem(self, index: int, spacerItem: 'QSpacerItem') -> None: ... - def addSpacerItem(self, spacerItem: 'QSpacerItem') -> None: ... - def setSpacing(self, spacing: int) -> None: ... - def spacing(self) -> int: ... - def setGeometry(self, a0: QtCore.QRect) -> None: ... - def count(self) -> int: ... - def takeAt(self, a0: int) -> QLayoutItem: ... - def itemAt(self, a0: int) -> QLayoutItem: ... - def invalidate(self) -> None: ... - def expandingDirections(self) -> QtCore.Qt.Orientations: ... - def minimumHeightForWidth(self, a0: int) -> int: ... - def heightForWidth(self, a0: int) -> int: ... - def hasHeightForWidth(self) -> bool: ... - def maximumSize(self) -> QtCore.QSize: ... - def minimumSize(self) -> QtCore.QSize: ... - def sizeHint(self) -> QtCore.QSize: ... - @typing.overload - def setStretchFactor(self, w: QWidget, stretch: int) -> bool: ... - @typing.overload - def setStretchFactor(self, l: QLayout, stretch: int) -> bool: ... - def insertLayout(self, index: int, layout: QLayout, stretch: int = ...) -> None: ... - def insertWidget(self, index: int, widget: QWidget, stretch: int = ..., alignment: typing.Union[QtCore.Qt.Alignment, QtCore.Qt.AlignmentFlag] = ...) -> None: ... - def insertStretch(self, index: int, stretch: int = ...) -> None: ... - def insertSpacing(self, index: int, size: int) -> None: ... - def addItem(self, a0: QLayoutItem) -> None: ... - def addStrut(self, a0: int) -> None: ... - def addLayout(self, layout: QLayout, stretch: int = ...) -> None: ... - def addWidget(self, a0: QWidget, stretch: int = ..., alignment: typing.Union[QtCore.Qt.Alignment, QtCore.Qt.AlignmentFlag] = ...) -> None: ... - def addStretch(self, stretch: int = ...) -> None: ... - def addSpacing(self, size: int) -> None: ... - def setDirection(self, a0: 'QBoxLayout.Direction') -> None: ... - def direction(self) -> 'QBoxLayout.Direction': ... - - -class QHBoxLayout(QBoxLayout): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, parent: QWidget) -> None: ... - - -class QVBoxLayout(QBoxLayout): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, parent: QWidget) -> None: ... - - -class QButtonGroup(QtCore.QObject): - - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - @typing.overload - def buttonToggled(self, a0: QAbstractButton, a1: bool) -> None: ... - @typing.overload - def buttonToggled(self, a0: int, a1: bool) -> None: ... - @typing.overload - def buttonReleased(self, a0: QAbstractButton) -> None: ... - @typing.overload - def buttonReleased(self, a0: int) -> None: ... - @typing.overload - def buttonPressed(self, a0: QAbstractButton) -> None: ... - @typing.overload - def buttonPressed(self, a0: int) -> None: ... - @typing.overload - def buttonClicked(self, a0: QAbstractButton) -> None: ... - @typing.overload - def buttonClicked(self, a0: int) -> None: ... - def checkedId(self) -> int: ... - def id(self, button: QAbstractButton) -> int: ... - def setId(self, button: QAbstractButton, id: int) -> None: ... - def checkedButton(self) -> QAbstractButton: ... - def button(self, id: int) -> QAbstractButton: ... - def buttons(self) -> typing.Any: ... - def removeButton(self, a0: QAbstractButton) -> None: ... - def addButton(self, a0: QAbstractButton, id: int = ...) -> None: ... - def exclusive(self) -> bool: ... - def setExclusive(self, a0: bool) -> None: ... - - -class QCalendarWidget(QWidget): - - class SelectionMode(int): ... - NoSelection = ... # type: 'QCalendarWidget.SelectionMode' - SingleSelection = ... # type: 'QCalendarWidget.SelectionMode' - - class VerticalHeaderFormat(int): ... - NoVerticalHeader = ... # type: 'QCalendarWidget.VerticalHeaderFormat' - ISOWeekNumbers = ... # type: 'QCalendarWidget.VerticalHeaderFormat' - - class HorizontalHeaderFormat(int): ... - NoHorizontalHeader = ... # type: 'QCalendarWidget.HorizontalHeaderFormat' - SingleLetterDayNames = ... # type: 'QCalendarWidget.HorizontalHeaderFormat' - ShortDayNames = ... # type: 'QCalendarWidget.HorizontalHeaderFormat' - LongDayNames = ... # type: 'QCalendarWidget.HorizontalHeaderFormat' - - def __init__(self, parent: typing.Optional[QWidget] = ...) -> None: ... - - def setNavigationBarVisible(self, visible: bool) -> None: ... - def setDateEditAcceptDelay(self, delay: int) -> None: ... - def dateEditAcceptDelay(self) -> int: ... - def setDateEditEnabled(self, enable: bool) -> None: ... - def isDateEditEnabled(self) -> bool: ... - def isNavigationBarVisible(self) -> bool: ... - def selectionChanged(self) -> None: ... - def currentPageChanged(self, year: int, month: int) -> None: ... - def clicked(self, date: typing.Union[QtCore.QDate, datetime.date]) -> None: ... - def activated(self, date: typing.Union[QtCore.QDate, datetime.date]) -> None: ... - def showToday(self) -> None: ... - def showSelectedDate(self) -> None: ... - def showPreviousYear(self) -> None: ... - def showPreviousMonth(self) -> None: ... - def showNextYear(self) -> None: ... - def showNextMonth(self) -> None: ... - def setSelectedDate(self, date: typing.Union[QtCore.QDate, datetime.date]) -> None: ... - def setDateRange(self, min: typing.Union[QtCore.QDate, datetime.date], max: typing.Union[QtCore.QDate, datetime.date]) -> None: ... - def setCurrentPage(self, year: int, month: int) -> None: ... - def paintCell(self, painter: QtGui.QPainter, rect: QtCore.QRect, date: typing.Union[QtCore.QDate, datetime.date]) -> None: ... - def keyPressEvent(self, event: QtGui.QKeyEvent) -> None: ... - def resizeEvent(self, event: QtGui.QResizeEvent) -> None: ... - def mousePressEvent(self, event: QtGui.QMouseEvent) -> None: ... - def eventFilter(self, watched: QtCore.QObject, event: QtCore.QEvent) -> bool: ... - def event(self, event: QtCore.QEvent) -> bool: ... - def updateCells(self) -> None: ... - def updateCell(self, date: typing.Union[QtCore.QDate, datetime.date]) -> None: ... - def setDateTextFormat(self, date: typing.Union[QtCore.QDate, datetime.date], color: QtGui.QTextCharFormat) -> None: ... - @typing.overload - def dateTextFormat(self) -> typing.Any: ... - @typing.overload - def dateTextFormat(self, date: typing.Union[QtCore.QDate, datetime.date]) -> QtGui.QTextCharFormat: ... - def setWeekdayTextFormat(self, dayOfWeek: QtCore.Qt.DayOfWeek, format: QtGui.QTextCharFormat) -> None: ... - def weekdayTextFormat(self, dayOfWeek: QtCore.Qt.DayOfWeek) -> QtGui.QTextCharFormat: ... - def setHeaderTextFormat(self, format: QtGui.QTextCharFormat) -> None: ... - def headerTextFormat(self) -> QtGui.QTextCharFormat: ... - def setVerticalHeaderFormat(self, format: 'QCalendarWidget.VerticalHeaderFormat') -> None: ... - def verticalHeaderFormat(self) -> 'QCalendarWidget.VerticalHeaderFormat': ... - def setHorizontalHeaderFormat(self, format: 'QCalendarWidget.HorizontalHeaderFormat') -> None: ... - def horizontalHeaderFormat(self) -> 'QCalendarWidget.HorizontalHeaderFormat': ... - def setSelectionMode(self, mode: 'QCalendarWidget.SelectionMode') -> None: ... - def selectionMode(self) -> 'QCalendarWidget.SelectionMode': ... - def setGridVisible(self, show: bool) -> None: ... - def isGridVisible(self) -> bool: ... - def setFirstDayOfWeek(self, dayOfWeek: QtCore.Qt.DayOfWeek) -> None: ... - def firstDayOfWeek(self) -> QtCore.Qt.DayOfWeek: ... - def setMaximumDate(self, date: typing.Union[QtCore.QDate, datetime.date]) -> None: ... - def maximumDate(self) -> QtCore.QDate: ... - def setMinimumDate(self, date: typing.Union[QtCore.QDate, datetime.date]) -> None: ... - def minimumDate(self) -> QtCore.QDate: ... - def monthShown(self) -> int: ... - def yearShown(self) -> int: ... - def selectedDate(self) -> QtCore.QDate: ... - def minimumSizeHint(self) -> QtCore.QSize: ... - def sizeHint(self) -> QtCore.QSize: ... - - -class QCheckBox(QAbstractButton): - - @typing.overload - def __init__(self, parent: typing.Optional[QWidget] = ...) -> None: ... - @typing.overload - def __init__(self, text: str, parent: typing.Optional[QWidget] = ...) -> None: ... - - def initStyleOption(self, option: 'QStyleOptionButton') -> None: ... - def mouseMoveEvent(self, a0: QtGui.QMouseEvent) -> None: ... - def paintEvent(self, a0: QtGui.QPaintEvent) -> None: ... - def event(self, e: QtCore.QEvent) -> bool: ... - def nextCheckState(self) -> None: ... - def checkStateSet(self) -> None: ... - def hitButton(self, pos: QtCore.QPoint) -> bool: ... - def stateChanged(self, a0: int) -> None: ... - def minimumSizeHint(self) -> QtCore.QSize: ... - def setCheckState(self, state: QtCore.Qt.CheckState) -> None: ... - def checkState(self) -> QtCore.Qt.CheckState: ... - def isTristate(self) -> bool: ... - def setTristate(self, on: bool = ...) -> None: ... - def sizeHint(self) -> QtCore.QSize: ... - - -class QDialog(QWidget): - - class DialogCode(int): ... - Rejected = ... # type: 'QDialog.DialogCode' - Accepted = ... # type: 'QDialog.DialogCode' - - def __init__(self, parent: typing.Optional[QWidget] = ..., flags: typing.Union[QtCore.Qt.WindowFlags, QtCore.Qt.WindowType] = ...) -> None: ... - - def eventFilter(self, a0: QtCore.QObject, a1: QtCore.QEvent) -> bool: ... - def contextMenuEvent(self, a0: QtGui.QContextMenuEvent) -> None: ... - def resizeEvent(self, a0: QtGui.QResizeEvent) -> None: ... - def showEvent(self, a0: QtGui.QShowEvent) -> None: ... - def closeEvent(self, a0: QtGui.QCloseEvent) -> None: ... - def keyPressEvent(self, a0: QtGui.QKeyEvent) -> None: ... - def rejected(self) -> None: ... - def finished(self, result: int) -> None: ... - def accepted(self) -> None: ... - def open(self) -> None: ... - def reject(self) -> None: ... - def accept(self) -> None: ... - def done(self, a0: int) -> None: ... - def exec(self) -> int: ... - def exec_(self) -> int: ... - def setResult(self, r: int) -> None: ... - def setModal(self, modal: bool) -> None: ... - def isSizeGripEnabled(self) -> bool: ... - def setSizeGripEnabled(self, a0: bool) -> None: ... - def minimumSizeHint(self) -> QtCore.QSize: ... - def sizeHint(self) -> QtCore.QSize: ... - def setVisible(self, visible: bool) -> None: ... - def result(self) -> int: ... - - -class QColorDialog(QDialog): - - class ColorDialogOption(int): ... - ShowAlphaChannel = ... # type: 'QColorDialog.ColorDialogOption' - NoButtons = ... # type: 'QColorDialog.ColorDialogOption' - DontUseNativeDialog = ... # type: 'QColorDialog.ColorDialogOption' - - class ColorDialogOptions(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QColorDialog.ColorDialogOptions', 'QColorDialog.ColorDialogOption']) -> None: ... - @typing.overload - def __init__(self, a0: 'QColorDialog.ColorDialogOptions') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QColorDialog.ColorDialogOptions': ... - def __int__(self) -> int: ... - - @typing.overload - def __init__(self, parent: typing.Optional[QWidget] = ...) -> None: ... - @typing.overload - def __init__(self, initial: typing.Union[QtGui.QColor, QtCore.Qt.GlobalColor, QtGui.QGradient], parent: typing.Optional[QWidget] = ...) -> None: ... - - def setVisible(self, visible: bool) -> None: ... - @typing.overload - def open(self) -> None: ... - @typing.overload - def open(self, slot: PYQT_SLOT) -> None: ... - def options(self) -> 'QColorDialog.ColorDialogOptions': ... - def setOptions(self, options: typing.Union['QColorDialog.ColorDialogOptions', 'QColorDialog.ColorDialogOption']) -> None: ... - def testOption(self, option: 'QColorDialog.ColorDialogOption') -> bool: ... - def setOption(self, option: 'QColorDialog.ColorDialogOption', on: bool = ...) -> None: ... - def selectedColor(self) -> QtGui.QColor: ... - def currentColor(self) -> QtGui.QColor: ... - def setCurrentColor(self, color: typing.Union[QtGui.QColor, QtCore.Qt.GlobalColor, QtGui.QGradient]) -> None: ... - def done(self, result: int) -> None: ... - def changeEvent(self, e: QtCore.QEvent) -> None: ... - def currentColorChanged(self, color: typing.Union[QtGui.QColor, QtCore.Qt.GlobalColor, QtGui.QGradient]) -> None: ... - def colorSelected(self, color: typing.Union[QtGui.QColor, QtCore.Qt.GlobalColor, QtGui.QGradient]) -> None: ... - @staticmethod - def setStandardColor(index: int, color: typing.Union[QtGui.QColor, QtCore.Qt.GlobalColor, QtGui.QGradient]) -> None: ... - @staticmethod - def standardColor(index: int) -> QtGui.QColor: ... - @staticmethod - def setCustomColor(index: int, color: typing.Union[QtGui.QColor, QtCore.Qt.GlobalColor, QtGui.QGradient]) -> None: ... - @staticmethod - def customColor(index: int) -> QtGui.QColor: ... - @staticmethod - def customCount() -> int: ... - @staticmethod - def getColor(initial: typing.Union[QtGui.QColor, QtCore.Qt.GlobalColor, QtGui.QGradient] = ..., parent: typing.Optional[QWidget] = ..., title: str = ..., options: typing.Union['QColorDialog.ColorDialogOptions', 'QColorDialog.ColorDialogOption'] = ...) -> QtGui.QColor: ... - - -class QColumnView(QAbstractItemView): - - def __init__(self, parent: typing.Optional[QWidget] = ...) -> None: ... - - def currentChanged(self, current: QtCore.QModelIndex, previous: QtCore.QModelIndex) -> None: ... - def rowsInserted(self, parent: QtCore.QModelIndex, start: int, end: int) -> None: ... - def scrollContentsBy(self, dx: int, dy: int) -> None: ... - def verticalOffset(self) -> int: ... - def horizontalOffset(self) -> int: ... - def visualRegionForSelection(self, selection: QtCore.QItemSelection) -> QtGui.QRegion: ... - def setSelection(self, rect: QtCore.QRect, command: typing.Union[QtCore.QItemSelectionModel.SelectionFlags, QtCore.QItemSelectionModel.SelectionFlag]) -> None: ... - def resizeEvent(self, event: QtGui.QResizeEvent) -> None: ... - def moveCursor(self, cursorAction: QAbstractItemView.CursorAction, modifiers: typing.Union[QtCore.Qt.KeyboardModifiers, QtCore.Qt.KeyboardModifier]) -> QtCore.QModelIndex: ... - def isIndexHidden(self, index: QtCore.QModelIndex) -> bool: ... - def initializeColumn(self, column: QAbstractItemView) -> None: ... - def createColumn(self, rootIndex: QtCore.QModelIndex) -> QAbstractItemView: ... - def updatePreviewWidget(self, index: QtCore.QModelIndex) -> None: ... - def selectAll(self) -> None: ... - def setRootIndex(self, index: QtCore.QModelIndex) -> None: ... - def setSelectionModel(self, selectionModel: QtCore.QItemSelectionModel) -> None: ... - def setModel(self, model: QtCore.QAbstractItemModel) -> None: ... - def visualRect(self, index: QtCore.QModelIndex) -> QtCore.QRect: ... - def sizeHint(self) -> QtCore.QSize: ... - def scrollTo(self, index: QtCore.QModelIndex, hint: QAbstractItemView.ScrollHint = ...) -> None: ... - def indexAt(self, point: QtCore.QPoint) -> QtCore.QModelIndex: ... - def setResizeGripsVisible(self, visible: bool) -> None: ... - def setPreviewWidget(self, widget: QWidget) -> None: ... - def setColumnWidths(self, list: typing.Iterable[int]) -> None: ... - def resizeGripsVisible(self) -> bool: ... - def previewWidget(self) -> QWidget: ... - def columnWidths(self) -> typing.List[int]: ... - - -class QComboBox(QWidget): - - class SizeAdjustPolicy(int): ... - AdjustToContents = ... # type: 'QComboBox.SizeAdjustPolicy' - AdjustToContentsOnFirstShow = ... # type: 'QComboBox.SizeAdjustPolicy' - AdjustToMinimumContentsLength = ... # type: 'QComboBox.SizeAdjustPolicy' - AdjustToMinimumContentsLengthWithIcon = ... # type: 'QComboBox.SizeAdjustPolicy' - - class InsertPolicy(int): ... - NoInsert = ... # type: 'QComboBox.InsertPolicy' - InsertAtTop = ... # type: 'QComboBox.InsertPolicy' - InsertAtCurrent = ... # type: 'QComboBox.InsertPolicy' - InsertAtBottom = ... # type: 'QComboBox.InsertPolicy' - InsertAfterCurrent = ... # type: 'QComboBox.InsertPolicy' - InsertBeforeCurrent = ... # type: 'QComboBox.InsertPolicy' - InsertAlphabetically = ... # type: 'QComboBox.InsertPolicy' - - def __init__(self, parent: typing.Optional[QWidget] = ...) -> None: ... - - def currentData(self, role: int = ...) -> typing.Any: ... - @typing.overload - def inputMethodQuery(self, a0: QtCore.Qt.InputMethodQuery) -> typing.Any: ... - @typing.overload - def inputMethodQuery(self, query: QtCore.Qt.InputMethodQuery, argument: typing.Any) -> typing.Any: ... - def inputMethodEvent(self, a0: QtGui.QInputMethodEvent) -> None: ... - def contextMenuEvent(self, e: QtGui.QContextMenuEvent) -> None: ... - def wheelEvent(self, e: QtGui.QWheelEvent) -> None: ... - def keyReleaseEvent(self, e: QtGui.QKeyEvent) -> None: ... - def keyPressEvent(self, e: QtGui.QKeyEvent) -> None: ... - def mouseReleaseEvent(self, e: QtGui.QMouseEvent) -> None: ... - def mousePressEvent(self, e: QtGui.QMouseEvent) -> None: ... - def hideEvent(self, e: QtGui.QHideEvent) -> None: ... - def showEvent(self, e: QtGui.QShowEvent) -> None: ... - def paintEvent(self, e: QtGui.QPaintEvent) -> None: ... - def resizeEvent(self, e: QtGui.QResizeEvent) -> None: ... - def changeEvent(self, e: QtCore.QEvent) -> None: ... - def focusOutEvent(self, e: QtGui.QFocusEvent) -> None: ... - def focusInEvent(self, e: QtGui.QFocusEvent) -> None: ... - def initStyleOption(self, option: 'QStyleOptionComboBox') -> None: ... - @typing.overload - def highlighted(self, index: int) -> None: ... - @typing.overload - def highlighted(self, a0: str) -> None: ... - def currentTextChanged(self, a0: str) -> None: ... - @typing.overload - def currentIndexChanged(self, index: int) -> None: ... - @typing.overload - def currentIndexChanged(self, a0: str) -> None: ... - @typing.overload - def activated(self, index: int) -> None: ... - @typing.overload - def activated(self, a0: str) -> None: ... - def editTextChanged(self, a0: str) -> None: ... - def setCurrentText(self, text: str) -> None: ... - def setEditText(self, text: str) -> None: ... - def clearEditText(self) -> None: ... - def clear(self) -> None: ... - def insertSeparator(self, index: int) -> None: ... - def completer(self) -> 'QCompleter': ... - def setCompleter(self, c: 'QCompleter') -> None: ... - def event(self, event: QtCore.QEvent) -> bool: ... - def hidePopup(self) -> None: ... - def showPopup(self) -> None: ... - def minimumSizeHint(self) -> QtCore.QSize: ... - def sizeHint(self) -> QtCore.QSize: ... - def setView(self, itemView: QAbstractItemView) -> None: ... - def view(self) -> QAbstractItemView: ... - def setItemData(self, index: int, value: typing.Any, role: int = ...) -> None: ... - def setItemIcon(self, index: int, icon: QtGui.QIcon) -> None: ... - def setItemText(self, index: int, text: str) -> None: ... - def removeItem(self, index: int) -> None: ... - def insertItems(self, index: int, texts: typing.Iterable[str]) -> None: ... - @typing.overload - def insertItem(self, index: int, text: str, userData: typing.Any = ...) -> None: ... - @typing.overload - def insertItem(self, index: int, icon: QtGui.QIcon, text: str, userData: typing.Any = ...) -> None: ... - @typing.overload - def addItem(self, text: str, userData: typing.Any = ...) -> None: ... - @typing.overload - def addItem(self, icon: QtGui.QIcon, text: str, userData: typing.Any = ...) -> None: ... - def addItems(self, texts: typing.Iterable[str]) -> None: ... - def itemData(self, index: int, role: int = ...) -> typing.Any: ... - def itemIcon(self, index: int) -> QtGui.QIcon: ... - def itemText(self, index: int) -> str: ... - def currentText(self) -> str: ... - def setCurrentIndex(self, index: int) -> None: ... - def currentIndex(self) -> int: ... - def setModelColumn(self, visibleColumn: int) -> None: ... - def modelColumn(self) -> int: ... - def setRootModelIndex(self, index: QtCore.QModelIndex) -> None: ... - def rootModelIndex(self) -> QtCore.QModelIndex: ... - def setModel(self, model: QtCore.QAbstractItemModel) -> None: ... - def model(self) -> QtCore.QAbstractItemModel: ... - def setItemDelegate(self, delegate: QAbstractItemDelegate) -> None: ... - def itemDelegate(self) -> QAbstractItemDelegate: ... - def validator(self) -> QtGui.QValidator: ... - def setValidator(self, v: QtGui.QValidator) -> None: ... - def lineEdit(self) -> 'QLineEdit': ... - def setLineEdit(self, edit: 'QLineEdit') -> None: ... - def setEditable(self, editable: bool) -> None: ... - def isEditable(self) -> bool: ... - def setIconSize(self, size: QtCore.QSize) -> None: ... - def iconSize(self) -> QtCore.QSize: ... - def setMinimumContentsLength(self, characters: int) -> None: ... - def minimumContentsLength(self) -> int: ... - def setSizeAdjustPolicy(self, policy: 'QComboBox.SizeAdjustPolicy') -> None: ... - def sizeAdjustPolicy(self) -> 'QComboBox.SizeAdjustPolicy': ... - def setInsertPolicy(self, policy: 'QComboBox.InsertPolicy') -> None: ... - def insertPolicy(self) -> 'QComboBox.InsertPolicy': ... - def findData(self, data: typing.Any, role: int = ..., flags: typing.Union[QtCore.Qt.MatchFlags, QtCore.Qt.MatchFlag] = ...) -> int: ... - def findText(self, text: str, flags: typing.Union[QtCore.Qt.MatchFlags, QtCore.Qt.MatchFlag] = ...) -> int: ... - def hasFrame(self) -> bool: ... - def setFrame(self, a0: bool) -> None: ... - def setDuplicatesEnabled(self, enable: bool) -> None: ... - def duplicatesEnabled(self) -> bool: ... - def maxCount(self) -> int: ... - def setMaxCount(self, max: int) -> None: ... - def __len__(self) -> int: ... - def count(self) -> int: ... - def setMaxVisibleItems(self, maxItems: int) -> None: ... - def maxVisibleItems(self) -> int: ... - - -class QPushButton(QAbstractButton): - - @typing.overload - def __init__(self, parent: typing.Optional[QWidget] = ...) -> None: ... - @typing.overload - def __init__(self, text: str, parent: typing.Optional[QWidget] = ...) -> None: ... - @typing.overload - def __init__(self, icon: QtGui.QIcon, text: str, parent: typing.Optional[QWidget] = ...) -> None: ... - - def focusOutEvent(self, a0: QtGui.QFocusEvent) -> None: ... - def focusInEvent(self, a0: QtGui.QFocusEvent) -> None: ... - def keyPressEvent(self, a0: QtGui.QKeyEvent) -> None: ... - def paintEvent(self, a0: QtGui.QPaintEvent) -> None: ... - def event(self, e: QtCore.QEvent) -> bool: ... - def initStyleOption(self, option: 'QStyleOptionButton') -> None: ... - def showMenu(self) -> None: ... - def isFlat(self) -> bool: ... - def setFlat(self, a0: bool) -> None: ... - def menu(self) -> 'QMenu': ... - def setMenu(self, menu: 'QMenu') -> None: ... - def setDefault(self, a0: bool) -> None: ... - def isDefault(self) -> bool: ... - def setAutoDefault(self, a0: bool) -> None: ... - def autoDefault(self) -> bool: ... - def minimumSizeHint(self) -> QtCore.QSize: ... - def sizeHint(self) -> QtCore.QSize: ... - - -class QCommandLinkButton(QPushButton): - - @typing.overload - def __init__(self, parent: typing.Optional[QWidget] = ...) -> None: ... - @typing.overload - def __init__(self, text: str, parent: typing.Optional[QWidget] = ...) -> None: ... - @typing.overload - def __init__(self, text: str, description: str, parent: typing.Optional[QWidget] = ...) -> None: ... - - def paintEvent(self, a0: QtGui.QPaintEvent) -> None: ... - def event(self, e: QtCore.QEvent) -> bool: ... - def minimumSizeHint(self) -> QtCore.QSize: ... - def heightForWidth(self, a0: int) -> int: ... - def sizeHint(self) -> QtCore.QSize: ... - def setDescription(self, description: str) -> None: ... - def description(self) -> str: ... - - -class QStyle(QtCore.QObject): - - class RequestSoftwareInputPanel(int): ... - RSIP_OnMouseClickAndAlreadyFocused = ... # type: 'QStyle.RequestSoftwareInputPanel' - RSIP_OnMouseClick = ... # type: 'QStyle.RequestSoftwareInputPanel' - - class StandardPixmap(int): ... - SP_TitleBarMenuButton = ... # type: 'QStyle.StandardPixmap' - SP_TitleBarMinButton = ... # type: 'QStyle.StandardPixmap' - SP_TitleBarMaxButton = ... # type: 'QStyle.StandardPixmap' - SP_TitleBarCloseButton = ... # type: 'QStyle.StandardPixmap' - SP_TitleBarNormalButton = ... # type: 'QStyle.StandardPixmap' - SP_TitleBarShadeButton = ... # type: 'QStyle.StandardPixmap' - SP_TitleBarUnshadeButton = ... # type: 'QStyle.StandardPixmap' - SP_TitleBarContextHelpButton = ... # type: 'QStyle.StandardPixmap' - SP_DockWidgetCloseButton = ... # type: 'QStyle.StandardPixmap' - SP_MessageBoxInformation = ... # type: 'QStyle.StandardPixmap' - SP_MessageBoxWarning = ... # type: 'QStyle.StandardPixmap' - SP_MessageBoxCritical = ... # type: 'QStyle.StandardPixmap' - SP_MessageBoxQuestion = ... # type: 'QStyle.StandardPixmap' - SP_DesktopIcon = ... # type: 'QStyle.StandardPixmap' - SP_TrashIcon = ... # type: 'QStyle.StandardPixmap' - SP_ComputerIcon = ... # type: 'QStyle.StandardPixmap' - SP_DriveFDIcon = ... # type: 'QStyle.StandardPixmap' - SP_DriveHDIcon = ... # type: 'QStyle.StandardPixmap' - SP_DriveCDIcon = ... # type: 'QStyle.StandardPixmap' - SP_DriveDVDIcon = ... # type: 'QStyle.StandardPixmap' - SP_DriveNetIcon = ... # type: 'QStyle.StandardPixmap' - SP_DirOpenIcon = ... # type: 'QStyle.StandardPixmap' - SP_DirClosedIcon = ... # type: 'QStyle.StandardPixmap' - SP_DirLinkIcon = ... # type: 'QStyle.StandardPixmap' - SP_FileIcon = ... # type: 'QStyle.StandardPixmap' - SP_FileLinkIcon = ... # type: 'QStyle.StandardPixmap' - SP_ToolBarHorizontalExtensionButton = ... # type: 'QStyle.StandardPixmap' - SP_ToolBarVerticalExtensionButton = ... # type: 'QStyle.StandardPixmap' - SP_FileDialogStart = ... # type: 'QStyle.StandardPixmap' - SP_FileDialogEnd = ... # type: 'QStyle.StandardPixmap' - SP_FileDialogToParent = ... # type: 'QStyle.StandardPixmap' - SP_FileDialogNewFolder = ... # type: 'QStyle.StandardPixmap' - SP_FileDialogDetailedView = ... # type: 'QStyle.StandardPixmap' - SP_FileDialogInfoView = ... # type: 'QStyle.StandardPixmap' - SP_FileDialogContentsView = ... # type: 'QStyle.StandardPixmap' - SP_FileDialogListView = ... # type: 'QStyle.StandardPixmap' - SP_FileDialogBack = ... # type: 'QStyle.StandardPixmap' - SP_DirIcon = ... # type: 'QStyle.StandardPixmap' - SP_DialogOkButton = ... # type: 'QStyle.StandardPixmap' - SP_DialogCancelButton = ... # type: 'QStyle.StandardPixmap' - SP_DialogHelpButton = ... # type: 'QStyle.StandardPixmap' - SP_DialogOpenButton = ... # type: 'QStyle.StandardPixmap' - SP_DialogSaveButton = ... # type: 'QStyle.StandardPixmap' - SP_DialogCloseButton = ... # type: 'QStyle.StandardPixmap' - SP_DialogApplyButton = ... # type: 'QStyle.StandardPixmap' - SP_DialogResetButton = ... # type: 'QStyle.StandardPixmap' - SP_DialogDiscardButton = ... # type: 'QStyle.StandardPixmap' - SP_DialogYesButton = ... # type: 'QStyle.StandardPixmap' - SP_DialogNoButton = ... # type: 'QStyle.StandardPixmap' - SP_ArrowUp = ... # type: 'QStyle.StandardPixmap' - SP_ArrowDown = ... # type: 'QStyle.StandardPixmap' - SP_ArrowLeft = ... # type: 'QStyle.StandardPixmap' - SP_ArrowRight = ... # type: 'QStyle.StandardPixmap' - SP_ArrowBack = ... # type: 'QStyle.StandardPixmap' - SP_ArrowForward = ... # type: 'QStyle.StandardPixmap' - SP_DirHomeIcon = ... # type: 'QStyle.StandardPixmap' - SP_CommandLink = ... # type: 'QStyle.StandardPixmap' - SP_VistaShield = ... # type: 'QStyle.StandardPixmap' - SP_BrowserReload = ... # type: 'QStyle.StandardPixmap' - SP_BrowserStop = ... # type: 'QStyle.StandardPixmap' - SP_MediaPlay = ... # type: 'QStyle.StandardPixmap' - SP_MediaStop = ... # type: 'QStyle.StandardPixmap' - SP_MediaPause = ... # type: 'QStyle.StandardPixmap' - SP_MediaSkipForward = ... # type: 'QStyle.StandardPixmap' - SP_MediaSkipBackward = ... # type: 'QStyle.StandardPixmap' - SP_MediaSeekForward = ... # type: 'QStyle.StandardPixmap' - SP_MediaSeekBackward = ... # type: 'QStyle.StandardPixmap' - SP_MediaVolume = ... # type: 'QStyle.StandardPixmap' - SP_MediaVolumeMuted = ... # type: 'QStyle.StandardPixmap' - SP_DirLinkOpenIcon = ... # type: 'QStyle.StandardPixmap' - SP_LineEditClearButton = ... # type: 'QStyle.StandardPixmap' - SP_CustomBase = ... # type: 'QStyle.StandardPixmap' - - class StyleHint(int): ... - SH_EtchDisabledText = ... # type: 'QStyle.StyleHint' - SH_DitherDisabledText = ... # type: 'QStyle.StyleHint' - SH_ScrollBar_MiddleClickAbsolutePosition = ... # type: 'QStyle.StyleHint' - SH_ScrollBar_ScrollWhenPointerLeavesControl = ... # type: 'QStyle.StyleHint' - SH_TabBar_SelectMouseType = ... # type: 'QStyle.StyleHint' - SH_TabBar_Alignment = ... # type: 'QStyle.StyleHint' - SH_Header_ArrowAlignment = ... # type: 'QStyle.StyleHint' - SH_Slider_SnapToValue = ... # type: 'QStyle.StyleHint' - SH_Slider_SloppyKeyEvents = ... # type: 'QStyle.StyleHint' - SH_ProgressDialog_CenterCancelButton = ... # type: 'QStyle.StyleHint' - SH_ProgressDialog_TextLabelAlignment = ... # type: 'QStyle.StyleHint' - SH_PrintDialog_RightAlignButtons = ... # type: 'QStyle.StyleHint' - SH_MainWindow_SpaceBelowMenuBar = ... # type: 'QStyle.StyleHint' - SH_FontDialog_SelectAssociatedText = ... # type: 'QStyle.StyleHint' - SH_Menu_AllowActiveAndDisabled = ... # type: 'QStyle.StyleHint' - SH_Menu_SpaceActivatesItem = ... # type: 'QStyle.StyleHint' - SH_Menu_SubMenuPopupDelay = ... # type: 'QStyle.StyleHint' - SH_ScrollView_FrameOnlyAroundContents = ... # type: 'QStyle.StyleHint' - SH_MenuBar_AltKeyNavigation = ... # type: 'QStyle.StyleHint' - SH_ComboBox_ListMouseTracking = ... # type: 'QStyle.StyleHint' - SH_Menu_MouseTracking = ... # type: 'QStyle.StyleHint' - SH_MenuBar_MouseTracking = ... # type: 'QStyle.StyleHint' - SH_ItemView_ChangeHighlightOnFocus = ... # type: 'QStyle.StyleHint' - SH_Widget_ShareActivation = ... # type: 'QStyle.StyleHint' - SH_Workspace_FillSpaceOnMaximize = ... # type: 'QStyle.StyleHint' - SH_ComboBox_Popup = ... # type: 'QStyle.StyleHint' - SH_TitleBar_NoBorder = ... # type: 'QStyle.StyleHint' - SH_ScrollBar_StopMouseOverSlider = ... # type: 'QStyle.StyleHint' - SH_BlinkCursorWhenTextSelected = ... # type: 'QStyle.StyleHint' - SH_RichText_FullWidthSelection = ... # type: 'QStyle.StyleHint' - SH_Menu_Scrollable = ... # type: 'QStyle.StyleHint' - SH_GroupBox_TextLabelVerticalAlignment = ... # type: 'QStyle.StyleHint' - SH_GroupBox_TextLabelColor = ... # type: 'QStyle.StyleHint' - SH_Menu_SloppySubMenus = ... # type: 'QStyle.StyleHint' - SH_Table_GridLineColor = ... # type: 'QStyle.StyleHint' - SH_LineEdit_PasswordCharacter = ... # type: 'QStyle.StyleHint' - SH_DialogButtons_DefaultButton = ... # type: 'QStyle.StyleHint' - SH_ToolBox_SelectedPageTitleBold = ... # type: 'QStyle.StyleHint' - SH_TabBar_PreferNoArrows = ... # type: 'QStyle.StyleHint' - SH_ScrollBar_LeftClickAbsolutePosition = ... # type: 'QStyle.StyleHint' - SH_UnderlineShortcut = ... # type: 'QStyle.StyleHint' - SH_SpinBox_AnimateButton = ... # type: 'QStyle.StyleHint' - SH_SpinBox_KeyPressAutoRepeatRate = ... # type: 'QStyle.StyleHint' - SH_SpinBox_ClickAutoRepeatRate = ... # type: 'QStyle.StyleHint' - SH_Menu_FillScreenWithScroll = ... # type: 'QStyle.StyleHint' - SH_ToolTipLabel_Opacity = ... # type: 'QStyle.StyleHint' - SH_DrawMenuBarSeparator = ... # type: 'QStyle.StyleHint' - SH_TitleBar_ModifyNotification = ... # type: 'QStyle.StyleHint' - SH_Button_FocusPolicy = ... # type: 'QStyle.StyleHint' - SH_MessageBox_UseBorderForButtonSpacing = ... # type: 'QStyle.StyleHint' - SH_TitleBar_AutoRaise = ... # type: 'QStyle.StyleHint' - SH_ToolButton_PopupDelay = ... # type: 'QStyle.StyleHint' - SH_FocusFrame_Mask = ... # type: 'QStyle.StyleHint' - SH_RubberBand_Mask = ... # type: 'QStyle.StyleHint' - SH_WindowFrame_Mask = ... # type: 'QStyle.StyleHint' - SH_SpinControls_DisableOnBounds = ... # type: 'QStyle.StyleHint' - SH_Dial_BackgroundRole = ... # type: 'QStyle.StyleHint' - SH_ComboBox_LayoutDirection = ... # type: 'QStyle.StyleHint' - SH_ItemView_EllipsisLocation = ... # type: 'QStyle.StyleHint' - SH_ItemView_ShowDecorationSelected = ... # type: 'QStyle.StyleHint' - SH_ItemView_ActivateItemOnSingleClick = ... # type: 'QStyle.StyleHint' - SH_ScrollBar_ContextMenu = ... # type: 'QStyle.StyleHint' - SH_ScrollBar_RollBetweenButtons = ... # type: 'QStyle.StyleHint' - SH_Slider_StopMouseOverSlider = ... # type: 'QStyle.StyleHint' - SH_Slider_AbsoluteSetButtons = ... # type: 'QStyle.StyleHint' - SH_Slider_PageSetButtons = ... # type: 'QStyle.StyleHint' - SH_Menu_KeyboardSearch = ... # type: 'QStyle.StyleHint' - SH_TabBar_ElideMode = ... # type: 'QStyle.StyleHint' - SH_DialogButtonLayout = ... # type: 'QStyle.StyleHint' - SH_ComboBox_PopupFrameStyle = ... # type: 'QStyle.StyleHint' - SH_MessageBox_TextInteractionFlags = ... # type: 'QStyle.StyleHint' - SH_DialogButtonBox_ButtonsHaveIcons = ... # type: 'QStyle.StyleHint' - SH_SpellCheckUnderlineStyle = ... # type: 'QStyle.StyleHint' - SH_MessageBox_CenterButtons = ... # type: 'QStyle.StyleHint' - SH_Menu_SelectionWrap = ... # type: 'QStyle.StyleHint' - SH_ItemView_MovementWithoutUpdatingSelection = ... # type: 'QStyle.StyleHint' - SH_ToolTip_Mask = ... # type: 'QStyle.StyleHint' - SH_FocusFrame_AboveWidget = ... # type: 'QStyle.StyleHint' - SH_TextControl_FocusIndicatorTextCharFormat = ... # type: 'QStyle.StyleHint' - SH_WizardStyle = ... # type: 'QStyle.StyleHint' - SH_ItemView_ArrowKeysNavigateIntoChildren = ... # type: 'QStyle.StyleHint' - SH_Menu_Mask = ... # type: 'QStyle.StyleHint' - SH_Menu_FlashTriggeredItem = ... # type: 'QStyle.StyleHint' - SH_Menu_FadeOutOnHide = ... # type: 'QStyle.StyleHint' - SH_SpinBox_ClickAutoRepeatThreshold = ... # type: 'QStyle.StyleHint' - SH_ItemView_PaintAlternatingRowColorsForEmptyArea = ... # type: 'QStyle.StyleHint' - SH_FormLayoutWrapPolicy = ... # type: 'QStyle.StyleHint' - SH_TabWidget_DefaultTabPosition = ... # type: 'QStyle.StyleHint' - SH_ToolBar_Movable = ... # type: 'QStyle.StyleHint' - SH_FormLayoutFieldGrowthPolicy = ... # type: 'QStyle.StyleHint' - SH_FormLayoutFormAlignment = ... # type: 'QStyle.StyleHint' - SH_FormLayoutLabelAlignment = ... # type: 'QStyle.StyleHint' - SH_ItemView_DrawDelegateFrame = ... # type: 'QStyle.StyleHint' - SH_TabBar_CloseButtonPosition = ... # type: 'QStyle.StyleHint' - SH_DockWidget_ButtonsHaveFrame = ... # type: 'QStyle.StyleHint' - SH_ToolButtonStyle = ... # type: 'QStyle.StyleHint' - SH_RequestSoftwareInputPanel = ... # type: 'QStyle.StyleHint' - SH_ListViewExpand_SelectMouseType = ... # type: 'QStyle.StyleHint' - SH_ScrollBar_Transient = ... # type: 'QStyle.StyleHint' - SH_Menu_SupportsSections = ... # type: 'QStyle.StyleHint' - SH_ToolTip_WakeUpDelay = ... # type: 'QStyle.StyleHint' - SH_ToolTip_FallAsleepDelay = ... # type: 'QStyle.StyleHint' - SH_Widget_Animate = ... # type: 'QStyle.StyleHint' - SH_Splitter_OpaqueResize = ... # type: 'QStyle.StyleHint' - SH_LineEdit_PasswordMaskDelay = ... # type: 'QStyle.StyleHint' - SH_TabBar_ChangeCurrentDelay = ... # type: 'QStyle.StyleHint' - SH_Menu_SubMenuUniDirection = ... # type: 'QStyle.StyleHint' - SH_Menu_SubMenuUniDirectionFailCount = ... # type: 'QStyle.StyleHint' - SH_Menu_SubMenuSloppySelectOtherActions = ... # type: 'QStyle.StyleHint' - SH_Menu_SubMenuSloppyCloseTimeout = ... # type: 'QStyle.StyleHint' - SH_Menu_SubMenuResetWhenReenteringParent = ... # type: 'QStyle.StyleHint' - SH_Menu_SubMenuDontStartSloppyOnLeave = ... # type: 'QStyle.StyleHint' - SH_ItemView_ScrollMode = ... # type: 'QStyle.StyleHint' - SH_CustomBase = ... # type: 'QStyle.StyleHint' - - class ContentsType(int): ... - CT_PushButton = ... # type: 'QStyle.ContentsType' - CT_CheckBox = ... # type: 'QStyle.ContentsType' - CT_RadioButton = ... # type: 'QStyle.ContentsType' - CT_ToolButton = ... # type: 'QStyle.ContentsType' - CT_ComboBox = ... # type: 'QStyle.ContentsType' - CT_Splitter = ... # type: 'QStyle.ContentsType' - CT_ProgressBar = ... # type: 'QStyle.ContentsType' - CT_MenuItem = ... # type: 'QStyle.ContentsType' - CT_MenuBarItem = ... # type: 'QStyle.ContentsType' - CT_MenuBar = ... # type: 'QStyle.ContentsType' - CT_Menu = ... # type: 'QStyle.ContentsType' - CT_TabBarTab = ... # type: 'QStyle.ContentsType' - CT_Slider = ... # type: 'QStyle.ContentsType' - CT_ScrollBar = ... # type: 'QStyle.ContentsType' - CT_LineEdit = ... # type: 'QStyle.ContentsType' - CT_SpinBox = ... # type: 'QStyle.ContentsType' - CT_SizeGrip = ... # type: 'QStyle.ContentsType' - CT_TabWidget = ... # type: 'QStyle.ContentsType' - CT_DialogButtons = ... # type: 'QStyle.ContentsType' - CT_HeaderSection = ... # type: 'QStyle.ContentsType' - CT_GroupBox = ... # type: 'QStyle.ContentsType' - CT_MdiControls = ... # type: 'QStyle.ContentsType' - CT_ItemViewItem = ... # type: 'QStyle.ContentsType' - CT_CustomBase = ... # type: 'QStyle.ContentsType' - - class PixelMetric(int): ... - PM_ButtonMargin = ... # type: 'QStyle.PixelMetric' - PM_ButtonDefaultIndicator = ... # type: 'QStyle.PixelMetric' - PM_MenuButtonIndicator = ... # type: 'QStyle.PixelMetric' - PM_ButtonShiftHorizontal = ... # type: 'QStyle.PixelMetric' - PM_ButtonShiftVertical = ... # type: 'QStyle.PixelMetric' - PM_DefaultFrameWidth = ... # type: 'QStyle.PixelMetric' - PM_SpinBoxFrameWidth = ... # type: 'QStyle.PixelMetric' - PM_ComboBoxFrameWidth = ... # type: 'QStyle.PixelMetric' - PM_MaximumDragDistance = ... # type: 'QStyle.PixelMetric' - PM_ScrollBarExtent = ... # type: 'QStyle.PixelMetric' - PM_ScrollBarSliderMin = ... # type: 'QStyle.PixelMetric' - PM_SliderThickness = ... # type: 'QStyle.PixelMetric' - PM_SliderControlThickness = ... # type: 'QStyle.PixelMetric' - PM_SliderLength = ... # type: 'QStyle.PixelMetric' - PM_SliderTickmarkOffset = ... # type: 'QStyle.PixelMetric' - PM_SliderSpaceAvailable = ... # type: 'QStyle.PixelMetric' - PM_DockWidgetSeparatorExtent = ... # type: 'QStyle.PixelMetric' - PM_DockWidgetHandleExtent = ... # type: 'QStyle.PixelMetric' - PM_DockWidgetFrameWidth = ... # type: 'QStyle.PixelMetric' - PM_TabBarTabOverlap = ... # type: 'QStyle.PixelMetric' - PM_TabBarTabHSpace = ... # type: 'QStyle.PixelMetric' - PM_TabBarTabVSpace = ... # type: 'QStyle.PixelMetric' - PM_TabBarBaseHeight = ... # type: 'QStyle.PixelMetric' - PM_TabBarBaseOverlap = ... # type: 'QStyle.PixelMetric' - PM_ProgressBarChunkWidth = ... # type: 'QStyle.PixelMetric' - PM_SplitterWidth = ... # type: 'QStyle.PixelMetric' - PM_TitleBarHeight = ... # type: 'QStyle.PixelMetric' - PM_MenuScrollerHeight = ... # type: 'QStyle.PixelMetric' - PM_MenuHMargin = ... # type: 'QStyle.PixelMetric' - PM_MenuVMargin = ... # type: 'QStyle.PixelMetric' - PM_MenuPanelWidth = ... # type: 'QStyle.PixelMetric' - PM_MenuTearoffHeight = ... # type: 'QStyle.PixelMetric' - PM_MenuDesktopFrameWidth = ... # type: 'QStyle.PixelMetric' - PM_MenuBarPanelWidth = ... # type: 'QStyle.PixelMetric' - PM_MenuBarItemSpacing = ... # type: 'QStyle.PixelMetric' - PM_MenuBarVMargin = ... # type: 'QStyle.PixelMetric' - PM_MenuBarHMargin = ... # type: 'QStyle.PixelMetric' - PM_IndicatorWidth = ... # type: 'QStyle.PixelMetric' - PM_IndicatorHeight = ... # type: 'QStyle.PixelMetric' - PM_ExclusiveIndicatorWidth = ... # type: 'QStyle.PixelMetric' - PM_ExclusiveIndicatorHeight = ... # type: 'QStyle.PixelMetric' - PM_DialogButtonsSeparator = ... # type: 'QStyle.PixelMetric' - PM_DialogButtonsButtonWidth = ... # type: 'QStyle.PixelMetric' - PM_DialogButtonsButtonHeight = ... # type: 'QStyle.PixelMetric' - PM_MdiSubWindowFrameWidth = ... # type: 'QStyle.PixelMetric' - PM_MDIFrameWidth = ... # type: 'QStyle.PixelMetric' - PM_MdiSubWindowMinimizedWidth = ... # type: 'QStyle.PixelMetric' - PM_MDIMinimizedWidth = ... # type: 'QStyle.PixelMetric' - PM_HeaderMargin = ... # type: 'QStyle.PixelMetric' - PM_HeaderMarkSize = ... # type: 'QStyle.PixelMetric' - PM_HeaderGripMargin = ... # type: 'QStyle.PixelMetric' - PM_TabBarTabShiftHorizontal = ... # type: 'QStyle.PixelMetric' - PM_TabBarTabShiftVertical = ... # type: 'QStyle.PixelMetric' - PM_TabBarScrollButtonWidth = ... # type: 'QStyle.PixelMetric' - PM_ToolBarFrameWidth = ... # type: 'QStyle.PixelMetric' - PM_ToolBarHandleExtent = ... # type: 'QStyle.PixelMetric' - PM_ToolBarItemSpacing = ... # type: 'QStyle.PixelMetric' - PM_ToolBarItemMargin = ... # type: 'QStyle.PixelMetric' - PM_ToolBarSeparatorExtent = ... # type: 'QStyle.PixelMetric' - PM_ToolBarExtensionExtent = ... # type: 'QStyle.PixelMetric' - PM_SpinBoxSliderHeight = ... # type: 'QStyle.PixelMetric' - PM_DefaultTopLevelMargin = ... # type: 'QStyle.PixelMetric' - PM_DefaultChildMargin = ... # type: 'QStyle.PixelMetric' - PM_DefaultLayoutSpacing = ... # type: 'QStyle.PixelMetric' - PM_ToolBarIconSize = ... # type: 'QStyle.PixelMetric' - PM_ListViewIconSize = ... # type: 'QStyle.PixelMetric' - PM_IconViewIconSize = ... # type: 'QStyle.PixelMetric' - PM_SmallIconSize = ... # type: 'QStyle.PixelMetric' - PM_LargeIconSize = ... # type: 'QStyle.PixelMetric' - PM_FocusFrameVMargin = ... # type: 'QStyle.PixelMetric' - PM_FocusFrameHMargin = ... # type: 'QStyle.PixelMetric' - PM_ToolTipLabelFrameWidth = ... # type: 'QStyle.PixelMetric' - PM_CheckBoxLabelSpacing = ... # type: 'QStyle.PixelMetric' - PM_TabBarIconSize = ... # type: 'QStyle.PixelMetric' - PM_SizeGripSize = ... # type: 'QStyle.PixelMetric' - PM_DockWidgetTitleMargin = ... # type: 'QStyle.PixelMetric' - PM_MessageBoxIconSize = ... # type: 'QStyle.PixelMetric' - PM_ButtonIconSize = ... # type: 'QStyle.PixelMetric' - PM_DockWidgetTitleBarButtonMargin = ... # type: 'QStyle.PixelMetric' - PM_RadioButtonLabelSpacing = ... # type: 'QStyle.PixelMetric' - PM_LayoutLeftMargin = ... # type: 'QStyle.PixelMetric' - PM_LayoutTopMargin = ... # type: 'QStyle.PixelMetric' - PM_LayoutRightMargin = ... # type: 'QStyle.PixelMetric' - PM_LayoutBottomMargin = ... # type: 'QStyle.PixelMetric' - PM_LayoutHorizontalSpacing = ... # type: 'QStyle.PixelMetric' - PM_LayoutVerticalSpacing = ... # type: 'QStyle.PixelMetric' - PM_TabBar_ScrollButtonOverlap = ... # type: 'QStyle.PixelMetric' - PM_TextCursorWidth = ... # type: 'QStyle.PixelMetric' - PM_TabCloseIndicatorWidth = ... # type: 'QStyle.PixelMetric' - PM_TabCloseIndicatorHeight = ... # type: 'QStyle.PixelMetric' - PM_ScrollView_ScrollBarSpacing = ... # type: 'QStyle.PixelMetric' - PM_SubMenuOverlap = ... # type: 'QStyle.PixelMetric' - PM_ScrollView_ScrollBarOverlap = ... # type: 'QStyle.PixelMetric' - PM_TreeViewIndentation = ... # type: 'QStyle.PixelMetric' - PM_HeaderDefaultSectionSizeHorizontal = ... # type: 'QStyle.PixelMetric' - PM_HeaderDefaultSectionSizeVertical = ... # type: 'QStyle.PixelMetric' - PM_CustomBase = ... # type: 'QStyle.PixelMetric' - - class SubControl(int): ... - SC_None = ... # type: 'QStyle.SubControl' - SC_ScrollBarAddLine = ... # type: 'QStyle.SubControl' - SC_ScrollBarSubLine = ... # type: 'QStyle.SubControl' - SC_ScrollBarAddPage = ... # type: 'QStyle.SubControl' - SC_ScrollBarSubPage = ... # type: 'QStyle.SubControl' - SC_ScrollBarFirst = ... # type: 'QStyle.SubControl' - SC_ScrollBarLast = ... # type: 'QStyle.SubControl' - SC_ScrollBarSlider = ... # type: 'QStyle.SubControl' - SC_ScrollBarGroove = ... # type: 'QStyle.SubControl' - SC_SpinBoxUp = ... # type: 'QStyle.SubControl' - SC_SpinBoxDown = ... # type: 'QStyle.SubControl' - SC_SpinBoxFrame = ... # type: 'QStyle.SubControl' - SC_SpinBoxEditField = ... # type: 'QStyle.SubControl' - SC_ComboBoxFrame = ... # type: 'QStyle.SubControl' - SC_ComboBoxEditField = ... # type: 'QStyle.SubControl' - SC_ComboBoxArrow = ... # type: 'QStyle.SubControl' - SC_ComboBoxListBoxPopup = ... # type: 'QStyle.SubControl' - SC_SliderGroove = ... # type: 'QStyle.SubControl' - SC_SliderHandle = ... # type: 'QStyle.SubControl' - SC_SliderTickmarks = ... # type: 'QStyle.SubControl' - SC_ToolButton = ... # type: 'QStyle.SubControl' - SC_ToolButtonMenu = ... # type: 'QStyle.SubControl' - SC_TitleBarSysMenu = ... # type: 'QStyle.SubControl' - SC_TitleBarMinButton = ... # type: 'QStyle.SubControl' - SC_TitleBarMaxButton = ... # type: 'QStyle.SubControl' - SC_TitleBarCloseButton = ... # type: 'QStyle.SubControl' - SC_TitleBarNormalButton = ... # type: 'QStyle.SubControl' - SC_TitleBarShadeButton = ... # type: 'QStyle.SubControl' - SC_TitleBarUnshadeButton = ... # type: 'QStyle.SubControl' - SC_TitleBarContextHelpButton = ... # type: 'QStyle.SubControl' - SC_TitleBarLabel = ... # type: 'QStyle.SubControl' - SC_DialGroove = ... # type: 'QStyle.SubControl' - SC_DialHandle = ... # type: 'QStyle.SubControl' - SC_DialTickmarks = ... # type: 'QStyle.SubControl' - SC_GroupBoxCheckBox = ... # type: 'QStyle.SubControl' - SC_GroupBoxLabel = ... # type: 'QStyle.SubControl' - SC_GroupBoxContents = ... # type: 'QStyle.SubControl' - SC_GroupBoxFrame = ... # type: 'QStyle.SubControl' - SC_MdiMinButton = ... # type: 'QStyle.SubControl' - SC_MdiNormalButton = ... # type: 'QStyle.SubControl' - SC_MdiCloseButton = ... # type: 'QStyle.SubControl' - SC_CustomBase = ... # type: 'QStyle.SubControl' - SC_All = ... # type: 'QStyle.SubControl' - - class ComplexControl(int): ... - CC_SpinBox = ... # type: 'QStyle.ComplexControl' - CC_ComboBox = ... # type: 'QStyle.ComplexControl' - CC_ScrollBar = ... # type: 'QStyle.ComplexControl' - CC_Slider = ... # type: 'QStyle.ComplexControl' - CC_ToolButton = ... # type: 'QStyle.ComplexControl' - CC_TitleBar = ... # type: 'QStyle.ComplexControl' - CC_Dial = ... # type: 'QStyle.ComplexControl' - CC_GroupBox = ... # type: 'QStyle.ComplexControl' - CC_MdiControls = ... # type: 'QStyle.ComplexControl' - CC_CustomBase = ... # type: 'QStyle.ComplexControl' - - class SubElement(int): ... - SE_PushButtonContents = ... # type: 'QStyle.SubElement' - SE_PushButtonFocusRect = ... # type: 'QStyle.SubElement' - SE_CheckBoxIndicator = ... # type: 'QStyle.SubElement' - SE_CheckBoxContents = ... # type: 'QStyle.SubElement' - SE_CheckBoxFocusRect = ... # type: 'QStyle.SubElement' - SE_CheckBoxClickRect = ... # type: 'QStyle.SubElement' - SE_RadioButtonIndicator = ... # type: 'QStyle.SubElement' - SE_RadioButtonContents = ... # type: 'QStyle.SubElement' - SE_RadioButtonFocusRect = ... # type: 'QStyle.SubElement' - SE_RadioButtonClickRect = ... # type: 'QStyle.SubElement' - SE_ComboBoxFocusRect = ... # type: 'QStyle.SubElement' - SE_SliderFocusRect = ... # type: 'QStyle.SubElement' - SE_ProgressBarGroove = ... # type: 'QStyle.SubElement' - SE_ProgressBarContents = ... # type: 'QStyle.SubElement' - SE_ProgressBarLabel = ... # type: 'QStyle.SubElement' - SE_ToolBoxTabContents = ... # type: 'QStyle.SubElement' - SE_HeaderLabel = ... # type: 'QStyle.SubElement' - SE_HeaderArrow = ... # type: 'QStyle.SubElement' - SE_TabWidgetTabBar = ... # type: 'QStyle.SubElement' - SE_TabWidgetTabPane = ... # type: 'QStyle.SubElement' - SE_TabWidgetTabContents = ... # type: 'QStyle.SubElement' - SE_TabWidgetLeftCorner = ... # type: 'QStyle.SubElement' - SE_TabWidgetRightCorner = ... # type: 'QStyle.SubElement' - SE_ViewItemCheckIndicator = ... # type: 'QStyle.SubElement' - SE_TabBarTearIndicator = ... # type: 'QStyle.SubElement' - SE_TreeViewDisclosureItem = ... # type: 'QStyle.SubElement' - SE_LineEditContents = ... # type: 'QStyle.SubElement' - SE_FrameContents = ... # type: 'QStyle.SubElement' - SE_DockWidgetCloseButton = ... # type: 'QStyle.SubElement' - SE_DockWidgetFloatButton = ... # type: 'QStyle.SubElement' - SE_DockWidgetTitleBarText = ... # type: 'QStyle.SubElement' - SE_DockWidgetIcon = ... # type: 'QStyle.SubElement' - SE_CheckBoxLayoutItem = ... # type: 'QStyle.SubElement' - SE_ComboBoxLayoutItem = ... # type: 'QStyle.SubElement' - SE_DateTimeEditLayoutItem = ... # type: 'QStyle.SubElement' - SE_DialogButtonBoxLayoutItem = ... # type: 'QStyle.SubElement' - SE_LabelLayoutItem = ... # type: 'QStyle.SubElement' - SE_ProgressBarLayoutItem = ... # type: 'QStyle.SubElement' - SE_PushButtonLayoutItem = ... # type: 'QStyle.SubElement' - SE_RadioButtonLayoutItem = ... # type: 'QStyle.SubElement' - SE_SliderLayoutItem = ... # type: 'QStyle.SubElement' - SE_SpinBoxLayoutItem = ... # type: 'QStyle.SubElement' - SE_ToolButtonLayoutItem = ... # type: 'QStyle.SubElement' - SE_FrameLayoutItem = ... # type: 'QStyle.SubElement' - SE_GroupBoxLayoutItem = ... # type: 'QStyle.SubElement' - SE_TabWidgetLayoutItem = ... # type: 'QStyle.SubElement' - SE_ItemViewItemCheckIndicator = ... # type: 'QStyle.SubElement' - SE_ItemViewItemDecoration = ... # type: 'QStyle.SubElement' - SE_ItemViewItemText = ... # type: 'QStyle.SubElement' - SE_ItemViewItemFocusRect = ... # type: 'QStyle.SubElement' - SE_TabBarTabLeftButton = ... # type: 'QStyle.SubElement' - SE_TabBarTabRightButton = ... # type: 'QStyle.SubElement' - SE_TabBarTabText = ... # type: 'QStyle.SubElement' - SE_ShapedFrameContents = ... # type: 'QStyle.SubElement' - SE_ToolBarHandle = ... # type: 'QStyle.SubElement' - SE_TabBarTearIndicatorLeft = ... # type: 'QStyle.SubElement' - SE_TabBarScrollLeftButton = ... # type: 'QStyle.SubElement' - SE_TabBarScrollRightButton = ... # type: 'QStyle.SubElement' - SE_TabBarTearIndicatorRight = ... # type: 'QStyle.SubElement' - SE_CustomBase = ... # type: 'QStyle.SubElement' - - class ControlElement(int): ... - CE_PushButton = ... # type: 'QStyle.ControlElement' - CE_PushButtonBevel = ... # type: 'QStyle.ControlElement' - CE_PushButtonLabel = ... # type: 'QStyle.ControlElement' - CE_CheckBox = ... # type: 'QStyle.ControlElement' - CE_CheckBoxLabel = ... # type: 'QStyle.ControlElement' - CE_RadioButton = ... # type: 'QStyle.ControlElement' - CE_RadioButtonLabel = ... # type: 'QStyle.ControlElement' - CE_TabBarTab = ... # type: 'QStyle.ControlElement' - CE_TabBarTabShape = ... # type: 'QStyle.ControlElement' - CE_TabBarTabLabel = ... # type: 'QStyle.ControlElement' - CE_ProgressBar = ... # type: 'QStyle.ControlElement' - CE_ProgressBarGroove = ... # type: 'QStyle.ControlElement' - CE_ProgressBarContents = ... # type: 'QStyle.ControlElement' - CE_ProgressBarLabel = ... # type: 'QStyle.ControlElement' - CE_MenuItem = ... # type: 'QStyle.ControlElement' - CE_MenuScroller = ... # type: 'QStyle.ControlElement' - CE_MenuVMargin = ... # type: 'QStyle.ControlElement' - CE_MenuHMargin = ... # type: 'QStyle.ControlElement' - CE_MenuTearoff = ... # type: 'QStyle.ControlElement' - CE_MenuEmptyArea = ... # type: 'QStyle.ControlElement' - CE_MenuBarItem = ... # type: 'QStyle.ControlElement' - CE_MenuBarEmptyArea = ... # type: 'QStyle.ControlElement' - CE_ToolButtonLabel = ... # type: 'QStyle.ControlElement' - CE_Header = ... # type: 'QStyle.ControlElement' - CE_HeaderSection = ... # type: 'QStyle.ControlElement' - CE_HeaderLabel = ... # type: 'QStyle.ControlElement' - CE_ToolBoxTab = ... # type: 'QStyle.ControlElement' - CE_SizeGrip = ... # type: 'QStyle.ControlElement' - CE_Splitter = ... # type: 'QStyle.ControlElement' - CE_RubberBand = ... # type: 'QStyle.ControlElement' - CE_DockWidgetTitle = ... # type: 'QStyle.ControlElement' - CE_ScrollBarAddLine = ... # type: 'QStyle.ControlElement' - CE_ScrollBarSubLine = ... # type: 'QStyle.ControlElement' - CE_ScrollBarAddPage = ... # type: 'QStyle.ControlElement' - CE_ScrollBarSubPage = ... # type: 'QStyle.ControlElement' - CE_ScrollBarSlider = ... # type: 'QStyle.ControlElement' - CE_ScrollBarFirst = ... # type: 'QStyle.ControlElement' - CE_ScrollBarLast = ... # type: 'QStyle.ControlElement' - CE_FocusFrame = ... # type: 'QStyle.ControlElement' - CE_ComboBoxLabel = ... # type: 'QStyle.ControlElement' - CE_ToolBar = ... # type: 'QStyle.ControlElement' - CE_ToolBoxTabShape = ... # type: 'QStyle.ControlElement' - CE_ToolBoxTabLabel = ... # type: 'QStyle.ControlElement' - CE_HeaderEmptyArea = ... # type: 'QStyle.ControlElement' - CE_ColumnViewGrip = ... # type: 'QStyle.ControlElement' - CE_ItemViewItem = ... # type: 'QStyle.ControlElement' - CE_ShapedFrame = ... # type: 'QStyle.ControlElement' - CE_CustomBase = ... # type: 'QStyle.ControlElement' - - class PrimitiveElement(int): ... - PE_Frame = ... # type: 'QStyle.PrimitiveElement' - PE_FrameDefaultButton = ... # type: 'QStyle.PrimitiveElement' - PE_FrameDockWidget = ... # type: 'QStyle.PrimitiveElement' - PE_FrameFocusRect = ... # type: 'QStyle.PrimitiveElement' - PE_FrameGroupBox = ... # type: 'QStyle.PrimitiveElement' - PE_FrameLineEdit = ... # type: 'QStyle.PrimitiveElement' - PE_FrameMenu = ... # type: 'QStyle.PrimitiveElement' - PE_FrameStatusBar = ... # type: 'QStyle.PrimitiveElement' - PE_FrameTabWidget = ... # type: 'QStyle.PrimitiveElement' - PE_FrameWindow = ... # type: 'QStyle.PrimitiveElement' - PE_FrameButtonBevel = ... # type: 'QStyle.PrimitiveElement' - PE_FrameButtonTool = ... # type: 'QStyle.PrimitiveElement' - PE_FrameTabBarBase = ... # type: 'QStyle.PrimitiveElement' - PE_PanelButtonCommand = ... # type: 'QStyle.PrimitiveElement' - PE_PanelButtonBevel = ... # type: 'QStyle.PrimitiveElement' - PE_PanelButtonTool = ... # type: 'QStyle.PrimitiveElement' - PE_PanelMenuBar = ... # type: 'QStyle.PrimitiveElement' - PE_PanelToolBar = ... # type: 'QStyle.PrimitiveElement' - PE_PanelLineEdit = ... # type: 'QStyle.PrimitiveElement' - PE_IndicatorArrowDown = ... # type: 'QStyle.PrimitiveElement' - PE_IndicatorArrowLeft = ... # type: 'QStyle.PrimitiveElement' - PE_IndicatorArrowRight = ... # type: 'QStyle.PrimitiveElement' - PE_IndicatorArrowUp = ... # type: 'QStyle.PrimitiveElement' - PE_IndicatorBranch = ... # type: 'QStyle.PrimitiveElement' - PE_IndicatorButtonDropDown = ... # type: 'QStyle.PrimitiveElement' - PE_IndicatorViewItemCheck = ... # type: 'QStyle.PrimitiveElement' - PE_IndicatorCheckBox = ... # type: 'QStyle.PrimitiveElement' - PE_IndicatorDockWidgetResizeHandle = ... # type: 'QStyle.PrimitiveElement' - PE_IndicatorHeaderArrow = ... # type: 'QStyle.PrimitiveElement' - PE_IndicatorMenuCheckMark = ... # type: 'QStyle.PrimitiveElement' - PE_IndicatorProgressChunk = ... # type: 'QStyle.PrimitiveElement' - PE_IndicatorRadioButton = ... # type: 'QStyle.PrimitiveElement' - PE_IndicatorSpinDown = ... # type: 'QStyle.PrimitiveElement' - PE_IndicatorSpinMinus = ... # type: 'QStyle.PrimitiveElement' - PE_IndicatorSpinPlus = ... # type: 'QStyle.PrimitiveElement' - PE_IndicatorSpinUp = ... # type: 'QStyle.PrimitiveElement' - PE_IndicatorToolBarHandle = ... # type: 'QStyle.PrimitiveElement' - PE_IndicatorToolBarSeparator = ... # type: 'QStyle.PrimitiveElement' - PE_PanelTipLabel = ... # type: 'QStyle.PrimitiveElement' - PE_IndicatorTabTear = ... # type: 'QStyle.PrimitiveElement' - PE_PanelScrollAreaCorner = ... # type: 'QStyle.PrimitiveElement' - PE_Widget = ... # type: 'QStyle.PrimitiveElement' - PE_IndicatorColumnViewArrow = ... # type: 'QStyle.PrimitiveElement' - PE_FrameStatusBarItem = ... # type: 'QStyle.PrimitiveElement' - PE_IndicatorItemViewItemCheck = ... # type: 'QStyle.PrimitiveElement' - PE_IndicatorItemViewItemDrop = ... # type: 'QStyle.PrimitiveElement' - PE_PanelItemViewItem = ... # type: 'QStyle.PrimitiveElement' - PE_PanelItemViewRow = ... # type: 'QStyle.PrimitiveElement' - PE_PanelStatusBar = ... # type: 'QStyle.PrimitiveElement' - PE_IndicatorTabClose = ... # type: 'QStyle.PrimitiveElement' - PE_PanelMenu = ... # type: 'QStyle.PrimitiveElement' - PE_IndicatorTabTearLeft = ... # type: 'QStyle.PrimitiveElement' - PE_IndicatorTabTearRight = ... # type: 'QStyle.PrimitiveElement' - PE_CustomBase = ... # type: 'QStyle.PrimitiveElement' - - class StateFlag(int): ... - State_None = ... # type: 'QStyle.StateFlag' - State_Enabled = ... # type: 'QStyle.StateFlag' - State_Raised = ... # type: 'QStyle.StateFlag' - State_Sunken = ... # type: 'QStyle.StateFlag' - State_Off = ... # type: 'QStyle.StateFlag' - State_NoChange = ... # type: 'QStyle.StateFlag' - State_On = ... # type: 'QStyle.StateFlag' - State_DownArrow = ... # type: 'QStyle.StateFlag' - State_Horizontal = ... # type: 'QStyle.StateFlag' - State_HasFocus = ... # type: 'QStyle.StateFlag' - State_Top = ... # type: 'QStyle.StateFlag' - State_Bottom = ... # type: 'QStyle.StateFlag' - State_FocusAtBorder = ... # type: 'QStyle.StateFlag' - State_AutoRaise = ... # type: 'QStyle.StateFlag' - State_MouseOver = ... # type: 'QStyle.StateFlag' - State_UpArrow = ... # type: 'QStyle.StateFlag' - State_Selected = ... # type: 'QStyle.StateFlag' - State_Active = ... # type: 'QStyle.StateFlag' - State_Open = ... # type: 'QStyle.StateFlag' - State_Children = ... # type: 'QStyle.StateFlag' - State_Item = ... # type: 'QStyle.StateFlag' - State_Sibling = ... # type: 'QStyle.StateFlag' - State_Editing = ... # type: 'QStyle.StateFlag' - State_KeyboardFocusChange = ... # type: 'QStyle.StateFlag' - State_ReadOnly = ... # type: 'QStyle.StateFlag' - State_Window = ... # type: 'QStyle.StateFlag' - State_Small = ... # type: 'QStyle.StateFlag' - State_Mini = ... # type: 'QStyle.StateFlag' - - class State(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QStyle.State', 'QStyle.StateFlag']) -> None: ... - @typing.overload - def __init__(self, a0: 'QStyle.State') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QStyle.State': ... - def __int__(self) -> int: ... - - class SubControls(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QStyle.SubControls', 'QStyle.SubControl']) -> None: ... - @typing.overload - def __init__(self, a0: 'QStyle.SubControls') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QStyle.SubControls': ... - def __int__(self) -> int: ... - - def __init__(self) -> None: ... - - def proxy(self) -> 'QStyle': ... - def combinedLayoutSpacing(self, controls1: typing.Union['QSizePolicy.ControlTypes', 'QSizePolicy.ControlType'], controls2: typing.Union['QSizePolicy.ControlTypes', 'QSizePolicy.ControlType'], orientation: QtCore.Qt.Orientation, option: typing.Optional['QStyleOption'] = ..., widget: typing.Optional[QWidget] = ...) -> int: ... - def layoutSpacing(self, control1: 'QSizePolicy.ControlType', control2: 'QSizePolicy.ControlType', orientation: QtCore.Qt.Orientation, option: typing.Optional['QStyleOption'] = ..., widget: typing.Optional[QWidget] = ...) -> int: ... - @staticmethod - def alignedRect(direction: QtCore.Qt.LayoutDirection, alignment: typing.Union[QtCore.Qt.Alignment, QtCore.Qt.AlignmentFlag], size: QtCore.QSize, rectangle: QtCore.QRect) -> QtCore.QRect: ... - @staticmethod - def visualAlignment(direction: QtCore.Qt.LayoutDirection, alignment: typing.Union[QtCore.Qt.Alignment, QtCore.Qt.AlignmentFlag]) -> QtCore.Qt.Alignment: ... - @staticmethod - def sliderValueFromPosition(min: int, max: int, position: int, span: int, upsideDown: bool = ...) -> int: ... - @staticmethod - def sliderPositionFromValue(min: int, max: int, logicalValue: int, span: int, upsideDown: bool = ...) -> int: ... - @staticmethod - def visualPos(direction: QtCore.Qt.LayoutDirection, boundingRect: QtCore.QRect, logicalPos: QtCore.QPoint) -> QtCore.QPoint: ... - @staticmethod - def visualRect(direction: QtCore.Qt.LayoutDirection, boundingRect: QtCore.QRect, logicalRect: QtCore.QRect) -> QtCore.QRect: ... - def generatedIconPixmap(self, iconMode: QtGui.QIcon.Mode, pixmap: QtGui.QPixmap, opt: 'QStyleOption') -> QtGui.QPixmap: ... - def standardIcon(self, standardIcon: 'QStyle.StandardPixmap', option: typing.Optional['QStyleOption'] = ..., widget: typing.Optional[QWidget] = ...) -> QtGui.QIcon: ... - def standardPixmap(self, standardPixmap: 'QStyle.StandardPixmap', option: typing.Optional['QStyleOption'] = ..., widget: typing.Optional[QWidget] = ...) -> QtGui.QPixmap: ... - def styleHint(self, stylehint: 'QStyle.StyleHint', option: typing.Optional['QStyleOption'] = ..., widget: typing.Optional[QWidget] = ..., returnData: typing.Optional['QStyleHintReturn'] = ...) -> int: ... - def sizeFromContents(self, ct: 'QStyle.ContentsType', opt: 'QStyleOption', contentsSize: QtCore.QSize, widget: typing.Optional[QWidget] = ...) -> QtCore.QSize: ... - def pixelMetric(self, metric: 'QStyle.PixelMetric', option: typing.Optional['QStyleOption'] = ..., widget: typing.Optional[QWidget] = ...) -> int: ... - def subControlRect(self, cc: 'QStyle.ComplexControl', opt: 'QStyleOptionComplex', sc: 'QStyle.SubControl', widget: typing.Optional[QWidget] = ...) -> QtCore.QRect: ... - def hitTestComplexControl(self, cc: 'QStyle.ComplexControl', opt: 'QStyleOptionComplex', pt: QtCore.QPoint, widget: typing.Optional[QWidget] = ...) -> 'QStyle.SubControl': ... - def drawComplexControl(self, cc: 'QStyle.ComplexControl', opt: 'QStyleOptionComplex', p: QtGui.QPainter, widget: typing.Optional[QWidget] = ...) -> None: ... - def subElementRect(self, subElement: 'QStyle.SubElement', option: 'QStyleOption', widget: typing.Optional[QWidget] = ...) -> QtCore.QRect: ... - def drawControl(self, element: 'QStyle.ControlElement', opt: 'QStyleOption', p: QtGui.QPainter, widget: typing.Optional[QWidget] = ...) -> None: ... - def drawPrimitive(self, pe: 'QStyle.PrimitiveElement', opt: 'QStyleOption', p: QtGui.QPainter, widget: typing.Optional[QWidget] = ...) -> None: ... - def standardPalette(self) -> QtGui.QPalette: ... - def drawItemPixmap(self, painter: QtGui.QPainter, rect: QtCore.QRect, alignment: int, pixmap: QtGui.QPixmap) -> None: ... - def drawItemText(self, painter: QtGui.QPainter, rectangle: QtCore.QRect, alignment: int, palette: QtGui.QPalette, enabled: bool, text: str, textRole: QtGui.QPalette.ColorRole = ...) -> None: ... - def itemPixmapRect(self, r: QtCore.QRect, flags: int, pixmap: QtGui.QPixmap) -> QtCore.QRect: ... - def itemTextRect(self, fm: QtGui.QFontMetrics, r: QtCore.QRect, flags: int, enabled: bool, text: str) -> QtCore.QRect: ... - @typing.overload - def unpolish(self, a0: QWidget) -> None: ... - @typing.overload - def unpolish(self, a0: QApplication) -> None: ... - @typing.overload - def polish(self, a0: QWidget) -> None: ... - @typing.overload - def polish(self, a0: QApplication) -> None: ... - @typing.overload - def polish(self, a0: QtGui.QPalette) -> QtGui.QPalette: ... - - -class QCommonStyle(QStyle): - - def __init__(self) -> None: ... - - def layoutSpacing(self, control1: 'QSizePolicy.ControlType', control2: 'QSizePolicy.ControlType', orientation: QtCore.Qt.Orientation, option: typing.Optional['QStyleOption'] = ..., widget: typing.Optional[QWidget] = ...) -> int: ... - def standardIcon(self, standardIcon: QStyle.StandardPixmap, option: typing.Optional['QStyleOption'] = ..., widget: typing.Optional[QWidget] = ...) -> QtGui.QIcon: ... - def generatedIconPixmap(self, iconMode: QtGui.QIcon.Mode, pixmap: QtGui.QPixmap, opt: 'QStyleOption') -> QtGui.QPixmap: ... - def standardPixmap(self, sp: QStyle.StandardPixmap, option: typing.Optional['QStyleOption'] = ..., widget: typing.Optional[QWidget] = ...) -> QtGui.QPixmap: ... - def styleHint(self, sh: QStyle.StyleHint, option: typing.Optional['QStyleOption'] = ..., widget: typing.Optional[QWidget] = ..., returnData: typing.Optional['QStyleHintReturn'] = ...) -> int: ... - def pixelMetric(self, m: QStyle.PixelMetric, option: typing.Optional['QStyleOption'] = ..., widget: typing.Optional[QWidget] = ...) -> int: ... - def sizeFromContents(self, ct: QStyle.ContentsType, opt: 'QStyleOption', contentsSize: QtCore.QSize, widget: typing.Optional[QWidget] = ...) -> QtCore.QSize: ... - def subControlRect(self, cc: QStyle.ComplexControl, opt: 'QStyleOptionComplex', sc: QStyle.SubControl, widget: typing.Optional[QWidget] = ...) -> QtCore.QRect: ... - def hitTestComplexControl(self, cc: QStyle.ComplexControl, opt: 'QStyleOptionComplex', pt: QtCore.QPoint, widget: typing.Optional[QWidget] = ...) -> QStyle.SubControl: ... - def drawComplexControl(self, cc: QStyle.ComplexControl, opt: 'QStyleOptionComplex', p: QtGui.QPainter, widget: typing.Optional[QWidget] = ...) -> None: ... - def subElementRect(self, r: QStyle.SubElement, opt: 'QStyleOption', widget: typing.Optional[QWidget] = ...) -> QtCore.QRect: ... - def drawControl(self, element: QStyle.ControlElement, opt: 'QStyleOption', p: QtGui.QPainter, widget: typing.Optional[QWidget] = ...) -> None: ... - def drawPrimitive(self, pe: QStyle.PrimitiveElement, opt: 'QStyleOption', p: QtGui.QPainter, widget: typing.Optional[QWidget] = ...) -> None: ... - @typing.overload - def unpolish(self, widget: QWidget) -> None: ... - @typing.overload - def unpolish(self, application: QApplication) -> None: ... - @typing.overload - def polish(self, widget: QWidget) -> None: ... - @typing.overload - def polish(self, app: QApplication) -> None: ... - @typing.overload - def polish(self, a0: QtGui.QPalette) -> QtGui.QPalette: ... - - -class QCompleter(QtCore.QObject): - - class ModelSorting(int): ... - UnsortedModel = ... # type: 'QCompleter.ModelSorting' - CaseSensitivelySortedModel = ... # type: 'QCompleter.ModelSorting' - CaseInsensitivelySortedModel = ... # type: 'QCompleter.ModelSorting' - - class CompletionMode(int): ... - PopupCompletion = ... # type: 'QCompleter.CompletionMode' - UnfilteredPopupCompletion = ... # type: 'QCompleter.CompletionMode' - InlineCompletion = ... # type: 'QCompleter.CompletionMode' - - @typing.overload - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - @typing.overload - def __init__(self, model: QtCore.QAbstractItemModel, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - @typing.overload - def __init__(self, list: typing.Iterable[str], parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def filterMode(self) -> QtCore.Qt.MatchFlags: ... - def setFilterMode(self, filterMode: typing.Union[QtCore.Qt.MatchFlags, QtCore.Qt.MatchFlag]) -> None: ... - def setMaxVisibleItems(self, maxItems: int) -> None: ... - def maxVisibleItems(self) -> int: ... - @typing.overload - def highlighted(self, text: str) -> None: ... - @typing.overload - def highlighted(self, index: QtCore.QModelIndex) -> None: ... - @typing.overload - def activated(self, text: str) -> None: ... - @typing.overload - def activated(self, index: QtCore.QModelIndex) -> None: ... - def event(self, a0: QtCore.QEvent) -> bool: ... - def eventFilter(self, o: QtCore.QObject, e: QtCore.QEvent) -> bool: ... - def setWrapAround(self, wrap: bool) -> None: ... - def setCompletionPrefix(self, prefix: str) -> None: ... - def complete(self, rect: QtCore.QRect = ...) -> None: ... - def wrapAround(self) -> bool: ... - def splitPath(self, path: str) -> typing.List[str]: ... - def pathFromIndex(self, index: QtCore.QModelIndex) -> str: ... - def completionPrefix(self) -> str: ... - def completionModel(self) -> QtCore.QAbstractItemModel: ... - def currentCompletion(self) -> str: ... - def currentIndex(self) -> QtCore.QModelIndex: ... - def currentRow(self) -> int: ... - def setCurrentRow(self, row: int) -> bool: ... - def completionCount(self) -> int: ... - def completionRole(self) -> int: ... - def setCompletionRole(self, role: int) -> None: ... - def completionColumn(self) -> int: ... - def setCompletionColumn(self, column: int) -> None: ... - def modelSorting(self) -> 'QCompleter.ModelSorting': ... - def setModelSorting(self, sorting: 'QCompleter.ModelSorting') -> None: ... - def caseSensitivity(self) -> QtCore.Qt.CaseSensitivity: ... - def setCaseSensitivity(self, caseSensitivity: QtCore.Qt.CaseSensitivity) -> None: ... - def setPopup(self, popup: QAbstractItemView) -> None: ... - def popup(self) -> QAbstractItemView: ... - def completionMode(self) -> 'QCompleter.CompletionMode': ... - def setCompletionMode(self, mode: 'QCompleter.CompletionMode') -> None: ... - def model(self) -> QtCore.QAbstractItemModel: ... - def setModel(self, c: QtCore.QAbstractItemModel) -> None: ... - def widget(self) -> QWidget: ... - def setWidget(self, widget: QWidget) -> None: ... - - -class QDataWidgetMapper(QtCore.QObject): - - class SubmitPolicy(int): ... - AutoSubmit = ... # type: 'QDataWidgetMapper.SubmitPolicy' - ManualSubmit = ... # type: 'QDataWidgetMapper.SubmitPolicy' - - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def currentIndexChanged(self, index: int) -> None: ... - def toPrevious(self) -> None: ... - def toNext(self) -> None: ... - def toLast(self) -> None: ... - def toFirst(self) -> None: ... - def submit(self) -> bool: ... - def setCurrentModelIndex(self, index: QtCore.QModelIndex) -> None: ... - def setCurrentIndex(self, index: int) -> None: ... - def revert(self) -> None: ... - def currentIndex(self) -> int: ... - def clearMapping(self) -> None: ... - def mappedWidgetAt(self, section: int) -> QWidget: ... - def mappedSection(self, widget: QWidget) -> int: ... - def mappedPropertyName(self, widget: QWidget) -> QtCore.QByteArray: ... - def removeMapping(self, widget: QWidget) -> None: ... - @typing.overload - def addMapping(self, widget: QWidget, section: int) -> None: ... - @typing.overload - def addMapping(self, widget: QWidget, section: int, propertyName: typing.Union[QtCore.QByteArray, bytes, bytearray]) -> None: ... - def submitPolicy(self) -> 'QDataWidgetMapper.SubmitPolicy': ... - def setSubmitPolicy(self, policy: 'QDataWidgetMapper.SubmitPolicy') -> None: ... - def orientation(self) -> QtCore.Qt.Orientation: ... - def setOrientation(self, aOrientation: QtCore.Qt.Orientation) -> None: ... - def rootIndex(self) -> QtCore.QModelIndex: ... - def setRootIndex(self, index: QtCore.QModelIndex) -> None: ... - def itemDelegate(self) -> QAbstractItemDelegate: ... - def setItemDelegate(self, delegate: QAbstractItemDelegate) -> None: ... - def model(self) -> QtCore.QAbstractItemModel: ... - def setModel(self, model: QtCore.QAbstractItemModel) -> None: ... - - -class QDateTimeEdit(QAbstractSpinBox): - - class Section(int): ... - NoSection = ... # type: 'QDateTimeEdit.Section' - AmPmSection = ... # type: 'QDateTimeEdit.Section' - MSecSection = ... # type: 'QDateTimeEdit.Section' - SecondSection = ... # type: 'QDateTimeEdit.Section' - MinuteSection = ... # type: 'QDateTimeEdit.Section' - HourSection = ... # type: 'QDateTimeEdit.Section' - DaySection = ... # type: 'QDateTimeEdit.Section' - MonthSection = ... # type: 'QDateTimeEdit.Section' - YearSection = ... # type: 'QDateTimeEdit.Section' - TimeSections_Mask = ... # type: 'QDateTimeEdit.Section' - DateSections_Mask = ... # type: 'QDateTimeEdit.Section' - - class Sections(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QDateTimeEdit.Sections', 'QDateTimeEdit.Section']) -> None: ... - @typing.overload - def __init__(self, a0: 'QDateTimeEdit.Sections') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QDateTimeEdit.Sections': ... - def __int__(self) -> int: ... - - @typing.overload - def __init__(self, parent: typing.Optional[QWidget] = ...) -> None: ... - @typing.overload - def __init__(self, datetime: typing.Union[QtCore.QDateTime, datetime.datetime], parent: typing.Optional[QWidget] = ...) -> None: ... - @typing.overload - def __init__(self, date: typing.Union[QtCore.QDate, datetime.date], parent: typing.Optional[QWidget] = ...) -> None: ... - @typing.overload - def __init__(self, time: typing.Union[QtCore.QTime, datetime.time], parent: typing.Optional[QWidget] = ...) -> None: ... - - def setTimeSpec(self, spec: QtCore.Qt.TimeSpec) -> None: ... - def timeSpec(self) -> QtCore.Qt.TimeSpec: ... - def setCalendarWidget(self, calendarWidget: QCalendarWidget) -> None: ... - def calendarWidget(self) -> QCalendarWidget: ... - def setDateTimeRange(self, min: typing.Union[QtCore.QDateTime, datetime.datetime], max: typing.Union[QtCore.QDateTime, datetime.datetime]) -> None: ... - def setMaximumDateTime(self, dt: typing.Union[QtCore.QDateTime, datetime.datetime]) -> None: ... - def clearMaximumDateTime(self) -> None: ... - def maximumDateTime(self) -> QtCore.QDateTime: ... - def setMinimumDateTime(self, dt: typing.Union[QtCore.QDateTime, datetime.datetime]) -> None: ... - def clearMinimumDateTime(self) -> None: ... - def minimumDateTime(self) -> QtCore.QDateTime: ... - def stepEnabled(self) -> QAbstractSpinBox.StepEnabled: ... - def textFromDateTime(self, dt: typing.Union[QtCore.QDateTime, datetime.datetime]) -> str: ... - def dateTimeFromText(self, text: str) -> QtCore.QDateTime: ... - def fixup(self, input: str) -> str: ... - def validate(self, input: str, pos: int) -> typing.Tuple[QtGui.QValidator.State, str, int]: ... - def paintEvent(self, event: QtGui.QPaintEvent) -> None: ... - def mousePressEvent(self, event: QtGui.QMouseEvent) -> None: ... - def focusNextPrevChild(self, next: bool) -> bool: ... - def focusInEvent(self, e: QtGui.QFocusEvent) -> None: ... - def wheelEvent(self, e: QtGui.QWheelEvent) -> None: ... - def keyPressEvent(self, e: QtGui.QKeyEvent) -> None: ... - def initStyleOption(self, option: 'QStyleOptionSpinBox') -> None: ... - def setTime(self, time: typing.Union[QtCore.QTime, datetime.time]) -> None: ... - def setDate(self, date: typing.Union[QtCore.QDate, datetime.date]) -> None: ... - def setDateTime(self, dateTime: typing.Union[QtCore.QDateTime, datetime.datetime]) -> None: ... - def dateChanged(self, date: typing.Union[QtCore.QDate, datetime.date]) -> None: ... - def timeChanged(self, date: typing.Union[QtCore.QTime, datetime.time]) -> None: ... - def dateTimeChanged(self, date: typing.Union[QtCore.QDateTime, datetime.datetime]) -> None: ... - def sectionCount(self) -> int: ... - def setCurrentSectionIndex(self, index: int) -> None: ... - def currentSectionIndex(self) -> int: ... - def sectionAt(self, index: int) -> 'QDateTimeEdit.Section': ... - def event(self, e: QtCore.QEvent) -> bool: ... - def stepBy(self, steps: int) -> None: ... - def clear(self) -> None: ... - def sizeHint(self) -> QtCore.QSize: ... - def setSelectedSection(self, section: 'QDateTimeEdit.Section') -> None: ... - def setCalendarPopup(self, enable: bool) -> None: ... - def calendarPopup(self) -> bool: ... - def setDisplayFormat(self, format: str) -> None: ... - def displayFormat(self) -> str: ... - def sectionText(self, s: 'QDateTimeEdit.Section') -> str: ... - def setCurrentSection(self, section: 'QDateTimeEdit.Section') -> None: ... - def currentSection(self) -> 'QDateTimeEdit.Section': ... - def displayedSections(self) -> 'QDateTimeEdit.Sections': ... - def setTimeRange(self, min: typing.Union[QtCore.QTime, datetime.time], max: typing.Union[QtCore.QTime, datetime.time]) -> None: ... - def clearMaximumTime(self) -> None: ... - def setMaximumTime(self, max: typing.Union[QtCore.QTime, datetime.time]) -> None: ... - def maximumTime(self) -> QtCore.QTime: ... - def clearMinimumTime(self) -> None: ... - def setMinimumTime(self, min: typing.Union[QtCore.QTime, datetime.time]) -> None: ... - def minimumTime(self) -> QtCore.QTime: ... - def setDateRange(self, min: typing.Union[QtCore.QDate, datetime.date], max: typing.Union[QtCore.QDate, datetime.date]) -> None: ... - def clearMaximumDate(self) -> None: ... - def setMaximumDate(self, max: typing.Union[QtCore.QDate, datetime.date]) -> None: ... - def maximumDate(self) -> QtCore.QDate: ... - def clearMinimumDate(self) -> None: ... - def setMinimumDate(self, min: typing.Union[QtCore.QDate, datetime.date]) -> None: ... - def minimumDate(self) -> QtCore.QDate: ... - def time(self) -> QtCore.QTime: ... - def date(self) -> QtCore.QDate: ... - def dateTime(self) -> QtCore.QDateTime: ... - - -class QTimeEdit(QDateTimeEdit): - - @typing.overload - def __init__(self, parent: typing.Optional[QWidget] = ...) -> None: ... - @typing.overload - def __init__(self, time: typing.Union[QtCore.QTime, datetime.time], parent: typing.Optional[QWidget] = ...) -> None: ... - - -class QDateEdit(QDateTimeEdit): - - @typing.overload - def __init__(self, parent: typing.Optional[QWidget] = ...) -> None: ... - @typing.overload - def __init__(self, date: typing.Union[QtCore.QDate, datetime.date], parent: typing.Optional[QWidget] = ...) -> None: ... - - -class QDesktopWidget(QWidget): - - def __init__(self) -> None: ... - - def resizeEvent(self, e: QtGui.QResizeEvent) -> None: ... - def primaryScreenChanged(self) -> None: ... - def screenCountChanged(self, a0: int) -> None: ... - def workAreaResized(self, a0: int) -> None: ... - def resized(self, a0: int) -> None: ... - @typing.overload - def availableGeometry(self, screen: int = ...) -> QtCore.QRect: ... - @typing.overload - def availableGeometry(self, widget: QWidget) -> QtCore.QRect: ... - @typing.overload - def availableGeometry(self, point: QtCore.QPoint) -> QtCore.QRect: ... - @typing.overload - def screenGeometry(self, screen: int = ...) -> QtCore.QRect: ... - @typing.overload - def screenGeometry(self, widget: QWidget) -> QtCore.QRect: ... - @typing.overload - def screenGeometry(self, point: QtCore.QPoint) -> QtCore.QRect: ... - def screenCount(self) -> int: ... - def screen(self, screen: int = ...) -> QWidget: ... - @typing.overload - def screenNumber(self, widget: typing.Optional[QWidget] = ...) -> int: ... - @typing.overload - def screenNumber(self, a0: QtCore.QPoint) -> int: ... - def primaryScreen(self) -> int: ... - def isVirtualDesktop(self) -> bool: ... - - -class QDial(QAbstractSlider): - - def __init__(self, parent: typing.Optional[QWidget] = ...) -> None: ... - - def sliderChange(self, change: QAbstractSlider.SliderChange) -> None: ... - def mouseMoveEvent(self, me: QtGui.QMouseEvent) -> None: ... - def mouseReleaseEvent(self, me: QtGui.QMouseEvent) -> None: ... - def mousePressEvent(self, me: QtGui.QMouseEvent) -> None: ... - def paintEvent(self, pe: QtGui.QPaintEvent) -> None: ... - def resizeEvent(self, re: QtGui.QResizeEvent) -> None: ... - def event(self, e: QtCore.QEvent) -> bool: ... - def initStyleOption(self, option: 'QStyleOptionSlider') -> None: ... - def setWrapping(self, on: bool) -> None: ... - def setNotchesVisible(self, visible: bool) -> None: ... - def minimumSizeHint(self) -> QtCore.QSize: ... - def sizeHint(self) -> QtCore.QSize: ... - def notchesVisible(self) -> bool: ... - def notchTarget(self) -> float: ... - def setNotchTarget(self, target: float) -> None: ... - def notchSize(self) -> int: ... - def wrapping(self) -> bool: ... - - -class QDialogButtonBox(QWidget): - - class StandardButton(int): ... - NoButton = ... # type: 'QDialogButtonBox.StandardButton' - Ok = ... # type: 'QDialogButtonBox.StandardButton' - Save = ... # type: 'QDialogButtonBox.StandardButton' - SaveAll = ... # type: 'QDialogButtonBox.StandardButton' - Open = ... # type: 'QDialogButtonBox.StandardButton' - Yes = ... # type: 'QDialogButtonBox.StandardButton' - YesToAll = ... # type: 'QDialogButtonBox.StandardButton' - No = ... # type: 'QDialogButtonBox.StandardButton' - NoToAll = ... # type: 'QDialogButtonBox.StandardButton' - Abort = ... # type: 'QDialogButtonBox.StandardButton' - Retry = ... # type: 'QDialogButtonBox.StandardButton' - Ignore = ... # type: 'QDialogButtonBox.StandardButton' - Close = ... # type: 'QDialogButtonBox.StandardButton' - Cancel = ... # type: 'QDialogButtonBox.StandardButton' - Discard = ... # type: 'QDialogButtonBox.StandardButton' - Help = ... # type: 'QDialogButtonBox.StandardButton' - Apply = ... # type: 'QDialogButtonBox.StandardButton' - Reset = ... # type: 'QDialogButtonBox.StandardButton' - RestoreDefaults = ... # type: 'QDialogButtonBox.StandardButton' - - class ButtonRole(int): ... - InvalidRole = ... # type: 'QDialogButtonBox.ButtonRole' - AcceptRole = ... # type: 'QDialogButtonBox.ButtonRole' - RejectRole = ... # type: 'QDialogButtonBox.ButtonRole' - DestructiveRole = ... # type: 'QDialogButtonBox.ButtonRole' - ActionRole = ... # type: 'QDialogButtonBox.ButtonRole' - HelpRole = ... # type: 'QDialogButtonBox.ButtonRole' - YesRole = ... # type: 'QDialogButtonBox.ButtonRole' - NoRole = ... # type: 'QDialogButtonBox.ButtonRole' - ResetRole = ... # type: 'QDialogButtonBox.ButtonRole' - ApplyRole = ... # type: 'QDialogButtonBox.ButtonRole' - - class ButtonLayout(int): ... - WinLayout = ... # type: 'QDialogButtonBox.ButtonLayout' - MacLayout = ... # type: 'QDialogButtonBox.ButtonLayout' - KdeLayout = ... # type: 'QDialogButtonBox.ButtonLayout' - GnomeLayout = ... # type: 'QDialogButtonBox.ButtonLayout' - - class StandardButtons(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QDialogButtonBox.StandardButtons', 'QDialogButtonBox.StandardButton']) -> None: ... - @typing.overload - def __init__(self, a0: 'QDialogButtonBox.StandardButtons') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QDialogButtonBox.StandardButtons': ... - def __int__(self) -> int: ... - - @typing.overload - def __init__(self, parent: typing.Optional[QWidget] = ...) -> None: ... - @typing.overload - def __init__(self, orientation: QtCore.Qt.Orientation, parent: typing.Optional[QWidget] = ...) -> None: ... - @typing.overload - def __init__(self, buttons: typing.Union['QDialogButtonBox.StandardButtons', 'QDialogButtonBox.StandardButton'], parent: typing.Optional[QWidget] = ...) -> None: ... - @typing.overload - def __init__(self, buttons: typing.Union['QDialogButtonBox.StandardButtons', 'QDialogButtonBox.StandardButton'], orientation: QtCore.Qt.Orientation, parent: typing.Optional[QWidget] = ...) -> None: ... - - def event(self, event: QtCore.QEvent) -> bool: ... - def changeEvent(self, event: QtCore.QEvent) -> None: ... - def rejected(self) -> None: ... - def helpRequested(self) -> None: ... - def clicked(self, button: QAbstractButton) -> None: ... - def accepted(self) -> None: ... - def centerButtons(self) -> bool: ... - def setCenterButtons(self, center: bool) -> None: ... - def button(self, which: 'QDialogButtonBox.StandardButton') -> QPushButton: ... - def standardButton(self, button: QAbstractButton) -> 'QDialogButtonBox.StandardButton': ... - def standardButtons(self) -> 'QDialogButtonBox.StandardButtons': ... - def setStandardButtons(self, buttons: typing.Union['QDialogButtonBox.StandardButtons', 'QDialogButtonBox.StandardButton']) -> None: ... - def buttonRole(self, button: QAbstractButton) -> 'QDialogButtonBox.ButtonRole': ... - def buttons(self) -> typing.List[QAbstractButton]: ... - def clear(self) -> None: ... - def removeButton(self, button: QAbstractButton) -> None: ... - @typing.overload - def addButton(self, button: QAbstractButton, role: 'QDialogButtonBox.ButtonRole') -> None: ... - @typing.overload - def addButton(self, text: str, role: 'QDialogButtonBox.ButtonRole') -> QPushButton: ... - @typing.overload - def addButton(self, button: 'QDialogButtonBox.StandardButton') -> QPushButton: ... - def orientation(self) -> QtCore.Qt.Orientation: ... - def setOrientation(self, orientation: QtCore.Qt.Orientation) -> None: ... - - -class QDirModel(QtCore.QAbstractItemModel): - - class Roles(int): ... - FileIconRole = ... # type: 'QDirModel.Roles' - FilePathRole = ... # type: 'QDirModel.Roles' - FileNameRole = ... # type: 'QDirModel.Roles' - - @typing.overload - def __init__(self, nameFilters: typing.Iterable[str], filters: typing.Union[QtCore.QDir.Filters, QtCore.QDir.Filter], sort: typing.Union[QtCore.QDir.SortFlags, QtCore.QDir.SortFlag], parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - @typing.overload - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def fileInfo(self, index: QtCore.QModelIndex) -> QtCore.QFileInfo: ... - def fileIcon(self, index: QtCore.QModelIndex) -> QtGui.QIcon: ... - def fileName(self, index: QtCore.QModelIndex) -> str: ... - def filePath(self, index: QtCore.QModelIndex) -> str: ... - def remove(self, index: QtCore.QModelIndex) -> bool: ... - def rmdir(self, index: QtCore.QModelIndex) -> bool: ... - def mkdir(self, parent: QtCore.QModelIndex, name: str) -> QtCore.QModelIndex: ... - def isDir(self, index: QtCore.QModelIndex) -> bool: ... - def refresh(self, parent: QtCore.QModelIndex = ...) -> None: ... - def lazyChildCount(self) -> bool: ... - def setLazyChildCount(self, enable: bool) -> None: ... - def isReadOnly(self) -> bool: ... - def setReadOnly(self, enable: bool) -> None: ... - def resolveSymlinks(self) -> bool: ... - def setResolveSymlinks(self, enable: bool) -> None: ... - def sorting(self) -> QtCore.QDir.SortFlags: ... - def setSorting(self, sort: typing.Union[QtCore.QDir.SortFlags, QtCore.QDir.SortFlag]) -> None: ... - def filter(self) -> QtCore.QDir.Filters: ... - def setFilter(self, filters: typing.Union[QtCore.QDir.Filters, QtCore.QDir.Filter]) -> None: ... - def nameFilters(self) -> typing.List[str]: ... - def setNameFilters(self, filters: typing.Iterable[str]) -> None: ... - def iconProvider(self) -> 'QFileIconProvider': ... - def setIconProvider(self, provider: 'QFileIconProvider') -> None: ... - def supportedDropActions(self) -> QtCore.Qt.DropActions: ... - def dropMimeData(self, data: QtCore.QMimeData, action: QtCore.Qt.DropAction, row: int, column: int, parent: QtCore.QModelIndex) -> bool: ... - def mimeData(self, indexes: typing.Any) -> QtCore.QMimeData: ... - def mimeTypes(self) -> typing.List[str]: ... - def sort(self, column: int, order: QtCore.Qt.SortOrder = ...) -> None: ... - def flags(self, index: QtCore.QModelIndex) -> QtCore.Qt.ItemFlags: ... - def hasChildren(self, parent: QtCore.QModelIndex = ...) -> bool: ... - def headerData(self, section: int, orientation: QtCore.Qt.Orientation, role: int = ...) -> typing.Any: ... - def setData(self, index: QtCore.QModelIndex, value: typing.Any, role: int = ...) -> bool: ... - def data(self, index: QtCore.QModelIndex, role: int = ...) -> typing.Any: ... - def columnCount(self, parent: QtCore.QModelIndex = ...) -> int: ... - def rowCount(self, parent: QtCore.QModelIndex = ...) -> int: ... - @typing.overload - def parent(self, child: QtCore.QModelIndex) -> QtCore.QModelIndex: ... - @typing.overload - def parent(self) -> QtCore.QObject: ... - @typing.overload - def index(self, row: int, column: int, parent: QtCore.QModelIndex = ...) -> QtCore.QModelIndex: ... - @typing.overload - def index(self, path: str, column: int = ...) -> QtCore.QModelIndex: ... - - -class QDockWidget(QWidget): - - class DockWidgetFeature(int): ... - DockWidgetClosable = ... # type: 'QDockWidget.DockWidgetFeature' - DockWidgetMovable = ... # type: 'QDockWidget.DockWidgetFeature' - DockWidgetFloatable = ... # type: 'QDockWidget.DockWidgetFeature' - DockWidgetVerticalTitleBar = ... # type: 'QDockWidget.DockWidgetFeature' - AllDockWidgetFeatures = ... # type: 'QDockWidget.DockWidgetFeature' - NoDockWidgetFeatures = ... # type: 'QDockWidget.DockWidgetFeature' - - class DockWidgetFeatures(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QDockWidget.DockWidgetFeatures', 'QDockWidget.DockWidgetFeature']) -> None: ... - @typing.overload - def __init__(self, a0: 'QDockWidget.DockWidgetFeatures') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QDockWidget.DockWidgetFeatures': ... - def __int__(self) -> int: ... - - @typing.overload - def __init__(self, title: str, parent: typing.Optional[QWidget] = ..., flags: typing.Union[QtCore.Qt.WindowFlags, QtCore.Qt.WindowType] = ...) -> None: ... - @typing.overload - def __init__(self, parent: typing.Optional[QWidget] = ..., flags: typing.Union[QtCore.Qt.WindowFlags, QtCore.Qt.WindowType] = ...) -> None: ... - - def event(self, event: QtCore.QEvent) -> bool: ... - def paintEvent(self, event: QtGui.QPaintEvent) -> None: ... - def closeEvent(self, event: QtGui.QCloseEvent) -> None: ... - def changeEvent(self, event: QtCore.QEvent) -> None: ... - def initStyleOption(self, option: 'QStyleOptionDockWidget') -> None: ... - def visibilityChanged(self, visible: bool) -> None: ... - def dockLocationChanged(self, area: QtCore.Qt.DockWidgetArea) -> None: ... - def allowedAreasChanged(self, allowedAreas: typing.Union[QtCore.Qt.DockWidgetAreas, QtCore.Qt.DockWidgetArea]) -> None: ... - def topLevelChanged(self, topLevel: bool) -> None: ... - def featuresChanged(self, features: typing.Union['QDockWidget.DockWidgetFeatures', 'QDockWidget.DockWidgetFeature']) -> None: ... - def titleBarWidget(self) -> QWidget: ... - def setTitleBarWidget(self, widget: QWidget) -> None: ... - def toggleViewAction(self) -> QAction: ... - def isAreaAllowed(self, area: QtCore.Qt.DockWidgetArea) -> bool: ... - def allowedAreas(self) -> QtCore.Qt.DockWidgetAreas: ... - def setAllowedAreas(self, areas: typing.Union[QtCore.Qt.DockWidgetAreas, QtCore.Qt.DockWidgetArea]) -> None: ... - def isFloating(self) -> bool: ... - def setFloating(self, floating: bool) -> None: ... - def features(self) -> 'QDockWidget.DockWidgetFeatures': ... - def setFeatures(self, features: typing.Union['QDockWidget.DockWidgetFeatures', 'QDockWidget.DockWidgetFeature']) -> None: ... - def setWidget(self, widget: QWidget) -> None: ... - def widget(self) -> QWidget: ... - - -class QErrorMessage(QDialog): - - def __init__(self, parent: typing.Optional[QWidget] = ...) -> None: ... - - def done(self, a0: int) -> None: ... - def changeEvent(self, e: QtCore.QEvent) -> None: ... - @typing.overload - def showMessage(self, message: str) -> None: ... - @typing.overload - def showMessage(self, message: str, type: str) -> None: ... - @staticmethod - def qtHandler() -> 'QErrorMessage': ... - - -class QFileDialog(QDialog): - - class Option(int): ... - ShowDirsOnly = ... # type: 'QFileDialog.Option' - DontResolveSymlinks = ... # type: 'QFileDialog.Option' - DontConfirmOverwrite = ... # type: 'QFileDialog.Option' - DontUseSheet = ... # type: 'QFileDialog.Option' - DontUseNativeDialog = ... # type: 'QFileDialog.Option' - ReadOnly = ... # type: 'QFileDialog.Option' - HideNameFilterDetails = ... # type: 'QFileDialog.Option' - DontUseCustomDirectoryIcons = ... # type: 'QFileDialog.Option' - - class DialogLabel(int): ... - LookIn = ... # type: 'QFileDialog.DialogLabel' - FileName = ... # type: 'QFileDialog.DialogLabel' - FileType = ... # type: 'QFileDialog.DialogLabel' - Accept = ... # type: 'QFileDialog.DialogLabel' - Reject = ... # type: 'QFileDialog.DialogLabel' - - class AcceptMode(int): ... - AcceptOpen = ... # type: 'QFileDialog.AcceptMode' - AcceptSave = ... # type: 'QFileDialog.AcceptMode' - - class FileMode(int): ... - AnyFile = ... # type: 'QFileDialog.FileMode' - ExistingFile = ... # type: 'QFileDialog.FileMode' - Directory = ... # type: 'QFileDialog.FileMode' - ExistingFiles = ... # type: 'QFileDialog.FileMode' - DirectoryOnly = ... # type: 'QFileDialog.FileMode' - - class ViewMode(int): ... - Detail = ... # type: 'QFileDialog.ViewMode' - List = ... # type: 'QFileDialog.ViewMode' - - class Options(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QFileDialog.Options', 'QFileDialog.Option']) -> None: ... - @typing.overload - def __init__(self, a0: 'QFileDialog.Options') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QFileDialog.Options': ... - def __int__(self) -> int: ... - - @typing.overload - def __init__(self, parent: QWidget, f: typing.Union[QtCore.Qt.WindowFlags, QtCore.Qt.WindowType]) -> None: ... - @typing.overload - def __init__(self, parent: typing.Optional[QWidget] = ..., caption: str = ..., directory: str = ..., filter: str = ...) -> None: ... - - def supportedSchemes(self) -> typing.List[str]: ... - def setSupportedSchemes(self, schemes: typing.Iterable[str]) -> None: ... - @staticmethod - def getSaveFileUrl(parent: typing.Optional[QWidget] = ..., caption: str = ..., directory: str = ..., filter: str = ..., initialFilter: str = ..., options: typing.Union['QFileDialog.Options', 'QFileDialog.Option'] = ..., supportedSchemes: typing.Iterable[str] = ...) -> typing.Tuple[QtCore.QUrl, str]: ... - @staticmethod - def getOpenFileUrls(parent: typing.Optional[QWidget] = ..., caption: str = ..., directory: str = ..., filter: str = ..., initialFilter: str = ..., options: typing.Union['QFileDialog.Options', 'QFileDialog.Option'] = ..., supportedSchemes: typing.Iterable[str] = ...) -> typing.Tuple[typing.List[QtCore.QUrl], str]: ... - @staticmethod - def getOpenFileUrl(parent: typing.Optional[QWidget] = ..., caption: str = ..., directory: str = ..., filter: str = ..., initialFilter: str = ..., options: typing.Union['QFileDialog.Options', 'QFileDialog.Option'] = ..., supportedSchemes: typing.Iterable[str] = ...) -> typing.Tuple[QtCore.QUrl, str]: ... - def directoryUrlEntered(self, directory: QtCore.QUrl) -> None: ... - def currentUrlChanged(self, url: QtCore.QUrl) -> None: ... - def urlsSelected(self, urls: typing.Iterable[QtCore.QUrl]) -> None: ... - def urlSelected(self, url: QtCore.QUrl) -> None: ... - def selectMimeTypeFilter(self, filter: str) -> None: ... - def mimeTypeFilters(self) -> typing.List[str]: ... - def setMimeTypeFilters(self, filters: typing.Iterable[str]) -> None: ... - def selectedUrls(self) -> typing.List[QtCore.QUrl]: ... - def selectUrl(self, url: QtCore.QUrl) -> None: ... - def directoryUrl(self) -> QtCore.QUrl: ... - def setDirectoryUrl(self, directory: QtCore.QUrl) -> None: ... - def setVisible(self, visible: bool) -> None: ... - @typing.overload - def open(self) -> None: ... - @typing.overload - def open(self, slot: PYQT_SLOT) -> None: ... - def options(self) -> 'QFileDialog.Options': ... - def setOptions(self, options: typing.Union['QFileDialog.Options', 'QFileDialog.Option']) -> None: ... - def testOption(self, option: 'QFileDialog.Option') -> bool: ... - def setOption(self, option: 'QFileDialog.Option', on: bool = ...) -> None: ... - def setFilter(self, filters: typing.Union[QtCore.QDir.Filters, QtCore.QDir.Filter]) -> None: ... - def filter(self) -> QtCore.QDir.Filters: ... - def selectedNameFilter(self) -> str: ... - def selectNameFilter(self, filter: str) -> None: ... - def nameFilters(self) -> typing.List[str]: ... - def setNameFilters(self, filters: typing.Iterable[str]) -> None: ... - def setNameFilter(self, filter: str) -> None: ... - def proxyModel(self) -> QtCore.QAbstractProxyModel: ... - def setProxyModel(self, model: QtCore.QAbstractProxyModel) -> None: ... - def restoreState(self, state: typing.Union[QtCore.QByteArray, bytes, bytearray]) -> bool: ... - def saveState(self) -> QtCore.QByteArray: ... - def sidebarUrls(self) -> typing.List[QtCore.QUrl]: ... - def setSidebarUrls(self, urls: typing.Iterable[QtCore.QUrl]) -> None: ... - def changeEvent(self, e: QtCore.QEvent) -> None: ... - def accept(self) -> None: ... - def done(self, result: int) -> None: ... - @staticmethod - def getSaveFileName(parent: typing.Optional[QWidget] = ..., caption: str = ..., directory: str = ..., filter: str = ..., initialFilter: str = ..., options: typing.Union['QFileDialog.Options', 'QFileDialog.Option'] = ...) -> typing.Tuple[str, str]: ... - @staticmethod - def getOpenFileNames(parent: typing.Optional[QWidget] = ..., caption: str = ..., directory: str = ..., filter: str = ..., initialFilter: str = ..., options: typing.Union['QFileDialog.Options', 'QFileDialog.Option'] = ...) -> typing.Tuple[typing.List[str], str]: ... - @staticmethod - def getOpenFileName(parent: typing.Optional[QWidget] = ..., caption: str = ..., directory: str = ..., filter: str = ..., initialFilter: str = ..., options: typing.Union['QFileDialog.Options', 'QFileDialog.Option'] = ...) -> typing.Tuple[str, str]: ... - @staticmethod - def getExistingDirectoryUrl(parent: typing.Optional[QWidget] = ..., caption: str = ..., directory: QtCore.QUrl = ..., options: typing.Union['QFileDialog.Options', 'QFileDialog.Option'] = ..., supportedSchemes: typing.Iterable[str] = ...) -> QtCore.QUrl: ... - @staticmethod - def getExistingDirectory(parent: typing.Optional[QWidget] = ..., caption: str = ..., directory: str = ..., options: typing.Union['QFileDialog.Options', 'QFileDialog.Option'] = ...) -> str: ... - def fileSelected(self, file: str) -> None: ... - def filterSelected(self, filter: str) -> None: ... - def filesSelected(self, files: typing.Iterable[str]) -> None: ... - def directoryEntered(self, directory: str) -> None: ... - def currentChanged(self, path: str) -> None: ... - def labelText(self, label: 'QFileDialog.DialogLabel') -> str: ... - def setLabelText(self, label: 'QFileDialog.DialogLabel', text: str) -> None: ... - def iconProvider(self) -> 'QFileIconProvider': ... - def setIconProvider(self, provider: 'QFileIconProvider') -> None: ... - def itemDelegate(self) -> QAbstractItemDelegate: ... - def setItemDelegate(self, delegate: QAbstractItemDelegate) -> None: ... - def history(self) -> typing.List[str]: ... - def setHistory(self, paths: typing.Iterable[str]) -> None: ... - def defaultSuffix(self) -> str: ... - def setDefaultSuffix(self, suffix: str) -> None: ... - def acceptMode(self) -> 'QFileDialog.AcceptMode': ... - def setAcceptMode(self, mode: 'QFileDialog.AcceptMode') -> None: ... - def fileMode(self) -> 'QFileDialog.FileMode': ... - def setFileMode(self, mode: 'QFileDialog.FileMode') -> None: ... - def viewMode(self) -> 'QFileDialog.ViewMode': ... - def setViewMode(self, mode: 'QFileDialog.ViewMode') -> None: ... - def selectedFiles(self) -> typing.List[str]: ... - def selectFile(self, filename: str) -> None: ... - def directory(self) -> QtCore.QDir: ... - @typing.overload - def setDirectory(self, directory: str) -> None: ... - @typing.overload - def setDirectory(self, adirectory: QtCore.QDir) -> None: ... - - -class QFileIconProvider(sip.simplewrapper): - - class Option(int): ... - DontUseCustomDirectoryIcons = ... # type: 'QFileIconProvider.Option' - - class IconType(int): ... - Computer = ... # type: 'QFileIconProvider.IconType' - Desktop = ... # type: 'QFileIconProvider.IconType' - Trashcan = ... # type: 'QFileIconProvider.IconType' - Network = ... # type: 'QFileIconProvider.IconType' - Drive = ... # type: 'QFileIconProvider.IconType' - Folder = ... # type: 'QFileIconProvider.IconType' - File = ... # type: 'QFileIconProvider.IconType' - - class Options(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QFileIconProvider.Options', 'QFileIconProvider.Option']) -> None: ... - @typing.overload - def __init__(self, a0: 'QFileIconProvider.Options') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QFileIconProvider.Options': ... - def __int__(self) -> int: ... - - def __init__(self) -> None: ... - - def options(self) -> 'QFileIconProvider.Options': ... - def setOptions(self, options: 'QFileIconProvider.Options') -> None: ... - def type(self, info: QtCore.QFileInfo) -> str: ... - @typing.overload - def icon(self, type: 'QFileIconProvider.IconType') -> QtGui.QIcon: ... - @typing.overload - def icon(self, info: QtCore.QFileInfo) -> QtGui.QIcon: ... - - -class QFileSystemModel(QtCore.QAbstractItemModel): - - class Roles(int): ... - FileIconRole = ... # type: 'QFileSystemModel.Roles' - FilePathRole = ... # type: 'QFileSystemModel.Roles' - FileNameRole = ... # type: 'QFileSystemModel.Roles' - FilePermissions = ... # type: 'QFileSystemModel.Roles' - - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def sibling(self, row: int, column: int, idx: QtCore.QModelIndex) -> QtCore.QModelIndex: ... - def timerEvent(self, event: QtCore.QTimerEvent) -> None: ... - def event(self, event: QtCore.QEvent) -> bool: ... - def directoryLoaded(self, path: str) -> None: ... - def rootPathChanged(self, newPath: str) -> None: ... - def fileRenamed(self, path: str, oldName: str, newName: str) -> None: ... - def remove(self, index: QtCore.QModelIndex) -> bool: ... - def fileInfo(self, aindex: QtCore.QModelIndex) -> QtCore.QFileInfo: ... - def fileIcon(self, aindex: QtCore.QModelIndex) -> QtGui.QIcon: ... - def fileName(self, aindex: QtCore.QModelIndex) -> str: ... - def rmdir(self, index: QtCore.QModelIndex) -> bool: ... - def permissions(self, index: QtCore.QModelIndex) -> QtCore.QFileDevice.Permissions: ... - def mkdir(self, parent: QtCore.QModelIndex, name: str) -> QtCore.QModelIndex: ... - def lastModified(self, index: QtCore.QModelIndex) -> QtCore.QDateTime: ... - def type(self, index: QtCore.QModelIndex) -> str: ... - def size(self, index: QtCore.QModelIndex) -> int: ... - def isDir(self, index: QtCore.QModelIndex) -> bool: ... - def filePath(self, index: QtCore.QModelIndex) -> str: ... - def nameFilters(self) -> typing.List[str]: ... - def setNameFilters(self, filters: typing.Iterable[str]) -> None: ... - def nameFilterDisables(self) -> bool: ... - def setNameFilterDisables(self, enable: bool) -> None: ... - def isReadOnly(self) -> bool: ... - def setReadOnly(self, enable: bool) -> None: ... - def resolveSymlinks(self) -> bool: ... - def setResolveSymlinks(self, enable: bool) -> None: ... - def filter(self) -> QtCore.QDir.Filters: ... - def setFilter(self, filters: typing.Union[QtCore.QDir.Filters, QtCore.QDir.Filter]) -> None: ... - def iconProvider(self) -> QFileIconProvider: ... - def setIconProvider(self, provider: QFileIconProvider) -> None: ... - def rootDirectory(self) -> QtCore.QDir: ... - def rootPath(self) -> str: ... - def setRootPath(self, path: str) -> QtCore.QModelIndex: ... - def supportedDropActions(self) -> QtCore.Qt.DropActions: ... - def dropMimeData(self, data: QtCore.QMimeData, action: QtCore.Qt.DropAction, row: int, column: int, parent: QtCore.QModelIndex) -> bool: ... - def mimeData(self, indexes: typing.Any) -> QtCore.QMimeData: ... - def mimeTypes(self) -> typing.List[str]: ... - def sort(self, column: int, order: QtCore.Qt.SortOrder = ...) -> None: ... - def flags(self, index: QtCore.QModelIndex) -> QtCore.Qt.ItemFlags: ... - def headerData(self, section: int, orientation: QtCore.Qt.Orientation, role: int = ...) -> typing.Any: ... - def setData(self, idx: QtCore.QModelIndex, value: typing.Any, role: int = ...) -> bool: ... - def data(self, index: QtCore.QModelIndex, role: int = ...) -> typing.Any: ... - def myComputer(self, role: int = ...) -> typing.Any: ... - def columnCount(self, parent: QtCore.QModelIndex = ...) -> int: ... - def rowCount(self, parent: QtCore.QModelIndex = ...) -> int: ... - def fetchMore(self, parent: QtCore.QModelIndex) -> None: ... - def canFetchMore(self, parent: QtCore.QModelIndex) -> bool: ... - def hasChildren(self, parent: QtCore.QModelIndex = ...) -> bool: ... - # def parent(self, child: QtCore.QModelIndex) -> QtCore.QModelIndex: ... - @typing.overload - def index(self, row: int, column: int, parent: QtCore.QModelIndex = ...) -> QtCore.QModelIndex: ... - @typing.overload - def index(self, path: str, column: int = ...) -> QtCore.QModelIndex: ... - - -class QFocusFrame(QWidget): - - def __init__(self, parent: typing.Optional[QWidget] = ...) -> None: ... - - def paintEvent(self, a0: QtGui.QPaintEvent) -> None: ... - def event(self, e: QtCore.QEvent) -> bool: ... - def eventFilter(self, a0: QtCore.QObject, a1: QtCore.QEvent) -> bool: ... - def initStyleOption(self, option: 'QStyleOption') -> None: ... - def widget(self) -> QWidget: ... - def setWidget(self, widget: QWidget) -> None: ... - - -class QFontComboBox(QComboBox): - - class FontFilter(int): ... - AllFonts = ... # type: 'QFontComboBox.FontFilter' - ScalableFonts = ... # type: 'QFontComboBox.FontFilter' - NonScalableFonts = ... # type: 'QFontComboBox.FontFilter' - MonospacedFonts = ... # type: 'QFontComboBox.FontFilter' - ProportionalFonts = ... # type: 'QFontComboBox.FontFilter' - - class FontFilters(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QFontComboBox.FontFilters', 'QFontComboBox.FontFilter']) -> None: ... - @typing.overload - def __init__(self, a0: 'QFontComboBox.FontFilters') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QFontComboBox.FontFilters': ... - def __int__(self) -> int: ... - - def __init__(self, parent: typing.Optional[QWidget] = ...) -> None: ... - - def event(self, e: QtCore.QEvent) -> bool: ... - def currentFontChanged(self, f: QtGui.QFont) -> None: ... - def setCurrentFont(self, f: QtGui.QFont) -> None: ... - def sizeHint(self) -> QtCore.QSize: ... - def currentFont(self) -> QtGui.QFont: ... - def setFontFilters(self, filters: typing.Union['QFontComboBox.FontFilters', 'QFontComboBox.FontFilter']) -> None: ... - def writingSystem(self) -> QtGui.QFontDatabase.WritingSystem: ... - def setWritingSystem(self, a0: QtGui.QFontDatabase.WritingSystem) -> None: ... - def fontFilters(self) -> 'QFontComboBox.FontFilters': ... - - -class QFontDialog(QDialog): - - class FontDialogOption(int): ... - NoButtons = ... # type: 'QFontDialog.FontDialogOption' - DontUseNativeDialog = ... # type: 'QFontDialog.FontDialogOption' - ScalableFonts = ... # type: 'QFontDialog.FontDialogOption' - NonScalableFonts = ... # type: 'QFontDialog.FontDialogOption' - MonospacedFonts = ... # type: 'QFontDialog.FontDialogOption' - ProportionalFonts = ... # type: 'QFontDialog.FontDialogOption' - - class FontDialogOptions(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QFontDialog.FontDialogOptions', 'QFontDialog.FontDialogOption']) -> None: ... - @typing.overload - def __init__(self, a0: 'QFontDialog.FontDialogOptions') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QFontDialog.FontDialogOptions': ... - def __int__(self) -> int: ... - - @typing.overload - def __init__(self, parent: typing.Optional[QWidget] = ...) -> None: ... - @typing.overload - def __init__(self, initial: QtGui.QFont, parent: typing.Optional[QWidget] = ...) -> None: ... - - def fontSelected(self, font: QtGui.QFont) -> None: ... - def currentFontChanged(self, font: QtGui.QFont) -> None: ... - def setVisible(self, visible: bool) -> None: ... - @typing.overload - def open(self) -> None: ... - @typing.overload - def open(self, slot: PYQT_SLOT) -> None: ... - def options(self) -> 'QFontDialog.FontDialogOptions': ... - def setOptions(self, options: typing.Union['QFontDialog.FontDialogOptions', 'QFontDialog.FontDialogOption']) -> None: ... - def testOption(self, option: 'QFontDialog.FontDialogOption') -> bool: ... - def setOption(self, option: 'QFontDialog.FontDialogOption', on: bool = ...) -> None: ... - def selectedFont(self) -> QtGui.QFont: ... - def currentFont(self) -> QtGui.QFont: ... - def setCurrentFont(self, font: QtGui.QFont) -> None: ... - def eventFilter(self, object: QtCore.QObject, event: QtCore.QEvent) -> bool: ... - def done(self, result: int) -> None: ... - def changeEvent(self, e: QtCore.QEvent) -> None: ... - @typing.overload - @staticmethod - def getFont(initial: QtGui.QFont, parent: typing.Optional[QWidget] = ..., caption: str = ..., options: typing.Union['QFontDialog.FontDialogOptions', 'QFontDialog.FontDialogOption'] = ...) -> typing.Tuple[QtGui.QFont, bool]: ... - @typing.overload - @staticmethod - def getFont(parent: typing.Optional[QWidget] = ...) -> typing.Tuple[QtGui.QFont, bool]: ... - - -class QFormLayout(QLayout): - - class ItemRole(int): ... - LabelRole = ... # type: 'QFormLayout.ItemRole' - FieldRole = ... # type: 'QFormLayout.ItemRole' - SpanningRole = ... # type: 'QFormLayout.ItemRole' - - class RowWrapPolicy(int): ... - DontWrapRows = ... # type: 'QFormLayout.RowWrapPolicy' - WrapLongRows = ... # type: 'QFormLayout.RowWrapPolicy' - WrapAllRows = ... # type: 'QFormLayout.RowWrapPolicy' - - class FieldGrowthPolicy(int): ... - FieldsStayAtSizeHint = ... # type: 'QFormLayout.FieldGrowthPolicy' - ExpandingFieldsGrow = ... # type: 'QFormLayout.FieldGrowthPolicy' - AllNonFixedFieldsGrow = ... # type: 'QFormLayout.FieldGrowthPolicy' - - def __init__(self, parent: typing.Optional[QWidget] = ...) -> None: ... - - def rowCount(self) -> int: ... - def count(self) -> int: ... - def expandingDirections(self) -> QtCore.Qt.Orientations: ... - def heightForWidth(self, width: int) -> int: ... - def hasHeightForWidth(self) -> bool: ... - def invalidate(self) -> None: ... - def sizeHint(self) -> QtCore.QSize: ... - def minimumSize(self) -> QtCore.QSize: ... - def setGeometry(self, rect: QtCore.QRect) -> None: ... - def takeAt(self, index: int) -> QLayoutItem: ... - def addItem(self, item: QLayoutItem) -> None: ... - @typing.overload - def labelForField(self, field: QWidget) -> QWidget: ... - @typing.overload - def labelForField(self, field: QLayout) -> QWidget: ... - def getLayoutPosition(self, layout: QLayout) -> typing.Tuple[int, 'QFormLayout.ItemRole']: ... - def getWidgetPosition(self, widget: QWidget) -> typing.Tuple[int, 'QFormLayout.ItemRole']: ... - def getItemPosition(self, index: int) -> typing.Tuple[int, 'QFormLayout.ItemRole']: ... - @typing.overload - def itemAt(self, row: int, role: 'QFormLayout.ItemRole') -> QLayoutItem: ... - @typing.overload - def itemAt(self, index: int) -> QLayoutItem: ... - def setLayout(self, row: int, role: 'QFormLayout.ItemRole', layout: QLayout) -> None: ... - def setWidget(self, row: int, role: 'QFormLayout.ItemRole', widget: QWidget) -> None: ... - def setItem(self, row: int, role: 'QFormLayout.ItemRole', item: QLayoutItem) -> None: ... - @typing.overload - def insertRow(self, row: int, label: QWidget, field: QWidget) -> None: ... - @typing.overload - def insertRow(self, row: int, label: QWidget, field: QLayout) -> None: ... - @typing.overload - def insertRow(self, row: int, labelText: str, field: QWidget) -> None: ... - @typing.overload - def insertRow(self, row: int, labelText: str, field: QLayout) -> None: ... - @typing.overload - def insertRow(self, row: int, widget: QWidget) -> None: ... - @typing.overload - def insertRow(self, row: int, layout: QLayout) -> None: ... - @typing.overload - def addRow(self, label: QWidget, field: QWidget) -> None: ... - @typing.overload - def addRow(self, label: QWidget, field: QLayout) -> None: ... - @typing.overload - def addRow(self, labelText: str, field: QWidget) -> None: ... - @typing.overload - def addRow(self, labelText: str, field: QLayout) -> None: ... - @typing.overload - def addRow(self, widget: QWidget) -> None: ... - @typing.overload - def addRow(self, layout: QLayout) -> None: ... - def setSpacing(self, a0: int) -> None: ... - def spacing(self) -> int: ... - def verticalSpacing(self) -> int: ... - def setVerticalSpacing(self, spacing: int) -> None: ... - def horizontalSpacing(self) -> int: ... - def setHorizontalSpacing(self, spacing: int) -> None: ... - def formAlignment(self) -> QtCore.Qt.Alignment: ... - def setFormAlignment(self, alignment: typing.Union[QtCore.Qt.Alignment, QtCore.Qt.AlignmentFlag]) -> None: ... - def labelAlignment(self) -> QtCore.Qt.Alignment: ... - def setLabelAlignment(self, alignment: typing.Union[QtCore.Qt.Alignment, QtCore.Qt.AlignmentFlag]) -> None: ... - def rowWrapPolicy(self) -> 'QFormLayout.RowWrapPolicy': ... - def setRowWrapPolicy(self, policy: 'QFormLayout.RowWrapPolicy') -> None: ... - def fieldGrowthPolicy(self) -> 'QFormLayout.FieldGrowthPolicy': ... - def setFieldGrowthPolicy(self, policy: 'QFormLayout.FieldGrowthPolicy') -> None: ... - - -class QGesture(QtCore.QObject): - - class GestureCancelPolicy(int): ... - CancelNone = ... # type: 'QGesture.GestureCancelPolicy' - CancelAllInContext = ... # type: 'QGesture.GestureCancelPolicy' - - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def gestureCancelPolicy(self) -> 'QGesture.GestureCancelPolicy': ... - def setGestureCancelPolicy(self, policy: 'QGesture.GestureCancelPolicy') -> None: ... - def unsetHotSpot(self) -> None: ... - def hasHotSpot(self) -> bool: ... - def setHotSpot(self, value: typing.Union[QtCore.QPointF, QtCore.QPoint]) -> None: ... - def hotSpot(self) -> QtCore.QPointF: ... - def state(self) -> QtCore.Qt.GestureState: ... - def gestureType(self) -> QtCore.Qt.GestureType: ... - - -class QPanGesture(QGesture): - - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def setAcceleration(self, value: float) -> None: ... - def setOffset(self, value: typing.Union[QtCore.QPointF, QtCore.QPoint]) -> None: ... - def setLastOffset(self, value: typing.Union[QtCore.QPointF, QtCore.QPoint]) -> None: ... - def acceleration(self) -> float: ... - def delta(self) -> QtCore.QPointF: ... - def offset(self) -> QtCore.QPointF: ... - def lastOffset(self) -> QtCore.QPointF: ... - - -class QPinchGesture(QGesture): - - class ChangeFlag(int): ... - ScaleFactorChanged = ... # type: 'QPinchGesture.ChangeFlag' - RotationAngleChanged = ... # type: 'QPinchGesture.ChangeFlag' - CenterPointChanged = ... # type: 'QPinchGesture.ChangeFlag' - - class ChangeFlags(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QPinchGesture.ChangeFlags', 'QPinchGesture.ChangeFlag']) -> None: ... - @typing.overload - def __init__(self, a0: 'QPinchGesture.ChangeFlags') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QPinchGesture.ChangeFlags': ... - def __int__(self) -> int: ... - - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def setRotationAngle(self, value: float) -> None: ... - def setLastRotationAngle(self, value: float) -> None: ... - def setTotalRotationAngle(self, value: float) -> None: ... - def rotationAngle(self) -> float: ... - def lastRotationAngle(self) -> float: ... - def totalRotationAngle(self) -> float: ... - def setScaleFactor(self, value: float) -> None: ... - def setLastScaleFactor(self, value: float) -> None: ... - def setTotalScaleFactor(self, value: float) -> None: ... - def scaleFactor(self) -> float: ... - def lastScaleFactor(self) -> float: ... - def totalScaleFactor(self) -> float: ... - def setCenterPoint(self, value: typing.Union[QtCore.QPointF, QtCore.QPoint]) -> None: ... - def setLastCenterPoint(self, value: typing.Union[QtCore.QPointF, QtCore.QPoint]) -> None: ... - def setStartCenterPoint(self, value: typing.Union[QtCore.QPointF, QtCore.QPoint]) -> None: ... - def centerPoint(self) -> QtCore.QPointF: ... - def lastCenterPoint(self) -> QtCore.QPointF: ... - def startCenterPoint(self) -> QtCore.QPointF: ... - def setChangeFlags(self, value: typing.Union['QPinchGesture.ChangeFlags', 'QPinchGesture.ChangeFlag']) -> None: ... - def changeFlags(self) -> 'QPinchGesture.ChangeFlags': ... - def setTotalChangeFlags(self, value: typing.Union['QPinchGesture.ChangeFlags', 'QPinchGesture.ChangeFlag']) -> None: ... - def totalChangeFlags(self) -> 'QPinchGesture.ChangeFlags': ... - - -class QSwipeGesture(QGesture): - - class SwipeDirection(int): ... - NoDirection = ... # type: 'QSwipeGesture.SwipeDirection' - Left = ... # type: 'QSwipeGesture.SwipeDirection' - Right = ... # type: 'QSwipeGesture.SwipeDirection' - Up = ... # type: 'QSwipeGesture.SwipeDirection' - Down = ... # type: 'QSwipeGesture.SwipeDirection' - - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def setSwipeAngle(self, value: float) -> None: ... - def swipeAngle(self) -> float: ... - def verticalDirection(self) -> 'QSwipeGesture.SwipeDirection': ... - def horizontalDirection(self) -> 'QSwipeGesture.SwipeDirection': ... - - -class QTapGesture(QGesture): - - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def setPosition(self, pos: typing.Union[QtCore.QPointF, QtCore.QPoint]) -> None: ... - def position(self) -> QtCore.QPointF: ... - - -class QTapAndHoldGesture(QGesture): - - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - @staticmethod - def timeout() -> int: ... - @staticmethod - def setTimeout(msecs: int) -> None: ... - def setPosition(self, pos: typing.Union[QtCore.QPointF, QtCore.QPoint]) -> None: ... - def position(self) -> QtCore.QPointF: ... - - -class QGestureEvent(QtCore.QEvent): - - @typing.overload - def __init__(self, gestures: typing.Any) -> None: ... - @typing.overload - def __init__(self, a0: 'QGestureEvent') -> None: ... - - def mapToGraphicsScene(self, gesturePoint: typing.Union[QtCore.QPointF, QtCore.QPoint]) -> QtCore.QPointF: ... - def widget(self) -> QWidget: ... - @typing.overload - def ignore(self) -> None: ... - @typing.overload - def ignore(self, a0: QGesture) -> None: ... - @typing.overload - def ignore(self, a0: QtCore.Qt.GestureType) -> None: ... - @typing.overload - def accept(self) -> None: ... - @typing.overload - def accept(self, a0: QGesture) -> None: ... - @typing.overload - def accept(self, a0: QtCore.Qt.GestureType) -> None: ... - @typing.overload - def isAccepted(self) -> bool: ... - @typing.overload - def isAccepted(self, a0: QGesture) -> bool: ... - @typing.overload - def isAccepted(self, a0: QtCore.Qt.GestureType) -> bool: ... - @typing.overload - def setAccepted(self, accepted: bool) -> None: ... - @typing.overload - def setAccepted(self, a0: QGesture, a1: bool) -> None: ... - @typing.overload - def setAccepted(self, a0: QtCore.Qt.GestureType, a1: bool) -> None: ... - def canceledGestures(self) -> typing.List[QGesture]: ... - def activeGestures(self) -> typing.List[QGesture]: ... - def gesture(self, type: QtCore.Qt.GestureType) -> QGesture: ... - def gestures(self) -> typing.List[QGesture]: ... - - -class QGestureRecognizer(sip.wrapper): - - class ResultFlag(int): ... - Ignore = ... # type: 'QGestureRecognizer.ResultFlag' - MayBeGesture = ... # type: 'QGestureRecognizer.ResultFlag' - TriggerGesture = ... # type: 'QGestureRecognizer.ResultFlag' - FinishGesture = ... # type: 'QGestureRecognizer.ResultFlag' - CancelGesture = ... # type: 'QGestureRecognizer.ResultFlag' - ConsumeEventHint = ... # type: 'QGestureRecognizer.ResultFlag' - - class Result(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QGestureRecognizer.Result', 'QGestureRecognizer.ResultFlag']) -> None: ... - @typing.overload - def __init__(self, a0: 'QGestureRecognizer.Result') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QGestureRecognizer.Result': ... - def __int__(self) -> int: ... - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QGestureRecognizer') -> None: ... - - @staticmethod - def unregisterRecognizer(type: QtCore.Qt.GestureType) -> None: ... - @staticmethod - def registerRecognizer(recognizer: 'QGestureRecognizer') -> QtCore.Qt.GestureType: ... - def reset(self, state: QGesture) -> None: ... - def recognize(self, state: QGesture, watched: QtCore.QObject, event: QtCore.QEvent) -> 'QGestureRecognizer.Result': ... - def create(self, target: QtCore.QObject) -> QGesture: ... - - -class QGraphicsAnchor(QtCore.QObject): - - def sizePolicy(self) -> 'QSizePolicy.Policy': ... - def setSizePolicy(self, policy: 'QSizePolicy.Policy') -> None: ... - def spacing(self) -> float: ... - def unsetSpacing(self) -> None: ... - def setSpacing(self, spacing: float) -> None: ... - - -class QGraphicsLayoutItem(sip.wrapper): - - def __init__(self, parent: typing.Optional['QGraphicsLayoutItem'] = ..., isLayout: bool = ...) -> None: ... - - def setOwnedByLayout(self, ownedByLayout: bool) -> None: ... - def setGraphicsItem(self, item: 'QGraphicsItem') -> None: ... - def sizeHint(self, which: QtCore.Qt.SizeHint, constraint: QtCore.QSizeF = ...) -> QtCore.QSizeF: ... - def ownedByLayout(self) -> bool: ... - def graphicsItem(self) -> 'QGraphicsItem': ... - def maximumHeight(self) -> float: ... - def maximumWidth(self) -> float: ... - def preferredHeight(self) -> float: ... - def preferredWidth(self) -> float: ... - def minimumHeight(self) -> float: ... - def minimumWidth(self) -> float: ... - def isLayout(self) -> bool: ... - def setParentLayoutItem(self, parent: 'QGraphicsLayoutItem') -> None: ... - def parentLayoutItem(self) -> 'QGraphicsLayoutItem': ... - def updateGeometry(self) -> None: ... - def effectiveSizeHint(self, which: QtCore.Qt.SizeHint, constraint: QtCore.QSizeF = ...) -> QtCore.QSizeF: ... - def contentsRect(self) -> QtCore.QRectF: ... - def getContentsMargins(self) -> typing.Tuple[float, float, float, float]: ... - def geometry(self) -> QtCore.QRectF: ... - def setGeometry(self, rect: QtCore.QRectF) -> None: ... - def setMaximumHeight(self, height: float) -> None: ... - def setMaximumWidth(self, width: float) -> None: ... - def maximumSize(self) -> QtCore.QSizeF: ... - @typing.overload - def setMaximumSize(self, size: QtCore.QSizeF) -> None: ... - @typing.overload - def setMaximumSize(self, aw: float, ah: float) -> None: ... - def setPreferredHeight(self, height: float) -> None: ... - def setPreferredWidth(self, width: float) -> None: ... - def preferredSize(self) -> QtCore.QSizeF: ... - @typing.overload - def setPreferredSize(self, size: QtCore.QSizeF) -> None: ... - @typing.overload - def setPreferredSize(self, aw: float, ah: float) -> None: ... - def setMinimumHeight(self, height: float) -> None: ... - def setMinimumWidth(self, width: float) -> None: ... - def minimumSize(self) -> QtCore.QSizeF: ... - @typing.overload - def setMinimumSize(self, size: QtCore.QSizeF) -> None: ... - @typing.overload - def setMinimumSize(self, aw: float, ah: float) -> None: ... - def sizePolicy(self) -> 'QSizePolicy': ... - @typing.overload - def setSizePolicy(self, policy: 'QSizePolicy') -> None: ... - @typing.overload - def setSizePolicy(self, hPolicy: 'QSizePolicy.Policy', vPolicy: 'QSizePolicy.Policy', controlType: 'QSizePolicy.ControlType' = ...) -> None: ... - - -class QGraphicsLayout(QGraphicsLayoutItem): - - def __init__(self, parent: typing.Optional[QGraphicsLayoutItem] = ...) -> None: ... - - def addChildLayoutItem(self, layoutItem: QGraphicsLayoutItem) -> None: ... - def updateGeometry(self) -> None: ... - def removeAt(self, index: int) -> None: ... - def itemAt(self, i: int) -> QGraphicsLayoutItem: ... - def __len__(self) -> int: ... - def count(self) -> int: ... - def widgetEvent(self, e: QtCore.QEvent) -> None: ... - def invalidate(self) -> None: ... - def isActivated(self) -> bool: ... - def activate(self) -> None: ... - def getContentsMargins(self) -> typing.Tuple[float, float, float, float]: ... - def setContentsMargins(self, left: float, top: float, right: float, bottom: float) -> None: ... - - -class QGraphicsAnchorLayout(QGraphicsLayout): - - def __init__(self, parent: typing.Optional[QGraphicsLayoutItem] = ...) -> None: ... - - def sizeHint(self, which: QtCore.Qt.SizeHint, constraint: QtCore.QSizeF = ...) -> QtCore.QSizeF: ... - def invalidate(self) -> None: ... - def itemAt(self, index: int) -> QGraphicsLayoutItem: ... - def count(self) -> int: ... - def setGeometry(self, rect: QtCore.QRectF) -> None: ... - def removeAt(self, index: int) -> None: ... - def verticalSpacing(self) -> float: ... - def horizontalSpacing(self) -> float: ... - def setSpacing(self, spacing: float) -> None: ... - def setVerticalSpacing(self, spacing: float) -> None: ... - def setHorizontalSpacing(self, spacing: float) -> None: ... - def addAnchors(self, firstItem: QGraphicsLayoutItem, secondItem: QGraphicsLayoutItem, orientations: typing.Union[QtCore.Qt.Orientations, QtCore.Qt.Orientation] = ...) -> None: ... - def addCornerAnchors(self, firstItem: QGraphicsLayoutItem, firstCorner: QtCore.Qt.Corner, secondItem: QGraphicsLayoutItem, secondCorner: QtCore.Qt.Corner) -> None: ... - def anchor(self, firstItem: QGraphicsLayoutItem, firstEdge: QtCore.Qt.AnchorPoint, secondItem: QGraphicsLayoutItem, secondEdge: QtCore.Qt.AnchorPoint) -> QGraphicsAnchor: ... - def addAnchor(self, firstItem: QGraphicsLayoutItem, firstEdge: QtCore.Qt.AnchorPoint, secondItem: QGraphicsLayoutItem, secondEdge: QtCore.Qt.AnchorPoint) -> QGraphicsAnchor: ... - - -class QGraphicsEffect(QtCore.QObject): - - class PixmapPadMode(int): ... - NoPad = ... # type: 'QGraphicsEffect.PixmapPadMode' - PadToTransparentBorder = ... # type: 'QGraphicsEffect.PixmapPadMode' - PadToEffectiveBoundingRect = ... # type: 'QGraphicsEffect.PixmapPadMode' - - class ChangeFlag(int): ... - SourceAttached = ... # type: 'QGraphicsEffect.ChangeFlag' - SourceDetached = ... # type: 'QGraphicsEffect.ChangeFlag' - SourceBoundingRectChanged = ... # type: 'QGraphicsEffect.ChangeFlag' - SourceInvalidated = ... # type: 'QGraphicsEffect.ChangeFlag' - - class ChangeFlags(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QGraphicsEffect.ChangeFlags', 'QGraphicsEffect.ChangeFlag']) -> None: ... - @typing.overload - def __init__(self, a0: 'QGraphicsEffect.ChangeFlags') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QGraphicsEffect.ChangeFlags': ... - def __int__(self) -> int: ... - - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def sourcePixmap(self, system: QtCore.Qt.CoordinateSystem = ..., mode: 'QGraphicsEffect.PixmapPadMode' = ...) -> typing.Tuple[QtGui.QPixmap, QtCore.QPoint]: ... - def drawSource(self, painter: QtGui.QPainter) -> None: ... - def sourceBoundingRect(self, system: QtCore.Qt.CoordinateSystem = ...) -> QtCore.QRectF: ... - def sourceIsPixmap(self) -> bool: ... - def updateBoundingRect(self) -> None: ... - def sourceChanged(self, flags: typing.Union['QGraphicsEffect.ChangeFlags', 'QGraphicsEffect.ChangeFlag']) -> None: ... - def draw(self, painter: QtGui.QPainter) -> None: ... - def enabledChanged(self, enabled: bool) -> None: ... - def update(self) -> None: ... - def setEnabled(self, enable: bool) -> None: ... - def isEnabled(self) -> bool: ... - def boundingRect(self) -> QtCore.QRectF: ... - def boundingRectFor(self, sourceRect: QtCore.QRectF) -> QtCore.QRectF: ... - - -class QGraphicsColorizeEffect(QGraphicsEffect): - - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def draw(self, painter: QtGui.QPainter) -> None: ... - def strengthChanged(self, strength: float) -> None: ... - def colorChanged(self, color: typing.Union[QtGui.QColor, QtCore.Qt.GlobalColor, QtGui.QGradient]) -> None: ... - def setStrength(self, strength: float) -> None: ... - def setColor(self, c: typing.Union[QtGui.QColor, QtCore.Qt.GlobalColor, QtGui.QGradient]) -> None: ... - def strength(self) -> float: ... - def color(self) -> QtGui.QColor: ... - - -class QGraphicsBlurEffect(QGraphicsEffect): - - class BlurHint(int): ... - PerformanceHint = ... # type: 'QGraphicsBlurEffect.BlurHint' - QualityHint = ... # type: 'QGraphicsBlurEffect.BlurHint' - AnimationHint = ... # type: 'QGraphicsBlurEffect.BlurHint' - - class BlurHints(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QGraphicsBlurEffect.BlurHints', 'QGraphicsBlurEffect.BlurHint']) -> None: ... - @typing.overload - def __init__(self, a0: 'QGraphicsBlurEffect.BlurHints') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QGraphicsBlurEffect.BlurHints': ... - def __int__(self) -> int: ... - - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def draw(self, painter: QtGui.QPainter) -> None: ... - def blurHintsChanged(self, hints: typing.Union['QGraphicsBlurEffect.BlurHints', 'QGraphicsBlurEffect.BlurHint']) -> None: ... - def blurRadiusChanged(self, blurRadius: float) -> None: ... - def setBlurHints(self, hints: typing.Union['QGraphicsBlurEffect.BlurHints', 'QGraphicsBlurEffect.BlurHint']) -> None: ... - def setBlurRadius(self, blurRadius: float) -> None: ... - def blurHints(self) -> 'QGraphicsBlurEffect.BlurHints': ... - def blurRadius(self) -> float: ... - def boundingRectFor(self, rect: QtCore.QRectF) -> QtCore.QRectF: ... - - -class QGraphicsDropShadowEffect(QGraphicsEffect): - - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def draw(self, painter: QtGui.QPainter) -> None: ... - def colorChanged(self, color: typing.Union[QtGui.QColor, QtCore.Qt.GlobalColor, QtGui.QGradient]) -> None: ... - def blurRadiusChanged(self, blurRadius: float) -> None: ... - def offsetChanged(self, offset: typing.Union[QtCore.QPointF, QtCore.QPoint]) -> None: ... - def setColor(self, color: typing.Union[QtGui.QColor, QtCore.Qt.GlobalColor, QtGui.QGradient]) -> None: ... - def setBlurRadius(self, blurRadius: float) -> None: ... - def setYOffset(self, dy: float) -> None: ... - def setXOffset(self, dx: float) -> None: ... - @typing.overload - def setOffset(self, ofs: typing.Union[QtCore.QPointF, QtCore.QPoint]) -> None: ... - @typing.overload - def setOffset(self, dx: float, dy: float) -> None: ... - @typing.overload - def setOffset(self, d: float) -> None: ... - def color(self) -> QtGui.QColor: ... - def blurRadius(self) -> float: ... - def yOffset(self) -> float: ... - def xOffset(self) -> float: ... - def offset(self) -> QtCore.QPointF: ... - def boundingRectFor(self, rect: QtCore.QRectF) -> QtCore.QRectF: ... - - -class QGraphicsOpacityEffect(QGraphicsEffect): - - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def draw(self, painter: QtGui.QPainter) -> None: ... - def opacityMaskChanged(self, mask: typing.Union[QtGui.QBrush, QtGui.QColor, QtCore.Qt.GlobalColor, QtGui.QGradient]) -> None: ... - def opacityChanged(self, opacity: float) -> None: ... - def setOpacityMask(self, mask: typing.Union[QtGui.QBrush, QtGui.QColor, QtCore.Qt.GlobalColor, QtGui.QGradient]) -> None: ... - def setOpacity(self, opacity: float) -> None: ... - def opacityMask(self) -> QtGui.QBrush: ... - def opacity(self) -> float: ... - - -class QGraphicsGridLayout(QGraphicsLayout): - - def __init__(self, parent: typing.Optional[QGraphicsLayoutItem] = ...) -> None: ... - - def removeItem(self, item: QGraphicsLayoutItem) -> None: ... - def sizeHint(self, which: QtCore.Qt.SizeHint, constraint: QtCore.QSizeF = ...) -> QtCore.QSizeF: ... - def setGeometry(self, rect: QtCore.QRectF) -> None: ... - def invalidate(self) -> None: ... - def removeAt(self, index: int) -> None: ... - def count(self) -> int: ... - @typing.overload - def itemAt(self, row: int, column: int) -> QGraphicsLayoutItem: ... - @typing.overload - def itemAt(self, index: int) -> QGraphicsLayoutItem: ... - def columnCount(self) -> int: ... - def rowCount(self) -> int: ... - def alignment(self, item: QGraphicsLayoutItem) -> QtCore.Qt.Alignment: ... - def setAlignment(self, item: QGraphicsLayoutItem, alignment: typing.Union[QtCore.Qt.Alignment, QtCore.Qt.AlignmentFlag]) -> None: ... - def columnAlignment(self, column: int) -> QtCore.Qt.Alignment: ... - def setColumnAlignment(self, column: int, alignment: typing.Union[QtCore.Qt.Alignment, QtCore.Qt.AlignmentFlag]) -> None: ... - def rowAlignment(self, row: int) -> QtCore.Qt.Alignment: ... - def setRowAlignment(self, row: int, alignment: typing.Union[QtCore.Qt.Alignment, QtCore.Qt.AlignmentFlag]) -> None: ... - def setColumnFixedWidth(self, column: int, width: float) -> None: ... - def columnMaximumWidth(self, column: int) -> float: ... - def setColumnMaximumWidth(self, column: int, width: float) -> None: ... - def columnPreferredWidth(self, column: int) -> float: ... - def setColumnPreferredWidth(self, column: int, width: float) -> None: ... - def columnMinimumWidth(self, column: int) -> float: ... - def setColumnMinimumWidth(self, column: int, width: float) -> None: ... - def setRowFixedHeight(self, row: int, height: float) -> None: ... - def rowMaximumHeight(self, row: int) -> float: ... - def setRowMaximumHeight(self, row: int, height: float) -> None: ... - def rowPreferredHeight(self, row: int) -> float: ... - def setRowPreferredHeight(self, row: int, height: float) -> None: ... - def rowMinimumHeight(self, row: int) -> float: ... - def setRowMinimumHeight(self, row: int, height: float) -> None: ... - def columnStretchFactor(self, column: int) -> int: ... - def setColumnStretchFactor(self, column: int, stretch: int) -> None: ... - def rowStretchFactor(self, row: int) -> int: ... - def setRowStretchFactor(self, row: int, stretch: int) -> None: ... - def columnSpacing(self, column: int) -> float: ... - def setColumnSpacing(self, column: int, spacing: float) -> None: ... - def rowSpacing(self, row: int) -> float: ... - def setRowSpacing(self, row: int, spacing: float) -> None: ... - def setSpacing(self, spacing: float) -> None: ... - def verticalSpacing(self) -> float: ... - def setVerticalSpacing(self, spacing: float) -> None: ... - def horizontalSpacing(self) -> float: ... - def setHorizontalSpacing(self, spacing: float) -> None: ... - @typing.overload - def addItem(self, item: QGraphicsLayoutItem, row: int, column: int, rowSpan: int, columnSpan: int, alignment: typing.Union[QtCore.Qt.Alignment, QtCore.Qt.AlignmentFlag] = ...) -> None: ... - @typing.overload - def addItem(self, item: QGraphicsLayoutItem, row: int, column: int, alignment: typing.Union[QtCore.Qt.Alignment, QtCore.Qt.AlignmentFlag] = ...) -> None: ... - - -class QGraphicsItem(sip.wrapper): - - class PanelModality(int): ... - NonModal = ... # type: 'QGraphicsItem.PanelModality' - PanelModal = ... # type: 'QGraphicsItem.PanelModality' - SceneModal = ... # type: 'QGraphicsItem.PanelModality' - - class GraphicsItemFlag(int): ... - ItemIsMovable = ... # type: 'QGraphicsItem.GraphicsItemFlag' - ItemIsSelectable = ... # type: 'QGraphicsItem.GraphicsItemFlag' - ItemIsFocusable = ... # type: 'QGraphicsItem.GraphicsItemFlag' - ItemClipsToShape = ... # type: 'QGraphicsItem.GraphicsItemFlag' - ItemClipsChildrenToShape = ... # type: 'QGraphicsItem.GraphicsItemFlag' - ItemIgnoresTransformations = ... # type: 'QGraphicsItem.GraphicsItemFlag' - ItemIgnoresParentOpacity = ... # type: 'QGraphicsItem.GraphicsItemFlag' - ItemDoesntPropagateOpacityToChildren = ... # type: 'QGraphicsItem.GraphicsItemFlag' - ItemStacksBehindParent = ... # type: 'QGraphicsItem.GraphicsItemFlag' - ItemUsesExtendedStyleOption = ... # type: 'QGraphicsItem.GraphicsItemFlag' - ItemHasNoContents = ... # type: 'QGraphicsItem.GraphicsItemFlag' - ItemSendsGeometryChanges = ... # type: 'QGraphicsItem.GraphicsItemFlag' - ItemAcceptsInputMethod = ... # type: 'QGraphicsItem.GraphicsItemFlag' - ItemNegativeZStacksBehindParent = ... # type: 'QGraphicsItem.GraphicsItemFlag' - ItemIsPanel = ... # type: 'QGraphicsItem.GraphicsItemFlag' - ItemSendsScenePositionChanges = ... # type: 'QGraphicsItem.GraphicsItemFlag' - ItemContainsChildrenInShape = ... # type: 'QGraphicsItem.GraphicsItemFlag' - - class GraphicsItemChange(int): ... - ItemPositionChange = ... # type: 'QGraphicsItem.GraphicsItemChange' - ItemMatrixChange = ... # type: 'QGraphicsItem.GraphicsItemChange' - ItemVisibleChange = ... # type: 'QGraphicsItem.GraphicsItemChange' - ItemEnabledChange = ... # type: 'QGraphicsItem.GraphicsItemChange' - ItemSelectedChange = ... # type: 'QGraphicsItem.GraphicsItemChange' - ItemParentChange = ... # type: 'QGraphicsItem.GraphicsItemChange' - ItemChildAddedChange = ... # type: 'QGraphicsItem.GraphicsItemChange' - ItemChildRemovedChange = ... # type: 'QGraphicsItem.GraphicsItemChange' - ItemTransformChange = ... # type: 'QGraphicsItem.GraphicsItemChange' - ItemPositionHasChanged = ... # type: 'QGraphicsItem.GraphicsItemChange' - ItemTransformHasChanged = ... # type: 'QGraphicsItem.GraphicsItemChange' - ItemSceneChange = ... # type: 'QGraphicsItem.GraphicsItemChange' - ItemVisibleHasChanged = ... # type: 'QGraphicsItem.GraphicsItemChange' - ItemEnabledHasChanged = ... # type: 'QGraphicsItem.GraphicsItemChange' - ItemSelectedHasChanged = ... # type: 'QGraphicsItem.GraphicsItemChange' - ItemParentHasChanged = ... # type: 'QGraphicsItem.GraphicsItemChange' - ItemSceneHasChanged = ... # type: 'QGraphicsItem.GraphicsItemChange' - ItemCursorChange = ... # type: 'QGraphicsItem.GraphicsItemChange' - ItemCursorHasChanged = ... # type: 'QGraphicsItem.GraphicsItemChange' - ItemToolTipChange = ... # type: 'QGraphicsItem.GraphicsItemChange' - ItemToolTipHasChanged = ... # type: 'QGraphicsItem.GraphicsItemChange' - ItemFlagsChange = ... # type: 'QGraphicsItem.GraphicsItemChange' - ItemFlagsHaveChanged = ... # type: 'QGraphicsItem.GraphicsItemChange' - ItemZValueChange = ... # type: 'QGraphicsItem.GraphicsItemChange' - ItemZValueHasChanged = ... # type: 'QGraphicsItem.GraphicsItemChange' - ItemOpacityChange = ... # type: 'QGraphicsItem.GraphicsItemChange' - ItemOpacityHasChanged = ... # type: 'QGraphicsItem.GraphicsItemChange' - ItemScenePositionHasChanged = ... # type: 'QGraphicsItem.GraphicsItemChange' - ItemRotationChange = ... # type: 'QGraphicsItem.GraphicsItemChange' - ItemRotationHasChanged = ... # type: 'QGraphicsItem.GraphicsItemChange' - ItemScaleChange = ... # type: 'QGraphicsItem.GraphicsItemChange' - ItemScaleHasChanged = ... # type: 'QGraphicsItem.GraphicsItemChange' - ItemTransformOriginPointChange = ... # type: 'QGraphicsItem.GraphicsItemChange' - ItemTransformOriginPointHasChanged = ... # type: 'QGraphicsItem.GraphicsItemChange' - - class CacheMode(int): ... - NoCache = ... # type: 'QGraphicsItem.CacheMode' - ItemCoordinateCache = ... # type: 'QGraphicsItem.CacheMode' - DeviceCoordinateCache = ... # type: 'QGraphicsItem.CacheMode' - - class GraphicsItemFlags(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QGraphicsItem.GraphicsItemFlags', 'QGraphicsItem.GraphicsItemFlag']) -> None: ... - @typing.overload - def __init__(self, a0: 'QGraphicsItem.GraphicsItemFlags') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QGraphicsItem.GraphicsItemFlags': ... - def __int__(self) -> int: ... - - Type = ... # type: int - UserType = ... # type: int - - def __init__(self, parent: typing.Optional['QGraphicsItem'] = ...) -> None: ... - - def updateMicroFocus(self) -> None: ... - def setInputMethodHints(self, hints: typing.Union[QtCore.Qt.InputMethodHints, QtCore.Qt.InputMethodHint]) -> None: ... - def inputMethodHints(self) -> QtCore.Qt.InputMethodHints: ... - def stackBefore(self, sibling: 'QGraphicsItem') -> None: ... - @typing.overload - def setTransformOriginPoint(self, origin: typing.Union[QtCore.QPointF, QtCore.QPoint]) -> None: ... - @typing.overload - def setTransformOriginPoint(self, ax: float, ay: float) -> None: ... - def transformOriginPoint(self) -> QtCore.QPointF: ... - def setTransformations(self, transformations: typing.Iterable['QGraphicsTransform']) -> None: ... - def transformations(self) -> typing.Any: ... - def scale(self) -> float: ... - def setScale(self, scale: float) -> None: ... - def rotation(self) -> float: ... - def setRotation(self, angle: float) -> None: ... - def setY(self, y: float) -> None: ... - def setX(self, x: float) -> None: ... - def focusItem(self) -> 'QGraphicsItem': ... - def setFocusProxy(self, item: 'QGraphicsItem') -> None: ... - def focusProxy(self) -> 'QGraphicsItem': ... - def setActive(self, active: bool) -> None: ... - def isActive(self) -> bool: ... - def setFiltersChildEvents(self, enabled: bool) -> None: ... - def filtersChildEvents(self) -> bool: ... - def setAcceptTouchEvents(self, enabled: bool) -> None: ... - def acceptTouchEvents(self) -> bool: ... - def setGraphicsEffect(self, effect: QGraphicsEffect) -> None: ... - def graphicsEffect(self) -> QGraphicsEffect: ... - def isBlockedByModalPanel(self) -> typing.Tuple[bool, 'QGraphicsItem']: ... - def setPanelModality(self, panelModality: 'QGraphicsItem.PanelModality') -> None: ... - def panelModality(self) -> 'QGraphicsItem.PanelModality': ... - def toGraphicsObject(self) -> 'QGraphicsObject': ... - def isPanel(self) -> bool: ... - def panel(self) -> 'QGraphicsItem': ... - def parentObject(self) -> 'QGraphicsObject': ... - @typing.overload - def mapRectFromScene(self, rect: QtCore.QRectF) -> QtCore.QRectF: ... - @typing.overload - def mapRectFromScene(self, ax: float, ay: float, w: float, h: float) -> QtCore.QRectF: ... - @typing.overload - def mapRectFromParent(self, rect: QtCore.QRectF) -> QtCore.QRectF: ... - @typing.overload - def mapRectFromParent(self, ax: float, ay: float, w: float, h: float) -> QtCore.QRectF: ... - @typing.overload - def mapRectFromItem(self, item: 'QGraphicsItem', rect: QtCore.QRectF) -> QtCore.QRectF: ... - @typing.overload - def mapRectFromItem(self, item: 'QGraphicsItem', ax: float, ay: float, w: float, h: float) -> QtCore.QRectF: ... - @typing.overload - def mapRectToScene(self, rect: QtCore.QRectF) -> QtCore.QRectF: ... - @typing.overload - def mapRectToScene(self, ax: float, ay: float, w: float, h: float) -> QtCore.QRectF: ... - @typing.overload - def mapRectToParent(self, rect: QtCore.QRectF) -> QtCore.QRectF: ... - @typing.overload - def mapRectToParent(self, ax: float, ay: float, w: float, h: float) -> QtCore.QRectF: ... - @typing.overload - def mapRectToItem(self, item: 'QGraphicsItem', rect: QtCore.QRectF) -> QtCore.QRectF: ... - @typing.overload - def mapRectToItem(self, item: 'QGraphicsItem', ax: float, ay: float, w: float, h: float) -> QtCore.QRectF: ... - def clipPath(self) -> QtGui.QPainterPath: ... - def isClipped(self) -> bool: ... - def itemTransform(self, other: 'QGraphicsItem') -> typing.Tuple[QtGui.QTransform, bool]: ... - def setOpacity(self, opacity: float) -> None: ... - def effectiveOpacity(self) -> float: ... - def opacity(self) -> float: ... - def isUnderMouse(self) -> bool: ... - def commonAncestorItem(self, other: 'QGraphicsItem') -> 'QGraphicsItem': ... - def scroll(self, dx: float, dy: float, rect: QtCore.QRectF = ...) -> None: ... - def setBoundingRegionGranularity(self, granularity: float) -> None: ... - def boundingRegionGranularity(self) -> float: ... - def boundingRegion(self, itemToDeviceTransform: QtGui.QTransform) -> QtGui.QRegion: ... - def ungrabKeyboard(self) -> None: ... - def grabKeyboard(self) -> None: ... - def ungrabMouse(self) -> None: ... - def grabMouse(self) -> None: ... - def setAcceptHoverEvents(self, enabled: bool) -> None: ... - def acceptHoverEvents(self) -> bool: ... - def isVisibleTo(self, parent: 'QGraphicsItem') -> bool: ... - def setCacheMode(self, mode: 'QGraphicsItem.CacheMode', logicalCacheSize: QtCore.QSize = ...) -> None: ... - def cacheMode(self) -> 'QGraphicsItem.CacheMode': ... - def isWindow(self) -> bool: ... - def isWidget(self) -> bool: ... - def childItems(self) -> typing.List['QGraphicsItem']: ... - def window(self) -> 'QGraphicsWidget': ... - def topLevelWidget(self) -> 'QGraphicsWidget': ... - def parentWidget(self) -> 'QGraphicsWidget': ... - @typing.overload - def isObscured(self, rect: QtCore.QRectF = ...) -> bool: ... - @typing.overload - def isObscured(self, ax: float, ay: float, w: float, h: float) -> bool: ... - def resetTransform(self) -> None: ... - def setTransform(self, matrix: QtGui.QTransform, combine: bool = ...) -> None: ... - def deviceTransform(self, viewportTransform: QtGui.QTransform) -> QtGui.QTransform: ... - def sceneTransform(self) -> QtGui.QTransform: ... - def transform(self) -> QtGui.QTransform: ... - def wheelEvent(self, event: 'QGraphicsSceneWheelEvent') -> None: ... - def sceneEventFilter(self, watched: 'QGraphicsItem', event: QtCore.QEvent) -> bool: ... - def sceneEvent(self, event: QtCore.QEvent) -> bool: ... - def prepareGeometryChange(self) -> None: ... - def mouseReleaseEvent(self, event: 'QGraphicsSceneMouseEvent') -> None: ... - def mousePressEvent(self, event: 'QGraphicsSceneMouseEvent') -> None: ... - def mouseMoveEvent(self, event: 'QGraphicsSceneMouseEvent') -> None: ... - def mouseDoubleClickEvent(self, event: 'QGraphicsSceneMouseEvent') -> None: ... - def keyReleaseEvent(self, event: QtGui.QKeyEvent) -> None: ... - def keyPressEvent(self, event: QtGui.QKeyEvent) -> None: ... - def itemChange(self, change: 'QGraphicsItem.GraphicsItemChange', value: typing.Any) -> typing.Any: ... - def inputMethodQuery(self, query: QtCore.Qt.InputMethodQuery) -> typing.Any: ... - def inputMethodEvent(self, event: QtGui.QInputMethodEvent) -> None: ... - def hoverMoveEvent(self, event: 'QGraphicsSceneHoverEvent') -> None: ... - def hoverLeaveEvent(self, event: 'QGraphicsSceneHoverEvent') -> None: ... - def hoverEnterEvent(self, event: 'QGraphicsSceneHoverEvent') -> None: ... - def focusOutEvent(self, event: QtGui.QFocusEvent) -> None: ... - def focusInEvent(self, event: QtGui.QFocusEvent) -> None: ... - def dropEvent(self, event: 'QGraphicsSceneDragDropEvent') -> None: ... - def dragMoveEvent(self, event: 'QGraphicsSceneDragDropEvent') -> None: ... - def dragLeaveEvent(self, event: 'QGraphicsSceneDragDropEvent') -> None: ... - def dragEnterEvent(self, event: 'QGraphicsSceneDragDropEvent') -> None: ... - def contextMenuEvent(self, event: 'QGraphicsSceneContextMenuEvent') -> None: ... - def removeSceneEventFilter(self, filterItem: 'QGraphicsItem') -> None: ... - def installSceneEventFilter(self, filterItem: 'QGraphicsItem') -> None: ... - def type(self) -> int: ... - def setData(self, key: int, value: typing.Any) -> None: ... - def data(self, key: int) -> typing.Any: ... - def isAncestorOf(self, child: 'QGraphicsItem') -> bool: ... - @typing.overload - def mapFromScene(self, point: typing.Union[QtCore.QPointF, QtCore.QPoint]) -> QtCore.QPointF: ... - @typing.overload - def mapFromScene(self, rect: QtCore.QRectF) -> QtGui.QPolygonF: ... - @typing.overload - def mapFromScene(self, polygon: QtGui.QPolygonF) -> QtGui.QPolygonF: ... - @typing.overload - def mapFromScene(self, path: QtGui.QPainterPath) -> QtGui.QPainterPath: ... - @typing.overload - def mapFromScene(self, ax: float, ay: float) -> QtCore.QPointF: ... - @typing.overload - def mapFromScene(self, ax: float, ay: float, w: float, h: float) -> QtGui.QPolygonF: ... - @typing.overload - def mapFromParent(self, point: typing.Union[QtCore.QPointF, QtCore.QPoint]) -> QtCore.QPointF: ... - @typing.overload - def mapFromParent(self, rect: QtCore.QRectF) -> QtGui.QPolygonF: ... - @typing.overload - def mapFromParent(self, polygon: QtGui.QPolygonF) -> QtGui.QPolygonF: ... - @typing.overload - def mapFromParent(self, path: QtGui.QPainterPath) -> QtGui.QPainterPath: ... - @typing.overload - def mapFromParent(self, ax: float, ay: float) -> QtCore.QPointF: ... - @typing.overload - def mapFromParent(self, ax: float, ay: float, w: float, h: float) -> QtGui.QPolygonF: ... - @typing.overload - def mapFromItem(self, item: 'QGraphicsItem', point: typing.Union[QtCore.QPointF, QtCore.QPoint]) -> QtCore.QPointF: ... - @typing.overload - def mapFromItem(self, item: 'QGraphicsItem', rect: QtCore.QRectF) -> QtGui.QPolygonF: ... - @typing.overload - def mapFromItem(self, item: 'QGraphicsItem', polygon: QtGui.QPolygonF) -> QtGui.QPolygonF: ... - @typing.overload - def mapFromItem(self, item: 'QGraphicsItem', path: QtGui.QPainterPath) -> QtGui.QPainterPath: ... - @typing.overload - def mapFromItem(self, item: 'QGraphicsItem', ax: float, ay: float) -> QtCore.QPointF: ... - @typing.overload - def mapFromItem(self, item: 'QGraphicsItem', ax: float, ay: float, w: float, h: float) -> QtGui.QPolygonF: ... - @typing.overload - def mapToScene(self, point: typing.Union[QtCore.QPointF, QtCore.QPoint]) -> QtCore.QPointF: ... - @typing.overload - def mapToScene(self, rect: QtCore.QRectF) -> QtGui.QPolygonF: ... - @typing.overload - def mapToScene(self, polygon: QtGui.QPolygonF) -> QtGui.QPolygonF: ... - @typing.overload - def mapToScene(self, path: QtGui.QPainterPath) -> QtGui.QPainterPath: ... - @typing.overload - def mapToScene(self, ax: float, ay: float) -> QtCore.QPointF: ... - @typing.overload - def mapToScene(self, ax: float, ay: float, w: float, h: float) -> QtGui.QPolygonF: ... - @typing.overload - def mapToParent(self, point: typing.Union[QtCore.QPointF, QtCore.QPoint]) -> QtCore.QPointF: ... - @typing.overload - def mapToParent(self, rect: QtCore.QRectF) -> QtGui.QPolygonF: ... - @typing.overload - def mapToParent(self, polygon: QtGui.QPolygonF) -> QtGui.QPolygonF: ... - @typing.overload - def mapToParent(self, path: QtGui.QPainterPath) -> QtGui.QPainterPath: ... - @typing.overload - def mapToParent(self, ax: float, ay: float) -> QtCore.QPointF: ... - @typing.overload - def mapToParent(self, ax: float, ay: float, w: float, h: float) -> QtGui.QPolygonF: ... - @typing.overload - def mapToItem(self, item: 'QGraphicsItem', point: typing.Union[QtCore.QPointF, QtCore.QPoint]) -> QtCore.QPointF: ... - @typing.overload - def mapToItem(self, item: 'QGraphicsItem', rect: QtCore.QRectF) -> QtGui.QPolygonF: ... - @typing.overload - def mapToItem(self, item: 'QGraphicsItem', polygon: QtGui.QPolygonF) -> QtGui.QPolygonF: ... - @typing.overload - def mapToItem(self, item: 'QGraphicsItem', path: QtGui.QPainterPath) -> QtGui.QPainterPath: ... - @typing.overload - def mapToItem(self, item: 'QGraphicsItem', ax: float, ay: float) -> QtCore.QPointF: ... - @typing.overload - def mapToItem(self, item: 'QGraphicsItem', ax: float, ay: float, w: float, h: float) -> QtGui.QPolygonF: ... - @typing.overload - def update(self, rect: QtCore.QRectF = ...) -> None: ... - @typing.overload - def update(self, ax: float, ay: float, width: float, height: float) -> None: ... - def paint(self, painter: QtGui.QPainter, option: 'QStyleOptionGraphicsItem', widget: typing.Optional[QWidget] = ...) -> None: ... - def opaqueArea(self) -> QtGui.QPainterPath: ... - def isObscuredBy(self, item: 'QGraphicsItem') -> bool: ... - def collidingItems(self, mode: QtCore.Qt.ItemSelectionMode = ...) -> typing.Any: ... - def collidesWithPath(self, path: QtGui.QPainterPath, mode: QtCore.Qt.ItemSelectionMode = ...) -> bool: ... - def collidesWithItem(self, other: 'QGraphicsItem', mode: QtCore.Qt.ItemSelectionMode = ...) -> bool: ... - def contains(self, point: typing.Union[QtCore.QPointF, QtCore.QPoint]) -> bool: ... - def shape(self) -> QtGui.QPainterPath: ... - def sceneBoundingRect(self) -> QtCore.QRectF: ... - def childrenBoundingRect(self) -> QtCore.QRectF: ... - def boundingRect(self) -> QtCore.QRectF: ... - def setZValue(self, z: float) -> None: ... - def zValue(self) -> float: ... - def advance(self, phase: int) -> None: ... - @typing.overload - def ensureVisible(self, rect: QtCore.QRectF = ..., xMargin: int = ..., yMargin: int = ...) -> None: ... - @typing.overload - def ensureVisible(self, x: float, y: float, w: float, h: float, xMargin: int = ..., yMargin: int = ...) -> None: ... - def moveBy(self, dx: float, dy: float) -> None: ... - @typing.overload - def setPos(self, pos: typing.Union[QtCore.QPointF, QtCore.QPoint]) -> None: ... - @typing.overload - def setPos(self, ax: float, ay: float) -> None: ... - def scenePos(self) -> QtCore.QPointF: ... - def y(self) -> float: ... - def x(self) -> float: ... - def pos(self) -> QtCore.QPointF: ... - def clearFocus(self) -> None: ... - def setFocus(self, focusReason: QtCore.Qt.FocusReason = ...) -> None: ... - def hasFocus(self) -> bool: ... - def setAcceptedMouseButtons(self, buttons: typing.Union[QtCore.Qt.MouseButtons, QtCore.Qt.MouseButton]) -> None: ... - def acceptedMouseButtons(self) -> QtCore.Qt.MouseButtons: ... - def setAcceptDrops(self, on: bool) -> None: ... - def acceptDrops(self) -> bool: ... - def setSelected(self, selected: bool) -> None: ... - def isSelected(self) -> bool: ... - def setEnabled(self, enabled: bool) -> None: ... - def isEnabled(self) -> bool: ... - def show(self) -> None: ... - def hide(self) -> None: ... - def setVisible(self, visible: bool) -> None: ... - def isVisible(self) -> bool: ... - def unsetCursor(self) -> None: ... - def hasCursor(self) -> bool: ... - def setCursor(self, cursor: typing.Union[QtGui.QCursor, QtCore.Qt.CursorShape]) -> None: ... - def cursor(self) -> QtGui.QCursor: ... - def setToolTip(self, toolTip: str) -> None: ... - def toolTip(self) -> str: ... - def setFlags(self, flags: typing.Union['QGraphicsItem.GraphicsItemFlags', 'QGraphicsItem.GraphicsItemFlag']) -> None: ... - def setFlag(self, flag: 'QGraphicsItem.GraphicsItemFlag', enabled: bool = ...) -> None: ... - def flags(self) -> 'QGraphicsItem.GraphicsItemFlags': ... - def setGroup(self, group: 'QGraphicsItemGroup') -> None: ... - def group(self) -> 'QGraphicsItemGroup': ... - def setParentItem(self, parent: 'QGraphicsItem') -> None: ... - def topLevelItem(self) -> 'QGraphicsItem': ... - def parentItem(self) -> 'QGraphicsItem': ... - def scene(self) -> 'QGraphicsScene': ... - - -class QAbstractGraphicsShapeItem(QGraphicsItem): - - def __init__(self, parent: typing.Optional[QGraphicsItem] = ...) -> None: ... - - def opaqueArea(self) -> QtGui.QPainterPath: ... - def isObscuredBy(self, item: QGraphicsItem) -> bool: ... - def setBrush(self, brush: typing.Union[QtGui.QBrush, QtGui.QColor, QtCore.Qt.GlobalColor, QtGui.QGradient]) -> None: ... - def brush(self) -> QtGui.QBrush: ... - def setPen(self, pen: typing.Union[QtGui.QPen, QtGui.QColor, QtCore.Qt.GlobalColor, QtGui.QGradient]) -> None: ... - def pen(self) -> QtGui.QPen: ... - - -class QGraphicsPathItem(QAbstractGraphicsShapeItem): - - @typing.overload - def __init__(self, parent: typing.Optional[QGraphicsItem] = ...) -> None: ... - @typing.overload - def __init__(self, path: QtGui.QPainterPath, parent: typing.Optional[QGraphicsItem] = ...) -> None: ... - - def type(self) -> int: ... - def opaqueArea(self) -> QtGui.QPainterPath: ... - def isObscuredBy(self, item: QGraphicsItem) -> bool: ... - def paint(self, painter: QtGui.QPainter, option: 'QStyleOptionGraphicsItem', widget: typing.Optional[QWidget] = ...) -> None: ... - def contains(self, point: typing.Union[QtCore.QPointF, QtCore.QPoint]) -> bool: ... - def shape(self) -> QtGui.QPainterPath: ... - def boundingRect(self) -> QtCore.QRectF: ... - def setPath(self, path: QtGui.QPainterPath) -> None: ... - def path(self) -> QtGui.QPainterPath: ... - - -class QGraphicsRectItem(QAbstractGraphicsShapeItem): - - @typing.overload - def __init__(self, parent: typing.Optional[QGraphicsItem] = ...) -> None: ... - @typing.overload - def __init__(self, rect: QtCore.QRectF, parent: typing.Optional[QGraphicsItem] = ...) -> None: ... - @typing.overload - def __init__(self, x: float, y: float, w: float, h: float, parent: typing.Optional[QGraphicsItem] = ...) -> None: ... - - def type(self) -> int: ... - def opaqueArea(self) -> QtGui.QPainterPath: ... - def isObscuredBy(self, item: QGraphicsItem) -> bool: ... - def paint(self, painter: QtGui.QPainter, option: 'QStyleOptionGraphicsItem', widget: typing.Optional[QWidget] = ...) -> None: ... - def contains(self, point: typing.Union[QtCore.QPointF, QtCore.QPoint]) -> bool: ... - def shape(self) -> QtGui.QPainterPath: ... - def boundingRect(self) -> QtCore.QRectF: ... - @typing.overload - def setRect(self, rect: QtCore.QRectF) -> None: ... - @typing.overload - def setRect(self, ax: float, ay: float, w: float, h: float) -> None: ... - def rect(self) -> QtCore.QRectF: ... - - -class QGraphicsEllipseItem(QAbstractGraphicsShapeItem): - - @typing.overload - def __init__(self, parent: typing.Optional[QGraphicsItem] = ...) -> None: ... - @typing.overload - def __init__(self, rect: QtCore.QRectF, parent: typing.Optional[QGraphicsItem] = ...) -> None: ... - @typing.overload - def __init__(self, x: float, y: float, w: float, h: float, parent: typing.Optional[QGraphicsItem] = ...) -> None: ... - - def type(self) -> int: ... - def opaqueArea(self) -> QtGui.QPainterPath: ... - def isObscuredBy(self, item: QGraphicsItem) -> bool: ... - def paint(self, painter: QtGui.QPainter, option: 'QStyleOptionGraphicsItem', widget: typing.Optional[QWidget] = ...) -> None: ... - def contains(self, point: typing.Union[QtCore.QPointF, QtCore.QPoint]) -> bool: ... - def shape(self) -> QtGui.QPainterPath: ... - def boundingRect(self) -> QtCore.QRectF: ... - def setSpanAngle(self, angle: int) -> None: ... - def spanAngle(self) -> int: ... - def setStartAngle(self, angle: int) -> None: ... - def startAngle(self) -> int: ... - @typing.overload - def setRect(self, rect: QtCore.QRectF) -> None: ... - @typing.overload - def setRect(self, ax: float, ay: float, w: float, h: float) -> None: ... - def rect(self) -> QtCore.QRectF: ... - - -class QGraphicsPolygonItem(QAbstractGraphicsShapeItem): - - @typing.overload - def __init__(self, parent: typing.Optional[QGraphicsItem] = ...) -> None: ... - @typing.overload - def __init__(self, polygon: QtGui.QPolygonF, parent: typing.Optional[QGraphicsItem] = ...) -> None: ... - - def type(self) -> int: ... - def opaqueArea(self) -> QtGui.QPainterPath: ... - def isObscuredBy(self, item: QGraphicsItem) -> bool: ... - def paint(self, painter: QtGui.QPainter, option: 'QStyleOptionGraphicsItem', widget: typing.Optional[QWidget] = ...) -> None: ... - def contains(self, point: typing.Union[QtCore.QPointF, QtCore.QPoint]) -> bool: ... - def shape(self) -> QtGui.QPainterPath: ... - def boundingRect(self) -> QtCore.QRectF: ... - def setFillRule(self, rule: QtCore.Qt.FillRule) -> None: ... - def fillRule(self) -> QtCore.Qt.FillRule: ... - def setPolygon(self, polygon: QtGui.QPolygonF) -> None: ... - def polygon(self) -> QtGui.QPolygonF: ... - - -class QGraphicsLineItem(QGraphicsItem): - - @typing.overload - def __init__(self, parent: typing.Optional[QGraphicsItem] = ...) -> None: ... - @typing.overload - def __init__(self, line: QtCore.QLineF, parent: typing.Optional[QGraphicsItem] = ...) -> None: ... - @typing.overload - def __init__(self, x1: float, y1: float, x2: float, y2: float, parent: typing.Optional[QGraphicsItem] = ...) -> None: ... - - def type(self) -> int: ... - def opaqueArea(self) -> QtGui.QPainterPath: ... - def isObscuredBy(self, item: QGraphicsItem) -> bool: ... - def paint(self, painter: QtGui.QPainter, option: 'QStyleOptionGraphicsItem', widget: typing.Optional[QWidget] = ...) -> None: ... - def contains(self, point: typing.Union[QtCore.QPointF, QtCore.QPoint]) -> bool: ... - def shape(self) -> QtGui.QPainterPath: ... - def boundingRect(self) -> QtCore.QRectF: ... - @typing.overload - def setLine(self, line: QtCore.QLineF) -> None: ... - @typing.overload - def setLine(self, x1: float, y1: float, x2: float, y2: float) -> None: ... - def line(self) -> QtCore.QLineF: ... - def setPen(self, pen: typing.Union[QtGui.QPen, QtGui.QColor, QtCore.Qt.GlobalColor, QtGui.QGradient]) -> None: ... - def pen(self) -> QtGui.QPen: ... - - -class QGraphicsPixmapItem(QGraphicsItem): - - class ShapeMode(int): ... - MaskShape = ... # type: 'QGraphicsPixmapItem.ShapeMode' - BoundingRectShape = ... # type: 'QGraphicsPixmapItem.ShapeMode' - HeuristicMaskShape = ... # type: 'QGraphicsPixmapItem.ShapeMode' - - @typing.overload - def __init__(self, parent: typing.Optional[QGraphicsItem] = ...) -> None: ... - @typing.overload - def __init__(self, pixmap: QtGui.QPixmap, parent: typing.Optional[QGraphicsItem] = ...) -> None: ... - - def setShapeMode(self, mode: 'QGraphicsPixmapItem.ShapeMode') -> None: ... - def shapeMode(self) -> 'QGraphicsPixmapItem.ShapeMode': ... - def type(self) -> int: ... - def opaqueArea(self) -> QtGui.QPainterPath: ... - def isObscuredBy(self, item: QGraphicsItem) -> bool: ... - # def paint(self, painter: QtGui.QPainter, option: 'QStyleOptionGraphicsItem', widget: QWidget) -> None: ... - def contains(self, point: typing.Union[QtCore.QPointF, QtCore.QPoint]) -> bool: ... - def shape(self) -> QtGui.QPainterPath: ... - def boundingRect(self) -> QtCore.QRectF: ... - @typing.overload - def setOffset(self, offset: typing.Union[QtCore.QPointF, QtCore.QPoint]) -> None: ... - @typing.overload - def setOffset(self, ax: float, ay: float) -> None: ... - def offset(self) -> QtCore.QPointF: ... - def setTransformationMode(self, mode: QtCore.Qt.TransformationMode) -> None: ... - def transformationMode(self) -> QtCore.Qt.TransformationMode: ... - def setPixmap(self, pixmap: QtGui.QPixmap) -> None: ... - def pixmap(self) -> QtGui.QPixmap: ... - - -class QGraphicsSimpleTextItem(QAbstractGraphicsShapeItem): - - @typing.overload - def __init__(self, parent: typing.Optional[QGraphicsItem] = ...) -> None: ... - @typing.overload - def __init__(self, text: str, parent: typing.Optional[QGraphicsItem] = ...) -> None: ... - - def type(self) -> int: ... - def opaqueArea(self) -> QtGui.QPainterPath: ... - def isObscuredBy(self, item: QGraphicsItem) -> bool: ... - # def paint(self, painter: QtGui.QPainter, option: 'QStyleOptionGraphicsItem', widget: QWidget) -> None: ... - def contains(self, point: typing.Union[QtCore.QPointF, QtCore.QPoint]) -> bool: ... - def shape(self) -> QtGui.QPainterPath: ... - def boundingRect(self) -> QtCore.QRectF: ... - def font(self) -> QtGui.QFont: ... - def setFont(self, font: QtGui.QFont) -> None: ... - def text(self) -> str: ... - def setText(self, text: str) -> None: ... - - -class QGraphicsItemGroup(QGraphicsItem): - - def __init__(self, parent: typing.Optional[QGraphicsItem] = ...) -> None: ... - - def type(self) -> int: ... - def opaqueArea(self) -> QtGui.QPainterPath: ... - def isObscuredBy(self, item: QGraphicsItem) -> bool: ... - def paint(self, painter: QtGui.QPainter, option: 'QStyleOptionGraphicsItem', widget: typing.Optional[QWidget] = ...) -> None: ... - def boundingRect(self) -> QtCore.QRectF: ... - def removeFromGroup(self, item: QGraphicsItem) -> None: ... - def addToGroup(self, item: QGraphicsItem) -> None: ... - - -class QGraphicsObject(QtCore.QObject, QGraphicsItem): - - def __init__(self, parent: typing.Optional[QGraphicsItem] = ...) -> None: ... - - def event(self, ev: QtCore.QEvent) -> bool: ... - def updateMicroFocus(self) -> None: ... - def scaleChanged(self) -> None: ... - def rotationChanged(self) -> None: ... - def zChanged(self) -> None: ... - def yChanged(self) -> None: ... - def xChanged(self) -> None: ... - def enabledChanged(self) -> None: ... - def visibleChanged(self) -> None: ... - def opacityChanged(self) -> None: ... - def parentChanged(self) -> None: ... - def ungrabGesture(self, type: QtCore.Qt.GestureType) -> None: ... - def grabGesture(self, type: QtCore.Qt.GestureType, flags: typing.Union[QtCore.Qt.GestureFlags, QtCore.Qt.GestureFlag] = ...) -> None: ... - - -class QGraphicsTextItem(QGraphicsObject): - - @typing.overload - def __init__(self, parent: typing.Optional[QGraphicsItem] = ...) -> None: ... - @typing.overload - def __init__(self, text: str, parent: typing.Optional[QGraphicsItem] = ...) -> None: ... - - def inputMethodQuery(self, query: QtCore.Qt.InputMethodQuery) -> typing.Any: ... - def hoverLeaveEvent(self, event: 'QGraphicsSceneHoverEvent') -> None: ... - def hoverMoveEvent(self, event: 'QGraphicsSceneHoverEvent') -> None: ... - def hoverEnterEvent(self, event: 'QGraphicsSceneHoverEvent') -> None: ... - def inputMethodEvent(self, event: QtGui.QInputMethodEvent) -> None: ... - def dropEvent(self, event: 'QGraphicsSceneDragDropEvent') -> None: ... - def dragMoveEvent(self, event: 'QGraphicsSceneDragDropEvent') -> None: ... - def dragLeaveEvent(self, event: 'QGraphicsSceneDragDropEvent') -> None: ... - def dragEnterEvent(self, event: 'QGraphicsSceneDragDropEvent') -> None: ... - def focusOutEvent(self, event: QtGui.QFocusEvent) -> None: ... - def focusInEvent(self, event: QtGui.QFocusEvent) -> None: ... - def keyReleaseEvent(self, event: QtGui.QKeyEvent) -> None: ... - def keyPressEvent(self, event: QtGui.QKeyEvent) -> None: ... - def contextMenuEvent(self, event: 'QGraphicsSceneContextMenuEvent') -> None: ... - def mouseDoubleClickEvent(self, event: 'QGraphicsSceneMouseEvent') -> None: ... - def mouseReleaseEvent(self, event: 'QGraphicsSceneMouseEvent') -> None: ... - def mouseMoveEvent(self, event: 'QGraphicsSceneMouseEvent') -> None: ... - def mousePressEvent(self, event: 'QGraphicsSceneMouseEvent') -> None: ... - def sceneEvent(self, event: QtCore.QEvent) -> bool: ... - def linkHovered(self, a0: str) -> None: ... - def linkActivated(self, a0: str) -> None: ... - def textCursor(self) -> QtGui.QTextCursor: ... - def setTextCursor(self, cursor: QtGui.QTextCursor) -> None: ... - def openExternalLinks(self) -> bool: ... - def setOpenExternalLinks(self, open: bool) -> None: ... - def tabChangesFocus(self) -> bool: ... - def setTabChangesFocus(self, b: bool) -> None: ... - def textInteractionFlags(self) -> QtCore.Qt.TextInteractionFlags: ... - def setTextInteractionFlags(self, flags: typing.Union[QtCore.Qt.TextInteractionFlags, QtCore.Qt.TextInteractionFlag]) -> None: ... - def document(self) -> QtGui.QTextDocument: ... - def setDocument(self, document: QtGui.QTextDocument) -> None: ... - def adjustSize(self) -> None: ... - def textWidth(self) -> float: ... - def setTextWidth(self, width: float) -> None: ... - def type(self) -> int: ... - def opaqueArea(self) -> QtGui.QPainterPath: ... - def isObscuredBy(self, item: QGraphicsItem) -> bool: ... - # def paint(self, painter: QtGui.QPainter, option: 'QStyleOptionGraphicsItem', widget: QWidget) -> None: ... - def contains(self, point: typing.Union[QtCore.QPointF, QtCore.QPoint]) -> bool: ... - def shape(self) -> QtGui.QPainterPath: ... - def boundingRect(self) -> QtCore.QRectF: ... - def defaultTextColor(self) -> QtGui.QColor: ... - def setDefaultTextColor(self, c: typing.Union[QtGui.QColor, QtCore.Qt.GlobalColor, QtGui.QGradient]) -> None: ... - def setFont(self, font: QtGui.QFont) -> None: ... - def font(self) -> QtGui.QFont: ... - def setPlainText(self, text: str) -> None: ... - def toPlainText(self) -> str: ... - def setHtml(self, html: str) -> None: ... - def toHtml(self) -> str: ... - - -class QGraphicsLinearLayout(QGraphicsLayout): - - @typing.overload - def __init__(self, parent: typing.Optional[QGraphicsLayoutItem] = ...) -> None: ... - @typing.overload - def __init__(self, orientation: QtCore.Qt.Orientation, parent: typing.Optional[QGraphicsLayoutItem] = ...) -> None: ... - - def sizeHint(self, which: QtCore.Qt.SizeHint, constraint: QtCore.QSizeF = ...) -> QtCore.QSizeF: ... - def invalidate(self) -> None: ... - def itemAt(self, index: int) -> QGraphicsLayoutItem: ... - def count(self) -> int: ... - def setGeometry(self, rect: QtCore.QRectF) -> None: ... - def alignment(self, item: QGraphicsLayoutItem) -> QtCore.Qt.Alignment: ... - def setAlignment(self, item: QGraphicsLayoutItem, alignment: typing.Union[QtCore.Qt.Alignment, QtCore.Qt.AlignmentFlag]) -> None: ... - def stretchFactor(self, item: QGraphicsLayoutItem) -> int: ... - def setStretchFactor(self, item: QGraphicsLayoutItem, stretch: int) -> None: ... - def itemSpacing(self, index: int) -> float: ... - def setItemSpacing(self, index: int, spacing: float) -> None: ... - def spacing(self) -> float: ... - def setSpacing(self, spacing: float) -> None: ... - def removeAt(self, index: int) -> None: ... - def removeItem(self, item: QGraphicsLayoutItem) -> None: ... - def insertStretch(self, index: int, stretch: int = ...) -> None: ... - def insertItem(self, index: int, item: QGraphicsLayoutItem) -> None: ... - def addStretch(self, stretch: int = ...) -> None: ... - def addItem(self, item: QGraphicsLayoutItem) -> None: ... - def orientation(self) -> QtCore.Qt.Orientation: ... - def setOrientation(self, orientation: QtCore.Qt.Orientation) -> None: ... - - -class QGraphicsWidget(QGraphicsObject, QGraphicsLayoutItem): - - def __init__(self, parent: typing.Optional[QGraphicsItem] = ..., flags: typing.Union[QtCore.Qt.WindowFlags, QtCore.Qt.WindowType] = ...) -> None: ... - - def geometryChanged(self) -> None: ... - def setAutoFillBackground(self, enabled: bool) -> None: ... - def autoFillBackground(self) -> bool: ... - def ungrabKeyboardEvent(self, event: QtCore.QEvent) -> None: ... - def grabKeyboardEvent(self, event: QtCore.QEvent) -> None: ... - def ungrabMouseEvent(self, event: QtCore.QEvent) -> None: ... - def grabMouseEvent(self, event: QtCore.QEvent) -> None: ... - def hoverLeaveEvent(self, event: 'QGraphicsSceneHoverEvent') -> None: ... - def hoverMoveEvent(self, event: 'QGraphicsSceneHoverEvent') -> None: ... - def showEvent(self, event: QtGui.QShowEvent) -> None: ... - def resizeEvent(self, event: 'QGraphicsSceneResizeEvent') -> None: ... - def polishEvent(self) -> None: ... - def moveEvent(self, event: 'QGraphicsSceneMoveEvent') -> None: ... - def hideEvent(self, event: QtGui.QHideEvent) -> None: ... - def focusOutEvent(self, event: QtGui.QFocusEvent) -> None: ... - def focusNextPrevChild(self, next: bool) -> bool: ... - def focusInEvent(self, event: QtGui.QFocusEvent) -> None: ... - def closeEvent(self, event: QtGui.QCloseEvent) -> None: ... - def changeEvent(self, event: QtCore.QEvent) -> None: ... - def event(self, event: QtCore.QEvent) -> bool: ... - def windowFrameSectionAt(self, pos: typing.Union[QtCore.QPointF, QtCore.QPoint]) -> QtCore.Qt.WindowFrameSection: ... - def windowFrameEvent(self, e: QtCore.QEvent) -> bool: ... - def sceneEvent(self, event: QtCore.QEvent) -> bool: ... - def itemChange(self, change: QGraphicsItem.GraphicsItemChange, value: typing.Any) -> typing.Any: ... - def updateGeometry(self) -> None: ... - def sizeHint(self, which: QtCore.Qt.SizeHint, constraint: QtCore.QSizeF = ...) -> QtCore.QSizeF: ... - def initStyleOption(self, option: 'QStyleOption') -> None: ... - def close(self) -> bool: ... - def shape(self) -> QtGui.QPainterPath: ... - def boundingRect(self) -> QtCore.QRectF: ... - def paintWindowFrame(self, painter: QtGui.QPainter, option: 'QStyleOptionGraphicsItem', widget: typing.Optional[QWidget] = ...) -> None: ... - def paint(self, painter: QtGui.QPainter, option: 'QStyleOptionGraphicsItem', widget: typing.Optional[QWidget] = ...) -> None: ... - def type(self) -> int: ... - def testAttribute(self, attribute: QtCore.Qt.WidgetAttribute) -> bool: ... - def setAttribute(self, attribute: QtCore.Qt.WidgetAttribute, on: bool = ...) -> None: ... - def actions(self) -> typing.List[QAction]: ... - def removeAction(self, action: QAction) -> None: ... - def insertActions(self, before: QAction, actions: typing.Iterable[QAction]) -> None: ... - def insertAction(self, before: QAction, action: QAction) -> None: ... - def addActions(self, actions: typing.Iterable[QAction]) -> None: ... - def addAction(self, action: QAction) -> None: ... - def setShortcutAutoRepeat(self, id: int, enabled: bool = ...) -> None: ... - def setShortcutEnabled(self, id: int, enabled: bool = ...) -> None: ... - def releaseShortcut(self, id: int) -> None: ... - def grabShortcut(self, sequence: typing.Union[QtGui.QKeySequence, QtGui.QKeySequence.StandardKey, str, int], context: QtCore.Qt.ShortcutContext = ...) -> int: ... - def focusWidget(self) -> 'QGraphicsWidget': ... - @staticmethod - def setTabOrder(first: 'QGraphicsWidget', second: 'QGraphicsWidget') -> None: ... - def setFocusPolicy(self, policy: QtCore.Qt.FocusPolicy) -> None: ... - def focusPolicy(self) -> QtCore.Qt.FocusPolicy: ... - def windowTitle(self) -> str: ... - def setWindowTitle(self, title: str) -> None: ... - def isActiveWindow(self) -> bool: ... - def setWindowFlags(self, wFlags: typing.Union[QtCore.Qt.WindowFlags, QtCore.Qt.WindowType]) -> None: ... - def windowType(self) -> QtCore.Qt.WindowType: ... - def windowFlags(self) -> QtCore.Qt.WindowFlags: ... - def windowFrameRect(self) -> QtCore.QRectF: ... - def windowFrameGeometry(self) -> QtCore.QRectF: ... - def unsetWindowFrameMargins(self) -> None: ... - def getWindowFrameMargins(self) -> typing.Tuple[float, float, float, float]: ... - def setWindowFrameMargins(self, left: float, top: float, right: float, bottom: float) -> None: ... - def getContentsMargins(self) -> typing.Tuple[float, float, float, float]: ... - def setContentsMargins(self, left: float, top: float, right: float, bottom: float) -> None: ... - def rect(self) -> QtCore.QRectF: ... - @typing.overload - def setGeometry(self, rect: QtCore.QRectF) -> None: ... - @typing.overload - def setGeometry(self, ax: float, ay: float, aw: float, ah: float) -> None: ... - def size(self) -> QtCore.QSizeF: ... - @typing.overload - def resize(self, size: QtCore.QSizeF) -> None: ... - @typing.overload - def resize(self, w: float, h: float) -> None: ... - def setPalette(self, palette: QtGui.QPalette) -> None: ... - def palette(self) -> QtGui.QPalette: ... - def setFont(self, font: QtGui.QFont) -> None: ... - def font(self) -> QtGui.QFont: ... - def setStyle(self, style: QStyle) -> None: ... - def style(self) -> QStyle: ... - def unsetLayoutDirection(self) -> None: ... - def setLayoutDirection(self, direction: QtCore.Qt.LayoutDirection) -> None: ... - def layoutDirection(self) -> QtCore.Qt.LayoutDirection: ... - def adjustSize(self) -> None: ... - def setLayout(self, layout: QGraphicsLayout) -> None: ... - def layout(self) -> QGraphicsLayout: ... - - -class QGraphicsProxyWidget(QGraphicsWidget): - - def __init__(self, parent: typing.Optional[QGraphicsItem] = ..., flags: typing.Union[QtCore.Qt.WindowFlags, QtCore.Qt.WindowType] = ...) -> None: ... - - def inputMethodEvent(self, event: QtGui.QInputMethodEvent) -> None: ... - def inputMethodQuery(self, query: QtCore.Qt.InputMethodQuery) -> typing.Any: ... - def newProxyWidget(self, a0: QWidget) -> 'QGraphicsProxyWidget': ... - def dropEvent(self, event: 'QGraphicsSceneDragDropEvent') -> None: ... - def dragMoveEvent(self, event: 'QGraphicsSceneDragDropEvent') -> None: ... - def dragLeaveEvent(self, event: 'QGraphicsSceneDragDropEvent') -> None: ... - def dragEnterEvent(self, event: 'QGraphicsSceneDragDropEvent') -> None: ... - def resizeEvent(self, event: 'QGraphicsSceneResizeEvent') -> None: ... - def sizeHint(self, which: QtCore.Qt.SizeHint, constraint: QtCore.QSizeF = ...) -> QtCore.QSizeF: ... - def focusNextPrevChild(self, next: bool) -> bool: ... - def focusOutEvent(self, event: QtGui.QFocusEvent) -> None: ... - def focusInEvent(self, event: QtGui.QFocusEvent) -> None: ... - def keyReleaseEvent(self, event: QtGui.QKeyEvent) -> None: ... - def keyPressEvent(self, event: QtGui.QKeyEvent) -> None: ... - def wheelEvent(self, event: 'QGraphicsSceneWheelEvent') -> None: ... - def mouseDoubleClickEvent(self, event: 'QGraphicsSceneMouseEvent') -> None: ... - def mouseReleaseEvent(self, event: 'QGraphicsSceneMouseEvent') -> None: ... - def mousePressEvent(self, event: 'QGraphicsSceneMouseEvent') -> None: ... - def mouseMoveEvent(self, event: 'QGraphicsSceneMouseEvent') -> None: ... - def ungrabMouseEvent(self, event: QtCore.QEvent) -> None: ... - def grabMouseEvent(self, event: QtCore.QEvent) -> None: ... - def hoverMoveEvent(self, event: 'QGraphicsSceneHoverEvent') -> None: ... - def hoverLeaveEvent(self, event: 'QGraphicsSceneHoverEvent') -> None: ... - def hoverEnterEvent(self, event: 'QGraphicsSceneHoverEvent') -> None: ... - def contextMenuEvent(self, event: 'QGraphicsSceneContextMenuEvent') -> None: ... - def hideEvent(self, event: QtGui.QHideEvent) -> None: ... - def showEvent(self, event: QtGui.QShowEvent) -> None: ... - def eventFilter(self, object: QtCore.QObject, event: QtCore.QEvent) -> bool: ... - def event(self, event: QtCore.QEvent) -> bool: ... - def itemChange(self, change: QGraphicsItem.GraphicsItemChange, value: typing.Any) -> typing.Any: ... - def createProxyForChildWidget(self, child: QWidget) -> 'QGraphicsProxyWidget': ... - def type(self) -> int: ... - # def paint(self, painter: QtGui.QPainter, option: 'QStyleOptionGraphicsItem', widget: QWidget) -> None: ... - # def setGeometry(self, rect: QtCore.QRectF) -> None: ... - def subWidgetRect(self, widget: QWidget) -> QtCore.QRectF: ... - def widget(self) -> QWidget: ... - def setWidget(self, widget: QWidget) -> None: ... - - -class QGraphicsScene(QtCore.QObject): - - class SceneLayer(int): ... - ItemLayer = ... # type: 'QGraphicsScene.SceneLayer' - BackgroundLayer = ... # type: 'QGraphicsScene.SceneLayer' - ForegroundLayer = ... # type: 'QGraphicsScene.SceneLayer' - AllLayers = ... # type: 'QGraphicsScene.SceneLayer' - - class ItemIndexMethod(int): ... - BspTreeIndex = ... # type: 'QGraphicsScene.ItemIndexMethod' - NoIndex = ... # type: 'QGraphicsScene.ItemIndexMethod' - - class SceneLayers(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QGraphicsScene.SceneLayers', 'QGraphicsScene.SceneLayer']) -> None: ... - @typing.overload - def __init__(self, a0: 'QGraphicsScene.SceneLayers') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QGraphicsScene.SceneLayers': ... - def __int__(self) -> int: ... - - @typing.overload - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - @typing.overload - def __init__(self, sceneRect: QtCore.QRectF, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - @typing.overload - def __init__(self, x: float, y: float, width: float, height: float, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def focusItemChanged(self, newFocus: QGraphicsItem, oldFocus: QGraphicsItem, reason: QtCore.Qt.FocusReason) -> None: ... - def setMinimumRenderSize(self, minSize: float) -> None: ... - def minimumRenderSize(self) -> float: ... - def sendEvent(self, item: QGraphicsItem, event: QtCore.QEvent) -> bool: ... - def setActivePanel(self, item: QGraphicsItem) -> None: ... - def activePanel(self) -> QGraphicsItem: ... - def isActive(self) -> bool: ... - @typing.overload - def itemAt(self, pos: typing.Union[QtCore.QPointF, QtCore.QPoint], deviceTransform: QtGui.QTransform) -> QGraphicsItem: ... - @typing.overload - def itemAt(self, x: float, y: float, deviceTransform: QtGui.QTransform) -> QGraphicsItem: ... - def stickyFocus(self) -> bool: ... - def setStickyFocus(self, enabled: bool) -> None: ... - def focusNextPrevChild(self, next: bool) -> bool: ... - def eventFilter(self, watched: QtCore.QObject, event: QtCore.QEvent) -> bool: ... - def setActiveWindow(self, widget: QGraphicsWidget) -> None: ... - def activeWindow(self) -> QGraphicsWidget: ... - def setPalette(self, palette: QtGui.QPalette) -> None: ... - def palette(self) -> QtGui.QPalette: ... - def setFont(self, font: QtGui.QFont) -> None: ... - def font(self) -> QtGui.QFont: ... - def setStyle(self, style: QStyle) -> None: ... - def style(self) -> QStyle: ... - def addWidget(self, widget: QWidget, flags: typing.Union[QtCore.Qt.WindowFlags, QtCore.Qt.WindowType] = ...) -> QGraphicsProxyWidget: ... - def selectionArea(self) -> QtGui.QPainterPath: ... - def setBspTreeDepth(self, depth: int) -> None: ... - def bspTreeDepth(self) -> int: ... - def drawForeground(self, painter: QtGui.QPainter, rect: QtCore.QRectF) -> None: ... - def drawBackground(self, painter: QtGui.QPainter, rect: QtCore.QRectF) -> None: ... - def inputMethodEvent(self, event: QtGui.QInputMethodEvent) -> None: ... - def wheelEvent(self, event: 'QGraphicsSceneWheelEvent') -> None: ... - def mouseDoubleClickEvent(self, event: 'QGraphicsSceneMouseEvent') -> None: ... - def mouseReleaseEvent(self, event: 'QGraphicsSceneMouseEvent') -> None: ... - def mouseMoveEvent(self, event: 'QGraphicsSceneMouseEvent') -> None: ... - def mousePressEvent(self, event: 'QGraphicsSceneMouseEvent') -> None: ... - def keyReleaseEvent(self, event: QtGui.QKeyEvent) -> None: ... - def keyPressEvent(self, event: QtGui.QKeyEvent) -> None: ... - def helpEvent(self, event: 'QGraphicsSceneHelpEvent') -> None: ... - def focusOutEvent(self, event: QtGui.QFocusEvent) -> None: ... - def focusInEvent(self, event: QtGui.QFocusEvent) -> None: ... - def dropEvent(self, event: 'QGraphicsSceneDragDropEvent') -> None: ... - def dragLeaveEvent(self, event: 'QGraphicsSceneDragDropEvent') -> None: ... - def dragMoveEvent(self, event: 'QGraphicsSceneDragDropEvent') -> None: ... - def dragEnterEvent(self, event: 'QGraphicsSceneDragDropEvent') -> None: ... - def contextMenuEvent(self, event: 'QGraphicsSceneContextMenuEvent') -> None: ... - def event(self, event: QtCore.QEvent) -> bool: ... - def selectionChanged(self) -> None: ... - def sceneRectChanged(self, rect: QtCore.QRectF) -> None: ... - def changed(self, region: typing.Any) -> None: ... - def clear(self) -> None: ... - @typing.overload - def invalidate(self, rect: QtCore.QRectF = ..., layers: typing.Union['QGraphicsScene.SceneLayers', 'QGraphicsScene.SceneLayer'] = ...) -> None: ... - @typing.overload - def invalidate(self, x: float, y: float, w: float, h: float, layers: typing.Union['QGraphicsScene.SceneLayers', 'QGraphicsScene.SceneLayer'] = ...) -> None: ... - @typing.overload - def update(self, rect: QtCore.QRectF = ...) -> None: ... - @typing.overload - def update(self, x: float, y: float, w: float, h: float) -> None: ... - def advance(self) -> None: ... - def views(self) -> typing.Any: ... - def inputMethodQuery(self, query: QtCore.Qt.InputMethodQuery) -> typing.Any: ... - def setForegroundBrush(self, brush: typing.Union[QtGui.QBrush, QtGui.QColor, QtCore.Qt.GlobalColor, QtGui.QGradient]) -> None: ... - def foregroundBrush(self) -> QtGui.QBrush: ... - def setBackgroundBrush(self, brush: typing.Union[QtGui.QBrush, QtGui.QColor, QtCore.Qt.GlobalColor, QtGui.QGradient]) -> None: ... - def backgroundBrush(self) -> QtGui.QBrush: ... - def mouseGrabberItem(self) -> QGraphicsItem: ... - def clearFocus(self) -> None: ... - def setFocus(self, focusReason: QtCore.Qt.FocusReason = ...) -> None: ... - def hasFocus(self) -> bool: ... - def setFocusItem(self, item: QGraphicsItem, focusReason: QtCore.Qt.FocusReason = ...) -> None: ... - def focusItem(self) -> QGraphicsItem: ... - def removeItem(self, item: QGraphicsItem) -> None: ... - def addText(self, text: str, font: QtGui.QFont = ...) -> QGraphicsTextItem: ... - def addSimpleText(self, text: str, font: QtGui.QFont = ...) -> QGraphicsSimpleTextItem: ... - @typing.overload - def addRect(self, rect: QtCore.QRectF, pen: typing.Union[QtGui.QPen, QtGui.QColor, QtCore.Qt.GlobalColor, QtGui.QGradient] = ..., brush: typing.Union[QtGui.QBrush, QtGui.QColor, QtCore.Qt.GlobalColor, QtGui.QGradient] = ...) -> QGraphicsRectItem: ... - @typing.overload - def addRect(self, x: float, y: float, w: float, h: float, pen: typing.Union[QtGui.QPen, QtGui.QColor, QtCore.Qt.GlobalColor, QtGui.QGradient] = ..., brush: typing.Union[QtGui.QBrush, QtGui.QColor, QtCore.Qt.GlobalColor, QtGui.QGradient] = ...) -> QGraphicsRectItem: ... - def addPolygon(self, polygon: QtGui.QPolygonF, pen: typing.Union[QtGui.QPen, QtGui.QColor, QtCore.Qt.GlobalColor, QtGui.QGradient] = ..., brush: typing.Union[QtGui.QBrush, QtGui.QColor, QtCore.Qt.GlobalColor, QtGui.QGradient] = ...) -> QGraphicsPolygonItem: ... - def addPixmap(self, pixmap: QtGui.QPixmap) -> QGraphicsPixmapItem: ... - def addPath(self, path: QtGui.QPainterPath, pen: typing.Union[QtGui.QPen, QtGui.QColor, QtCore.Qt.GlobalColor, QtGui.QGradient] = ..., brush: typing.Union[QtGui.QBrush, QtGui.QColor, QtCore.Qt.GlobalColor, QtGui.QGradient] = ...) -> QGraphicsPathItem: ... - @typing.overload - def addLine(self, line: QtCore.QLineF, pen: typing.Union[QtGui.QPen, QtGui.QColor, QtCore.Qt.GlobalColor, QtGui.QGradient] = ...) -> QGraphicsLineItem: ... - @typing.overload - def addLine(self, x1: float, y1: float, x2: float, y2: float, pen: typing.Union[QtGui.QPen, QtGui.QColor, QtCore.Qt.GlobalColor, QtGui.QGradient] = ...) -> QGraphicsLineItem: ... - @typing.overload - def addEllipse(self, rect: QtCore.QRectF, pen: typing.Union[QtGui.QPen, QtGui.QColor, QtCore.Qt.GlobalColor, QtGui.QGradient] = ..., brush: typing.Union[QtGui.QBrush, QtGui.QColor, QtCore.Qt.GlobalColor, QtGui.QGradient] = ...) -> QGraphicsEllipseItem: ... - @typing.overload - def addEllipse(self, x: float, y: float, w: float, h: float, pen: typing.Union[QtGui.QPen, QtGui.QColor, QtCore.Qt.GlobalColor, QtGui.QGradient] = ..., brush: typing.Union[QtGui.QBrush, QtGui.QColor, QtCore.Qt.GlobalColor, QtGui.QGradient] = ...) -> QGraphicsEllipseItem: ... - def addItem(self, item: QGraphicsItem) -> None: ... - def destroyItemGroup(self, group: QGraphicsItemGroup) -> None: ... - def createItemGroup(self, items: typing.Iterable[QGraphicsItem]) -> QGraphicsItemGroup: ... - def clearSelection(self) -> None: ... - @typing.overload - def setSelectionArea(self, path: QtGui.QPainterPath, deviceTransform: QtGui.QTransform) -> None: ... - @typing.overload - def setSelectionArea(self, path: QtGui.QPainterPath, mode: QtCore.Qt.ItemSelectionMode = ..., deviceTransform: QtGui.QTransform = ...) -> None: ... - @typing.overload - def setSelectionArea(self, path: QtGui.QPainterPath, selectionOperation: QtCore.Qt.ItemSelectionOperation, mode: QtCore.Qt.ItemSelectionMode = ..., deviceTransform: QtGui.QTransform = ...) -> None: ... - def selectedItems(self) -> typing.List[QGraphicsItem]: ... - def collidingItems(self, item: QGraphicsItem, mode: QtCore.Qt.ItemSelectionMode = ...) -> typing.List[QGraphicsItem]: ... - @typing.overload - def items(self, order: QtCore.Qt.SortOrder = ...) -> typing.List[QGraphicsItem]: ... - @typing.overload - def items(self, pos: typing.Union[QtCore.QPointF, QtCore.QPoint], mode: QtCore.Qt.ItemSelectionMode = ..., order: QtCore.Qt.SortOrder = ..., deviceTransform: QtGui.QTransform = ...) -> typing.List[QGraphicsItem]: ... - @typing.overload - def items(self, rect: QtCore.QRectF, mode: QtCore.Qt.ItemSelectionMode = ..., order: QtCore.Qt.SortOrder = ..., deviceTransform: QtGui.QTransform = ...) -> typing.List[QGraphicsItem]: ... - @typing.overload - def items(self, polygon: QtGui.QPolygonF, mode: QtCore.Qt.ItemSelectionMode = ..., order: QtCore.Qt.SortOrder = ..., deviceTransform: QtGui.QTransform = ...) -> typing.List[QGraphicsItem]: ... - @typing.overload - def items(self, path: QtGui.QPainterPath, mode: QtCore.Qt.ItemSelectionMode = ..., order: QtCore.Qt.SortOrder = ..., deviceTransform: QtGui.QTransform = ...) -> typing.List[QGraphicsItem]: ... - @typing.overload - def items(self, x: float, y: float, w: float, h: float, mode: QtCore.Qt.ItemSelectionMode, order: QtCore.Qt.SortOrder, deviceTransform: QtGui.QTransform = ...) -> typing.List[QGraphicsItem]: ... - def itemsBoundingRect(self) -> QtCore.QRectF: ... - def setItemIndexMethod(self, method: 'QGraphicsScene.ItemIndexMethod') -> None: ... - def itemIndexMethod(self) -> 'QGraphicsScene.ItemIndexMethod': ... - def render(self, painter: QtGui.QPainter, target: QtCore.QRectF = ..., source: QtCore.QRectF = ..., mode: QtCore.Qt.AspectRatioMode = ...) -> None: ... - @typing.overload - def setSceneRect(self, rect: QtCore.QRectF) -> None: ... - @typing.overload - def setSceneRect(self, x: float, y: float, w: float, h: float) -> None: ... - def height(self) -> float: ... - def width(self) -> float: ... - def sceneRect(self) -> QtCore.QRectF: ... - - -class QGraphicsSceneEvent(QtCore.QEvent): - - def widget(self) -> QWidget: ... - - -class QGraphicsSceneMouseEvent(QGraphicsSceneEvent): - - def flags(self) -> QtCore.Qt.MouseEventFlags: ... - def source(self) -> QtCore.Qt.MouseEventSource: ... - def modifiers(self) -> QtCore.Qt.KeyboardModifiers: ... - def button(self) -> QtCore.Qt.MouseButton: ... - def buttons(self) -> QtCore.Qt.MouseButtons: ... - def lastScreenPos(self) -> QtCore.QPoint: ... - def lastScenePos(self) -> QtCore.QPointF: ... - def lastPos(self) -> QtCore.QPointF: ... - def buttonDownScreenPos(self, button: QtCore.Qt.MouseButton) -> QtCore.QPoint: ... - def buttonDownScenePos(self, button: QtCore.Qt.MouseButton) -> QtCore.QPointF: ... - def buttonDownPos(self, button: QtCore.Qt.MouseButton) -> QtCore.QPointF: ... - def screenPos(self) -> QtCore.QPoint: ... - def scenePos(self) -> QtCore.QPointF: ... - def pos(self) -> QtCore.QPointF: ... - - -class QGraphicsSceneWheelEvent(QGraphicsSceneEvent): - - def orientation(self) -> QtCore.Qt.Orientation: ... - def delta(self) -> int: ... - def modifiers(self) -> QtCore.Qt.KeyboardModifiers: ... - def buttons(self) -> QtCore.Qt.MouseButtons: ... - def screenPos(self) -> QtCore.QPoint: ... - def scenePos(self) -> QtCore.QPointF: ... - def pos(self) -> QtCore.QPointF: ... - - -class QGraphicsSceneContextMenuEvent(QGraphicsSceneEvent): - - class Reason(int): ... - Mouse = ... # type: 'QGraphicsSceneContextMenuEvent.Reason' - Keyboard = ... # type: 'QGraphicsSceneContextMenuEvent.Reason' - Other = ... # type: 'QGraphicsSceneContextMenuEvent.Reason' - - def reason(self) -> 'QGraphicsSceneContextMenuEvent.Reason': ... - def modifiers(self) -> QtCore.Qt.KeyboardModifiers: ... - def screenPos(self) -> QtCore.QPoint: ... - def scenePos(self) -> QtCore.QPointF: ... - def pos(self) -> QtCore.QPointF: ... - - -class QGraphicsSceneHoverEvent(QGraphicsSceneEvent): - - def modifiers(self) -> QtCore.Qt.KeyboardModifiers: ... - def lastScreenPos(self) -> QtCore.QPoint: ... - def lastScenePos(self) -> QtCore.QPointF: ... - def lastPos(self) -> QtCore.QPointF: ... - def screenPos(self) -> QtCore.QPoint: ... - def scenePos(self) -> QtCore.QPointF: ... - def pos(self) -> QtCore.QPointF: ... - - -class QGraphicsSceneHelpEvent(QGraphicsSceneEvent): - - def screenPos(self) -> QtCore.QPoint: ... - def scenePos(self) -> QtCore.QPointF: ... - - -class QGraphicsSceneDragDropEvent(QGraphicsSceneEvent): - - def mimeData(self) -> QtCore.QMimeData: ... - def source(self) -> QWidget: ... - def setDropAction(self, action: QtCore.Qt.DropAction) -> None: ... - def dropAction(self) -> QtCore.Qt.DropAction: ... - def acceptProposedAction(self) -> None: ... - def proposedAction(self) -> QtCore.Qt.DropAction: ... - def possibleActions(self) -> QtCore.Qt.DropActions: ... - def modifiers(self) -> QtCore.Qt.KeyboardModifiers: ... - def buttons(self) -> QtCore.Qt.MouseButtons: ... - def screenPos(self) -> QtCore.QPoint: ... - def scenePos(self) -> QtCore.QPointF: ... - def pos(self) -> QtCore.QPointF: ... - - -class QGraphicsSceneResizeEvent(QGraphicsSceneEvent): - - def __init__(self) -> None: ... - - def newSize(self) -> QtCore.QSizeF: ... - def oldSize(self) -> QtCore.QSizeF: ... - - -class QGraphicsSceneMoveEvent(QGraphicsSceneEvent): - - def __init__(self) -> None: ... - - def newPos(self) -> QtCore.QPointF: ... - def oldPos(self) -> QtCore.QPointF: ... - - -class QGraphicsTransform(QtCore.QObject): - - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def update(self) -> None: ... - def applyTo(self, matrix: QtGui.QMatrix4x4) -> None: ... - - -class QGraphicsScale(QGraphicsTransform): - - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def zScaleChanged(self) -> None: ... - def yScaleChanged(self) -> None: ... - def xScaleChanged(self) -> None: ... - def scaleChanged(self) -> None: ... - def originChanged(self) -> None: ... - def applyTo(self, matrix: QtGui.QMatrix4x4) -> None: ... - def setZScale(self, a0: float) -> None: ... - def zScale(self) -> float: ... - def setYScale(self, a0: float) -> None: ... - def yScale(self) -> float: ... - def setXScale(self, a0: float) -> None: ... - def xScale(self) -> float: ... - def setOrigin(self, point: QtGui.QVector3D) -> None: ... - def origin(self) -> QtGui.QVector3D: ... - - -class QGraphicsRotation(QGraphicsTransform): - - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def axisChanged(self) -> None: ... - def angleChanged(self) -> None: ... - def originChanged(self) -> None: ... - def applyTo(self, matrix: QtGui.QMatrix4x4) -> None: ... - @typing.overload - def setAxis(self, axis: QtGui.QVector3D) -> None: ... - @typing.overload - def setAxis(self, axis: QtCore.Qt.Axis) -> None: ... - def axis(self) -> QtGui.QVector3D: ... - def setAngle(self, a0: float) -> None: ... - def angle(self) -> float: ... - def setOrigin(self, point: QtGui.QVector3D) -> None: ... - def origin(self) -> QtGui.QVector3D: ... - - -class QGraphicsView(QAbstractScrollArea): - - class OptimizationFlag(int): ... - DontClipPainter = ... # type: 'QGraphicsView.OptimizationFlag' - DontSavePainterState = ... # type: 'QGraphicsView.OptimizationFlag' - DontAdjustForAntialiasing = ... # type: 'QGraphicsView.OptimizationFlag' - - class ViewportUpdateMode(int): ... - FullViewportUpdate = ... # type: 'QGraphicsView.ViewportUpdateMode' - MinimalViewportUpdate = ... # type: 'QGraphicsView.ViewportUpdateMode' - SmartViewportUpdate = ... # type: 'QGraphicsView.ViewportUpdateMode' - BoundingRectViewportUpdate = ... # type: 'QGraphicsView.ViewportUpdateMode' - NoViewportUpdate = ... # type: 'QGraphicsView.ViewportUpdateMode' - - class ViewportAnchor(int): ... - NoAnchor = ... # type: 'QGraphicsView.ViewportAnchor' - AnchorViewCenter = ... # type: 'QGraphicsView.ViewportAnchor' - AnchorUnderMouse = ... # type: 'QGraphicsView.ViewportAnchor' - - class DragMode(int): ... - NoDrag = ... # type: 'QGraphicsView.DragMode' - ScrollHandDrag = ... # type: 'QGraphicsView.DragMode' - RubberBandDrag = ... # type: 'QGraphicsView.DragMode' - - class CacheModeFlag(int): ... - CacheNone = ... # type: 'QGraphicsView.CacheModeFlag' - CacheBackground = ... # type: 'QGraphicsView.CacheModeFlag' - - class CacheMode(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QGraphicsView.CacheMode', 'QGraphicsView.CacheModeFlag']) -> None: ... - @typing.overload - def __init__(self, a0: 'QGraphicsView.CacheMode') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QGraphicsView.CacheMode': ... - def __int__(self) -> int: ... - - class OptimizationFlags(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QGraphicsView.OptimizationFlags', 'QGraphicsView.OptimizationFlag']) -> None: ... - @typing.overload - def __init__(self, a0: 'QGraphicsView.OptimizationFlags') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QGraphicsView.OptimizationFlags': ... - def __int__(self) -> int: ... - - @typing.overload - def __init__(self, parent: typing.Optional[QWidget] = ...) -> None: ... - @typing.overload - def __init__(self, scene: QGraphicsScene, parent: typing.Optional[QWidget] = ...) -> None: ... - - def rubberBandChanged(self, viewportRect: QtCore.QRect, fromScenePoint: typing.Union[QtCore.QPointF, QtCore.QPoint], toScenePoint: typing.Union[QtCore.QPointF, QtCore.QPoint]) -> None: ... - def rubberBandRect(self) -> QtCore.QRect: ... - def isTransformed(self) -> bool: ... - def resetTransform(self) -> None: ... - def setTransform(self, matrix: QtGui.QTransform, combine: bool = ...) -> None: ... - def viewportTransform(self) -> QtGui.QTransform: ... - def transform(self) -> QtGui.QTransform: ... - def setRubberBandSelectionMode(self, mode: QtCore.Qt.ItemSelectionMode) -> None: ... - def rubberBandSelectionMode(self) -> QtCore.Qt.ItemSelectionMode: ... - def setOptimizationFlags(self, flags: typing.Union['QGraphicsView.OptimizationFlags', 'QGraphicsView.OptimizationFlag']) -> None: ... - def setOptimizationFlag(self, flag: 'QGraphicsView.OptimizationFlag', enabled: bool = ...) -> None: ... - def optimizationFlags(self) -> 'QGraphicsView.OptimizationFlags': ... - def setViewportUpdateMode(self, mode: 'QGraphicsView.ViewportUpdateMode') -> None: ... - def viewportUpdateMode(self) -> 'QGraphicsView.ViewportUpdateMode': ... - def drawForeground(self, painter: QtGui.QPainter, rect: QtCore.QRectF) -> None: ... - def drawBackground(self, painter: QtGui.QPainter, rect: QtCore.QRectF) -> None: ... - def inputMethodEvent(self, event: QtGui.QInputMethodEvent) -> None: ... - def showEvent(self, event: QtGui.QShowEvent) -> None: ... - def scrollContentsBy(self, dx: int, dy: int) -> None: ... - def resizeEvent(self, event: QtGui.QResizeEvent) -> None: ... - def paintEvent(self, event: QtGui.QPaintEvent) -> None: ... - def wheelEvent(self, event: QtGui.QWheelEvent) -> None: ... - def mouseReleaseEvent(self, event: QtGui.QMouseEvent) -> None: ... - def mouseMoveEvent(self, event: QtGui.QMouseEvent) -> None: ... - def mousePressEvent(self, event: QtGui.QMouseEvent) -> None: ... - def mouseDoubleClickEvent(self, event: QtGui.QMouseEvent) -> None: ... - def keyReleaseEvent(self, event: QtGui.QKeyEvent) -> None: ... - def keyPressEvent(self, event: QtGui.QKeyEvent) -> None: ... - def focusNextPrevChild(self, next: bool) -> bool: ... - def focusOutEvent(self, event: QtGui.QFocusEvent) -> None: ... - def focusInEvent(self, event: QtGui.QFocusEvent) -> None: ... - def dropEvent(self, event: QtGui.QDropEvent) -> None: ... - def dragMoveEvent(self, event: QtGui.QDragMoveEvent) -> None: ... - def dragLeaveEvent(self, event: QtGui.QDragLeaveEvent) -> None: ... - def dragEnterEvent(self, event: QtGui.QDragEnterEvent) -> None: ... - def contextMenuEvent(self, event: QtGui.QContextMenuEvent) -> None: ... - def viewportEvent(self, event: QtCore.QEvent) -> bool: ... - def event(self, event: QtCore.QEvent) -> bool: ... - def setupViewport(self, widget: QWidget) -> None: ... - def updateSceneRect(self, rect: QtCore.QRectF) -> None: ... - def updateScene(self, rects: typing.Iterable[QtCore.QRectF]) -> None: ... - def invalidateScene(self, rect: QtCore.QRectF = ..., layers: typing.Union[QGraphicsScene.SceneLayers, QGraphicsScene.SceneLayer] = ...) -> None: ... - def setForegroundBrush(self, brush: typing.Union[QtGui.QBrush, QtGui.QColor, QtCore.Qt.GlobalColor, QtGui.QGradient]) -> None: ... - def foregroundBrush(self) -> QtGui.QBrush: ... - def setBackgroundBrush(self, brush: typing.Union[QtGui.QBrush, QtGui.QColor, QtCore.Qt.GlobalColor, QtGui.QGradient]) -> None: ... - def backgroundBrush(self) -> QtGui.QBrush: ... - def inputMethodQuery(self, query: QtCore.Qt.InputMethodQuery) -> typing.Any: ... - @typing.overload - def mapFromScene(self, point: typing.Union[QtCore.QPointF, QtCore.QPoint]) -> QtCore.QPoint: ... - @typing.overload - def mapFromScene(self, rect: QtCore.QRectF) -> QtGui.QPolygon: ... - @typing.overload - def mapFromScene(self, polygon: QtGui.QPolygonF) -> QtGui.QPolygon: ... - @typing.overload - def mapFromScene(self, path: QtGui.QPainterPath) -> QtGui.QPainterPath: ... - @typing.overload - def mapFromScene(self, ax: float, ay: float) -> QtCore.QPoint: ... - @typing.overload - def mapFromScene(self, ax: float, ay: float, w: float, h: float) -> QtGui.QPolygon: ... - @typing.overload - def mapToScene(self, point: QtCore.QPoint) -> QtCore.QPointF: ... - @typing.overload - def mapToScene(self, rect: QtCore.QRect) -> QtGui.QPolygonF: ... - @typing.overload - def mapToScene(self, polygon: QtGui.QPolygon) -> QtGui.QPolygonF: ... - @typing.overload - def mapToScene(self, path: QtGui.QPainterPath) -> QtGui.QPainterPath: ... - @typing.overload - def mapToScene(self, ax: int, ay: int) -> QtCore.QPointF: ... - @typing.overload - def mapToScene(self, ax: int, ay: int, w: int, h: int) -> QtGui.QPolygonF: ... - @typing.overload - def itemAt(self, pos: QtCore.QPoint) -> QGraphicsItem: ... - @typing.overload - def itemAt(self, ax: int, ay: int) -> QGraphicsItem: ... - @typing.overload - def items(self) -> typing.List[QGraphicsItem]: ... - @typing.overload - def items(self, pos: QtCore.QPoint) -> typing.List[QGraphicsItem]: ... - @typing.overload - def items(self, x: int, y: int) -> typing.List[QGraphicsItem]: ... - @typing.overload - def items(self, x: int, y: int, w: int, h: int, mode: QtCore.Qt.ItemSelectionMode = ...) -> typing.List[QGraphicsItem]: ... - @typing.overload - def items(self, rect: QtCore.QRect, mode: QtCore.Qt.ItemSelectionMode = ...) -> typing.List[QGraphicsItem]: ... - @typing.overload - def items(self, polygon: QtGui.QPolygon, mode: QtCore.Qt.ItemSelectionMode = ...) -> typing.List[QGraphicsItem]: ... - @typing.overload - def items(self, path: QtGui.QPainterPath, mode: QtCore.Qt.ItemSelectionMode = ...) -> typing.List[QGraphicsItem]: ... - # def render(self, painter: QtGui.QPainter, target: QtCore.QRectF = ..., source: QtCore.QRect = ..., mode: QtCore.Qt.AspectRatioMode = ...) -> None: ... - @typing.overload - def fitInView(self, rect: QtCore.QRectF, mode: QtCore.Qt.AspectRatioMode = ...) -> None: ... - @typing.overload - def fitInView(self, item: QGraphicsItem, mode: QtCore.Qt.AspectRatioMode = ...) -> None: ... - @typing.overload - def fitInView(self, x: float, y: float, w: float, h: float, mode: QtCore.Qt.AspectRatioMode = ...) -> None: ... - @typing.overload - def ensureVisible(self, rect: QtCore.QRectF, xMargin: int = ..., yMargin: int = ...) -> None: ... - @typing.overload - def ensureVisible(self, item: QGraphicsItem, xMargin: int = ..., yMargin: int = ...) -> None: ... - @typing.overload - def ensureVisible(self, x: float, y: float, w: float, h: float, xMargin: int = ..., yMargin: int = ...) -> None: ... - @typing.overload - def centerOn(self, pos: typing.Union[QtCore.QPointF, QtCore.QPoint]) -> None: ... - @typing.overload - def centerOn(self, item: QGraphicsItem) -> None: ... - @typing.overload - def centerOn(self, ax: float, ay: float) -> None: ... - def translate(self, dx: float, dy: float) -> None: ... - def shear(self, sh: float, sv: float) -> None: ... - def scale(self, sx: float, sy: float) -> None: ... - def rotate(self, angle: float) -> None: ... - @typing.overload - def setSceneRect(self, rect: QtCore.QRectF) -> None: ... - @typing.overload - def setSceneRect(self, ax: float, ay: float, aw: float, ah: float) -> None: ... - def sceneRect(self) -> QtCore.QRectF: ... - def setScene(self, scene: QGraphicsScene) -> None: ... - def scene(self) -> QGraphicsScene: ... - def setInteractive(self, allowed: bool) -> None: ... - def isInteractive(self) -> bool: ... - def resetCachedContent(self) -> None: ... - def setCacheMode(self, mode: typing.Union['QGraphicsView.CacheMode', 'QGraphicsView.CacheModeFlag']) -> None: ... - def cacheMode(self) -> 'QGraphicsView.CacheMode': ... - def setDragMode(self, mode: 'QGraphicsView.DragMode') -> None: ... - def dragMode(self) -> 'QGraphicsView.DragMode': ... - def setResizeAnchor(self, anchor: 'QGraphicsView.ViewportAnchor') -> None: ... - def resizeAnchor(self) -> 'QGraphicsView.ViewportAnchor': ... - def setTransformationAnchor(self, anchor: 'QGraphicsView.ViewportAnchor') -> None: ... - def transformationAnchor(self) -> 'QGraphicsView.ViewportAnchor': ... - def setAlignment(self, alignment: typing.Union[QtCore.Qt.Alignment, QtCore.Qt.AlignmentFlag]) -> None: ... - def alignment(self) -> QtCore.Qt.Alignment: ... - def setRenderHints(self, hints: typing.Union[QtGui.QPainter.RenderHints, QtGui.QPainter.RenderHint]) -> None: ... - def setRenderHint(self, hint: QtGui.QPainter.RenderHint, on: bool = ...) -> None: ... - def renderHints(self) -> QtGui.QPainter.RenderHints: ... - def sizeHint(self) -> QtCore.QSize: ... - - -class QGridLayout(QLayout): - - @typing.overload - def __init__(self, parent: QWidget) -> None: ... - @typing.overload - def __init__(self) -> None: ... - - def itemAtPosition(self, row: int, column: int) -> QLayoutItem: ... - def spacing(self) -> int: ... - def setSpacing(self, spacing: int) -> None: ... - def verticalSpacing(self) -> int: ... - def setVerticalSpacing(self, spacing: int) -> None: ... - def horizontalSpacing(self) -> int: ... - def setHorizontalSpacing(self, spacing: int) -> None: ... - def getItemPosition(self, idx: int) -> typing.Tuple[int, int, int, int]: ... - def setDefaultPositioning(self, n: int, orient: QtCore.Qt.Orientation) -> None: ... - @typing.overload - def addItem(self, item: QLayoutItem, row: int, column: int, rowSpan: int = ..., columnSpan: int = ..., alignment: typing.Union[QtCore.Qt.Alignment, QtCore.Qt.AlignmentFlag] = ...) -> None: ... - @typing.overload - def addItem(self, a0: QLayoutItem) -> None: ... - def setGeometry(self, a0: QtCore.QRect) -> None: ... - def count(self) -> int: ... - def takeAt(self, a0: int) -> QLayoutItem: ... - def itemAt(self, a0: int) -> QLayoutItem: ... - def originCorner(self) -> QtCore.Qt.Corner: ... - def setOriginCorner(self, a0: QtCore.Qt.Corner) -> None: ... - @typing.overload - def addLayout(self, a0: QLayout, row: int, column: int, alignment: typing.Union[QtCore.Qt.Alignment, QtCore.Qt.AlignmentFlag] = ...) -> None: ... - @typing.overload - def addLayout(self, a0: QLayout, row: int, column: int, rowSpan: int, columnSpan: int, alignment: typing.Union[QtCore.Qt.Alignment, QtCore.Qt.AlignmentFlag] = ...) -> None: ... - @typing.overload - def addWidget(self, w: QWidget) -> None: ... - @typing.overload - def addWidget(self, a0: QWidget, row: int, column: int, alignment: typing.Union[QtCore.Qt.Alignment, QtCore.Qt.AlignmentFlag] = ...) -> None: ... - @typing.overload - def addWidget(self, a0: QWidget, row: int, column: int, rowSpan: int, columnSpan: int, alignment: typing.Union[QtCore.Qt.Alignment, QtCore.Qt.AlignmentFlag] = ...) -> None: ... - def invalidate(self) -> None: ... - def expandingDirections(self) -> QtCore.Qt.Orientations: ... - def minimumHeightForWidth(self, a0: int) -> int: ... - def heightForWidth(self, a0: int) -> int: ... - def hasHeightForWidth(self) -> bool: ... - def cellRect(self, row: int, column: int) -> QtCore.QRect: ... - def rowCount(self) -> int: ... - def columnCount(self) -> int: ... - def columnMinimumWidth(self, column: int) -> int: ... - def rowMinimumHeight(self, row: int) -> int: ... - def setColumnMinimumWidth(self, column: int, minSize: int) -> None: ... - def setRowMinimumHeight(self, row: int, minSize: int) -> None: ... - def columnStretch(self, column: int) -> int: ... - def rowStretch(self, row: int) -> int: ... - def setColumnStretch(self, column: int, stretch: int) -> None: ... - def setRowStretch(self, row: int, stretch: int) -> None: ... - def maximumSize(self) -> QtCore.QSize: ... - def minimumSize(self) -> QtCore.QSize: ... - def sizeHint(self) -> QtCore.QSize: ... - - -class QGroupBox(QWidget): - - @typing.overload - def __init__(self, parent: typing.Optional[QWidget] = ...) -> None: ... - @typing.overload - def __init__(self, title: str, parent: typing.Optional[QWidget] = ...) -> None: ... - - def mouseReleaseEvent(self, event: QtGui.QMouseEvent) -> None: ... - def mouseMoveEvent(self, event: QtGui.QMouseEvent) -> None: ... - def mousePressEvent(self, event: QtGui.QMouseEvent) -> None: ... - def changeEvent(self, a0: QtCore.QEvent) -> None: ... - def focusInEvent(self, a0: QtGui.QFocusEvent) -> None: ... - def paintEvent(self, a0: QtGui.QPaintEvent) -> None: ... - def resizeEvent(self, a0: QtGui.QResizeEvent) -> None: ... - def childEvent(self, a0: QtCore.QChildEvent) -> None: ... - def event(self, a0: QtCore.QEvent) -> bool: ... - def initStyleOption(self, option: 'QStyleOptionGroupBox') -> None: ... - def toggled(self, a0: bool) -> None: ... - def clicked(self, checked: bool = ...) -> None: ... - def setChecked(self, b: bool) -> None: ... - def isChecked(self) -> bool: ... - def setCheckable(self, b: bool) -> None: ... - def isCheckable(self) -> bool: ... - def setFlat(self, b: bool) -> None: ... - def isFlat(self) -> bool: ... - def minimumSizeHint(self) -> QtCore.QSize: ... - def setAlignment(self, a0: int) -> None: ... - def alignment(self) -> QtCore.Qt.Alignment: ... - def setTitle(self, a0: str) -> None: ... - def title(self) -> str: ... - - -class QHeaderView(QAbstractItemView): - - class ResizeMode(int): ... - Interactive = ... # type: 'QHeaderView.ResizeMode' - Fixed = ... # type: 'QHeaderView.ResizeMode' - Stretch = ... # type: 'QHeaderView.ResizeMode' - ResizeToContents = ... # type: 'QHeaderView.ResizeMode' - Custom = ... # type: 'QHeaderView.ResizeMode' - - def __init__(self, orientation: QtCore.Qt.Orientation, parent: typing.Optional[QWidget] = ...) -> None: ... - - def resetDefaultSectionSize(self) -> None: ... - def setMaximumSectionSize(self, size: int) -> None: ... - def maximumSectionSize(self) -> int: ... - def resizeContentsPrecision(self) -> int: ... - def setResizeContentsPrecision(self, precision: int) -> None: ... - def setVisible(self, v: bool) -> None: ... - @typing.overload - def setSectionResizeMode(self, logicalIndex: int, mode: 'QHeaderView.ResizeMode') -> None: ... - @typing.overload - def setSectionResizeMode(self, mode: 'QHeaderView.ResizeMode') -> None: ... - def sectionResizeMode(self, logicalIndex: int) -> 'QHeaderView.ResizeMode': ... - def sectionsClickable(self) -> bool: ... - def setSectionsClickable(self, clickable: bool) -> None: ... - def sectionsMovable(self) -> bool: ... - def setSectionsMovable(self, movable: bool) -> None: ... - # def initStyleOption(self, option: 'QStyleOptionHeader') -> None: ... - def sortIndicatorChanged(self, logicalIndex: int, order: QtCore.Qt.SortOrder) -> None: ... - def sectionEntered(self, logicalIndex: int) -> None: ... - def setOffsetToLastSection(self) -> None: ... - def reset(self) -> None: ... - def restoreState(self, state: typing.Union[QtCore.QByteArray, bytes, bytearray]) -> bool: ... - def saveState(self) -> QtCore.QByteArray: ... - def setMinimumSectionSize(self, size: int) -> None: ... - def minimumSectionSize(self) -> int: ... - def setCascadingSectionResizes(self, enable: bool) -> None: ... - def cascadingSectionResizes(self) -> bool: ... - def swapSections(self, first: int, second: int) -> None: ... - def sectionsHidden(self) -> bool: ... - def setDefaultAlignment(self, alignment: typing.Union[QtCore.Qt.Alignment, QtCore.Qt.AlignmentFlag]) -> None: ... - def defaultAlignment(self) -> QtCore.Qt.Alignment: ... - def setDefaultSectionSize(self, size: int) -> None: ... - def defaultSectionSize(self) -> int: ... - def hiddenSectionCount(self) -> int: ... - def showSection(self, alogicalIndex: int) -> None: ... - def hideSection(self, alogicalIndex: int) -> None: ... - def visualRegionForSelection(self, selection: QtCore.QItemSelection) -> QtGui.QRegion: ... - def setSelection(self, rect: QtCore.QRect, flags: typing.Union[QtCore.QItemSelectionModel.SelectionFlags, QtCore.QItemSelectionModel.SelectionFlag]) -> None: ... - def moveCursor(self, a0: QAbstractItemView.CursorAction, a1: typing.Union[QtCore.Qt.KeyboardModifiers, QtCore.Qt.KeyboardModifier]) -> QtCore.QModelIndex: ... - def isIndexHidden(self, index: QtCore.QModelIndex) -> bool: ... - def indexAt(self, p: QtCore.QPoint) -> QtCore.QModelIndex: ... - # def scrollTo(self, index: QtCore.QModelIndex, hint: QAbstractItemView.ScrollHint) -> None: ... - def visualRect(self, index: QtCore.QModelIndex) -> QtCore.QRect: ... - def rowsInserted(self, parent: QtCore.QModelIndex, start: int, end: int) -> None: ... - def dataChanged(self, topLeft: QtCore.QModelIndex, bottomRight: QtCore.QModelIndex, roles: typing.Iterable[int] = ...) -> None: ... - def scrollContentsBy(self, dx: int, dy: int) -> None: ... - def updateGeometries(self) -> None: ... - def verticalOffset(self) -> int: ... - def horizontalOffset(self) -> int: ... - def sectionSizeFromContents(self, logicalIndex: int) -> QtCore.QSize: ... - def paintSection(self, painter: QtGui.QPainter, rect: QtCore.QRect, logicalIndex: int) -> None: ... - def mouseDoubleClickEvent(self, e: QtGui.QMouseEvent) -> None: ... - def mouseReleaseEvent(self, e: QtGui.QMouseEvent) -> None: ... - def mouseMoveEvent(self, e: QtGui.QMouseEvent) -> None: ... - def mousePressEvent(self, e: QtGui.QMouseEvent) -> None: ... - def paintEvent(self, e: QtGui.QPaintEvent) -> None: ... - def viewportEvent(self, e: QtCore.QEvent) -> bool: ... - def event(self, e: QtCore.QEvent) -> bool: ... - def currentChanged(self, current: QtCore.QModelIndex, old: QtCore.QModelIndex) -> None: ... - @typing.overload - def initializeSections(self) -> None: ... - @typing.overload - def initializeSections(self, start: int, end: int) -> None: ... - def initialize(self) -> None: ... - def sectionsAboutToBeRemoved(self, parent: QtCore.QModelIndex, logicalFirst: int, logicalLast: int) -> None: ... - def sectionsInserted(self, parent: QtCore.QModelIndex, logicalFirst: int, logicalLast: int) -> None: ... - @typing.overload - def resizeSections(self) -> None: ... - @typing.overload - def resizeSections(self, mode: 'QHeaderView.ResizeMode') -> None: ... - def updateSection(self, logicalIndex: int) -> None: ... - def sectionHandleDoubleClicked(self, logicalIndex: int) -> None: ... - def sectionCountChanged(self, oldCount: int, newCount: int) -> None: ... - def sectionDoubleClicked(self, logicalIndex: int) -> None: ... - def sectionClicked(self, logicalIndex: int) -> None: ... - def sectionPressed(self, logicalIndex: int) -> None: ... - def sectionResized(self, logicalIndex: int, oldSize: int, newSize: int) -> None: ... - def sectionMoved(self, logicalIndex: int, oldVisualIndex: int, newVisualIndex: int) -> None: ... - def geometriesChanged(self) -> None: ... - def setOffsetToSectionPosition(self, visualIndex: int) -> None: ... - def headerDataChanged(self, orientation: QtCore.Qt.Orientation, logicalFirst: int, logicalLast: int) -> None: ... - def setOffset(self, offset: int) -> None: ... - def sectionsMoved(self) -> bool: ... - def setStretchLastSection(self, stretch: bool) -> None: ... - def stretchLastSection(self) -> bool: ... - def sortIndicatorOrder(self) -> QtCore.Qt.SortOrder: ... - def sortIndicatorSection(self) -> int: ... - def setSortIndicator(self, logicalIndex: int, order: QtCore.Qt.SortOrder) -> None: ... - def isSortIndicatorShown(self) -> bool: ... - def setSortIndicatorShown(self, show: bool) -> None: ... - def stretchSectionCount(self) -> int: ... - def highlightSections(self) -> bool: ... - def setHighlightSections(self, highlight: bool) -> None: ... - def logicalIndex(self, visualIndex: int) -> int: ... - def visualIndex(self, logicalIndex: int) -> int: ... - def __len__(self) -> int: ... - def count(self) -> int: ... - def setSectionHidden(self, logicalIndex: int, hide: bool) -> None: ... - def isSectionHidden(self, logicalIndex: int) -> bool: ... - def resizeSection(self, logicalIndex: int, size: int) -> None: ... - def moveSection(self, from_: int, to: int) -> None: ... - def sectionViewportPosition(self, logicalIndex: int) -> int: ... - def sectionPosition(self, logicalIndex: int) -> int: ... - def sectionSize(self, logicalIndex: int) -> int: ... - @typing.overload - def logicalIndexAt(self, position: int) -> int: ... - @typing.overload - def logicalIndexAt(self, ax: int, ay: int) -> int: ... - @typing.overload - def logicalIndexAt(self, apos: QtCore.QPoint) -> int: ... - def visualIndexAt(self, position: int) -> int: ... - def sectionSizeHint(self, logicalIndex: int) -> int: ... - def sizeHint(self) -> QtCore.QSize: ... - def length(self) -> int: ... - def offset(self) -> int: ... - def orientation(self) -> QtCore.Qt.Orientation: ... - def setModel(self, model: QtCore.QAbstractItemModel) -> None: ... - - -class QInputDialog(QDialog): - - class InputMode(int): ... - TextInput = ... # type: 'QInputDialog.InputMode' - IntInput = ... # type: 'QInputDialog.InputMode' - DoubleInput = ... # type: 'QInputDialog.InputMode' - - class InputDialogOption(int): ... - NoButtons = ... # type: 'QInputDialog.InputDialogOption' - UseListViewForComboBoxItems = ... # type: 'QInputDialog.InputDialogOption' - UsePlainTextEditForTextInput = ... # type: 'QInputDialog.InputDialogOption' - - class InputDialogOptions(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QInputDialog.InputDialogOptions', 'QInputDialog.InputDialogOption']) -> None: ... - @typing.overload - def __init__(self, a0: 'QInputDialog.InputDialogOptions') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QInputDialog.InputDialogOptions': ... - def __int__(self) -> int: ... - - def __init__(self, parent: typing.Optional[QWidget] = ..., flags: typing.Union[QtCore.Qt.WindowFlags, QtCore.Qt.WindowType] = ...) -> None: ... - - def doubleValueSelected(self, value: float) -> None: ... - def doubleValueChanged(self, value: float) -> None: ... - def intValueSelected(self, value: int) -> None: ... - def intValueChanged(self, value: int) -> None: ... - def textValueSelected(self, text: str) -> None: ... - def textValueChanged(self, text: str) -> None: ... - def done(self, result: int) -> None: ... - def setVisible(self, visible: bool) -> None: ... - def sizeHint(self) -> QtCore.QSize: ... - def minimumSizeHint(self) -> QtCore.QSize: ... - @typing.overload - def open(self) -> None: ... - @typing.overload - def open(self, slot: PYQT_SLOT) -> None: ... - def cancelButtonText(self) -> str: ... - def setCancelButtonText(self, text: str) -> None: ... - def okButtonText(self) -> str: ... - def setOkButtonText(self, text: str) -> None: ... - def doubleDecimals(self) -> int: ... - def setDoubleDecimals(self, decimals: int) -> None: ... - def setDoubleRange(self, min: float, max: float) -> None: ... - def doubleMaximum(self) -> float: ... - def setDoubleMaximum(self, max: float) -> None: ... - def doubleMinimum(self) -> float: ... - def setDoubleMinimum(self, min: float) -> None: ... - def doubleValue(self) -> float: ... - def setDoubleValue(self, value: float) -> None: ... - def intStep(self) -> int: ... - def setIntStep(self, step: int) -> None: ... - def setIntRange(self, min: int, max: int) -> None: ... - def intMaximum(self) -> int: ... - def setIntMaximum(self, max: int) -> None: ... - def intMinimum(self) -> int: ... - def setIntMinimum(self, min: int) -> None: ... - def intValue(self) -> int: ... - def setIntValue(self, value: int) -> None: ... - def comboBoxItems(self) -> typing.List[str]: ... - def setComboBoxItems(self, items: typing.Iterable[str]) -> None: ... - def isComboBoxEditable(self) -> bool: ... - def setComboBoxEditable(self, editable: bool) -> None: ... - def textEchoMode(self) -> 'QLineEdit.EchoMode': ... - def setTextEchoMode(self, mode: 'QLineEdit.EchoMode') -> None: ... - def textValue(self) -> str: ... - def setTextValue(self, text: str) -> None: ... - def options(self) -> 'QInputDialog.InputDialogOptions': ... - def setOptions(self, options: typing.Union['QInputDialog.InputDialogOptions', 'QInputDialog.InputDialogOption']) -> None: ... - def testOption(self, option: 'QInputDialog.InputDialogOption') -> bool: ... - def setOption(self, option: 'QInputDialog.InputDialogOption', on: bool = ...) -> None: ... - def labelText(self) -> str: ... - def setLabelText(self, text: str) -> None: ... - def inputMode(self) -> 'QInputDialog.InputMode': ... - def setInputMode(self, mode: 'QInputDialog.InputMode') -> None: ... - @staticmethod - def getMultiLineText(parent: QWidget, title: str, label: str, text: str = ..., flags: typing.Union[QtCore.Qt.WindowFlags, QtCore.Qt.WindowType] = ..., inputMethodHints: typing.Union[QtCore.Qt.InputMethodHints, QtCore.Qt.InputMethodHint] = ...) -> typing.Tuple[str, bool]: ... - @staticmethod - def getItem(parent: QWidget, title: str, label: str, items: typing.Iterable[str], current: int = ..., editable: bool = ..., flags: typing.Union[QtCore.Qt.WindowFlags, QtCore.Qt.WindowType] = ..., inputMethodHints: typing.Union[QtCore.Qt.InputMethodHints, QtCore.Qt.InputMethodHint] = ...) -> typing.Tuple[str, bool]: ... - @staticmethod - def getDouble(parent: QWidget, title: str, label: str, value: float = ..., min: float = ..., max: float = ..., decimals: int = ..., flags: typing.Union[QtCore.Qt.WindowFlags, QtCore.Qt.WindowType] = ...) -> typing.Tuple[float, bool]: ... - @staticmethod - def getInt(parent: QWidget, title: str, label: str, value: int = ..., min: int = ..., max: int = ..., step: int = ..., flags: typing.Union[QtCore.Qt.WindowFlags, QtCore.Qt.WindowType] = ...) -> typing.Tuple[int, bool]: ... - @staticmethod - def getText(parent: QWidget, title: str, label: str, echo: 'QLineEdit.EchoMode' = ..., text: str = ..., flags: typing.Union[QtCore.Qt.WindowFlags, QtCore.Qt.WindowType] = ..., inputMethodHints: typing.Union[QtCore.Qt.InputMethodHints, QtCore.Qt.InputMethodHint] = ...) -> typing.Tuple[str, bool]: ... - - -class QItemDelegate(QAbstractItemDelegate): - - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def editorEvent(self, event: QtCore.QEvent, model: QtCore.QAbstractItemModel, option: 'QStyleOptionViewItem', index: QtCore.QModelIndex) -> bool: ... - def eventFilter(self, object: QtCore.QObject, event: QtCore.QEvent) -> bool: ... - def drawFocus(self, painter: QtGui.QPainter, option: 'QStyleOptionViewItem', rect: QtCore.QRect) -> None: ... - def drawDisplay(self, painter: QtGui.QPainter, option: 'QStyleOptionViewItem', rect: QtCore.QRect, text: str) -> None: ... - def drawDecoration(self, painter: QtGui.QPainter, option: 'QStyleOptionViewItem', rect: QtCore.QRect, pixmap: QtGui.QPixmap) -> None: ... - def drawCheck(self, painter: QtGui.QPainter, option: 'QStyleOptionViewItem', rect: QtCore.QRect, state: QtCore.Qt.CheckState) -> None: ... - def drawBackground(self, painter: QtGui.QPainter, option: 'QStyleOptionViewItem', index: QtCore.QModelIndex) -> None: ... - def setClipping(self, clip: bool) -> None: ... - def hasClipping(self) -> bool: ... - def setItemEditorFactory(self, factory: 'QItemEditorFactory') -> None: ... - def itemEditorFactory(self) -> 'QItemEditorFactory': ... - def updateEditorGeometry(self, editor: QWidget, option: 'QStyleOptionViewItem', index: QtCore.QModelIndex) -> None: ... - def setModelData(self, editor: QWidget, model: QtCore.QAbstractItemModel, index: QtCore.QModelIndex) -> None: ... - def setEditorData(self, editor: QWidget, index: QtCore.QModelIndex) -> None: ... - def createEditor(self, parent: QWidget, option: 'QStyleOptionViewItem', index: QtCore.QModelIndex) -> QWidget: ... - def sizeHint(self, option: 'QStyleOptionViewItem', index: QtCore.QModelIndex) -> QtCore.QSize: ... - def paint(self, painter: QtGui.QPainter, option: 'QStyleOptionViewItem', index: QtCore.QModelIndex) -> None: ... - - -class QItemEditorCreatorBase(sip.wrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QItemEditorCreatorBase') -> None: ... - - def valuePropertyName(self) -> QtCore.QByteArray: ... - def createWidget(self, parent: QWidget) -> QWidget: ... - - -class QItemEditorFactory(sip.wrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QItemEditorFactory') -> None: ... - - @staticmethod - def setDefaultFactory(factory: 'QItemEditorFactory') -> None: ... - @staticmethod - def defaultFactory() -> 'QItemEditorFactory': ... - def registerEditor(self, userType: int, creator: QItemEditorCreatorBase) -> None: ... - def valuePropertyName(self, userType: int) -> QtCore.QByteArray: ... - def createEditor(self, userType: int, parent: QWidget) -> QWidget: ... - - -class QKeyEventTransition(QtCore.QEventTransition): - - @typing.overload - def __init__(self, sourceState: typing.Optional[QtCore.QState] = ...) -> None: ... - @typing.overload - def __init__(self, object: QtCore.QObject, type: QtCore.QEvent.Type, key: int, sourceState: typing.Optional[QtCore.QState] = ...) -> None: ... - - def eventTest(self, event: QtCore.QEvent) -> bool: ... - def onTransition(self, event: QtCore.QEvent) -> None: ... - def setModifierMask(self, modifiers: typing.Union[QtCore.Qt.KeyboardModifiers, QtCore.Qt.KeyboardModifier]) -> None: ... - def modifierMask(self) -> QtCore.Qt.KeyboardModifiers: ... - def setKey(self, key: int) -> None: ... - def key(self) -> int: ... - - -class QKeySequenceEdit(QWidget): - - @typing.overload - def __init__(self, parent: typing.Optional[QWidget] = ...) -> None: ... - @typing.overload - def __init__(self, keySequence: typing.Union[QtGui.QKeySequence, QtGui.QKeySequence.StandardKey, str, int], parent: typing.Optional[QWidget] = ...) -> None: ... - - def timerEvent(self, a0: QtCore.QTimerEvent) -> None: ... - def keyReleaseEvent(self, a0: QtGui.QKeyEvent) -> None: ... - def keyPressEvent(self, a0: QtGui.QKeyEvent) -> None: ... - def event(self, a0: QtCore.QEvent) -> bool: ... - def keySequenceChanged(self, keySequence: typing.Union[QtGui.QKeySequence, QtGui.QKeySequence.StandardKey, str, int]) -> None: ... - def editingFinished(self) -> None: ... - def clear(self) -> None: ... - def setKeySequence(self, keySequence: typing.Union[QtGui.QKeySequence, QtGui.QKeySequence.StandardKey, str, int]) -> None: ... - def keySequence(self) -> QtGui.QKeySequence: ... - - -class QLabel(QFrame): - - @typing.overload - def __init__(self, parent: typing.Optional[QWidget] = ..., flags: typing.Union[QtCore.Qt.WindowFlags, QtCore.Qt.WindowType] = ...) -> None: ... - @typing.overload - def __init__(self, text: str, parent: typing.Optional[QWidget] = ..., flags: typing.Union[QtCore.Qt.WindowFlags, QtCore.Qt.WindowType] = ...) -> None: ... - - def selectionStart(self) -> int: ... - def selectedText(self) -> str: ... - def hasSelectedText(self) -> bool: ... - def setSelection(self, a0: int, a1: int) -> None: ... - def focusNextPrevChild(self, next: bool) -> bool: ... - def focusOutEvent(self, ev: QtGui.QFocusEvent) -> None: ... - def focusInEvent(self, ev: QtGui.QFocusEvent) -> None: ... - def contextMenuEvent(self, ev: QtGui.QContextMenuEvent) -> None: ... - def mouseReleaseEvent(self, ev: QtGui.QMouseEvent) -> None: ... - def mouseMoveEvent(self, ev: QtGui.QMouseEvent) -> None: ... - def mousePressEvent(self, ev: QtGui.QMouseEvent) -> None: ... - def keyPressEvent(self, ev: QtGui.QKeyEvent) -> None: ... - def changeEvent(self, a0: QtCore.QEvent) -> None: ... - def paintEvent(self, a0: QtGui.QPaintEvent) -> None: ... - def event(self, e: QtCore.QEvent) -> bool: ... - def linkHovered(self, link: str) -> None: ... - def linkActivated(self, link: str) -> None: ... - def setText(self, a0: str) -> None: ... - def setPixmap(self, a0: QtGui.QPixmap) -> None: ... - def setPicture(self, a0: QtGui.QPicture) -> None: ... - @typing.overload - def setNum(self, a0: float) -> None: ... - @typing.overload - def setNum(self, a0: int) -> None: ... - def setMovie(self, movie: QtGui.QMovie) -> None: ... - def clear(self) -> None: ... - def setOpenExternalLinks(self, open: bool) -> None: ... - def textInteractionFlags(self) -> QtCore.Qt.TextInteractionFlags: ... - def setTextInteractionFlags(self, flags: typing.Union[QtCore.Qt.TextInteractionFlags, QtCore.Qt.TextInteractionFlag]) -> None: ... - def openExternalLinks(self) -> bool: ... - def heightForWidth(self, a0: int) -> int: ... - def buddy(self) -> QWidget: ... - def setBuddy(self, a0: QWidget) -> None: ... - def minimumSizeHint(self) -> QtCore.QSize: ... - def sizeHint(self) -> QtCore.QSize: ... - def setScaledContents(self, a0: bool) -> None: ... - def hasScaledContents(self) -> bool: ... - def setMargin(self, a0: int) -> None: ... - def margin(self) -> int: ... - def setIndent(self, a0: int) -> None: ... - def indent(self) -> int: ... - def wordWrap(self) -> bool: ... - def setWordWrap(self, on: bool) -> None: ... - def setAlignment(self, a0: typing.Union[QtCore.Qt.Alignment, QtCore.Qt.AlignmentFlag]) -> None: ... - def alignment(self) -> QtCore.Qt.Alignment: ... - def setTextFormat(self, a0: QtCore.Qt.TextFormat) -> None: ... - def textFormat(self) -> QtCore.Qt.TextFormat: ... - def movie(self) -> QtGui.QMovie: ... - def picture(self) -> QtGui.QPicture: ... - def pixmap(self) -> QtGui.QPixmap: ... - def text(self) -> str: ... - - -class QSpacerItem(QLayoutItem): - - @typing.overload - def __init__(self, w: int, h: int, hPolicy: 'QSizePolicy.Policy' = ..., vPolicy: 'QSizePolicy.Policy' = ...) -> None: ... - @typing.overload - def __init__(self, a0: 'QSpacerItem') -> None: ... - - def sizePolicy(self) -> 'QSizePolicy': ... - def spacerItem(self) -> 'QSpacerItem': ... - def geometry(self) -> QtCore.QRect: ... - def setGeometry(self, a0: QtCore.QRect) -> None: ... - def isEmpty(self) -> bool: ... - def expandingDirections(self) -> QtCore.Qt.Orientations: ... - def maximumSize(self) -> QtCore.QSize: ... - def minimumSize(self) -> QtCore.QSize: ... - def sizeHint(self) -> QtCore.QSize: ... - def changeSize(self, w: int, h: int, hPolicy: 'QSizePolicy.Policy' = ..., vPolicy: 'QSizePolicy.Policy' = ...) -> None: ... - - -class QWidgetItem(QLayoutItem): - - def __init__(self, w: QWidget) -> None: ... - - def controlTypes(self) -> 'QSizePolicy.ControlTypes': ... - def heightForWidth(self, a0: int) -> int: ... - def hasHeightForWidth(self) -> bool: ... - def widget(self) -> QWidget: ... - def geometry(self) -> QtCore.QRect: ... - def setGeometry(self, a0: QtCore.QRect) -> None: ... - def isEmpty(self) -> bool: ... - def expandingDirections(self) -> QtCore.Qt.Orientations: ... - def maximumSize(self) -> QtCore.QSize: ... - def minimumSize(self) -> QtCore.QSize: ... - def sizeHint(self) -> QtCore.QSize: ... - - -class QLCDNumber(QFrame): - - class SegmentStyle(int): ... - Outline = ... # type: 'QLCDNumber.SegmentStyle' - Filled = ... # type: 'QLCDNumber.SegmentStyle' - Flat = ... # type: 'QLCDNumber.SegmentStyle' - - class Mode(int): ... - Hex = ... # type: 'QLCDNumber.Mode' - Dec = ... # type: 'QLCDNumber.Mode' - Oct = ... # type: 'QLCDNumber.Mode' - Bin = ... # type: 'QLCDNumber.Mode' - - @typing.overload - def __init__(self, parent: typing.Optional[QWidget] = ...) -> None: ... - @typing.overload - def __init__(self, numDigits: int, parent: typing.Optional[QWidget] = ...) -> None: ... - - def paintEvent(self, a0: QtGui.QPaintEvent) -> None: ... - def event(self, e: QtCore.QEvent) -> bool: ... - def overflow(self) -> None: ... - def setSmallDecimalPoint(self, a0: bool) -> None: ... - def setBinMode(self) -> None: ... - def setOctMode(self) -> None: ... - def setDecMode(self) -> None: ... - def setHexMode(self) -> None: ... - @typing.overload - def display(self, str: str) -> None: ... - @typing.overload - def display(self, num: float) -> None: ... - @typing.overload - def display(self, num: int) -> None: ... - def sizeHint(self) -> QtCore.QSize: ... - def intValue(self) -> int: ... - def value(self) -> float: ... - def setSegmentStyle(self, a0: 'QLCDNumber.SegmentStyle') -> None: ... - def segmentStyle(self) -> 'QLCDNumber.SegmentStyle': ... - def setMode(self, a0: 'QLCDNumber.Mode') -> None: ... - def mode(self) -> 'QLCDNumber.Mode': ... - @typing.overload - def checkOverflow(self, num: float) -> bool: ... - @typing.overload - def checkOverflow(self, num: int) -> bool: ... - def setNumDigits(self, nDigits: int) -> None: ... - def setDigitCount(self, nDigits: int) -> None: ... - def digitCount(self) -> int: ... - def smallDecimalPoint(self) -> bool: ... - - -class QLineEdit(QWidget): - - class ActionPosition(int): ... - LeadingPosition = ... # type: 'QLineEdit.ActionPosition' - TrailingPosition = ... # type: 'QLineEdit.ActionPosition' - - class EchoMode(int): ... - Normal = ... # type: 'QLineEdit.EchoMode' - NoEcho = ... # type: 'QLineEdit.EchoMode' - Password = ... # type: 'QLineEdit.EchoMode' - PasswordEchoOnEdit = ... # type: 'QLineEdit.EchoMode' - - @typing.overload - def __init__(self, parent: typing.Optional[QWidget] = ...) -> None: ... - @typing.overload - def __init__(self, contents: str, parent: typing.Optional[QWidget] = ...) -> None: ... - - @typing.overload - def addAction(self, action: QAction) -> None: ... - @typing.overload - def addAction(self, action: QAction, position: 'QLineEdit.ActionPosition') -> None: ... - @typing.overload - def addAction(self, icon: QtGui.QIcon, position: 'QLineEdit.ActionPosition') -> QAction: ... - def isClearButtonEnabled(self) -> bool: ... - def setClearButtonEnabled(self, enable: bool) -> None: ... - def cursorMoveStyle(self) -> QtCore.Qt.CursorMoveStyle: ... - def setCursorMoveStyle(self, style: QtCore.Qt.CursorMoveStyle) -> None: ... - def setPlaceholderText(self, a0: str) -> None: ... - def placeholderText(self) -> str: ... - def textMargins(self) -> QtCore.QMargins: ... - def getTextMargins(self) -> typing.Tuple[int, int, int, int]: ... - @typing.overload - def setTextMargins(self, left: int, top: int, right: int, bottom: int) -> None: ... - @typing.overload - def setTextMargins(self, margins: QtCore.QMargins) -> None: ... - def completer(self) -> QCompleter: ... - def setCompleter(self, completer: QCompleter) -> None: ... - def event(self, a0: QtCore.QEvent) -> bool: ... - @typing.overload - def inputMethodQuery(self, a0: QtCore.Qt.InputMethodQuery) -> typing.Any: ... - @typing.overload - def inputMethodQuery(self, property: QtCore.Qt.InputMethodQuery, argument: typing.Any) -> typing.Any: ... - def cursorRect(self) -> QtCore.QRect: ... - def inputMethodEvent(self, a0: QtGui.QInputMethodEvent) -> None: ... - def contextMenuEvent(self, a0: QtGui.QContextMenuEvent) -> None: ... - def changeEvent(self, a0: QtCore.QEvent) -> None: ... - def dropEvent(self, a0: QtGui.QDropEvent) -> None: ... - def dragLeaveEvent(self, e: QtGui.QDragLeaveEvent) -> None: ... - def dragMoveEvent(self, e: QtGui.QDragMoveEvent) -> None: ... - def dragEnterEvent(self, a0: QtGui.QDragEnterEvent) -> None: ... - def paintEvent(self, a0: QtGui.QPaintEvent) -> None: ... - def focusOutEvent(self, a0: QtGui.QFocusEvent) -> None: ... - def focusInEvent(self, a0: QtGui.QFocusEvent) -> None: ... - def keyPressEvent(self, a0: QtGui.QKeyEvent) -> None: ... - def mouseDoubleClickEvent(self, a0: QtGui.QMouseEvent) -> None: ... - def mouseReleaseEvent(self, a0: QtGui.QMouseEvent) -> None: ... - def mouseMoveEvent(self, a0: QtGui.QMouseEvent) -> None: ... - def mousePressEvent(self, a0: QtGui.QMouseEvent) -> None: ... - def initStyleOption(self, option: 'QStyleOptionFrame') -> None: ... - def selectionChanged(self) -> None: ... - def editingFinished(self) -> None: ... - def returnPressed(self) -> None: ... - def cursorPositionChanged(self, a0: int, a1: int) -> None: ... - def textEdited(self, a0: str) -> None: ... - def textChanged(self, a0: str) -> None: ... - def createStandardContextMenu(self) -> 'QMenu': ... - def insert(self, a0: str) -> None: ... - def deselect(self) -> None: ... - def paste(self) -> None: ... - def copy(self) -> None: ... - def cut(self) -> None: ... - def redo(self) -> None: ... - def undo(self) -> None: ... - def selectAll(self) -> None: ... - def clear(self) -> None: ... - def setText(self, a0: str) -> None: ... - def hasAcceptableInput(self) -> bool: ... - def setInputMask(self, inputMask: str) -> None: ... - def inputMask(self) -> str: ... - def dragEnabled(self) -> bool: ... - def setDragEnabled(self, b: bool) -> None: ... - def isRedoAvailable(self) -> bool: ... - def isUndoAvailable(self) -> bool: ... - def selectionStart(self) -> int: ... - def selectedText(self) -> str: ... - def hasSelectedText(self) -> bool: ... - def setSelection(self, a0: int, a1: int) -> None: ... - def setModified(self, a0: bool) -> None: ... - def isModified(self) -> bool: ... - def end(self, mark: bool) -> None: ... - def home(self, mark: bool) -> None: ... - def del_(self) -> None: ... - def backspace(self) -> None: ... - def cursorWordBackward(self, mark: bool) -> None: ... - def cursorWordForward(self, mark: bool) -> None: ... - def cursorBackward(self, mark: bool, steps: int = ...) -> None: ... - def cursorForward(self, mark: bool, steps: int = ...) -> None: ... - def alignment(self) -> QtCore.Qt.Alignment: ... - def setAlignment(self, flag: typing.Union[QtCore.Qt.Alignment, QtCore.Qt.AlignmentFlag]) -> None: ... - def cursorPositionAt(self, pos: QtCore.QPoint) -> int: ... - def setCursorPosition(self, a0: int) -> None: ... - def cursorPosition(self) -> int: ... - def minimumSizeHint(self) -> QtCore.QSize: ... - def sizeHint(self) -> QtCore.QSize: ... - def validator(self) -> QtGui.QValidator: ... - def setValidator(self, a0: QtGui.QValidator) -> None: ... - def setReadOnly(self, a0: bool) -> None: ... - def isReadOnly(self) -> bool: ... - def setEchoMode(self, a0: 'QLineEdit.EchoMode') -> None: ... - def echoMode(self) -> 'QLineEdit.EchoMode': ... - def hasFrame(self) -> bool: ... - def setFrame(self, a0: bool) -> None: ... - def setMaxLength(self, a0: int) -> None: ... - def maxLength(self) -> int: ... - def displayText(self) -> str: ... - def text(self) -> str: ... - - -class QListView(QAbstractItemView): - - class ViewMode(int): ... - ListMode = ... # type: 'QListView.ViewMode' - IconMode = ... # type: 'QListView.ViewMode' - - class LayoutMode(int): ... - SinglePass = ... # type: 'QListView.LayoutMode' - Batched = ... # type: 'QListView.LayoutMode' - - class ResizeMode(int): ... - Fixed = ... # type: 'QListView.ResizeMode' - Adjust = ... # type: 'QListView.ResizeMode' - - class Flow(int): ... - LeftToRight = ... # type: 'QListView.Flow' - TopToBottom = ... # type: 'QListView.Flow' - - class Movement(int): ... - Static = ... # type: 'QListView.Movement' - Free = ... # type: 'QListView.Movement' - Snap = ... # type: 'QListView.Movement' - - def __init__(self, parent: typing.Optional[QWidget] = ...) -> None: ... - - def currentChanged(self, current: QtCore.QModelIndex, previous: QtCore.QModelIndex) -> None: ... - def selectionChanged(self, selected: QtCore.QItemSelection, deselected: QtCore.QItemSelection) -> None: ... - def isSelectionRectVisible(self) -> bool: ... - def setSelectionRectVisible(self, show: bool) -> None: ... - def wordWrap(self) -> bool: ... - def setWordWrap(self, on: bool) -> None: ... - def batchSize(self) -> int: ... - def setBatchSize(self, batchSize: int) -> None: ... - def viewportSizeHint(self) -> QtCore.QSize: ... - def isIndexHidden(self, index: QtCore.QModelIndex) -> bool: ... - def updateGeometries(self) -> None: ... - def selectedIndexes(self) -> typing.Any: ... - def visualRegionForSelection(self, selection: QtCore.QItemSelection) -> QtGui.QRegion: ... - def setSelection(self, rect: QtCore.QRect, command: typing.Union[QtCore.QItemSelectionModel.SelectionFlags, QtCore.QItemSelectionModel.SelectionFlag]) -> None: ... - def setPositionForIndex(self, position: QtCore.QPoint, index: QtCore.QModelIndex) -> None: ... - def rectForIndex(self, index: QtCore.QModelIndex) -> QtCore.QRect: ... - def moveCursor(self, cursorAction: QAbstractItemView.CursorAction, modifiers: typing.Union[QtCore.Qt.KeyboardModifiers, QtCore.Qt.KeyboardModifier]) -> QtCore.QModelIndex: ... - def verticalOffset(self) -> int: ... - def horizontalOffset(self) -> int: ... - def paintEvent(self, e: QtGui.QPaintEvent) -> None: ... - def viewOptions(self) -> 'QStyleOptionViewItem': ... - def startDrag(self, supportedActions: typing.Union[QtCore.Qt.DropActions, QtCore.Qt.DropAction]) -> None: ... - def wheelEvent(self, e: QtGui.QWheelEvent) -> None: ... - def dropEvent(self, e: QtGui.QDropEvent) -> None: ... - def dragLeaveEvent(self, e: QtGui.QDragLeaveEvent) -> None: ... - def dragMoveEvent(self, e: QtGui.QDragMoveEvent) -> None: ... - def resizeEvent(self, e: QtGui.QResizeEvent) -> None: ... - def timerEvent(self, e: QtCore.QTimerEvent) -> None: ... - def mouseReleaseEvent(self, e: QtGui.QMouseEvent) -> None: ... - def mouseMoveEvent(self, e: QtGui.QMouseEvent) -> None: ... - def event(self, e: QtCore.QEvent) -> bool: ... - def rowsAboutToBeRemoved(self, parent: QtCore.QModelIndex, start: int, end: int) -> None: ... - def rowsInserted(self, parent: QtCore.QModelIndex, start: int, end: int) -> None: ... - def dataChanged(self, topLeft: QtCore.QModelIndex, bottomRight: QtCore.QModelIndex, roles: typing.Iterable[int] = ...) -> None: ... - def scrollContentsBy(self, dx: int, dy: int) -> None: ... - def indexesMoved(self, indexes: typing.Any) -> None: ... - def setRootIndex(self, index: QtCore.QModelIndex) -> None: ... - def reset(self) -> None: ... - def indexAt(self, p: QtCore.QPoint) -> QtCore.QModelIndex: ... - def scrollTo(self, index: QtCore.QModelIndex, hint: QAbstractItemView.ScrollHint = ...) -> None: ... - def visualRect(self, index: QtCore.QModelIndex) -> QtCore.QRect: ... - def uniformItemSizes(self) -> bool: ... - def setUniformItemSizes(self, enable: bool) -> None: ... - def modelColumn(self) -> int: ... - def setModelColumn(self, column: int) -> None: ... - def setRowHidden(self, row: int, hide: bool) -> None: ... - def isRowHidden(self, row: int) -> bool: ... - def clearPropertyFlags(self) -> None: ... - def viewMode(self) -> 'QListView.ViewMode': ... - def setViewMode(self, mode: 'QListView.ViewMode') -> None: ... - def gridSize(self) -> QtCore.QSize: ... - def setGridSize(self, size: QtCore.QSize) -> None: ... - def spacing(self) -> int: ... - def setSpacing(self, space: int) -> None: ... - def layoutMode(self) -> 'QListView.LayoutMode': ... - def setLayoutMode(self, mode: 'QListView.LayoutMode') -> None: ... - def resizeMode(self) -> 'QListView.ResizeMode': ... - def setResizeMode(self, mode: 'QListView.ResizeMode') -> None: ... - def isWrapping(self) -> bool: ... - def setWrapping(self, enable: bool) -> None: ... - def flow(self) -> 'QListView.Flow': ... - def setFlow(self, flow: 'QListView.Flow') -> None: ... - def movement(self) -> 'QListView.Movement': ... - def setMovement(self, movement: 'QListView.Movement') -> None: ... - - -class QListWidgetItem(sip.wrapper): - - class ItemType(int): ... - Type = ... # type: 'QListWidgetItem.ItemType' - UserType = ... # type: 'QListWidgetItem.ItemType' - - @typing.overload - def __init__(self, parent: typing.Optional['QListWidget'] = ..., type: int = ...) -> None: ... - @typing.overload - def __init__(self, text: str, parent: typing.Optional['QListWidget'] = ..., type: int = ...) -> None: ... - @typing.overload - def __init__(self, icon: QtGui.QIcon, text: str, parent: typing.Optional['QListWidget'] = ..., type: int = ...) -> None: ... - @typing.overload - def __init__(self, other: 'QListWidgetItem') -> None: ... - - def isHidden(self) -> bool: ... - def setHidden(self, ahide: bool) -> None: ... - def isSelected(self) -> bool: ... - def setSelected(self, aselect: bool) -> None: ... - def setForeground(self, brush: typing.Union[QtGui.QBrush, QtGui.QColor, QtCore.Qt.GlobalColor, QtGui.QGradient]) -> None: ... - def foreground(self) -> QtGui.QBrush: ... - def setBackground(self, brush: typing.Union[QtGui.QBrush, QtGui.QColor, QtCore.Qt.GlobalColor, QtGui.QGradient]) -> None: ... - def background(self) -> QtGui.QBrush: ... - def setFont(self, afont: QtGui.QFont) -> None: ... - def setWhatsThis(self, awhatsThis: str) -> None: ... - def setToolTip(self, atoolTip: str) -> None: ... - def setStatusTip(self, astatusTip: str) -> None: ... - def setIcon(self, aicon: QtGui.QIcon) -> None: ... - def setText(self, atext: str) -> None: ... - def setFlags(self, aflags: typing.Union[QtCore.Qt.ItemFlags, QtCore.Qt.ItemFlag]) -> None: ... - def type(self) -> int: ... - def write(self, out: QtCore.QDataStream) -> None: ... - def read(self, in_: QtCore.QDataStream) -> None: ... - def setData(self, role: int, value: typing.Any) -> None: ... - def data(self, role: int) -> typing.Any: ... - def setSizeHint(self, size: QtCore.QSize) -> None: ... - def sizeHint(self) -> QtCore.QSize: ... - def setCheckState(self, state: QtCore.Qt.CheckState) -> None: ... - def checkState(self) -> QtCore.Qt.CheckState: ... - def setTextAlignment(self, alignment: int) -> None: ... - def textAlignment(self) -> int: ... - def font(self) -> QtGui.QFont: ... - def whatsThis(self) -> str: ... - def toolTip(self) -> str: ... - def statusTip(self) -> str: ... - def icon(self) -> QtGui.QIcon: ... - def text(self) -> str: ... - def flags(self) -> QtCore.Qt.ItemFlags: ... - def listWidget(self) -> 'QListWidget': ... - def clone(self) -> 'QListWidgetItem': ... - - -class QListWidget(QListView): - - def __init__(self, parent: typing.Optional[QWidget] = ...) -> None: ... - - def setSelectionModel(self, selectionModel: QtCore.QItemSelectionModel) -> None: ... - def removeItemWidget(self, aItem: QListWidgetItem) -> None: ... - def dropEvent(self, event: QtGui.QDropEvent) -> None: ... - def isSortingEnabled(self) -> bool: ... - def setSortingEnabled(self, enable: bool) -> None: ... - def event(self, e: QtCore.QEvent) -> bool: ... - def itemFromIndex(self, index: QtCore.QModelIndex) -> QListWidgetItem: ... - def indexFromItem(self, item: QListWidgetItem) -> QtCore.QModelIndex: ... - def items(self, data: QtCore.QMimeData) -> typing.List[QListWidgetItem]: ... - def supportedDropActions(self) -> QtCore.Qt.DropActions: ... - def dropMimeData(self, index: int, data: QtCore.QMimeData, action: QtCore.Qt.DropAction) -> bool: ... - def mimeData(self, items: typing.Iterable[QListWidgetItem]) -> QtCore.QMimeData: ... - def mimeTypes(self) -> typing.List[str]: ... - def itemSelectionChanged(self) -> None: ... - def currentRowChanged(self, currentRow: int) -> None: ... - def currentTextChanged(self, currentText: str) -> None: ... - def currentItemChanged(self, current: QListWidgetItem, previous: QListWidgetItem) -> None: ... - def itemChanged(self, item: QListWidgetItem) -> None: ... - def itemEntered(self, item: QListWidgetItem) -> None: ... - def itemActivated(self, item: QListWidgetItem) -> None: ... - def itemDoubleClicked(self, item: QListWidgetItem) -> None: ... - def itemClicked(self, item: QListWidgetItem) -> None: ... - def itemPressed(self, item: QListWidgetItem) -> None: ... - def scrollToItem(self, item: QListWidgetItem, hint: QAbstractItemView.ScrollHint = ...) -> None: ... - def clear(self) -> None: ... - def findItems(self, text: str, flags: typing.Union[QtCore.Qt.MatchFlags, QtCore.Qt.MatchFlag]) -> typing.List[QListWidgetItem]: ... - def selectedItems(self) -> typing.Any: ... - # def closePersistentEditor(self, item: QListWidgetItem) -> None: ... - # def openPersistentEditor(self, item: QListWidgetItem) -> None: ... - def editItem(self, item: QListWidgetItem) -> None: ... - def sortItems(self, order: QtCore.Qt.SortOrder = ...) -> None: ... - def visualItemRect(self, item: QListWidgetItem) -> QtCore.QRect: ... - def setItemWidget(self, item: QListWidgetItem, widget: QWidget) -> None: ... - def itemWidget(self, item: QListWidgetItem) -> QWidget: ... - @typing.overload - def itemAt(self, p: QtCore.QPoint) -> QListWidgetItem: ... - @typing.overload - def itemAt(self, ax: int, ay: int) -> QListWidgetItem: ... - @typing.overload - def setCurrentRow(self, row: int) -> None: ... - @typing.overload - def setCurrentRow(self, row: int, command: typing.Union[QtCore.QItemSelectionModel.SelectionFlags, QtCore.QItemSelectionModel.SelectionFlag]) -> None: ... - def currentRow(self) -> int: ... - @typing.overload - def setCurrentItem(self, item: QListWidgetItem) -> None: ... - @typing.overload - def setCurrentItem(self, item: QListWidgetItem, command: typing.Union[QtCore.QItemSelectionModel.SelectionFlags, QtCore.QItemSelectionModel.SelectionFlag]) -> None: ... - def currentItem(self) -> QListWidgetItem: ... - def __len__(self) -> int: ... - def count(self) -> int: ... - def takeItem(self, row: int) -> QListWidgetItem: ... - def addItems(self, labels: typing.Iterable[str]) -> None: ... - @typing.overload - def addItem(self, aitem: QListWidgetItem) -> None: ... - @typing.overload - def addItem(self, label: str) -> None: ... - def insertItems(self, row: int, labels: typing.Iterable[str]) -> None: ... - @typing.overload - def insertItem(self, row: int, item: QListWidgetItem) -> None: ... - @typing.overload - def insertItem(self, row: int, label: str) -> None: ... - def row(self, item: QListWidgetItem) -> int: ... - def item(self, row: int) -> QListWidgetItem: ... - - -class QMainWindow(QWidget): - - class DockOption(int): ... - AnimatedDocks = ... # type: 'QMainWindow.DockOption' - AllowNestedDocks = ... # type: 'QMainWindow.DockOption' - AllowTabbedDocks = ... # type: 'QMainWindow.DockOption' - ForceTabbedDocks = ... # type: 'QMainWindow.DockOption' - VerticalTabs = ... # type: 'QMainWindow.DockOption' - GroupedDragging = ... # type: 'QMainWindow.DockOption' - - class DockOptions(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QMainWindow.DockOptions', 'QMainWindow.DockOption']) -> None: ... - @typing.overload - def __init__(self, a0: 'QMainWindow.DockOptions') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QMainWindow.DockOptions': ... - def __int__(self) -> int: ... - - def __init__(self, parent: typing.Optional[QWidget] = ..., flags: typing.Union[QtCore.Qt.WindowFlags, QtCore.Qt.WindowType] = ...) -> None: ... - - def resizeDocks(self, docks: typing.Iterable[QDockWidget], sizes: typing.Iterable[int], orientation: QtCore.Qt.Orientation) -> None: ... - def takeCentralWidget(self) -> QWidget: ... - def tabifiedDockWidgets(self, dockwidget: QDockWidget) -> typing.Any: ... - def setTabPosition(self, areas: typing.Union[QtCore.Qt.DockWidgetAreas, QtCore.Qt.DockWidgetArea], tabPosition: 'QTabWidget.TabPosition') -> None: ... - def tabPosition(self, area: QtCore.Qt.DockWidgetArea) -> 'QTabWidget.TabPosition': ... - def setTabShape(self, tabShape: 'QTabWidget.TabShape') -> None: ... - def tabShape(self) -> 'QTabWidget.TabShape': ... - def setDocumentMode(self, enabled: bool) -> None: ... - def documentMode(self) -> bool: ... - def restoreDockWidget(self, dockwidget: QDockWidget) -> bool: ... - def unifiedTitleAndToolBarOnMac(self) -> bool: ... - def setUnifiedTitleAndToolBarOnMac(self, set: bool) -> None: ... - def toolBarBreak(self, toolbar: 'QToolBar') -> bool: ... - def removeToolBarBreak(self, before: 'QToolBar') -> None: ... - def dockOptions(self) -> 'QMainWindow.DockOptions': ... - def setDockOptions(self, options: typing.Union['QMainWindow.DockOptions', 'QMainWindow.DockOption']) -> None: ... - def tabifyDockWidget(self, first: QDockWidget, second: QDockWidget) -> None: ... - def setMenuWidget(self, menubar: QWidget) -> None: ... - def menuWidget(self) -> QWidget: ... - def isSeparator(self, pos: QtCore.QPoint) -> bool: ... - def isDockNestingEnabled(self) -> bool: ... - def isAnimated(self) -> bool: ... - def event(self, event: QtCore.QEvent) -> bool: ... - def contextMenuEvent(self, event: QtGui.QContextMenuEvent) -> None: ... - def toolButtonStyleChanged(self, toolButtonStyle: QtCore.Qt.ToolButtonStyle) -> None: ... - def iconSizeChanged(self, iconSize: QtCore.QSize) -> None: ... - def setDockNestingEnabled(self, enabled: bool) -> None: ... - def setAnimated(self, enabled: bool) -> None: ... - def createPopupMenu(self) -> 'QMenu': ... - def restoreState(self, state: typing.Union[QtCore.QByteArray, bytes, bytearray], version: int = ...) -> bool: ... - def saveState(self, version: int = ...) -> QtCore.QByteArray: ... - def dockWidgetArea(self, dockwidget: QDockWidget) -> QtCore.Qt.DockWidgetArea: ... - def removeDockWidget(self, dockwidget: QDockWidget) -> None: ... - def splitDockWidget(self, after: QDockWidget, dockwidget: QDockWidget, orientation: QtCore.Qt.Orientation) -> None: ... - @typing.overload - def addDockWidget(self, area: QtCore.Qt.DockWidgetArea, dockwidget: QDockWidget) -> None: ... - @typing.overload - def addDockWidget(self, area: QtCore.Qt.DockWidgetArea, dockwidget: QDockWidget, orientation: QtCore.Qt.Orientation) -> None: ... - def toolBarArea(self, toolbar: 'QToolBar') -> QtCore.Qt.ToolBarArea: ... - def removeToolBar(self, toolbar: 'QToolBar') -> None: ... - def insertToolBar(self, before: 'QToolBar', toolbar: 'QToolBar') -> None: ... - @typing.overload - def addToolBar(self, area: QtCore.Qt.ToolBarArea, toolbar: 'QToolBar') -> None: ... - @typing.overload - def addToolBar(self, toolbar: 'QToolBar') -> None: ... - @typing.overload - def addToolBar(self, title: str) -> 'QToolBar': ... - def insertToolBarBreak(self, before: 'QToolBar') -> None: ... - def addToolBarBreak(self, area: QtCore.Qt.ToolBarArea = ...) -> None: ... - def corner(self, corner: QtCore.Qt.Corner) -> QtCore.Qt.DockWidgetArea: ... - def setCorner(self, corner: QtCore.Qt.Corner, area: QtCore.Qt.DockWidgetArea) -> None: ... - def setCentralWidget(self, widget: QWidget) -> None: ... - def centralWidget(self) -> QWidget: ... - def setStatusBar(self, statusbar: 'QStatusBar') -> None: ... - def statusBar(self) -> 'QStatusBar': ... - def setMenuBar(self, menubar: 'QMenuBar') -> None: ... - def menuBar(self) -> 'QMenuBar': ... - def setToolButtonStyle(self, toolButtonStyle: QtCore.Qt.ToolButtonStyle) -> None: ... - def toolButtonStyle(self) -> QtCore.Qt.ToolButtonStyle: ... - def setIconSize(self, iconSize: QtCore.QSize) -> None: ... - def iconSize(self) -> QtCore.QSize: ... - - -class QMdiArea(QAbstractScrollArea): - - class WindowOrder(int): ... - CreationOrder = ... # type: 'QMdiArea.WindowOrder' - StackingOrder = ... # type: 'QMdiArea.WindowOrder' - ActivationHistoryOrder = ... # type: 'QMdiArea.WindowOrder' - - class ViewMode(int): ... - SubWindowView = ... # type: 'QMdiArea.ViewMode' - TabbedView = ... # type: 'QMdiArea.ViewMode' - - class AreaOption(int): ... - DontMaximizeSubWindowOnActivation = ... # type: 'QMdiArea.AreaOption' - - class AreaOptions(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QMdiArea.AreaOptions', 'QMdiArea.AreaOption']) -> None: ... - @typing.overload - def __init__(self, a0: 'QMdiArea.AreaOptions') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QMdiArea.AreaOptions': ... - def __int__(self) -> int: ... - - def __init__(self, parent: typing.Optional[QWidget] = ...) -> None: ... - - def tabsMovable(self) -> bool: ... - def setTabsMovable(self, movable: bool) -> None: ... - def tabsClosable(self) -> bool: ... - def setTabsClosable(self, closable: bool) -> None: ... - def setDocumentMode(self, enabled: bool) -> None: ... - def documentMode(self) -> bool: ... - def tabPosition(self) -> 'QTabWidget.TabPosition': ... - def setTabPosition(self, position: 'QTabWidget.TabPosition') -> None: ... - def tabShape(self) -> 'QTabWidget.TabShape': ... - def setTabShape(self, shape: 'QTabWidget.TabShape') -> None: ... - def viewMode(self) -> 'QMdiArea.ViewMode': ... - def setViewMode(self, mode: 'QMdiArea.ViewMode') -> None: ... - def setActivationOrder(self, order: 'QMdiArea.WindowOrder') -> None: ... - def activationOrder(self) -> 'QMdiArea.WindowOrder': ... - def scrollContentsBy(self, dx: int, dy: int) -> None: ... - def viewportEvent(self, event: QtCore.QEvent) -> bool: ... - def showEvent(self, showEvent: QtGui.QShowEvent) -> None: ... - def timerEvent(self, timerEvent: QtCore.QTimerEvent) -> None: ... - def resizeEvent(self, resizeEvent: QtGui.QResizeEvent) -> None: ... - def childEvent(self, childEvent: QtCore.QChildEvent) -> None: ... - def paintEvent(self, paintEvent: QtGui.QPaintEvent) -> None: ... - def eventFilter(self, object: QtCore.QObject, event: QtCore.QEvent) -> bool: ... - def event(self, event: QtCore.QEvent) -> bool: ... - def setupViewport(self, viewport: QWidget) -> None: ... - def activatePreviousSubWindow(self) -> None: ... - def activateNextSubWindow(self) -> None: ... - def closeAllSubWindows(self) -> None: ... - def closeActiveSubWindow(self) -> None: ... - def cascadeSubWindows(self) -> None: ... - def tileSubWindows(self) -> None: ... - def setActiveSubWindow(self, window: 'QMdiSubWindow') -> None: ... - def subWindowActivated(self, a0: 'QMdiSubWindow') -> None: ... - def testOption(self, opton: 'QMdiArea.AreaOption') -> bool: ... - def setOption(self, option: 'QMdiArea.AreaOption', on: bool = ...) -> None: ... - def setBackground(self, background: typing.Union[QtGui.QBrush, QtGui.QColor, QtCore.Qt.GlobalColor, QtGui.QGradient]) -> None: ... - def background(self) -> QtGui.QBrush: ... - def removeSubWindow(self, widget: QWidget) -> None: ... - def currentSubWindow(self) -> 'QMdiSubWindow': ... - def subWindowList(self, order: 'QMdiArea.WindowOrder' = ...) -> typing.Any: ... - def addSubWindow(self, widget: QWidget, flags: typing.Union[QtCore.Qt.WindowFlags, QtCore.Qt.WindowType] = ...) -> 'QMdiSubWindow': ... - def activeSubWindow(self) -> 'QMdiSubWindow': ... - def minimumSizeHint(self) -> QtCore.QSize: ... - def sizeHint(self) -> QtCore.QSize: ... - - -class QMdiSubWindow(QWidget): - - class SubWindowOption(int): ... - RubberBandResize = ... # type: 'QMdiSubWindow.SubWindowOption' - RubberBandMove = ... # type: 'QMdiSubWindow.SubWindowOption' - - class SubWindowOptions(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QMdiSubWindow.SubWindowOptions', 'QMdiSubWindow.SubWindowOption']) -> None: ... - @typing.overload - def __init__(self, a0: 'QMdiSubWindow.SubWindowOptions') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QMdiSubWindow.SubWindowOptions': ... - def __int__(self) -> int: ... - - def __init__(self, parent: typing.Optional[QWidget] = ..., flags: typing.Union[QtCore.Qt.WindowFlags, QtCore.Qt.WindowType] = ...) -> None: ... - - def childEvent(self, childEvent: QtCore.QChildEvent) -> None: ... - def focusOutEvent(self, focusOutEvent: QtGui.QFocusEvent) -> None: ... - def focusInEvent(self, focusInEvent: QtGui.QFocusEvent) -> None: ... - def contextMenuEvent(self, contextMenuEvent: QtGui.QContextMenuEvent) -> None: ... - def keyPressEvent(self, keyEvent: QtGui.QKeyEvent) -> None: ... - def mouseMoveEvent(self, mouseEvent: QtGui.QMouseEvent) -> None: ... - def mouseReleaseEvent(self, mouseEvent: QtGui.QMouseEvent) -> None: ... - def mouseDoubleClickEvent(self, mouseEvent: QtGui.QMouseEvent) -> None: ... - def mousePressEvent(self, mouseEvent: QtGui.QMouseEvent) -> None: ... - def paintEvent(self, paintEvent: QtGui.QPaintEvent) -> None: ... - def moveEvent(self, moveEvent: QtGui.QMoveEvent) -> None: ... - def timerEvent(self, timerEvent: QtCore.QTimerEvent) -> None: ... - def resizeEvent(self, resizeEvent: QtGui.QResizeEvent) -> None: ... - def leaveEvent(self, leaveEvent: QtCore.QEvent) -> None: ... - def closeEvent(self, closeEvent: QtGui.QCloseEvent) -> None: ... - def changeEvent(self, changeEvent: QtCore.QEvent) -> None: ... - def hideEvent(self, hideEvent: QtGui.QHideEvent) -> None: ... - def showEvent(self, showEvent: QtGui.QShowEvent) -> None: ... - def event(self, event: QtCore.QEvent) -> bool: ... - def eventFilter(self, object: QtCore.QObject, event: QtCore.QEvent) -> bool: ... - def showShaded(self) -> None: ... - def showSystemMenu(self) -> None: ... - def aboutToActivate(self) -> None: ... - def windowStateChanged(self, oldState: typing.Union[QtCore.Qt.WindowStates, QtCore.Qt.WindowState], newState: typing.Union[QtCore.Qt.WindowStates, QtCore.Qt.WindowState]) -> None: ... - def mdiArea(self) -> QMdiArea: ... - def systemMenu(self) -> 'QMenu': ... - def setSystemMenu(self, systemMenu: 'QMenu') -> None: ... - def keyboardPageStep(self) -> int: ... - def setKeyboardPageStep(self, step: int) -> None: ... - def keyboardSingleStep(self) -> int: ... - def setKeyboardSingleStep(self, step: int) -> None: ... - def testOption(self, a0: 'QMdiSubWindow.SubWindowOption') -> bool: ... - def setOption(self, option: 'QMdiSubWindow.SubWindowOption', on: bool = ...) -> None: ... - def isShaded(self) -> bool: ... - def widget(self) -> QWidget: ... - def setWidget(self, widget: QWidget) -> None: ... - def minimumSizeHint(self) -> QtCore.QSize: ... - def sizeHint(self) -> QtCore.QSize: ... - - -class QMenu(QWidget): - - @typing.overload - def __init__(self, parent: typing.Optional[QWidget] = ...) -> None: ... - @typing.overload - def __init__(self, title: str, parent: typing.Optional[QWidget] = ...) -> None: ... - - @typing.overload - def showTearOffMenu(self) -> None: ... - @typing.overload - def showTearOffMenu(self, pos: QtCore.QPoint) -> None: ... - def setToolTipsVisible(self, visible: bool) -> None: ... - def toolTipsVisible(self) -> bool: ... - @typing.overload - def insertSection(self, before: QAction, text: str) -> QAction: ... - @typing.overload - def insertSection(self, before: QAction, icon: QtGui.QIcon, text: str) -> QAction: ... - @typing.overload - def addSection(self, text: str) -> QAction: ... - @typing.overload - def addSection(self, icon: QtGui.QIcon, text: str) -> QAction: ... - def setSeparatorsCollapsible(self, collapse: bool) -> None: ... - def separatorsCollapsible(self) -> bool: ... - def isEmpty(self) -> bool: ... - def focusNextPrevChild(self, next: bool) -> bool: ... - def event(self, a0: QtCore.QEvent) -> bool: ... - def timerEvent(self, a0: QtCore.QTimerEvent) -> None: ... - def actionEvent(self, a0: QtGui.QActionEvent) -> None: ... - def paintEvent(self, a0: QtGui.QPaintEvent) -> None: ... - def hideEvent(self, a0: QtGui.QHideEvent) -> None: ... - def leaveEvent(self, a0: QtCore.QEvent) -> None: ... - def enterEvent(self, a0: QtCore.QEvent) -> None: ... - def wheelEvent(self, a0: QtGui.QWheelEvent) -> None: ... - def mouseMoveEvent(self, a0: QtGui.QMouseEvent) -> None: ... - def mousePressEvent(self, a0: QtGui.QMouseEvent) -> None: ... - def mouseReleaseEvent(self, a0: QtGui.QMouseEvent) -> None: ... - def keyPressEvent(self, a0: QtGui.QKeyEvent) -> None: ... - def changeEvent(self, a0: QtCore.QEvent) -> None: ... - def initStyleOption(self, option: 'QStyleOptionMenuItem', action: QAction) -> None: ... - def columnCount(self) -> int: ... - def triggered(self, action: QAction) -> None: ... - def hovered(self, action: QAction) -> None: ... - def aboutToShow(self) -> None: ... - def aboutToHide(self) -> None: ... - def setNoReplayFor(self, widget: QWidget) -> None: ... - def setIcon(self, icon: QtGui.QIcon) -> None: ... - def icon(self) -> QtGui.QIcon: ... - def setTitle(self, title: str) -> None: ... - def title(self) -> str: ... - def menuAction(self) -> QAction: ... - def actionAt(self, a0: QtCore.QPoint) -> QAction: ... - def actionGeometry(self, a0: QAction) -> QtCore.QRect: ... - def sizeHint(self) -> QtCore.QSize: ... - @typing.overload - def exec(self) -> QAction: ... - @typing.overload - def exec(self, pos: QtCore.QPoint, action: typing.Optional[QAction] = ...) -> QAction: ... - @typing.overload - @staticmethod - def exec(actions: typing.Iterable[QAction], pos: QtCore.QPoint, at: typing.Optional[QAction] = ..., parent: typing.Optional[QWidget] = ...) -> QAction: ... - @typing.overload - def exec_(self) -> QAction: ... - @typing.overload - def exec_(self, p: QtCore.QPoint, action: typing.Optional[QAction] = ...) -> QAction: ... - @typing.overload - @staticmethod - def exec_(actions: typing.Iterable[QAction], pos: QtCore.QPoint, at: typing.Optional[QAction] = ..., parent: typing.Optional[QWidget] = ...) -> QAction: ... - def popup(self, p: QtCore.QPoint, action: typing.Optional[QAction] = ...) -> None: ... - def activeAction(self) -> QAction: ... - def setActiveAction(self, act: QAction) -> None: ... - def defaultAction(self) -> QAction: ... - def setDefaultAction(self, a0: QAction) -> None: ... - def hideTearOffMenu(self) -> None: ... - def isTearOffMenuVisible(self) -> bool: ... - def isTearOffEnabled(self) -> bool: ... - def setTearOffEnabled(self, a0: bool) -> None: ... - def clear(self) -> None: ... - def insertSeparator(self, before: QAction) -> QAction: ... - def insertMenu(self, before: QAction, menu: 'QMenu') -> QAction: ... - def addSeparator(self) -> QAction: ... - @typing.overload - def addMenu(self, menu: 'QMenu') -> QAction: ... - @typing.overload - def addMenu(self, title: str) -> 'QMenu': ... - @typing.overload - def addMenu(self, icon: QtGui.QIcon, title: str) -> 'QMenu': ... - @typing.overload - def addAction(self, action: QAction) -> None: ... - @typing.overload - def addAction(self, text: str) -> QAction: ... - @typing.overload - def addAction(self, icon: QtGui.QIcon, text: str) -> QAction: ... - @typing.overload - def addAction(self, text: str, slot: PYQT_SLOT, shortcut: typing.Union[QtGui.QKeySequence, QtGui.QKeySequence.StandardKey, str, int] = ...) -> QAction: ... - @typing.overload - def addAction(self, icon: QtGui.QIcon, text: str, slot: PYQT_SLOT, shortcut: typing.Union[QtGui.QKeySequence, QtGui.QKeySequence.StandardKey, str, int] = ...) -> QAction: ... - - -class QMenuBar(QWidget): - - def __init__(self, parent: typing.Optional[QWidget] = ...) -> None: ... - - def setNativeMenuBar(self, nativeMenuBar: bool) -> None: ... - def isNativeMenuBar(self) -> bool: ... - def timerEvent(self, a0: QtCore.QTimerEvent) -> None: ... - def event(self, a0: QtCore.QEvent) -> bool: ... - def eventFilter(self, a0: QtCore.QObject, a1: QtCore.QEvent) -> bool: ... - def focusInEvent(self, a0: QtGui.QFocusEvent) -> None: ... - def focusOutEvent(self, a0: QtGui.QFocusEvent) -> None: ... - def actionEvent(self, a0: QtGui.QActionEvent) -> None: ... - def resizeEvent(self, a0: QtGui.QResizeEvent) -> None: ... - def paintEvent(self, a0: QtGui.QPaintEvent) -> None: ... - def leaveEvent(self, a0: QtCore.QEvent) -> None: ... - def mouseMoveEvent(self, a0: QtGui.QMouseEvent) -> None: ... - def mousePressEvent(self, a0: QtGui.QMouseEvent) -> None: ... - def mouseReleaseEvent(self, a0: QtGui.QMouseEvent) -> None: ... - def keyPressEvent(self, a0: QtGui.QKeyEvent) -> None: ... - def changeEvent(self, a0: QtCore.QEvent) -> None: ... - def initStyleOption(self, option: 'QStyleOptionMenuItem', action: QAction) -> None: ... - def hovered(self, action: QAction) -> None: ... - def triggered(self, action: QAction) -> None: ... - def setVisible(self, visible: bool) -> None: ... - def cornerWidget(self, corner: QtCore.Qt.Corner = ...) -> QWidget: ... - def setCornerWidget(self, widget: QWidget, corner: QtCore.Qt.Corner = ...) -> None: ... - def actionAt(self, a0: QtCore.QPoint) -> QAction: ... - def actionGeometry(self, a0: QAction) -> QtCore.QRect: ... - def heightForWidth(self, a0: int) -> int: ... - def minimumSizeHint(self) -> QtCore.QSize: ... - def sizeHint(self) -> QtCore.QSize: ... - def isDefaultUp(self) -> bool: ... - def setDefaultUp(self, a0: bool) -> None: ... - def setActiveAction(self, action: QAction) -> None: ... - def activeAction(self) -> QAction: ... - def clear(self) -> None: ... - def insertSeparator(self, before: QAction) -> QAction: ... - def insertMenu(self, before: QAction, menu: QMenu) -> QAction: ... - def addSeparator(self) -> QAction: ... - @typing.overload - def addMenu(self, menu: QMenu) -> QAction: ... - @typing.overload - def addMenu(self, title: str) -> QMenu: ... - @typing.overload - def addMenu(self, icon: QtGui.QIcon, title: str) -> QMenu: ... - @typing.overload - def addAction(self, action: QAction) -> None: ... - @typing.overload - def addAction(self, text: str) -> QAction: ... - @typing.overload - def addAction(self, text: str, slot: PYQT_SLOT) -> QAction: ... - - -class QMessageBox(QDialog): - - class StandardButton(int): ... - NoButton = ... # type: 'QMessageBox.StandardButton' - Ok = ... # type: 'QMessageBox.StandardButton' - Save = ... # type: 'QMessageBox.StandardButton' - SaveAll = ... # type: 'QMessageBox.StandardButton' - Open = ... # type: 'QMessageBox.StandardButton' - Yes = ... # type: 'QMessageBox.StandardButton' - YesToAll = ... # type: 'QMessageBox.StandardButton' - No = ... # type: 'QMessageBox.StandardButton' - NoToAll = ... # type: 'QMessageBox.StandardButton' - Abort = ... # type: 'QMessageBox.StandardButton' - Retry = ... # type: 'QMessageBox.StandardButton' - Ignore = ... # type: 'QMessageBox.StandardButton' - Close = ... # type: 'QMessageBox.StandardButton' - Cancel = ... # type: 'QMessageBox.StandardButton' - Discard = ... # type: 'QMessageBox.StandardButton' - Help = ... # type: 'QMessageBox.StandardButton' - Apply = ... # type: 'QMessageBox.StandardButton' - Reset = ... # type: 'QMessageBox.StandardButton' - RestoreDefaults = ... # type: 'QMessageBox.StandardButton' - FirstButton = ... # type: 'QMessageBox.StandardButton' - LastButton = ... # type: 'QMessageBox.StandardButton' - YesAll = ... # type: 'QMessageBox.StandardButton' - NoAll = ... # type: 'QMessageBox.StandardButton' - Default = ... # type: 'QMessageBox.StandardButton' - Escape = ... # type: 'QMessageBox.StandardButton' - FlagMask = ... # type: 'QMessageBox.StandardButton' - ButtonMask = ... # type: 'QMessageBox.StandardButton' - - class Icon(int): ... - NoIcon = ... # type: 'QMessageBox.Icon' - Information = ... # type: 'QMessageBox.Icon' - Warning = ... # type: 'QMessageBox.Icon' - Critical = ... # type: 'QMessageBox.Icon' - Question = ... # type: 'QMessageBox.Icon' - - class ButtonRole(int): ... - InvalidRole = ... # type: 'QMessageBox.ButtonRole' - AcceptRole = ... # type: 'QMessageBox.ButtonRole' - RejectRole = ... # type: 'QMessageBox.ButtonRole' - DestructiveRole = ... # type: 'QMessageBox.ButtonRole' - ActionRole = ... # type: 'QMessageBox.ButtonRole' - HelpRole = ... # type: 'QMessageBox.ButtonRole' - YesRole = ... # type: 'QMessageBox.ButtonRole' - NoRole = ... # type: 'QMessageBox.ButtonRole' - ResetRole = ... # type: 'QMessageBox.ButtonRole' - ApplyRole = ... # type: 'QMessageBox.ButtonRole' - - class StandardButtons(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QMessageBox.StandardButtons', 'QMessageBox.StandardButton']) -> None: ... - @typing.overload - def __init__(self, a0: 'QMessageBox.StandardButtons') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QMessageBox.StandardButtons': ... - def __int__(self) -> int: ... - - @typing.overload - def __init__(self, parent: typing.Optional[QWidget] = ...) -> None: ... - @typing.overload - def __init__(self, icon: 'QMessageBox.Icon', title: str, text: str, buttons: typing.Union['QMessageBox.StandardButtons', 'QMessageBox.StandardButton'] = ..., parent: typing.Optional[QWidget] = ..., flags: typing.Union[QtCore.Qt.WindowFlags, QtCore.Qt.WindowType] = ...) -> None: ... - - def checkBox(self) -> QCheckBox: ... - def setCheckBox(self, cb: QCheckBox) -> None: ... - def textInteractionFlags(self) -> QtCore.Qt.TextInteractionFlags: ... - def setTextInteractionFlags(self, flags: typing.Union[QtCore.Qt.TextInteractionFlags, QtCore.Qt.TextInteractionFlag]) -> None: ... - def buttonClicked(self, button: QAbstractButton) -> None: ... - def buttonRole(self, button: QAbstractButton) -> 'QMessageBox.ButtonRole': ... - def buttons(self) -> typing.List[QAbstractButton]: ... - @typing.overload - def open(self) -> None: ... - @typing.overload - def open(self, slot: PYQT_SLOT) -> None: ... - def setWindowModality(self, windowModality: QtCore.Qt.WindowModality) -> None: ... - def setWindowTitle(self, title: str) -> None: ... - def setDetailedText(self, text: str) -> None: ... - def detailedText(self) -> str: ... - def setInformativeText(self, text: str) -> None: ... - def informativeText(self) -> str: ... - def clickedButton(self) -> QAbstractButton: ... - @typing.overload - def setEscapeButton(self, button: QAbstractButton) -> None: ... - @typing.overload - def setEscapeButton(self, button: 'QMessageBox.StandardButton') -> None: ... - def escapeButton(self) -> QAbstractButton: ... - @typing.overload - def setDefaultButton(self, button: QPushButton) -> None: ... - @typing.overload - def setDefaultButton(self, button: 'QMessageBox.StandardButton') -> None: ... - def defaultButton(self) -> QPushButton: ... - def button(self, which: 'QMessageBox.StandardButton') -> QAbstractButton: ... - def standardButton(self, button: QAbstractButton) -> 'QMessageBox.StandardButton': ... - def standardButtons(self) -> 'QMessageBox.StandardButtons': ... - def setStandardButtons(self, buttons: typing.Union['QMessageBox.StandardButtons', 'QMessageBox.StandardButton']) -> None: ... - def removeButton(self, button: QAbstractButton) -> None: ... - @typing.overload - def addButton(self, button: QAbstractButton, role: 'QMessageBox.ButtonRole') -> None: ... - @typing.overload - def addButton(self, text: str, role: 'QMessageBox.ButtonRole') -> QPushButton: ... - @typing.overload - def addButton(self, button: 'QMessageBox.StandardButton') -> QPushButton: ... - def changeEvent(self, a0: QtCore.QEvent) -> None: ... - def keyPressEvent(self, a0: QtGui.QKeyEvent) -> None: ... - def closeEvent(self, a0: QtGui.QCloseEvent) -> None: ... - def showEvent(self, a0: QtGui.QShowEvent) -> None: ... - def resizeEvent(self, a0: QtGui.QResizeEvent) -> None: ... - def event(self, e: QtCore.QEvent) -> bool: ... - @staticmethod - def standardIcon(icon: 'QMessageBox.Icon') -> QtGui.QPixmap: ... - @staticmethod - def aboutQt(parent: QWidget, title: str = ...) -> None: ... - @staticmethod - def about(parent: QWidget, caption: str, text: str) -> None: ... - @staticmethod - def critical(parent: QWidget, title: str, text: str, buttons: typing.Union['QMessageBox.StandardButtons', 'QMessageBox.StandardButton'] = ..., defaultButton: 'QMessageBox.StandardButton' = ...) -> 'QMessageBox.StandardButton': ... - @staticmethod - def warning(parent: QWidget, title: str, text: str, buttons: typing.Union['QMessageBox.StandardButtons', 'QMessageBox.StandardButton'] = ..., defaultButton: 'QMessageBox.StandardButton' = ...) -> 'QMessageBox.StandardButton': ... - @staticmethod - def question(parent: QWidget, title: str, text: str, buttons: typing.Union['QMessageBox.StandardButtons', 'QMessageBox.StandardButton'] = ..., defaultButton: 'QMessageBox.StandardButton' = ...) -> 'QMessageBox.StandardButton': ... - @staticmethod - def information(parent: QWidget, title: str, text: str, buttons: typing.Union['QMessageBox.StandardButtons', 'QMessageBox.StandardButton'] = ..., defaultButton: 'QMessageBox.StandardButton' = ...) -> 'QMessageBox.StandardButton': ... - def setTextFormat(self, a0: QtCore.Qt.TextFormat) -> None: ... - def textFormat(self) -> QtCore.Qt.TextFormat: ... - def setIconPixmap(self, a0: QtGui.QPixmap) -> None: ... - def iconPixmap(self) -> QtGui.QPixmap: ... - def setIcon(self, a0: 'QMessageBox.Icon') -> None: ... - def icon(self) -> 'QMessageBox.Icon': ... - def setText(self, a0: str) -> None: ... - def text(self) -> str: ... - - -class QMouseEventTransition(QtCore.QEventTransition): - - @typing.overload - def __init__(self, sourceState: typing.Optional[QtCore.QState] = ...) -> None: ... - @typing.overload - def __init__(self, object: QtCore.QObject, type: QtCore.QEvent.Type, button: QtCore.Qt.MouseButton, sourceState: typing.Optional[QtCore.QState] = ...) -> None: ... - - def eventTest(self, event: QtCore.QEvent) -> bool: ... - def onTransition(self, event: QtCore.QEvent) -> None: ... - def setHitTestPath(self, path: QtGui.QPainterPath) -> None: ... - def hitTestPath(self) -> QtGui.QPainterPath: ... - def setModifierMask(self, modifiers: typing.Union[QtCore.Qt.KeyboardModifiers, QtCore.Qt.KeyboardModifier]) -> None: ... - def modifierMask(self) -> QtCore.Qt.KeyboardModifiers: ... - def setButton(self, button: QtCore.Qt.MouseButton) -> None: ... - def button(self) -> QtCore.Qt.MouseButton: ... - - -class QOpenGLWidget(QWidget): - - class UpdateBehavior(int): ... - NoPartialUpdate = ... # type: 'QOpenGLWidget.UpdateBehavior' - PartialUpdate = ... # type: 'QOpenGLWidget.UpdateBehavior' - - def __init__(self, parent: typing.Optional[QWidget] = ..., flags: typing.Union[QtCore.Qt.WindowFlags, QtCore.Qt.WindowType] = ...) -> None: ... - - def updateBehavior(self) -> 'QOpenGLWidget.UpdateBehavior': ... - def setUpdateBehavior(self, updateBehavior: 'QOpenGLWidget.UpdateBehavior') -> None: ... - def paintEngine(self) -> QtGui.QPaintEngine: ... - def metric(self, metric: QtGui.QPaintDevice.PaintDeviceMetric) -> int: ... - def event(self, e: QtCore.QEvent) -> bool: ... - def resizeEvent(self, e: QtGui.QResizeEvent) -> None: ... - def paintEvent(self, e: QtGui.QPaintEvent) -> None: ... - def paintGL(self) -> None: ... - def resizeGL(self, w: int, h: int) -> None: ... - def initializeGL(self) -> None: ... - def resized(self) -> None: ... - def aboutToResize(self) -> None: ... - def frameSwapped(self) -> None: ... - def aboutToCompose(self) -> None: ... - def grabFramebuffer(self) -> QtGui.QImage: ... - def defaultFramebufferObject(self) -> int: ... - def context(self) -> QtGui.QOpenGLContext: ... - def doneCurrent(self) -> None: ... - def makeCurrent(self) -> None: ... - def isValid(self) -> bool: ... - def format(self) -> QtGui.QSurfaceFormat: ... - def setFormat(self, format: QtGui.QSurfaceFormat) -> None: ... - - -class QPlainTextEdit(QAbstractScrollArea): - - class LineWrapMode(int): ... - NoWrap = ... # type: 'QPlainTextEdit.LineWrapMode' - WidgetWidth = ... # type: 'QPlainTextEdit.LineWrapMode' - - @typing.overload - def __init__(self, parent: typing.Optional[QWidget] = ...) -> None: ... - @typing.overload - def __init__(self, text: str, parent: typing.Optional[QWidget] = ...) -> None: ... - - def placeholderText(self) -> str: ... - def setPlaceholderText(self, placeholderText: str) -> None: ... - def zoomOut(self, range: int = ...) -> None: ... - def zoomIn(self, range: int = ...) -> None: ... - def anchorAt(self, pos: QtCore.QPoint) -> str: ... - def getPaintContext(self) -> QtGui.QAbstractTextDocumentLayout.PaintContext: ... - def blockBoundingGeometry(self, block: QtGui.QTextBlock) -> QtCore.QRectF: ... - def blockBoundingRect(self, block: QtGui.QTextBlock) -> QtCore.QRectF: ... - def contentOffset(self) -> QtCore.QPointF: ... - def firstVisibleBlock(self) -> QtGui.QTextBlock: ... - def scrollContentsBy(self, dx: int, dy: int) -> None: ... - def insertFromMimeData(self, source: QtCore.QMimeData) -> None: ... - def canInsertFromMimeData(self, source: QtCore.QMimeData) -> bool: ... - def createMimeDataFromSelection(self) -> QtCore.QMimeData: ... - @typing.overload - def inputMethodQuery(self, property: QtCore.Qt.InputMethodQuery) -> typing.Any: ... - @typing.overload - def inputMethodQuery(self, query: QtCore.Qt.InputMethodQuery, argument: typing.Any) -> typing.Any: ... - def inputMethodEvent(self, a0: QtGui.QInputMethodEvent) -> None: ... - def wheelEvent(self, e: QtGui.QWheelEvent) -> None: ... - def changeEvent(self, e: QtCore.QEvent) -> None: ... - def showEvent(self, a0: QtGui.QShowEvent) -> None: ... - def focusOutEvent(self, e: QtGui.QFocusEvent) -> None: ... - def focusInEvent(self, e: QtGui.QFocusEvent) -> None: ... - def dropEvent(self, e: QtGui.QDropEvent) -> None: ... - def dragMoveEvent(self, e: QtGui.QDragMoveEvent) -> None: ... - def dragLeaveEvent(self, e: QtGui.QDragLeaveEvent) -> None: ... - def dragEnterEvent(self, e: QtGui.QDragEnterEvent) -> None: ... - def contextMenuEvent(self, e: QtGui.QContextMenuEvent) -> None: ... - def focusNextPrevChild(self, next: bool) -> bool: ... - def mouseDoubleClickEvent(self, e: QtGui.QMouseEvent) -> None: ... - def mouseReleaseEvent(self, e: QtGui.QMouseEvent) -> None: ... - def mouseMoveEvent(self, e: QtGui.QMouseEvent) -> None: ... - def mousePressEvent(self, e: QtGui.QMouseEvent) -> None: ... - def paintEvent(self, e: QtGui.QPaintEvent) -> None: ... - def resizeEvent(self, e: QtGui.QResizeEvent) -> None: ... - def keyReleaseEvent(self, e: QtGui.QKeyEvent) -> None: ... - def keyPressEvent(self, e: QtGui.QKeyEvent) -> None: ... - def timerEvent(self, e: QtCore.QTimerEvent) -> None: ... - def event(self, e: QtCore.QEvent) -> bool: ... - def modificationChanged(self, a0: bool) -> None: ... - def blockCountChanged(self, newBlockCount: int) -> None: ... - def updateRequest(self, rect: QtCore.QRect, dy: int) -> None: ... - def cursorPositionChanged(self) -> None: ... - def selectionChanged(self) -> None: ... - def copyAvailable(self, b: bool) -> None: ... - def redoAvailable(self, b: bool) -> None: ... - def undoAvailable(self, b: bool) -> None: ... - def textChanged(self) -> None: ... - def centerCursor(self) -> None: ... - def appendHtml(self, html: str) -> None: ... - def appendPlainText(self, text: str) -> None: ... - def insertPlainText(self, text: str) -> None: ... - def selectAll(self) -> None: ... - def clear(self) -> None: ... - def redo(self) -> None: ... - def undo(self) -> None: ... - def paste(self) -> None: ... - def copy(self) -> None: ... - def cut(self) -> None: ... - def setPlainText(self, text: str) -> None: ... - def blockCount(self) -> int: ... - def print(self, printer: QtGui.QPagedPaintDevice) -> None: ... - def print_(self, printer: QtGui.QPagedPaintDevice) -> None: ... - def canPaste(self) -> bool: ... - def moveCursor(self, operation: QtGui.QTextCursor.MoveOperation, mode: QtGui.QTextCursor.MoveMode = ...) -> None: ... - def extraSelections(self) -> typing.List['QTextEdit.ExtraSelection']: ... - def setExtraSelections(self, selections: typing.Any) -> None: ... - def setCursorWidth(self, width: int) -> None: ... - def cursorWidth(self) -> int: ... - def setTabStopWidth(self, width: int) -> None: ... - def tabStopWidth(self) -> int: ... - def setOverwriteMode(self, overwrite: bool) -> None: ... - def overwriteMode(self) -> bool: ... - @typing.overload - def cursorRect(self, cursor: QtGui.QTextCursor) -> QtCore.QRect: ... - @typing.overload - def cursorRect(self) -> QtCore.QRect: ... - def cursorForPosition(self, pos: QtCore.QPoint) -> QtGui.QTextCursor: ... - @typing.overload - def createStandardContextMenu(self) -> QMenu: ... - @typing.overload - def createStandardContextMenu(self, position: QtCore.QPoint) -> QMenu: ... - def loadResource(self, type: int, name: QtCore.QUrl) -> typing.Any: ... - def ensureCursorVisible(self) -> None: ... - def toPlainText(self) -> str: ... - @typing.overload - def find(self, exp: str, options: typing.Union[QtGui.QTextDocument.FindFlags, QtGui.QTextDocument.FindFlag] = ...) -> bool: ... - @typing.overload - def find(self, exp: QtCore.QRegExp, options: typing.Union[QtGui.QTextDocument.FindFlags, QtGui.QTextDocument.FindFlag] = ...) -> bool: ... - def centerOnScroll(self) -> bool: ... - def setCenterOnScroll(self, enabled: bool) -> None: ... - def backgroundVisible(self) -> bool: ... - def setBackgroundVisible(self, visible: bool) -> None: ... - def setWordWrapMode(self, policy: QtGui.QTextOption.WrapMode) -> None: ... - def wordWrapMode(self) -> QtGui.QTextOption.WrapMode: ... - def setLineWrapMode(self, mode: 'QPlainTextEdit.LineWrapMode') -> None: ... - def lineWrapMode(self) -> 'QPlainTextEdit.LineWrapMode': ... - def maximumBlockCount(self) -> int: ... - def setMaximumBlockCount(self, maximum: int) -> None: ... - def setUndoRedoEnabled(self, enable: bool) -> None: ... - def isUndoRedoEnabled(self) -> bool: ... - def documentTitle(self) -> str: ... - def setDocumentTitle(self, title: str) -> None: ... - def setTabChangesFocus(self, b: bool) -> None: ... - def tabChangesFocus(self) -> bool: ... - def currentCharFormat(self) -> QtGui.QTextCharFormat: ... - def setCurrentCharFormat(self, format: QtGui.QTextCharFormat) -> None: ... - def mergeCurrentCharFormat(self, modifier: QtGui.QTextCharFormat) -> None: ... - def textInteractionFlags(self) -> QtCore.Qt.TextInteractionFlags: ... - def setTextInteractionFlags(self, flags: typing.Union[QtCore.Qt.TextInteractionFlags, QtCore.Qt.TextInteractionFlag]) -> None: ... - def setReadOnly(self, ro: bool) -> None: ... - def isReadOnly(self) -> bool: ... - def textCursor(self) -> QtGui.QTextCursor: ... - def setTextCursor(self, cursor: QtGui.QTextCursor) -> None: ... - def document(self) -> QtGui.QTextDocument: ... - def setDocument(self, document: QtGui.QTextDocument) -> None: ... - - -class QPlainTextDocumentLayout(QtGui.QAbstractTextDocumentLayout): - - def __init__(self, document: QtGui.QTextDocument) -> None: ... - - def documentChanged(self, from_: int, a1: int, charsAdded: int) -> None: ... - def requestUpdate(self) -> None: ... - def cursorWidth(self) -> int: ... - def setCursorWidth(self, width: int) -> None: ... - def ensureBlockLayout(self, block: QtGui.QTextBlock) -> None: ... - def blockBoundingRect(self, block: QtGui.QTextBlock) -> QtCore.QRectF: ... - def frameBoundingRect(self, a0: QtGui.QTextFrame) -> QtCore.QRectF: ... - def documentSize(self) -> QtCore.QSizeF: ... - def pageCount(self) -> int: ... - def hitTest(self, a0: typing.Union[QtCore.QPointF, QtCore.QPoint], a1: QtCore.Qt.HitTestAccuracy) -> int: ... - def draw(self, a0: QtGui.QPainter, a1: QtGui.QAbstractTextDocumentLayout.PaintContext) -> None: ... - - -class QProgressBar(QWidget): - - class Direction(int): ... - TopToBottom = ... # type: 'QProgressBar.Direction' - BottomToTop = ... # type: 'QProgressBar.Direction' - - def __init__(self, parent: typing.Optional[QWidget] = ...) -> None: ... - - def paintEvent(self, a0: QtGui.QPaintEvent) -> None: ... - def event(self, e: QtCore.QEvent) -> bool: ... - def initStyleOption(self, option: 'QStyleOptionProgressBar') -> None: ... - def valueChanged(self, value: int) -> None: ... - def setOrientation(self, a0: QtCore.Qt.Orientation) -> None: ... - def setValue(self, value: int) -> None: ... - def setMaximum(self, maximum: int) -> None: ... - def setMinimum(self, minimum: int) -> None: ... - def reset(self) -> None: ... - def resetFormat(self) -> None: ... - def format(self) -> str: ... - def setFormat(self, format: str) -> None: ... - def setTextDirection(self, textDirection: 'QProgressBar.Direction') -> None: ... - def setInvertedAppearance(self, invert: bool) -> None: ... - def orientation(self) -> QtCore.Qt.Orientation: ... - def minimumSizeHint(self) -> QtCore.QSize: ... - def sizeHint(self) -> QtCore.QSize: ... - def setAlignment(self, alignment: typing.Union[QtCore.Qt.Alignment, QtCore.Qt.AlignmentFlag]) -> None: ... - def alignment(self) -> QtCore.Qt.Alignment: ... - def isTextVisible(self) -> bool: ... - def setTextVisible(self, visible: bool) -> None: ... - def text(self) -> str: ... - def value(self) -> int: ... - def setRange(self, minimum: int, maximum: int) -> None: ... - def maximum(self) -> int: ... - def minimum(self) -> int: ... - - -class QProgressDialog(QDialog): - - @typing.overload - def __init__(self, parent: typing.Optional[QWidget] = ..., flags: typing.Union[QtCore.Qt.WindowFlags, QtCore.Qt.WindowType] = ...) -> None: ... - @typing.overload - def __init__(self, labelText: str, cancelButtonText: str, minimum: int, maximum: int, parent: typing.Optional[QWidget] = ..., flags: typing.Union[QtCore.Qt.WindowFlags, QtCore.Qt.WindowType] = ...) -> None: ... - - @typing.overload - def open(self) -> None: ... - @typing.overload - def open(self, slot: PYQT_SLOT) -> None: ... - def forceShow(self) -> None: ... - def showEvent(self, e: QtGui.QShowEvent) -> None: ... - def changeEvent(self, a0: QtCore.QEvent) -> None: ... - def closeEvent(self, a0: QtGui.QCloseEvent) -> None: ... - def resizeEvent(self, a0: QtGui.QResizeEvent) -> None: ... - def canceled(self) -> None: ... - def setMinimumDuration(self, ms: int) -> None: ... - def setCancelButtonText(self, a0: str) -> None: ... - def setLabelText(self, a0: str) -> None: ... - def setValue(self, progress: int) -> None: ... - def setMinimum(self, minimum: int) -> None: ... - def setMaximum(self, maximum: int) -> None: ... - def reset(self) -> None: ... - def cancel(self) -> None: ... - def autoClose(self) -> bool: ... - def setAutoClose(self, b: bool) -> None: ... - def autoReset(self) -> bool: ... - def setAutoReset(self, b: bool) -> None: ... - def minimumDuration(self) -> int: ... - def labelText(self) -> str: ... - def sizeHint(self) -> QtCore.QSize: ... - def value(self) -> int: ... - def setRange(self, minimum: int, maximum: int) -> None: ... - def maximum(self) -> int: ... - def minimum(self) -> int: ... - def wasCanceled(self) -> bool: ... - def setBar(self, bar: QProgressBar) -> None: ... - def setCancelButton(self, button: QPushButton) -> None: ... - def setLabel(self, label: QLabel) -> None: ... - - -class QProxyStyle(QCommonStyle): - - @typing.overload - def __init__(self, style: typing.Optional[QStyle] = ...) -> None: ... - @typing.overload - def __init__(self, key: str) -> None: ... - - def event(self, e: QtCore.QEvent) -> bool: ... - @typing.overload - def unpolish(self, widget: QWidget) -> None: ... - @typing.overload - def unpolish(self, app: QApplication) -> None: ... - # @typing.overload - # def polish(self, widget: QWidget) -> None: ... - # @typing.overload - # def polish(self, pal: QtGui.QPalette) -> QtGui.QPalette: ... - # @typing.overload - # def polish(self, app: QApplication) -> None: ... - def standardPalette(self) -> QtGui.QPalette: ... - def generatedIconPixmap(self, iconMode: QtGui.QIcon.Mode, pixmap: QtGui.QPixmap, opt: 'QStyleOption') -> QtGui.QPixmap: ... - # def standardPixmap(self, standardPixmap: QStyle.StandardPixmap, opt: 'QStyleOption', widget: typing.Optional[QWidget] = ...) -> QtGui.QPixmap: ... - def standardIcon(self, standardIcon: QStyle.StandardPixmap, option: typing.Optional['QStyleOption'] = ..., widget: typing.Optional[QWidget] = ...) -> QtGui.QIcon: ... - def layoutSpacing(self, control1: 'QSizePolicy.ControlType', control2: 'QSizePolicy.ControlType', orientation: QtCore.Qt.Orientation, option: typing.Optional['QStyleOption'] = ..., widget: typing.Optional[QWidget] = ...) -> int: ... - def pixelMetric(self, metric: QStyle.PixelMetric, option: typing.Optional['QStyleOption'] = ..., widget: typing.Optional[QWidget] = ...) -> int: ... - def styleHint(self, hint: QStyle.StyleHint, option: typing.Optional['QStyleOption'] = ..., widget: typing.Optional[QWidget] = ..., returnData: typing.Optional['QStyleHintReturn'] = ...) -> int: ... - def hitTestComplexControl(self, control: QStyle.ComplexControl, option: 'QStyleOptionComplex', pos: QtCore.QPoint, widget: typing.Optional[QWidget] = ...) -> QStyle.SubControl: ... - def itemPixmapRect(self, r: QtCore.QRect, flags: int, pixmap: QtGui.QPixmap) -> QtCore.QRect: ... - def itemTextRect(self, fm: QtGui.QFontMetrics, r: QtCore.QRect, flags: int, enabled: bool, text: str) -> QtCore.QRect: ... - # def subControlRect(self, cc: QStyle.ComplexControl, opt: 'QStyleOptionComplex', sc: QStyle.SubControl, widget: QWidget) -> QtCore.QRect: ... - # def subElementRect(self, element: QStyle.SubElement, option: 'QStyleOption', widget: QWidget) -> QtCore.QRect: ... - # def sizeFromContents(self, type: QStyle.ContentsType, option: 'QStyleOption', size: QtCore.QSize, widget: QWidget) -> QtCore.QSize: ... - def drawItemPixmap(self, painter: QtGui.QPainter, rect: QtCore.QRect, alignment: int, pixmap: QtGui.QPixmap) -> None: ... - def drawItemText(self, painter: QtGui.QPainter, rect: QtCore.QRect, flags: int, pal: QtGui.QPalette, enabled: bool, text: str, textRole: QtGui.QPalette.ColorRole = ...) -> None: ... - def drawComplexControl(self, control: QStyle.ComplexControl, option: 'QStyleOptionComplex', painter: QtGui.QPainter, widget: typing.Optional[QWidget] = ...) -> None: ... - def drawControl(self, element: QStyle.ControlElement, option: 'QStyleOption', painter: QtGui.QPainter, widget: typing.Optional[QWidget] = ...) -> None: ... - def drawPrimitive(self, element: QStyle.PrimitiveElement, option: 'QStyleOption', painter: QtGui.QPainter, widget: typing.Optional[QWidget] = ...) -> None: ... - def setBaseStyle(self, style: QStyle) -> None: ... - def baseStyle(self) -> QStyle: ... - - -class QRadioButton(QAbstractButton): - - @typing.overload - def __init__(self, parent: typing.Optional[QWidget] = ...) -> None: ... - @typing.overload - def __init__(self, text: str, parent: typing.Optional[QWidget] = ...) -> None: ... - - def mouseMoveEvent(self, a0: QtGui.QMouseEvent) -> None: ... - def paintEvent(self, a0: QtGui.QPaintEvent) -> None: ... - def event(self, e: QtCore.QEvent) -> bool: ... - def hitButton(self, a0: QtCore.QPoint) -> bool: ... - def initStyleOption(self, button: 'QStyleOptionButton') -> None: ... - def minimumSizeHint(self) -> QtCore.QSize: ... - def sizeHint(self) -> QtCore.QSize: ... - - -class QRubberBand(QWidget): - - class Shape(int): ... - Line = ... # type: 'QRubberBand.Shape' - Rectangle = ... # type: 'QRubberBand.Shape' - - def __init__(self, a0: 'QRubberBand.Shape', parent: typing.Optional[QWidget] = ...) -> None: ... - - def moveEvent(self, a0: QtGui.QMoveEvent) -> None: ... - def resizeEvent(self, a0: QtGui.QResizeEvent) -> None: ... - def showEvent(self, a0: QtGui.QShowEvent) -> None: ... - def changeEvent(self, a0: QtCore.QEvent) -> None: ... - def paintEvent(self, a0: QtGui.QPaintEvent) -> None: ... - def event(self, e: QtCore.QEvent) -> bool: ... - def initStyleOption(self, option: 'QStyleOptionRubberBand') -> None: ... - # @typing.overload - # def resize(self, w: int, h: int) -> None: ... - # @typing.overload - # def resize(self, s: QtCore.QSize) -> None: ... - @typing.overload - def move(self, p: QtCore.QPoint) -> None: ... - @typing.overload - def move(self, ax: int, ay: int) -> None: ... - @typing.overload - def setGeometry(self, r: QtCore.QRect) -> None: ... - @typing.overload - def setGeometry(self, ax: int, ay: int, aw: int, ah: int) -> None: ... - def shape(self) -> 'QRubberBand.Shape': ... - - -class QScrollArea(QAbstractScrollArea): - - def __init__(self, parent: typing.Optional[QWidget] = ...) -> None: ... - - def viewportSizeHint(self) -> QtCore.QSize: ... - def scrollContentsBy(self, dx: int, dy: int) -> None: ... - def resizeEvent(self, a0: QtGui.QResizeEvent) -> None: ... - def eventFilter(self, a0: QtCore.QObject, a1: QtCore.QEvent) -> bool: ... - def event(self, a0: QtCore.QEvent) -> bool: ... - def ensureWidgetVisible(self, childWidget: QWidget, xMargin: int = ..., yMargin: int = ...) -> None: ... - def ensureVisible(self, x: int, y: int, xMargin: int = ..., yMargin: int = ...) -> None: ... - def focusNextPrevChild(self, next: bool) -> bool: ... - def sizeHint(self) -> QtCore.QSize: ... - def setAlignment(self, a0: typing.Union[QtCore.Qt.Alignment, QtCore.Qt.AlignmentFlag]) -> None: ... - def alignment(self) -> QtCore.Qt.Alignment: ... - def setWidgetResizable(self, resizable: bool) -> None: ... - def widgetResizable(self) -> bool: ... - def takeWidget(self) -> QWidget: ... - def setWidget(self, w: QWidget) -> None: ... - def widget(self) -> QWidget: ... - - -class QScrollBar(QAbstractSlider): - - @typing.overload - def __init__(self, parent: typing.Optional[QWidget] = ...) -> None: ... - @typing.overload - def __init__(self, orientation: QtCore.Qt.Orientation, parent: typing.Optional[QWidget] = ...) -> None: ... - - def sliderChange(self, change: QAbstractSlider.SliderChange) -> None: ... - def wheelEvent(self, a0: QtGui.QWheelEvent) -> None: ... - def contextMenuEvent(self, a0: QtGui.QContextMenuEvent) -> None: ... - def hideEvent(self, a0: QtGui.QHideEvent) -> None: ... - def mouseMoveEvent(self, a0: QtGui.QMouseEvent) -> None: ... - def mouseReleaseEvent(self, a0: QtGui.QMouseEvent) -> None: ... - def mousePressEvent(self, a0: QtGui.QMouseEvent) -> None: ... - def paintEvent(self, a0: QtGui.QPaintEvent) -> None: ... - def initStyleOption(self, option: 'QStyleOptionSlider') -> None: ... - def event(self, event: QtCore.QEvent) -> bool: ... - def sizeHint(self) -> QtCore.QSize: ... - - -class QScroller(QtCore.QObject): - - class Input(int): ... - InputPress = ... # type: 'QScroller.Input' - InputMove = ... # type: 'QScroller.Input' - InputRelease = ... # type: 'QScroller.Input' - - class ScrollerGestureType(int): ... - TouchGesture = ... # type: 'QScroller.ScrollerGestureType' - LeftMouseButtonGesture = ... # type: 'QScroller.ScrollerGestureType' - RightMouseButtonGesture = ... # type: 'QScroller.ScrollerGestureType' - MiddleMouseButtonGesture = ... # type: 'QScroller.ScrollerGestureType' - - class State(int): ... - Inactive = ... # type: 'QScroller.State' - Pressed = ... # type: 'QScroller.State' - Dragging = ... # type: 'QScroller.State' - Scrolling = ... # type: 'QScroller.State' - - def scrollerPropertiesChanged(self, a0: 'QScrollerProperties') -> None: ... - def stateChanged(self, newstate: 'QScroller.State') -> None: ... - def resendPrepareEvent(self) -> None: ... - @typing.overload - def ensureVisible(self, rect: QtCore.QRectF, xmargin: float, ymargin: float) -> None: ... - @typing.overload - def ensureVisible(self, rect: QtCore.QRectF, xmargin: float, ymargin: float, scrollTime: int) -> None: ... - @typing.overload - def scrollTo(self, pos: typing.Union[QtCore.QPointF, QtCore.QPoint]) -> None: ... - @typing.overload - def scrollTo(self, pos: typing.Union[QtCore.QPointF, QtCore.QPoint], scrollTime: int) -> None: ... - def setScrollerProperties(self, prop: 'QScrollerProperties') -> None: ... - @typing.overload - def setSnapPositionsY(self, positions: typing.Iterable[float]) -> None: ... - @typing.overload - def setSnapPositionsY(self, first: float, interval: float) -> None: ... - @typing.overload - def setSnapPositionsX(self, positions: typing.Iterable[float]) -> None: ... - @typing.overload - def setSnapPositionsX(self, first: float, interval: float) -> None: ... - def scrollerProperties(self) -> 'QScrollerProperties': ... - def pixelPerMeter(self) -> QtCore.QPointF: ... - def finalPosition(self) -> QtCore.QPointF: ... - def velocity(self) -> QtCore.QPointF: ... - def stop(self) -> None: ... - def handleInput(self, input: 'QScroller.Input', position: typing.Union[QtCore.QPointF, QtCore.QPoint], timestamp: int = ...) -> bool: ... - def state(self) -> 'QScroller.State': ... - def target(self) -> QtCore.QObject: ... - @staticmethod - def activeScrollers() -> typing.Any: ... - @staticmethod - def ungrabGesture(target: QtCore.QObject) -> None: ... - @staticmethod - def grabbedGesture(target: QtCore.QObject) -> QtCore.Qt.GestureType: ... - @staticmethod - def grabGesture(target: QtCore.QObject, scrollGestureType: 'QScroller.ScrollerGestureType' = ...) -> QtCore.Qt.GestureType: ... - @staticmethod - def scroller(target: QtCore.QObject) -> 'QScroller': ... - @staticmethod - def hasScroller(target: QtCore.QObject) -> bool: ... - - -class QScrollerProperties(sip.simplewrapper): - - class ScrollMetric(int): ... - MousePressEventDelay = ... # type: 'QScrollerProperties.ScrollMetric' - DragStartDistance = ... # type: 'QScrollerProperties.ScrollMetric' - DragVelocitySmoothingFactor = ... # type: 'QScrollerProperties.ScrollMetric' - AxisLockThreshold = ... # type: 'QScrollerProperties.ScrollMetric' - ScrollingCurve = ... # type: 'QScrollerProperties.ScrollMetric' - DecelerationFactor = ... # type: 'QScrollerProperties.ScrollMetric' - MinimumVelocity = ... # type: 'QScrollerProperties.ScrollMetric' - MaximumVelocity = ... # type: 'QScrollerProperties.ScrollMetric' - MaximumClickThroughVelocity = ... # type: 'QScrollerProperties.ScrollMetric' - AcceleratingFlickMaximumTime = ... # type: 'QScrollerProperties.ScrollMetric' - AcceleratingFlickSpeedupFactor = ... # type: 'QScrollerProperties.ScrollMetric' - SnapPositionRatio = ... # type: 'QScrollerProperties.ScrollMetric' - SnapTime = ... # type: 'QScrollerProperties.ScrollMetric' - OvershootDragResistanceFactor = ... # type: 'QScrollerProperties.ScrollMetric' - OvershootDragDistanceFactor = ... # type: 'QScrollerProperties.ScrollMetric' - OvershootScrollDistanceFactor = ... # type: 'QScrollerProperties.ScrollMetric' - OvershootScrollTime = ... # type: 'QScrollerProperties.ScrollMetric' - HorizontalOvershootPolicy = ... # type: 'QScrollerProperties.ScrollMetric' - VerticalOvershootPolicy = ... # type: 'QScrollerProperties.ScrollMetric' - FrameRate = ... # type: 'QScrollerProperties.ScrollMetric' - ScrollMetricCount = ... # type: 'QScrollerProperties.ScrollMetric' - - class FrameRates(int): ... - Standard = ... # type: 'QScrollerProperties.FrameRates' - Fps60 = ... # type: 'QScrollerProperties.FrameRates' - Fps30 = ... # type: 'QScrollerProperties.FrameRates' - Fps20 = ... # type: 'QScrollerProperties.FrameRates' - - class OvershootPolicy(int): ... - OvershootWhenScrollable = ... # type: 'QScrollerProperties.OvershootPolicy' - OvershootAlwaysOff = ... # type: 'QScrollerProperties.OvershootPolicy' - OvershootAlwaysOn = ... # type: 'QScrollerProperties.OvershootPolicy' - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, sp: 'QScrollerProperties') -> None: ... - - def setScrollMetric(self, metric: 'QScrollerProperties.ScrollMetric', value: typing.Any) -> None: ... - def scrollMetric(self, metric: 'QScrollerProperties.ScrollMetric') -> typing.Any: ... - @staticmethod - def unsetDefaultScrollerProperties() -> None: ... - @staticmethod - def setDefaultScrollerProperties(sp: 'QScrollerProperties') -> None: ... - - -class QShortcut(QtCore.QObject): - - @typing.overload - def __init__(self, parent: QWidget) -> None: ... - @typing.overload - def __init__(self, key: typing.Union[QtGui.QKeySequence, QtGui.QKeySequence.StandardKey, str, int], parent: QWidget, member: PYQT_SLOT = ..., ambiguousMember: PYQT_SLOT = ..., context: QtCore.Qt.ShortcutContext = ...) -> None: ... - - def event(self, e: QtCore.QEvent) -> bool: ... - def activatedAmbiguously(self) -> None: ... - def activated(self) -> None: ... - def autoRepeat(self) -> bool: ... - def setAutoRepeat(self, on: bool) -> None: ... - def parentWidget(self) -> QWidget: ... - def id(self) -> int: ... - def whatsThis(self) -> str: ... - def setWhatsThis(self, text: str) -> None: ... - def context(self) -> QtCore.Qt.ShortcutContext: ... - def setContext(self, context: QtCore.Qt.ShortcutContext) -> None: ... - def isEnabled(self) -> bool: ... - def setEnabled(self, enable: bool) -> None: ... - def key(self) -> QtGui.QKeySequence: ... - def setKey(self, key: typing.Union[QtGui.QKeySequence, QtGui.QKeySequence.StandardKey, str, int]) -> None: ... - - -class QSizeGrip(QWidget): - - def __init__(self, parent: QWidget) -> None: ... - - def hideEvent(self, hideEvent: QtGui.QHideEvent) -> None: ... - def showEvent(self, showEvent: QtGui.QShowEvent) -> None: ... - def moveEvent(self, moveEvent: QtGui.QMoveEvent) -> None: ... - def event(self, a0: QtCore.QEvent) -> bool: ... - def eventFilter(self, a0: QtCore.QObject, a1: QtCore.QEvent) -> bool: ... - def mouseMoveEvent(self, a0: QtGui.QMouseEvent) -> None: ... - def mouseReleaseEvent(self, mouseEvent: QtGui.QMouseEvent) -> None: ... - def mousePressEvent(self, a0: QtGui.QMouseEvent) -> None: ... - def paintEvent(self, a0: QtGui.QPaintEvent) -> None: ... - def setVisible(self, a0: bool) -> None: ... - def sizeHint(self) -> QtCore.QSize: ... - - -class QSizePolicy(sip.simplewrapper): - - class ControlType(int): ... - DefaultType = ... # type: 'QSizePolicy.ControlType' - ButtonBox = ... # type: 'QSizePolicy.ControlType' - CheckBox = ... # type: 'QSizePolicy.ControlType' - ComboBox = ... # type: 'QSizePolicy.ControlType' - Frame = ... # type: 'QSizePolicy.ControlType' - GroupBox = ... # type: 'QSizePolicy.ControlType' - Label = ... # type: 'QSizePolicy.ControlType' - Line = ... # type: 'QSizePolicy.ControlType' - LineEdit = ... # type: 'QSizePolicy.ControlType' - PushButton = ... # type: 'QSizePolicy.ControlType' - RadioButton = ... # type: 'QSizePolicy.ControlType' - Slider = ... # type: 'QSizePolicy.ControlType' - SpinBox = ... # type: 'QSizePolicy.ControlType' - TabWidget = ... # type: 'QSizePolicy.ControlType' - ToolButton = ... # type: 'QSizePolicy.ControlType' - - class Policy(int): ... - Fixed = ... # type: 'QSizePolicy.Policy' - Minimum = ... # type: 'QSizePolicy.Policy' - Maximum = ... # type: 'QSizePolicy.Policy' - Preferred = ... # type: 'QSizePolicy.Policy' - MinimumExpanding = ... # type: 'QSizePolicy.Policy' - Expanding = ... # type: 'QSizePolicy.Policy' - Ignored = ... # type: 'QSizePolicy.Policy' - - class PolicyFlag(int): ... - GrowFlag = ... # type: 'QSizePolicy.PolicyFlag' - ExpandFlag = ... # type: 'QSizePolicy.PolicyFlag' - ShrinkFlag = ... # type: 'QSizePolicy.PolicyFlag' - IgnoreFlag = ... # type: 'QSizePolicy.PolicyFlag' - - class ControlTypes(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QSizePolicy.ControlTypes', 'QSizePolicy.ControlType']) -> None: ... - @typing.overload - def __init__(self, a0: 'QSizePolicy.ControlTypes') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QSizePolicy.ControlTypes': ... - def __int__(self) -> int: ... - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, horizontal: 'QSizePolicy.Policy', vertical: 'QSizePolicy.Policy', type: 'QSizePolicy.ControlType' = ...) -> None: ... - @typing.overload - def __init__(self, variant: typing.Any) -> None: ... - @typing.overload - def __init__(self, a0: 'QSizePolicy') -> None: ... - - def __hash__(self) -> int: ... - def setRetainSizeWhenHidden(self, retainSize: bool) -> None: ... - def retainSizeWhenHidden(self) -> bool: ... - def hasWidthForHeight(self) -> bool: ... - def setWidthForHeight(self, b: bool) -> None: ... - def setControlType(self, type: 'QSizePolicy.ControlType') -> None: ... - def controlType(self) -> 'QSizePolicy.ControlType': ... - def transpose(self) -> None: ... - def setVerticalStretch(self, stretchFactor: int) -> None: ... - def setHorizontalStretch(self, stretchFactor: int) -> None: ... - def verticalStretch(self) -> int: ... - def horizontalStretch(self) -> int: ... - def hasHeightForWidth(self) -> bool: ... - def setHeightForWidth(self, b: bool) -> None: ... - def expandingDirections(self) -> QtCore.Qt.Orientations: ... - def setVerticalPolicy(self, d: 'QSizePolicy.Policy') -> None: ... - def setHorizontalPolicy(self, d: 'QSizePolicy.Policy') -> None: ... - def verticalPolicy(self) -> 'QSizePolicy.Policy': ... - def horizontalPolicy(self) -> 'QSizePolicy.Policy': ... - - -class QSlider(QAbstractSlider): - - class TickPosition(int): ... - NoTicks = ... # type: 'QSlider.TickPosition' - TicksAbove = ... # type: 'QSlider.TickPosition' - TicksLeft = ... # type: 'QSlider.TickPosition' - TicksBelow = ... # type: 'QSlider.TickPosition' - TicksRight = ... # type: 'QSlider.TickPosition' - TicksBothSides = ... # type: 'QSlider.TickPosition' - - @typing.overload - def __init__(self, parent: typing.Optional[QWidget] = ...) -> None: ... - @typing.overload - def __init__(self, orientation: QtCore.Qt.Orientation, parent: typing.Optional[QWidget] = ...) -> None: ... - - def mouseMoveEvent(self, ev: QtGui.QMouseEvent) -> None: ... - def mouseReleaseEvent(self, ev: QtGui.QMouseEvent) -> None: ... - def mousePressEvent(self, ev: QtGui.QMouseEvent) -> None: ... - def paintEvent(self, ev: QtGui.QPaintEvent) -> None: ... - def initStyleOption(self, option: 'QStyleOptionSlider') -> None: ... - def event(self, event: QtCore.QEvent) -> bool: ... - def tickInterval(self) -> int: ... - def setTickInterval(self, ti: int) -> None: ... - def tickPosition(self) -> 'QSlider.TickPosition': ... - def setTickPosition(self, position: 'QSlider.TickPosition') -> None: ... - def minimumSizeHint(self) -> QtCore.QSize: ... - def sizeHint(self) -> QtCore.QSize: ... - - -class QSpinBox(QAbstractSpinBox): - - def __init__(self, parent: typing.Optional[QWidget] = ...) -> None: ... - - def setDisplayIntegerBase(self, base: int) -> None: ... - def displayIntegerBase(self) -> int: ... - @typing.overload - def valueChanged(self, a0: int) -> None: ... - @typing.overload - def valueChanged(self, a0: str) -> None: ... - def setValue(self, val: int) -> None: ... - def event(self, e: QtCore.QEvent) -> bool: ... - def fixup(self, str: str) -> str: ... - def textFromValue(self, v: int) -> str: ... - def valueFromText(self, text: str) -> int: ... - def validate(self, input: str, pos: int) -> typing.Tuple[QtGui.QValidator.State, str, int]: ... - def setRange(self, min: int, max: int) -> None: ... - def setMaximum(self, max: int) -> None: ... - def maximum(self) -> int: ... - def setMinimum(self, min: int) -> None: ... - def minimum(self) -> int: ... - def setSingleStep(self, val: int) -> None: ... - def singleStep(self) -> int: ... - def cleanText(self) -> str: ... - def setSuffix(self, s: str) -> None: ... - def suffix(self) -> str: ... - def setPrefix(self, p: str) -> None: ... - def prefix(self) -> str: ... - def value(self) -> int: ... - - -class QDoubleSpinBox(QAbstractSpinBox): - - def __init__(self, parent: typing.Optional[QWidget] = ...) -> None: ... - - @typing.overload - def valueChanged(self, a0: float) -> None: ... - @typing.overload - def valueChanged(self, a0: str) -> None: ... - def setValue(self, val: float) -> None: ... - def fixup(self, str: str) -> str: ... - def textFromValue(self, v: float) -> str: ... - def valueFromText(self, text: str) -> float: ... - def validate(self, input: str, pos: int) -> typing.Tuple[QtGui.QValidator.State, str, int]: ... - def setDecimals(self, prec: int) -> None: ... - def decimals(self) -> int: ... - def setRange(self, min: float, max: float) -> None: ... - def setMaximum(self, max: float) -> None: ... - def maximum(self) -> float: ... - def setMinimum(self, min: float) -> None: ... - def minimum(self) -> float: ... - def setSingleStep(self, val: float) -> None: ... - def singleStep(self) -> float: ... - def cleanText(self) -> str: ... - def setSuffix(self, s: str) -> None: ... - def suffix(self) -> str: ... - def setPrefix(self, p: str) -> None: ... - def prefix(self) -> str: ... - def value(self) -> float: ... - - -class QSplashScreen(QWidget): - - @typing.overload - def __init__(self, pixmap: QtGui.QPixmap = ..., flags: typing.Union[QtCore.Qt.WindowFlags, QtCore.Qt.WindowType] = ...) -> None: ... - @typing.overload - def __init__(self, parent: QWidget, pixmap: QtGui.QPixmap = ..., flags: typing.Union[QtCore.Qt.WindowFlags, QtCore.Qt.WindowType] = ...) -> None: ... - - def mousePressEvent(self, a0: QtGui.QMouseEvent) -> None: ... - def event(self, e: QtCore.QEvent) -> bool: ... - def drawContents(self, painter: QtGui.QPainter) -> None: ... - def messageChanged(self, message: str) -> None: ... - def clearMessage(self) -> None: ... - def showMessage(self, message: str, alignment: int = ..., color: typing.Union[QtGui.QColor, QtCore.Qt.GlobalColor, QtGui.QGradient] = ...) -> None: ... - def message(self) -> str: ... - # def repaint(self) -> None: ... - def finish(self, w: QWidget) -> None: ... - def pixmap(self) -> QtGui.QPixmap: ... - def setPixmap(self, pixmap: QtGui.QPixmap) -> None: ... - - -class QSplitter(QFrame): - - @typing.overload - def __init__(self, parent: typing.Optional[QWidget] = ...) -> None: ... - @typing.overload - def __init__(self, orientation: QtCore.Qt.Orientation, parent: typing.Optional[QWidget] = ...) -> None: ... - - def closestLegalPosition(self, a0: int, a1: int) -> int: ... - def setRubberBand(self, position: int) -> None: ... - def moveSplitter(self, pos: int, index: int) -> None: ... - def changeEvent(self, a0: QtCore.QEvent) -> None: ... - def resizeEvent(self, a0: QtGui.QResizeEvent) -> None: ... - def event(self, a0: QtCore.QEvent) -> bool: ... - def childEvent(self, a0: QtCore.QChildEvent) -> None: ... - def createHandle(self) -> 'QSplitterHandle': ... - def splitterMoved(self, pos: int, index: int) -> None: ... - def setStretchFactor(self, index: int, stretch: int) -> None: ... - def handle(self, index: int) -> 'QSplitterHandle': ... - def getRange(self, index: int) -> typing.Tuple[int, int]: ... - def __len__(self) -> int: ... - def count(self) -> int: ... - def widget(self, index: int) -> QWidget: ... - def indexOf(self, w: QWidget) -> int: ... - def setHandleWidth(self, a0: int) -> None: ... - def handleWidth(self) -> int: ... - def restoreState(self, state: typing.Union[QtCore.QByteArray, bytes, bytearray]) -> bool: ... - def saveState(self) -> QtCore.QByteArray: ... - def setSizes(self, list: typing.Iterable[int]) -> None: ... - def sizes(self) -> typing.List[int]: ... - def minimumSizeHint(self) -> QtCore.QSize: ... - def sizeHint(self) -> QtCore.QSize: ... - def refresh(self) -> None: ... - def opaqueResize(self) -> bool: ... - def setOpaqueResize(self, opaque: bool = ...) -> None: ... - def isCollapsible(self, index: int) -> bool: ... - def setCollapsible(self, index: int, a1: bool) -> None: ... - def childrenCollapsible(self) -> bool: ... - def setChildrenCollapsible(self, a0: bool) -> None: ... - def orientation(self) -> QtCore.Qt.Orientation: ... - def setOrientation(self, a0: QtCore.Qt.Orientation) -> None: ... - def insertWidget(self, index: int, widget: QWidget) -> None: ... - def addWidget(self, widget: QWidget) -> None: ... - - -class QSplitterHandle(QWidget): - - def __init__(self, o: QtCore.Qt.Orientation, parent: QSplitter) -> None: ... - - def resizeEvent(self, a0: QtGui.QResizeEvent) -> None: ... - def closestLegalPosition(self, p: int) -> int: ... - def moveSplitter(self, p: int) -> None: ... - def event(self, a0: QtCore.QEvent) -> bool: ... - def mouseReleaseEvent(self, a0: QtGui.QMouseEvent) -> None: ... - def mousePressEvent(self, a0: QtGui.QMouseEvent) -> None: ... - def mouseMoveEvent(self, a0: QtGui.QMouseEvent) -> None: ... - def paintEvent(self, a0: QtGui.QPaintEvent) -> None: ... - def sizeHint(self) -> QtCore.QSize: ... - def splitter(self) -> QSplitter: ... - def opaqueResize(self) -> bool: ... - def orientation(self) -> QtCore.Qt.Orientation: ... - def setOrientation(self, o: QtCore.Qt.Orientation) -> None: ... - - -class QStackedLayout(QLayout): - - class StackingMode(int): ... - StackOne = ... # type: 'QStackedLayout.StackingMode' - StackAll = ... # type: 'QStackedLayout.StackingMode' - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, parent: QWidget) -> None: ... - @typing.overload - def __init__(self, parentLayout: QLayout) -> None: ... - - def heightForWidth(self, width: int) -> int: ... - def hasHeightForWidth(self) -> bool: ... - def setStackingMode(self, stackingMode: 'QStackedLayout.StackingMode') -> None: ... - def stackingMode(self) -> 'QStackedLayout.StackingMode': ... - def setCurrentWidget(self, w: QWidget) -> None: ... - def setCurrentIndex(self, index: int) -> None: ... - def currentChanged(self, index: int) -> None: ... - def widgetRemoved(self, index: int) -> None: ... - def setGeometry(self, rect: QtCore.QRect) -> None: ... - def takeAt(self, a0: int) -> QLayoutItem: ... - def itemAt(self, a0: int) -> QLayoutItem: ... - def minimumSize(self) -> QtCore.QSize: ... - def sizeHint(self) -> QtCore.QSize: ... - def addItem(self, item: QLayoutItem) -> None: ... - def count(self) -> int: ... - @typing.overload - def widget(self, a0: int) -> QWidget: ... - @typing.overload - def widget(self) -> QWidget: ... - def currentIndex(self) -> int: ... - def currentWidget(self) -> QWidget: ... - def insertWidget(self, index: int, w: QWidget) -> int: ... - # def addWidget(self, w: QWidget) -> int: ... - - -class QStackedWidget(QFrame): - - def __init__(self, parent: typing.Optional[QWidget] = ...) -> None: ... - - def event(self, e: QtCore.QEvent) -> bool: ... - def widgetRemoved(self, index: int) -> None: ... - def currentChanged(self, a0: int) -> None: ... - def setCurrentWidget(self, w: QWidget) -> None: ... - def setCurrentIndex(self, index: int) -> None: ... - def __len__(self) -> int: ... - def count(self) -> int: ... - def widget(self, a0: int) -> QWidget: ... - def indexOf(self, a0: QWidget) -> int: ... - def currentIndex(self) -> int: ... - def currentWidget(self) -> QWidget: ... - def removeWidget(self, w: QWidget) -> None: ... - def insertWidget(self, index: int, w: QWidget) -> int: ... - def addWidget(self, w: QWidget) -> int: ... - - -class QStatusBar(QWidget): - - def __init__(self, parent: typing.Optional[QWidget] = ...) -> None: ... - - def showEvent(self, a0: QtGui.QShowEvent) -> None: ... - def event(self, a0: QtCore.QEvent) -> bool: ... - def hideOrShow(self) -> None: ... - def reformat(self) -> None: ... - def resizeEvent(self, a0: QtGui.QResizeEvent) -> None: ... - def paintEvent(self, a0: QtGui.QPaintEvent) -> None: ... - def messageChanged(self, text: str) -> None: ... - def clearMessage(self) -> None: ... - def showMessage(self, message: str, msecs: int = ...) -> None: ... - def insertPermanentWidget(self, index: int, widget: QWidget, stretch: int = ...) -> int: ... - def insertWidget(self, index: int, widget: QWidget, stretch: int = ...) -> int: ... - def currentMessage(self) -> str: ... - def isSizeGripEnabled(self) -> bool: ... - def setSizeGripEnabled(self, a0: bool) -> None: ... - def removeWidget(self, widget: QWidget) -> None: ... - def addPermanentWidget(self, widget: QWidget, stretch: int = ...) -> None: ... - def addWidget(self, widget: QWidget, stretch: int = ...) -> None: ... - - -class QStyledItemDelegate(QAbstractItemDelegate): - - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def editorEvent(self, event: QtCore.QEvent, model: QtCore.QAbstractItemModel, option: 'QStyleOptionViewItem', index: QtCore.QModelIndex) -> bool: ... - def eventFilter(self, object: QtCore.QObject, event: QtCore.QEvent) -> bool: ... - def initStyleOption(self, option: 'QStyleOptionViewItem', index: QtCore.QModelIndex) -> None: ... - def displayText(self, value: typing.Any, locale: QtCore.QLocale) -> str: ... - def setItemEditorFactory(self, factory: QItemEditorFactory) -> None: ... - def itemEditorFactory(self) -> QItemEditorFactory: ... - def updateEditorGeometry(self, editor: QWidget, option: 'QStyleOptionViewItem', index: QtCore.QModelIndex) -> None: ... - def setModelData(self, editor: QWidget, model: QtCore.QAbstractItemModel, index: QtCore.QModelIndex) -> None: ... - def setEditorData(self, editor: QWidget, index: QtCore.QModelIndex) -> None: ... - def createEditor(self, parent: QWidget, option: 'QStyleOptionViewItem', index: QtCore.QModelIndex) -> QWidget: ... - def sizeHint(self, option: 'QStyleOptionViewItem', index: QtCore.QModelIndex) -> QtCore.QSize: ... - def paint(self, painter: QtGui.QPainter, option: 'QStyleOptionViewItem', index: QtCore.QModelIndex) -> None: ... - - -class QStyleFactory(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QStyleFactory') -> None: ... - - @staticmethod - def create(a0: str) -> QStyle: ... - @staticmethod - def keys() -> typing.List[str]: ... - - -class QStyleOption(sip.simplewrapper): - - class StyleOptionVersion(int): ... - Version = ... # type: 'QStyleOption.StyleOptionVersion' - - class StyleOptionType(int): ... - Type = ... # type: 'QStyleOption.StyleOptionType' - - class OptionType(int): ... - SO_Default = ... # type: 'QStyleOption.OptionType' - SO_FocusRect = ... # type: 'QStyleOption.OptionType' - SO_Button = ... # type: 'QStyleOption.OptionType' - SO_Tab = ... # type: 'QStyleOption.OptionType' - SO_MenuItem = ... # type: 'QStyleOption.OptionType' - SO_Frame = ... # type: 'QStyleOption.OptionType' - SO_ProgressBar = ... # type: 'QStyleOption.OptionType' - SO_ToolBox = ... # type: 'QStyleOption.OptionType' - SO_Header = ... # type: 'QStyleOption.OptionType' - SO_DockWidget = ... # type: 'QStyleOption.OptionType' - SO_ViewItem = ... # type: 'QStyleOption.OptionType' - SO_TabWidgetFrame = ... # type: 'QStyleOption.OptionType' - SO_TabBarBase = ... # type: 'QStyleOption.OptionType' - SO_RubberBand = ... # type: 'QStyleOption.OptionType' - SO_ToolBar = ... # type: 'QStyleOption.OptionType' - SO_Complex = ... # type: 'QStyleOption.OptionType' - SO_Slider = ... # type: 'QStyleOption.OptionType' - SO_SpinBox = ... # type: 'QStyleOption.OptionType' - SO_ToolButton = ... # type: 'QStyleOption.OptionType' - SO_ComboBox = ... # type: 'QStyleOption.OptionType' - SO_TitleBar = ... # type: 'QStyleOption.OptionType' - SO_GroupBox = ... # type: 'QStyleOption.OptionType' - SO_ComplexCustomBase = ... # type: 'QStyleOption.OptionType' - SO_GraphicsItem = ... # type: 'QStyleOption.OptionType' - SO_SizeGrip = ... # type: 'QStyleOption.OptionType' - SO_CustomBase = ... # type: 'QStyleOption.OptionType' - - direction = ... # type: QtCore.Qt.LayoutDirection - fontMetrics = ... # type: QtGui.QFontMetrics - palette = ... # type: QtGui.QPalette - rect = ... # type: QtCore.QRect - state = ... # type: typing.Union[QStyle.State, QStyle.StateFlag] - styleObject = ... # type: QtCore.QObject - type = ... # type: int - version = ... # type: int - - @typing.overload - def __init__(self, version: int = ..., type: int = ...) -> None: ... - @typing.overload - def __init__(self, other: 'QStyleOption') -> None: ... - - def initFrom(self, w: QWidget) -> None: ... - - -class QStyleOptionFocusRect(QStyleOption): - - class StyleOptionVersion(int): ... - Version = ... # type: 'QStyleOptionFocusRect.StyleOptionVersion' - - class StyleOptionType(int): ... - Type = ... # type: 'QStyleOptionFocusRect.StyleOptionType' - - backgroundColor = ... # type: typing.Union[QtGui.QColor, QtCore.Qt.GlobalColor, QtGui.QGradient] - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, other: 'QStyleOptionFocusRect') -> None: ... - - -class QStyleOptionFrame(QStyleOption): - - class FrameFeature(int): ... - None_ = ... # type: 'QStyleOptionFrame.FrameFeature' - Flat = ... # type: 'QStyleOptionFrame.FrameFeature' - Rounded = ... # type: 'QStyleOptionFrame.FrameFeature' - - class StyleOptionVersion(int): ... - Version = ... # type: 'QStyleOptionFrame.StyleOptionVersion' - - class StyleOptionType(int): ... - Type = ... # type: 'QStyleOptionFrame.StyleOptionType' - - class FrameFeatures(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QStyleOptionFrame.FrameFeatures', 'QStyleOptionFrame.FrameFeature']) -> None: ... - @typing.overload - def __init__(self, a0: 'QStyleOptionFrame.FrameFeatures') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QStyleOptionFrame.FrameFeatures': ... - def __int__(self) -> int: ... - - features = ... # type: typing.Union['QStyleOptionFrame.FrameFeatures', 'QStyleOptionFrame.FrameFeature'] - frameShape = ... # type: QFrame.Shape - lineWidth = ... # type: int - midLineWidth = ... # type: int - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, other: 'QStyleOptionFrame') -> None: ... - - -class QStyleOptionTabWidgetFrame(QStyleOption): - - class StyleOptionVersion(int): ... - Version = ... # type: 'QStyleOptionTabWidgetFrame.StyleOptionVersion' - - class StyleOptionType(int): ... - Type = ... # type: 'QStyleOptionTabWidgetFrame.StyleOptionType' - - leftCornerWidgetSize = ... # type: QtCore.QSize - lineWidth = ... # type: int - midLineWidth = ... # type: int - rightCornerWidgetSize = ... # type: QtCore.QSize - selectedTabRect = ... # type: QtCore.QRect - shape = ... # type: 'QTabBar.Shape' - tabBarRect = ... # type: QtCore.QRect - tabBarSize = ... # type: QtCore.QSize - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, other: 'QStyleOptionTabWidgetFrame') -> None: ... - - -class QStyleOptionTabBarBase(QStyleOption): - - class StyleOptionVersion(int): ... - Version = ... # type: 'QStyleOptionTabBarBase.StyleOptionVersion' - - class StyleOptionType(int): ... - Type = ... # type: 'QStyleOptionTabBarBase.StyleOptionType' - - documentMode = ... # type: bool - selectedTabRect = ... # type: QtCore.QRect - shape = ... # type: 'QTabBar.Shape' - tabBarRect = ... # type: QtCore.QRect - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, other: 'QStyleOptionTabBarBase') -> None: ... - - -class QStyleOptionHeader(QStyleOption): - - class SortIndicator(int): ... - None_ = ... # type: 'QStyleOptionHeader.SortIndicator' - SortUp = ... # type: 'QStyleOptionHeader.SortIndicator' - SortDown = ... # type: 'QStyleOptionHeader.SortIndicator' - - class SelectedPosition(int): ... - NotAdjacent = ... # type: 'QStyleOptionHeader.SelectedPosition' - NextIsSelected = ... # type: 'QStyleOptionHeader.SelectedPosition' - PreviousIsSelected = ... # type: 'QStyleOptionHeader.SelectedPosition' - NextAndPreviousAreSelected = ... # type: 'QStyleOptionHeader.SelectedPosition' - - class SectionPosition(int): ... - Beginning = ... # type: 'QStyleOptionHeader.SectionPosition' - Middle = ... # type: 'QStyleOptionHeader.SectionPosition' - End = ... # type: 'QStyleOptionHeader.SectionPosition' - OnlyOneSection = ... # type: 'QStyleOptionHeader.SectionPosition' - - class StyleOptionVersion(int): ... - Version = ... # type: 'QStyleOptionHeader.StyleOptionVersion' - - class StyleOptionType(int): ... - Type = ... # type: 'QStyleOptionHeader.StyleOptionType' - - icon = ... # type: QtGui.QIcon - iconAlignment = ... # type: typing.Union[QtCore.Qt.Alignment, QtCore.Qt.AlignmentFlag] - orientation = ... # type: QtCore.Qt.Orientation - position = ... # type: 'QStyleOptionHeader.SectionPosition' - section = ... # type: int - selectedPosition = ... # type: 'QStyleOptionHeader.SelectedPosition' - sortIndicator = ... # type: 'QStyleOptionHeader.SortIndicator' - text = ... # type: str - textAlignment = ... # type: typing.Union[QtCore.Qt.Alignment, QtCore.Qt.AlignmentFlag] - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, other: 'QStyleOptionHeader') -> None: ... - - -class QStyleOptionButton(QStyleOption): - - class ButtonFeature(int): ... - None_ = ... # type: 'QStyleOptionButton.ButtonFeature' - Flat = ... # type: 'QStyleOptionButton.ButtonFeature' - HasMenu = ... # type: 'QStyleOptionButton.ButtonFeature' - DefaultButton = ... # type: 'QStyleOptionButton.ButtonFeature' - AutoDefaultButton = ... # type: 'QStyleOptionButton.ButtonFeature' - CommandLinkButton = ... # type: 'QStyleOptionButton.ButtonFeature' - - class StyleOptionVersion(int): ... - Version = ... # type: 'QStyleOptionButton.StyleOptionVersion' - - class StyleOptionType(int): ... - Type = ... # type: 'QStyleOptionButton.StyleOptionType' - - class ButtonFeatures(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QStyleOptionButton.ButtonFeatures', 'QStyleOptionButton.ButtonFeature']) -> None: ... - @typing.overload - def __init__(self, a0: 'QStyleOptionButton.ButtonFeatures') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QStyleOptionButton.ButtonFeatures': ... - def __int__(self) -> int: ... - - features = ... # type: typing.Union['QStyleOptionButton.ButtonFeatures', 'QStyleOptionButton.ButtonFeature'] - icon = ... # type: QtGui.QIcon - iconSize = ... # type: QtCore.QSize - text = ... # type: str - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, other: 'QStyleOptionButton') -> None: ... - - -class QStyleOptionTab(QStyleOption): - - class TabFeature(int): ... - None_ = ... # type: 'QStyleOptionTab.TabFeature' - HasFrame = ... # type: 'QStyleOptionTab.TabFeature' - - class CornerWidget(int): ... - NoCornerWidgets = ... # type: 'QStyleOptionTab.CornerWidget' - LeftCornerWidget = ... # type: 'QStyleOptionTab.CornerWidget' - RightCornerWidget = ... # type: 'QStyleOptionTab.CornerWidget' - - class SelectedPosition(int): ... - NotAdjacent = ... # type: 'QStyleOptionTab.SelectedPosition' - NextIsSelected = ... # type: 'QStyleOptionTab.SelectedPosition' - PreviousIsSelected = ... # type: 'QStyleOptionTab.SelectedPosition' - - class TabPosition(int): ... - Beginning = ... # type: 'QStyleOptionTab.TabPosition' - Middle = ... # type: 'QStyleOptionTab.TabPosition' - End = ... # type: 'QStyleOptionTab.TabPosition' - OnlyOneTab = ... # type: 'QStyleOptionTab.TabPosition' - - class StyleOptionVersion(int): ... - Version = ... # type: 'QStyleOptionTab.StyleOptionVersion' - - class StyleOptionType(int): ... - Type = ... # type: 'QStyleOptionTab.StyleOptionType' - - class CornerWidgets(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QStyleOptionTab.CornerWidgets', 'QStyleOptionTab.CornerWidget']) -> None: ... - @typing.overload - def __init__(self, a0: 'QStyleOptionTab.CornerWidgets') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QStyleOptionTab.CornerWidgets': ... - def __int__(self) -> int: ... - - class TabFeatures(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QStyleOptionTab.TabFeatures', 'QStyleOptionTab.TabFeature']) -> None: ... - @typing.overload - def __init__(self, a0: 'QStyleOptionTab.TabFeatures') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QStyleOptionTab.TabFeatures': ... - def __int__(self) -> int: ... - - cornerWidgets = ... # type: typing.Union['QStyleOptionTab.CornerWidgets', 'QStyleOptionTab.CornerWidget'] - documentMode = ... # type: bool - features = ... # type: typing.Union['QStyleOptionTab.TabFeatures', 'QStyleOptionTab.TabFeature'] - icon = ... # type: QtGui.QIcon - iconSize = ... # type: QtCore.QSize - leftButtonSize = ... # type: QtCore.QSize - position = ... # type: 'QStyleOptionTab.TabPosition' - rightButtonSize = ... # type: QtCore.QSize - row = ... # type: int - selectedPosition = ... # type: 'QStyleOptionTab.SelectedPosition' - shape = ... # type: 'QTabBar.Shape' - text = ... # type: str - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, other: 'QStyleOptionTab') -> None: ... - - -class QStyleOptionProgressBar(QStyleOption): - - class StyleOptionVersion(int): ... - Version = ... # type: 'QStyleOptionProgressBar.StyleOptionVersion' - - class StyleOptionType(int): ... - Type = ... # type: 'QStyleOptionProgressBar.StyleOptionType' - - bottomToTop = ... # type: bool - invertedAppearance = ... # type: bool - maximum = ... # type: int - minimum = ... # type: int - orientation = ... # type: QtCore.Qt.Orientation - progress = ... # type: int - text = ... # type: str - textAlignment = ... # type: typing.Union[QtCore.Qt.Alignment, QtCore.Qt.AlignmentFlag] - textVisible = ... # type: bool - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, other: 'QStyleOptionProgressBar') -> None: ... - - -class QStyleOptionMenuItem(QStyleOption): - - class CheckType(int): ... - NotCheckable = ... # type: 'QStyleOptionMenuItem.CheckType' - Exclusive = ... # type: 'QStyleOptionMenuItem.CheckType' - NonExclusive = ... # type: 'QStyleOptionMenuItem.CheckType' - - class MenuItemType(int): ... - Normal = ... # type: 'QStyleOptionMenuItem.MenuItemType' - DefaultItem = ... # type: 'QStyleOptionMenuItem.MenuItemType' - Separator = ... # type: 'QStyleOptionMenuItem.MenuItemType' - SubMenu = ... # type: 'QStyleOptionMenuItem.MenuItemType' - Scroller = ... # type: 'QStyleOptionMenuItem.MenuItemType' - TearOff = ... # type: 'QStyleOptionMenuItem.MenuItemType' - Margin = ... # type: 'QStyleOptionMenuItem.MenuItemType' - EmptyArea = ... # type: 'QStyleOptionMenuItem.MenuItemType' - - class StyleOptionVersion(int): ... - Version = ... # type: 'QStyleOptionMenuItem.StyleOptionVersion' - - class StyleOptionType(int): ... - Type = ... # type: 'QStyleOptionMenuItem.StyleOptionType' - - checkType = ... # type: 'QStyleOptionMenuItem.CheckType' - checked = ... # type: bool - font = ... # type: QtGui.QFont - icon = ... # type: QtGui.QIcon - maxIconWidth = ... # type: int - menuHasCheckableItems = ... # type: bool - menuItemType = ... # type: 'QStyleOptionMenuItem.MenuItemType' - menuRect = ... # type: QtCore.QRect - tabWidth = ... # type: int - text = ... # type: str - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, other: 'QStyleOptionMenuItem') -> None: ... - - -class QStyleOptionDockWidget(QStyleOption): - - class StyleOptionVersion(int): ... - Version = ... # type: 'QStyleOptionDockWidget.StyleOptionVersion' - - class StyleOptionType(int): ... - Type = ... # type: 'QStyleOptionDockWidget.StyleOptionType' - - closable = ... # type: bool - floatable = ... # type: bool - movable = ... # type: bool - title = ... # type: str - verticalTitleBar = ... # type: bool - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, other: 'QStyleOptionDockWidget') -> None: ... - - -class QStyleOptionViewItem(QStyleOption): - - class ViewItemPosition(int): ... - Invalid = ... # type: 'QStyleOptionViewItem.ViewItemPosition' - Beginning = ... # type: 'QStyleOptionViewItem.ViewItemPosition' - Middle = ... # type: 'QStyleOptionViewItem.ViewItemPosition' - End = ... # type: 'QStyleOptionViewItem.ViewItemPosition' - OnlyOne = ... # type: 'QStyleOptionViewItem.ViewItemPosition' - - class ViewItemFeature(int): ... - None_ = ... # type: 'QStyleOptionViewItem.ViewItemFeature' - WrapText = ... # type: 'QStyleOptionViewItem.ViewItemFeature' - Alternate = ... # type: 'QStyleOptionViewItem.ViewItemFeature' - HasCheckIndicator = ... # type: 'QStyleOptionViewItem.ViewItemFeature' - HasDisplay = ... # type: 'QStyleOptionViewItem.ViewItemFeature' - HasDecoration = ... # type: 'QStyleOptionViewItem.ViewItemFeature' - - class Position(int): ... - Left = ... # type: 'QStyleOptionViewItem.Position' - Right = ... # type: 'QStyleOptionViewItem.Position' - Top = ... # type: 'QStyleOptionViewItem.Position' - Bottom = ... # type: 'QStyleOptionViewItem.Position' - - class StyleOptionVersion(int): ... - Version = ... # type: 'QStyleOptionViewItem.StyleOptionVersion' - - class StyleOptionType(int): ... - Type = ... # type: 'QStyleOptionViewItem.StyleOptionType' - - class ViewItemFeatures(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QStyleOptionViewItem.ViewItemFeatures', 'QStyleOptionViewItem.ViewItemFeature']) -> None: ... - @typing.overload - def __init__(self, a0: 'QStyleOptionViewItem.ViewItemFeatures') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QStyleOptionViewItem.ViewItemFeatures': ... - def __int__(self) -> int: ... - - backgroundBrush = ... # type: typing.Union[QtGui.QBrush, QtGui.QColor, QtCore.Qt.GlobalColor, QtGui.QGradient] - checkState = ... # type: QtCore.Qt.CheckState - decorationAlignment = ... # type: typing.Union[QtCore.Qt.Alignment, QtCore.Qt.AlignmentFlag] - decorationPosition = ... # type: 'QStyleOptionViewItem.Position' - decorationSize = ... # type: QtCore.QSize - displayAlignment = ... # type: typing.Union[QtCore.Qt.Alignment, QtCore.Qt.AlignmentFlag] - features = ... # type: typing.Union['QStyleOptionViewItem.ViewItemFeatures', 'QStyleOptionViewItem.ViewItemFeature'] - font = ... # type: QtGui.QFont - icon = ... # type: QtGui.QIcon - index = ... # type: QtCore.QModelIndex - locale = ... # type: QtCore.QLocale - showDecorationSelected = ... # type: bool - text = ... # type: str - textElideMode = ... # type: QtCore.Qt.TextElideMode - viewItemPosition = ... # type: 'QStyleOptionViewItem.ViewItemPosition' - widget = ... # type: QWidget - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, other: 'QStyleOptionViewItem') -> None: ... - - -class QStyleOptionToolBox(QStyleOption): - - class SelectedPosition(int): ... - NotAdjacent = ... # type: 'QStyleOptionToolBox.SelectedPosition' - NextIsSelected = ... # type: 'QStyleOptionToolBox.SelectedPosition' - PreviousIsSelected = ... # type: 'QStyleOptionToolBox.SelectedPosition' - - class TabPosition(int): ... - Beginning = ... # type: 'QStyleOptionToolBox.TabPosition' - Middle = ... # type: 'QStyleOptionToolBox.TabPosition' - End = ... # type: 'QStyleOptionToolBox.TabPosition' - OnlyOneTab = ... # type: 'QStyleOptionToolBox.TabPosition' - - class StyleOptionVersion(int): ... - Version = ... # type: 'QStyleOptionToolBox.StyleOptionVersion' - - class StyleOptionType(int): ... - Type = ... # type: 'QStyleOptionToolBox.StyleOptionType' - - icon = ... # type: QtGui.QIcon - position = ... # type: 'QStyleOptionToolBox.TabPosition' - selectedPosition = ... # type: 'QStyleOptionToolBox.SelectedPosition' - text = ... # type: str - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, other: 'QStyleOptionToolBox') -> None: ... - - -class QStyleOptionRubberBand(QStyleOption): - - class StyleOptionVersion(int): ... - Version = ... # type: 'QStyleOptionRubberBand.StyleOptionVersion' - - class StyleOptionType(int): ... - Type = ... # type: 'QStyleOptionRubberBand.StyleOptionType' - - opaque = ... # type: bool - shape = ... # type: QRubberBand.Shape - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, other: 'QStyleOptionRubberBand') -> None: ... - - -class QStyleOptionComplex(QStyleOption): - - class StyleOptionVersion(int): ... - Version = ... # type: 'QStyleOptionComplex.StyleOptionVersion' - - class StyleOptionType(int): ... - Type = ... # type: 'QStyleOptionComplex.StyleOptionType' - - activeSubControls = ... # type: typing.Union[QStyle.SubControls, QStyle.SubControl] - subControls = ... # type: typing.Union[QStyle.SubControls, QStyle.SubControl] - - @typing.overload - def __init__(self, version: int = ..., type: int = ...) -> None: ... - @typing.overload - def __init__(self, other: 'QStyleOptionComplex') -> None: ... - - -class QStyleOptionSlider(QStyleOptionComplex): - - class StyleOptionVersion(int): ... - Version = ... # type: 'QStyleOptionSlider.StyleOptionVersion' - - class StyleOptionType(int): ... - Type = ... # type: 'QStyleOptionSlider.StyleOptionType' - - dialWrapping = ... # type: bool - maximum = ... # type: int - minimum = ... # type: int - notchTarget = ... # type: float - orientation = ... # type: QtCore.Qt.Orientation - pageStep = ... # type: int - singleStep = ... # type: int - sliderPosition = ... # type: int - sliderValue = ... # type: int - tickInterval = ... # type: int - tickPosition = ... # type: QSlider.TickPosition - upsideDown = ... # type: bool - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, other: 'QStyleOptionSlider') -> None: ... - - -class QStyleOptionSpinBox(QStyleOptionComplex): - - class StyleOptionVersion(int): ... - Version = ... # type: 'QStyleOptionSpinBox.StyleOptionVersion' - - class StyleOptionType(int): ... - Type = ... # type: 'QStyleOptionSpinBox.StyleOptionType' - - buttonSymbols = ... # type: QAbstractSpinBox.ButtonSymbols - frame = ... # type: bool - stepEnabled = ... # type: typing.Union[QAbstractSpinBox.StepEnabled, QAbstractSpinBox.StepEnabledFlag] - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, other: 'QStyleOptionSpinBox') -> None: ... - - -class QStyleOptionToolButton(QStyleOptionComplex): - - class ToolButtonFeature(int): ... - None_ = ... # type: 'QStyleOptionToolButton.ToolButtonFeature' - Arrow = ... # type: 'QStyleOptionToolButton.ToolButtonFeature' - Menu = ... # type: 'QStyleOptionToolButton.ToolButtonFeature' - PopupDelay = ... # type: 'QStyleOptionToolButton.ToolButtonFeature' - MenuButtonPopup = ... # type: 'QStyleOptionToolButton.ToolButtonFeature' - HasMenu = ... # type: 'QStyleOptionToolButton.ToolButtonFeature' - - class StyleOptionVersion(int): ... - Version = ... # type: 'QStyleOptionToolButton.StyleOptionVersion' - - class StyleOptionType(int): ... - Type = ... # type: 'QStyleOptionToolButton.StyleOptionType' - - class ToolButtonFeatures(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QStyleOptionToolButton.ToolButtonFeatures', 'QStyleOptionToolButton.ToolButtonFeature']) -> None: ... - @typing.overload - def __init__(self, a0: 'QStyleOptionToolButton.ToolButtonFeatures') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QStyleOptionToolButton.ToolButtonFeatures': ... - def __int__(self) -> int: ... - - arrowType = ... # type: QtCore.Qt.ArrowType - features = ... # type: typing.Union['QStyleOptionToolButton.ToolButtonFeatures', 'QStyleOptionToolButton.ToolButtonFeature'] - font = ... # type: QtGui.QFont - icon = ... # type: QtGui.QIcon - iconSize = ... # type: QtCore.QSize - pos = ... # type: QtCore.QPoint - text = ... # type: str - toolButtonStyle = ... # type: QtCore.Qt.ToolButtonStyle - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, other: 'QStyleOptionToolButton') -> None: ... - - -class QStyleOptionComboBox(QStyleOptionComplex): - - class StyleOptionVersion(int): ... - Version = ... # type: 'QStyleOptionComboBox.StyleOptionVersion' - - class StyleOptionType(int): ... - Type = ... # type: 'QStyleOptionComboBox.StyleOptionType' - - currentIcon = ... # type: QtGui.QIcon - currentText = ... # type: str - editable = ... # type: bool - frame = ... # type: bool - iconSize = ... # type: QtCore.QSize - popupRect = ... # type: QtCore.QRect - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, other: 'QStyleOptionComboBox') -> None: ... - - -class QStyleOptionTitleBar(QStyleOptionComplex): - - class StyleOptionVersion(int): ... - Version = ... # type: 'QStyleOptionTitleBar.StyleOptionVersion' - - class StyleOptionType(int): ... - Type = ... # type: 'QStyleOptionTitleBar.StyleOptionType' - - icon = ... # type: QtGui.QIcon - text = ... # type: str - titleBarFlags = ... # type: typing.Union[QtCore.Qt.WindowFlags, QtCore.Qt.WindowType] - titleBarState = ... # type: int - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, other: 'QStyleOptionTitleBar') -> None: ... - - -class QStyleHintReturn(sip.simplewrapper): - - class StyleOptionVersion(int): ... - Version = ... # type: 'QStyleHintReturn.StyleOptionVersion' - - class StyleOptionType(int): ... - Type = ... # type: 'QStyleHintReturn.StyleOptionType' - - class HintReturnType(int): ... - SH_Default = ... # type: 'QStyleHintReturn.HintReturnType' - SH_Mask = ... # type: 'QStyleHintReturn.HintReturnType' - SH_Variant = ... # type: 'QStyleHintReturn.HintReturnType' - - type = ... # type: int - version = ... # type: int - - @typing.overload - def __init__(self, version: int = ..., type: int = ...) -> None: ... - @typing.overload - def __init__(self, a0: 'QStyleHintReturn') -> None: ... - - -class QStyleHintReturnMask(QStyleHintReturn): - - class StyleOptionVersion(int): ... - Version = ... # type: 'QStyleHintReturnMask.StyleOptionVersion' - - class StyleOptionType(int): ... - Type = ... # type: 'QStyleHintReturnMask.StyleOptionType' - - region = ... # type: QtGui.QRegion - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QStyleHintReturnMask') -> None: ... - - -class QStyleOptionToolBar(QStyleOption): - - class ToolBarFeature(int): ... - None_ = ... # type: 'QStyleOptionToolBar.ToolBarFeature' - Movable = ... # type: 'QStyleOptionToolBar.ToolBarFeature' - - class ToolBarPosition(int): ... - Beginning = ... # type: 'QStyleOptionToolBar.ToolBarPosition' - Middle = ... # type: 'QStyleOptionToolBar.ToolBarPosition' - End = ... # type: 'QStyleOptionToolBar.ToolBarPosition' - OnlyOne = ... # type: 'QStyleOptionToolBar.ToolBarPosition' - - class StyleOptionVersion(int): ... - Version = ... # type: 'QStyleOptionToolBar.StyleOptionVersion' - - class StyleOptionType(int): ... - Type = ... # type: 'QStyleOptionToolBar.StyleOptionType' - - class ToolBarFeatures(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QStyleOptionToolBar.ToolBarFeatures', 'QStyleOptionToolBar.ToolBarFeature']) -> None: ... - @typing.overload - def __init__(self, a0: 'QStyleOptionToolBar.ToolBarFeatures') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QStyleOptionToolBar.ToolBarFeatures': ... - def __int__(self) -> int: ... - - features = ... # type: typing.Union['QStyleOptionToolBar.ToolBarFeatures', 'QStyleOptionToolBar.ToolBarFeature'] - lineWidth = ... # type: int - midLineWidth = ... # type: int - positionOfLine = ... # type: 'QStyleOptionToolBar.ToolBarPosition' - positionWithinLine = ... # type: 'QStyleOptionToolBar.ToolBarPosition' - toolBarArea = ... # type: QtCore.Qt.ToolBarArea - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, other: 'QStyleOptionToolBar') -> None: ... - - -class QStyleOptionGroupBox(QStyleOptionComplex): - - class StyleOptionVersion(int): ... - Version = ... # type: 'QStyleOptionGroupBox.StyleOptionVersion' - - class StyleOptionType(int): ... - Type = ... # type: 'QStyleOptionGroupBox.StyleOptionType' - - features = ... # type: typing.Union[QStyleOptionFrame.FrameFeatures, QStyleOptionFrame.FrameFeature] - lineWidth = ... # type: int - midLineWidth = ... # type: int - text = ... # type: str - textAlignment = ... # type: typing.Union[QtCore.Qt.Alignment, QtCore.Qt.AlignmentFlag] - textColor = ... # type: typing.Union[QtGui.QColor, QtCore.Qt.GlobalColor, QtGui.QGradient] - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, other: 'QStyleOptionGroupBox') -> None: ... - - -class QStyleOptionSizeGrip(QStyleOptionComplex): - - class StyleOptionVersion(int): ... - Version = ... # type: 'QStyleOptionSizeGrip.StyleOptionVersion' - - class StyleOptionType(int): ... - Type = ... # type: 'QStyleOptionSizeGrip.StyleOptionType' - - corner = ... # type: QtCore.Qt.Corner - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, other: 'QStyleOptionSizeGrip') -> None: ... - - -class QStyleOptionGraphicsItem(QStyleOption): - - class StyleOptionVersion(int): ... - Version = ... # type: 'QStyleOptionGraphicsItem.StyleOptionVersion' - - class StyleOptionType(int): ... - Type = ... # type: 'QStyleOptionGraphicsItem.StyleOptionType' - - exposedRect = ... # type: QtCore.QRectF - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, other: 'QStyleOptionGraphicsItem') -> None: ... - - @staticmethod - def levelOfDetailFromTransform(worldTransform: QtGui.QTransform) -> float: ... - - -class QStyleHintReturnVariant(QStyleHintReturn): - - class StyleOptionVersion(int): ... - Version = ... # type: 'QStyleHintReturnVariant.StyleOptionVersion' - - class StyleOptionType(int): ... - Type = ... # type: 'QStyleHintReturnVariant.StyleOptionType' - - variant = ... # type: typing.Any - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QStyleHintReturnVariant') -> None: ... - - -class QStylePainter(QtGui.QPainter): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, w: QWidget) -> None: ... - @typing.overload - def __init__(self, pd: QtGui.QPaintDevice, w: QWidget) -> None: ... - - def drawItemPixmap(self, r: QtCore.QRect, flags: int, pixmap: QtGui.QPixmap) -> None: ... - def drawItemText(self, rect: QtCore.QRect, flags: int, pal: QtGui.QPalette, enabled: bool, text: str, textRole: QtGui.QPalette.ColorRole = ...) -> None: ... - def drawComplexControl(self, cc: QStyle.ComplexControl, opt: QStyleOptionComplex) -> None: ... - def drawControl(self, ce: QStyle.ControlElement, opt: QStyleOption) -> None: ... - def drawPrimitive(self, pe: QStyle.PrimitiveElement, opt: QStyleOption) -> None: ... - def style(self) -> QStyle: ... - # @typing.overload - # def begin(self, w: QWidget) -> bool: ... - # @typing.overload - # def begin(self, pd: QtGui.QPaintDevice, w: QWidget) -> bool: ... - - -class QSystemTrayIcon(QtCore.QObject): - - class MessageIcon(int): ... - NoIcon = ... # type: 'QSystemTrayIcon.MessageIcon' - Information = ... # type: 'QSystemTrayIcon.MessageIcon' - Warning = ... # type: 'QSystemTrayIcon.MessageIcon' - Critical = ... # type: 'QSystemTrayIcon.MessageIcon' - - class ActivationReason(int): ... - Unknown = ... # type: 'QSystemTrayIcon.ActivationReason' - Context = ... # type: 'QSystemTrayIcon.ActivationReason' - DoubleClick = ... # type: 'QSystemTrayIcon.ActivationReason' - Trigger = ... # type: 'QSystemTrayIcon.ActivationReason' - MiddleClick = ... # type: 'QSystemTrayIcon.ActivationReason' - - @typing.overload - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - @typing.overload - def __init__(self, icon: QtGui.QIcon, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def event(self, event: QtCore.QEvent) -> bool: ... - def messageClicked(self) -> None: ... - def activated(self, reason: 'QSystemTrayIcon.ActivationReason') -> None: ... - def show(self) -> None: ... - def setVisible(self, visible: bool) -> None: ... - def hide(self) -> None: ... - def isVisible(self) -> bool: ... - def showMessage(self, title: str, msg: str, icon: 'QSystemTrayIcon.MessageIcon' = ..., msecs: int = ...) -> None: ... - @staticmethod - def supportsMessages() -> bool: ... - @staticmethod - def isSystemTrayAvailable() -> bool: ... - def setToolTip(self, tip: str) -> None: ... - def toolTip(self) -> str: ... - def setIcon(self, icon: QtGui.QIcon) -> None: ... - def icon(self) -> QtGui.QIcon: ... - def geometry(self) -> QtCore.QRect: ... - def contextMenu(self) -> QMenu: ... - def setContextMenu(self, menu: QMenu) -> None: ... - - -class QTabBar(QWidget): - - class SelectionBehavior(int): ... - SelectLeftTab = ... # type: 'QTabBar.SelectionBehavior' - SelectRightTab = ... # type: 'QTabBar.SelectionBehavior' - SelectPreviousTab = ... # type: 'QTabBar.SelectionBehavior' - - class ButtonPosition(int): ... - LeftSide = ... # type: 'QTabBar.ButtonPosition' - RightSide = ... # type: 'QTabBar.ButtonPosition' - - class Shape(int): ... - RoundedNorth = ... # type: 'QTabBar.Shape' - RoundedSouth = ... # type: 'QTabBar.Shape' - RoundedWest = ... # type: 'QTabBar.Shape' - RoundedEast = ... # type: 'QTabBar.Shape' - TriangularNorth = ... # type: 'QTabBar.Shape' - TriangularSouth = ... # type: 'QTabBar.Shape' - TriangularWest = ... # type: 'QTabBar.Shape' - TriangularEast = ... # type: 'QTabBar.Shape' - - def __init__(self, parent: typing.Optional[QWidget] = ...) -> None: ... - - def timerEvent(self, event: QtCore.QTimerEvent) -> None: ... - def setChangeCurrentOnDrag(self, change: bool) -> None: ... - def changeCurrentOnDrag(self) -> bool: ... - def setAutoHide(self, hide: bool) -> None: ... - def autoHide(self) -> bool: ... - def tabBarDoubleClicked(self, index: int) -> None: ... - def tabBarClicked(self, index: int) -> None: ... - def minimumTabSizeHint(self, index: int) -> QtCore.QSize: ... - def wheelEvent(self, event: QtGui.QWheelEvent) -> None: ... - def hideEvent(self, a0: QtGui.QHideEvent) -> None: ... - def tabMoved(self, from_: int, to: int) -> None: ... - def tabCloseRequested(self, index: int) -> None: ... - def setDocumentMode(self, set: bool) -> None: ... - def documentMode(self) -> bool: ... - def setMovable(self, movable: bool) -> None: ... - def isMovable(self) -> bool: ... - def setExpanding(self, enabled: bool) -> None: ... - def expanding(self) -> bool: ... - def setSelectionBehaviorOnRemove(self, behavior: 'QTabBar.SelectionBehavior') -> None: ... - def selectionBehaviorOnRemove(self) -> 'QTabBar.SelectionBehavior': ... - def tabButton(self, index: int, position: 'QTabBar.ButtonPosition') -> QWidget: ... - def setTabButton(self, index: int, position: 'QTabBar.ButtonPosition', widget: QWidget) -> None: ... - def setTabsClosable(self, closable: bool) -> None: ... - def tabsClosable(self) -> bool: ... - def moveTab(self, from_: int, to: int) -> None: ... - def changeEvent(self, a0: QtCore.QEvent) -> None: ... - def keyPressEvent(self, a0: QtGui.QKeyEvent) -> None: ... - def mouseReleaseEvent(self, a0: QtGui.QMouseEvent) -> None: ... - def mouseMoveEvent(self, a0: QtGui.QMouseEvent) -> None: ... - def mousePressEvent(self, a0: QtGui.QMouseEvent) -> None: ... - def paintEvent(self, a0: QtGui.QPaintEvent) -> None: ... - def showEvent(self, a0: QtGui.QShowEvent) -> None: ... - def resizeEvent(self, a0: QtGui.QResizeEvent) -> None: ... - def event(self, a0: QtCore.QEvent) -> bool: ... - def tabLayoutChange(self) -> None: ... - def tabRemoved(self, index: int) -> None: ... - def tabInserted(self, index: int) -> None: ... - def tabSizeHint(self, index: int) -> QtCore.QSize: ... - def initStyleOption(self, option: QStyleOptionTab, tabIndex: int) -> None: ... - def currentChanged(self, index: int) -> None: ... - def setCurrentIndex(self, index: int) -> None: ... - def usesScrollButtons(self) -> bool: ... - def setUsesScrollButtons(self, useButtons: bool) -> None: ... - def setElideMode(self, a0: QtCore.Qt.TextElideMode) -> None: ... - def elideMode(self) -> QtCore.Qt.TextElideMode: ... - def setIconSize(self, size: QtCore.QSize) -> None: ... - def iconSize(self) -> QtCore.QSize: ... - def drawBase(self) -> bool: ... - def setDrawBase(self, drawTheBase: bool) -> None: ... - def minimumSizeHint(self) -> QtCore.QSize: ... - def sizeHint(self) -> QtCore.QSize: ... - def __len__(self) -> int: ... - def count(self) -> int: ... - def currentIndex(self) -> int: ... - def tabRect(self, index: int) -> QtCore.QRect: ... - def tabAt(self, pos: QtCore.QPoint) -> int: ... - def tabData(self, index: int) -> typing.Any: ... - def setTabData(self, index: int, data: typing.Any) -> None: ... - def tabWhatsThis(self, index: int) -> str: ... - def setTabWhatsThis(self, index: int, text: str) -> None: ... - def tabToolTip(self, index: int) -> str: ... - def setTabToolTip(self, index: int, tip: str) -> None: ... - def setTabIcon(self, index: int, icon: QtGui.QIcon) -> None: ... - def tabIcon(self, index: int) -> QtGui.QIcon: ... - def setTabTextColor(self, index: int, color: typing.Union[QtGui.QColor, QtCore.Qt.GlobalColor, QtGui.QGradient]) -> None: ... - def tabTextColor(self, index: int) -> QtGui.QColor: ... - def setTabText(self, index: int, text: str) -> None: ... - def tabText(self, index: int) -> str: ... - def setTabEnabled(self, index: int, a1: bool) -> None: ... - def isTabEnabled(self, index: int) -> bool: ... - def removeTab(self, index: int) -> None: ... - @typing.overload - def insertTab(self, index: int, text: str) -> int: ... - @typing.overload - def insertTab(self, index: int, icon: QtGui.QIcon, text: str) -> int: ... - @typing.overload - def addTab(self, text: str) -> int: ... - @typing.overload - def addTab(self, icon: QtGui.QIcon, text: str) -> int: ... - def setShape(self, shape: 'QTabBar.Shape') -> None: ... - def shape(self) -> 'QTabBar.Shape': ... - - -class QTableView(QAbstractItemView): - - def __init__(self, parent: typing.Optional[QWidget] = ...) -> None: ... - - def currentChanged(self, current: QtCore.QModelIndex, previous: QtCore.QModelIndex) -> None: ... - def selectionChanged(self, selected: QtCore.QItemSelection, deselected: QtCore.QItemSelection) -> None: ... - def clearSpans(self) -> None: ... - def isCornerButtonEnabled(self) -> bool: ... - def setCornerButtonEnabled(self, enable: bool) -> None: ... - def wordWrap(self) -> bool: ... - def setWordWrap(self, on: bool) -> None: ... - def sortByColumn(self, column: int, order: QtCore.Qt.SortOrder) -> None: ... - def columnSpan(self, row: int, column: int) -> int: ... - def rowSpan(self, row: int, column: int) -> int: ... - def setSpan(self, row: int, column: int, rowSpan: int, columnSpan: int) -> None: ... - def isSortingEnabled(self) -> bool: ... - def setSortingEnabled(self, enable: bool) -> None: ... - def viewportSizeHint(self) -> QtCore.QSize: ... - def isIndexHidden(self, index: QtCore.QModelIndex) -> bool: ... - def horizontalScrollbarAction(self, action: int) -> None: ... - def verticalScrollbarAction(self, action: int) -> None: ... - def sizeHintForColumn(self, column: int) -> int: ... - def sizeHintForRow(self, row: int) -> int: ... - def updateGeometries(self) -> None: ... - def selectedIndexes(self) -> typing.Any: ... - def visualRegionForSelection(self, selection: QtCore.QItemSelection) -> QtGui.QRegion: ... - def setSelection(self, rect: QtCore.QRect, command: typing.Union[QtCore.QItemSelectionModel.SelectionFlags, QtCore.QItemSelectionModel.SelectionFlag]) -> None: ... - def moveCursor(self, cursorAction: QAbstractItemView.CursorAction, modifiers: typing.Union[QtCore.Qt.KeyboardModifiers, QtCore.Qt.KeyboardModifier]) -> QtCore.QModelIndex: ... - def verticalOffset(self) -> int: ... - def horizontalOffset(self) -> int: ... - def timerEvent(self, event: QtCore.QTimerEvent) -> None: ... - def paintEvent(self, e: QtGui.QPaintEvent) -> None: ... - def viewOptions(self) -> QStyleOptionViewItem: ... - def scrollContentsBy(self, dx: int, dy: int) -> None: ... - def columnCountChanged(self, oldCount: int, newCount: int) -> None: ... - def rowCountChanged(self, oldCount: int, newCount: int) -> None: ... - def columnResized(self, column: int, oldWidth: int, newWidth: int) -> None: ... - def rowResized(self, row: int, oldHeight: int, newHeight: int) -> None: ... - def columnMoved(self, column: int, oldIndex: int, newIndex: int) -> None: ... - def rowMoved(self, row: int, oldIndex: int, newIndex: int) -> None: ... - def resizeColumnsToContents(self) -> None: ... - def resizeColumnToContents(self, column: int) -> None: ... - def resizeRowsToContents(self) -> None: ... - def resizeRowToContents(self, row: int) -> None: ... - def showColumn(self, column: int) -> None: ... - def showRow(self, row: int) -> None: ... - def hideColumn(self, column: int) -> None: ... - def hideRow(self, row: int) -> None: ... - def selectColumn(self, column: int) -> None: ... - def selectRow(self, row: int) -> None: ... - def indexAt(self, p: QtCore.QPoint) -> QtCore.QModelIndex: ... - def scrollTo(self, index: QtCore.QModelIndex, hint: QAbstractItemView.ScrollHint = ...) -> None: ... - def visualRect(self, index: QtCore.QModelIndex) -> QtCore.QRect: ... - def setGridStyle(self, style: QtCore.Qt.PenStyle) -> None: ... - def gridStyle(self) -> QtCore.Qt.PenStyle: ... - def setShowGrid(self, show: bool) -> None: ... - def showGrid(self) -> bool: ... - def setColumnHidden(self, column: int, hide: bool) -> None: ... - def isColumnHidden(self, column: int) -> bool: ... - def setRowHidden(self, row: int, hide: bool) -> None: ... - def isRowHidden(self, row: int) -> bool: ... - def columnAt(self, x: int) -> int: ... - def columnWidth(self, column: int) -> int: ... - def setColumnWidth(self, column: int, width: int) -> None: ... - def columnViewportPosition(self, column: int) -> int: ... - def rowAt(self, y: int) -> int: ... - def rowHeight(self, row: int) -> int: ... - def setRowHeight(self, row: int, height: int) -> None: ... - def rowViewportPosition(self, row: int) -> int: ... - def setVerticalHeader(self, header: QHeaderView) -> None: ... - def setHorizontalHeader(self, header: QHeaderView) -> None: ... - def verticalHeader(self) -> QHeaderView: ... - def horizontalHeader(self) -> QHeaderView: ... - def setSelectionModel(self, selectionModel: QtCore.QItemSelectionModel) -> None: ... - def setRootIndex(self, index: QtCore.QModelIndex) -> None: ... - def setModel(self, model: QtCore.QAbstractItemModel) -> None: ... - - -class QTableWidgetSelectionRange(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, top: int, left: int, bottom: int, right: int) -> None: ... - @typing.overload - def __init__(self, other: 'QTableWidgetSelectionRange') -> None: ... - - def columnCount(self) -> int: ... - def rowCount(self) -> int: ... - def rightColumn(self) -> int: ... - def leftColumn(self) -> int: ... - def bottomRow(self) -> int: ... - def topRow(self) -> int: ... - - -class QTableWidgetItem(sip.wrapper): - - class ItemType(int): ... - Type = ... # type: 'QTableWidgetItem.ItemType' - UserType = ... # type: 'QTableWidgetItem.ItemType' - - @typing.overload - def __init__(self, type: int = ...) -> None: ... - @typing.overload - def __init__(self, text: str, type: int = ...) -> None: ... - @typing.overload - def __init__(self, icon: QtGui.QIcon, text: str, type: int = ...) -> None: ... - @typing.overload - def __init__(self, other: 'QTableWidgetItem') -> None: ... - - def isSelected(self) -> bool: ... - def setSelected(self, aselect: bool) -> None: ... - def column(self) -> int: ... - def row(self) -> int: ... - def setForeground(self, brush: typing.Union[QtGui.QBrush, QtGui.QColor, QtCore.Qt.GlobalColor, QtGui.QGradient]) -> None: ... - def foreground(self) -> QtGui.QBrush: ... - def setBackground(self, brush: typing.Union[QtGui.QBrush, QtGui.QColor, QtCore.Qt.GlobalColor, QtGui.QGradient]) -> None: ... - def background(self) -> QtGui.QBrush: ... - def setSizeHint(self, size: QtCore.QSize) -> None: ... - def sizeHint(self) -> QtCore.QSize: ... - def setFont(self, afont: QtGui.QFont) -> None: ... - def setWhatsThis(self, awhatsThis: str) -> None: ... - def setToolTip(self, atoolTip: str) -> None: ... - def setStatusTip(self, astatusTip: str) -> None: ... - def setIcon(self, aicon: QtGui.QIcon) -> None: ... - def setText(self, atext: str) -> None: ... - def setFlags(self, aflags: typing.Union[QtCore.Qt.ItemFlags, QtCore.Qt.ItemFlag]) -> None: ... - def type(self) -> int: ... - def write(self, out: QtCore.QDataStream) -> None: ... - def read(self, in_: QtCore.QDataStream) -> None: ... - def setData(self, role: int, value: typing.Any) -> None: ... - def data(self, role: int) -> typing.Any: ... - def setCheckState(self, state: QtCore.Qt.CheckState) -> None: ... - def checkState(self) -> QtCore.Qt.CheckState: ... - def setTextAlignment(self, alignment: int) -> None: ... - def textAlignment(self) -> int: ... - def font(self) -> QtGui.QFont: ... - def whatsThis(self) -> str: ... - def toolTip(self) -> str: ... - def statusTip(self) -> str: ... - def icon(self) -> QtGui.QIcon: ... - def text(self) -> str: ... - def flags(self) -> QtCore.Qt.ItemFlags: ... - def tableWidget(self) -> 'QTableWidget': ... - def clone(self) -> 'QTableWidgetItem': ... - - -class QTableWidget(QTableView): - - @typing.overload - def __init__(self, parent: typing.Optional[QWidget] = ...) -> None: ... - @typing.overload - def __init__(self, rows: int, columns: int, parent: typing.Optional[QWidget] = ...) -> None: ... - - def dropEvent(self, event: QtGui.QDropEvent) -> None: ... - def event(self, e: QtCore.QEvent) -> bool: ... - def itemFromIndex(self, index: QtCore.QModelIndex) -> QTableWidgetItem: ... - def indexFromItem(self, item: QTableWidgetItem) -> QtCore.QModelIndex: ... - def items(self, data: QtCore.QMimeData) -> typing.List[QTableWidgetItem]: ... - def supportedDropActions(self) -> QtCore.Qt.DropActions: ... - def dropMimeData(self, row: int, column: int, data: QtCore.QMimeData, action: QtCore.Qt.DropAction) -> bool: ... - def mimeData(self, items: typing.Iterable[QTableWidgetItem]) -> QtCore.QMimeData: ... - def mimeTypes(self) -> typing.List[str]: ... - def currentCellChanged(self, currentRow: int, currentColumn: int, previousRow: int, previousColumn: int) -> None: ... - def cellChanged(self, row: int, column: int) -> None: ... - def cellEntered(self, row: int, column: int) -> None: ... - def cellActivated(self, row: int, column: int) -> None: ... - def cellDoubleClicked(self, row: int, column: int) -> None: ... - def cellClicked(self, row: int, column: int) -> None: ... - def cellPressed(self, row: int, column: int) -> None: ... - def itemSelectionChanged(self) -> None: ... - def currentItemChanged(self, current: QTableWidgetItem, previous: QTableWidgetItem) -> None: ... - def itemChanged(self, item: QTableWidgetItem) -> None: ... - def itemEntered(self, item: QTableWidgetItem) -> None: ... - def itemActivated(self, item: QTableWidgetItem) -> None: ... - def itemDoubleClicked(self, item: QTableWidgetItem) -> None: ... - def itemClicked(self, item: QTableWidgetItem) -> None: ... - def itemPressed(self, item: QTableWidgetItem) -> None: ... - def clearContents(self) -> None: ... - def clear(self) -> None: ... - def removeColumn(self, column: int) -> None: ... - def removeRow(self, row: int) -> None: ... - def insertColumn(self, column: int) -> None: ... - def insertRow(self, row: int) -> None: ... - def scrollToItem(self, item: QTableWidgetItem, hint: QAbstractItemView.ScrollHint = ...) -> None: ... - def setItemPrototype(self, item: QTableWidgetItem) -> None: ... - def itemPrototype(self) -> QTableWidgetItem: ... - def visualItemRect(self, item: QTableWidgetItem) -> QtCore.QRect: ... - @typing.overload - def itemAt(self, p: QtCore.QPoint) -> QTableWidgetItem: ... - @typing.overload - def itemAt(self, ax: int, ay: int) -> QTableWidgetItem: ... - def visualColumn(self, logicalColumn: int) -> int: ... - def visualRow(self, logicalRow: int) -> int: ... - def findItems(self, text: str, flags: typing.Union[QtCore.Qt.MatchFlags, QtCore.Qt.MatchFlag]) -> typing.List[QTableWidgetItem]: ... - def selectedItems(self) -> typing.Any: ... - def selectedRanges(self) -> typing.Any: ... - def setRangeSelected(self, range: QTableWidgetSelectionRange, select: bool) -> None: ... - def removeCellWidget(self, arow: int, acolumn: int) -> None: ... - def setCellWidget(self, row: int, column: int, widget: QWidget) -> None: ... - def cellWidget(self, row: int, column: int) -> QWidget: ... - # def closePersistentEditor(self, item: QTableWidgetItem) -> None: ... - # def openPersistentEditor(self, item: QTableWidgetItem) -> None: ... - def editItem(self, item: QTableWidgetItem) -> None: ... - def isSortingEnabled(self) -> bool: ... - def setSortingEnabled(self, enable: bool) -> None: ... - def sortItems(self, column: int, order: QtCore.Qt.SortOrder = ...) -> None: ... - @typing.overload - def setCurrentCell(self, row: int, column: int) -> None: ... - @typing.overload - def setCurrentCell(self, row: int, column: int, command: typing.Union[QtCore.QItemSelectionModel.SelectionFlags, QtCore.QItemSelectionModel.SelectionFlag]) -> None: ... - @typing.overload - def setCurrentItem(self, item: QTableWidgetItem) -> None: ... - @typing.overload - def setCurrentItem(self, item: QTableWidgetItem, command: typing.Union[QtCore.QItemSelectionModel.SelectionFlags, QtCore.QItemSelectionModel.SelectionFlag]) -> None: ... - def currentItem(self) -> QTableWidgetItem: ... - def currentColumn(self) -> int: ... - def currentRow(self) -> int: ... - def setHorizontalHeaderLabels(self, labels: typing.Iterable[str]) -> None: ... - def setVerticalHeaderLabels(self, labels: typing.Iterable[str]) -> None: ... - def takeHorizontalHeaderItem(self, column: int) -> QTableWidgetItem: ... - def setHorizontalHeaderItem(self, column: int, item: QTableWidgetItem) -> None: ... - def horizontalHeaderItem(self, column: int) -> QTableWidgetItem: ... - def takeVerticalHeaderItem(self, row: int) -> QTableWidgetItem: ... - def setVerticalHeaderItem(self, row: int, item: QTableWidgetItem) -> None: ... - def verticalHeaderItem(self, row: int) -> QTableWidgetItem: ... - def takeItem(self, row: int, column: int) -> QTableWidgetItem: ... - def setItem(self, row: int, column: int, item: QTableWidgetItem) -> None: ... - def item(self, row: int, column: int) -> QTableWidgetItem: ... - def column(self, item: QTableWidgetItem) -> int: ... - def row(self, item: QTableWidgetItem) -> int: ... - def columnCount(self) -> int: ... - def setColumnCount(self, columns: int) -> None: ... - def rowCount(self) -> int: ... - def setRowCount(self, rows: int) -> None: ... - - -class QTabWidget(QWidget): - - class TabShape(int): ... - Rounded = ... # type: 'QTabWidget.TabShape' - Triangular = ... # type: 'QTabWidget.TabShape' - - class TabPosition(int): ... - North = ... # type: 'QTabWidget.TabPosition' - South = ... # type: 'QTabWidget.TabPosition' - West = ... # type: 'QTabWidget.TabPosition' - East = ... # type: 'QTabWidget.TabPosition' - - def __init__(self, parent: typing.Optional[QWidget] = ...) -> None: ... - - def setTabBarAutoHide(self, enabled: bool) -> None: ... - def tabBarAutoHide(self) -> bool: ... - def tabBarDoubleClicked(self, index: int) -> None: ... - def tabBarClicked(self, index: int) -> None: ... - def hasHeightForWidth(self) -> bool: ... - def heightForWidth(self, width: int) -> int: ... - def tabCloseRequested(self, index: int) -> None: ... - def setDocumentMode(self, set: bool) -> None: ... - def documentMode(self) -> bool: ... - def setMovable(self, movable: bool) -> None: ... - def isMovable(self) -> bool: ... - def setTabsClosable(self, closeable: bool) -> None: ... - def tabsClosable(self) -> bool: ... - def setUsesScrollButtons(self, useButtons: bool) -> None: ... - def usesScrollButtons(self) -> bool: ... - def setIconSize(self, size: QtCore.QSize) -> None: ... - def iconSize(self) -> QtCore.QSize: ... - def setElideMode(self, a0: QtCore.Qt.TextElideMode) -> None: ... - def elideMode(self) -> QtCore.Qt.TextElideMode: ... - def changeEvent(self, a0: QtCore.QEvent) -> None: ... - def tabBar(self) -> QTabBar: ... - def setTabBar(self, a0: QTabBar) -> None: ... - def paintEvent(self, a0: QtGui.QPaintEvent) -> None: ... - def keyPressEvent(self, a0: QtGui.QKeyEvent) -> None: ... - def resizeEvent(self, a0: QtGui.QResizeEvent) -> None: ... - def showEvent(self, a0: QtGui.QShowEvent) -> None: ... - def event(self, a0: QtCore.QEvent) -> bool: ... - def tabRemoved(self, index: int) -> None: ... - def tabInserted(self, index: int) -> None: ... - def initStyleOption(self, option: QStyleOptionTabWidgetFrame) -> None: ... - def currentChanged(self, index: int) -> None: ... - def setCurrentWidget(self, widget: QWidget) -> None: ... - def setCurrentIndex(self, index: int) -> None: ... - def cornerWidget(self, corner: QtCore.Qt.Corner = ...) -> QWidget: ... - def setCornerWidget(self, widget: QWidget, corner: QtCore.Qt.Corner = ...) -> None: ... - def minimumSizeHint(self) -> QtCore.QSize: ... - def sizeHint(self) -> QtCore.QSize: ... - def setTabShape(self, s: 'QTabWidget.TabShape') -> None: ... - def tabShape(self) -> 'QTabWidget.TabShape': ... - def setTabPosition(self, a0: 'QTabWidget.TabPosition') -> None: ... - def tabPosition(self) -> 'QTabWidget.TabPosition': ... - def __len__(self) -> int: ... - def count(self) -> int: ... - def indexOf(self, widget: QWidget) -> int: ... - def widget(self, index: int) -> QWidget: ... - def currentWidget(self) -> QWidget: ... - def currentIndex(self) -> int: ... - def tabWhatsThis(self, index: int) -> str: ... - def setTabWhatsThis(self, index: int, text: str) -> None: ... - def tabToolTip(self, index: int) -> str: ... - def setTabToolTip(self, index: int, tip: str) -> None: ... - def setTabIcon(self, index: int, icon: QtGui.QIcon) -> None: ... - def tabIcon(self, index: int) -> QtGui.QIcon: ... - def setTabText(self, index: int, a1: str) -> None: ... - def tabText(self, index: int) -> str: ... - def setTabEnabled(self, index: int, a1: bool) -> None: ... - def isTabEnabled(self, index: int) -> bool: ... - def removeTab(self, index: int) -> None: ... - @typing.overload - def insertTab(self, index: int, widget: QWidget, a2: str) -> int: ... - @typing.overload - def insertTab(self, index: int, widget: QWidget, icon: QtGui.QIcon, label: str) -> int: ... - @typing.overload - def addTab(self, widget: QWidget, a1: str) -> int: ... - @typing.overload - def addTab(self, widget: QWidget, icon: QtGui.QIcon, label: str) -> int: ... - def clear(self) -> None: ... - - -class QTextEdit(QAbstractScrollArea): - - class AutoFormattingFlag(int): ... - AutoNone = ... # type: 'QTextEdit.AutoFormattingFlag' - AutoBulletList = ... # type: 'QTextEdit.AutoFormattingFlag' - AutoAll = ... # type: 'QTextEdit.AutoFormattingFlag' - - class LineWrapMode(int): ... - NoWrap = ... # type: 'QTextEdit.LineWrapMode' - WidgetWidth = ... # type: 'QTextEdit.LineWrapMode' - FixedPixelWidth = ... # type: 'QTextEdit.LineWrapMode' - FixedColumnWidth = ... # type: 'QTextEdit.LineWrapMode' - - class ExtraSelection(sip.simplewrapper): - - cursor = ... # type: QtGui.QTextCursor - format = ... # type: QtGui.QTextCharFormat - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QTextEdit.ExtraSelection') -> None: ... - - class AutoFormatting(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QTextEdit.AutoFormatting', 'QTextEdit.AutoFormattingFlag']) -> None: ... - @typing.overload - def __init__(self, a0: 'QTextEdit.AutoFormatting') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QTextEdit.AutoFormatting': ... - def __int__(self) -> int: ... - - @typing.overload - def __init__(self, parent: typing.Optional[QWidget] = ...) -> None: ... - @typing.overload - def __init__(self, text: str, parent: typing.Optional[QWidget] = ...) -> None: ... - - def placeholderText(self) -> str: ... - def setPlaceholderText(self, placeholderText: str) -> None: ... - def setTextBackgroundColor(self, c: typing.Union[QtGui.QColor, QtCore.Qt.GlobalColor, QtGui.QGradient]) -> None: ... - def textBackgroundColor(self) -> QtGui.QColor: ... - def scrollContentsBy(self, dx: int, dy: int) -> None: ... - @typing.overload - def inputMethodQuery(self, property: QtCore.Qt.InputMethodQuery) -> typing.Any: ... - @typing.overload - def inputMethodQuery(self, query: QtCore.Qt.InputMethodQuery, argument: typing.Any) -> typing.Any: ... - def inputMethodEvent(self, a0: QtGui.QInputMethodEvent) -> None: ... - def insertFromMimeData(self, source: QtCore.QMimeData) -> None: ... - def canInsertFromMimeData(self, source: QtCore.QMimeData) -> bool: ... - def createMimeDataFromSelection(self) -> QtCore.QMimeData: ... - def wheelEvent(self, e: QtGui.QWheelEvent) -> None: ... - def changeEvent(self, e: QtCore.QEvent) -> None: ... - def showEvent(self, a0: QtGui.QShowEvent) -> None: ... - def focusOutEvent(self, e: QtGui.QFocusEvent) -> None: ... - def focusInEvent(self, e: QtGui.QFocusEvent) -> None: ... - def dropEvent(self, e: QtGui.QDropEvent) -> None: ... - def dragMoveEvent(self, e: QtGui.QDragMoveEvent) -> None: ... - def dragLeaveEvent(self, e: QtGui.QDragLeaveEvent) -> None: ... - def dragEnterEvent(self, e: QtGui.QDragEnterEvent) -> None: ... - def contextMenuEvent(self, e: QtGui.QContextMenuEvent) -> None: ... - def focusNextPrevChild(self, next: bool) -> bool: ... - def mouseDoubleClickEvent(self, e: QtGui.QMouseEvent) -> None: ... - def mouseReleaseEvent(self, e: QtGui.QMouseEvent) -> None: ... - def mouseMoveEvent(self, e: QtGui.QMouseEvent) -> None: ... - def mousePressEvent(self, e: QtGui.QMouseEvent) -> None: ... - def paintEvent(self, e: QtGui.QPaintEvent) -> None: ... - def resizeEvent(self, a0: QtGui.QResizeEvent) -> None: ... - def keyReleaseEvent(self, e: QtGui.QKeyEvent) -> None: ... - def keyPressEvent(self, e: QtGui.QKeyEvent) -> None: ... - def timerEvent(self, e: QtCore.QTimerEvent) -> None: ... - def event(self, e: QtCore.QEvent) -> bool: ... - def cursorPositionChanged(self) -> None: ... - def selectionChanged(self) -> None: ... - def copyAvailable(self, b: bool) -> None: ... - def currentCharFormatChanged(self, format: QtGui.QTextCharFormat) -> None: ... - def redoAvailable(self, b: bool) -> None: ... - def undoAvailable(self, b: bool) -> None: ... - def textChanged(self) -> None: ... - def zoomOut(self, range: int = ...) -> None: ... - def zoomIn(self, range: int = ...) -> None: ... - def undo(self) -> None: ... - def redo(self) -> None: ... - def scrollToAnchor(self, name: str) -> None: ... - def insertHtml(self, text: str) -> None: ... - def insertPlainText(self, text: str) -> None: ... - def selectAll(self) -> None: ... - def clear(self) -> None: ... - def paste(self) -> None: ... - def copy(self) -> None: ... - def cut(self) -> None: ... - def setHtml(self, text: str) -> None: ... - def setPlainText(self, text: str) -> None: ... - def setAlignment(self, a: typing.Union[QtCore.Qt.Alignment, QtCore.Qt.AlignmentFlag]) -> None: ... - def setCurrentFont(self, f: QtGui.QFont) -> None: ... - def setTextColor(self, c: typing.Union[QtGui.QColor, QtCore.Qt.GlobalColor, QtGui.QGradient]) -> None: ... - def setText(self, text: str) -> None: ... - def setFontItalic(self, b: bool) -> None: ... - def setFontUnderline(self, b: bool) -> None: ... - def setFontWeight(self, w: int) -> None: ... - def setFontFamily(self, fontFamily: str) -> None: ... - def setFontPointSize(self, s: float) -> None: ... - def print(self, printer: QtGui.QPagedPaintDevice) -> None: ... - def print_(self, printer: QtGui.QPagedPaintDevice) -> None: ... - def moveCursor(self, operation: QtGui.QTextCursor.MoveOperation, mode: QtGui.QTextCursor.MoveMode = ...) -> None: ... - def canPaste(self) -> bool: ... - def extraSelections(self) -> typing.List['QTextEdit.ExtraSelection']: ... - def setExtraSelections(self, selections: typing.Iterable['QTextEdit.ExtraSelection']) -> None: ... - def cursorWidth(self) -> int: ... - def setCursorWidth(self, width: int) -> None: ... - def textInteractionFlags(self) -> QtCore.Qt.TextInteractionFlags: ... - def setTextInteractionFlags(self, flags: typing.Union[QtCore.Qt.TextInteractionFlags, QtCore.Qt.TextInteractionFlag]) -> None: ... - def setAcceptRichText(self, accept: bool) -> None: ... - def acceptRichText(self) -> bool: ... - def setTabStopWidth(self, width: int) -> None: ... - def tabStopWidth(self) -> int: ... - def setOverwriteMode(self, overwrite: bool) -> None: ... - def overwriteMode(self) -> bool: ... - def anchorAt(self, pos: QtCore.QPoint) -> str: ... - @typing.overload - def cursorRect(self, cursor: QtGui.QTextCursor) -> QtCore.QRect: ... - @typing.overload - def cursorRect(self) -> QtCore.QRect: ... - def cursorForPosition(self, pos: QtCore.QPoint) -> QtGui.QTextCursor: ... - @typing.overload - def createStandardContextMenu(self) -> QMenu: ... - @typing.overload - def createStandardContextMenu(self, position: QtCore.QPoint) -> QMenu: ... - def loadResource(self, type: int, name: QtCore.QUrl) -> typing.Any: ... - def ensureCursorVisible(self) -> None: ... - def append(self, text: str) -> None: ... - def toHtml(self) -> str: ... - def toPlainText(self) -> str: ... - @typing.overload - def find(self, exp: str, options: typing.Union[QtGui.QTextDocument.FindFlags, QtGui.QTextDocument.FindFlag] = ...) -> bool: ... - @typing.overload - def find(self, exp: QtCore.QRegExp, options: typing.Union[QtGui.QTextDocument.FindFlags, QtGui.QTextDocument.FindFlag] = ...) -> bool: ... - def setWordWrapMode(self, policy: QtGui.QTextOption.WrapMode) -> None: ... - def wordWrapMode(self) -> QtGui.QTextOption.WrapMode: ... - def setLineWrapColumnOrWidth(self, w: int) -> None: ... - def lineWrapColumnOrWidth(self) -> int: ... - def setLineWrapMode(self, mode: 'QTextEdit.LineWrapMode') -> None: ... - def lineWrapMode(self) -> 'QTextEdit.LineWrapMode': ... - def setUndoRedoEnabled(self, enable: bool) -> None: ... - def isUndoRedoEnabled(self) -> bool: ... - def documentTitle(self) -> str: ... - def setDocumentTitle(self, title: str) -> None: ... - def setTabChangesFocus(self, b: bool) -> None: ... - def tabChangesFocus(self) -> bool: ... - def setAutoFormatting(self, features: typing.Union['QTextEdit.AutoFormatting', 'QTextEdit.AutoFormattingFlag']) -> None: ... - def autoFormatting(self) -> 'QTextEdit.AutoFormatting': ... - def currentCharFormat(self) -> QtGui.QTextCharFormat: ... - def setCurrentCharFormat(self, format: QtGui.QTextCharFormat) -> None: ... - def mergeCurrentCharFormat(self, modifier: QtGui.QTextCharFormat) -> None: ... - def alignment(self) -> QtCore.Qt.Alignment: ... - def currentFont(self) -> QtGui.QFont: ... - def textColor(self) -> QtGui.QColor: ... - def fontItalic(self) -> bool: ... - def fontUnderline(self) -> bool: ... - def fontWeight(self) -> int: ... - def fontFamily(self) -> str: ... - def fontPointSize(self) -> float: ... - def setReadOnly(self, ro: bool) -> None: ... - def isReadOnly(self) -> bool: ... - def textCursor(self) -> QtGui.QTextCursor: ... - def setTextCursor(self, cursor: QtGui.QTextCursor) -> None: ... - def document(self) -> QtGui.QTextDocument: ... - def setDocument(self, document: QtGui.QTextDocument) -> None: ... - - -class QTextBrowser(QTextEdit): - - def __init__(self, parent: typing.Optional[QWidget] = ...) -> None: ... - - def historyChanged(self) -> None: ... - def forwardHistoryCount(self) -> int: ... - def backwardHistoryCount(self) -> int: ... - def historyUrl(self, a0: int) -> QtCore.QUrl: ... - def historyTitle(self, a0: int) -> str: ... - def setOpenLinks(self, open: bool) -> None: ... - def openLinks(self) -> bool: ... - def setOpenExternalLinks(self, open: bool) -> None: ... - def openExternalLinks(self) -> bool: ... - def clearHistory(self) -> None: ... - def isForwardAvailable(self) -> bool: ... - def isBackwardAvailable(self) -> bool: ... - def paintEvent(self, e: QtGui.QPaintEvent) -> None: ... - def focusNextPrevChild(self, next: bool) -> bool: ... - def focusOutEvent(self, ev: QtGui.QFocusEvent) -> None: ... - def mouseReleaseEvent(self, ev: QtGui.QMouseEvent) -> None: ... - def mousePressEvent(self, ev: QtGui.QMouseEvent) -> None: ... - def mouseMoveEvent(self, ev: QtGui.QMouseEvent) -> None: ... - def keyPressEvent(self, ev: QtGui.QKeyEvent) -> None: ... - def event(self, e: QtCore.QEvent) -> bool: ... - def anchorClicked(self, a0: QtCore.QUrl) -> None: ... - @typing.overload - def highlighted(self, a0: QtCore.QUrl) -> None: ... - @typing.overload - def highlighted(self, a0: str) -> None: ... - def sourceChanged(self, a0: QtCore.QUrl) -> None: ... - def forwardAvailable(self, a0: bool) -> None: ... - def backwardAvailable(self, a0: bool) -> None: ... - def reload(self) -> None: ... - def home(self) -> None: ... - def forward(self) -> None: ... - def backward(self) -> None: ... - def setSource(self, name: QtCore.QUrl) -> None: ... - def loadResource(self, type: int, name: QtCore.QUrl) -> typing.Any: ... - def setSearchPaths(self, paths: typing.Iterable[str]) -> None: ... - def searchPaths(self) -> typing.List[str]: ... - def source(self) -> QtCore.QUrl: ... - - -class QToolBar(QWidget): - - @typing.overload - def __init__(self, title: str, parent: typing.Optional[QWidget] = ...) -> None: ... - @typing.overload - def __init__(self, parent: typing.Optional[QWidget] = ...) -> None: ... - - def isFloating(self) -> bool: ... - def setFloatable(self, floatable: bool) -> None: ... - def isFloatable(self) -> bool: ... - def event(self, event: QtCore.QEvent) -> bool: ... - def paintEvent(self, event: QtGui.QPaintEvent) -> None: ... - def changeEvent(self, event: QtCore.QEvent) -> None: ... - def actionEvent(self, event: QtGui.QActionEvent) -> None: ... - def initStyleOption(self, option: QStyleOptionToolBar) -> None: ... - def visibilityChanged(self, visible: bool) -> None: ... - def topLevelChanged(self, topLevel: bool) -> None: ... - def toolButtonStyleChanged(self, toolButtonStyle: QtCore.Qt.ToolButtonStyle) -> None: ... - def iconSizeChanged(self, iconSize: QtCore.QSize) -> None: ... - def orientationChanged(self, orientation: QtCore.Qt.Orientation) -> None: ... - def allowedAreasChanged(self, allowedAreas: typing.Union[QtCore.Qt.ToolBarAreas, QtCore.Qt.ToolBarArea]) -> None: ... - def movableChanged(self, movable: bool) -> None: ... - def actionTriggered(self, action: QAction) -> None: ... - def setToolButtonStyle(self, toolButtonStyle: QtCore.Qt.ToolButtonStyle) -> None: ... - def setIconSize(self, iconSize: QtCore.QSize) -> None: ... - def widgetForAction(self, action: QAction) -> QWidget: ... - def toolButtonStyle(self) -> QtCore.Qt.ToolButtonStyle: ... - def iconSize(self) -> QtCore.QSize: ... - def toggleViewAction(self) -> QAction: ... - @typing.overload - def actionAt(self, p: QtCore.QPoint) -> QAction: ... - @typing.overload - def actionAt(self, ax: int, ay: int) -> QAction: ... - def actionGeometry(self, action: QAction) -> QtCore.QRect: ... - def insertWidget(self, before: QAction, widget: QWidget) -> QAction: ... - def addWidget(self, widget: QWidget) -> QAction: ... - def insertSeparator(self, before: QAction) -> QAction: ... - def addSeparator(self) -> QAction: ... - @typing.overload - def addAction(self, action: QAction) -> None: ... - @typing.overload - def addAction(self, text: str) -> QAction: ... - @typing.overload - def addAction(self, icon: QtGui.QIcon, text: str) -> QAction: ... - @typing.overload - def addAction(self, text: str, slot: PYQT_SLOT) -> QAction: ... - @typing.overload - def addAction(self, icon: QtGui.QIcon, text: str, slot: PYQT_SLOT) -> QAction: ... - def clear(self) -> None: ... - def orientation(self) -> QtCore.Qt.Orientation: ... - def setOrientation(self, orientation: QtCore.Qt.Orientation) -> None: ... - def isAreaAllowed(self, area: QtCore.Qt.ToolBarArea) -> bool: ... - def allowedAreas(self) -> QtCore.Qt.ToolBarAreas: ... - def setAllowedAreas(self, areas: typing.Union[QtCore.Qt.ToolBarAreas, QtCore.Qt.ToolBarArea]) -> None: ... - def isMovable(self) -> bool: ... - def setMovable(self, movable: bool) -> None: ... - - -class QToolBox(QFrame): - - def __init__(self, parent: typing.Optional[QWidget] = ..., flags: typing.Union[QtCore.Qt.WindowFlags, QtCore.Qt.WindowType] = ...) -> None: ... - - def changeEvent(self, a0: QtCore.QEvent) -> None: ... - def showEvent(self, e: QtGui.QShowEvent) -> None: ... - def event(self, e: QtCore.QEvent) -> bool: ... - def itemRemoved(self, index: int) -> None: ... - def itemInserted(self, index: int) -> None: ... - def currentChanged(self, index: int) -> None: ... - def setCurrentWidget(self, widget: QWidget) -> None: ... - def setCurrentIndex(self, index: int) -> None: ... - def __len__(self) -> int: ... - def count(self) -> int: ... - def indexOf(self, widget: QWidget) -> int: ... - def widget(self, index: int) -> QWidget: ... - def currentWidget(self) -> QWidget: ... - def currentIndex(self) -> int: ... - def itemToolTip(self, index: int) -> str: ... - def setItemToolTip(self, index: int, toolTip: str) -> None: ... - def itemIcon(self, index: int) -> QtGui.QIcon: ... - def setItemIcon(self, index: int, icon: QtGui.QIcon) -> None: ... - def itemText(self, index: int) -> str: ... - def setItemText(self, index: int, text: str) -> None: ... - def isItemEnabled(self, index: int) -> bool: ... - def setItemEnabled(self, index: int, enabled: bool) -> None: ... - def removeItem(self, index: int) -> None: ... - @typing.overload - def insertItem(self, index: int, item: QWidget, text: str) -> int: ... - @typing.overload - def insertItem(self, index: int, widget: QWidget, icon: QtGui.QIcon, text: str) -> int: ... - @typing.overload - def addItem(self, item: QWidget, text: str) -> int: ... - @typing.overload - def addItem(self, item: QWidget, iconSet: QtGui.QIcon, text: str) -> int: ... - - -class QToolButton(QAbstractButton): - - class ToolButtonPopupMode(int): ... - DelayedPopup = ... # type: 'QToolButton.ToolButtonPopupMode' - MenuButtonPopup = ... # type: 'QToolButton.ToolButtonPopupMode' - InstantPopup = ... # type: 'QToolButton.ToolButtonPopupMode' - - def __init__(self, parent: typing.Optional[QWidget] = ...) -> None: ... - - def hitButton(self, pos: QtCore.QPoint) -> bool: ... - def nextCheckState(self) -> None: ... - def mouseReleaseEvent(self, a0: QtGui.QMouseEvent) -> None: ... - def changeEvent(self, a0: QtCore.QEvent) -> None: ... - def timerEvent(self, a0: QtCore.QTimerEvent) -> None: ... - def leaveEvent(self, a0: QtCore.QEvent) -> None: ... - def enterEvent(self, a0: QtCore.QEvent) -> None: ... - def actionEvent(self, a0: QtGui.QActionEvent) -> None: ... - def paintEvent(self, a0: QtGui.QPaintEvent) -> None: ... - def mousePressEvent(self, a0: QtGui.QMouseEvent) -> None: ... - def event(self, e: QtCore.QEvent) -> bool: ... - def initStyleOption(self, option: QStyleOptionToolButton) -> None: ... - def triggered(self, a0: QAction) -> None: ... - def setDefaultAction(self, a0: QAction) -> None: ... - def setToolButtonStyle(self, style: QtCore.Qt.ToolButtonStyle) -> None: ... - def showMenu(self) -> None: ... - def autoRaise(self) -> bool: ... - def setAutoRaise(self, enable: bool) -> None: ... - def defaultAction(self) -> QAction: ... - def popupMode(self) -> 'QToolButton.ToolButtonPopupMode': ... - def setPopupMode(self, mode: 'QToolButton.ToolButtonPopupMode') -> None: ... - def menu(self) -> QMenu: ... - def setMenu(self, menu: QMenu) -> None: ... - def setArrowType(self, type: QtCore.Qt.ArrowType) -> None: ... - def arrowType(self) -> QtCore.Qt.ArrowType: ... - def toolButtonStyle(self) -> QtCore.Qt.ToolButtonStyle: ... - def minimumSizeHint(self) -> QtCore.QSize: ... - def sizeHint(self) -> QtCore.QSize: ... - - -class QToolTip(sip.simplewrapper): - - def __init__(self, a0: 'QToolTip') -> None: ... - - @staticmethod - def text() -> str: ... - @staticmethod - def isVisible() -> bool: ... - @staticmethod - def setFont(a0: QtGui.QFont) -> None: ... - @staticmethod - def font() -> QtGui.QFont: ... - @staticmethod - def setPalette(a0: QtGui.QPalette) -> None: ... - @staticmethod - def hideText() -> None: ... - @staticmethod - def palette() -> QtGui.QPalette: ... - @typing.overload - @staticmethod - def showText(pos: QtCore.QPoint, text: str, widget: typing.Optional[QWidget] = ...) -> None: ... - @typing.overload - @staticmethod - def showText(pos: QtCore.QPoint, text: str, w: QWidget, rect: QtCore.QRect) -> None: ... - @typing.overload - @staticmethod - def showText(pos: QtCore.QPoint, text: str, w: QWidget, rect: QtCore.QRect, msecShowTime: int) -> None: ... - - -class QTreeView(QAbstractItemView): - - def __init__(self, parent: typing.Optional[QWidget] = ...) -> None: ... - - def resetIndentation(self) -> None: ... - def viewportSizeHint(self) -> QtCore.QSize: ... - def treePosition(self) -> int: ... - def setTreePosition(self, logicalIndex: int) -> None: ... - def setHeaderHidden(self, hide: bool) -> None: ... - def isHeaderHidden(self) -> bool: ... - def setExpandsOnDoubleClick(self, enable: bool) -> None: ... - def expandsOnDoubleClick(self) -> bool: ... - def currentChanged(self, current: QtCore.QModelIndex, previous: QtCore.QModelIndex) -> None: ... - def selectionChanged(self, selected: QtCore.QItemSelection, deselected: QtCore.QItemSelection) -> None: ... - def rowHeight(self, index: QtCore.QModelIndex) -> int: ... - def viewportEvent(self, event: QtCore.QEvent) -> bool: ... - def dragMoveEvent(self, event: QtGui.QDragMoveEvent) -> None: ... - def expandToDepth(self, depth: int) -> None: ... - def wordWrap(self) -> bool: ... - def setWordWrap(self, on: bool) -> None: ... - def setFirstColumnSpanned(self, row: int, parent: QtCore.QModelIndex, span: bool) -> None: ... - def isFirstColumnSpanned(self, row: int, parent: QtCore.QModelIndex) -> bool: ... - def setAutoExpandDelay(self, delay: int) -> None: ... - def autoExpandDelay(self) -> int: ... - def sortByColumn(self, column: int, order: QtCore.Qt.SortOrder) -> None: ... - def allColumnsShowFocus(self) -> bool: ... - def setAllColumnsShowFocus(self, enable: bool) -> None: ... - def isAnimated(self) -> bool: ... - def setAnimated(self, enable: bool) -> None: ... - def isSortingEnabled(self) -> bool: ... - def setSortingEnabled(self, enable: bool) -> None: ... - def setColumnWidth(self, column: int, width: int) -> None: ... - def isIndexHidden(self, index: QtCore.QModelIndex) -> bool: ... - def horizontalScrollbarAction(self, action: int) -> None: ... - def indexRowSizeHint(self, index: QtCore.QModelIndex) -> int: ... - def sizeHintForColumn(self, column: int) -> int: ... - def updateGeometries(self) -> None: ... - def keyPressEvent(self, event: QtGui.QKeyEvent) -> None: ... - def mouseDoubleClickEvent(self, e: QtGui.QMouseEvent) -> None: ... - def mouseMoveEvent(self, event: QtGui.QMouseEvent) -> None: ... - def mousePressEvent(self, e: QtGui.QMouseEvent) -> None: ... - def drawTree(self, painter: QtGui.QPainter, region: QtGui.QRegion) -> None: ... - def drawBranches(self, painter: QtGui.QPainter, rect: QtCore.QRect, index: QtCore.QModelIndex) -> None: ... - def drawRow(self, painter: QtGui.QPainter, options: QStyleOptionViewItem, index: QtCore.QModelIndex) -> None: ... - def mouseReleaseEvent(self, event: QtGui.QMouseEvent) -> None: ... - def timerEvent(self, event: QtCore.QTimerEvent) -> None: ... - def paintEvent(self, e: QtGui.QPaintEvent) -> None: ... - def selectedIndexes(self) -> typing.Any: ... - def visualRegionForSelection(self, selection: QtCore.QItemSelection) -> QtGui.QRegion: ... - def setSelection(self, rect: QtCore.QRect, command: typing.Union[QtCore.QItemSelectionModel.SelectionFlags, QtCore.QItemSelectionModel.SelectionFlag]) -> None: ... - def verticalOffset(self) -> int: ... - def horizontalOffset(self) -> int: ... - def moveCursor(self, cursorAction: QAbstractItemView.CursorAction, modifiers: typing.Union[QtCore.Qt.KeyboardModifiers, QtCore.Qt.KeyboardModifier]) -> QtCore.QModelIndex: ... - def rowsAboutToBeRemoved(self, parent: QtCore.QModelIndex, start: int, end: int) -> None: ... - def rowsInserted(self, parent: QtCore.QModelIndex, start: int, end: int) -> None: ... - def scrollContentsBy(self, dx: int, dy: int) -> None: ... - def rowsRemoved(self, parent: QtCore.QModelIndex, first: int, last: int) -> None: ... - def reexpand(self) -> None: ... - def columnMoved(self) -> None: ... - def columnCountChanged(self, oldCount: int, newCount: int) -> None: ... - def columnResized(self, column: int, oldSize: int, newSize: int) -> None: ... - def selectAll(self) -> None: ... - def resizeColumnToContents(self, column: int) -> None: ... - def collapseAll(self) -> None: ... - def collapse(self, index: QtCore.QModelIndex) -> None: ... - def expandAll(self) -> None: ... - def expand(self, index: QtCore.QModelIndex) -> None: ... - def showColumn(self, column: int) -> None: ... - def hideColumn(self, column: int) -> None: ... - def dataChanged(self, topLeft: QtCore.QModelIndex, bottomRight: QtCore.QModelIndex, roles: typing.Iterable[int] = ...) -> None: ... - def collapsed(self, index: QtCore.QModelIndex) -> None: ... - def expanded(self, index: QtCore.QModelIndex) -> None: ... - def reset(self) -> None: ... - def indexBelow(self, index: QtCore.QModelIndex) -> QtCore.QModelIndex: ... - def indexAbove(self, index: QtCore.QModelIndex) -> QtCore.QModelIndex: ... - def indexAt(self, p: QtCore.QPoint) -> QtCore.QModelIndex: ... - def scrollTo(self, index: QtCore.QModelIndex, hint: QAbstractItemView.ScrollHint = ...) -> None: ... - def visualRect(self, index: QtCore.QModelIndex) -> QtCore.QRect: ... - def keyboardSearch(self, search: str) -> None: ... - def setExpanded(self, index: QtCore.QModelIndex, expand: bool) -> None: ... - def isExpanded(self, index: QtCore.QModelIndex) -> bool: ... - def setRowHidden(self, row: int, parent: QtCore.QModelIndex, hide: bool) -> None: ... - def isRowHidden(self, row: int, parent: QtCore.QModelIndex) -> bool: ... - def setColumnHidden(self, column: int, hide: bool) -> None: ... - def isColumnHidden(self, column: int) -> bool: ... - def columnAt(self, x: int) -> int: ... - def columnWidth(self, column: int) -> int: ... - def columnViewportPosition(self, column: int) -> int: ... - def setItemsExpandable(self, enable: bool) -> None: ... - def itemsExpandable(self) -> bool: ... - def setUniformRowHeights(self, uniform: bool) -> None: ... - def uniformRowHeights(self) -> bool: ... - def setRootIsDecorated(self, show: bool) -> None: ... - def rootIsDecorated(self) -> bool: ... - def setIndentation(self, i: int) -> None: ... - def indentation(self) -> int: ... - def setHeader(self, header: QHeaderView) -> None: ... - def header(self) -> QHeaderView: ... - def setSelectionModel(self, selectionModel: QtCore.QItemSelectionModel) -> None: ... - def setRootIndex(self, index: QtCore.QModelIndex) -> None: ... - def setModel(self, model: QtCore.QAbstractItemModel) -> None: ... - - -class QTreeWidgetItem(sip.wrapper): - - class ChildIndicatorPolicy(int): ... - ShowIndicator = ... # type: 'QTreeWidgetItem.ChildIndicatorPolicy' - DontShowIndicator = ... # type: 'QTreeWidgetItem.ChildIndicatorPolicy' - DontShowIndicatorWhenChildless = ... # type: 'QTreeWidgetItem.ChildIndicatorPolicy' - - class ItemType(int): ... - Type = ... # type: 'QTreeWidgetItem.ItemType' - UserType = ... # type: 'QTreeWidgetItem.ItemType' - - @typing.overload - def __init__(self, type: int = ...) -> None: ... - @typing.overload - def __init__(self, strings: typing.Iterable[str], type: int = ...) -> None: ... - @typing.overload - def __init__(self, parent: 'QTreeWidget', type: int = ...) -> None: ... - @typing.overload - def __init__(self, parent: 'QTreeWidget', strings: typing.Iterable[str], type: int = ...) -> None: ... - @typing.overload - def __init__(self, parent: 'QTreeWidget', preceding: 'QTreeWidgetItem', type: int = ...) -> None: ... - @typing.overload - def __init__(self, parent: 'QTreeWidgetItem', type: int = ...) -> None: ... - @typing.overload - def __init__(self, parent: 'QTreeWidgetItem', strings: typing.Iterable[str], type: int = ...) -> None: ... - @typing.overload - def __init__(self, parent: 'QTreeWidgetItem', preceding: 'QTreeWidgetItem', type: int = ...) -> None: ... - @typing.overload - def __init__(self, other: 'QTreeWidgetItem') -> None: ... - - def emitDataChanged(self) -> None: ... - def isDisabled(self) -> bool: ... - def setDisabled(self, disabled: bool) -> None: ... - def isFirstColumnSpanned(self) -> bool: ... - def setFirstColumnSpanned(self, aspan: bool) -> None: ... - def removeChild(self, child: 'QTreeWidgetItem') -> None: ... - def childIndicatorPolicy(self) -> 'QTreeWidgetItem.ChildIndicatorPolicy': ... - def setChildIndicatorPolicy(self, policy: 'QTreeWidgetItem.ChildIndicatorPolicy') -> None: ... - def isExpanded(self) -> bool: ... - def setExpanded(self, aexpand: bool) -> None: ... - def isHidden(self) -> bool: ... - def setHidden(self, ahide: bool) -> None: ... - def isSelected(self) -> bool: ... - def setSelected(self, aselect: bool) -> None: ... - def sortChildren(self, column: int, order: QtCore.Qt.SortOrder) -> None: ... - def setForeground(self, column: int, brush: typing.Union[QtGui.QBrush, QtGui.QColor, QtCore.Qt.GlobalColor, QtGui.QGradient]) -> None: ... - def foreground(self, column: int) -> QtGui.QBrush: ... - def setBackground(self, column: int, brush: typing.Union[QtGui.QBrush, QtGui.QColor, QtCore.Qt.GlobalColor, QtGui.QGradient]) -> None: ... - def background(self, column: int) -> QtGui.QBrush: ... - def takeChildren(self) -> typing.List['QTreeWidgetItem']: ... - def insertChildren(self, index: int, children: typing.Iterable['QTreeWidgetItem']) -> None: ... - def addChildren(self, children: typing.Any) -> None: ... - def setSizeHint(self, column: int, size: QtCore.QSize) -> None: ... - def sizeHint(self, column: int) -> QtCore.QSize: ... - def indexOfChild(self, achild: 'QTreeWidgetItem') -> int: ... - def setFont(self, column: int, afont: QtGui.QFont) -> None: ... - def setWhatsThis(self, column: int, awhatsThis: str) -> None: ... - def setToolTip(self, column: int, atoolTip: str) -> None: ... - def setStatusTip(self, column: int, astatusTip: str) -> None: ... - def setIcon(self, column: int, aicon: QtGui.QIcon) -> None: ... - def setText(self, column: int, atext: str) -> None: ... - def setFlags(self, aflags: typing.Union[QtCore.Qt.ItemFlags, QtCore.Qt.ItemFlag]) -> None: ... - def type(self) -> int: ... - def takeChild(self, index: int) -> 'QTreeWidgetItem': ... - def insertChild(self, index: int, child: 'QTreeWidgetItem') -> None: ... - def addChild(self, child: 'QTreeWidgetItem') -> None: ... - def columnCount(self) -> int: ... - def childCount(self) -> int: ... - def child(self, index: int) -> 'QTreeWidgetItem': ... - def parent(self) -> 'QTreeWidgetItem': ... - def write(self, out: QtCore.QDataStream) -> None: ... - def read(self, in_: QtCore.QDataStream) -> None: ... - def setData(self, column: int, role: int, value: typing.Any) -> None: ... - def data(self, column: int, role: int) -> typing.Any: ... - def setCheckState(self, column: int, state: QtCore.Qt.CheckState) -> None: ... - def checkState(self, column: int) -> QtCore.Qt.CheckState: ... - def setTextAlignment(self, column: int, alignment: int) -> None: ... - def textAlignment(self, column: int) -> int: ... - def font(self, column: int) -> QtGui.QFont: ... - def whatsThis(self, column: int) -> str: ... - def toolTip(self, column: int) -> str: ... - def statusTip(self, column: int) -> str: ... - def icon(self, column: int) -> QtGui.QIcon: ... - def text(self, column: int) -> str: ... - def flags(self) -> QtCore.Qt.ItemFlags: ... - def treeWidget(self) -> 'QTreeWidget': ... - def clone(self) -> 'QTreeWidgetItem': ... - - -class QTreeWidget(QTreeView): - - def __init__(self, parent: typing.Optional[QWidget] = ...) -> None: ... - - def setSelectionModel(self, selectionModel: QtCore.QItemSelectionModel) -> None: ... - def removeItemWidget(self, item: QTreeWidgetItem, column: int) -> None: ... - def itemBelow(self, item: QTreeWidgetItem) -> QTreeWidgetItem: ... - def itemAbove(self, item: QTreeWidgetItem) -> QTreeWidgetItem: ... - def setFirstItemColumnSpanned(self, item: QTreeWidgetItem, span: bool) -> None: ... - def isFirstItemColumnSpanned(self, item: QTreeWidgetItem) -> bool: ... - def setHeaderLabel(self, alabel: str) -> None: ... - def invisibleRootItem(self) -> QTreeWidgetItem: ... - def dropEvent(self, event: QtGui.QDropEvent) -> None: ... - def event(self, e: QtCore.QEvent) -> bool: ... - def itemFromIndex(self, index: QtCore.QModelIndex) -> QTreeWidgetItem: ... - def indexFromItem(self, item: QTreeWidgetItem, column: int = ...) -> QtCore.QModelIndex: ... - def supportedDropActions(self) -> QtCore.Qt.DropActions: ... - def dropMimeData(self, parent: QTreeWidgetItem, index: int, data: QtCore.QMimeData, action: QtCore.Qt.DropAction) -> bool: ... - def mimeData(self, items: typing.Iterable[QTreeWidgetItem]) -> QtCore.QMimeData: ... - def mimeTypes(self) -> typing.List[str]: ... - def itemSelectionChanged(self) -> None: ... - def currentItemChanged(self, current: QTreeWidgetItem, previous: QTreeWidgetItem) -> None: ... - def itemCollapsed(self, item: QTreeWidgetItem) -> None: ... - def itemExpanded(self, item: QTreeWidgetItem) -> None: ... - def itemChanged(self, item: QTreeWidgetItem, column: int) -> None: ... - def itemEntered(self, item: QTreeWidgetItem, column: int) -> None: ... - def itemActivated(self, item: QTreeWidgetItem, column: int) -> None: ... - def itemDoubleClicked(self, item: QTreeWidgetItem, column: int) -> None: ... - def itemClicked(self, item: QTreeWidgetItem, column: int) -> None: ... - def itemPressed(self, item: QTreeWidgetItem, column: int) -> None: ... - def clear(self) -> None: ... - def collapseItem(self, item: QTreeWidgetItem) -> None: ... - def expandItem(self, item: QTreeWidgetItem) -> None: ... - def scrollToItem(self, item: QTreeWidgetItem, hint: QAbstractItemView.ScrollHint = ...) -> None: ... - def findItems(self, text: str, flags: typing.Union[QtCore.Qt.MatchFlags, QtCore.Qt.MatchFlag], column: int = ...) -> typing.List[QTreeWidgetItem]: ... - def selectedItems(self) -> typing.List[QTreeWidgetItem]: ... - def setItemWidget(self, item: QTreeWidgetItem, column: int, widget: QWidget) -> None: ... - def itemWidget(self, item: QTreeWidgetItem, column: int) -> QWidget: ... - # def closePersistentEditor(self, item: QTreeWidgetItem, column: int = ...) -> None: ... - # def openPersistentEditor(self, item: QTreeWidgetItem, column: int = ...) -> None: ... - def editItem(self, item: QTreeWidgetItem, column: int = ...) -> None: ... - def sortItems(self, column: int, order: QtCore.Qt.SortOrder) -> None: ... - def sortColumn(self) -> int: ... - def visualItemRect(self, item: QTreeWidgetItem) -> QtCore.QRect: ... - @typing.overload - def itemAt(self, p: QtCore.QPoint) -> QTreeWidgetItem: ... - @typing.overload - def itemAt(self, ax: int, ay: int) -> QTreeWidgetItem: ... - @typing.overload - def setCurrentItem(self, item: QTreeWidgetItem) -> None: ... - @typing.overload - def setCurrentItem(self, item: QTreeWidgetItem, column: int) -> None: ... - @typing.overload - def setCurrentItem(self, item: QTreeWidgetItem, column: int, command: typing.Union[QtCore.QItemSelectionModel.SelectionFlags, QtCore.QItemSelectionModel.SelectionFlag]) -> None: ... - def currentColumn(self) -> int: ... - def currentItem(self) -> QTreeWidgetItem: ... - def setHeaderLabels(self, labels: typing.Iterable[str]) -> None: ... - def setHeaderItem(self, item: QTreeWidgetItem) -> None: ... - def headerItem(self) -> QTreeWidgetItem: ... - def addTopLevelItems(self, items: typing.Iterable[QTreeWidgetItem]) -> None: ... - def insertTopLevelItems(self, index: int, items: typing.Iterable[QTreeWidgetItem]) -> None: ... - def indexOfTopLevelItem(self, item: QTreeWidgetItem) -> int: ... - def takeTopLevelItem(self, index: int) -> QTreeWidgetItem: ... - def addTopLevelItem(self, item: QTreeWidgetItem) -> None: ... - def insertTopLevelItem(self, index: int, item: QTreeWidgetItem) -> None: ... - def topLevelItemCount(self) -> int: ... - def topLevelItem(self, index: int) -> QTreeWidgetItem: ... - def setColumnCount(self, columns: int) -> None: ... - def columnCount(self) -> int: ... - - -class QTreeWidgetItemIterator(sip.simplewrapper): - - class IteratorFlag(int): ... - All = ... # type: 'QTreeWidgetItemIterator.IteratorFlag' - Hidden = ... # type: 'QTreeWidgetItemIterator.IteratorFlag' - NotHidden = ... # type: 'QTreeWidgetItemIterator.IteratorFlag' - Selected = ... # type: 'QTreeWidgetItemIterator.IteratorFlag' - Unselected = ... # type: 'QTreeWidgetItemIterator.IteratorFlag' - Selectable = ... # type: 'QTreeWidgetItemIterator.IteratorFlag' - NotSelectable = ... # type: 'QTreeWidgetItemIterator.IteratorFlag' - DragEnabled = ... # type: 'QTreeWidgetItemIterator.IteratorFlag' - DragDisabled = ... # type: 'QTreeWidgetItemIterator.IteratorFlag' - DropEnabled = ... # type: 'QTreeWidgetItemIterator.IteratorFlag' - DropDisabled = ... # type: 'QTreeWidgetItemIterator.IteratorFlag' - HasChildren = ... # type: 'QTreeWidgetItemIterator.IteratorFlag' - NoChildren = ... # type: 'QTreeWidgetItemIterator.IteratorFlag' - Checked = ... # type: 'QTreeWidgetItemIterator.IteratorFlag' - NotChecked = ... # type: 'QTreeWidgetItemIterator.IteratorFlag' - Enabled = ... # type: 'QTreeWidgetItemIterator.IteratorFlag' - Disabled = ... # type: 'QTreeWidgetItemIterator.IteratorFlag' - Editable = ... # type: 'QTreeWidgetItemIterator.IteratorFlag' - NotEditable = ... # type: 'QTreeWidgetItemIterator.IteratorFlag' - UserFlag = ... # type: 'QTreeWidgetItemIterator.IteratorFlag' - - class IteratorFlags(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QTreeWidgetItemIterator.IteratorFlags', 'QTreeWidgetItemIterator.IteratorFlag']) -> None: ... - @typing.overload - def __init__(self, a0: 'QTreeWidgetItemIterator.IteratorFlags') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QTreeWidgetItemIterator.IteratorFlags': ... - def __int__(self) -> int: ... - - @typing.overload - def __init__(self, it: 'QTreeWidgetItemIterator') -> None: ... - @typing.overload - def __init__(self, widget: QTreeWidget, flags: 'QTreeWidgetItemIterator.IteratorFlags' = ...) -> None: ... - @typing.overload - def __init__(self, item: QTreeWidgetItem, flags: 'QTreeWidgetItemIterator.IteratorFlags' = ...) -> None: ... - - def value(self) -> QTreeWidgetItem: ... - - -class QUndoGroup(QtCore.QObject): - - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def undoTextChanged(self, undoText: str) -> None: ... - def redoTextChanged(self, redoText: str) -> None: ... - def indexChanged(self, idx: int) -> None: ... - def cleanChanged(self, clean: bool) -> None: ... - def canUndoChanged(self, canUndo: bool) -> None: ... - def canRedoChanged(self, canRedo: bool) -> None: ... - def activeStackChanged(self, stack: 'QUndoStack') -> None: ... - def undo(self) -> None: ... - def setActiveStack(self, stack: 'QUndoStack') -> None: ... - def redo(self) -> None: ... - def isClean(self) -> bool: ... - def redoText(self) -> str: ... - def undoText(self) -> str: ... - def canRedo(self) -> bool: ... - def canUndo(self) -> bool: ... - def createUndoAction(self, parent: QtCore.QObject, prefix: str = ...) -> QAction: ... - def createRedoAction(self, parent: QtCore.QObject, prefix: str = ...) -> QAction: ... - def activeStack(self) -> 'QUndoStack': ... - def stacks(self) -> typing.Any: ... - def removeStack(self, stack: 'QUndoStack') -> None: ... - def addStack(self, stack: 'QUndoStack') -> None: ... - - -class QUndoCommand(sip.wrapper): - - @typing.overload - def __init__(self, parent: typing.Optional['QUndoCommand'] = ...) -> None: ... - @typing.overload - def __init__(self, text: str, parent: typing.Optional['QUndoCommand'] = ...) -> None: ... - - def actionText(self) -> str: ... - def child(self, index: int) -> 'QUndoCommand': ... - def childCount(self) -> int: ... - def undo(self) -> None: ... - def text(self) -> str: ... - def setText(self, text: str) -> None: ... - def redo(self) -> None: ... - def mergeWith(self, other: 'QUndoCommand') -> bool: ... - def id(self) -> int: ... - - -class QUndoStack(QtCore.QObject): - - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def command(self, index: int) -> QUndoCommand: ... - def undoLimit(self) -> int: ... - def setUndoLimit(self, limit: int) -> None: ... - def undoTextChanged(self, undoText: str) -> None: ... - def redoTextChanged(self, redoText: str) -> None: ... - def indexChanged(self, idx: int) -> None: ... - def cleanChanged(self, clean: bool) -> None: ... - def canUndoChanged(self, canUndo: bool) -> None: ... - def canRedoChanged(self, canRedo: bool) -> None: ... - def undo(self) -> None: ... - def setIndex(self, idx: int) -> None: ... - def setClean(self) -> None: ... - def setActive(self, active: bool = ...) -> None: ... - def redo(self) -> None: ... - def endMacro(self) -> None: ... - def beginMacro(self, text: str) -> None: ... - def cleanIndex(self) -> int: ... - def isClean(self) -> bool: ... - def isActive(self) -> bool: ... - def createRedoAction(self, parent: QtCore.QObject, prefix: str = ...) -> QAction: ... - def createUndoAction(self, parent: QtCore.QObject, prefix: str = ...) -> QAction: ... - def text(self, idx: int) -> str: ... - def index(self) -> int: ... - def __len__(self) -> int: ... - def count(self) -> int: ... - def redoText(self) -> str: ... - def undoText(self) -> str: ... - def canRedo(self) -> bool: ... - def canUndo(self) -> bool: ... - def push(self, cmd: QUndoCommand) -> None: ... - def clear(self) -> None: ... - - -class QUndoView(QListView): - - @typing.overload - def __init__(self, parent: typing.Optional[QWidget] = ...) -> None: ... - @typing.overload - def __init__(self, stack: QUndoStack, parent: typing.Optional[QWidget] = ...) -> None: ... - @typing.overload - def __init__(self, group: QUndoGroup, parent: typing.Optional[QWidget] = ...) -> None: ... - - def setGroup(self, group: QUndoGroup) -> None: ... - def setStack(self, stack: QUndoStack) -> None: ... - def cleanIcon(self) -> QtGui.QIcon: ... - def setCleanIcon(self, icon: QtGui.QIcon) -> None: ... - def emptyLabel(self) -> str: ... - def setEmptyLabel(self, label: str) -> None: ... - def group(self) -> QUndoGroup: ... - def stack(self) -> QUndoStack: ... - - -class QWhatsThis(sip.simplewrapper): - - def __init__(self, a0: 'QWhatsThis') -> None: ... - - @staticmethod - def createAction(parent: typing.Optional[QtCore.QObject] = ...) -> QAction: ... - @staticmethod - def hideText() -> None: ... - @staticmethod - def showText(pos: QtCore.QPoint, text: str, widget: typing.Optional[QWidget] = ...) -> None: ... - @staticmethod - def leaveWhatsThisMode() -> None: ... - @staticmethod - def inWhatsThisMode() -> bool: ... - @staticmethod - def enterWhatsThisMode() -> None: ... - - -class QWidgetAction(QAction): - - def __init__(self, parent: QtCore.QObject) -> None: ... - - def createdWidgets(self) -> typing.List[QWidget]: ... - def deleteWidget(self, widget: QWidget) -> None: ... - def createWidget(self, parent: QWidget) -> QWidget: ... - def eventFilter(self, a0: QtCore.QObject, a1: QtCore.QEvent) -> bool: ... - def event(self, a0: QtCore.QEvent) -> bool: ... - def releaseWidget(self, widget: QWidget) -> None: ... - def requestWidget(self, parent: QWidget) -> QWidget: ... - def defaultWidget(self) -> QWidget: ... - def setDefaultWidget(self, w: QWidget) -> None: ... - - -class QWizard(QDialog): - - class WizardOption(int): ... - IndependentPages = ... # type: 'QWizard.WizardOption' - IgnoreSubTitles = ... # type: 'QWizard.WizardOption' - ExtendedWatermarkPixmap = ... # type: 'QWizard.WizardOption' - NoDefaultButton = ... # type: 'QWizard.WizardOption' - NoBackButtonOnStartPage = ... # type: 'QWizard.WizardOption' - NoBackButtonOnLastPage = ... # type: 'QWizard.WizardOption' - DisabledBackButtonOnLastPage = ... # type: 'QWizard.WizardOption' - HaveNextButtonOnLastPage = ... # type: 'QWizard.WizardOption' - HaveFinishButtonOnEarlyPages = ... # type: 'QWizard.WizardOption' - NoCancelButton = ... # type: 'QWizard.WizardOption' - CancelButtonOnLeft = ... # type: 'QWizard.WizardOption' - HaveHelpButton = ... # type: 'QWizard.WizardOption' - HelpButtonOnRight = ... # type: 'QWizard.WizardOption' - HaveCustomButton1 = ... # type: 'QWizard.WizardOption' - HaveCustomButton2 = ... # type: 'QWizard.WizardOption' - HaveCustomButton3 = ... # type: 'QWizard.WizardOption' - NoCancelButtonOnLastPage = ... # type: 'QWizard.WizardOption' - - class WizardStyle(int): ... - ClassicStyle = ... # type: 'QWizard.WizardStyle' - ModernStyle = ... # type: 'QWizard.WizardStyle' - MacStyle = ... # type: 'QWizard.WizardStyle' - AeroStyle = ... # type: 'QWizard.WizardStyle' - - class WizardPixmap(int): ... - WatermarkPixmap = ... # type: 'QWizard.WizardPixmap' - LogoPixmap = ... # type: 'QWizard.WizardPixmap' - BannerPixmap = ... # type: 'QWizard.WizardPixmap' - BackgroundPixmap = ... # type: 'QWizard.WizardPixmap' - - class WizardButton(int): ... - BackButton = ... # type: 'QWizard.WizardButton' - NextButton = ... # type: 'QWizard.WizardButton' - CommitButton = ... # type: 'QWizard.WizardButton' - FinishButton = ... # type: 'QWizard.WizardButton' - CancelButton = ... # type: 'QWizard.WizardButton' - HelpButton = ... # type: 'QWizard.WizardButton' - CustomButton1 = ... # type: 'QWizard.WizardButton' - CustomButton2 = ... # type: 'QWizard.WizardButton' - CustomButton3 = ... # type: 'QWizard.WizardButton' - Stretch = ... # type: 'QWizard.WizardButton' - - class WizardOptions(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, f: typing.Union['QWizard.WizardOptions', 'QWizard.WizardOption']) -> None: ... - @typing.overload - def __init__(self, a0: 'QWizard.WizardOptions') -> None: ... - - def __bool__(self) -> int: ... - def __invert__(self) -> 'QWizard.WizardOptions': ... - def __int__(self) -> int: ... - - def __init__(self, parent: typing.Optional[QWidget] = ..., flags: typing.Union[QtCore.Qt.WindowFlags, QtCore.Qt.WindowType] = ...) -> None: ... - - def pageRemoved(self, id: int) -> None: ... - def pageAdded(self, id: int) -> None: ... - def sideWidget(self) -> QWidget: ... - def setSideWidget(self, widget: QWidget) -> None: ... - def pageIds(self) -> typing.List[int]: ... - def removePage(self, id: int) -> None: ... - def cleanupPage(self, id: int) -> None: ... - def initializePage(self, id: int) -> None: ... - def done(self, result: int) -> None: ... - def paintEvent(self, event: QtGui.QPaintEvent) -> None: ... - def resizeEvent(self, event: QtGui.QResizeEvent) -> None: ... - def event(self, event: QtCore.QEvent) -> bool: ... - def restart(self) -> None: ... - def next(self) -> None: ... - def back(self) -> None: ... - def customButtonClicked(self, which: int) -> None: ... - def helpRequested(self) -> None: ... - def currentIdChanged(self, id: int) -> None: ... - def sizeHint(self) -> QtCore.QSize: ... - def setVisible(self, visible: bool) -> None: ... - def setDefaultProperty(self, className: str, property: str, changedSignal: PYQT_SIGNAL) -> None: ... - def pixmap(self, which: 'QWizard.WizardPixmap') -> QtGui.QPixmap: ... - def setPixmap(self, which: 'QWizard.WizardPixmap', pixmap: QtGui.QPixmap) -> None: ... - def subTitleFormat(self) -> QtCore.Qt.TextFormat: ... - def setSubTitleFormat(self, format: QtCore.Qt.TextFormat) -> None: ... - def titleFormat(self) -> QtCore.Qt.TextFormat: ... - def setTitleFormat(self, format: QtCore.Qt.TextFormat) -> None: ... - def button(self, which: 'QWizard.WizardButton') -> QAbstractButton: ... - def setButton(self, which: 'QWizard.WizardButton', button: QAbstractButton) -> None: ... - def setButtonLayout(self, layout: typing.Iterable['QWizard.WizardButton']) -> None: ... - def buttonText(self, which: 'QWizard.WizardButton') -> str: ... - def setButtonText(self, which: 'QWizard.WizardButton', text: str) -> None: ... - def options(self) -> 'QWizard.WizardOptions': ... - def setOptions(self, options: typing.Union['QWizard.WizardOptions', 'QWizard.WizardOption']) -> None: ... - def testOption(self, option: 'QWizard.WizardOption') -> bool: ... - def setOption(self, option: 'QWizard.WizardOption', on: bool = ...) -> None: ... - def wizardStyle(self) -> 'QWizard.WizardStyle': ... - def setWizardStyle(self, style: 'QWizard.WizardStyle') -> None: ... - def field(self, name: str) -> typing.Any: ... - def setField(self, name: str, value: typing.Any) -> None: ... - def nextId(self) -> int: ... - def validateCurrentPage(self) -> bool: ... - def currentId(self) -> int: ... - def currentPage(self) -> 'QWizardPage': ... - def startId(self) -> int: ... - def setStartId(self, id: int) -> None: ... - def visitedPages(self) -> typing.List[int]: ... - def hasVisitedPage(self, id: int) -> bool: ... - def page(self, id: int) -> 'QWizardPage': ... - def setPage(self, id: int, page: 'QWizardPage') -> None: ... - def addPage(self, page: 'QWizardPage') -> int: ... - - -class QWizardPage(QWidget): - - def __init__(self, parent: typing.Optional[QWidget] = ...) -> None: ... - - def wizard(self) -> QWizard: ... - def registerField(self, name: str, widget: QWidget, property: typing.Optional[str] = ..., changedSignal: PYQT_SIGNAL = ...) -> None: ... - def field(self, name: str) -> typing.Any: ... - def setField(self, name: str, value: typing.Any) -> None: ... - def completeChanged(self) -> None: ... - def nextId(self) -> int: ... - def isComplete(self) -> bool: ... - def validatePage(self) -> bool: ... - def cleanupPage(self) -> None: ... - def initializePage(self) -> None: ... - def buttonText(self, which: QWizard.WizardButton) -> str: ... - def setButtonText(self, which: QWizard.WizardButton, text: str) -> None: ... - def isCommitPage(self) -> bool: ... - def setCommitPage(self, commitPage: bool) -> None: ... - def isFinalPage(self) -> bool: ... - def setFinalPage(self, finalPage: bool) -> None: ... - def pixmap(self, which: QWizard.WizardPixmap) -> QtGui.QPixmap: ... - def setPixmap(self, which: QWizard.WizardPixmap, pixmap: QtGui.QPixmap) -> None: ... - def subTitle(self) -> str: ... - def setSubTitle(self, subTitle: str) -> None: ... - def title(self) -> str: ... - def setTitle(self, title: str) -> None: ... - - -QWIDGETSIZE_MAX = ... # type: int -qApp = ... # type: QApplication - - -def qDrawBorderPixmap(painter: QtGui.QPainter, target: QtCore.QRect, margins: QtCore.QMargins, pixmap: QtGui.QPixmap) -> None: ... -@typing.overload -def qDrawPlainRect(p: QtGui.QPainter, x: int, y: int, w: int, h: int, a5: typing.Union[QtGui.QColor, QtCore.Qt.GlobalColor, QtGui.QGradient], lineWidth: int = ..., fill: typing.Optional[typing.Union[QtGui.QBrush, QtGui.QColor, QtCore.Qt.GlobalColor, QtGui.QGradient]] = ...) -> None: ... -@typing.overload -def qDrawPlainRect(p: QtGui.QPainter, r: QtCore.QRect, a2: typing.Union[QtGui.QColor, QtCore.Qt.GlobalColor, QtGui.QGradient], lineWidth: int = ..., fill: typing.Optional[typing.Union[QtGui.QBrush, QtGui.QColor, QtCore.Qt.GlobalColor, QtGui.QGradient]] = ...) -> None: ... -@typing.overload -def qDrawWinPanel(p: QtGui.QPainter, x: int, y: int, w: int, h: int, pal: QtGui.QPalette, sunken: bool = ..., fill: typing.Optional[typing.Union[QtGui.QBrush, QtGui.QColor, QtCore.Qt.GlobalColor, QtGui.QGradient]] = ...) -> None: ... -@typing.overload -def qDrawWinPanel(p: QtGui.QPainter, r: QtCore.QRect, pal: QtGui.QPalette, sunken: bool = ..., fill: typing.Optional[typing.Union[QtGui.QBrush, QtGui.QColor, QtCore.Qt.GlobalColor, QtGui.QGradient]] = ...) -> None: ... -@typing.overload -def qDrawWinButton(p: QtGui.QPainter, x: int, y: int, w: int, h: int, pal: QtGui.QPalette, sunken: bool = ..., fill: typing.Optional[typing.Union[QtGui.QBrush, QtGui.QColor, QtCore.Qt.GlobalColor, QtGui.QGradient]] = ...) -> None: ... -@typing.overload -def qDrawWinButton(p: QtGui.QPainter, r: QtCore.QRect, pal: QtGui.QPalette, sunken: bool = ..., fill: typing.Optional[typing.Union[QtGui.QBrush, QtGui.QColor, QtCore.Qt.GlobalColor, QtGui.QGradient]] = ...) -> None: ... -@typing.overload -def qDrawShadePanel(p: QtGui.QPainter, x: int, y: int, w: int, h: int, pal: QtGui.QPalette, sunken: bool = ..., lineWidth: int = ..., fill: typing.Optional[typing.Union[QtGui.QBrush, QtGui.QColor, QtCore.Qt.GlobalColor, QtGui.QGradient]] = ...) -> None: ... -@typing.overload -def qDrawShadePanel(p: QtGui.QPainter, r: QtCore.QRect, pal: QtGui.QPalette, sunken: bool = ..., lineWidth: int = ..., fill: typing.Optional[typing.Union[QtGui.QBrush, QtGui.QColor, QtCore.Qt.GlobalColor, QtGui.QGradient]] = ...) -> None: ... -@typing.overload -def qDrawShadeRect(p: QtGui.QPainter, x: int, y: int, w: int, h: int, pal: QtGui.QPalette, sunken: bool = ..., lineWidth: int = ..., midLineWidth: int = ..., fill: typing.Optional[typing.Union[QtGui.QBrush, QtGui.QColor, QtCore.Qt.GlobalColor, QtGui.QGradient]] = ...) -> None: ... -@typing.overload -def qDrawShadeRect(p: QtGui.QPainter, r: QtCore.QRect, pal: QtGui.QPalette, sunken: bool = ..., lineWidth: int = ..., midLineWidth: int = ..., fill: typing.Optional[typing.Union[QtGui.QBrush, QtGui.QColor, QtCore.Qt.GlobalColor, QtGui.QGradient]] = ...) -> None: ... -@typing.overload -def qDrawShadeLine(p: QtGui.QPainter, x1: int, y1: int, x2: int, y2: int, pal: QtGui.QPalette, sunken: bool = ..., lineWidth: int = ..., midLineWidth: int = ...) -> None: ... -@typing.overload -def qDrawShadeLine(p: QtGui.QPainter, p1: QtCore.QPoint, p2: QtCore.QPoint, pal: QtGui.QPalette, sunken: bool = ..., lineWidth: int = ..., midLineWidth: int = ...) -> None: ... diff -Nru uranium-3.3.0/stubs/PyQt5/QtX11Extras.pyi uranium-4.4.1/stubs/PyQt5/QtX11Extras.pyi --- uranium-3.3.0/stubs/PyQt5/QtX11Extras.pyi 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/stubs/PyQt5/QtX11Extras.pyi 1970-01-01 00:00:00.000000000 +0000 @@ -1,73 +0,0 @@ -# The PEP 484 type hints stub file for the QtX11Extras module. -# -# Generated by SIP 4.18.1 -# -# Copyright (c) 2016 Riverbank Computing Limited -# -# This file is part of PyQt5. -# -# This file may be used under the terms of the GNU General Public License -# version 3.0 as published by the Free Software Foundation and appearing in -# the file LICENSE included in the packaging of this file. Please review the -# following information to ensure the GNU General Public License version 3.0 -# requirements will be met: http://www.gnu.org/copyleft/gpl.html. -# -# If you do not wish to use this file under the terms of the GPL version 3.0 -# then you may purchase a commercial license. For more information contact -# info@riverbankcomputing.com. -# -# This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -# WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - - -import typing -import sip - -from PyQt5 import QtCore - -# Support for QDate, QDateTime and QTime. -import datetime - -# Convenient type aliases. -PYQT_SIGNAL = typing.Union[QtCore.pyqtSignal, QtCore.pyqtBoundSignal] -PYQT_SLOT = typing.Union[typing.Callable[..., None], QtCore.pyqtBoundSignal] - - -class Display(sip.simplewrapper): ... - - -class xcb_connection_t(sip.simplewrapper): ... - - -class QX11Info(sip.simplewrapper): - - def __init__(self, a0: 'QX11Info') -> None: ... - - @staticmethod - def connection() -> xcb_connection_t: ... - @staticmethod - def display() -> Display: ... - @staticmethod - def setNextStartupId(id: typing.Union[QtCore.QByteArray, bytes, bytearray]) -> None: ... - @staticmethod - def nextStartupId() -> QtCore.QByteArray: ... - @staticmethod - def getTimestamp() -> int: ... - @staticmethod - def setAppUserTime(time: int) -> None: ... - @staticmethod - def setAppTime(time: int) -> None: ... - @staticmethod - def appUserTime() -> int: ... - @staticmethod - def appTime() -> int: ... - @staticmethod - def appScreen() -> int: ... - @staticmethod - def appRootWindow(screen: int = ...) -> int: ... - @staticmethod - def appDpiY(screen: int = ...) -> int: ... - @staticmethod - def appDpiX(screen: int = ...) -> int: ... - @staticmethod - def isPlatformX11() -> bool: ... diff -Nru uranium-3.3.0/stubs/PyQt5/QtXmlPatterns.pyi uranium-4.4.1/stubs/PyQt5/QtXmlPatterns.pyi --- uranium-3.3.0/stubs/PyQt5/QtXmlPatterns.pyi 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/stubs/PyQt5/QtXmlPatterns.pyi 1970-01-01 00:00:00.000000000 +0000 @@ -1,368 +0,0 @@ -# The PEP 484 type hints stub file for the QtXmlPatterns module. -# -# Generated by SIP 4.18.1 -# -# Copyright (c) 2016 Riverbank Computing Limited -# -# This file is part of PyQt5. -# -# This file may be used under the terms of the GNU General Public License -# version 3.0 as published by the Free Software Foundation and appearing in -# the file LICENSE included in the packaging of this file. Please review the -# following information to ensure the GNU General Public License version 3.0 -# requirements will be met: http://www.gnu.org/copyleft/gpl.html. -# -# If you do not wish to use this file under the terms of the GPL version 3.0 -# then you may purchase a commercial license. For more information contact -# info@riverbankcomputing.com. -# -# This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -# WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - - -import typing -import sip - -from PyQt5 import QtNetwork -from PyQt5 import QtCore - -# Support for QDate, QDateTime and QTime. -import datetime - -# Convenient type aliases. -PYQT_SIGNAL = typing.Union[QtCore.pyqtSignal, QtCore.pyqtBoundSignal] -PYQT_SLOT = typing.Union[typing.Callable[..., None], QtCore.pyqtBoundSignal] - - -class QAbstractMessageHandler(QtCore.QObject): - - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def handleMessage(self, type: QtCore.QtMsgType, description: str, identifier: QtCore.QUrl, sourceLocation: 'QSourceLocation') -> None: ... - def message(self, type: QtCore.QtMsgType, description: str, identifier: QtCore.QUrl = ..., sourceLocation: 'QSourceLocation' = ...) -> None: ... - - -class QAbstractUriResolver(QtCore.QObject): - - def __init__(self, parent: typing.Optional[QtCore.QObject] = ...) -> None: ... - - def resolve(self, relative: QtCore.QUrl, baseURI: QtCore.QUrl) -> QtCore.QUrl: ... - - -class QXmlNodeModelIndex(sip.simplewrapper): - - class DocumentOrder(int): ... - Precedes = ... # type: 'QXmlNodeModelIndex.DocumentOrder' - Is = ... # type: 'QXmlNodeModelIndex.DocumentOrder' - Follows = ... # type: 'QXmlNodeModelIndex.DocumentOrder' - - class NodeKind(int): ... - Attribute = ... # type: 'QXmlNodeModelIndex.NodeKind' - Comment = ... # type: 'QXmlNodeModelIndex.NodeKind' - Document = ... # type: 'QXmlNodeModelIndex.NodeKind' - Element = ... # type: 'QXmlNodeModelIndex.NodeKind' - Namespace = ... # type: 'QXmlNodeModelIndex.NodeKind' - ProcessingInstruction = ... # type: 'QXmlNodeModelIndex.NodeKind' - Text = ... # type: 'QXmlNodeModelIndex.NodeKind' - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, other: 'QXmlNodeModelIndex') -> None: ... - - def __hash__(self) -> int: ... - def isNull(self) -> bool: ... - def additionalData(self) -> int: ... - def model(self) -> 'QAbstractXmlNodeModel': ... - def internalPointer(self) -> typing.Any: ... - def data(self) -> int: ... - - -class QAbstractXmlNodeModel(sip.simplewrapper): - - class SimpleAxis(int): ... - Parent = ... # type: 'QAbstractXmlNodeModel.SimpleAxis' - FirstChild = ... # type: 'QAbstractXmlNodeModel.SimpleAxis' - PreviousSibling = ... # type: 'QAbstractXmlNodeModel.SimpleAxis' - NextSibling = ... # type: 'QAbstractXmlNodeModel.SimpleAxis' - - def __init__(self) -> None: ... - - @typing.overload - def createIndex(self, data: int) -> QXmlNodeModelIndex: ... - @typing.overload - def createIndex(self, data: int, additionalData: int) -> QXmlNodeModelIndex: ... - @typing.overload - def createIndex(self, pointer: typing.Any, additionalData: int = ...) -> QXmlNodeModelIndex: ... - def attributes(self, element: QXmlNodeModelIndex) -> typing.List[QXmlNodeModelIndex]: ... - def nextFromSimpleAxis(self, axis: 'QAbstractXmlNodeModel.SimpleAxis', origin: QXmlNodeModelIndex) -> QXmlNodeModelIndex: ... - def sourceLocation(self, index: QXmlNodeModelIndex) -> 'QSourceLocation': ... - def nodesByIdref(self, NCName: 'QXmlName') -> typing.Any: ... - def elementById(self, NCName: 'QXmlName') -> QXmlNodeModelIndex: ... - def namespaceBindings(self, n: QXmlNodeModelIndex) -> typing.Any: ... - def typedValue(self, n: QXmlNodeModelIndex) -> typing.Any: ... - def stringValue(self, n: QXmlNodeModelIndex) -> str: ... - def name(self, ni: QXmlNodeModelIndex) -> 'QXmlName': ... - def root(self, n: QXmlNodeModelIndex) -> QXmlNodeModelIndex: ... - def compareOrder(self, ni1: QXmlNodeModelIndex, ni2: QXmlNodeModelIndex) -> QXmlNodeModelIndex.DocumentOrder: ... - def kind(self, ni: QXmlNodeModelIndex) -> QXmlNodeModelIndex.NodeKind: ... - def documentUri(self, ni: QXmlNodeModelIndex) -> QtCore.QUrl: ... - def baseUri(self, ni: QXmlNodeModelIndex) -> QtCore.QUrl: ... - - -class QXmlItem(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, other: 'QXmlItem') -> None: ... - @typing.overload - def __init__(self, node: QXmlNodeModelIndex) -> None: ... - @typing.overload - def __init__(self, atomicValue: typing.Any) -> None: ... - - def toNodeModelIndex(self) -> QXmlNodeModelIndex: ... - def toAtomicValue(self) -> typing.Any: ... - def isAtomicValue(self) -> bool: ... - def isNode(self) -> bool: ... - def isNull(self) -> bool: ... - - -class QAbstractXmlReceiver(sip.simplewrapper): - - def __init__(self) -> None: ... - - def endOfSequence(self) -> None: ... - def startOfSequence(self) -> None: ... - def namespaceBinding(self, name: 'QXmlName') -> None: ... - def atomicValue(self, value: typing.Any) -> None: ... - def processingInstruction(self, target: 'QXmlName', value: str) -> None: ... - def endDocument(self) -> None: ... - def startDocument(self) -> None: ... - def characters(self, value: str) -> None: ... - def comment(self, value: str) -> None: ... - def attribute(self, name: 'QXmlName', value: str) -> None: ... - def endElement(self) -> None: ... - def startElement(self, name: 'QXmlName') -> None: ... - - -class QSimpleXmlNodeModel(QAbstractXmlNodeModel): - - def __init__(self, namePool: 'QXmlNamePool') -> None: ... - - def nodesByIdref(self, idref: 'QXmlName') -> typing.List[QXmlNodeModelIndex]: ... - def elementById(self, id: 'QXmlName') -> QXmlNodeModelIndex: ... - def stringValue(self, node: QXmlNodeModelIndex) -> str: ... - def namespaceBindings(self, a0: QXmlNodeModelIndex) -> typing.List['QXmlName']: ... - def namePool(self) -> 'QXmlNamePool': ... - def baseUri(self, node: QXmlNodeModelIndex) -> QtCore.QUrl: ... - - -class QSourceLocation(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, other: 'QSourceLocation') -> None: ... - @typing.overload - def __init__(self, u: QtCore.QUrl, line: int = ..., column: int = ...) -> None: ... - - def __hash__(self) -> int: ... - def isNull(self) -> bool: ... - def setUri(self, newUri: QtCore.QUrl) -> None: ... - def uri(self) -> QtCore.QUrl: ... - def setLine(self, newLine: int) -> None: ... - def line(self) -> int: ... - def setColumn(self, newColumn: int) -> None: ... - def column(self) -> int: ... - - -class QXmlSerializer(QAbstractXmlReceiver): - - def __init__(self, query: 'QXmlQuery', outputDevice: QtCore.QIODevice) -> None: ... - - def codec(self) -> QtCore.QTextCodec: ... - def setCodec(self, codec: QtCore.QTextCodec) -> None: ... - def outputDevice(self) -> QtCore.QIODevice: ... - def endOfSequence(self) -> None: ... - def startOfSequence(self) -> None: ... - def endDocument(self) -> None: ... - def startDocument(self) -> None: ... - def atomicValue(self, value: typing.Any) -> None: ... - def processingInstruction(self, name: 'QXmlName', value: str) -> None: ... - def attribute(self, name: 'QXmlName', value: str) -> None: ... - def endElement(self) -> None: ... - def startElement(self, name: 'QXmlName') -> None: ... - def comment(self, value: str) -> None: ... - def characters(self, value: str) -> None: ... - def namespaceBinding(self, nb: 'QXmlName') -> None: ... - - -class QXmlFormatter(QXmlSerializer): - - def __init__(self, query: 'QXmlQuery', outputDevice: QtCore.QIODevice) -> None: ... - - def setIndentationDepth(self, depth: int) -> None: ... - def indentationDepth(self) -> int: ... - def endOfSequence(self) -> None: ... - def startOfSequence(self) -> None: ... - def endDocument(self) -> None: ... - def startDocument(self) -> None: ... - def atomicValue(self, value: typing.Any) -> None: ... - def processingInstruction(self, name: 'QXmlName', value: str) -> None: ... - def attribute(self, name: 'QXmlName', value: str) -> None: ... - def endElement(self) -> None: ... - def startElement(self, name: 'QXmlName') -> None: ... - def comment(self, value: str) -> None: ... - def characters(self, value: str) -> None: ... - - -class QXmlName(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, namePool: 'QXmlNamePool', localName: str, namespaceUri: str = ..., prefix: str = ...) -> None: ... - @typing.overload - def __init__(self, a0: 'QXmlName') -> None: ... - - def __hash__(self) -> int: ... - @staticmethod - def fromClarkName(clarkName: str, namePool: 'QXmlNamePool') -> 'QXmlName': ... - @staticmethod - def isNCName(candidate: str) -> bool: ... - def isNull(self) -> bool: ... - def toClarkName(self, query: 'QXmlNamePool') -> str: ... - def localName(self, query: 'QXmlNamePool') -> str: ... - def prefix(self, query: 'QXmlNamePool') -> str: ... - def namespaceUri(self, query: 'QXmlNamePool') -> str: ... - - -class QXmlNamePool(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, other: 'QXmlNamePool') -> None: ... - - -class QXmlQuery(sip.simplewrapper): - - class QueryLanguage(int): ... - XQuery10 = ... # type: 'QXmlQuery.QueryLanguage' - XSLT20 = ... # type: 'QXmlQuery.QueryLanguage' - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, other: 'QXmlQuery') -> None: ... - @typing.overload - def __init__(self, np: QXmlNamePool) -> None: ... - @typing.overload - def __init__(self, queryLanguage: 'QXmlQuery.QueryLanguage', pool: QXmlNamePool = ...) -> None: ... - - def queryLanguage(self) -> 'QXmlQuery.QueryLanguage': ... - def networkAccessManager(self) -> QtNetwork.QNetworkAccessManager: ... - def setNetworkAccessManager(self, newManager: QtNetwork.QNetworkAccessManager) -> None: ... - def initialTemplateName(self) -> QXmlName: ... - @typing.overload - def setInitialTemplateName(self, name: QXmlName) -> None: ... - @typing.overload - def setInitialTemplateName(self, name: str) -> None: ... - @typing.overload - def setFocus(self, item: QXmlItem) -> None: ... - @typing.overload - def setFocus(self, documentURI: QtCore.QUrl) -> bool: ... - @typing.overload - def setFocus(self, document: QtCore.QIODevice) -> bool: ... - @typing.overload - def setFocus(self, focus: str) -> bool: ... - def uriResolver(self) -> QAbstractUriResolver: ... - def setUriResolver(self, resolver: QAbstractUriResolver) -> None: ... - def evaluateToString(self) -> str: ... - def evaluateToStringList(self) -> typing.List[str]: ... - @typing.overload - def evaluateTo(self, result: 'QXmlResultItems') -> None: ... - @typing.overload - def evaluateTo(self, callback: QAbstractXmlReceiver) -> bool: ... - @typing.overload - def evaluateTo(self, target: QtCore.QIODevice) -> bool: ... - def isValid(self) -> bool: ... - @typing.overload - def bindVariable(self, name: QXmlName, value: QXmlItem) -> None: ... - @typing.overload - def bindVariable(self, name: QXmlName, a1: QtCore.QIODevice) -> None: ... - @typing.overload - def bindVariable(self, name: QXmlName, query: 'QXmlQuery') -> None: ... - @typing.overload - def bindVariable(self, localName: str, value: QXmlItem) -> None: ... - @typing.overload - def bindVariable(self, localName: str, a1: QtCore.QIODevice) -> None: ... - @typing.overload - def bindVariable(self, localName: str, query: 'QXmlQuery') -> None: ... - def namePool(self) -> QXmlNamePool: ... - @typing.overload - def setQuery(self, sourceCode: str, documentUri: QtCore.QUrl = ...) -> None: ... - @typing.overload - def setQuery(self, sourceCode: QtCore.QIODevice, documentUri: QtCore.QUrl = ...) -> None: ... - @typing.overload - def setQuery(self, queryURI: QtCore.QUrl, baseUri: QtCore.QUrl = ...) -> None: ... - def messageHandler(self) -> QAbstractMessageHandler: ... - def setMessageHandler(self, messageHandler: QAbstractMessageHandler) -> None: ... - - -class QXmlResultItems(sip.simplewrapper): - - def __init__(self) -> None: ... - - def current(self) -> QXmlItem: ... - def next(self) -> QXmlItem: ... - def hasError(self) -> bool: ... - - -class QXmlSchema(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, other: 'QXmlSchema') -> None: ... - - def networkAccessManager(self) -> QtNetwork.QNetworkAccessManager: ... - def setNetworkAccessManager(self, networkmanager: QtNetwork.QNetworkAccessManager) -> None: ... - def uriResolver(self) -> QAbstractUriResolver: ... - def setUriResolver(self, resolver: QAbstractUriResolver) -> None: ... - def messageHandler(self) -> QAbstractMessageHandler: ... - def setMessageHandler(self, handler: QAbstractMessageHandler) -> None: ... - def documentUri(self) -> QtCore.QUrl: ... - def namePool(self) -> QXmlNamePool: ... - def isValid(self) -> bool: ... - @typing.overload - def load(self, source: QtCore.QUrl) -> bool: ... - @typing.overload - def load(self, source: QtCore.QIODevice, documentUri: QtCore.QUrl = ...) -> bool: ... - @typing.overload - def load(self, data: typing.Union[QtCore.QByteArray, bytes, bytearray], documentUri: QtCore.QUrl = ...) -> bool: ... - - -class QXmlSchemaValidator(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, schema: QXmlSchema) -> None: ... - - def networkAccessManager(self) -> QtNetwork.QNetworkAccessManager: ... - def setNetworkAccessManager(self, networkmanager: QtNetwork.QNetworkAccessManager) -> None: ... - def uriResolver(self) -> QAbstractUriResolver: ... - def setUriResolver(self, resolver: QAbstractUriResolver) -> None: ... - def messageHandler(self) -> QAbstractMessageHandler: ... - def setMessageHandler(self, handler: QAbstractMessageHandler) -> None: ... - def schema(self) -> QXmlSchema: ... - def namePool(self) -> QXmlNamePool: ... - @typing.overload - def validate(self, source: QtCore.QUrl) -> bool: ... - @typing.overload - def validate(self, source: QtCore.QIODevice, documentUri: QtCore.QUrl = ...) -> bool: ... - @typing.overload - def validate(self, data: typing.Union[QtCore.QByteArray, bytes, bytearray], documentUri: QtCore.QUrl = ...) -> bool: ... - def setSchema(self, schema: QXmlSchema) -> None: ... diff -Nru uranium-3.3.0/stubs/PyQt5/QtXml.pyi uranium-4.4.1/stubs/PyQt5/QtXml.pyi --- uranium-3.3.0/stubs/PyQt5/QtXml.pyi 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/stubs/PyQt5/QtXml.pyi 1970-01-01 00:00:00.000000000 +0000 @@ -1,698 +0,0 @@ -# The PEP 484 type hints stub file for the QtXml module. -# -# Generated by SIP 4.18.1 -# -# Copyright (c) 2016 Riverbank Computing Limited -# -# This file is part of PyQt5. -# -# This file may be used under the terms of the GNU General Public License -# version 3.0 as published by the Free Software Foundation and appearing in -# the file LICENSE included in the packaging of this file. Please review the -# following information to ensure the GNU General Public License version 3.0 -# requirements will be met: http://www.gnu.org/copyleft/gpl.html. -# -# If you do not wish to use this file under the terms of the GPL version 3.0 -# then you may purchase a commercial license. For more information contact -# info@riverbankcomputing.com. -# -# This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -# WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - - -import typing -import sip - -from PyQt5 import QtCore - -# Support for QDate, QDateTime and QTime. -import datetime - -# Convenient type aliases. -PYQT_SIGNAL = typing.Union[QtCore.pyqtSignal, QtCore.pyqtBoundSignal] -PYQT_SLOT = typing.Union[typing.Callable[..., None], QtCore.pyqtBoundSignal] - - -class QXmlNamespaceSupport(sip.simplewrapper): - - def __init__(self) -> None: ... - - def reset(self) -> None: ... - def popContext(self) -> None: ... - def pushContext(self) -> None: ... - @typing.overload - def prefixes(self) -> typing.List[str]: ... - @typing.overload - def prefixes(self, a0: str) -> typing.List[str]: ... - def processName(self, a0: str, a1: bool, a2: str, a3: str) -> None: ... - def splitName(self, a0: str, a1: str, a2: str) -> None: ... - def uri(self, a0: str) -> str: ... - def prefix(self, a0: str) -> str: ... - def setPrefix(self, a0: str, a1: str) -> None: ... - - -class QXmlAttributes(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QXmlAttributes') -> None: ... - - def __len__(self) -> int: ... - def count(self) -> int: ... - def append(self, qName: str, uri: str, localPart: str, value: str) -> None: ... - def clear(self) -> None: ... - @typing.overload - def value(self, index: int) -> str: ... - @typing.overload - def value(self, qName: str) -> str: ... - @typing.overload - def value(self, uri: str, localName: str) -> str: ... - @typing.overload - def type(self, index: int) -> str: ... - @typing.overload - def type(self, qName: str) -> str: ... - @typing.overload - def type(self, uri: str, localName: str) -> str: ... - def uri(self, index: int) -> str: ... - def qName(self, index: int) -> str: ... - def localName(self, index: int) -> str: ... - def length(self) -> int: ... - @typing.overload - def index(self, qName: str) -> int: ... - @typing.overload - def index(self, uri: str, localPart: str) -> int: ... - - -class QXmlInputSource(sip.simplewrapper): - - EndOfData = ... # type: int - EndOfDocument = ... # type: int - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, dev: QtCore.QIODevice) -> None: ... - @typing.overload - def __init__(self, a0: 'QXmlInputSource') -> None: ... - - def fromRawData(self, data: typing.Union[QtCore.QByteArray, bytes, bytearray], beginning: bool = ...) -> str: ... - def reset(self) -> None: ... - def next(self) -> str: ... - def data(self) -> str: ... - def fetchData(self) -> None: ... - @typing.overload - def setData(self, dat: str) -> None: ... - @typing.overload - def setData(self, dat: typing.Union[QtCore.QByteArray, bytes, bytearray]) -> None: ... - - -class QXmlParseException(sip.simplewrapper): - - @typing.overload - def __init__(self, name: str = ..., column: int = ..., line: int = ..., publicId: str = ..., systemId: str = ...) -> None: ... - @typing.overload - def __init__(self, other: 'QXmlParseException') -> None: ... - - def message(self) -> str: ... - def systemId(self) -> str: ... - def publicId(self) -> str: ... - def lineNumber(self) -> int: ... - def columnNumber(self) -> int: ... - - -class QXmlReader(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QXmlReader') -> None: ... - - @typing.overload - def parse(self, input: QXmlInputSource) -> bool: ... - @typing.overload - def parse(self, input: QXmlInputSource) -> bool: ... - def declHandler(self) -> 'QXmlDeclHandler': ... - def setDeclHandler(self, handler: 'QXmlDeclHandler') -> None: ... - def lexicalHandler(self) -> 'QXmlLexicalHandler': ... - def setLexicalHandler(self, handler: 'QXmlLexicalHandler') -> None: ... - def errorHandler(self) -> 'QXmlErrorHandler': ... - def setErrorHandler(self, handler: 'QXmlErrorHandler') -> None: ... - def contentHandler(self) -> 'QXmlContentHandler': ... - def setContentHandler(self, handler: 'QXmlContentHandler') -> None: ... - def DTDHandler(self) -> 'QXmlDTDHandler': ... - def setDTDHandler(self, handler: 'QXmlDTDHandler') -> None: ... - def entityResolver(self) -> 'QXmlEntityResolver': ... - def setEntityResolver(self, handler: 'QXmlEntityResolver') -> None: ... - def hasProperty(self, name: str) -> bool: ... - def setProperty(self, name: str, value: sip.voidptr) -> None: ... - def property(self, name: str) -> typing.Tuple[sip.voidptr, bool]: ... - def hasFeature(self, name: str) -> bool: ... - def setFeature(self, name: str, value: bool) -> None: ... - def feature(self, name: str) -> typing.Tuple[bool, bool]: ... - - -class QXmlSimpleReader(QXmlReader): - - def __init__(self) -> None: ... - - def parseContinue(self) -> bool: ... - @typing.overload - def parse(self, input: QXmlInputSource) -> bool: ... - @typing.overload - def parse(self, input: QXmlInputSource, incremental: bool) -> bool: ... - def declHandler(self) -> 'QXmlDeclHandler': ... - def setDeclHandler(self, handler: 'QXmlDeclHandler') -> None: ... - def lexicalHandler(self) -> 'QXmlLexicalHandler': ... - def setLexicalHandler(self, handler: 'QXmlLexicalHandler') -> None: ... - def errorHandler(self) -> 'QXmlErrorHandler': ... - def setErrorHandler(self, handler: 'QXmlErrorHandler') -> None: ... - def contentHandler(self) -> 'QXmlContentHandler': ... - def setContentHandler(self, handler: 'QXmlContentHandler') -> None: ... - def DTDHandler(self) -> 'QXmlDTDHandler': ... - def setDTDHandler(self, handler: 'QXmlDTDHandler') -> None: ... - def entityResolver(self) -> 'QXmlEntityResolver': ... - def setEntityResolver(self, handler: 'QXmlEntityResolver') -> None: ... - def hasProperty(self, name: str) -> bool: ... - def setProperty(self, name: str, value: sip.voidptr) -> None: ... - def property(self, name: str) -> typing.Tuple[sip.voidptr, bool]: ... - def hasFeature(self, name: str) -> bool: ... - def setFeature(self, name: str, value: bool) -> None: ... - def feature(self, name: str) -> typing.Tuple[bool, bool]: ... - - -class QXmlLocator(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QXmlLocator') -> None: ... - - def lineNumber(self) -> int: ... - def columnNumber(self) -> int: ... - - -class QXmlContentHandler(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QXmlContentHandler') -> None: ... - - def errorString(self) -> str: ... - def skippedEntity(self, name: str) -> bool: ... - def processingInstruction(self, target: str, data: str) -> bool: ... - def ignorableWhitespace(self, ch: str) -> bool: ... - def characters(self, ch: str) -> bool: ... - def endElement(self, namespaceURI: str, localName: str, qName: str) -> bool: ... - def startElement(self, namespaceURI: str, localName: str, qName: str, atts: QXmlAttributes) -> bool: ... - def endPrefixMapping(self, prefix: str) -> bool: ... - def startPrefixMapping(self, prefix: str, uri: str) -> bool: ... - def endDocument(self) -> bool: ... - def startDocument(self) -> bool: ... - def setDocumentLocator(self, locator: QXmlLocator) -> None: ... - - -class QXmlErrorHandler(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QXmlErrorHandler') -> None: ... - - def errorString(self) -> str: ... - def fatalError(self, exception: QXmlParseException) -> bool: ... - def error(self, exception: QXmlParseException) -> bool: ... - def warning(self, exception: QXmlParseException) -> bool: ... - - -class QXmlDTDHandler(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QXmlDTDHandler') -> None: ... - - def errorString(self) -> str: ... - def unparsedEntityDecl(self, name: str, publicId: str, systemId: str, notationName: str) -> bool: ... - def notationDecl(self, name: str, publicId: str, systemId: str) -> bool: ... - - -class QXmlEntityResolver(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QXmlEntityResolver') -> None: ... - - def errorString(self) -> str: ... - def resolveEntity(self, publicId: str, systemId: str) -> typing.Tuple[bool, QXmlInputSource]: ... - - -class QXmlLexicalHandler(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QXmlLexicalHandler') -> None: ... - - def errorString(self) -> str: ... - def comment(self, ch: str) -> bool: ... - def endCDATA(self) -> bool: ... - def startCDATA(self) -> bool: ... - def endEntity(self, name: str) -> bool: ... - def startEntity(self, name: str) -> bool: ... - def endDTD(self) -> bool: ... - def startDTD(self, name: str, publicId: str, systemId: str) -> bool: ... - - -class QXmlDeclHandler(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QXmlDeclHandler') -> None: ... - - def errorString(self) -> str: ... - def externalEntityDecl(self, name: str, publicId: str, systemId: str) -> bool: ... - def internalEntityDecl(self, name: str, value: str) -> bool: ... - def attributeDecl(self, eName: str, aName: str, type: str, valueDefault: str, value: str) -> bool: ... - - -class QXmlDefaultHandler(QXmlContentHandler, QXmlErrorHandler, QXmlDTDHandler, QXmlEntityResolver, QXmlLexicalHandler, QXmlDeclHandler): - - def __init__(self) -> None: ... - - def errorString(self) -> str: ... - def externalEntityDecl(self, name: str, publicId: str, systemId: str) -> bool: ... - def internalEntityDecl(self, name: str, value: str) -> bool: ... - def attributeDecl(self, eName: str, aName: str, type: str, valueDefault: str, value: str) -> bool: ... - def comment(self, ch: str) -> bool: ... - def endCDATA(self) -> bool: ... - def startCDATA(self) -> bool: ... - def endEntity(self, name: str) -> bool: ... - def startEntity(self, name: str) -> bool: ... - def endDTD(self) -> bool: ... - def startDTD(self, name: str, publicId: str, systemId: str) -> bool: ... - def resolveEntity(self, publicId: str, systemId: str) -> typing.Tuple[bool, QXmlInputSource]: ... - def unparsedEntityDecl(self, name: str, publicId: str, systemId: str, notationName: str) -> bool: ... - def notationDecl(self, name: str, publicId: str, systemId: str) -> bool: ... - def fatalError(self, exception: QXmlParseException) -> bool: ... - def error(self, exception: QXmlParseException) -> bool: ... - def warning(self, exception: QXmlParseException) -> bool: ... - def skippedEntity(self, name: str) -> bool: ... - def processingInstruction(self, target: str, data: str) -> bool: ... - def ignorableWhitespace(self, ch: str) -> bool: ... - def characters(self, ch: str) -> bool: ... - def endElement(self, namespaceURI: str, localName: str, qName: str) -> bool: ... - def startElement(self, namespaceURI: str, localName: str, qName: str, atts: QXmlAttributes) -> bool: ... - def endPrefixMapping(self, prefix: str) -> bool: ... - def startPrefixMapping(self, prefix: str, uri: str) -> bool: ... - def endDocument(self) -> bool: ... - def startDocument(self) -> bool: ... - def setDocumentLocator(self, locator: QXmlLocator) -> None: ... - - -class QDomImplementation(sip.simplewrapper): - - class InvalidDataPolicy(int): ... - AcceptInvalidChars = ... # type: 'QDomImplementation.InvalidDataPolicy' - DropInvalidChars = ... # type: 'QDomImplementation.InvalidDataPolicy' - ReturnNullNode = ... # type: 'QDomImplementation.InvalidDataPolicy' - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QDomImplementation') -> None: ... - - def isNull(self) -> bool: ... - @staticmethod - def setInvalidDataPolicy(policy: 'QDomImplementation.InvalidDataPolicy') -> None: ... - @staticmethod - def invalidDataPolicy() -> 'QDomImplementation.InvalidDataPolicy': ... - def createDocument(self, nsURI: str, qName: str, doctype: 'QDomDocumentType') -> 'QDomDocument': ... - def createDocumentType(self, qName: str, publicId: str, systemId: str) -> 'QDomDocumentType': ... - def hasFeature(self, feature: str, version: str) -> bool: ... - - -class QDomNode(sip.simplewrapper): - - class EncodingPolicy(int): ... - EncodingFromDocument = ... # type: 'QDomNode.EncodingPolicy' - EncodingFromTextStream = ... # type: 'QDomNode.EncodingPolicy' - - class NodeType(int): ... - ElementNode = ... # type: 'QDomNode.NodeType' - AttributeNode = ... # type: 'QDomNode.NodeType' - TextNode = ... # type: 'QDomNode.NodeType' - CDATASectionNode = ... # type: 'QDomNode.NodeType' - EntityReferenceNode = ... # type: 'QDomNode.NodeType' - EntityNode = ... # type: 'QDomNode.NodeType' - ProcessingInstructionNode = ... # type: 'QDomNode.NodeType' - CommentNode = ... # type: 'QDomNode.NodeType' - DocumentNode = ... # type: 'QDomNode.NodeType' - DocumentTypeNode = ... # type: 'QDomNode.NodeType' - DocumentFragmentNode = ... # type: 'QDomNode.NodeType' - NotationNode = ... # type: 'QDomNode.NodeType' - BaseNode = ... # type: 'QDomNode.NodeType' - CharacterDataNode = ... # type: 'QDomNode.NodeType' - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QDomNode') -> None: ... - - def columnNumber(self) -> int: ... - def lineNumber(self) -> int: ... - def nextSiblingElement(self, taName: str = ...) -> 'QDomElement': ... - def previousSiblingElement(self, tagName: str = ...) -> 'QDomElement': ... - def lastChildElement(self, tagName: str = ...) -> 'QDomElement': ... - def firstChildElement(self, tagName: str = ...) -> 'QDomElement': ... - def save(self, a0: QtCore.QTextStream, a1: int, a2: 'QDomNode.EncodingPolicy' = ...) -> None: ... - def toComment(self) -> 'QDomComment': ... - def toCharacterData(self) -> 'QDomCharacterData': ... - def toProcessingInstruction(self) -> 'QDomProcessingInstruction': ... - def toNotation(self) -> 'QDomNotation': ... - def toEntity(self) -> 'QDomEntity': ... - def toText(self) -> 'QDomText': ... - def toEntityReference(self) -> 'QDomEntityReference': ... - def toElement(self) -> 'QDomElement': ... - def toDocumentType(self) -> 'QDomDocumentType': ... - def toDocument(self) -> 'QDomDocument': ... - def toDocumentFragment(self) -> 'QDomDocumentFragment': ... - def toCDATASection(self) -> 'QDomCDATASection': ... - def toAttr(self) -> 'QDomAttr': ... - def clear(self) -> None: ... - def isNull(self) -> bool: ... - def namedItem(self, name: str) -> 'QDomNode': ... - def isComment(self) -> bool: ... - def isCharacterData(self) -> bool: ... - def isProcessingInstruction(self) -> bool: ... - def isNotation(self) -> bool: ... - def isEntity(self) -> bool: ... - def isText(self) -> bool: ... - def isEntityReference(self) -> bool: ... - def isElement(self) -> bool: ... - def isDocumentType(self) -> bool: ... - def isDocument(self) -> bool: ... - def isDocumentFragment(self) -> bool: ... - def isCDATASection(self) -> bool: ... - def isAttr(self) -> bool: ... - def setPrefix(self, pre: str) -> None: ... - def prefix(self) -> str: ... - def setNodeValue(self, a0: str) -> None: ... - def nodeValue(self) -> str: ... - def hasAttributes(self) -> bool: ... - def localName(self) -> str: ... - def namespaceURI(self) -> str: ... - def ownerDocument(self) -> 'QDomDocument': ... - def attributes(self) -> 'QDomNamedNodeMap': ... - def nextSibling(self) -> 'QDomNode': ... - def previousSibling(self) -> 'QDomNode': ... - def lastChild(self) -> 'QDomNode': ... - def firstChild(self) -> 'QDomNode': ... - def childNodes(self) -> 'QDomNodeList': ... - def parentNode(self) -> 'QDomNode': ... - def nodeType(self) -> 'QDomNode.NodeType': ... - def nodeName(self) -> str: ... - def isSupported(self, feature: str, version: str) -> bool: ... - def normalize(self) -> None: ... - def cloneNode(self, deep: bool = ...) -> 'QDomNode': ... - def hasChildNodes(self) -> bool: ... - def appendChild(self, newChild: 'QDomNode') -> 'QDomNode': ... - def removeChild(self, oldChild: 'QDomNode') -> 'QDomNode': ... - def replaceChild(self, newChild: 'QDomNode', oldChild: 'QDomNode') -> 'QDomNode': ... - def insertAfter(self, newChild: 'QDomNode', refChild: 'QDomNode') -> 'QDomNode': ... - def insertBefore(self, newChild: 'QDomNode', refChild: 'QDomNode') -> 'QDomNode': ... - - -class QDomNodeList(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QDomNodeList') -> None: ... - - def isEmpty(self) -> bool: ... - def size(self) -> int: ... - def __len__(self) -> int: ... - def count(self) -> int: ... - def length(self) -> int: ... - def at(self, index: int) -> QDomNode: ... - def item(self, index: int) -> QDomNode: ... - - -class QDomDocumentType(QDomNode): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, x: 'QDomDocumentType') -> None: ... - - def nodeType(self) -> QDomNode.NodeType: ... - def internalSubset(self) -> str: ... - def systemId(self) -> str: ... - def publicId(self) -> str: ... - def notations(self) -> 'QDomNamedNodeMap': ... - def entities(self) -> 'QDomNamedNodeMap': ... - def name(self) -> str: ... - - -class QDomDocument(QDomNode): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, name: str) -> None: ... - @typing.overload - def __init__(self, doctype: QDomDocumentType) -> None: ... - @typing.overload - def __init__(self, x: 'QDomDocument') -> None: ... - - def toByteArray(self, indent: int = ...) -> QtCore.QByteArray: ... - def toString(self, indent: int = ...) -> str: ... - @typing.overload - def setContent(self, text: typing.Union[QtCore.QByteArray, bytes, bytearray], namespaceProcessing: bool) -> typing.Tuple[bool, str, int, int]: ... - @typing.overload - def setContent(self, text: str, namespaceProcessing: bool) -> typing.Tuple[bool, str, int, int]: ... - @typing.overload - def setContent(self, dev: QtCore.QIODevice, namespaceProcessing: bool) -> typing.Tuple[bool, str, int, int]: ... - @typing.overload - def setContent(self, source: QXmlInputSource, namespaceProcessing: bool) -> typing.Tuple[bool, str, int, int]: ... - @typing.overload - def setContent(self, text: typing.Union[QtCore.QByteArray, bytes, bytearray]) -> typing.Tuple[bool, str, int, int]: ... - @typing.overload - def setContent(self, text: str) -> typing.Tuple[bool, str, int, int]: ... - @typing.overload - def setContent(self, dev: QtCore.QIODevice) -> typing.Tuple[bool, str, int, int]: ... - @typing.overload - def setContent(self, source: QXmlInputSource, reader: QXmlReader) -> typing.Tuple[bool, str, int, int]: ... - def nodeType(self) -> QDomNode.NodeType: ... - def documentElement(self) -> 'QDomElement': ... - def implementation(self) -> QDomImplementation: ... - def doctype(self) -> QDomDocumentType: ... - def elementById(self, elementId: str) -> 'QDomElement': ... - def elementsByTagNameNS(self, nsURI: str, localName: str) -> QDomNodeList: ... - def createAttributeNS(self, nsURI: str, qName: str) -> 'QDomAttr': ... - def createElementNS(self, nsURI: str, qName: str) -> 'QDomElement': ... - def importNode(self, importedNode: QDomNode, deep: bool) -> QDomNode: ... - def elementsByTagName(self, tagname: str) -> QDomNodeList: ... - def createEntityReference(self, name: str) -> 'QDomEntityReference': ... - def createAttribute(self, name: str) -> 'QDomAttr': ... - def createProcessingInstruction(self, target: str, data: str) -> 'QDomProcessingInstruction': ... - def createCDATASection(self, data: str) -> 'QDomCDATASection': ... - def createComment(self, data: str) -> 'QDomComment': ... - def createTextNode(self, data: str) -> 'QDomText': ... - def createDocumentFragment(self) -> 'QDomDocumentFragment': ... - def createElement(self, tagName: str) -> 'QDomElement': ... - - -class QDomNamedNodeMap(sip.simplewrapper): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, a0: 'QDomNamedNodeMap') -> None: ... - - def contains(self, name: str) -> bool: ... - def isEmpty(self) -> bool: ... - def size(self) -> int: ... - def __len__(self) -> int: ... - def count(self) -> int: ... - def length(self) -> int: ... - def removeNamedItemNS(self, nsURI: str, localName: str) -> QDomNode: ... - def setNamedItemNS(self, newNode: QDomNode) -> QDomNode: ... - def namedItemNS(self, nsURI: str, localName: str) -> QDomNode: ... - def item(self, index: int) -> QDomNode: ... - def removeNamedItem(self, name: str) -> QDomNode: ... - def setNamedItem(self, newNode: QDomNode) -> QDomNode: ... - def namedItem(self, name: str) -> QDomNode: ... - - -class QDomDocumentFragment(QDomNode): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, x: 'QDomDocumentFragment') -> None: ... - - def nodeType(self) -> QDomNode.NodeType: ... - - -class QDomCharacterData(QDomNode): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, x: 'QDomCharacterData') -> None: ... - - def nodeType(self) -> QDomNode.NodeType: ... - def setData(self, a0: str) -> None: ... - def data(self) -> str: ... - def length(self) -> int: ... - def replaceData(self, offset: int, count: int, arg: str) -> None: ... - def deleteData(self, offset: int, count: int) -> None: ... - def insertData(self, offset: int, arg: str) -> None: ... - def appendData(self, arg: str) -> None: ... - def substringData(self, offset: int, count: int) -> str: ... - - -class QDomAttr(QDomNode): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, x: 'QDomAttr') -> None: ... - - def nodeType(self) -> QDomNode.NodeType: ... - def setValue(self, a0: str) -> None: ... - def value(self) -> str: ... - def ownerElement(self) -> 'QDomElement': ... - def specified(self) -> bool: ... - def name(self) -> str: ... - - -class QDomElement(QDomNode): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, x: 'QDomElement') -> None: ... - - def text(self) -> str: ... - def nodeType(self) -> QDomNode.NodeType: ... - def attributes(self) -> QDomNamedNodeMap: ... - def setTagName(self, name: str) -> None: ... - def tagName(self) -> str: ... - def hasAttributeNS(self, nsURI: str, localName: str) -> bool: ... - def elementsByTagNameNS(self, nsURI: str, localName: str) -> QDomNodeList: ... - def setAttributeNodeNS(self, newAttr: QDomAttr) -> QDomAttr: ... - def attributeNodeNS(self, nsURI: str, localName: str) -> QDomAttr: ... - def removeAttributeNS(self, nsURI: str, localName: str) -> None: ... - @typing.overload - def setAttributeNS(self, nsURI: str, qName: str, value: str) -> None: ... - @typing.overload - def setAttributeNS(self, nsURI: str, qName: str, value: int) -> None: ... - @typing.overload - def setAttributeNS(self, nsURI: str, qName: str, value: int) -> None: ... - @typing.overload - def setAttributeNS(self, nsURI: str, qName: str, value: float) -> None: ... - @typing.overload - def setAttributeNS(self, nsURI: str, qName: str, value: int) -> None: ... - def attributeNS(self, nsURI: str, localName: str, defaultValue: str = ...) -> str: ... - def hasAttribute(self, name: str) -> bool: ... - def elementsByTagName(self, tagname: str) -> QDomNodeList: ... - def removeAttributeNode(self, oldAttr: QDomAttr) -> QDomAttr: ... - def setAttributeNode(self, newAttr: QDomAttr) -> QDomAttr: ... - def attributeNode(self, name: str) -> QDomAttr: ... - def removeAttribute(self, name: str) -> None: ... - @typing.overload - def setAttribute(self, name: str, value: str) -> None: ... - @typing.overload - def setAttribute(self, name: str, value: int) -> None: ... - @typing.overload - def setAttribute(self, name: str, value: int) -> None: ... - @typing.overload - def setAttribute(self, name: str, value: float) -> None: ... - @typing.overload - def setAttribute(self, name: str, value: int) -> None: ... - def attribute(self, name: str, defaultValue: str = ...) -> str: ... - - -class QDomText(QDomCharacterData): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, x: 'QDomText') -> None: ... - - def nodeType(self) -> QDomNode.NodeType: ... - def splitText(self, offset: int) -> 'QDomText': ... - - -class QDomComment(QDomCharacterData): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, x: 'QDomComment') -> None: ... - - def nodeType(self) -> QDomNode.NodeType: ... - - -class QDomCDATASection(QDomText): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, x: 'QDomCDATASection') -> None: ... - - def nodeType(self) -> QDomNode.NodeType: ... - - -class QDomNotation(QDomNode): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, x: 'QDomNotation') -> None: ... - - def nodeType(self) -> QDomNode.NodeType: ... - def systemId(self) -> str: ... - def publicId(self) -> str: ... - - -class QDomEntity(QDomNode): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, x: 'QDomEntity') -> None: ... - - def nodeType(self) -> QDomNode.NodeType: ... - def notationName(self) -> str: ... - def systemId(self) -> str: ... - def publicId(self) -> str: ... - - -class QDomEntityReference(QDomNode): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, x: 'QDomEntityReference') -> None: ... - - def nodeType(self) -> QDomNode.NodeType: ... - - -class QDomProcessingInstruction(QDomNode): - - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__(self, x: 'QDomProcessingInstruction') -> None: ... - - def nodeType(self) -> QDomNode.NodeType: ... - def setData(self, d: str) -> None: ... - def data(self) -> str: ... - def target(self) -> str: ... diff -Nru uranium-3.3.0/stubs/scipy/spatial/__init__.pyi uranium-4.4.1/stubs/scipy/spatial/__init__.pyi --- uranium-3.3.0/stubs/scipy/spatial/__init__.pyi 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/stubs/scipy/spatial/__init__.pyi 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -# diff -Nru uranium-3.3.0/stubs/sip.pyi uranium-4.4.1/stubs/sip.pyi --- uranium-3.3.0/stubs/sip.pyi 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/stubs/sip.pyi 1970-01-01 00:00:00.000000000 +0000 @@ -1,92 +0,0 @@ -# This file is the Python type hints stub file for the sip extension module. -# -# Copyright (c) 2016 Riverbank Computing Limited -# -# This file is part of SIP. -# -# This copy of SIP is licensed for use under the terms of the SIP License -# Agreement. See the file LICENSE for more details. -# -# This copy of SIP may also used under the terms of the GNU General Public -# License v2 or v3 as published by the Free Software Foundation which can be -# found in the files LICENSE-GPL2 and LICENSE-GPL3 included in this package. -# -# SIP is supplied WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - - -from typing import overload, Sequence, Union, TypeVar, Generic - - -# Constants. -SIP_VERSION = ... # type: int -SIP_VERSION_STR = ... # type: str - - -# The bases for SIP generated types. -class wrappertype: ... -class simplewrapper: ... -class wrapper(simplewrapper): ... - - -# PEP 484 has no explicit support for the buffer protocol so we just name types -# we know that implement it. -Buffer = Union['array', 'voidptr', str, bytes, bytearray] - -# The array type. -T = TypeVar('T') -class array(Generic[T], Sequence): ... - - -# The voidptr type. -class voidptr: - - def __init__(addr: Union[int, Buffer], size: int = -1, writeable: bool = True) -> None: ... - - def __int__(self) -> int: ... - - @overload - def __getitem__(self, i: int) -> bytes: ... - - @overload - def __getitem__(self, s: slice) -> 'voidptr': ... - - def __hex__(self) -> str: ... - - def __len__(self) -> int: ... - - def __setitem__(self, i: Union[int, slice], v: Buffer) -> None: ... - - def asarray(self, size: int = -1) -> array: ... - - # Python doesn't expose the capsule type. - #def ascapsule(self) -> capsule: ... - - def asstring(self, size: int = -1) -> bytes: ... - - def getsize(self) -> int: ... - - def getwriteable(self) -> bool: ... - - def setsize(self, size: int) -> None: ... - - def setwriteable(self, bool) -> None: ... - - -# Remaining functions. -def cast(obj: simplewrapper, type: wrappertype) -> simplewrapper: ... -def delete(obj: simplewrapper) -> None: ... -def dump(obj: simplewrapper) -> None: ... -def enableautoconversion(type: wrappertype, enable: bool) -> bool: ... -def getapi(name: str) -> int: ... -def isdeleted(obj: simplewrapper) -> bool: ... -def ispycreated(obj: simplewrapper) -> bool: ... -def ispyowned(obj: simplewrapper) -> bool: ... -def setapi(name: str, version: int) -> None: ... -def setdeleted(obj: simplewrapper) -> None: ... -def setdestroyonexit(destroy: bool) -> None: ... -def settracemask(mask: int) -> None: ... -def transferback(obj: wrapper) -> None: ... -def transferto(obj: wrapper, owner: wrapper) -> None: ... -def unwrapinstance(obj: simplewrapper) -> None: ... -def wrapinstance(addr: int, type: wrappertype) -> simplewrapper: ... diff -Nru uranium-3.3.0/stubs/_thread.pyi uranium-4.4.1/stubs/_thread.pyi --- uranium-3.3.0/stubs/_thread.pyi 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/stubs/_thread.pyi 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -def get_ident() -> int: ... diff -Nru uranium-3.3.0/tests/benchmarks/conftest.py uranium-4.4.1/tests/benchmarks/conftest.py --- uranium-3.3.0/tests/benchmarks/conftest.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/tests/benchmarks/conftest.py 2019-11-19 10:50:46.000000000 +0000 @@ -2,6 +2,7 @@ # Uranium is released under the terms of the LGPLv3 or higher. import pytest +import warnings warn = True @@ -12,7 +13,7 @@ else: global warn if warn: - config.warn("", "Skipping benchmarks because pytest-benchmark plugin was not found.", "tests/benchmarks/conftest.py") + warnings.warn(pytest.PytestWarning("Skipping benchmarks because pytest-benchmark plugin was not found.")) warn = False return True diff -Nru uranium-3.3.0/tests/benchmarks/Settings/BenchmarkContainerRegistry.py uranium-4.4.1/tests/benchmarks/Settings/BenchmarkContainerRegistry.py --- uranium-3.3.0/tests/benchmarks/Settings/BenchmarkContainerRegistry.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/tests/benchmarks/Settings/BenchmarkContainerRegistry.py 2019-11-19 10:50:46.000000000 +0000 @@ -38,6 +38,9 @@ ContainerRegistry.getInstance()._containers = {} # clear containers from previous iteration + root_plugin_dir = os.path.join(os.path.dirname(__file__), "..", "..", "..", "plugins") + PluginRegistry.getInstance().addPluginLocation(root_plugin_dir) + PluginRegistry.getInstance().loadPlugin("LocalContainerProvider") plugin = PluginRegistry.getInstance().getPluginObject("LocalContainerProvider") ContainerRegistry.getInstance()._providers.append(plugin) @@ -50,7 +53,7 @@ empty_container = ContainerRegistry.getInstance().getEmptyInstanceContainer() empty_definition_changes_container = empty_container empty_definition_changes_container.setMetaDataEntry("id", "empty_definition_changes") - empty_definition_changes_container.addMetaDataEntry("type", "definition_changes") + empty_definition_changes_container.setMetaDataEntry("type", "definition_changes") ContainerRegistry.getInstance().addContainer(empty_definition_changes_container) ContainerRegistry.getInstance().load() diff -Nru uranium-3.3.0/tests/Bindings/TestActiveToolProxy.py uranium-4.4.1/tests/Bindings/TestActiveToolProxy.py --- uranium-3.3.0/tests/Bindings/TestActiveToolProxy.py 1970-01-01 00:00:00.000000000 +0000 +++ uranium-4.4.1/tests/Bindings/TestActiveToolProxy.py 2019-11-19 10:50:46.000000000 +0000 @@ -0,0 +1,89 @@ +from unittest import TestCase + +from PyQt5.QtCore import QUrl +from unittest.mock import MagicMock, patch + +from UM.Application import Application +from UM.Qt.Bindings.ActiveToolProxy import ActiveToolProxy +from UM.Tool import Tool + + +class TestActiveToolProxy(TestCase): + proxy = None + + def setUp(self): + # These objects only need to be set / created once. + if TestActiveToolProxy.proxy is None: + TestActiveToolProxy.proxy = ActiveToolProxy() + + self.tool = Tool() + self.tool.setPluginId("test_tool_1") + + def tearDown(self): + Application.getInstance().getController().setActiveTool("") + + def test_isValid(self): + assert not self.proxy.valid + Application.getInstance().getController().setActiveTool(self.tool) + assert self.proxy.valid # It is valid now + + def test_activeToolPanel(self): + # There is no active tool, so it should be empty + assert self.proxy.activeToolPanel == QUrl() + + with patch.object(self.tool, "getMetaData", MagicMock(return_value={"tool_panel": "derp"})): + with patch("UM.PluginRegistry.PluginRegistry.getPluginPath", MagicMock(return_value = "OMG")): + Application.getInstance().getController().setActiveTool(self.tool) + assert self.proxy.activeToolPanel == QUrl.fromLocalFile("OMG/derp") + # Try again with empty metadata + with patch("UM.PluginRegistry.PluginRegistry.getMetaData", MagicMock(return_value={"tool": {}})): + Application.getInstance().getController().setActiveTool("") + Application.getInstance().getController().setActiveTool(self.tool) + assert self.proxy.activeToolPanel == QUrl.fromLocalFile("") + + def test_triggerAction(self): + # There is no active tool, so this is just a check to see if nothing breaks. + self.proxy.triggerAction("derp") + + Application.getInstance().getController().setActiveTool(self.tool) + + # It is active now, but it doesn't have a function called "derp". Again, nothing should break. + self.proxy.triggerAction("derp") + + self.tool.derp = MagicMock() + + self.proxy.triggerAction("derp") + assert self.tool.derp.call_count == 1 + + def test_triggerActionWithData(self): + # There is no active tool, so this is just a check to see if nothing breaks. + self.proxy.triggerActionWithData("derp", "omgzomg") + + Application.getInstance().getController().setActiveTool(self.tool) + + # It is active now, but it doesn't have a function called "derp". Again, nothing should break. + self.proxy.triggerActionWithData("derp", "omgzomg") + + self.tool.derp = MagicMock() + + self.proxy.triggerActionWithData("derp", "omgzomg") + self.tool.derp.assert_called_once_with("omgzomg") + + def test_properties(self): + # There is no active tool, so this is just a check to see if nothing breaks. + self.proxy.setProperty("derp", "omgzomg") + + self.tool.setExposedProperties("Bla", "beep") + self.tool.getBla = MagicMock(return_value ="BlaBla") + self.tool.setBla = MagicMock() + self.tool.beep = "" + self.tool.getbeep = MagicMock() + + Application.getInstance().getController().setActiveTool(self.tool) + assert self.proxy.properties.getValue("Bla") == "BlaBla" # The default + self.proxy.forceUpdate() + self.proxy.setProperty("Bla", "OMGZOMG") + self.proxy.setProperty("beep", "whoo") + self.tool.setBla.assert_called_once_with("OMGZOMG") + + assert self.tool.beep == "whoo" # If no set is found, but the property itself it should still be changed. diff -Nru uranium-3.3.0/tests/Bindings/TestOutputDeviceManagerProxy.py uranium-4.4.1/tests/Bindings/TestOutputDeviceManagerProxy.py --- uranium-3.3.0/tests/Bindings/TestOutputDeviceManagerProxy.py 1970-01-01 00:00:00.000000000 +0000 +++ uranium-4.4.1/tests/Bindings/TestOutputDeviceManagerProxy.py 2019-11-19 10:50:46.000000000 +0000 @@ -0,0 +1,30 @@ +from unittest import TestCase + +from unittest.mock import MagicMock, patch + +from UM.Qt.Bindings.OutputDeviceManagerProxy import OutputDeviceManagerProxy + + +class TestOutputDeviceManagerProxy(TestCase): + proxy = None + mock_application = None + mocked_device_manager = None + + def setUp(self): + # These objects only need to be set / created once. + if TestOutputDeviceManagerProxy.proxy is None: + TestOutputDeviceManagerProxy.mock_application = MagicMock() + TestOutputDeviceManagerProxy.mocked_device_manager = MagicMock() + self.mock_application.getOutputDeviceManager = MagicMock(return_value = self.mocked_device_manager) + with patch("UM.Application.Application.getInstance", MagicMock(return_value=self.mock_application)): + TestOutputDeviceManagerProxy.proxy = OutputDeviceManagerProxy() + + def tearDown(self): + pass + + def test_startAndRefreshDiscovery(self): + self.proxy.startDiscovery() + assert self.mocked_device_manager.startDiscovery.call_count == 1 + + self.proxy.refreshConnections() + assert self.mocked_device_manager.refreshConnections.call_count == 1 \ No newline at end of file diff -Nru uranium-3.3.0/tests/Bindings/TestPointingRectangle.py uranium-4.4.1/tests/Bindings/TestPointingRectangle.py --- uranium-3.3.0/tests/Bindings/TestPointingRectangle.py 1970-01-01 00:00:00.000000000 +0000 +++ uranium-4.4.1/tests/Bindings/TestPointingRectangle.py 2019-11-19 10:50:46.000000000 +0000 @@ -0,0 +1,77 @@ +from PyQt5.QtCore import QPoint + +from UM.Qt.Bindings.PointingRectangle import PointingRectangle +import pytest +from unittest.mock import MagicMock + + +test_validate_data_get_set = [ + {"attribute": "arrowSize", "value": "YAY"}, + {"attribute": "color", "value": "zomg"}, + {"attribute": "borderWidth", "value": 12}, + {"attribute": "borderColor", "value": "zomg!"}, + {"attribute": "target", "value": "Yourself"} +] + +@pytest.mark.parametrize("data", test_validate_data_get_set) +def test_getAndSet(data): + model = PointingRectangle() + + # Convert the first letter into a capital + attribute = list(data["attribute"]) + attribute[0] = attribute[0].capitalize() + attribute = "".join(attribute) + + # mock the correct emit + setattr(model, data["attribute"] + "Changed", MagicMock()) + + # Attempt to set the value + getattr(model, "set" + attribute)(data["value"]) + + # Check if signal fired. + signal = getattr(model, data["attribute"] + "Changed") + assert signal.emit.call_count == 1 + + # Ensure that the value got set + assert getattr(model, data["attribute"]) == data["value"] + + # Attempt to set the value again + getattr(model, "set" + attribute)(data["value"]) + # The signal should not fire again + assert signal.emit.call_count == 1 + + +@pytest.mark.parametrize("width,height,target,result_points", [(0, 0, None, [(0, 0), (0, 0), (0, 0), (0, 0), (0, 0), (0, 0), (0, 0)]), + (100, 20, None, [(0, 0), (0, 20), (100, 20), (100, 0), (0, 0), (0, 0), (0, 0)]), + (100, 20, QPoint(300, 10), [(0, 0), (0, 20), (100, 20), (100, 0), (100, 0), (110, 10), (100, 20)]), # Arrow on the right + (100, 20, QPoint(100, 100), [(0, 0), (0, 20), (100, 20), (100, 0), (80, 20), (90, 30), (100, 20)]), # Arrow on bottom + (100, 20, QPoint(100, -2), [(0, 0), (0, 20), (100, 20), (100, 0), (80, 0), (90, -10), (100, 0)]), # Arrow on top + (100, 20, QPoint(-1, 0), [(0, 0), (0, 20), (100, 20), (100, 0), (0, 0), (-10, 10), (0, 20)]) # Arrow on left + ]) +def test_updatePaintNode(width, height, target, result_points): + item = PointingRectangle() + + item.setWidth(width) + item.setHeight(height) + if target is not None: + item.setTarget(target) + item.setArrowSize(10) + mocked_node = MagicMock() + mocked_update_data = MagicMock() + + item.updatePaintNode(mocked_node, mocked_update_data) + + assert mocked_node.removeAllChildNodes.call_count == 1 + assert mocked_node.setGeometry.call_count == 1 + + geometry = mocked_node.setGeometry.call_args_list[0][0][0] + assert len(geometry.vertexDataAsPoint2D()) == 7 + + for idx, point in enumerate(result_points): + assert comparePoint2D(geometry.vertexDataAsPoint2D()[idx], point[0], point[1]) + + +def comparePoint2D(point, x, y): + return point.x == x and point.y == y + + diff -Nru uranium-3.3.0/tests/Bindings/TestSelectionProxy.py uranium-4.4.1/tests/Bindings/TestSelectionProxy.py --- uranium-3.3.0/tests/Bindings/TestSelectionProxy.py 1970-01-01 00:00:00.000000000 +0000 +++ uranium-4.4.1/tests/Bindings/TestSelectionProxy.py 2019-11-19 10:50:46.000000000 +0000 @@ -0,0 +1,50 @@ +from unittest import TestCase +from unittest.mock import MagicMock + +from UM.Math.AxisAlignedBox import AxisAlignedBox +from UM.Math.Vector import Vector +from UM.Qt.Bindings.SelectionProxy import SelectionProxy +from UM.Scene.SceneNode import SceneNode +from UM.Scene.Selection import Selection +from UM.Operations.TranslateOperation import TranslateOperation + + +class TestSelectionProxy(TestCase): + + def setUp(self): + Selection.clear() + self.proxy = SelectionProxy() + + def tearDown(self): + Selection.clear() + + def test_hasSelection(self): + # Nothing is selected by default + assert not self.proxy.hasSelection + + node_1 = SceneNode() + Selection.add(node_1) + + assert self.proxy.hasSelection + + Selection.remove(node_1) + assert not self.proxy.hasSelection + + def test_selectionCount(self): + assert self.proxy.selectionCount == 0 + + node_1 = SceneNode() + Selection.add(node_1) + assert self.proxy.selectionCount == 1 + + node_2 = SceneNode() + Selection.add(node_2) + assert self.proxy.selectionCount == 2 + + def test_selectionNames(self): + node_1 = SceneNode(name="TestNode1") + node_2 = SceneNode(name="TestNode2") + Selection.add(node_2) + Selection.add(node_1) + assert self.proxy.selectionNames == ["TestNode2", "TestNode1"] + diff -Nru uranium-3.3.0/tests/Bindings/TestToolModel.py uranium-4.4.1/tests/Bindings/TestToolModel.py --- uranium-3.3.0/tests/Bindings/TestToolModel.py 1970-01-01 00:00:00.000000000 +0000 +++ uranium-4.4.1/tests/Bindings/TestToolModel.py 2019-11-19 10:50:46.000000000 +0000 @@ -0,0 +1,31 @@ +import pytest +from unittest.mock import patch, mock_open, MagicMock + +from UM.Qt.Bindings.ToolModel import ToolModel + +controller = MagicMock() + + +@pytest.fixture +def tool_model(): + mocked_application = MagicMock() + mocked_application.getController = MagicMock(return_value = controller) + + with patch("UM.Application.Application.getInstance", MagicMock(return_value = mocked_application)): + model = ToolModel() + + return model + + +def test_onToolsChanged_visible_tool(tool_model): + tool = MagicMock(getMetaData = MagicMock(return_value = {"visible": True})) + controller.getAllTools = MagicMock(return_value = {"beep_tool": tool}) + tool_model._onToolsChanged() + assert len(tool_model.items) == 1 + + +def test_onToolsChanged_invisible_tool(tool_model): + tool = MagicMock(getMetaData=MagicMock(return_value={"visible": False})) + controller.getAllTools = MagicMock(return_value={"beep_tool": tool}) + tool_model._onToolsChanged() + assert len(tool_model.items) == 0 \ No newline at end of file diff -Nru uranium-3.3.0/tests/conftest.py uranium-4.4.1/tests/conftest.py --- uranium-3.3.0/tests/conftest.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/tests/conftest.py 2019-11-19 10:50:46.000000000 +0000 @@ -1,17 +1,26 @@ -# Copyright (c) 2016 Ultimaker B.V. +# Copyright (c) 2018 Ultimaker B.V. # Uranium is released under the terms of the LGPLv3 or higher. +from typing import cast +from unittest.mock import MagicMock import pytest -# QT application import is required, even though it isn't used. -from UM.Qt.QtApplication import QtApplication +import Arcus #Prevents error: "PyCapsule_GetPointer called with incorrect name" with conflicting SIP configurations between Arcus and PyQt: Import Arcus first! +from UM.Qt.QtApplication import QtApplication #QTApplication import is required, even though it isn't used. from UM.Application import Application +from UM.Qt.QtRenderer import QtRenderer from UM.Signal import Signal from UM.PluginRegistry import PluginRegistry +from UM.VersionUpgradeManager import VersionUpgradeManager + +# This mock application must extend from Application and not QtApplication otherwise some QObjects are created and +# a segfault is raised. class FixtureApplication(Application): + engineCreatedSignal = Signal() + def __init__(self): - Application._instance = None - super().__init__("test", "1.0") + super().__init__(name = "test", version = "1.0", api_version = "7.0.0") + super().initialize() Signal._signalQueue = self def functionEvent(self, event): @@ -20,15 +29,33 @@ def parseCommandLine(self): pass + def processEvents(self): + pass + + def getRenderer(self): + return MagicMock() + + def showMessage(self, message): + pass + @pytest.fixture() def application(): - return FixtureApplication() + # Since we need to use it more that once, we create the application the first time and use its instance the second + application = FixtureApplication.getInstance() + if application is None: + application = FixtureApplication() + return application @pytest.fixture() def plugin_registry(application): PluginRegistry._PluginRegistry__instance = None - plugin_registry = PluginRegistry.getInstance() + plugin_registry = PluginRegistry(application) plugin_registry._plugin_locations = [] # Clear pre-defined plugin locations - plugin_registry.setApplication(application) return plugin_registry +@pytest.fixture() +def upgrade_manager(application): + VersionUpgradeManager._VersionUpgradeManager__instance = None + upgrade_manager = VersionUpgradeManager(application) + return upgrade_manager + diff -Nru uranium-3.3.0/tests/Jobs/TestJob.py uranium-4.4.1/tests/Jobs/TestJob.py --- uranium-3.3.0/tests/Jobs/TestJob.py 1970-01-01 00:00:00.000000000 +0000 +++ uranium-4.4.1/tests/Jobs/TestJob.py 2019-11-19 10:50:46.000000000 +0000 @@ -0,0 +1,53 @@ +import pytest +from unittest.mock import patch, MagicMock + +from UM.Job import Job + + +def test_getSetMessage(): + job = Job() + + job.setMessage("BLORP") + assert job.getMessage() == "BLORP" + + +def test_getSetError(): + job = Job() + exception = Exception("Some Error :(") + job.setError(exception) + + assert job.getError() == exception + assert job.hasError() + + +def test_getSetResult(): + job = Job() + job.setResult("blarg") + assert job.getResult() == "blarg" + + +def test_run(): + job = Job() + with pytest.raises(NotImplementedError): + job.run() + + +def test_start(): + job = Job() + job_queue = MagicMock() + with patch("UM.JobQueue.JobQueue.getInstance", MagicMock(return_value = job_queue)): + job.start() + job_queue.add.called_once_with(job) + + +def test_cancel(): + job = Job() + job_queue = MagicMock() + with patch("UM.JobQueue.JobQueue.getInstance", MagicMock(return_value=job_queue)): + job.cancel() + job_queue.remove.called_once_with(job) + + +def test_isRunning(): + job = Job() + assert not job.isRunning() \ No newline at end of file diff -Nru uranium-3.3.0/tests/Jobs/TestJobQueue.py uranium-4.4.1/tests/Jobs/TestJobQueue.py --- uranium-3.3.0/tests/Jobs/TestJobQueue.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/tests/Jobs/TestJobQueue.py 2019-11-19 10:50:46.000000000 +0000 @@ -10,10 +10,12 @@ import time import threading + class ShortTestJob(Job): def run(self): self.setResult("TestJob") + class LongTestJob(Job): def run(self): time.sleep(1.5) @@ -21,18 +23,19 @@ @pytest.fixture def job_queue(): - JobQueue._instance = None + JobQueue._JobQueue__instance = None return JobQueue() -class TestJobQueue(): + +class TestJobQueue: def test_create(self): - JobQueue._instance = None + JobQueue._JobQueue__instance = None jq = JobQueue() assert len(jq._threads) > 0 assert jq == JobQueue.getInstance() - JobQueue._instance = None + JobQueue._JobQueue__instance = None jq = JobQueue(4) assert len(jq._threads) == 4 @@ -48,23 +51,6 @@ assert job.isFinished() assert job.getResult() == "TestJob" - def test_addLong(self, job_queue): - job = LongTestJob() - job.start() - - assert job in job_queue._jobs - - time.sleep(1) - - assert not job.isFinished() - assert job.getResult() == None - - time.sleep(1) - - assert job.isFinished() - assert job.getResult() == "LongTestJob" - - test_addMultiple_data = [2, 5, 10] @pytest.mark.parametrize("count", test_addMultiple_data) def test_addMultiple(self, job_queue, count): @@ -85,6 +71,3 @@ def test_remove(self): pass - -if __name__ == "__main__": - unittest.main() diff -Nru uranium-3.3.0/tests/Math/TestMatrix.py uranium-4.4.1/tests/Math/TestMatrix.py --- uranium-3.3.0/tests/Math/TestMatrix.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/tests/Math/TestMatrix.py 2019-11-19 10:50:46.000000000 +0000 @@ -1,14 +1,16 @@ -# Copyright (c) 2015 Ultimaker B.V. +# Copyright (c) 2019 Ultimaker B.V. # Uranium is released under the terms of the LGPLv3 or higher. import unittest import numpy +import pytest + from UM.Math.Matrix import Matrix from UM.Math.Vector import Vector +import copy class TestMatrix(unittest.TestCase): def setUp(self): - self._matrix = Matrix() # Called before the first testfunction is executed pass @@ -26,6 +28,15 @@ temp_matrix2.setByScaleFactor(0.5) temp_matrix.multiply(temp_matrix2) numpy.testing.assert_array_almost_equal(temp_matrix.getData(), numpy.array([[0.5,0,0,10],[0,0.5,0,10],[0,0,0.5,10],[0,0,0,1]])) + + def test_multiplyCopy(self): + temp_matrix = Matrix() + temp_matrix.setByTranslation(Vector(10, 10, 10)) + temp_matrix2 = Matrix() + temp_matrix2.setByScaleFactor(0.5) + result = temp_matrix.multiply(temp_matrix2, copy=True) + assert temp_matrix != result + numpy.testing.assert_array_almost_equal(result.getData(), numpy.array([[0.5, 0, 0, 10], [0, 0.5, 0, 10], [0, 0, 0.5, 10], [0, 0, 0, 1]])) def test_preMultiply(self): temp_matrix = Matrix() @@ -35,16 +46,62 @@ temp_matrix.preMultiply(temp_matrix2) numpy.testing.assert_array_almost_equal(temp_matrix.getData(), numpy.array([[0.5,0,0,5],[0,0.5,0,5],[0,0,0.5,5],[0,0,0,1]])) + def test_preMultiplyCopy(self): + temp_matrix = Matrix() + temp_matrix.setByTranslation(Vector(10,10,10)) + temp_matrix2 = Matrix() + temp_matrix2.setByScaleFactor(0.5) + result = temp_matrix.preMultiply(temp_matrix2, copy = True) + assert result != temp_matrix + numpy.testing.assert_array_almost_equal(result.getData(), numpy.array([[0.5,0,0,5],[0,0.5,0,5],[0,0,0.5,5],[0,0,0,1]])) + def test_setByScaleFactor(self): - self._matrix.setByScaleFactor(0.5) - numpy.testing.assert_array_almost_equal(self._matrix.getData(), numpy.array([[0.5,0,0,0],[0,0.5,0,0],[0,0,0.5,0],[0,0,0,1]])) + matrix = Matrix() + matrix.setByScaleFactor(0.5) + numpy.testing.assert_array_almost_equal(matrix.getData(), numpy.array([[0.5,0,0,0],[0,0.5,0,0],[0,0,0.5,0],[0,0,0,1]])) + + assert matrix.getScale() == Vector(0.5, 0.5, 0.5) + + def test_scaleByFactor(self): + matrix = Matrix() + matrix.scaleByFactor(2) + assert matrix.getScale() == Vector(2, 2, 2) def test_setByRotation(self): pass def test_setByTranslation(self): - self._matrix.setByTranslation(Vector(0,1,0)) - numpy.testing.assert_array_almost_equal(self._matrix.getData(), numpy.array([[1,0,0,0],[0,1,0,1],[0,0,1,0],[0,0,0,1]])) + matrix = Matrix() + matrix.setByTranslation(Vector(0,1,0)) + numpy.testing.assert_array_almost_equal(matrix.getData(), numpy.array([[1,0,0,0],[0,1,0,1],[0,0,1,0],[0,0,0,1]])) + + def test_deepcopy(self): + matrix = Matrix() + + # Set some data + matrix.setRow(1, [1, 2, 3]) + matrix.setColumn(2, [3, 4, 5]) + + copied_matrix = copy.deepcopy(matrix) + assert copied_matrix == matrix + + def test_compare(self): + matrix = Matrix() + matrix2 = Matrix() + + assert matrix == matrix + assert not matrix == "zomg" + + matrix._data = None + matrix2._data = None + assert matrix == matrix2 + + def test_translate(self): + matrix = Matrix() + matrix.translate(Vector(1, 1, 1)) + assert matrix.getTranslation() == Vector(1, 1, 1) + matrix.translate(Vector(2, 3, 4)) + assert matrix.getTranslation() == Vector(3, 4, 5) def test_setToIdentity(self): pass @@ -61,5 +118,19 @@ def test_dot(self): pass -if __name__ == "__main__": - unittest.main() + def test_invalidAt(self): + matrix = Matrix() + with pytest.raises(IndexError): + matrix.at(12, 13) + + def test_invalidSetRow(self): + matrix = Matrix() + with pytest.raises(IndexError): + matrix.setRow(12, [1., 2., 3.]) + matrix.setRow(-1, [2., 3., 4.]) + + def test_invalidSetColumn(self): + matrix = Matrix() + with pytest.raises(IndexError): + matrix.setColumn(12, [1., 2., 3.]) + matrix.setColumn(-1, [2., 3., 4.]) \ No newline at end of file diff -Nru uranium-3.3.0/tests/Math/TestPolygon.py uranium-4.4.1/tests/Math/TestPolygon.py --- uranium-3.3.0/tests/Math/TestPolygon.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/tests/Math/TestPolygon.py 2019-11-19 10:50:46.000000000 +0000 @@ -8,7 +8,7 @@ import math import pytest -pytestmark = pytest.mark.skip(reason = "Incomplete tests") +#pytestmark = pytest.mark.skip(reason = "Incomplete tests") class TestPolygon: def setup_method(self, method): @@ -18,15 +18,46 @@ def teardown_method(self, method): # Called after the last testfunction was executed pass - + + def test_equalitySamePolygon(self): + polygon = Polygon.approximatedCircle(2) + assert polygon == polygon + + def test_equalityString(self): + polygon = Polygon.approximatedCircle(42) + assert polygon != "42" # Not the answer after all! + + def test_equality(self): + polygon_1 = Polygon.approximatedCircle(2) + polygon_2 = Polygon.approximatedCircle(2) + assert polygon_1 == polygon_2 + + def test_inequality(self): + # This case should short cirquit because the length of points are not the same + polygon_1 = Polygon.approximatedCircle(2) + polygon_2 = Polygon() + assert polygon_1 != polygon_2 + + def test_translate(self): + polygon = Polygon(numpy.array([[0.0, 0.0], [2.0, 0.0], [1.0, 2.0]], numpy.float32)) + translated_poly = polygon.translate(2, 3) + + result = Polygon(numpy.array([[2.0, 3.0], [4.0, 3.0], [3.0, 5.0]], numpy.float32)) + assert result == translated_poly + + def test_translateInvalidPoly(self): + polygon = Polygon() + + assert polygon == polygon.translate(2, 3) + ## The individual test cases for mirroring polygons. test_mirror_data = [ ({ "points": [[0.0, 0.0], [2.0, 0.0], [1.0, 2.0]], "axis_point": [0, 0], "axis_direction": [0, 1], "answer": [[-1.0, 2.0], [-2.0, 0.0], [0.0, 0.0]], "label": "Mirror Horizontal", "description": "Test mirroring a polygon horizontally." }), ({ "points": [[0.0, 0.0], [2.0, 0.0], [1.0, 2.0]], "axis_point": [0, 0], "axis_direction": [1, 0], "answer": [[1.0, -2.0], [2.0, 0.0], [0.0, 0.0]], "label": "Mirror Vertical", "description": "Test mirroring a polygon vertically." }), ({ "points": [[0.0, 0.0], [2.0, 0.0], [1.0, 2.0]], "axis_point": [10, 0], "axis_direction": [0, 1], "answer": [[19.0, 2.0], [18.0, 0.0], [20.0, 0.0]], "label": "Mirror Horizontal Far", "description": "Test mirrorring a polygon horizontally on an axis that is not through the origin." }), ({ "points": [[0.0, 0.0], [2.0, 0.0], [1.0, 2.0]], "axis_point": [0, 4], "axis_direction": [1, 1], "answer": [[-2.0, 5.0], [-4.0, 6.0], [-4.0, 4.0]], "label": "Mirror Diagonal", "description": "Test mirroring a polygon diagonally." }), - ({ "points": [[10.0, 0.0]], "axis_point": [0, 0], "axis_direction": [0, 1], "answer": [[-10.0, 0.0]], "label": "Mirror Single Vertex", "description": "Test mirroring a polygon with only one vertex." }), - ({ "points": [], "axis_point": [0, 0], "axis_direction": [1, 0], "answer": [], "label": "Mirror Empty", "description": "Test mirroring an empty polygon." }) + ({ "points": [], "axis_point": [0, 0], "axis_direction": [1, 0], "answer": [], "label": "Mirror Empty", "description": "Test mirroring an empty polygon." }), + ({ "points": [[0.0, 0.0], [2.0, 0.0], [1.0, 2.0]], "axis_point": [0, 4], "axis_direction": [0, 0], "answer": [[0.0, 0.0], [2.0, 0.0], [1.0, 2.0]], "label": "Mirror Diagonal", "description": "Test mirroring with wrong axis"}), ] ## Tests the mirror function. @@ -37,8 +68,8 @@ @pytest.mark.parametrize("data", test_mirror_data) def test_mirror(self, data): polygon = Polygon(numpy.array(data["points"], numpy.float32)) #Create a polygon with the specified points. - polygon.mirror(data["axis_point"], data["axis_direction"]) #Mirror over the specified axis. - points = polygon.getPoints() + mirrored_poly = polygon.mirror(data["axis_point"], data["axis_direction"]) #Mirror over the specified axis. + points = mirrored_poly.getPoints() assert len(points) == len(data["points"]) #Must have the same amount of vertices. for point_index in range(len(points)): assert len(points[point_index]) == len(data["answer"][point_index]) #Same dimensionality (2). @@ -64,19 +95,20 @@ [1.0, 2.0], [0.0, 2.0] ], numpy.float32)) - result = p.project(data["normal"]) #Project the polygon onto the specified normal vector. - assert len(result) == len(data["answer"]) #Same dimensionality (2). + result = p.project(data["normal"]) # Project the polygon onto the specified normal vector. + assert len(result) == len(data["answer"]) # Same dimensionality (2). for dimension in range(len(result)): assert Float.fuzzyCompare(result[dimension], data["answer"][dimension]) ## The individual test cases for the intersection tests. test_intersect_data = [ - ({ "polygon": [[ 5.0, 0.0], [15.0, 0.0], [15.0, 10.0], [ 5.0, 10.0]], "answer": [-5.0, 0.0], "label": "Intersect Simple", "description": "Intersect with a polygon that fully intersects." }), - ({ "polygon": [[-5.0, 0.0], [ 5.0, 0.0], [ 5.0, 10.0], [-5.0, 10.0]], "answer": [ 5.0, 0.0], "label": "Intersect Left", "description": "Intersect with a polygon on the negative x-axis side that fully intersects." }), - ({ "polygon": [[ 0.0, 5.0], [10.0, 5.0], [10.0, 15.0], [ 0.0, 15.0]], "answer": [ 0.0, -5.0], "label": "Intersect Straight Above", "description": "Intersect with a polygon that is exactly above the base polygon (edge case)." }), - ({ "polygon": [[ 0.0, -5.0], [10.0, -5.0], [10.0, 5.0], [ 0.0, 5.0]], "answer": [ 0.0, 5.0], "label": "Intersect Straight Left", "description": "Intersect with a polygon that is exactly left of the base polygon (edge case)." }), - ({ "polygon": [[ 5.0, 5.0], [15.0, -5.0], [30.0, 5.0], [15.0, 15.0]], "answer": [-5.0, 0.0], "label": "Intersect Rotated", "description": "Intersect with a rotated square." }), - ({ "polygon": [[15.0, 0.0], [25.0, 0.0], [25.0, 10.0], [15.0, 10.0]], "answer": None, "label": "Intersect Miss", "description": "Intersect with a polygon that doesn't intersect at all." }) + ({ "polygon": [[ 5.0, 0.0], [15.0, 0.0], [15.0, 10.0], [ 5.0, 10.0]], "answer": [ 5.0, 10], "label": "Intersect Simple", "description": "Intersect with a polygon that fully intersects." }), + ({ "polygon": [[-5.0, 0.0], [ 5.0, 0.0], [ 5.0, 10.0], [-5.0, 10.0]], "answer": [ 5.0, 10.0], "label": "Intersect Left", "description": "Intersect with a polygon on the negative x-axis side that fully intersects." }), + ({ "polygon": [[ 0.0, 5.0], [10.0, 5.0], [10.0, 15.0], [ 0.0, 15.0]], "answer": [ 10.0, 5.0], "label": "Intersect Straight Above", "description": "Intersect with a polygon that is exactly above the base polygon (edge case)." }), + ({ "polygon": [[ 0.0, -5.0], [10.0, -5.0], [10.0, 5.0], [ 0.0, 5.0]], "answer": [ 10.0, 5.0], "label": "Intersect Straight Left", "description": "Intersect with a polygon that is exactly left of the base polygon (edge case)." }), + ({ "polygon": [[15.0, 0.0], [25.0, 0.0], [25.0, 10.0], [15.0, 10.0]], "answer": None, "label": "Intersect Miss", "description": "Intersect with a polygon that doesn't intersect at all." }), + ({"polygon": [[15.0, 0.0]], "answer": None, "label": "Intersect invalid", "description": "Intersect with a polygon that is a single point"}) + ] ## Tests the polygon intersect function. @@ -88,26 +120,26 @@ # with and a required answer. @pytest.mark.parametrize("data", test_intersect_data) def test_intersectsPolygon(self, data): - p1 = Polygon(numpy.array([ #The base polygon to intersect with. + p1 = Polygon(numpy.array([ # The base polygon to intersect with. [ 0, 0], [10, 0], [10, 10], [ 0, 10] ], numpy.float32)) - p2 = Polygon(numpy.array(data["polygon"])) #The parametrised polygon to intersect with. + p2 = Polygon(numpy.array(data["polygon"])) # The parametrised polygon to intersect with. - #Shift the order of vertices in both polygons around. The outcome should be independent of what the first vertex is. + # Shift the order of vertices in both polygons around. The outcome should be independent of what the first vertex is. for n in range(0, len(p1.getPoints())): for m in range(0, len(data["polygon"])): result = p1.intersectsPolygon(p2) - if not data["answer"]: #Result should be None. - assert result == None + if not data["answer"]: # Result should be None. + assert result is None else: - assert result != None + assert result is not None for i in range(0, len(data["answer"])): assert Float.fuzzyCompare(result[i], data["answer"][i]) - p2.setPoints(numpy.roll(p2.getPoints(), 1, axis = 0)) #Shift p2. - p1.setPoints(numpy.roll(p1.getPoints(), 1, axis = 0)) #Shift p1. + p2 = Polygon(numpy.roll(p2.getPoints(), 1, axis = 0)) #Shift p2. + p1 = Polygon(numpy.roll(p1.getPoints(), 1, axis = 0)) #Shift p1. ## The individual test cases for convex hull intersection tests. test_intersectConvex_data = [ @@ -119,23 +151,62 @@ # \param data The data of the test case. Must include two polygons and a # required result polygon. @pytest.mark.parametrize("data", test_intersectConvex_data) - def test_intersectConvexHull(self, data): + def test_intersectConvexHull(self, data) -> None: p1 = Polygon(numpy.array(data["p1"])) p2 = Polygon(numpy.array(data["p2"])) result = p1.intersectionConvexHulls(p2) - assert len(result.getPoints()) == len(data["answer"]) #Same amount of vertices. + assert len(result.getPoints()) == len(data["answer"]) # Same amount of vertices. + isCorrect = False + for rotation in range(0, len(result.getPoints())): # The order of vertices doesn't matter, so rotate the result around and if any check succeeds, the answer is correct. + thisCorrect = True # Is this rotation correct? + for vertex in range(0, len(result.getPoints())): + for dimension in range(0, len(result.getPoints()[vertex])): + if not Float.fuzzyCompare(result.getPoints()[vertex][dimension], data["answer"][vertex][dimension]): + thisCorrect = False + break # Break out of two loops. + if not thisCorrect: + break + if thisCorrect: # All vertices checked and it's still correct. + isCorrect = True + break + result = Polygon(numpy.roll(result.getPoints(), 1, axis = 0)) #Perform the rotation for the next check. + assert isCorrect + + ## The individual test cases for convex hull union tests. + test_unionConvex_data = [ + ({"p1": [[1, 1], [1.5, 1], [2, 2], [2, 0]], "p2": [[3, 2], [3.5, 1], [4, 1], [3, 0]], "answer": [[1, 1], [2, 2], [3, 2], [4, 1], [3, 0], [2, 0]], "label": "ConvexHull Union Separate", "description": "Two disparate shapes."}), + ({"p1": [[1, 1], [3, 3], [3, -1]], "p2": [[2, 1], [4, 2], [4, 0]], "answer": [[1, 1], [3, 3], [4, 2], [4, 0], [3, -1]], "label": "ConvexHull Union Inside", "description": "One triangle partially inside the other."}), + ({"p1": [[1, 1], [5, 5], [5, -4]], "p2": [[2, 1], [3, 2], [3, 1]], "answer": [[1, 1], [5, 5], [5, -4]], "label": "ConvexHull Union Enclosed", "description": "One triangle completely inside the other."}), + ({"p1": [[1, 1], [2, 2], [2, 0]], "p2": [], "answer": [[1, 1], [2, 2], [2, 0]], "label": "ConvexHull Union Single", "description": "One triangle."}) + ] + + ## Tests the convex hull of convex hulls + # + # \param data The data of the test case. + @pytest.mark.parametrize("data", test_unionConvex_data) + def test_unionConvexHull(self, data) -> None: + p1 = Polygon(numpy.array(data["p1"])) + p2 = Polygon(numpy.array(data["p2"])) + result = p1.unionConvexHulls(p2) + assert len(result.getPoints()) == len(data["answer"]) # Same amount of vertices. isCorrect = False - for rotation in range(0, len(result.getPoints())): #The order of vertices doesn't matter, so rotate the result around and if any check succeeds, the answer is correct. - thisCorrect = True #Is this rotation correct? + for rotation in range(0, len(result.getPoints())): # The order of vertices doesn't matter, so rotate the result around and if any check succeeds, the answer is correct. + thisCorrect = True # Is this rotation correct? for vertex in range(0, len(result.getPoints())): for dimension in range(0, len(result.getPoints()[vertex])): if not Float.fuzzyCompare(result.getPoints()[vertex][dimension], data["answer"][vertex][dimension]): thisCorrect = False - break #Break out of two loops. + break # Break out of two loops. if not thisCorrect: break - if thisCorrect: #All vertices checked and it's still correct. + if thisCorrect: # All vertices checked and it's still correct. isCorrect = True break - result.setPoints(numpy.roll(result.getPoints(), 1, axis = 0)) #Perform the rotation for the next check. + result = Polygon(numpy.roll(result.getPoints(), 1, axis = 0)) #Perform the rotation for the next check. assert isCorrect + + def test_isInside(self): + polygon = Polygon.approximatedCircle(5) + assert polygon.isInside((0, 0)) + + assert not polygon.isInside((9001, 9001)) diff -Nru uranium-3.3.0/tests/Math/TestQuaternion.py uranium-4.4.1/tests/Math/TestQuaternion.py --- uranium-3.3.0/tests/Math/TestQuaternion.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/tests/Math/TestQuaternion.py 2019-11-19 10:50:46.000000000 +0000 @@ -1,4 +1,4 @@ -# Copyright (c) 2015 Ultimaker B.V. +# Copyright (c) 2019 Ultimaker B.V. # Uranium is released under the terms of the LGPLv3 or higher. import unittest @@ -106,6 +106,7 @@ m.setByRotationAxis(math.pi / 2, Vector.Unit_Z) q1 = Quaternion.fromMatrix(m) + q1.normalize() q2 = Quaternion() q2.setByAngleAxis(math.pi / 2, Vector.Unit_Z) @@ -137,5 +138,14 @@ c = Quaternion(0.0, 0.0, 0.7071068286895752, 0.7071068286895752) self.assertEqual(c, Quaternion.slerp(q1, q2, 1.0)) + def test_getData(self): + q = Quaternion(1,2,3,4) + + data = q.getData() + assert data[0] == 1 + assert data[1] == 2 + assert data[2] == 3 + assert data[3] == 4 + if __name__ == "__main__": unittest.main() diff -Nru uranium-3.3.0/tests/Math/TestVector.py uranium-4.4.1/tests/Math/TestVector.py --- uranium-3.3.0/tests/Math/TestVector.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/tests/Math/TestVector.py 2019-11-19 10:50:46.000000000 +0000 @@ -3,6 +3,7 @@ import unittest import numpy +import pytest from UM.Math.Vector import Vector @@ -18,19 +19,19 @@ def test_getData(self): numpy.testing.assert_array_almost_equal(self._vector.getData(), numpy.array([1,0,0])) - pass def test_angleBetweenVectors(self): second_vector = Vector(1,0,0) third_vector = Vector(0,1,0) fourth_vector = Vector(0,0,1) # Check if angle with itself is 0 - self.assertEqual(self._vector.angleToVector(second_vector),0) + self.assertEqual(self._vector.angleToVector(second_vector), 0) # Check if angle between the two vectors that are rotated in equal angle but different direction are the same - self.assertEqual(self._vector.angleToVector(third_vector),self._vector.angleToVector(fourth_vector)) + self.assertEqual(self._vector.angleToVector(third_vector), self._vector.angleToVector(fourth_vector)) def test_normalize(self): - pass + vector = Vector(10, 10, 10) + assert vector.normalized().length() == pytest.approx(1) def test_setValues(self): x = 10 @@ -39,11 +40,49 @@ temp_vector = Vector(x,y,z) numpy.testing.assert_array_almost_equal(temp_vector.getData(), numpy.array([x,y,z])) + temp_vector2 = temp_vector.set(1, 2, 3) + numpy.testing.assert_array_almost_equal(temp_vector2.getData(), numpy.array([1, 2, 3])) + def test_negPos(self): v = Vector(0, 1, 0) self.assertEqual(Vector(0, -1, 0), -v) self.assertEqual(Vector(0, 1, 0), v) # - should have no side effects + def test_compare(self): + short_vector = Vector(0, 1, 0) + long_vector = Vector(200, 300, 500) + + assert short_vector < long_vector + assert long_vector > short_vector + assert not long_vector == None + + def test_add(self): + vector = Vector(0, 1, 0) + vector2 = Vector(1, 0, 1) + assert vector + vector2 == Vector(1, 1, 1) + assert vector + vector2.getData() == Vector(1, 1, 1) + vector += vector2 + assert vector == Vector(1, 1, 1) + + def test_subtract(self): + vector = Vector(2, 2, 2) + vector2 = Vector(1, 1, 1) + assert vector - vector2 == Vector(1, 1, 1) + assert vector - vector2.getData() == Vector(1, 1, 1) + assert vector2 - vector == Vector(-1, -1, -1) + assert vector2 - vector.getData() == Vector(-1, -1, -1) + vector -= vector2 + assert vector == Vector(1, 1, 1) + + def test_multiply(self): + vector = Vector(2, 2, 2) + vector2 = Vector(2, 2, 2) + assert vector * vector2 == Vector(4, 4, 4) + assert vector * 2 == Vector(4, 4, 4) + assert vector.scale(vector2) == Vector(4, 4, 4) + vector *= vector2 + assert vector == Vector(4, 4, 4) + if __name__ == "__main__": unittest.main() diff -Nru uranium-3.3.0/tests/Mesh/TestMeshBuilder.py uranium-4.4.1/tests/Mesh/TestMeshBuilder.py --- uranium-3.3.0/tests/Mesh/TestMeshBuilder.py 1970-01-01 00:00:00.000000000 +0000 +++ uranium-4.4.1/tests/Mesh/TestMeshBuilder.py 2019-11-19 10:50:46.000000000 +0000 @@ -0,0 +1,197 @@ +import numpy + +from UM.Math.Color import Color +from UM.Math.Vector import Vector +from UM.Mesh.MeshBuilder import MeshBuilder +from UM.Mesh.MeshData import MeshType + + +def test_addVertexWithNormal(): + builder = MeshBuilder() + builder.addVertexWithNormal(10, 20, 30, -1, -2, -3) + + assert builder.getVertex(0)[0] == 10 + assert builder.getVertex(0)[1] == 20 + assert builder.getVertex(0)[2] == 30 + + assert builder.hasNormals() # We just added a vert with a normal, so we should have em + assert builder.getNormals()[0][0] == -1 + assert builder.getNormals()[0][1] == -2 + assert builder.getNormals()[0][2] == -3 + + assert builder.getVertexCount() == 1 + # There is only one vertex, so we should get None back + assert builder.getVertex(22) is None + + +def test_addFace(): + builder = MeshBuilder() + builder.addFaceByPoints(0, 0, 0, 10, 0, 0, 10, 10, 0) + + assert builder.getVertexCount() == 3 + assert builder.getFaceCount() == 1 + assert not builder.hasNormals() + # Check if all the data ended up where it should be + assert builder.getVertex(0)[0] == 0 + assert builder.getVertex(0)[1] == 0 + assert builder.getVertex(0)[2] == 0 + + assert builder.getVertex(1)[0] == 10 + assert builder.getVertex(1)[1] == 0 + assert builder.getVertex(1)[2] == 0 + + assert builder.getVertex(2)[0] == 10 + assert builder.getVertex(2)[1] == 10 + assert builder.getVertex(2)[2] == 0 + + +def test_addFaceWithNormals(): + builder = MeshBuilder() + builder.addFaceWithNormals(0, 0, 0, 1, 0, 0, 10, 0, 0, 0, 1, 0, 10, 10, 0, 0, 0, 1) + assert builder.getVertexCount() == 3 + assert builder.getFaceCount() == 1 + assert builder.hasNormals() + + +def test_setVertexColor(): + builder = MeshBuilder() + builder.addVertex(1, 2, 3) + builder.setVertexColor(0, Color(1.0, 0.5, 0.2)) + assert builder.hasColors() + assert builder.getColors()[0][0] == 1.0 + + +def test_calculateNormals(): + builder = MeshBuilder() + # Builder shouldn't start off with normals + assert not builder.hasNormals() + # Ensure that if there are no vertices / faces that calling the calculate doesn't break anything. + builder.calculateNormals() + assert not builder.hasNormals() + + builder.addFaceByPoints(0, 0, 0, 10, 0, 0, 10, 10, 0) + + builder.calculateNormals() + assert builder.hasNormals() + assert numpy.array_equal(builder.getNormals(), numpy.array([[0., 0., 1.], [0., 0., 1.], [0., 0., 1.]])) + + builder2 = MeshBuilder() + builder2.addFaceByPoints(0, 0, 0, 0, 10, 0, 0, 10, 10) + builder2.calculateNormals(fast = True) + assert numpy.array_equal(builder2.getNormals(), numpy.array([[1., 0., 0], [1., 0., 0.], [1., 0., 0.]])) + + +def test_addLine(): + builder = MeshBuilder() + builder.addLine(Vector(0, 0, 0), Vector(10, 11, 12)) + + assert builder.getVertexCount() == 2 + assert builder.getVertex(1)[0] == 10 + assert builder.getVertex(1)[1] == 11 + assert builder.getVertex(1)[2] == 12 + + +def test_addLineWithColor(): + builder = MeshBuilder() + builder.addLine(Vector(0, 0, 0), Vector(10, 11, 12), Color(1.0, 0.5, 0.25)) + + assert builder.getColors()[0][0] == 1.0 + assert builder.getColors()[0][1] == 0.5 + assert builder.getColors()[0][2] == 0.25 + + assert builder.getColors()[1][0] == 1.0 + assert builder.getColors()[1][1] == 0.5 + assert builder.getColors()[1][2] == 0.25 + + +def test_reserveFaceCount(): + builder = MeshBuilder() + builder.addVertex(1, 2, 3) + + builder.reserveFaceCount(200) + # Reserving face count should reset the verts + assert builder.getVertexCount() == 0 + + +def test_reserveFaceAndVertexCount(): + builder = MeshBuilder() + builder.addVertex(1, 2, 3) + + builder.reserveFaceAndVertexCount(200, 20) + # Reserving face count should reset the verts + assert builder.getVertexCount() == 0 + + +def test_reserveVertexCount(): + builder = MeshBuilder() + assert builder.getVertices() is None + builder.addVertex(1, 2, 3) + + builder.reserveVertexCount(10) + # Reserving face count should reset the verts + assert builder.getVertexCount() == 0 + + +def test_getSetCenterPosition(): + builder = MeshBuilder() + builder.setCenterPosition(Vector(100, 200, 300)) + assert builder.getCenterPosition() == Vector(100, 200, 300) + + +def test_getSetType(): + builder = MeshBuilder() + builder.setType(MeshType.faces) + assert builder.getType() == MeshType.faces + + # Should have no effect + builder.setType("ZOMG") + assert builder.getType() == MeshType.faces + + +def test_setVertices(): + builder = MeshBuilder() + builder.setVertices(numpy.zeros(3)) + assert builder.getVertexCount() == 1 + assert builder.getVertices()[0] == 0 + + +def test_setIndices(): + builder = MeshBuilder() + builder.setIndices(numpy.zeros(3)) + assert builder.getFaceCount() == 1 + assert builder.getIndices()[0] == 0 + + +def test_addIndices(): + builder = MeshBuilder() + builder.addIndices(numpy.zeros(3)) + assert builder.getFaceCount() == 3 + assert builder.getIndices()[0] == 0 + + builder.addIndices(numpy.zeros(3)) + assert builder.getFaceCount() == 6 + + +def test_addVertices(): + builder = MeshBuilder() + builder.addVertices(numpy.zeros(3)) + assert builder.getVertexCount() == 3 + + builder.addVertices(numpy.zeros(3)) + assert builder.getVertexCount() == 6 + + +def test_setUVCoordinates(): + builder = MeshBuilder() + builder.setVertices(numpy.zeros((10 * 3, 3), dtype=numpy.float32)) + builder.setVertexUVCoordinates(5, 20, 22) + assert builder.hasUVCoordinates() + assert builder.getUVCoordinates()[5, 0] == 20 + assert builder.getUVCoordinates()[5, 1] == 22 + + +def test_getSetFilename(): + builder = MeshBuilder() + builder.setFileName("HERPDERP") + + assert builder.getFileName() == "HERPDERP" diff -Nru uranium-3.3.0/tests/Mesh/TestMeshData.py uranium-4.4.1/tests/Mesh/TestMeshData.py --- uranium-3.3.0/tests/Mesh/TestMeshData.py 1970-01-01 00:00:00.000000000 +0000 +++ uranium-4.4.1/tests/Mesh/TestMeshData.py 2019-11-19 10:50:46.000000000 +0000 @@ -0,0 +1,103 @@ +import numpy + +from UM.Math.AxisAlignedBox import AxisAlignedBox +from UM.Math.Vector import Vector +from UM.Mesh.MeshBuilder import MeshBuilder +from UM.Mesh.MeshData import MeshData, MeshType +from UM.Math.Matrix import Matrix + + +def test_transformMeshData(): + transformation_matrix = Matrix() + transformation_matrix.setByTranslation(Vector(30, 20, 10)) + + vertices = numpy.zeros((1, 3), dtype=numpy.float32) + mesh_data = MeshData(vertices) + + transformed_mesh = mesh_data.getTransformed(transformation_matrix) + + assert transformed_mesh.getVertex(0)[0] == 30. + assert transformed_mesh.getVertex(0)[1] == 20. + assert transformed_mesh.getVertex(0)[2] == 10. + + +def test_getExtents(): + # Create a cube mesh at position 0,0,0 + builder = MeshBuilder() + builder.addCube(20, 20, 20) + mesh_data = builder.build() + + extents = mesh_data.getExtents() + assert extents.width == 20 + assert extents.height == 20 + assert extents.depth == 20 + + assert extents.maximum == Vector(10, 10, 10) + assert extents.minimum == Vector(-10, -10, -10) + + +def test_getExtentsTransposed(): + # Create a cube mesh at position 0,0,0 + builder = MeshBuilder() + builder.addCube(20, 20, 20) + mesh_data = builder.build() + + transformation_matrix = Matrix() + transformation_matrix.setByTranslation(Vector(10, 10, 10)) + + extents = mesh_data.getExtents(transformation_matrix) + assert extents.width == 20 + assert extents.height == 20 + assert extents.depth == 20 + + assert extents.maximum == Vector(20, 20, 20) + assert extents.minimum == Vector(0, 0, 0) + + +def test_attributes(): + attributes = { "test": { + "value": [10], + "derp": "OMG" + }} + mesh_data = MeshData(attributes = attributes) + + assert mesh_data.hasAttribute("test") + assert mesh_data.getAttribute("test") == { "value": [10], "derp": "OMG" } + + assert mesh_data.attributeNames() == ["test"] + + +def test_hasData(): + # Simple test to see if the has whatever functions do their job correctly + + empty_mesh = MeshData() + + assert not empty_mesh.hasNormals() + assert not empty_mesh.hasColors() + assert not empty_mesh.hasUVCoordinates() + assert not empty_mesh.hasIndices() + + filled_mesh = MeshData(normals = [], colors = [], uvs = [], indices=[]) + assert filled_mesh.hasNormals() + assert filled_mesh.hasColors() + assert filled_mesh.hasUVCoordinates() + assert filled_mesh.hasIndices() + + +def test_counts(): + empty_mesh = MeshData() + + assert empty_mesh.getFaceCount() == 0 + assert empty_mesh.getVertexCount() == 0 + + filled_mesh = MeshData(indices = numpy.zeros((5, 3), dtype=numpy.float32), vertices = numpy.zeros((12, 3), dtype=numpy.float32)) + + assert filled_mesh.getFaceCount() == 5 + assert filled_mesh.getVertexCount() == 12 + + +def test_getPositionAndType(): + mesh_data = MeshData(zero_position=Vector(0, 12, 13), center_position=Vector(10, 20, 30), type = MeshType.pointcloud) + assert mesh_data.getZeroPosition() == Vector(0, 12, 13) + assert mesh_data.getCenterPosition() == Vector(10, 20, 30) + assert mesh_data.getType() == MeshType.pointcloud \ No newline at end of file diff -Nru uranium-3.3.0/tests/Operations/TestAddSceneNodeOperation.py uranium-4.4.1/tests/Operations/TestAddSceneNodeOperation.py --- uranium-3.3.0/tests/Operations/TestAddSceneNodeOperation.py 1970-01-01 00:00:00.000000000 +0000 +++ uranium-4.4.1/tests/Operations/TestAddSceneNodeOperation.py 2019-11-19 10:50:46.000000000 +0000 @@ -0,0 +1,30 @@ +from UM.Operations.AddSceneNodeOperation import AddSceneNodeOperation +from UM.Scene.SceneNode import SceneNode +from UM.Scene.Selection import Selection + + +def test_SimpleRedoUndo(): + node = SceneNode() + parent_node = SceneNode() + operation = AddSceneNodeOperation(node, parent_node) + operation.redo() + + assert node.getParent() == parent_node + + operation.undo() + + assert node.getParent() is None + + +def test_UndoRedoWithSelection(): + node = SceneNode() + parent_node = SceneNode() + Selection.add(node) + + operation = AddSceneNodeOperation(node, parent_node) + operation.undo() + + assert not Selection.isSelected(node) + + operation.redo() + assert Selection.isSelected(node) diff -Nru uranium-3.3.0/tests/Operations/TestGroupedOperation.py uranium-4.4.1/tests/Operations/TestGroupedOperation.py --- uranium-3.3.0/tests/Operations/TestGroupedOperation.py 1970-01-01 00:00:00.000000000 +0000 +++ uranium-4.4.1/tests/Operations/TestGroupedOperation.py 2019-11-19 10:50:46.000000000 +0000 @@ -0,0 +1,53 @@ +from unittest.mock import MagicMock + +from UM.Math.Vector import Vector +from UM.Operations.GroupedOperation import GroupedOperation +import pytest + +from UM.Operations.Operation import Operation +from UM.Operations.TranslateOperation import TranslateOperation +from UM.Scene.SceneNode import SceneNode + + +def test_addOperationFinalised(): + operation_1 = GroupedOperation() + operation_2 = GroupedOperation() + + operation_1.redo() # The operation is now finalized, so it shouldn't be possible to add operations to it now. + with pytest.raises(Exception): + operation_1.addOperation(operation_2) + + +def test_addAndMergeOperations(): + group_operation_1 = GroupedOperation() + group_operation_2 = GroupedOperation() + group_operation_3 = GroupedOperation() + + scene_node = SceneNode() + + operation_1 = TranslateOperation(scene_node, Vector(10, 10)) + operation_2 = TranslateOperation(scene_node, Vector(10, 20)) + operation_3 = Operation() + + operation_1.mergeWith = MagicMock() + + group_operation_1.addOperation(operation_1) + assert group_operation_1.getNumChildrenOperations() == 1 + + # Length of the grouped operations must be the same. + assert not group_operation_1.mergeWith(group_operation_2) + + group_operation_3.addOperation(operation_3) + + # The base operation always says it can't be merged (so one child says it can't be merged). This should result + # in the parent (grouped) operation also failing. + assert not group_operation_3.mergeWith(group_operation_1) + + group_operation_2.addOperation(operation_2) + merged_operation = group_operation_1.mergeWith(group_operation_2) + + # The merge of the nested operation should have been called once. + assert operation_1.mergeWith.call_count == 1 + + # Number of operations should still be the same. + assert merged_operation.getNumChildrenOperations() == 1 \ No newline at end of file diff -Nru uranium-3.3.0/tests/Operations/TestOperationStack.py uranium-4.4.1/tests/Operations/TestOperationStack.py --- uranium-3.3.0/tests/Operations/TestOperationStack.py 1970-01-01 00:00:00.000000000 +0000 +++ uranium-4.4.1/tests/Operations/TestOperationStack.py 2019-11-19 10:50:46.000000000 +0000 @@ -0,0 +1,45 @@ +import time +from unittest.mock import MagicMock + +from UM.Operations.GroupedOperation import GroupedOperation +from UM.Operations.OperationStack import OperationStack + + +def test_push(): + operation_stack = OperationStack(MagicMock()) + operation_stack.changed.emit = MagicMock() + test_operation = GroupedOperation() + + test_operation_2 = GroupedOperation() + + operation_stack.push(test_operation) + operation_stack.push(test_operation_2) + + # Since we added two operations that can be merged, we should end up with one operation! + assert len(operation_stack.getOperations()) == 1 + + test_operation_3 = GroupedOperation() + + # Fake call to notify the operation stack that the tool has stopped doing something + operation_stack._onToolOperationStopped(None) + # Pretend like another operation was added but with a lot of time in between. + test_operation_3._timestamp = time.time() + 2000000 + operation_stack.push(test_operation_3) + assert len(operation_stack.getOperations()) == 2 + + operation_stack.undo() + # The count should be at 4, since we added 3 operations and then undid the last one. + assert operation_stack.changed.emit.call_count == 4 + operation_stack.undo() + assert operation_stack.changed.emit.call_count == 5 + + # There is nothing to undo! + assert not operation_stack.canUndo() + operation_stack.undo() + assert operation_stack.changed.emit.call_count == 5 + + operation_stack.redo() + assert operation_stack.changed.emit.call_count == 6 + operation_stack.redo() + assert operation_stack.changed.emit.call_count == 7 + assert not operation_stack.canRedo() \ No newline at end of file diff -Nru uranium-3.3.0/tests/Operations/TestScaleOperation.py uranium-4.4.1/tests/Operations/TestScaleOperation.py --- uranium-3.3.0/tests/Operations/TestScaleOperation.py 1970-01-01 00:00:00.000000000 +0000 +++ uranium-4.4.1/tests/Operations/TestScaleOperation.py 2019-11-19 10:50:46.000000000 +0000 @@ -0,0 +1,34 @@ +from UM.Math.Vector import Vector +from UM.Operations.ScaleOperation import ScaleOperation +from UM.Scene.SceneNode import SceneNode + + +def test_setSimpleScale(): + node = SceneNode() + op = ScaleOperation(node, Vector(1, 2, 3), set_scale = True) + + op.redo() + assert node.getScale() == Vector(1, 2, 3) + + op.undo() + assert node.getScale() == Vector(1, 1, 1) + + +def test_addScale(): + node = SceneNode() + op = ScaleOperation(node, Vector(1, 2, 3), set_scale = True) + op.redo() + + op2 = ScaleOperation(node, Vector(1, 2, 3), add_scale = True) + op2.redo() + assert node.getScale() == Vector(2, 4, 6) + + +def test_relativeScale(): + node = SceneNode() + op = ScaleOperation(node, Vector(2, 2, 2), set_scale=True) + op.redo() + + op2 = ScaleOperation(node, Vector(1, 2, 3), relative_scale=True) + op2.redo() + assert node.getScale() == Vector(3, 4, 5) diff -Nru uranium-3.3.0/tests/PluginRegistry/EmptyPlugin/plugin.json uranium-4.4.1/tests/PluginRegistry/EmptyPlugin/plugin.json --- uranium-3.3.0/tests/PluginRegistry/EmptyPlugin/plugin.json 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/tests/PluginRegistry/EmptyPlugin/plugin.json 2019-11-19 10:50:46.000000000 +0000 @@ -1,5 +1,5 @@ { "name": "EmptyPlugin", - "api": 4, + "api": 5, "version": "1.0.0" } \ No newline at end of file diff -Nru uranium-3.3.0/tests/PluginRegistry/PluginNoVersionNumber/plugin.json uranium-4.4.1/tests/PluginRegistry/PluginNoVersionNumber/plugin.json --- uranium-3.3.0/tests/PluginRegistry/PluginNoVersionNumber/plugin.json 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/tests/PluginRegistry/PluginNoVersionNumber/plugin.json 2019-11-19 10:50:46.000000000 +0000 @@ -1,4 +1,4 @@ { "name": "PluginNoVersionNumber", - "api": 4 + "api": 5 } \ No newline at end of file diff -Nru uranium-3.3.0/tests/PluginRegistry/TestNested/TestPlugin2/plugin.json uranium-4.4.1/tests/PluginRegistry/TestNested/TestPlugin2/plugin.json --- uranium-3.3.0/tests/PluginRegistry/TestNested/TestPlugin2/plugin.json 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/tests/PluginRegistry/TestNested/TestPlugin2/plugin.json 2019-11-19 10:50:46.000000000 +0000 @@ -1,5 +1,5 @@ { "name": "TestPlugin2", - "api": 4, + "api": 5, "version": "1.0.0" } \ No newline at end of file diff -Nru uranium-3.3.0/tests/PluginRegistry/TestPlugin/plugin.json uranium-4.4.1/tests/PluginRegistry/TestPlugin/plugin.json --- uranium-3.3.0/tests/PluginRegistry/TestPlugin/plugin.json 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/tests/PluginRegistry/TestPlugin/plugin.json 2019-11-19 10:50:46.000000000 +0000 @@ -1,5 +1,7 @@ { "name": "TestPlugin", - "api": 4, - "version": "1.0.0" + "api": 5, + "version": "1.0.0", + "i18n-catalog": "bla", + "description": "test" } \ No newline at end of file diff -Nru uranium-3.3.0/tests/PluginRegistry/TestPluginRegistry.py uranium-4.4.1/tests/PluginRegistry/TestPluginRegistry.py --- uranium-3.3.0/tests/PluginRegistry/TestPluginRegistry.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/tests/PluginRegistry/TestPluginRegistry.py 2019-11-19 10:50:46.000000000 +0000 @@ -1,16 +1,39 @@ # Copyright (c) 2015 Ultimaker B.V. # Uranium is released under the terms of the LGPLv3 or higher. - -#!/usr/bin/env python2 +from unittest.mock import patch, mock_open, MagicMock import pytest import os from UM.Application import Application from UM.PluginRegistry import PluginRegistry -from UM.PluginError import PluginNotFoundError +from UM.PluginError import PluginNotFoundError, InvalidMetaDataError +from UM.Version import Version +import json + + +valid_plugin_json_data = [ + "{\"name\": \"TestPlugin1\", \"api\": 5, \"version\": \"1.0.0\"}", + "{\"name\": \"TestPlugin2\", \"supported_sdk_versions\": [5], \"version\": \"1.0.0\"}", + "{\"name\": \"TestPlugin3\", \"api\": 5, \"supported_sdk_versions\": [5], \"version\": \"1.0.0\"}", + "{\"name\": \"TestPlugin3\", \"supported_sdk_versions\": [5, 6, \"2\"], \"version\": \"1.0.0\"}" +] + +invalid_plugin_json_data = [ + "", # Invalid JSON + "{\"name\": \"TestPlugin1\", \"api\": 5}", # No version + "{\"name\": \"TestPlugin2\", \"version\": \"1.0.0\"}" # No API or supported_sdk_version set. +] + class FixtureRegistry(PluginRegistry): + + def __init__(self, application: "Application"): + PluginRegistry._PluginRegistry__instance = None + super().__init__(application) + self._api_version = Version("5.5.0") + self._plugin_config_filename = "test_file" + def registerTestPlugin(self, plugin): self._test_plugin = plugin @@ -20,29 +43,202 @@ return None + @pytest.fixture def registry(application): - registry = FixtureRegistry() + registry = FixtureRegistry(application) registry.addPluginLocation(os.path.dirname(os.path.abspath(__file__))) registry.addType("test", registry.registerTestPlugin) - registry.setApplication(application) return registry + class TestPluginRegistry(): + + def test_init(self, registry): + # Without loading anything, this shouldn't fail. + registry.initializeBeforePluginsAreLoaded() + registry.initializeAfterPluginsAreLoaded() + + def test_savePluginData(self, registry): + with patch("builtins.open", mock_open()) as mock_file: + registry._savePluginData() + handle = mock_file() + + writen_data = json.loads(handle.write.call_args[0][0]) + expected_data = json.loads('{"disabled": [], "to_install": {}, "to_remove": []}') + assert writen_data == expected_data + + def test_uninstallPlugin(self, registry): + with patch("builtins.open", mock_open()) as mock_file: + registry.uninstallPlugin("BLARG") # It doesn't exist, so don't do anything. + handle = mock_file() + handle.write.assert_not_called() + + registry.loadPlugins() + registry.uninstallPlugin("TestPlugin") + writen_data = json.loads(handle.write.call_args[0][0]) + expected_data = json.loads('{"disabled": [], "to_install": {}, "to_remove": ["TestPlugin"]}') + assert writen_data == expected_data + + assert "TestPlugin" not in registry.getInstalledPlugins() + + def test_isBundledPlugin(self, registry): + assert registry.isBundledPlugin("NOPE") == False + # The result will be cached the second time, so ensure we test that path as well. + assert registry.isBundledPlugin("NOPE") == False + + def test_addSupportedPluginExtension(self, registry): + registry.addSupportedPluginExtension("blarg", "zomg") + description_added = False + extension_added = False + + for file_type in registry.supportedPluginExtensions: + if "blarg" in file_type: + extension_added = True + if "zomg" in file_type: + description_added = True + + assert extension_added + assert description_added + + def test_installPlugin(self, registry): + path = os.path.abspath(os.path.dirname(os.path.abspath(__file__)) + "/UraniumExampleExtensionPlugin.umplugin") + if not path.startswith("/"): + path = "/" + path + path = "file://" + path + result = registry.installPlugin(path) + assert result.get("status") == "ok" + + # Ensure that the plugin is now marked as installed (although the actual installation happens on next restart!) + assert "UraniumExampleExtensionPlugin" in registry.getInstalledPlugins() + + def test__installPlugin(self, registry): + # This tests that the unpacking of the plugin doesn't fail. + path = os.path.abspath(os.path.dirname(os.path.abspath(__file__)) + "/UraniumExampleExtensionPlugin.umplugin") + registry._installPlugin("UraniumExampleExtensionPlugin", path) + + def test__subsetInDict(self, registry): + assert not registry._subsetInDict({}, {"test": "test"}) + assert not registry._subsetInDict( {"test": "omg"}, {"test": "test"}) + assert registry._subsetInDict({"test": "test", "zomg": "omg"}, {"test": "test"}) + + def test_requiredPlugins(self, registry): + assert registry.checkRequiredPlugins(["EmptyPlugin", "OldTestPlugin", "PluginNoVersionNumber", "TestPlugin", "TestPlugin2"]) + + assert not registry.checkRequiredPlugins(["TheNotLoadedPlugin"]) + def test_metaData(self, registry): - metadata = registry.getMetaData("TestPlugin") - assert metadata == {"id": "TestPlugin", + expected_metadata = {"id": "TestPlugin", "plugin": {"name": "TestPlugin", - "api": 4, - "version": "1.0.0"}, + "api": 5, + "supported_sdk_versions": [Version(5)], + "version": "1.0.0", + "i18n-catalog": "bla", + "description": "test"}, "location": os.path.abspath(os.path.dirname(os.path.abspath(__file__)) + "/TestPlugin"), } + metadata = registry.getMetaData("TestPlugin") + assert metadata == expected_metadata + registry.loadPlugins() + all_metadata = registry.getAllMetaData() + test_plugin_found = False + for plugin_metadata in all_metadata: + if plugin_metadata.get("id") == "TestPlugin": + test_plugin_found = True + assert plugin_metadata == metadata + assert test_plugin_found + + def test_getPluginLocation(self, registry): + # Plugin is not loaded yet, so it should raise a KeyError + with pytest.raises(KeyError): + registry.getPluginPath("TestPlugin") + + registry.loadPlugin("TestPlugin") + assert registry.getPluginPath("TestPlugin") == os.path.abspath(os.path.dirname(os.path.abspath(__file__)) + "/TestPlugin") + + @pytest.mark.parametrize("plugin_data", valid_plugin_json_data) + def test_validPluginJson(self, plugin_data, registry): + registry._parsePluginInfo("beep", plugin_data, {}) + + @pytest.mark.parametrize("plugin_data", invalid_plugin_json_data) + def test_invalidPluginJson(self, plugin_data, registry): + with pytest.raises(InvalidMetaDataError): + registry._parsePluginInfo("beep", plugin_data, {}) + + + def test_populateMetadata_unknownPlugin(self, registry): + assert not registry._populateMetaData("TheGreatUnknown") + + + def test_populateMetadata_locationNotFound(self, registry): + registry._findPlugin = MagicMock(return_value = True) + registry._locatePlugin = MagicMock(return_value = None) + assert not registry._populateMetaData("Waldo") + + def test_populateMetadata_PluginWitIdentityCrisis(self, registry): + registry._findPlugin = MagicMock(return_value="Not a plugin, but i was found!") + registry._locatePlugin = MagicMock(return_value="yaaay") + + with pytest.raises(InvalidMetaDataError): + registry._populateMetaData("Whatever") + + def test_populateMetadata_PluginWithNoMetadata(self, registry): + plugin = MagicMock(name = "plugin") + plugin.getMetaData = MagicMock(return_value = None) + registry._findPlugin = MagicMock(return_value= plugin) + registry._locatePlugin = MagicMock(return_value="yaaay") + registry._parsePluginInfo = MagicMock(return_value = None) + with pytest.raises(InvalidMetaDataError): + with patch("builtins.open", mock_open()) as mock_file: + registry._populateMetaData("Whatever") + + def test_getInstalledPlugins(self, registry): + assert registry.getInstalledPlugins() == [] # Should be empty by default + registry.loadPlugins() + # All the plugins in this test should be marked as installed. + assert registry.getInstalledPlugins() == sorted(['OldTestPlugin', 'PluginNoVersionNumber', 'EmptyPlugin', 'TestPlugin', 'TestPlugin2']) + + def test_isActivePlugin(self, registry): + # The plugins shouldn't be active yet (because they aren't loaded) + assert not registry.isActivePlugin("TestPlugin") + assert not registry.isActivePlugin("PluginNoVersionNumber") + + registry.loadPlugins() # Load them up + + assert registry.isActivePlugin("TestPlugin") + # Doesn't have a version number, so should not be active. + assert not registry.isActivePlugin("PluginNoVersionNumber") + + # Should no longer be active after we disable it. + registry.disablePlugin("TestPlugin") + assert not registry.isActivePlugin("TestPlugin") + + def test_allActivePlugins(self, registry): + registry.loadPlugins() # Load them up + all_active_plugin_ids = registry.getActivePlugins() + + all_plugins_found = True + for plugin_id in ['EmptyPlugin', 'TestPlugin', 'TestPlugin2']: + if plugin_id not in all_active_plugin_ids: + all_plugins_found = False + + assert all_plugins_found + def test_load(self, registry): registry.loadPlugin("TestPlugin") assert registry.getTestPlugin().getPluginId() == "TestPlugin" - + + assert registry.getPluginObject("TestPlugin") == registry.getTestPlugin() + + def test_loadTwice(self, registry): + registry.loadPlugin("TestPlugin") + + registry._findPlugin = MagicMock() + registry.loadPlugin("TestPlugin") + assert registry._findPlugin.call_count == 0 + def test_loadNested(self, registry): registry.loadPlugin("TestPlugin2") @@ -50,17 +246,21 @@ def test_findAllPlugins(self, registry): names = registry._findInstalledPlugins() - assert sorted(names) == ["EmptyPlugin","OldTestPlugin", "PluginNoVersionNumber", "TestPlugin", "TestPlugin2"] + assert sorted(names) == ["EmptyPlugin", "OldTestPlugin", "PluginNoVersionNumber", "TestPlugin", "TestPlugin2"] def test_pluginNotFound(self, registry): with pytest.raises(PluginNotFoundError): registry.loadPlugin("NoSuchPlugin") + with pytest.raises(PluginNotFoundError): + registry.getPluginObject("ThisPluginDoesntExist!") + def test_disabledPlugin(self, registry): # Disabled plugin should not be loaded registry._disabled_plugins = ["TestPlugin"] registry.loadPlugin("TestPlugin") assert registry.getTestPlugin() is None + assert registry.getDisabledPlugins() == ["TestPlugin"] # Other plugins should load. registry.loadPlugin("TestPlugin2") @@ -68,7 +268,7 @@ def test_emptyPlugin(self, registry): registry.loadPlugin("EmptyPlugin") - with pytest.raises(KeyError): + with pytest.raises(PluginNotFoundError): registry.getPluginObject("EmptyPlugin") def test_invalidVersionNumber(self, registry): @@ -78,3 +278,27 @@ def test_ignoreOldApi(self, registry): registry.loadPlugin("OldTestPlugin") assert registry.getTestPlugin() is None + + def test_isPluginApiVersionCompatible(self, registry): + # Same version is compatible + assert registry.isPluginApiVersionCompatible(registry._api_version) + + # Lower major version is not compatible + api_version = Version("4.0.0") + assert not registry.isPluginApiVersionCompatible(api_version) + + # Higher major version is not compatible + api_version = Version("6.0.0") + assert not registry.isPluginApiVersionCompatible(api_version) + + # Same major version but higher minor version is not compatible + api_version = Version("5.7.0") + assert not registry.isPluginApiVersionCompatible(api_version) + + # Same major version but lower minor version is compatible + api_version = Version("5.3.0") + assert registry.isPluginApiVersionCompatible(api_version) + + # Same major version but different patch version should not matter, it should be compatible + api_version = Version("5.0.5") + assert registry.isPluginApiVersionCompatible(api_version) Binary files /tmp/tmpZ9Gqtt/Ulw1y65zD_/uranium-3.3.0/tests/PluginRegistry/UraniumExampleExtensionPlugin.umplugin and /tmp/tmpZ9Gqtt/MTdpndjFmQ/uranium-4.4.1/tests/PluginRegistry/UraniumExampleExtensionPlugin.umplugin differ diff -Nru uranium-3.3.0/tests/preferences_test.cfg uranium-4.4.1/tests/preferences_test.cfg --- uranium-3.3.0/tests/preferences_test.cfg 1970-01-01 00:00:00.000000000 +0000 +++ uranium-4.4.1/tests/preferences_test.cfg 2019-11-19 10:50:46.000000000 +0000 @@ -0,0 +1,8 @@ +[general] +foo = omgzomg +derp = True +version = 6 + +[test] +more_test = 12 +even_more_test = 9001 \ No newline at end of file diff -Nru uranium-3.3.0/tests/SaveFile/TestSaveFile.py uranium-4.4.1/tests/SaveFile/TestSaveFile.py --- uranium-3.3.0/tests/SaveFile/TestSaveFile.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/tests/SaveFile/TestSaveFile.py 2019-11-19 10:50:46.000000000 +0000 @@ -28,7 +28,7 @@ with SaveFile(path, "w") as f: f.write("test file") - with open(path) as f: + with open(path, encoding = "utf-8") as f: self.assertEqual(f.readline(), "test file") def test_multiWrite(self): @@ -43,7 +43,7 @@ self.assertEqual(len(os.listdir(self._temp_dir.name)), 1) # And file contents should be correct. - with open(path) as f: + with open(path, encoding = "utf-8") as f: data = f.read() self.assertEqual(len(data), 9) self.assertEqual(data, "test file") diff -Nru uranium-3.3.0/tests/Scene/SceneTest.py uranium-4.4.1/tests/Scene/SceneTest.py --- uranium-3.3.0/tests/Scene/SceneTest.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/tests/Scene/SceneTest.py 1970-01-01 00:00:00.000000000 +0000 @@ -1,35 +0,0 @@ -# Copyright (c) 2015 Ultimaker B.V. -# Uranium is released under the terms of the LGPLv3 or higher. - -import unittest - -from UM.Scene.Scene import Scene -from UM.Scene.SceneNode import SceneNode -from UM.Math.Matrix import Matrix -from UM.Math.Vector import Vector -from copy import copy, deepcopy -import numpy - -class SceneTest(unittest.TestCase): - def setUp(self): - # Called before the first testfunction is executed - self._scene = Scene() - self._scene_object = SceneNode() - self._scene_object2 = SceneNode() - self._scene_object.addChild(self._scene_object2) - self._scene.getRoot().addChild(self._scene_object) - temp_matrix = Matrix() - temp_matrix.setByTranslation(Vector(10,10,10)) - self._scene_object2.setLocalTransformation(deepcopy(temp_matrix)) - temp_matrix.setByScaleFactor(0.5) - self._scene_object.setLocalTransformation(temp_matrix) - - def tearDown(self): - # Called after the last testfunction was executed - pass - - def test_checkWorldTransformation(self): - numpy.testing.assert_array_almost_equal(self._scene_object2.getWorldTransformation().getData(), numpy.array([[0.5,0,0,5],[0,0.5,0,5],[0,0,0.5,5],[0,0,0,1]])) - -if __name__ == "__main__": - unittest.main() diff -Nru uranium-3.3.0/tests/Scene/TestCamera.py uranium-4.4.1/tests/Scene/TestCamera.py --- uranium-3.3.0/tests/Scene/TestCamera.py 1970-01-01 00:00:00.000000000 +0000 +++ uranium-4.4.1/tests/Scene/TestCamera.py 2019-11-19 10:50:46.000000000 +0000 @@ -0,0 +1,101 @@ +import numpy +import pytest + +from UM.Math.Matrix import Matrix +from UM.Math.Ray import Ray +from UM.Math.Vector import Vector +from UM.Mesh.MeshData import MeshData +from UM.Scene.Camera import Camera + +from unittest.mock import MagicMock, patch + +from copy import deepcopy + +@pytest.fixture +def camera(): + with patch("UM.Application.Application.getInstance", MagicMock()): + return Camera() + +def test_setMeshData(camera): + with pytest.raises(AssertionError): + camera.setMeshData(MeshData()) + + # This is allowed + camera.setMeshData(None) + +def test_getterAndSetters(camera): + # Pretty much all of them are super simple, but it doesn't hurt to check them. + + camera.setAutoAdjustViewPort(False) + assert camera.getAutoAdjustViewPort() == False + + camera.setViewportWidth(12) + assert camera.getViewportWidth() == 12 + + camera.setViewportHeight(12) + assert camera.getViewportHeight() == 12 + + camera.setViewportSize(22, 22) + assert camera.getViewportHeight() == 22 + assert camera.getViewportWidth() == 22 + + camera.setWindowSize(9001, 9002) + assert camera.getWindowSize() == (9001, 9002) + + camera.setPerspective(False) + assert camera.isPerspective() == False + + matrix = Matrix() + matrix.setPerspective(10, 20, 30, 40) + camera.setProjectionMatrix(matrix) + + assert numpy.array_equal(camera.getProjectionMatrix().getData(), matrix.getData()) + + camera.setZoomFactor(1) + assert camera.getZoomFactor() == 1 + + assert camera.render(None) # Should always be true, as it's a camera + + +def test_deepCopy(camera): + camera.setWindowSize(100, 200) + camera.setViewportSize(300, 400) + + copied_camera = deepcopy(camera) + + assert copied_camera.getWindowSize() == (100, 200) + assert copied_camera.getViewportHeight() == 400 + assert copied_camera.getViewportWidth() == 300 + + +@pytest.mark.parametrize("coordinates,direction", [((0, 0), (0.0, 0.0, -1.0)), + ((50, 50), (0.7061278820037842, -0.7061278820037842, -0.0526)), + ((100, 100), (0.706861674785614, -0.706861674785614, -0.026327675208449364)), + ((42, 8), (0.9786322116851807, -0.18640615046024323, -0.08678573369979858))]) +def test_getRayPerspective(coordinates, direction, camera): + camera.setViewportSize(100, 100) + camera.setWindowSize(100, 100) + result_ray = camera.getRay(coordinates[0], coordinates[1]) + assert result_ray.direction == Vector(direction[0], direction[1], direction[2]) + +@pytest.mark.parametrize("coordinates,direction", [((0, 0), (0.0, 0.0, -1.0)), + ((50, 50), (0.0, 0.0, -1.0)), + ((100, 100), (0.0, 0.0, -1.0)), + ((42, 8), (0.0, 0.0, -1.0))]) +def test_getRayOrthographic(coordinates, direction, camera): + camera.isPerspective = MagicMock(return_value = False) + camera.setViewportSize(100, 100) + camera.setWindowSize(100, 100) + result_ray = camera.getRay(coordinates[0], coordinates[1]) + assert result_ray.direction == Vector(direction[0], direction[1], direction[2]) + + +def test_project(camera): + assert camera.project(Vector(10, 10, 10)) == (-10.000000372529039, -10.000000372529039) + + +def test_getViewProjectionMatrix(camera): + assert camera.getViewProjectionMatrix() == Matrix([[0.2, 0, 0, 0], + [0, 0.2, 0, 0], + [0, 0, -0.01, 0], + [0, 0, 0, 1]]) \ No newline at end of file diff -Nru uranium-3.3.0/tests/Scene/TestSceneNodeDecorator.py uranium-4.4.1/tests/Scene/TestSceneNodeDecorator.py --- uranium-3.3.0/tests/Scene/TestSceneNodeDecorator.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/tests/Scene/TestSceneNodeDecorator.py 2019-11-19 10:50:46.000000000 +0000 @@ -2,7 +2,7 @@ from UM.Scene.SceneNode import SceneNode from UM.Scene.SceneNodeDecorator import SceneNodeDecorator from unittest.mock import MagicMock - +import copy class TheAmazingTestDecorator(SceneNodeDecorator): def __init__(self, *args, **kwargs): @@ -31,69 +31,73 @@ return "okayish" -if __name__ == '__main__': - def test_SceneNodeDecorator(): - test_node = SceneNode() - test_decorator = SceneNodeDecorator() - amazing_decorator = TheAmazingTestDecorator() - less_amazing_decorator = TheLessAmazingTestDecorator() - not_amazing_decorator = TheNotSoAmazingTestDecorator() - - # Replace emit with mock object - test_node.decoratorsChanged.emit = MagicMock() - test_decorator.clear = MagicMock() - - # Nothing should happen. - test_node.addDecorator(None) - assert len(test_node.getDecorators()) == 0 - assert test_node.decoratorsChanged.emit.call_count == 0 - - # Nothing should happen. - test_node.addDecorator(SceneNode()) - assert len(test_node.getDecorators()) == 0 - assert test_node.decoratorsChanged.emit.call_count == 0 - - # First actual change - test_node.addDecorator(test_decorator) - assert len(test_node.getDecorators()) == 1 - assert test_node.decoratorsChanged.emit.call_count == 1 - - # Adding a decorator of the same type (SceneNodeDecorator) again should not do anything. - test_node.addDecorator(test_decorator) - assert len(test_node.getDecorators()) == 1 - assert test_node.decoratorsChanged.emit.call_count == 1 - - # Remove the decorator again! - test_node.removeDecorator(SceneNodeDecorator) - assert len(test_node.getDecorators()) == 0 - assert test_node.decoratorsChanged.emit.call_count == 2 - assert test_decorator.clear.call_count == 1 # Ensure that the clear of the test decorator is called. - - # Add a number of decorators! - test_node.addDecorator(amazing_decorator) - test_node.addDecorator(less_amazing_decorator) - test_node.addDecorator(not_amazing_decorator) - assert test_node.decoratorsChanged.emit.call_count == 5 - assert len(test_node.getDecorators()) == 3 - - assert test_node.hasDecoration("zomg") == False - assert test_node.hasDecoration("theOkayDecoration") - assert test_node.hasDecoration("theAmazingDecoration") - - # Calling the decorations with args / kwargs - assert test_node.callDecoration("theOkayDecoration", None) is None - assert test_node.callDecoration("theEvenMoreAmazingDecoration", "beep") == ("beep", "Wow", "so wow") - assert test_node.callDecoration("theEvenMoreAmazingDecoration", "beep", much_test = "Wow") == ("beep", "Wow", "Wow") - - # Calling decoration that is "double" - assert test_node.callDecoration("theAmazingDecoration") == "Amazing!" - test_node.removeDecorator(TheAmazingTestDecorator) - assert test_node.callDecoration("theAmazingDecoration") == "amazing" - - not_amazing_decorator.clear = MagicMock() - test_node.removeDecorators() - # Also assure that removing all decorators also triggers the clear - assert not_amazing_decorator.clear.call_count == 1 - assert len(test_node.getDecorators()) == 0 - assert test_node.decoratorsChanged.emit.call_count == 8 # +3 changes +def test_getNode(): + decorator = SceneNodeDecorator() + scene_node = SceneNode() + decorator.setNode(scene_node) + assert decorator.getNode() == scene_node + + +def test_deepcopy(): + decorator = SceneNodeDecorator() + with pytest.raises(NotImplementedError): + copy.deepcopy(decorator) + + +def test_SceneNodeDecorator(): + test_node = SceneNode() + test_decorator = SceneNodeDecorator() + amazing_decorator = TheAmazingTestDecorator() + less_amazing_decorator = TheLessAmazingTestDecorator() + not_amazing_decorator = TheNotSoAmazingTestDecorator() + + # Replace emit with mock object + test_node.decoratorsChanged.emit = MagicMock() + test_decorator.clear = MagicMock() + + # First actual change + test_node.addDecorator(test_decorator) + assert len(test_node.getDecorators()) == 1 + assert test_node.decoratorsChanged.emit.call_count == 1 + + # Adding a decorator of the same type (SceneNodeDecorator) again should not do anything. + test_node.addDecorator(test_decorator) + assert len(test_node.getDecorators()) == 1 + assert test_node.decoratorsChanged.emit.call_count == 1 + assert test_node.getDecorator(type(test_decorator)) == test_decorator + + # Remove the decorator again! + test_node.removeDecorator(SceneNodeDecorator) + assert len(test_node.getDecorators()) == 0 + assert test_node.decoratorsChanged.emit.call_count == 2 + assert test_decorator.clear.call_count == 1 # Ensure that the clear of the test decorator is called. + + # Add a number of decorators! + test_node.addDecorator(amazing_decorator) + test_node.addDecorator(less_amazing_decorator) + test_node.addDecorator(not_amazing_decorator) + assert test_node.decoratorsChanged.emit.call_count == 5 + assert len(test_node.getDecorators()) == 3 + + assert test_node.hasDecoration("zomg") == False + assert test_node.hasDecoration("theOkayDecoration") + assert test_node.hasDecoration("theAmazingDecoration") + + # Calling the decorations with args / kwargs + assert test_node.callDecoration("theOkayDecoration", None) is None + assert test_node.callDecoration("theEvenMoreAmazingDecoration", "beep") == ("beep", "Wow", "so wow") + assert test_node.callDecoration("theEvenMoreAmazingDecoration", "beep", much_test = "Wow") == ("beep", "Wow", "Wow") + + # Calling decoration that is "double" + assert test_node.callDecoration("theAmazingDecoration") == "Amazing!" + test_node.removeDecorator(TheAmazingTestDecorator) + assert test_node.callDecoration("theAmazingDecoration") == "amazing" + + not_amazing_decorator.clear = MagicMock() + test_node.removeDecorators() + # Also assure that removing all decorators also triggers the clear + assert not_amazing_decorator.clear.call_count == 1 + assert len(test_node.getDecorators()) == 0 + assert test_node.decoratorsChanged.emit.call_count == 7 + assert test_node.getDecorator(type(test_decorator)) is None diff -Nru uranium-3.3.0/tests/Scene/TestSceneNode.py uranium-4.4.1/tests/Scene/TestSceneNode.py --- uranium-3.3.0/tests/Scene/TestSceneNode.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/tests/Scene/TestSceneNode.py 2019-11-19 10:50:46.000000000 +0000 @@ -1,6 +1,8 @@ -# Copyright (c) 2015 Ultimaker B.V. +# Copyright (c) 2019 Ultimaker B.V. # Uranium is released under the terms of the LGPLv3 or higher. - +from UM.Mesh.MeshBuilder import MeshBuilder +from UM.Mesh.MeshData import MeshData +from UM.Scene.GroupDecorator import GroupDecorator from UM.Scene.SceneNode import SceneNode from UM.Math.Vector import Vector @@ -11,6 +13,9 @@ import unittest import math +from copy import deepcopy +from unittest.mock import MagicMock + class SceneNodeTest(unittest.TestCase): def setUp(self): pass @@ -51,11 +56,15 @@ node.setOrientation(Quaternion.fromAngleAxis(math.pi / 4, Vector.Unit_Z)) - self.assertEqual(node.getOrientation(), Quaternion.fromAngleAxis(math.pi / 4, Vector.Unit_Z)) + node_orientation = deepcopy(node.getOrientation()) + node_orientation.normalize() #For fair comparison. + self.assertEqual(node_orientation, Quaternion.fromAngleAxis(math.pi / 4, Vector.Unit_Z)) node.setOrientation(Quaternion.fromAngleAxis(math.pi / 4, Vector.Unit_Z)) - self.assertEqual(node.getOrientation(), Quaternion.fromAngleAxis(math.pi / 4, Vector.Unit_Z)) + node_orientation = deepcopy(node.getOrientation()) + node_orientation.normalize() #For fair comparison. + self.assertEqual(node_orientation, Quaternion.fromAngleAxis(math.pi / 4, Vector.Unit_Z)) def test_rotate(self): node = SceneNode() @@ -64,11 +73,15 @@ node.rotate(Quaternion.fromAngleAxis(math.pi / 4, Vector.Unit_Z)) - self.assertEqual(node.getOrientation(), Quaternion.fromAngleAxis(math.pi / 4, Vector.Unit_Z)) + node_orientation = deepcopy(node.getOrientation()) + node_orientation.normalize() #For fair comparison. + self.assertEqual(node_orientation, Quaternion.fromAngleAxis(math.pi / 4, Vector.Unit_Z)) node.rotate(Quaternion.fromAngleAxis(math.pi / 4, Vector.Unit_Z)) - self.assertEqual(node.getOrientation(), Quaternion.fromAngleAxis(math.pi / 2, Vector.Unit_Z)) + node_orientation = deepcopy(node.getOrientation()) + node_orientation.normalize() + self.assertEqual(node_orientation, Quaternion.fromAngleAxis(math.pi / 2, Vector.Unit_Z)) def test_setScale(self): node = SceneNode() @@ -178,8 +191,80 @@ self.assertEqual(node2.getWorldPosition(), Vector(15,15,25)) self.assertEqual(node2.getPosition(), Vector(0,0,10)) + def test_setName(self): + node = SceneNode() + node.setName("DERP") + assert node.getName() == "DERP" + + def test_getDepth(self): + node1 = SceneNode() + node2 = SceneNode() + node3 = SceneNode() + node4 = SceneNode() + + node1.addChild(node2) + node1.addChild(node3) + node2.addChild(node4) + + assert node1.getDepth() == 0 + assert node2.getDepth() == 1 + assert node3.getDepth() == 1 + assert node4.getDepth() == 2 + def test_visibility(self): + node1 = SceneNode() + node1.setVisible(True) + assert node1.isVisible() + + node2 = SceneNode() + node1.addChild(node2) + node2.setVisible(True) + assert node2.isVisible() + + node1.setVisible(False) + assert not node1.isVisible() + assert not node2.isVisible() + + def test_enabled(self): + node1 = SceneNode() + node1.setEnabled(True) + assert node1.isEnabled() + node2 = SceneNode() + node1.addChild(node2) + node2.setEnabled(True) + assert node2.isEnabled() + + node1.setEnabled(False) + assert not node1.isEnabled() + assert not node2.isEnabled() + + def test_removeChildren(self): + node1 = SceneNode() + node2 = SceneNode() + node1.addChild(node2) + assert node1.hasChildren() + + node1.removeAllChildren() + + assert not node1.hasChildren() + + def test_getAllChildren(self): + parent_node = SceneNode() + child_node_1 = SceneNode() + child_node_2 = SceneNode() + parent_node.addChild(child_node_1) + parent_node.addChild(child_node_2) + + child_1_of_child_node_1 = SceneNode() + child_2_of_child_node_1 = SceneNode() + child_node_1.addChild(child_1_of_child_node_1) + child_node_1.addChild(child_2_of_child_node_1) + + child_1_of_child_node_2 = SceneNode() + child_node_2.addChild(child_1_of_child_node_2) + + assert parent_node.getAllChildren() == [child_node_1, child_node_2, child_1_of_child_node_1, child_2_of_child_node_1, child_1_of_child_node_2] def test_rotateWorld(self): pass @@ -193,7 +278,98 @@ self.assertEqual(node2.getWorldPosition(), Vector(15,10,10)) node2.scale(Vector(1.5,1,1)) self.assertEqual(node2.getWorldPosition(), Vector(15,10,10)) - pass + + def test_deepCopy(self): + node_1 = SceneNode() + node_2 = SceneNode() + node_1.translate(Vector(1, 2, 3)) + node_1.scale(Vector(1.5, 1., 1.)) + node_1.setMeshData(MeshData()) + node_1.addChild(node_2) + node_1.addDecorator(GroupDecorator()) + copied_node = deepcopy(node_1) + + assert copied_node.getScale() == Vector(1.5, 1, 1) + assert copied_node.getPosition() == Vector(1, 2, 3) + assert len(copied_node.getChildren()) == 1 + # Ensure that the decorator also got copied + assert copied_node.callDecoration("isGroup") + + def test_addRemoveDouble(self): + # Adding a child that's already a child of a node should not cause issues. Same for trying to remove one that isn't a child + + node_1 = SceneNode() + node_2 = SceneNode() + # Should work + node_1.addChild(node_2) + # Should still work! + node_1.addChild(node_2) + + # This has already been tested somewhere else, so no problems are expected + node_1.removeChild(node_2) + # Doing it again shouldn't break. + node_1.removeChild(node_2) + + def test_getSetMeshdata(self): + node = SceneNode() + test_mesh = MeshData() + node.setMeshData(test_mesh) + assert node.getMeshData() == test_mesh + + def test_getTransformedMeshdata(self): + node = SceneNode() + node.translate(Vector(10, 0 , 0)) + builder = MeshBuilder() + builder.addVertex(10, 20, 20) + node.setMeshData(builder.build()) + + transformed_mesh = node.getMeshDataTransformed() + + transformed_vertex = transformed_mesh.getVertices()[0] + assert transformed_vertex[0] == 20 + assert transformed_vertex[1] == 20 + assert transformed_vertex[2] == 20 + + def test_getSetSetting(self): + node = SceneNode() + node.setSetting("ZOMG", "BEEP") + assert node.getSetting("ZOMG") == "BEEP" + assert node.getSetting("unknown") == "" + assert node.getSetting("unknown", "zomg") == "zomg" + + def test_getSetSelectable(self): + node = SceneNode() + node.setSelectable(True) + assert node.isSelectable() + node.setEnabled(False) + assert not node.isSelectable() # Node is disabled, can't select it anymore + + def test_getSetMirror(self): + node = SceneNode() + node.setMirror(Vector(-1, 1, 1)) + assert node.getMirror() == Vector(-1, 1, 1) + + def test_setCenterPosition(self): + node = SceneNode() + child_node = SceneNode() + node.addChild(child_node) + child_node.setCenterPosition = MagicMock() + + builder = MeshBuilder() + builder.addVertex(10, 20, 20) + node.setMeshData(builder.build()) + + node.setCenterPosition(Vector(-10, 0, 0)) + + transformed_mesh = node.getMeshData() + + transformed_vertex = transformed_mesh.getVertices()[0] + assert transformed_vertex[0] == 20 + assert transformed_vertex[1] == 20 + assert transformed_vertex[2] == 20 + + child_node.setCenterPosition.assert_called_once_with(Vector(-10, 0, 0)) + if __name__ == "__main__": unittest.main() diff -Nru uranium-3.3.0/tests/Scene/TestScene.py uranium-4.4.1/tests/Scene/TestScene.py --- uranium-3.3.0/tests/Scene/TestScene.py 1970-01-01 00:00:00.000000000 +0000 +++ uranium-4.4.1/tests/Scene/TestScene.py 2019-11-19 10:50:46.000000000 +0000 @@ -0,0 +1,63 @@ +from unittest.mock import MagicMock + +from UM.Scene.Camera import Camera +from UM.Scene.Scene import Scene +from UM.Scene.SceneNode import SceneNode + + +def test_ignoreSceneChanges(): + scene = Scene() + scene.sceneChanged.emit = MagicMock() + scene.setIgnoreSceneChanges(ignore_scene_changes = True) + root = scene.getRoot() + + root.addChild(SceneNode()) + assert scene.sceneChanged.emit.call_count == 0 + + scene.setIgnoreSceneChanges(ignore_scene_changes=False) + root.addChild(SceneNode()) + assert scene.sceneChanged.emit.call_count == 2 + + +def test_switchRoot(): + scene = Scene() + new_root = SceneNode() + scene.rootChanged = MagicMock() + + scene.setRoot(new_root) + assert scene.getRoot() == new_root + assert scene.rootChanged.emit.call_count == 1 + + scene.setRoot(new_root) + assert scene.rootChanged.emit.call_count == 1 + + +def test_findObject(): + scene = Scene() + node = SceneNode() + scene.getRoot().addChild(node) + + assert scene.findObject(id(node)) == node + assert scene.findObject(12) is None + + +def test_cameras(): + scene = Scene() + camera_1 = Camera("camera_one") + camera_2 = Camera("camera_two") + scene.getRoot().addChild(camera_1) + + assert scene.findCamera("camera_one") == camera_1 + assert scene.findCamera("camera_nope") is None + assert scene.findCamera("camera_two") is None + scene.getRoot().addChild(camera_2) + assert scene.findCamera("camera_two") == camera_2 + + all_cameras = scene.getAllCameras() + assert camera_1 in all_cameras + assert camera_2 in all_cameras + + scene.setActiveCamera("camera_one") + assert scene.getActiveCamera() == camera_1 + scene.setActiveCamera("camera_one") # Ensure that setting it again doesn't break things. + diff -Nru uranium-3.3.0/tests/Scene/TestSelection.py uranium-4.4.1/tests/Scene/TestSelection.py --- uranium-3.3.0/tests/Scene/TestSelection.py 1970-01-01 00:00:00.000000000 +0000 +++ uranium-4.4.1/tests/Scene/TestSelection.py 2019-11-19 10:50:46.000000000 +0000 @@ -0,0 +1,136 @@ +from unittest.mock import MagicMock +import pytest + +from UM.Math.AxisAlignedBox import AxisAlignedBox +from UM.Math.Vector import Vector +from UM.Scene.SceneNode import SceneNode +from UM.Scene.Selection import Selection +from UM.Operations.TranslateOperation import TranslateOperation + + +class TestSelection: + + @pytest.fixture(autouse=True) + def clearAll(self): + Selection.clearFace() + Selection.clear() + + def test_addRemoveSelection(self): + node_1 = SceneNode() + Selection.add(node_1) + Selection.setFace(node_1, 99) + + assert Selection.getAllSelectedObjects() == [node_1] + + Selection.remove(node_1) + assert Selection.getAllSelectedObjects() == [] + assert Selection.getSelectedFace() is None + + def test_getSelectedObject(self): + node_1 = SceneNode() + node_2 = SceneNode() + Selection.add(node_1) + Selection.add(node_2) + + assert Selection.getSelectedObject(0) == node_1 + assert Selection.getSelectedObject(1) == node_2 + assert Selection.getSelectedObject(3) is None + + def test_clearSelection(self): + node_1 = SceneNode() + node_2 = SceneNode() + Selection.add(node_1) + Selection.add(node_2) + # Ensure that the objects we want selected are selected + assert Selection.getAllSelectedObjects() == [node_1, node_2] + + Selection.clear() + assert Selection.getAllSelectedObjects() == [] + + def test_getSelectionCenter(self): + node_1 = SceneNode() + node_1.getBoundingBox = MagicMock(return_value = AxisAlignedBox(Vector(0, 0, 0), Vector(10, 20, 30))) + Selection.add(node_1) + assert Selection.getSelectionCenter() == Vector(5, 10, 15) + + node_2 = SceneNode() + node_2.getBoundingBox = MagicMock(return_value=AxisAlignedBox(Vector(0, 0, 0), Vector(20, 30, 40))) + Selection.add(node_2) + assert Selection.getSelectionCenter() == Vector(10, 15, 20) + + def test_applyOperation(self): + # If there is no selection, nothing should happen + assert Selection.applyOperation(TranslateOperation) is None + + node_1 = SceneNode() + Selection.add(node_1) + + Selection.applyOperation(TranslateOperation, Vector(10, 20, 30)) + + assert node_1.getPosition() == Vector(10, 20, 30) + + node_2 = SceneNode() + Selection.add(node_2) + + assert len(Selection.applyOperation(TranslateOperation, Vector(10, 20, 30))) == 2 + + # Node 1 got moved twice + assert node_1.getPosition() == Vector(20, 40, 60) + # And node 2 only once + assert node_2.getPosition() == Vector(10, 20, 30) + + def test_faceSelectMode(self): + Selection.selectedFaceChanged = MagicMock() + + Selection.setFaceSelectMode(True) + assert Selection.getFaceSelectMode() + + Selection.setFaceSelectMode(True) + Selection.setFaceSelectMode(False) + assert not Selection.getFaceSelectMode() + assert Selection.selectedFaceChanged.emit.call_count == 2 + + def test_toggleFace(self): + Selection.selectedFaceChanged = MagicMock() + node_1 = SceneNode() + node_2 = SceneNode() + + assert Selection.getSelectedFace() is None + + Selection.toggleFace(node_1, 91) + assert Selection.getSelectedFace() == (node_1, 91) + Selection.toggleFace(node_2, 92) + assert Selection.getSelectedFace() == (node_2, 92) + Selection.toggleFace(node_2, 93) + assert Selection.getSelectedFace() == (node_2, 93) + Selection.toggleFace(node_2, 93) + assert Selection.getSelectedFace() is None + Selection.toggleFace(node_2, 93) + assert Selection.getSelectedFace() == (node_2, 93) + + Selection.clearFace() + assert Selection.getSelectedFace() is None + + assert Selection.selectedFaceChanged.emit.call_count == 6 + + def test_hoverFace(self): + Selection.hoverFaceChanged = MagicMock() + node_1 = SceneNode() + + assert Selection.getHoverFace() is None + + Selection.hoverFace(node_1, 81) + Selection.hoverFace(node_1, 81) + assert Selection.getHoverFace() == (node_1, 81) + assert Selection.hoverFaceChanged.emit.call_count == 1 + + Selection.unhoverFace() + assert Selection.getHoverFace() is None + + Selection.hoverFace(node_1, 82) + Selection.hoverFace(node_1, 83) + assert Selection.hoverFaceChanged.emit.call_count == 4 + + Selection.clearFace() + assert Selection.getHoverFace() is None + assert Selection.hoverFaceChanged.emit.call_count == 5 diff -Nru uranium-3.3.0/tests/Settings/conftest.py uranium-4.4.1/tests/Settings/conftest.py --- uranium-3.3.0/tests/Settings/conftest.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/tests/Settings/conftest.py 2019-11-19 10:50:46.000000000 +0000 @@ -1,4 +1,4 @@ -# Copyright (c) 2017 Ultimaker B.V. +# Copyright (c) 2018 Ultimaker B.V. # Uranium is released under the terms of the LGPLv3 or higher. # The purpose of this class is to create fixtures or methods that can be shared @@ -8,6 +8,8 @@ import pytest import unittest.mock #For mocking the container provider priority. +from UM.PluginRegistry import PluginRegistry +from UM.VersionUpgradeManager import VersionUpgradeManager from UM.Resources import Resources from UM.MimeTypeDatabase import MimeType, MimeTypeDatabase from UM.Settings.ContainerProvider import ContainerProvider #To provide the fixtures for container providers. @@ -23,7 +25,7 @@ # # \return A brand new container registry. @pytest.fixture -def container_registry(application, test_containers_provider): +def container_registry(application, test_containers_provider, plugin_registry: PluginRegistry): MimeTypeDatabase.addMimeType( MimeType( name = "application/x-uranium-definitioncontainer", @@ -48,10 +50,8 @@ ) ) - ContainerRegistry.setApplication(application) - ContainerRegistry._ContainerRegistry__instance = None # Reset the private instance variable every time - registry = ContainerRegistry.getInstance() + registry = ContainerRegistry(application) #We need to mock the "priority" plug-in metadata field, but preferably without mocking an entire plug-in. with unittest.mock.patch("UM.PluginRegistry.PluginRegistry.getMetaData", unittest.mock.MagicMock(return_value = {"container_provider": {}})): @@ -76,20 +76,20 @@ ## Container provider which provides the containers that are in the setting # test directory. @pytest.fixture -def test_containers_provider(container_provider: ContainerProvider) -> ContainerProvider: +def test_containers_provider(container_provider: ContainerProvider, upgrade_manager: VersionUpgradeManager) -> ContainerProvider: my_folder = os.path.dirname(os.path.abspath(__file__)) definition_ids = {"basic_definition", "children", "functions", "inherits", "metadata_definition", "multiple_settings", "single_setting"} for definition_id in definition_ids: container = DefinitionContainer(definition_id) - container.deserialize(open(os.path.join(my_folder, "definitions", definition_id + ".def.json")).read()) + container.deserialize(open(os.path.join(my_folder, "definitions", definition_id + ".def.json"), encoding = "utf-8").read()) container_provider._containers[definition_id] = container container_provider.addMetadata(container.getMetaData()) instance_ids = {"basic_instance", "metadata_instance", "setting_values"} for instance_id in instance_ids: container = UM.Settings.InstanceContainer.InstanceContainer(instance_id) - container.deserialize(open(os.path.join(my_folder, "instances", instance_id + ".inst.cfg")).read()) + container.deserialize(open(os.path.join(my_folder, "instances", instance_id + ".inst.cfg"), encoding = "utf-8").read()) container_provider._containers[instance_id] = container container_provider.addMetadata(container.getMetaData()) @@ -100,6 +100,12 @@ # To add something to this provider, add it to its `_containers` and its # `_metadata` fields. class TestContainerProvider(ContainerProvider): + + def __init__(self) -> None: + super().__init__() + self._plugin_id = "TestContainerProvider" + self._version = "0.1.0" + def getAllIds(self, *args, **kwargs): return self._containers.keys() @@ -110,4 +116,7 @@ return self._containers[container_id] def loadMetadata(self, container_id, *args, **kwargs): - return self._metadata[container_id] \ No newline at end of file + return self._metadata[container_id] + + def saveContainer(self, *args, **kwargs): + return None \ No newline at end of file diff -Nru uranium-3.3.0/tests/Settings/ContainerTestPlugin/ContainerTestPlugin.py uranium-4.4.1/tests/Settings/ContainerTestPlugin/ContainerTestPlugin.py --- uranium-3.3.0/tests/Settings/ContainerTestPlugin/ContainerTestPlugin.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/tests/Settings/ContainerTestPlugin/ContainerTestPlugin.py 2019-11-19 10:50:46.000000000 +0000 @@ -1,7 +1,7 @@ # Copyright (c) 2017 Ultimaker B.V. # Uranium is released under the terms of the LGPLv3 or higher. -from typing import Optional +from typing import Any, Optional import uuid from UM.PluginObject import PluginObject @@ -63,6 +63,9 @@ def isReadOnly(self): return False + def getAllKeys(self): + pass + ## Get the value of a property of a container item. # # Since this test container cannot contain any items, it always returns @@ -72,6 +75,9 @@ def getProperty(self, key, property_name, context = None): pass + def setProperty(self, key: str, property_name: str, property_value: Any, container: "ContainerInterface" = None, set_from_cache: bool = False) -> None: + pass + def hasProperty(self, key, property_name): pass @@ -95,4 +101,7 @@ def getVersionFromSerialized(cls, serialized): raise NotImplementedError() + def isDirty(self): + return True + metaDataChanged = None # type: Signal diff -Nru uranium-3.3.0/tests/Settings/ContainerTestPlugin/plugin.json uranium-4.4.1/tests/Settings/ContainerTestPlugin/plugin.json --- uranium-3.3.0/tests/Settings/ContainerTestPlugin/plugin.json 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/tests/Settings/ContainerTestPlugin/plugin.json 2019-11-19 10:50:46.000000000 +0000 @@ -1,5 +1,5 @@ { "name": "TestContainerPlugin", - "api": 4, + "api": 7, "version": "1.0.0" -} \ No newline at end of file +} diff -Nru uranium-3.3.0/tests/Settings/definitions/multiple_settings.def.json uranium-4.4.1/tests/Settings/definitions/multiple_settings.def.json --- uranium-3.3.0/tests/Settings/definitions/multiple_settings.def.json 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/tests/Settings/definitions/multiple_settings.def.json 2019-11-19 10:50:46.000000000 +0000 @@ -33,6 +33,12 @@ "description": "A Test Setting", "default_value": 10, "type": "int" + }, + "test_setting_5": + { + "label": "Test 5 (category)", + "description": "A Test Category", + "type": "category" } } } diff -Nru uranium-3.3.0/tests/Settings/instances/basic_instance.inst.cfg uranium-4.4.1/tests/Settings/instances/basic_instance.inst.cfg --- uranium-3.3.0/tests/Settings/instances/basic_instance.inst.cfg 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/tests/Settings/instances/basic_instance.inst.cfg 2019-11-19 10:50:46.000000000 +0000 @@ -1,5 +1,5 @@ [general] -version = 3 +version = 4 name = Basic definition = basic_definition diff -Nru uranium-3.3.0/tests/Settings/instances/metadata_instance.inst.cfg uranium-4.4.1/tests/Settings/instances/metadata_instance.inst.cfg --- uranium-3.3.0/tests/Settings/instances/metadata_instance.inst.cfg 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/tests/Settings/instances/metadata_instance.inst.cfg 2019-11-19 10:50:46.000000000 +0000 @@ -1,5 +1,5 @@ [general] -version = 3 +version = 4 name = Metadata definition = basic_definition diff -Nru uranium-3.3.0/tests/Settings/instances/setting_values.inst.cfg uranium-4.4.1/tests/Settings/instances/setting_values.inst.cfg --- uranium-3.3.0/tests/Settings/instances/setting_values.inst.cfg 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/tests/Settings/instances/setting_values.inst.cfg 2019-11-19 10:50:46.000000000 +0000 @@ -1,5 +1,5 @@ [general] -version = 3 +version = 4 name = Setting Values definition = multiple_settings diff -Nru uranium-3.3.0/tests/Settings/MockContainer.py uranium-4.4.1/tests/Settings/MockContainer.py --- uranium-3.3.0/tests/Settings/MockContainer.py 1970-01-01 00:00:00.000000000 +0000 +++ uranium-4.4.1/tests/Settings/MockContainer.py 2019-11-19 10:50:46.000000000 +0000 @@ -0,0 +1,124 @@ +from typing import Optional + +from UM.Settings.Interfaces import ContainerInterface +import UM.PluginObject +from UM.Signal import Signal + + +## Fake container class to add to the container registry. +# +# This allows us to test the container registry without testing the container +# class. If something is wrong in the container class it won't influence this +# test. + +class MockContainer(ContainerInterface, UM.PluginObject.PluginObject): + ## Initialise a new definition container. + # + # The container will have the specified ID and all metadata in the + # provided dictionary. + def __init__(self, metadata = None): + super().__init__() + if metadata is None: + self._metadata = {} + else: + self._metadata = metadata + self._plugin_id = "MockContainerPlugin" + + ## Gets the ID that was provided at initialisation. + # + # \return The ID of the container. + def getId(self): + return self._metadata["id"] + + ## Gets all metadata of this container. + # + # This returns the metadata dictionary that was provided in the + # constructor of this mock container. + # + # \return The metadata for this container. + def getMetaData(self): + return self._metadata + + ## Gets a metadata entry from the metadata dictionary. + # + # \param key The key of the metadata entry. + # \return The value of the metadata entry, or None if there is no such + # entry. + def getMetaDataEntry(self, entry, default = None): + if entry in self._metadata: + return self._metadata[entry] + return default + + ## Gets a human-readable name for this container. + # + # \return Always returns "MockContainer". + def getName(self): + return "MockContainer" + + ## Get whether the container item is stored on a read only location in the filesystem. + # + # \return Always returns False + def isReadOnly(self): + return False + + ## Mock get path + def getPath(self): + return "/path/to/the/light/side" + + ## Mock set path + def setPath(self, path): + pass + + def getAllKeys(self): + pass + + def setProperty(self, key, property_name, property_value, container = None, set_from_cache = False): + pass + + def getProperty(self, key, property_name, context=None): + if key in self.items: + return self.items[key] + + return None + + ## Get the value of a container item. + # + # Since this mock container cannot contain any items, it always returns + # None. + # + # \return Always returns None. + def getValue(self, key): + pass + + ## Get whether the container item has a specific property. + # + # This method is not implemented in the mock container. + def hasProperty(self, key, property_name): + return key in self.items + + ## Serializes the container to a string representation. + # + # This method is not implemented in the mock container. + def serialize(self, ignored_metadata_keys = None): + raise NotImplementedError() + + ## Deserializes the container from a string representation. + # + # This method is not implemented in the mock container. + def deserialize(self, serialized, file_name: Optional[str] = None): + raise NotImplementedError() + + @classmethod + def getConfigurationTypeFromSerialized(cls, serialized: str): + raise NotImplementedError() + + @classmethod + def getVersionFromSerialized(cls, serialized): + raise NotImplementedError() + + def isDirty(self): + return True + + metaDataChanged = Signal() + propertyChanged = Signal() + containersChanged = Signal() diff -Nru uranium-3.3.0/tests/Settings/TestContainerQuery.py uranium-4.4.1/tests/Settings/TestContainerQuery.py --- uranium-3.3.0/tests/Settings/TestContainerQuery.py 1970-01-01 00:00:00.000000000 +0000 +++ uranium-4.4.1/tests/Settings/TestContainerQuery.py 2019-11-19 10:50:46.000000000 +0000 @@ -0,0 +1,48 @@ +# Copyright (c) 2018 Ultimaker B.V. +# Uranium is released under the terms of the LGPLv3 or higher. + +import pytest + +from UM.Settings.ContainerQuery import ContainerQuery + + +def test_matchMultipleTokens(): + cq = ContainerQuery(None) + + # Test #1: if property_name doesn't exist, it will return False + result = cq._matchRegMultipleTokens({"name": "test"}, "type", "123") + assert result is False + + test_cases = [ + {"input": {"metadata": {"name": "test"}, # Single token, match + "property_name": "name", + "value": "[test]", + }, + "match": True, + }, + {"input": {"metadata": {"name": "test1"}, # Single token, no match + "property_name": "name", + "value": "[test]", + }, + "match": False, + }, + {"input": {"metadata": {"name": "test"}, # Multiple token, match + "property_name": "name", + "value": "[abc|123|test|456]", + }, + "match": True, + }, + {"input": {"metadata": {"name": "test"}, # Multiple token, no match + "property_name": "name", + "value": "[abc|_test_|test2|tst]", + }, + "match": False, + }, + ] + + for test_case in test_cases: + result = cq._matchRegMultipleTokens(**test_case["input"]) + if test_case["match"]: + assert result is not None + else: + assert result is None diff -Nru uranium-3.3.0/tests/Settings/TestContainerRegistry.py uranium-4.4.1/tests/Settings/TestContainerRegistry.py --- uranium-3.3.0/tests/Settings/TestContainerRegistry.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/tests/Settings/TestContainerRegistry.py 2019-11-19 10:50:46.000000000 +0000 @@ -1,119 +1,20 @@ -# Copyright (c) 2017 Ultimaker B.V. +# Copyright (c) 2019 Ultimaker B.V. # Uranium is released under the terms of the LGPLv3 or higher. -import os.path +import os +from unittest.mock import MagicMock + import pytest -from typing import Optional -import UM.PluginObject +from UM.Resources import Resources from UM.Settings.DefinitionContainer import DefinitionContainer from UM.Settings.InstanceContainer import InstanceContainer from UM.Settings.ContainerStack import ContainerStack -from UM.Signal import Signal -## Fake container class to add to the container registry. -# -# This allows us to test the container registry without testing the container -# class. If something is wrong in the container class it won't influence this -# test. -from UM.Settings.Interfaces import ContainerInterface - -class MockContainer(ContainerInterface, UM.PluginObject.PluginObject): - ## Initialise a new definition container. - # - # The container will have the specified ID and all metadata in the - # provided dictionary. - def __init__(self, metadata): - self._metadata = metadata - self._plugin_id = "MockContainerPlugin" - - ## Gets the ID that was provided at initialisation. - # - # \return The ID of the container. - def getId(self): - return self._metadata["id"] - - ## Gets all metadata of this container. - # - # This returns the metadata dictionary that was provided in the - # constructor of this mock container. - # - # \return The metadata for this container. - def getMetaData(self): - return self._metadata - - ## Gets a metadata entry from the metadata dictionary. - # - # \param key The key of the metadata entry. - # \return The value of the metadata entry, or None if there is no such - # entry. - def getMetaDataEntry(self, entry, default = None): - if entry in self._metadata: - return self._metadata[entry] - return default - - ## Gets a human-readable name for this container. - # - # \return Always returns "MockContainer". - def getName(self): - return "MockContainer" - - ## Get whether the container item is stored on a read only location in the filesystem. - # - # \return Always returns False - def isReadOnly(self): - return False - - ## Mock get path - def getPath(self): - return "/path/to/the/light/side" - - ## Mock set path - def setPath(self, path): - pass - - ## Gets the value of a property of a container item. - # - # This method is not implemented in the mock container. - def getProperty(self, key, property_name, context = None): - raise NotImplementedError() - - ## Get the value of a container item. - # - # Since this mock container cannot contain any items, it always returns - # None. - # - # \return Always returns None. - def getValue(self, key): - pass - - ## Get whether the container item has a specific property. - # - # This method is not implemented in the mock container. - def hasProperty(self, key, property_name): - raise NotImplementedError() - - ## Serializes the container to a string representation. - # - # This method is not implemented in the mock container. - def serialize(self, ignored_metadata_keys = None): - raise NotImplementedError() - - ## Deserializes the container from a string representation. - # - # This method is not implemented in the mock container. - def deserialize(self, serialized, file_name: Optional[str] = None): - raise NotImplementedError() - - @classmethod - def getConfigurationTypeFromSerialized(cls, serialized: str): - raise NotImplementedError() - - @classmethod - def getVersionFromSerialized(cls, serialized): - raise NotImplementedError() +from .MockContainer import MockContainer + +Resources.addSearchPath(os.path.dirname(os.path.abspath(__file__))) - metaDataChanged = Signal() ## Tests adding a container to the registry. # @@ -168,6 +69,72 @@ with pytest.raises(Exception): container_registry.addContainerType(None) + +def test_readOnly(container_registry): + assert not container_registry.isReadOnly("NotAContainerThatIsLoaded") + + test_container = DefinitionContainer("omgzomg") + container_registry.addContainer(test_container) + + mock_provider = MagicMock() + mock_provider.isReadOnly = MagicMock(return_value = True) + container_registry.source_provider = {"omgzomg": mock_provider} + assert container_registry.isReadOnly("omgzomg") + + +def test_getContainerFilePathByID(container_registry): + # There is no provider and the container isn't even there. + assert container_registry.getContainerFilePathById("NotAContainerThatIsLoaded") is None + + test_container = DefinitionContainer("omgzomg") + container_registry.addContainer(test_container) + + mock_provider = MagicMock() + mock_provider.getContainerFilePathById = MagicMock(return_value="") + container_registry.source_provider = {"omgzomg": mock_provider} + assert container_registry.getContainerFilePathById("omgzomg") == "" + + +def test_isLoaded(container_registry): + assert not container_registry.isLoaded("NotAContainerThatIsLoaded") + test_container = DefinitionContainer("omgzomg") + container_registry.addContainer(test_container) + assert container_registry.isLoaded("omgzomg") + + +def test_removeContainer(container_registry): + # Removing a container that isn't added shouldn't break + container_registry.removeContainer("NotAContainerThatIsLoaded") + + test_container = DefinitionContainer("omgzomg") + container_registry.addContainer(test_container) + container_registry.removeContainer("omgzomg") + assert not container_registry.isLoaded("omgzomg") + + +def test_renameContainer(container_registry): + # Ensure that renaming an unknown container doesn't break + container_registry.renameContainer("ContainerThatDoesntExist", "whatever") + + test_container = InstanceContainer("omgzomg") + container_registry.addContainer(test_container) + + # Attempting a rename to the same name should not mark the container as dirty. + container_registry.renameContainer("omgzomg", "omgzomg") + assert "omgzomg" not in [container.getId() for container in container_registry.findDirtyContainers()] + + container_registry.renameContainer("omgzomg", "BEEP") + assert test_container.getMetaDataEntry("name") == "BEEP" + # Ensure that the container is marked as dirty + assert "omgzomg" in [container.getId() for container in container_registry.findDirtyContainers()] + + # Rename the container and also try to give it a new ID + container_registry.renameContainer("omgzomg", "BEEPz", "omgzomg2") + assert "omgzomg2" in [container.getId() for container in container_registry.findDirtyContainers()] + # The old ID should not be in the list of dirty containers now. + assert "omgzomg" not in [container.getId() for container in container_registry.findDirtyContainers()] + + ## Tests the creation of the container registry. # # This is tested using the fixture to create a container registry. @@ -282,6 +249,9 @@ _verifyMetaDataMatches(results, data["result"]) + metadata_results = container_registry.findDefinitionContainersMetadata(**data["filter"]) + assert metadata_results == metadata_results + ## Tests the findInstanceContainers function. # # \param container_registry A new container registry from a fixture. @@ -301,6 +271,9 @@ _verifyMetaDataMatches(results, data["result"]) + metadata_results = container_registry.findInstanceContainersMetadata(**data["filter"]) + assert metadata_results == metadata_results + ## Tests the findContainerStacks function. # # \param container_registry A new container registry from a fixture. @@ -320,6 +293,38 @@ _verifyMetaDataMatches(results, data["result"]) + metadata_results = container_registry.findContainerStacksMetadata(**data["filter"]) + assert metadata_results == metadata_results + +def test_addGetResourceType(container_registry): + container_registry.addResourceType(12, "zomg") + + assert container_registry.getResourceTypes()["zomg"] == 12 + +def test_getMimeTypeForContainer(container_registry): + # We shouldn't get a mimetype if it's unknown + assert container_registry.getMimeTypeForContainer(type(None)) is None + + mimetype = container_registry.getMimeTypeForContainer(InstanceContainer) + assert mimetype is not None + assert mimetype.name == "application/x-uranium-instancecontainer" + + # Check if the reverse also works + assert container_registry.getContainerForMimeType(mimetype) == InstanceContainer + + +def test_saveContainer(container_registry): + mocked_provider = MagicMock() + mocked_container = MagicMock() + container_registry.saveContainer(mocked_container, mocked_provider) + mocked_provider.saveContainer.assert_called_once_with(mocked_container) + + container_registry.getDefaultSaveProvider().saveContainer = MagicMock() + + container_registry.saveContainer(mocked_container) + container_registry.getDefaultSaveProvider().saveContainer.assert_called_once_with(mocked_container) + + ## Tests the loading of containers into the registry. # # \param container_registry A new container registry from a fixture. @@ -343,6 +348,44 @@ assert "single_setting" in ids_found assert "inherits" in ids_found + +## Test that uses the lazy loading part of the registry. Instead of loading +# everything, we load the metadata so that the containers can be loaded just +# in time. +def test_loadAllMetada(container_registry): + # Although we get different mocked ContainerRegistry objects every time, queries are done via ContainerQuery, which + # has a class-wide built-in cache. The cache is not cleared between each test, so it can happen that the cache's + # state from the last test will affect this test. + from UM.Settings.ContainerQuery import ContainerQuery + ContainerQuery.cache.clear() + + # Before we start, the container should not even be there. + instances_before = container_registry.findInstanceContainersMetadata(author = "Ultimaker") + assert len(instances_before) == 0 + + container_registry.loadAllMetadata() + + instances = container_registry.findInstanceContainersMetadata(author = "Ultimaker") + assert len(instances) == 1 + + # Since we only loaded the metadata, the actual container should not be loaded just yet. + assert not container_registry.isLoaded(instances[0].get("id")) + + # As we asked for it, the lazy loading should kick in and actually load it. + container_registry.findInstanceContainers(id = instances[0].get("id")) + assert container_registry.isLoaded(instances[0].get("id")) + + +def test_findLazyLoadedContainers(container_registry): + container_registry.loadAllMetadata() + container_registry.containerLoadComplete.emit = MagicMock() + # Only metadata should be loaded at this moment, so no loadComplete signals should have been fired. + assert container_registry.containerLoadComplete.emit.call_count == 0 + result = container_registry.findContainers(id = "single_setting") + assert len(result) == 1 + assert container_registry.containerLoadComplete.emit.call_count == 1 + + ## Tests the making of a unique name for containers in the registry. # # \param container_registry A new container registry from a fixture. diff -Nru uranium-3.3.0/tests/Settings/TestContainerStack.py uranium-4.4.1/tests/Settings/TestContainerStack.py --- uranium-3.3.0/tests/Settings/TestContainerStack.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/tests/Settings/TestContainerStack.py 2019-11-19 10:50:46.000000000 +0000 @@ -1,9 +1,12 @@ -# Copyright (c) 2017 Ultimaker B.V. +# Copyright (c) 2018 Ultimaker B.V. # Uranium is released under the terms of the LGPLv3 or higher. -import pytest from typing import Optional +import os import uuid # For creating unique ID's for each container stack. +from unittest.mock import MagicMock + +import pytest from UM.Settings.ContainerRegistry import ContainerRegistry from UM.Settings.ContainerStack import ContainerStack @@ -11,111 +14,12 @@ from UM.Settings.ContainerStack import InvalidContainerStackError from UM.Settings.DefinitionContainer import DefinitionContainer from UM.Settings.InstanceContainer import InstanceContainer -from UM.Settings.Interfaces import ContainerInterface -from UM.Signal import Signal +from UM.Settings.Validator import ValidatorState +from UM.Resources import Resources -## A fake container class that implements ContainerInterface. -# -# This allows us to test the container stack independent of any actual -# implementation of the containers. If something were to go wrong in the -# actual implementations, the tests in this suite are unaffected. -class MockContainer(ContainerInterface): - ## Creates a mock container with a new unique ID. - def __init__(self, container_id: str = None): - self._metadata = {} - self._metadata["id"] = str(uuid.uuid4() if container_id is None else container_id) - self.items = {} - - ## Gets the unique ID of the container. - # - # \return A unique identifier for this container. - def getId(self): - return self._metadata["id"] - - ## Gives an arbitrary name. - # - # \return Some string. - def getName(self): - return "Fred" - - ## Get whether the container item is stored on a read only location in the filesystem. - # - # \return Always returns False - def isReadOnly(self): - return False - - ## Mock get path - def getPath(self): - return "/path/to/the/light/side" - - ## Mock set path - def setPath(self, path): - pass - - ## Returns the metadata dictionary. - # - # \return A dictionary containing metadata for this container stack. - def getMetaData(self): - return self._metadata - - ## Gets an entry from the metadata. - # - # \param entry The entry to get from the metadata. - # \param default The default value in case the entry is missing. - # \return The value belonging to the requested entry, or the default if no - # such key exists. - def getMetaDataEntry(self, entry, default = None): - if entry in self._metadata: - return self._metadata["entry"] - return default - - ## Gets the value of a container item property. - # - # If the key doesn't exist, returns None. - # - # \param key The key of the item to get. - def getProperty(self, key, property_name, context = None): - if key in self.items: - return self.items[key] - return None - - propertyChanged = Signal() - containersChanged = Signal() - - metaDataChanged = Signal() - - def hasProperty(self, key, property_name): - return key in self.items - - ## Serialises this container. - # - # The serialisation of the mock needs to be kept simple, so it only - # serialises the ID. This makes the tests succeed if the serialisation - # creates different instances (which is desired). - # - # \return A static string representing a container. - def serialize(self, ignored_metadata_keys = None): - return str(self._metadata["id"]) - - ## Deserialises a string to a container. - # - # The serialisation of the mock needs to be kept simple, so it only - # deserialises the ID. This makes the tests succeed if the serialisation - # creates different instances (which is desired). - # - # \param serialized A serialised mock container. - # \param file_name The file name that the file originated from. - def deserialize(self, serialized: str, file_name: Optional[str] = None) -> str: - self._metadata["id"] = int(serialized) - return serialized - - @classmethod - def getConfigurationTypeFromSerialized(cls, serialized: str): - raise NotImplementedError() - - @classmethod - def getVersionFromSerialized(cls, serialized): - raise NotImplementedError() +from .MockContainer import MockContainer + +Resources.addSearchPath(os.path.dirname(os.path.abspath(__file__))) ## Creates a brand new container stack to test with. @@ -125,6 +29,7 @@ def container_stack(): return ContainerStack(str(uuid.uuid4())) + ## Tests the creation of a container stack. # # The actual creation is done in a fixture though. @@ -133,18 +38,20 @@ def test_container_stack(container_stack): assert container_stack is not None + ## Tests adding a container to the stack. # # \param container_stack A new container stack from a fixture. def test_addContainer(container_stack): - assert container_stack.getContainers() == [] # First nothing. + assert container_stack.getContainers() == [] # First nothing. container = MockContainer() container_stack.addContainer(container) - assert container_stack.getContainers() == [container] # Then something! + assert container_stack.getContainers() == [container] # Then something! with pytest.raises(Exception): - container_stack.addContainer(container_stack) # Adding itself gives an exception. - assert container_stack.getContainers() == [container] # Make sure that adding itself didn't change the state, even if it raises an exception. + container_stack.addContainer(container_stack) # Adding itself gives an exception. + assert container_stack.getContainers() == [container] # Make sure that adding itself didn't change the state, even if it raises an exception. + ## Tests deserialising a container stack from a corrupted string. def test_deserialize_syntax_error(container_stack): @@ -152,12 +59,13 @@ with pytest.raises(Exception): container_stack.deserialize(serialised) + ## Tests deserialising a container stack when the version number is wrong. # # \param container_stack A new container stack from a fixture. # \param container_registry A new container registry from a fixture. def test_deserialize_wrong_version(container_stack, container_registry): - container_registry.addContainer(InstanceContainer("a")) # Make sure this container isn't the one it complains about. + container_registry.addContainer(InstanceContainer("a")) # Make sure this container isn't the one it complains about. serialised = """ [general] @@ -172,6 +80,7 @@ with pytest.raises(IncorrectVersionError): container_stack.deserialize(serialised) + ## Tests deserialising a container stack from files that are missing entries. # # Sorry for the indenting. @@ -179,7 +88,7 @@ # \param container_stack A new container stack from a fixture. # \param container_registry A new container registry from a fixture. def test_deserialize_missing_items(container_stack, container_registry): - container_registry.addContainer(InstanceContainer("a")) # Make sure this container isn't the one it complains about. + container_registry.addContainer(InstanceContainer("a")) # Make sure this container isn't the one it complains about. serialised_no_name = """ [general] @@ -224,8 +133,8 @@ version = {version} """.format(version = ContainerStack.Version) - container_stack.deserialize(serialised_no_containers) # Missing containers is allowed. - assert container_stack.getContainers() == [] # Deserialize of an empty stack should result in an empty stack + container_stack.deserialize(serialised_no_containers) # Missing containers is allowed. + assert container_stack.getContainers() == [] # Deserialize of an empty stack should result in an empty stack serialised_no_general = """ [metadata] @@ -235,6 +144,43 @@ with pytest.raises(InvalidContainerStackError): container_stack.deserialize(serialised_no_general) + +def test_deserializeMetadata(): + serialised = """ + [general] + name = Test + id = testid + version = {version} + + [metadata] + foo = bar + """.format(version=ContainerStack.Version) + metadata = ContainerStack.deserializeMetadata(serialised, "testid")[0] + assert metadata["name"] == "Test" + assert metadata["id"] == "testid" + assert metadata["version"] == str(ContainerStack.Version) + + +def test_deserializeInvalidMetadata(): + # No version + serialised = """ + [general] + name = Test + id = testid + """ + with pytest.raises(InvalidContainerStackError): + ContainerStack.deserializeMetadata(serialised, "testid") + + # No name + serialised = """ + [general] + id = testid + version = {version} + """.format(version=ContainerStack.Version) + with pytest.raises(InvalidContainerStackError): + ContainerStack.deserializeMetadata(serialised, "testid") + + ## Tests deserialising a container stack with various subcontainers. # # Sorry for the indenting. @@ -253,7 +199,7 @@ [containers] 0 = a - """.format(version = ContainerStack.Version) # Test case where there is a container. + """.format(version = ContainerStack.Version) # Test case where there is a container. container_stack.deserialize(serialised) assert container_stack.getContainers() == [container] @@ -266,7 +212,7 @@ version = {version} [containers] - """.format(version = ContainerStack.Version) # Test case where there is no container. + """.format(version = ContainerStack.Version) # Test case where there is no container. container_stack.deserialize(serialised) assert container_stack.getContainers() == [] @@ -281,7 +227,7 @@ [containers] 0 = a 1 = a - """.format(version = ContainerStack.Version) # Test case where there are two of the same containers. + """.format(version = ContainerStack.Version) # Test case where there are two of the same containers. container_stack.deserialize(serialised) assert container_stack.getContainers() == [container, container] @@ -296,17 +242,18 @@ [containers] 0 = a 1 = b - """.format(version = ContainerStack.Version) # Test case where a container doesn't exist. + """.format(version = ContainerStack.Version) # Test case where a container doesn't exist. with pytest.raises(Exception): container_stack.deserialize(serialised) container_stack = ContainerStack(str(uuid.uuid4())) - container_b = InstanceContainer("b") # Add the missing container and try again. + container_b = InstanceContainer("b") # Add the missing container and try again. ContainerRegistry.getInstance().addContainer(container_b) container_stack.deserialize(serialised) assert container_stack.getContainers() == [container, container_b] + ## Individual test cases for test_findContainer. # # Each test case has: @@ -372,19 +319,20 @@ } ] + ## Tests finding a container by a filter. # # \param container_stack A new container stack from a fixture. # \param data Individual test cases, provided from test_findContainer_data. @pytest.mark.parametrize("data", test_findContainer_data) def test_findContainer(container_stack, data): - for container in data["containers"]: # Add all containers. + for container in data["containers"]: # Add all containers. mockup = MockContainer() - for key, value in container.items(): # Copy the data to the metadata of the mock-up. + for key, value in container.items(): # Copy the data to the metadata of the mock-up. mockup.getMetaData()[key] = value container_stack.addContainer(mockup) - answer = container_stack.findContainer(data["filter"]) # The actual method to test. + answer = container_stack.findContainer(data["filter"]) # The actual method to test. if data["result"] is None: assert answer is None @@ -392,6 +340,7 @@ assert answer is not None assert data["result"].items() <= answer.getMetaData().items() + ## Tests getting a container by index. # # \param container_stack A new container stack from a fixture. @@ -415,16 +364,30 @@ with pytest.raises(IndexError): container_stack.getContainer(-1) + ## Tests getting and changing the metadata of the container stack. # # \param container_stack A new container stack from a fixture. -def test_getMetaData(container_stack): +def test_getSimpleMetaData(container_stack): meta_data = container_stack.getMetaData() assert meta_data is not None - meta_data["foo"] = "bar" #Try adding an entry. + meta_data["foo"] = "bar" # Try adding an entry. assert container_stack.getMetaDataEntry("foo") == "bar" + +def test_getNestedMetadata(container_stack): + mock_container = MockContainer({"derp": "omg!"}) + container_stack.addContainer(mock_container) + assert container_stack.getMetaDataEntry("derp") == "omg!" + + +def test_removeMetadata(container_stack): + container_stack.setMetaData({"foo": "blorp!"}) + + container_stack.removeMetaDataEntry("foo") + assert container_stack.getMetaDataEntry("foo") is None + ## Individual test cases for test_getValue. # # Each test case has: @@ -471,6 +434,7 @@ } ] + ## Tests getting item values from the container stack. # # \param container_stack A new container stack from a fixture. @@ -478,15 +442,17 @@ @pytest.mark.parametrize("data", test_getValue_data) def test_getValue(container_stack, data): # Fill the container stack with the containers. - for container in reversed(data["containers"]): # Reverse order to make sure the last-added item is the top of the list. + for container in reversed(data["containers"]): # Reverse order to make sure the last-added item is the top of the list. mockup = MockContainer() mockup.items = container container_stack.addContainer(mockup) - answer = container_stack.getProperty(data["key"], "value") # Do the actual query. - + answer = container_stack.getProperty(data["key"], "value") # Do the actual query. + # Check if the reason the answer is None is because the property just isn't there + assert container_stack.hasProperty(data["key"], "value") == (answer is not None) assert answer == data["result"] + ## Tests removing containers from the stack. # # \param container_stack A new container stack from a fixture. @@ -502,7 +468,7 @@ container_stack.removeContainer(1) with pytest.raises(IndexError): container_stack.removeContainer(-1) - with pytest.raises(TypeError): # Curveball! + with pytest.raises(TypeError): # Curveball! container_stack.removeContainer("test") container_stack.removeContainer(0) assert container_stack.getContainers() == [] @@ -517,6 +483,7 @@ container_stack.removeContainer(1) assert container_stack.getContainers() == [container2, container0] + ## Tests replacing a container in the stack. # # \param container_stack A new container stack from a fixture. @@ -550,11 +517,12 @@ container_stack.replaceContainer(2, container_stack) assert container_stack.getContainers() == [container2, container1_replacement, container0_replacement] + ## Tests serialising and deserialising the container stack. # # \param container_stack A new container stack from a fixture. def test_serialize(container_stack): - registry = ContainerRegistry.getInstance() # All containers need to be registered in order to be recovered again after deserialising. + registry = ContainerRegistry.getInstance() # All containers need to be registered in order to be recovered again after deserialising. # First test the empty container stack. _test_serialize_cycle(container_stack) @@ -568,7 +536,7 @@ # Case with two subcontainers. container = InstanceContainer(str(uuid.uuid4())) registry.addContainer(container) - container_stack.addContainer(container) # Already had one, if all previous assertions were correct. + container_stack.addContainer(container) # Already had one, if all previous assertions were correct. _test_serialize_cycle(container_stack) # Case with all types of subcontainers. @@ -663,26 +631,29 @@ # auto-mode. def test_setName(container_stack, application): name_change_counter = 0 + def increment_name_change_counter(): nonlocal name_change_counter name_change_counter += 1 - container_stack.nameChanged.connect(increment_name_change_counter) # To make sure it emits the signal. + + container_stack.nameChanged.connect(increment_name_change_counter) # To make sure it emits the signal. different_name = "test" if container_stack.getName() == different_name: - different_name = "tast" #Make sure it is actually different! + different_name = "tast" # Make sure it is actually different! container_stack.setName(different_name) - assert container_stack.getName() == different_name # Name is correct. - assert name_change_counter == 1 # Correctly signalled once. + assert container_stack.getName() == different_name # Name is correct. + assert name_change_counter == 1 # Correctly signalled once. - different_name += "_new" # Make it different again. + different_name += "_new" # Make it different again. container_stack.setName(different_name) - assert container_stack.getName() == different_name # Name is updated again. - assert name_change_counter == 2 # Correctly signalled once again. + assert container_stack.getName() == different_name # Name is updated again. + assert name_change_counter == 2 # Correctly signalled once again. - container_stack.setName(different_name) # Not different this time. + container_stack.setName(different_name) # Not different this time. assert container_stack.getName() == different_name - assert name_change_counter == 2 # Didn't signal. + assert name_change_counter == 2 # Didn't signal. + ## Tests the next stack functionality. # @@ -693,15 +664,16 @@ assert container_stack.getNextStack() == container with pytest.raises(Exception): - container_stack.setNextStack(container_stack) # Can't set itself as next stack. + container_stack.setNextStack(container_stack) # Can't set itself as next stack. + ## Test backward compatibility of container config file format change # # This tests whether ContainerStack can still deserialize containers using the old # format where we would have a single comma separated entry with the containers. def test_backwardCompatibility(container_stack, container_registry): - container_a = MockContainer("a") - container_registry.addContainer(container_a) # Make sure this container isn't the one it complains about. + container_a = MockContainer({"id" : "a"}) + container_registry.addContainer(container_a) # Make sure this container isn't the one it complains about. serialised = """ [general] @@ -714,10 +686,11 @@ container_stack.deserialize(serialised) assert container_stack.getContainers() == [container_a, container_a, container_a] + ## Test serialization and deserialization of a stack with containers with special characters in their ID # def test_idSpecialCharacters(container_stack, container_registry): - container_ab = MockContainer("a,b") # Comma used to break deserialize + container_ab = MockContainer({"id" : "a,b"}) # Comma used to break deserialize container_registry.addContainer(container_ab) serialized = """ @@ -745,7 +718,7 @@ container_stack.deserialize(serialized) assert container_stack.getContainers() == [container_ab] - test_container_0 = MockContainer("= TestContainer with, some? Special $ Characters #12") + test_container_0 = MockContainer({"id": "= TestContainer with, some? Special $ Characters #12"}) container_registry.addContainer(test_container_0) serialized = """ @@ -761,7 +734,7 @@ container_stack.deserialize(serialized) assert container_stack.getContainers() == [test_container_0] - test_container_1 = MockContainer("☂℮﹩⊥ ḉ◎η☂αїη℮ґ") + test_container_1 = MockContainer({"id" : "☂℮﹩⊥ ḉ◎η☂αїη℮ґ"}) container_registry.addContainer(test_container_1) # Special unicode characters are handled properly @@ -802,12 +775,48 @@ container_stack = ContainerStack(str(uuid.uuid4())) # Completely fresh container stack. container_stack.deserialize(serialised) - # remove ignored keys from metadata dict + # Remove ignored keys from metadata dict if ignored_metadata_keys: for key in ignored_metadata_keys: if key in metadata: del metadata[key] - #ID and nextStack are allowed to be different. + # ID and nextStack are allowed to be different. assert metadata.items() <= container_stack.getMetaData().items() assert containers == container_stack.getContainers() + + +def test_getSetReadOnly(container_stack): + container_stack.setReadOnly(True) + assert container_stack.isReadOnly() + container_stack.setReadOnly(False) + assert not container_stack.isReadOnly() + + +def test_isSetDirty(container_stack): + assert not container_stack.isDirty() + container_stack.setDirty(True) + assert container_stack.isDirty() + + +def test_getSetPath(container_stack): + container_stack.setPath("OMG") + assert container_stack.getPath() == "OMG" + + +def test_getHasErrors(container_stack): + definition_container = DefinitionContainer(str(uuid.uuid4())) + container_stack.addContainer(definition_container) + definition_container.getAllKeys = MagicMock(return_value = {"test_key"}) + + container = MagicMock() + container_stack.addContainer(container) + + # We won't get any wrong validation states, so it shouldn't have errors. + assert not container_stack.hasErrors() + + # Fake the property so it does return validation state + container.getProperty = MagicMock(return_value = ValidatorState.MaximumError) + assert container_stack.hasErrors() # Now the container stack has errors! + + assert container_stack.getErrorKeys() == ["test_key"] diff -Nru uranium-3.3.0/tests/Settings/TestDefinitionContainer.py uranium-4.4.1/tests/Settings/TestDefinitionContainer.py --- uranium-3.3.0/tests/Settings/TestDefinitionContainer.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/tests/Settings/TestDefinitionContainer.py 2019-11-19 10:50:46.000000000 +0000 @@ -8,8 +8,9 @@ import UM.Settings.SettingFunction import UM.Settings.DefinitionContainer from UM.Settings.DefinitionContainer import IncorrectDefinitionVersionError, InvalidDefinitionError -from UM.Settings.SettingDefinition import SettingDefinition, DefinitionPropertyType +from UM.Settings.SettingDefinition import SettingDefinition from UM.Resources import Resources +from UM.VersionUpgradeManager import VersionUpgradeManager Resources.addSearchPath(os.path.dirname(os.path.abspath(__file__))) @@ -32,7 +33,8 @@ "test_setting_1": { "label": "Test 1", "default_value": 10, "description": "A Test Setting" }, "test_setting_2": { "label": "Test 2", "default_value": 10, "description": "A Test Setting" }, "test_setting_3": { "label": "Test 3", "default_value": 10, "description": "A Test Setting" }, - "test_setting_4": { "label": "Test 4", "default_value": 10, "description": "A Test Setting" } + "test_setting_4": { "label": "Test 4", "default_value": 10, "description": "A Test Setting" }, + "test_setting_5": { "label": "Test 5 (category)", "description": "A Test Category", "type": "category" } }}), ("children.def.json", { "name": "Test", "metadata": {}, "settings": { "test_setting": { "label": "Test", "default_value": 10, "description": "A Test Setting"}, @@ -49,8 +51,8 @@ }}) ] @pytest.mark.parametrize("file,expected", test_deserialize_data) -def test_deserialize(file, expected, definition_container): - with open(os.path.join(os.path.dirname(os.path.abspath(__file__)), "definitions", file)) as data: +def test_deserialize(file, expected, definition_container, upgrade_manager: VersionUpgradeManager): + with open(os.path.join(os.path.dirname(os.path.abspath(__file__)), "definitions", file), encoding = "utf-8") as data: json = data.read() definition_container.deserialize(json) @@ -71,6 +73,25 @@ for property, property_value in value.items(): assert getattr(setting, property) == property_value + all_keys = definition_container.getAllKeys() + all_expected_keys = set(expected["settings"].keys()) + assert all_keys == all_expected_keys + + +@pytest.mark.parametrize("file,expected", test_deserialize_data) +def test_deserializeMetadata(file, expected, definition_container, upgrade_manager: VersionUpgradeManager): + with open(os.path.join(os.path.dirname(os.path.abspath(__file__)), "definitions", file), encoding = "utf-8") as data: + json = data.read() + + metadata = definition_container.deserializeMetadata(json, file) + + assert metadata[0]["container_type"] == UM.Settings.DefinitionContainer.DefinitionContainer + assert metadata[0]["id"] == file + + for key, value in expected["metadata"].items(): + assert metadata[0][key] == value + + ## Tests deserialising bad definition container JSONs. # # \param definition_container A definition container from a fixture. @@ -150,6 +171,7 @@ with pytest.raises(AttributeError): definition_container.deserialize(json) + ## Individual test cases for test_findDefinitions. # # Each test case is a tuple consisting of: @@ -176,6 +198,7 @@ { "key": "zoo", "default_value": "bar" } ]) ] + ## Tests the filtering of definitions. # # \param description A description of the test case (unused). @@ -202,6 +225,7 @@ assert False # All expected answers had a match, so it's a good answer. + ## Tests getting metadata entries. # # \param definition_container A new definition container from a fixture. @@ -213,6 +237,7 @@ assert definition_container.getMetaDataEntry("zoo", 42) == 42 # Non-existent entry must return the default. + ## The individual test cases for test_getValue. # # The first entry is a description for debugging. @@ -236,6 +261,7 @@ ("Two options", "foo", "bar", [ { "key": "foo", "default_value": "bar" }, { "key": "foo", "default_value": "bar" } ]) ] + ## Tests the getting of default values in the definition container. # # \param description A description for the test case. @@ -254,6 +280,7 @@ assert answer == value + ## Tests the serialisation and deserialisation process. # # \param definition_container A new definition container from a fixture. @@ -294,6 +321,7 @@ definition_container.definitions.append(subsetting) _test_serialize_cycle(definition_container) + ## Tests the serialisation with certain metadata keys ignored. # # \param definition_container A new definition container from a fixture. @@ -308,9 +336,10 @@ _test_serialize_cycle(definition_container, ignored_metadata_keys = ignored_metadata_keys) + def test_setting_function(): container = UM.Settings.DefinitionContainer.DefinitionContainer("test") - with open(os.path.join(os.path.dirname(os.path.abspath(__file__)), "definitions", "functions.def.json")) as data: + with open(os.path.join(os.path.dirname(os.path.abspath(__file__)), "definitions", "functions.def.json"), encoding = "utf-8") as data: container.deserialize(data.read()) setting_0 = container.findDefinitions(key = "test_setting_0")[0] @@ -339,6 +368,7 @@ result = function(container) assert result == (setting_0.default_value * 10) + ## Creates a setting definition from a dictionary of properties. # # The key must be present in the properties. It will be the key of the setting @@ -358,6 +388,7 @@ result.children.append(_createSettingDefinition(child)) return result + ## Tests one cycle of serialising and deserialising. # # This makes a copy of all properties of the definition container, then diff -Nru uranium-3.3.0/tests/Settings/TestInstanceContainer.py uranium-4.4.1/tests/Settings/TestInstanceContainer.py --- uranium-3.3.0/tests/Settings/TestInstanceContainer.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/tests/Settings/TestInstanceContainer.py 2019-11-19 10:50:46.000000000 +0000 @@ -1,4 +1,4 @@ -# Copyright (c) 2017 Ultimaker B.V. +# Copyright (c) 2019 Ultimaker B.V. # Uranium is released under the terms of the LGPLv3 or higher. import unittest.mock #For MagicMock and patch. @@ -10,12 +10,16 @@ import UM.Settings.SettingDefinition import UM.Settings.SettingRelation from UM.Resources import Resources +import copy +from unittest.mock import MagicMock Resources.addSearchPath(os.path.dirname(os.path.abspath(__file__))) + def test_create(): container = UM.Settings.InstanceContainer.InstanceContainer("test") assert container.getId() == "test" + ## Test whether setting a property on an instance correctly updates dependencies. # # This test primarily tests the SettingInstance but requires some functionality @@ -64,6 +68,7 @@ assert definition2.value(instance_container) == 100 assert definition2.maximum_value(instance_container) == 200 + test_serialize_data = [ ({"definition": "basic_definition", "name": "Basic"}, "basic_instance.inst.cfg"), ({"definition": "basic_definition", "name": "Metadata", "metadata": {"author": "Ultimaker", "bool": False, "integer": 6}}, "metadata_instance.inst.cfg"), @@ -71,6 +76,8 @@ "test_setting_0": 20, "test_setting_1": 20, "test_setting_2": 20, "test_setting_3": 20, "test_setting_4": 20 }}, "setting_values.inst.cfg"), ] + + @pytest.mark.parametrize("container_data,equals_file", test_serialize_data) def test_serialize(container_data, equals_file, loaded_container_registry): instance_container = UM.Settings.InstanceContainer.InstanceContainer("test") @@ -88,9 +95,10 @@ result = instance_container.serialize() path = Resources.getPath(Resources.InstanceContainers, equals_file) - with open(path) as data: + with open(path, encoding = "utf-8") as data: assert data.readline() in result + test_serialize_with_ignored_metadata_keys_data = [ ({"definition": "basic_definition", "name": "Basic", "metadata": {"secret": "something", "secret2": "something2"}}, "basic_instance.inst.cfg"), ({"definition": "basic_definition", "name": "Metadata", "metadata": {"author": "Ultimaker", "bool": False, "integer": 6, "secret": "something", "secret2": "something2"}}, "metadata_instance.inst.cfg"), @@ -100,6 +108,8 @@ "test_setting_0": 20, "test_setting_1": 20, "test_setting_2": 20, "test_setting_3": 20, "test_setting_4": 20 }}, "setting_values.inst.cfg"), ] + + @pytest.mark.parametrize("container_data,equals_file", test_serialize_with_ignored_metadata_keys_data) def test_serialize_with_ignored_metadata_keys(container_data, equals_file, loaded_container_registry): instance_container = UM.Settings.InstanceContainer.InstanceContainer("test") @@ -124,24 +134,239 @@ for key in ignored_metadata_keys: assert key not in new_metadata + test_deserialize_data = [ ("basic_instance.inst.cfg", {"metaData": {"name": "Basic"}}), ("metadata_instance.inst.cfg", {"metaData": {"name": "Metadata", "author": "Ultimaker", "bool": "False", "integer": "6"}}), - ("setting_values.inst.cfg", {"metaData": {"name": "Setting Values"}, "values": {"test_setting_0": 20}}), + ("setting_values.inst.cfg", {"metaData": {"name": "Setting Values"}, "values": {"test_setting_0": 20, "test_setting_1": 20,"test_setting_2": 20, "test_setting_3": 20, "test_setting_4": 20}}), ] + + @pytest.mark.parametrize("filename,expected", test_deserialize_data) def test_deserialize(filename, expected): instance_container = UM.Settings.InstanceContainer.InstanceContainer(filename) path = Resources.getPath(Resources.InstanceContainers, filename) - with open(path) as data: + with open(path, encoding = "utf-8") as data: instance_container.deserialize(data.read()) for key, value in expected.items(): if key == "values": for key, value in value.items(): assert instance_container.getProperty(key, "value") == value + # We also expect to find an single instance for every key we expect to have a value for. + assert instance_container.getInstance(key) is not None + assert instance_container.hasProperty(key, "value") + + all_keys = instance_container.getAllKeys() + all_expected_keys = set(expected["values"].keys()) + assert all_keys == all_expected_keys elif key == "metaData": assert instance_container.metaData.items() >= value.items() else: - assert getattr(instance_container, key) == value \ No newline at end of file + assert getattr(instance_container, key) == value + + assert len(expected.get("values", [])) == len(instance_container.findInstances()) + + # Check if deepcopy works + container_copied = copy.deepcopy(instance_container) + assert instance_container == container_copied + + # Check if clearing the container works. + instance_container.clear() + assert instance_container.getNumInstances() == 0 + + +def test_serialize_withoutDefinition(): + instance_container = UM.Settings.InstanceContainer.InstanceContainer("beep") + assert instance_container.serialize() == "" + + +def test__readAndValidateSerialisedWithInvalidData(): + with pytest.raises(UM.Settings.InstanceContainer.InvalidInstanceError): + UM.Settings.InstanceContainer.InstanceContainer._readAndValidateSerialized("") + + +def test_getConfigurationTypeFromSerializedWithInvalidData(): + with pytest.raises(UM.Settings.InstanceContainer.InvalidInstanceError): + UM.Settings.InstanceContainer.InstanceContainer.getConfigurationTypeFromSerialized("") + assert UM.Settings.InstanceContainer.InstanceContainer.getConfigurationTypeFromSerialized("[general]\n definition = nope\n version=12") is None + + +def test_deserializeWithInvalidData(): + instance_container = UM.Settings.InstanceContainer.InstanceContainer("") + + # Version is not an integer + with pytest.raises(UM.Settings.InstanceContainer.IncorrectInstanceVersionError): + instance_container.deserialize("[general]\n definition = nope\n version=Turtles") + + # Version is not the correct one (but does have the correct format + with pytest.raises(UM.Settings.InstanceContainer.IncorrectInstanceVersionError): + instance_container.deserialize("[general]\n definition = nope\n version=9001") + + +def test_deserializeMetadataInvalid(): + with pytest.raises(UM.Settings.InstanceContainer.InvalidInstanceError): + UM.Settings.InstanceContainer.InstanceContainer.deserializeMetadata("", "whatever") + + +@pytest.mark.parametrize("filename,expected", test_deserialize_data) +def test_deserialiseMetadata(filename, expected): + instance_container = UM.Settings.InstanceContainer.InstanceContainer(filename) + + path = Resources.getPath(Resources.InstanceContainers, filename) + with open(path, encoding="utf-8") as data: + metadata = instance_container.deserializeMetadata(data.read(), filename) + + # We're only interested in the metadata now. + for key, value in expected["metaData"].items(): + assert metadata[0][key] == value + + +@pytest.mark.parametrize("filename,expected", test_deserialize_data) +def test_duplicate(filename, expected): + instance_container = UM.Settings.InstanceContainer.InstanceContainer(filename) + + path = Resources.getPath(Resources.InstanceContainers, filename) + with open(path, encoding="utf-8") as data: + instance_container.deserialize(data.read()) + + duplicated_container = instance_container.duplicate(instance_container.getId()) + assert duplicated_container == instance_container + + +def test_compare(): + instance_container = UM.Settings.InstanceContainer.InstanceContainer("setting_values.inst.cfg") + path = Resources.getPath(Resources.InstanceContainers, "setting_values.inst.cfg") + with open(path, encoding="utf-8") as data: + instance_container.deserialize(data.read()) + + # Time to do some checking! + assert not instance_container == instance_container.duplicate("different_id") + assert instance_container != instance_container.duplicate("different_id") + + container_with_added_metadata = instance_container.duplicate(instance_container.getId()) + container_with_added_metadata.setMetaDataEntry("yay", "whoo") + assert not instance_container == container_with_added_metadata + + container_with_changed_metadata = instance_container.duplicate(instance_container.getId()) + container_with_changed_metadata.setMetaData({"name": "SomethingDifferentAlltogether!"}) + assert not instance_container == container_with_changed_metadata + + container_with_removed_instance = instance_container.duplicate(instance_container.getId()) + container_with_removed_instance.removeInstance("test_setting_0") + assert not instance_container == container_with_removed_instance + + +def test_setMetadata(): + container = UM.Settings.InstanceContainer.InstanceContainer("test") + container.metaDataChanged = unittest.mock.MagicMock() + container.setMetaDataEntry("YAY", "whoo") + assert container.metaDataChanged.emit.call_count == 1 + assert container.getMetaDataEntry("YAY") == "whoo" + + # Setting it again shouldn't trigger a notification + container.setMetaDataEntry("YAY", "whoo") + assert container.metaDataChanged.emit.call_count == 1 + + # Actually changing it should trigger an update. + container.setMetaDataEntry("YAY", "woot") + assert container.metaDataChanged.emit.call_count == 2 + assert container.getMetaDataEntry("YAY") == "woot" + + # Setting the entire metadata to the same value should also not trigger an update. + container.setMetaData(container.getMetaData()) + assert container.metaDataChanged.emit.call_count == 2 + + +def test_getSetPath(): + container = UM.Settings.InstanceContainer.InstanceContainer("test") + container.setPath("WHATEVERRRR") + assert container.getPath() == "WHATEVERRRR" + + +def test_addInstance(): + instance_container = UM.Settings.InstanceContainer.InstanceContainer("test") + + definition1 = UM.Settings.SettingDefinition.SettingDefinition("test_0", None) + definition1.deserialize({ + "label": "Test 0", + "type": "float", + "description": "A Test Setting", + "default_value": 10.0, + "minimum_value": "test_1 / 10", + }) + def1_instance = UM.Settings.SettingInstance.SettingInstance(definition1, instance_container) + def1_instance.propertyChanged = unittest.mock.MagicMock() + + instance_container.addInstance(def1_instance) + assert def1_instance.propertyChanged.emit.call_count == 1 + assert instance_container.getInstance("test_0") == def1_instance + + # Adding it again shouldn't have an impact. + instance_container.addInstance(def1_instance) + assert def1_instance.propertyChanged.emit.call_count == 1 + + +def test_getUnknownInstance(): + instance_container = UM.Settings.InstanceContainer.InstanceContainer("test") + assert instance_container.getInstance("HERP DERP") is None + + +def test_lt_compare(): + instance_container = UM.Settings.InstanceContainer.InstanceContainer("test") + instance_container.setMetaDataEntry("weight", 12) + + instance_container2 = UM.Settings.InstanceContainer.InstanceContainer("test2") + instance_container2.setMetaDataEntry("weight", 2) + + assert instance_container2 < instance_container + + assert instance_container2 < None + + instance_container2.setMetaDataEntry("weight", 0) + instance_container.setMetaDataEntry("weight", 0) + instance_container2.setName("b") + instance_container.setName("a") + assert instance_container < instance_container2 + + +def test_dirty_instance_container(): + instance_container = UM.Settings.InstanceContainer.InstanceContainer("test") + assert not instance_container.isDirty() + instance_container.setDirty(True) + assert instance_container.isDirty() + + # Make the instance container think it's read only. + instance_container._read_only = True + instance_container.setDirty(False) + assert instance_container.isDirty() # Changing it is no longer possible + + +def test_getAllKeys(): + instance_container = UM.Settings.InstanceContainer.InstanceContainer("test") + definition1 = UM.Settings.SettingDefinition.SettingDefinition("test_0", None) + definition1.deserialize({ + "label": "Test 0", + "type": "float", + "description": "A Test Setting", + "default_value": 10.0 + }) + def1_instance = UM.Settings.SettingInstance.SettingInstance(definition1, instance_container) + def1_instance.propertyChanged = unittest.mock.MagicMock() + + instance_container.addInstance(def1_instance) + + +def test_getAllKeys_cached(): + instance_container = UM.Settings.InstanceContainer.InstanceContainer("test") + instance_container.setCachedValues({"beep": "yay"}) + + assert instance_container.getAllKeys() == {"beep"} + + +def test_hasPropertyValueCached(): + # We special cased the value property if it's in the cache. + instance_container = UM.Settings.InstanceContainer.InstanceContainer("test") + instance_container.setCachedValues({"beep": "yay"}) + assert instance_container.hasProperty("beep", "value") \ No newline at end of file diff -Nru uranium-3.3.0/tests/Settings/TestInstanceContainersModel.py uranium-4.4.1/tests/Settings/TestInstanceContainersModel.py --- uranium-3.3.0/tests/Settings/TestInstanceContainersModel.py 1970-01-01 00:00:00.000000000 +0000 +++ uranium-4.4.1/tests/Settings/TestInstanceContainersModel.py 2019-11-19 10:50:46.000000000 +0000 @@ -0,0 +1,87 @@ +from UM.Settings.Models.InstanceContainersModel import InstanceContainersModel +from unittest.mock import MagicMock, patch +import pytest + +@pytest.fixture +def instance_containers_model(container_registry): + with patch("UM.Settings.ContainerRegistry.ContainerRegistry.getInstance", + MagicMock(return_value=container_registry)): + result = InstanceContainersModel() + result._fetchInstanceContainers = MagicMock(return_value = ({}, {"bla": {"name": "test", "id": "beep"}})) + return result + + +def test_simpleUpdate(instance_containers_model): + instance_containers_model._update() + items = instance_containers_model.items + assert len(items) == 1 + assert items[0]["name"] == "test" + assert items[0]["id"] == "beep" + + +test_validate_data_get_set = [ + {"attribute": "sectionProperty", "value": "YAY"}, + {"attribute": "filter", "value": {"beep": "oh noes"}} +] + + +@pytest.mark.parametrize("data", test_validate_data_get_set) +def test_getAndSet(data, instance_containers_model): + model = instance_containers_model + + # Convert the first letter into a capital + attribute = list(data["attribute"]) + attribute[0] = attribute[0].capitalize() + attribute = "".join(attribute) + + # mock the correct emit + setattr(model, data["attribute"] + "Changed", MagicMock()) + + # Attempt to set the value + getattr(model, "set" + attribute)(data["value"]) + + # Check if signal fired. + signal = getattr(model, data["attribute"] + "Changed") + assert signal.emit.call_count == 1 + + # Ensure that the value got set + assert getattr(model, data["attribute"]) == data["value"] + + # Attempt to set the value again + getattr(model, "set" + attribute)(data["value"]) + # The signal should not fire again + assert signal.emit.call_count == 1 + + +def test_updateMetaData(instance_containers_model): + instance_container = MagicMock() + instance_container.getMetaData = MagicMock(return_value = {}) + instance_container.getName = MagicMock(return_value = "name") + instance_container.getId = MagicMock(return_value = "the_id") + instance_containers_model.setProperty = MagicMock() + instance_containers_model._updateMetaData(instance_container) + + calls = instance_containers_model.setProperty.call_args_list + assert calls[0][0][2] == {} + assert calls[1][0][2] == "name" + assert calls[2][0][2] == "the_id" + + +def test_fetchInstanceContainers(container_registry): + with patch("UM.Settings.ContainerRegistry.ContainerRegistry.getInstance", MagicMock(return_value=container_registry)): + model = InstanceContainersModel() + model.setFilter({"id": "empty"}) + assert model.filterList == [{"id": "empty"}] + containers, metadatas = model._fetchInstanceContainers() + + assert "empty" in containers + assert metadatas == dict() + + +def test_getIOPlugins(instance_containers_model): + registry = MagicMock() + registry.getActivePlugins = MagicMock(return_value=["omg"]) + registry.getMetaData = MagicMock(return_value = {"test": "blorp"}) + + with patch("UM.PluginRegistry.PluginRegistry.getInstance", MagicMock(return_value=registry)): + assert instance_containers_model._getIOPlugins("test") == [("omg", {"test": "blorp"})] \ No newline at end of file diff -Nru uranium-3.3.0/tests/Settings/TestRoundtripping.py uranium-4.4.1/tests/Settings/TestRoundtripping.py --- uranium-3.3.0/tests/Settings/TestRoundtripping.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/tests/Settings/TestRoundtripping.py 2019-11-19 10:50:46.000000000 +0000 @@ -1,4 +1,4 @@ -# Copyright (c) 2017 Ultimaker B.V. +# Copyright (c) 2018 Ultimaker B.V. # Uranium is released under the terms of the LGPLv3 or higher. # This is a set of tests to test roundtripping for containers. @@ -9,18 +9,23 @@ # This is not strictly a unit test but more of a systems test. import pytest +import os import multiprocessing.pool -import unittest.mock #For MagicMock and patch. +import unittest.mock # For MagicMock and patch. from UM.SaveFile import SaveFile from UM.Settings.ContainerStack import ContainerStack from UM.Settings.InstanceContainer import InstanceContainer from UM.Settings.DefinitionContainer import DefinitionContainer +from UM.Resources import Resources +Resources.addSearchPath(os.path.dirname(os.path.abspath(__file__))) + @pytest.fixture(params = [1, 2, 5, 10]) def process_count(request): return request.param + def write_data(path, data): if not isinstance(data, str): data = data.serialize() @@ -28,10 +33,12 @@ with SaveFile(str(path), "wt") as f: f.write(data) + def read_data(path): - with open(str(path), "rt") as f: + with open(str(path), "rt", encoding = "utf-8") as f: return f.read() + ## Run a function in one or more separate processes, waiting until all are finished. def mp_run(process_count, function, *args): results = [] @@ -49,6 +56,7 @@ return actual_results + def test_roundtrip_basic(tmpdir, process_count): data = "test" temp_file = tmpdir.join("test") @@ -62,11 +70,15 @@ for result in results: assert result == data + +@pytest.mark.skip(reason = "Skipping this test since it fails when running in some machines and also in the CI. " + "Probably due to a problem with the library. I'm getting NotImplementedError when trying " + "to findDefinitionContainers. It seems that the container registry is not correctly set.") def test_roundtrip_instance(tmpdir, process_count, loaded_container_registry): instance_container = InstanceContainer("test_container") instance_container.setName("Test Instance Container") instance_container.setDefinition("inherits") - instance_container.addMetaDataEntry("test", "test") + instance_container.setMetaDataEntry("test", "test") instance_container.setProperty("test_setting_1", "value", 20) temp_file = tmpdir.join("instance_container_test") @@ -87,13 +99,14 @@ assert deserialized_container.getMetaData() == instance_container.getMetaData() assert deserialized_container.getProperty("test_setting_1", "value") == instance_container.getProperty("test_setting_1", "value") + def test_roundtrip_stack(tmpdir, process_count, loaded_container_registry): definition = loaded_container_registry.findDefinitionContainers(id = "multiple_settings")[0] instances = loaded_container_registry.findInstanceContainers(id = "setting_values")[0] container_stack = ContainerStack("test_stack") container_stack.setName("Test Container Stack") - container_stack.addMetaDataEntry("test", "test") + container_stack.setMetaDataEntry("test", "test") container_stack.addContainer(definition) container_stack.addContainer(instances) diff -Nru uranium-3.3.0/tests/Settings/TestSettingDefinition.py uranium-4.4.1/tests/Settings/TestSettingDefinition.py --- uranium-3.3.0/tests/Settings/TestSettingDefinition.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/tests/Settings/TestSettingDefinition.py 2019-11-19 10:50:46.000000000 +0000 @@ -1,4 +1,4 @@ -# Copyright (c) 2016 Ultimaker B.V. +# Copyright (c) 2019 Ultimaker B.V. # Uranium is released under the terms of the LGPLv3 or higher. import pytest @@ -6,11 +6,12 @@ import UM.Settings.SettingDefinition from UM.Settings.SettingFunction import SettingFunction + def test_create(): definition = UM.Settings.SettingDefinition.SettingDefinition("test", None) assert definition is not None - assert definition.key is "test" + assert definition.key == "test" assert definition.container is None @@ -19,6 +20,8 @@ ({"label": "Test", "default_value": 1, "description": "Test Setting", "type": "int", "unit": "mm"}, {"unit": "mm"}), ({"label": "Test", "default_value": 1, "description": "Test Setting", "type": "int", "value": "10" }, {"value": SettingFunction("10")}), ] + + @pytest.mark.parametrize("data,expected", test_basic_properties_data) def test_basic_properties(data, expected): definition = UM.Settings.SettingDefinition.SettingDefinition("test", None) @@ -28,12 +31,32 @@ for key, value in expected.items(): assert getattr(definition, key) == value + def test_missing_properties(): definition = UM.Settings.SettingDefinition.SettingDefinition("test", None) with pytest.raises(AttributeError): definition.deserialize({}) + +def test_getAndSetAttr(): + # SettingDefinition overrides the __getattr_ and __setattr__, so we should also test a simple case. + definition = UM.Settings.SettingDefinition.SettingDefinition("test", None) + + definition.name = 12 + assert definition.name == 12 + +def test_getAndSetAttrUnknown(): + # SettingDefinition overrides the __getattr_ and __setattr__, but only for known properties. + definition = UM.Settings.SettingDefinition.SettingDefinition("test", None) + + with pytest.raises(AttributeError): + definition.this_doesnt_exist + + with pytest.raises(NotImplementedError): + definition.type = "ZOMG" + + def test_children(): definition = UM.Settings.SettingDefinition.SettingDefinition("test", None) @@ -60,8 +83,11 @@ assert len(definition.children) == 2 + assert definition.isDescendant("test_child_1") + child_1 = definition.getChild("test_child_1") assert child_1 is not None + assert child_1.isAncestor("test") assert child_1.key == "test_child_1" assert child_1.label == "Test Child 1" assert child_1.default_value == 20 @@ -81,3 +107,55 @@ assert has_child_1 assert has_child_2 + +toFloatConversionData = [ + ("12", 12), + ("012", 12), + ("12.1", 12.1), + ("OMGZOMG", 0), + ("-22", -22), + ("012.9", 12.9) +] + + +@pytest.mark.parametrize("data,expected", toFloatConversionData) +def test_toFloatConversion(data, expected): + assert UM.Settings.SettingDefinition._toFloatConversion(data) == expected + +toIntConversionData = [ + ("12", 12), + ("-2", -2), + ("0", 0), + ("01", 0) +] + +@pytest.mark.parametrize("data,expected", toIntConversionData) +def test_toIntConversion(data, expected): + assert UM.Settings.SettingDefinition._toIntConversion(data) == expected + + +def test_addSupportedProperty(): + UM.Settings.SettingDefinition.SettingDefinition.addSupportedProperty("test_name", "test_type", required = False, read_only = True) + assert UM.Settings.SettingDefinition.SettingDefinition.hasProperty("test_name") + assert UM.Settings.SettingDefinition.SettingDefinition.getPropertyType("test_name") == "test_type" + assert UM.Settings.SettingDefinition.SettingDefinition.isReadOnlyProperty("test_name") + assert not UM.Settings.SettingDefinition.SettingDefinition.isRequiredProperty("test_name") + assert UM.Settings.SettingDefinition.SettingDefinition.dependsOnProperty("test_name") is None + + +def test_unknownProperty(): + assert not UM.Settings.SettingDefinition.SettingDefinition.hasProperty("NOPE") + assert UM.Settings.SettingDefinition.SettingDefinition.getPropertyType("NOPE") is None + assert not UM.Settings.SettingDefinition.SettingDefinition.isReadOnlyProperty("NOPE") + assert not UM.Settings.SettingDefinition.SettingDefinition.isRequiredProperty("NOPE") + assert UM.Settings.SettingDefinition.SettingDefinition.dependsOnProperty("NOPE") is None + + +def test_compare(): + definition = UM.Settings.SettingDefinition.SettingDefinition("test", None) + definition_2 = UM.Settings.SettingDefinition.SettingDefinition("test2", None) + assert definition == definition + + assert not definition == None + assert not definition == 12 + assert not definition == definition_2 \ No newline at end of file diff -Nru uranium-3.3.0/tests/Settings/TestSettingDefinitionsModel.py uranium-4.4.1/tests/Settings/TestSettingDefinitionsModel.py --- uranium-3.3.0/tests/Settings/TestSettingDefinitionsModel.py 1970-01-01 00:00:00.000000000 +0000 +++ uranium-4.4.1/tests/Settings/TestSettingDefinitionsModel.py 2019-11-19 10:50:46.000000000 +0000 @@ -0,0 +1,393 @@ +from unittest.mock import MagicMock, patch + +import pytest +import os +import uuid +from UM.Settings.SettingRelation import RelationType + +from UM.Settings.DefinitionContainer import DefinitionContainer +from UM.Settings.Models.SettingDefinitionsModel import SettingDefinitionsModel +from PyQt5.QtCore import QVariant, QModelIndex, Qt + + +def createModel(definition = "multiple_settings.def.json"): + model = SettingDefinitionsModel() + + # Get a basic definition container + uid = str(uuid.uuid4()) + definition_container = DefinitionContainer(uid) + with open(os.path.join(os.path.dirname(os.path.abspath(__file__)), "definitions", definition), + encoding="utf-8") as data: + json = data.read() + definition_container._updateSerialized = MagicMock(return_value = json) + definition_container.deserialize(json) + model._container = definition_container + with patch("UM.Application.Application.getInstance"): + model.setShowAll(True) + model.forceUpdate() + model._updateVisibleRows() + + return model + + +test_validate_data = [ + {"attribute": "showAncestors", "value": True}, + {"attribute": "containerId", "value": "omg"}, + {"attribute": "showAll", "value": True}, + {"attribute": "visibilityHandler", "value": MagicMock()}, + {"attribute": "exclude", "value": ["yay"]}, + {"attribute": "expanded", "value": ["yay"]}, + {"attribute": "filter", "value": {"zomg": "zomg"}}, + {"attribute": "rootKey", "value": "Whatevah"} +] + +@pytest.mark.parametrize("data", test_validate_data) +def test_getAndSet(data): + model = SettingDefinitionsModel() + model._scheduleUpdateVisibleRows = MagicMock() + model._container = MagicMock() + # Convert the first letter into a capital + attribute = list(data["attribute"]) + attribute[0] = attribute[0].capitalize() + attribute = "".join(attribute) + + # Attempt to set the value + with patch("UM.Settings.ContainerRegistry.ContainerRegistry.getInstance"): + getattr(model, "set" + attribute)(data["value"]) + + # Ensure that the value got set + assert getattr(model, data["attribute"]) == data["value"] + + +def test_setRootKeyUnknownDefinition(): + model = SettingDefinitionsModel() + model._container = MagicMock() + model._container.findDefinitions = MagicMock(return_value = []) + model.rootKeyChanged = MagicMock() + model.setRootKey("Blorp") + assert model.rootKeyChanged.emit.call_count == 0 + + +def test_getCount(): + model = createModel() + + assert model.count == 6 + assert model.categoryCount == 1 + + +def test_getCountNoContainer(): + model = SettingDefinitionsModel() + assert model.count == 0 + + +def test_setVisible(): + model = createModel() + assert model.visibleCount == 0 + + model.show("test_setting_0") + assert model.visibleCount == 1 + assert model.getVisible("test_setting_0") + + model.hide("test_setting_0") + assert model.visibleCount == 0 + + mocked_visibility_handler = MagicMock(name = "mocked_visibility_handler") + mocked_visibility_handler.getVisible = MagicMock(return_value = set()) + model.setVisibilityHandler(mocked_visibility_handler) + model.setAllVisible(True) + + # Ensure that the visibility handler got notified that things were changed. + assert mocked_visibility_handler.setVisible.call_count == 1 + mocked_visibility_handler.setVisible.assert_called_with({'test_setting_2', 'test_setting_4', 'test_setting_3', 'test_setting_0', 'test_setting_1'}) + + model.setAllVisible(False) + assert mocked_visibility_handler.setVisible.call_count == 2 + mocked_visibility_handler.setVisible.assert_called_with(set()) + + +def test_disconnectVisibilityHandler(): + model = SettingDefinitionsModel() + visibility_handler = MagicMock() + visibility_handler_2 = MagicMock() + model.setVisibilityHandler(visibility_handler) + assert visibility_handler.visibilityChanged.disconnect.call_count == 0 + + model.setVisibilityHandler(visibility_handler_2) + + assert visibility_handler.visibilityChanged.disconnect.call_count > 0 + + +def test_getIndex(): + model = createModel() + # This setting doesn't exist + assert model.getIndex("set_setting_0") == -1 + assert model.getIndex("test_setting_0") == 0 + + +def test_getRequires(): + model = createModel("functions.def.json") + + requires = model.getRequires("test_setting_1", "value") + assert requires[0]["key"] == "test_setting_0" + + +def test_getRequires_noContainer(): + model = SettingDefinitionsModel() + assert model.getRequires("blorp", "whatever") == [] + + +def test_getRequires_noDefinition(): + model = SettingDefinitionsModel() + model._container = MagicMock() + model._container.findDefinitions = MagicMock(return_value=[]) + + assert model.getRequires("blorp", "whatever") == [] + + +def test_getRequires_withRelationsSet(): + model = SettingDefinitionsModel() + model._container = MagicMock() + + relation_1 = MagicMock() + relation_1.type = RelationType.RequiredByTarget + relation_2 = MagicMock() + relation_2.type = RelationType.RequiresTarget + relation_2.role = "HERPDERP" + relation_3 = MagicMock() + relation_3.type = RelationType.RequiresTarget + relation_3.role = "yay" + relation_3.target.key = "key_3" + relation_3.target.label = "label_3" + + mocked_definition_1 = MagicMock() + mocked_definition_1.relations = [relation_1, relation_2, relation_3] + + model._container.findDefinitions = MagicMock(return_value=[mocked_definition_1]) + assert model.getRequires("blorp", "yay") == [{"key": "key_3", "label": "label_3"}] + + +def test_getRequiredBy_withRelationsSet(): + model = SettingDefinitionsModel() + model._container = MagicMock() + + relation_1 = MagicMock() + relation_1.type = RelationType.RequiredByTarget + relation_2 = MagicMock() + relation_2.type = RelationType.RequiresTarget + relation_2.role = "HERPDERP" + relation_3 = MagicMock() + relation_3.type = RelationType.RequiredByTarget + relation_3.role = "yay" + relation_3.target.key = "key_3" + relation_3.target.label = "label_3" + + mocked_definition_1 = MagicMock() + mocked_definition_1.relations = [relation_1, relation_2, relation_3] + + model._container.findDefinitions = MagicMock(return_value=[mocked_definition_1]) + assert model.getRequiredBy("blorp", "yay") == [{"key": "key_3", "label": "label_3"}] + + +def test_getRequiredBy(): + model = createModel("functions.def.json") + + requires = model.getRequiredBy("test_setting_0", "value") + assert requires[0]["key"] == "test_setting_1" + + +def test_getRequiredBy_unknownSetting(): + model = createModel("functions.def.json") + model._getDefinitionsByKey = MagicMock(return_value = []) + + assert model.getRequiredBy("test_setting_0", "value") == [] + + + +@patch("UM.Application.Application.getInstance") +def test_collapseExpand(application): + model = createModel("children.def.json") + + model.expand("test_setting") + assert "test_setting" in model.expanded + assert "test_child_0" not in model.expanded + assert "test_child_1" not in model.expanded + + model.expandRecursive("test_setting") + assert "test_setting" in model.expanded + assert "test_child_0" in model.expanded + assert "test_child_1" in model.expanded + + model.collapse("test_child_0") + assert "test_setting" in model.expanded + assert "test_child_0" not in model.expanded + assert "test_child_1" in model.expanded + + model.collapse("test_setting") + assert "test_setting" not in model.expanded + assert "test_child_0" not in model.expanded + assert "test_child_1" not in model.expanded + + +def test_expandRecursive_noContainer(): + model = SettingDefinitionsModel() + model.expand = MagicMock() + model.expandRecursive("whatever") + + assert model.expanded == [] + assert model.expand.call_count == 0 + + +def test_expandRecursive_noDefinition(): + model = SettingDefinitionsModel() + model._container = MagicMock() + model._container.findDefinitions = MagicMock(return_value = False) + model.expand = MagicMock() + + model.expandRecursive("whatever") + + assert model.expanded == [] + assert model.expand.call_count == 0 + + +def test_collapse_no_container(): + model = SettingDefinitionsModel() + model.collapse("whatever") + + assert model.expanded == [] + + +@patch("UM.Application.Application.getInstance") +def test_setAllExpandedVisible(application): + model = createModel("children.def.json") + mocked_visibility_handler = MagicMock() + mocked_visibility_handler.getVisible = MagicMock(return_value=set()) + model.setVisibilityHandler(mocked_visibility_handler) + model.expand("test_setting") + + model.setAllExpandedVisible(True) + assert mocked_visibility_handler.setVisible.call_count == 1 + mocked_visibility_handler.setVisible.assert_called_with({"test_setting"}) + + model.setAllExpandedVisible(False) + assert mocked_visibility_handler.setVisible.call_count == 2 + mocked_visibility_handler.setVisible.assert_called_with(set()) + + +def test_setAlreadyVisbleSettingVisible(): + model = createModel("children.def.json") + mocked_visibility_handler = MagicMock() + mocked_visibility_handler.getVisible = MagicMock(return_value={"test_setting"}) + model.setVisibilityHandler(mocked_visibility_handler) + model.setVisible("test_setting", True) # This setting is already visible (the visibility handler says so after all!) + + assert mocked_visibility_handler.setVisible.call_count == 0 + + +def test_hideAlreadyHiddenSetting(): + model = createModel("children.def.json") + mocked_visibility_handler = MagicMock() + mocked_visibility_handler.getVisible = MagicMock(return_value=set()) + model.setVisibilityHandler(mocked_visibility_handler) + model.setVisible("test_setting", False) # This setting is already hidden (the visibility handler says so after all!) + + assert mocked_visibility_handler.setVisible.call_count == 0 + + +def test_showUnknownSetting(): + model = createModel("children.def.json") + mocked_visibility_handler = MagicMock() + model.setVisibilityHandler(mocked_visibility_handler) + model.setVisible("HERPDERP", True) + assert mocked_visibility_handler.setVisible.call_count == 0 + + +def test_showKnownHiddenSetting(): + model = createModel("children.def.json") + mocked_visibility_handler = MagicMock() + mocked_visibility_handler.getVisible = MagicMock(return_value=set()) + model.setVisibilityHandler(mocked_visibility_handler) + model.setVisible("test_setting", True) + + assert mocked_visibility_handler.setVisible.call_count == 1 + mocked_visibility_handler.setVisible.assert_called_with({"test_setting"}) + + +@patch("UM.Application.Application.getInstance") +def test_setExpanded(application): + model = createModel("children.def.json") + model.setExpanded(["*"]) + assert "test_setting" in model.expanded + assert "test_child_0" not in model.expanded + assert "test_child_1" not in model.expanded + + +def test_dataHappy(): + model = createModel("single_setting.def.json") + + assert model.data(model.index(0, 0), model.KeyRole) == "test_setting" + assert model.data(model.index(0, 0), model.DepthRole) == 0 + assert model.data(model.index(0, 0), model.ExpandedRole) == False + assert model.data(model.index(0, 0), model.VisibleRole) == False + + +def test_dataUnhappy(): + model = createModel("single_setting.def.json") + # Out of bounds + assert model.data(model.index(250, 0), model.KeyRole) == QVariant() + + # Invalid index + assert model.data(QModelIndex(), model.KeyRole) == QVariant() + + # Unknown role + assert model.data(model.index(0, 0), Qt.UserRole + 100) == QVariant() + + empty_model = SettingDefinitionsModel() + assert empty_model.data(model.index(0, 0), model.KeyRole) == QVariant() + + +def test_getIndexNoContainer(): + model = SettingDefinitionsModel() + assert model.getIndex("blarg") == -1 + + +def test_isDefinitionVisible_excluded(): + definition = MagicMock() + definition.key = "blorp" + model = createModel("single_setting.def.json") + with patch("UM.Application.Application.getInstance"): + model.setExclude(["blorp"]) + assert model._isDefinitionVisible(definition) == False + + +def test_isDefinitionVisible_excludedAncestors(): + definition = MagicMock() + definition.key = "blorp" + definition.getAncestors = MagicMock(return_value = {"zomg"}) + + model = createModel("single_setting.def.json") + with patch("UM.Application.Application.getInstance"): + model.setExclude(["zomg"]) + + assert model._isDefinitionVisible(definition) == False + + +def test_isDefinitionVisible_notExpanded(): + definition = MagicMock() + definition.key = "blorp" + + model = createModel("single_setting.def.json") + + assert model._isDefinitionVisible(definition) == False + + +def test_isDefinitionVisible_settingNotVisible(): + definition = MagicMock() + definition.key = "test_setting" + definition.getAncestors = MagicMock(return_value=set()) + definition.parent = None + model = createModel("single_setting.def.json") + with patch("UM.Application.Application.getInstance"): + model.expand("test_setting") + model.setShowAll(False) + + assert model._isDefinitionVisible(definition) == False \ No newline at end of file diff -Nru uranium-3.3.0/tests/Settings/TestSettingInstance.py uranium-4.4.1/tests/Settings/TestSettingInstance.py --- uranium-3.3.0/tests/Settings/TestSettingInstance.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/tests/Settings/TestSettingInstance.py 2019-11-19 10:50:46.000000000 +0000 @@ -8,6 +8,8 @@ import UM.Settings.SettingDefinition import UM.Settings.SettingInstance +from copy import deepcopy + ## A very basic copy of the instance container. # @@ -36,6 +38,9 @@ def addInstance(self, instance): self._instances.append(instance) + def isDirty(self): + return True + @pytest.fixture def setting_definition(): definition = UM.Settings.SettingDefinition.SettingDefinition("test", None) @@ -103,3 +108,31 @@ instance.setProperty("value", data["value"]) assert instance.validationState(instance_container) == data["state"] + + +def test_getNonExistingAttribute(setting_definition, instance_container): + instance = UM.Settings.SettingInstance.SettingInstance(setting_definition, instance_container) + + with pytest.raises(AttributeError): + instance.blarg + + +def test_compare(setting_definition, instance_container): + instance = UM.Settings.SettingInstance.SettingInstance(setting_definition, instance_container) + instance_container.addInstance(instance) + assert instance != 12 + + instance2 = deepcopy(instance) + assert instance == instance2 + instance_container.addInstance(instance2) + instance2.setProperty("maximum_value", 2000.0) + + # The direction should not matter (Before adding this test it did, so best to leave it in!) + # In this case, we are testing instance 2 having the max_value property, but instance doesn't have it. + assert instance2 != instance + assert instance != instance2 + + instance.setProperty("maximum_value", 9001) + # In this case, we are testing instance 2 having the max_value property, but instance doesn't have it. + assert instance2 != instance + assert instance != instance2 \ No newline at end of file diff -Nru uranium-3.3.0/tests/Settings/TestSettingPropertyProvider.py uranium-4.4.1/tests/Settings/TestSettingPropertyProvider.py --- uranium-3.3.0/tests/Settings/TestSettingPropertyProvider.py 1970-01-01 00:00:00.000000000 +0000 +++ uranium-4.4.1/tests/Settings/TestSettingPropertyProvider.py 2019-11-19 10:50:46.000000000 +0000 @@ -0,0 +1,145 @@ +from unittest.mock import MagicMock, patch + +from UM.Settings.ContainerStack import ContainerStack +from UM.Settings.DefinitionContainer import DefinitionContainer +from UM.Settings.InstanceContainer import InstanceContainer +from UM.Settings.Models.SettingPropertyProvider import SettingPropertyProvider +from UM.Settings.SettingDefinition import SettingDefinition +from UM.Settings.SettingInstance import SettingInstance +from UM.Settings.Validator import ValidatorState + + +def test_setContainerStack(container_registry): + setting_property_provider = SettingPropertyProvider() + container_stack = ContainerStack("test!") + + setting_property_provider.containerStackChanged = MagicMock() + setting_property_provider.setContainerStack(container_stack) + assert setting_property_provider.containerStackChanged.emit.call_count == 1 + + # Should not do anything (since its' the same stack) + setting_property_provider.setContainerStack(container_stack) + assert setting_property_provider.containerStackChanged.emit.call_count == 1 + assert setting_property_provider.containerStack == container_stack + + with patch("UM.Settings.ContainerRegistry.ContainerRegistry.getInstance", MagicMock(return_value = container_registry)): + setting_property_provider.setContainerStackId("test") + # The registry doesn't have any containers, so this shouldn't have any effect. + assert setting_property_provider.containerStackId == "test!" + + container_registry.addContainer(ContainerStack("test")) + setting_property_provider.setContainerStackId("test") + + # Since it is added now, it should change. + assert setting_property_provider.containerStackId == "test" + + +def test_valueChanges(container_registry): + setting_property_provider = SettingPropertyProvider() + + # First create the basics; A container stack that will hold 2 instance containers and a single definition container + container_stack = ContainerStack("test!") + instance_container = InstanceContainer("data") + second_instance_container = InstanceContainer("data2") + definition_container = DefinitionContainer("foo") + + # Create a setting definition for our one and only setting! + setting_definition = SettingDefinition("test_setting") + setting_definition._deserialize_dict({"value": 10, "label": "blorp", "type": "float", "description": "nah", "maximum_value": 23, "maximum_value_warning": 21}) + definition_container.addDefinition(setting_definition) + + # Make a single setting instance for our one and only setting. + setting_instance = SettingInstance(setting_definition, instance_container) + setting_instance.setProperty("value", 20) + setting_instance.setProperty("enabled", False) + instance_container.addInstance(setting_instance) + + # Make a setting instance that lives in our second instance_container + setting_instance2 = SettingInstance(setting_definition, second_instance_container) + second_instance_container.addInstance(setting_instance2) + + # Now that both containers are done, actually add them. + container_stack.addContainer(definition_container) + container_stack.addContainer(second_instance_container) + container_stack.addContainer(instance_container) + + setting_property_provider.setContainerStack(container_stack) + setting_property_provider.setKey("test_setting") + assert setting_property_provider.key == "test_setting" + + assert setting_property_provider.getPropertyValue("value", 0) == 20 + + setting_property_provider.setWatchedProperties(["enabled", "value", "validationState"]) + assert setting_property_provider.watchedProperties == ["enabled", "value", "validationState"] + assert setting_property_provider.properties.value("enabled") == "False" + assert setting_property_provider.properties.value("value") == "20" + + # Validator state is a special property that gets added based on the type and the value + assert setting_property_provider.properties.value("validationState") == str(ValidatorState.Valid) + + # Set the property value to something that will trigger a warning + setting_property_provider.setPropertyValue("value", 22) + assert setting_property_provider.properties.value("validationState") == str(ValidatorState.MaximumWarning) + assert setting_property_provider.getPropertyValue("value", 0) == 22 + # The setting doesn't exist in our second instance container, so this should be None + assert setting_property_provider.getPropertyValue("value", 1) is None + + # Set the property value to something that will trigger an error + setting_property_provider.setPropertyValue("value", 25) + # The Qtimer that we use to prevent flooding doesn't work in tests, so tickle the change manually. + setting_property_provider._update() + + assert setting_property_provider.properties.value("validationState") == str(ValidatorState.MaximumError) + + # We now ask for the second instance container to be targeted + setting_property_provider.setStoreIndex(1) + assert setting_property_provider.storeIndex == 1 + + setting_property_provider.setPropertyValue("value", 2) + setting_property_provider._update() + # So now we should see a change in that instance container + assert setting_property_provider.getPropertyValue("value", 1) == 2 + # But not if we ask the provider, because the container above it still has a 25 as value! + assert setting_property_provider.getPropertyValue("value", 0) == 25 + + assert setting_property_provider.stackLevels == [0, 1, 2] + + # We're asking for an index that doesn't exist. + assert setting_property_provider.getPropertyValue("value", 2000) is None + + # The value is used, so the property must be true + assert setting_property_provider.isValueUsed + + # Try to remove the setting from the container + setting_property_provider.removeFromContainer(0) + assert setting_property_provider.getPropertyValue("value", 0) is None + + # Ensure that a weird index doesn't break + setting_property_provider.removeFromContainer(90001) + + +def test_stackLevelsNoStack(): + setting_property_provider = SettingPropertyProvider() + assert setting_property_provider.stackLevels == [-1] + + +def test_isValueUsedNoStack(): + setting_property_provider = SettingPropertyProvider() + assert setting_property_provider.isValueUsed == False + + +def test_containerStackIdNoStack(): + setting_property_provider = SettingPropertyProvider() + assert setting_property_provider.containerStackId == "" + + +def test_getSetRemoveUnusedValue(): + setting_property_provider = SettingPropertyProvider() + setting_property_provider.removeUnusedValueChanged = MagicMock() + + setting_property_provider.setRemoveUnusedValue(False) + assert setting_property_provider.removeUnusedValue == False + assert setting_property_provider.removeUnusedValueChanged.emit.call_count == 1 + + setting_property_provider.setRemoveUnusedValue(False) + assert setting_property_provider.removeUnusedValueChanged.emit.call_count == 1 \ No newline at end of file diff -Nru uranium-3.3.0/tests/Settings/TestValidator.py uranium-4.4.1/tests/Settings/TestValidator.py --- uranium-3.3.0/tests/Settings/TestValidator.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/tests/Settings/TestValidator.py 2019-11-19 10:50:46.000000000 +0000 @@ -17,7 +17,11 @@ self.maximum_value = None self.minimum_value_warning = None self.maximum_value_warning = None + self.warning_value = None + self.error_value = None + self.type = None self.value = value + self.regex_blacklist_pattern = "" def getProperty(self, key, property_name, context = None): return getattr(self, property_name) @@ -46,49 +50,70 @@ # - The answer: A state of the validator after validating the setting. test_validate_data = [ # Empty values - ({"description": "Everything None", "minimum": None, "maximum": None, "min_warning": None, "max_warning": None, "current": None, "answer": ValidatorState.Exception}), + ({"description": "Everything None", "type": "float", "minimum": None, "maximum": None, "min_warning": None, "max_warning": None, "current": None, "answer": ValidatorState.Exception}), # Floating point values - ({"description": "Completely valid", "minimum": 0.0, "maximum": 10.0, "min_warning": 1.0, "max_warning": 9.0, "current": 5.0, "answer": ValidatorState.Valid}), - ({"description": "Exactly MinWarning", "minimum": 0.0, "maximum": 10.0, "min_warning": 1.0, "max_warning": 9.0, "current": 1.0, "answer": ValidatorState.Valid}), - ({"description": "Exactly MaxWarning", "minimum": 0.0, "maximum": 10.0, "min_warning": 1.0, "max_warning": 9.0, "current": 9.0, "answer": ValidatorState.Valid}), - ({"description": "Below MinWarning", "minimum": 0.0, "maximum": 10.0, "min_warning": 1.0, "max_warning": 9.0, "current": 0.5, "answer": ValidatorState.MinimumWarning}), - ({"description": "Above MaxWarning", "minimum": 0.0, "maximum": 10.0, "min_warning": 1.0, "max_warning": 9.0, "current": 9.5, "answer": ValidatorState.MaximumWarning}), - ({"description": "Exactly Minimum", "minimum": 0.0, "maximum": 10.0, "min_warning": 1.0, "max_warning": 9.0, "current": 0.0, "answer": ValidatorState.MinimumWarning}), - ({"description": "Exactly Maximum", "minimum": 0.0, "maximum": 10.0, "min_warning": 1.0, "max_warning": 9.0, "current": 10.0, "answer": ValidatorState.MaximumWarning}), - ({"description": "Below Minimum", "minimum": 0.0, "maximum": 10.0, "min_warning": 1.0, "max_warning": 9.0, "current": -1.0, "answer": ValidatorState.MinimumError}), - ({"description": "Above Maximum", "minimum": 0.0, "maximum": 10.0, "min_warning": 1.0, "max_warning": 9.0, "current": 11.0, "answer": ValidatorState.MaximumError}), - ({"description": "Float precision test", "minimum": 0.0, "maximum": 100000.0, "min_warning": 1.0, "max_warning": 9.0, "current": 100000.0, "answer": ValidatorState.MaximumWarning}), - ({"description": "NaN value", "minimum": 0.0, "maximum": 10.0, "min_warning": 1.0, "max_warning": 9.0, "current": float("nan"), "answer": ValidatorState.Exception}), - ({"description": "NaN MinWarning", "minimum": 0.0, "maximum": 10.0, "min_warning": float("nan"), "max_warning": 9.0, "current": 1.0, "answer": ValidatorState.Valid}), - ({"description": "Infinity Maximum", "minimum": 0.0, "maximum": float("inf"), "min_warning": 1.0, "max_warning": 9.0, "current": 5.0, "answer": ValidatorState.Valid}), - ({"description": "Maximum < MaxWarning", "minimum": 0.0, "maximum": 10.0, "min_warning": 1.0, "max_warning": 15.0, "current": 12.5, "answer": ValidatorState.MaximumError}), - ({"description": "Maximum < Minimum", "minimum": 15.0, "maximum": 10.0, "min_warning": 1.0, "max_warning": 9.0, "current": 12.5, "answer": ValidatorState.Exception}), - ({"description": "None Maximum", "minimum": 0.0, "maximum": None, "min_warning": 1.0, "max_warning": 9.0, "current": 11.0, "answer": ValidatorState.MaximumWarning}), - ({"description": "None Minimum", "minimum": None, "maximum": 10.0, "min_warning": 1.0, "max_warning": 9.0, "current": -1.0, "answer": ValidatorState.MinimumWarning}), + ({"description": "Completely valid", "type": "float", "minimum": 0.0, "maximum": 10.0, "min_warning": 1.0, "max_warning": 9.0, "current": 5.0, "answer": ValidatorState.Valid}), + ({"description": "Exactly MinWarning", "type": "float", "minimum": 0.0, "maximum": 10.0, "min_warning": 1.0, "max_warning": 9.0, "current": 1.0, "answer": ValidatorState.Valid}), + ({"description": "Exactly MaxWarning", "type": "float", "minimum": 0.0, "maximum": 10.0, "min_warning": 1.0, "max_warning": 9.0, "current": 9.0, "answer": ValidatorState.Valid}), + ({"description": "Below MinWarning", "type": "float", "minimum": 0.0, "maximum": 10.0, "min_warning": 1.0, "max_warning": 9.0, "current": 0.5, "answer": ValidatorState.MinimumWarning}), + ({"description": "Above MaxWarning", "type": "float", "minimum": 0.0, "maximum": 10.0, "min_warning": 1.0, "max_warning": 9.0, "current": 9.5, "answer": ValidatorState.MaximumWarning}), + ({"description": "Exactly Minimum", "type": "float", "minimum": 0.0, "maximum": 10.0, "min_warning": 1.0, "max_warning": 9.0, "current": 0.0, "answer": ValidatorState.MinimumWarning}), + ({"description": "Exactly Maximum", "type": "float", "minimum": 0.0, "maximum": 10.0, "min_warning": 1.0, "max_warning": 9.0, "current": 10.0, "answer": ValidatorState.MaximumWarning}), + ({"description": "Below Minimum", "type": "float", "minimum": 0.0, "maximum": 10.0, "min_warning": 1.0, "max_warning": 9.0, "current": -1.0, "answer": ValidatorState.MinimumError}), + ({"description": "Above Maximum", "type": "float", "minimum": 0.0, "maximum": 10.0, "min_warning": 1.0, "max_warning": 9.0, "current": 11.0, "answer": ValidatorState.MaximumError}), + ({"description": "Float precision test", "type": "float", "minimum": 0.0, "maximum": 100000.0, "min_warning": 1.0, "max_warning": 9.0, "current": 100000.0, "answer": ValidatorState.MaximumWarning}), + ({"description": "NaN value", "type": "float", "minimum": 0.0, "maximum": 10.0, "min_warning": 1.0, "max_warning": 9.0, "current": float("nan"), "answer": ValidatorState.Exception}), + ({"description": "NaN MinWarning", "type": "float", "minimum": 0.0, "maximum": 10.0, "min_warning": float("nan"), "max_warning": 9.0, "current": 1.0, "answer": ValidatorState.Valid}), + ({"description": "Infinity Maximum", "type": "float", "minimum": 0.0, "maximum": float("inf"), "min_warning": 1.0, "max_warning": 9.0, "current": 5.0, "answer": ValidatorState.Valid}), + ({"description": "Maximum < MaxWarning", "type": "float", "minimum": 0.0, "maximum": 10.0, "min_warning": 1.0, "max_warning": 15.0, "current": 12.5, "answer": ValidatorState.MaximumError}), + ({"description": "Maximum < Minimum", "type": "float", "minimum": 15.0, "maximum": 10.0, "min_warning": 1.0, "max_warning": 9.0, "current": 12.5, "answer": ValidatorState.Exception}), + ({"description": "None Maximum", "type": "float", "minimum": 0.0, "maximum": None, "min_warning": 1.0, "max_warning": 9.0, "current": 11.0, "answer": ValidatorState.MaximumWarning}), + ({"description": "None Minimum", "type": "float", "minimum": None, "maximum": 10.0, "min_warning": 1.0, "max_warning": 9.0, "current": -1.0, "answer": ValidatorState.MinimumWarning}), # Integer values - ({"description": "Completely valid", "minimum": 0, "maximum": 10, "min_warning": 1, "max_warning": 9, "current": 5, "answer": ValidatorState.Valid}), - ({"description": "Exactly MinWarning", "minimum": 0, "maximum": 10, "min_warning": 1, "max_warning": 9, "current": 1, "answer": ValidatorState.Valid}), - ({"description": "Exactly MaxWarning", "minimum": 0, "maximum": 10, "min_warning": 1, "max_warning": 9, "current": 9, "answer": ValidatorState.Valid}), - ({"description": "Below MinWarning", "minimum": -1, "maximum": 10, "min_warning": 1, "max_warning": 9, "current": 0, "answer": ValidatorState.MinimumWarning}), - ({"description": "Above MaxWarning", "minimum": 0, "maximum": 11, "min_warning": 1, "max_warning": 9, "current": 10, "answer": ValidatorState.MaximumWarning}), - ({"description": "Exactly Minimum", "minimum": 0, "maximum": 10, "min_warning": 1, "max_warning": 9, "current": 0, "answer": ValidatorState.MinimumWarning}), - ({"description": "Exactly Maximum", "minimum": 0, "maximum": 10, "min_warning": 1, "max_warning": 9, "current": 10, "answer": ValidatorState.MaximumWarning}), - ({"description": "Below Minimum", "minimum": 0, "maximum": 10, "min_warning": 1, "max_warning": 9, "current": -1, "answer": ValidatorState.MinimumError}), - ({"description": "Above Maximum", "minimum": 0, "maximum": 10, "min_warning": 1, "max_warning": 9, "current": 11, "answer": ValidatorState.MaximumError}), - ({"description": "Float precision test", "minimum": 0, "maximum": 100000, "min_warning": 1, "max_warning": 9, "current": 100000, "answer": ValidatorState.MaximumWarning}), - ({"description": "Maximum < MaxWarning", "minimum": 0, "maximum": 10, "min_warning": 1, "max_warning": 15, "current": 13, "answer": ValidatorState.MaximumError}), - ({"description": "Maximum < Minimum", "minimum": 15, "maximum": 10, "min_warning": 1, "max_warning": 9, "current": 13, "answer": ValidatorState.Exception}), + ({"description": "Completely valid", "type": "int", "minimum": 0, "maximum": 10, "min_warning": 1, "max_warning": 9, "current": 5, "answer": ValidatorState.Valid}), + ({"description": "Exactly MinWarning", "type": "int", "minimum": 0, "maximum": 10, "min_warning": 1, "max_warning": 9, "current": 1, "answer": ValidatorState.Valid}), + ({"description": "Exactly MaxWarning", "type": "int", "minimum": 0, "maximum": 10, "min_warning": 1, "max_warning": 9, "current": 9, "answer": ValidatorState.Valid}), + ({"description": "Below MinWarning", "type": "int", "minimum": -1, "maximum": 10, "min_warning": 1, "max_warning": 9, "current": 0, "answer": ValidatorState.MinimumWarning}), + ({"description": "Above MaxWarning", "type": "int", "minimum": 0, "maximum": 11, "min_warning": 1, "max_warning": 9, "current": 10, "answer": ValidatorState.MaximumWarning}), + ({"description": "Exactly Minimum", "type": "int", "minimum": 0, "maximum": 10, "min_warning": 1, "max_warning": 9, "current": 0, "answer": ValidatorState.MinimumWarning}), + ({"description": "Exactly Maximum", "type": "int", "minimum": 0, "maximum": 10, "min_warning": 1, "max_warning": 9, "current": 10, "answer": ValidatorState.MaximumWarning}), + ({"description": "Below Minimum", "type": "int", "minimum": 0, "maximum": 10, "min_warning": 1, "max_warning": 9, "current": -1, "answer": ValidatorState.MinimumError}), + ({"description": "Above Maximum", "type": "int", "minimum": 0, "maximum": 10, "min_warning": 1, "max_warning": 9, "current": 11, "answer": ValidatorState.MaximumError}), + ({"description": "Float precision test", "type": "int", "minimum": 0, "maximum": 100000, "min_warning": 1, "max_warning": 9, "current": 100000, "answer": ValidatorState.MaximumWarning}), + ({"description": "Maximum < MaxWarning", "type": "int", "minimum": 0, "maximum": 10, "min_warning": 1, "max_warning": 15, "current": 13, "answer": ValidatorState.MaximumError}), + ({"description": "Maximum < Minimum", "type": "int", "minimum": 15, "maximum": 10, "min_warning": 1, "max_warning": 9, "current": 13, "answer": ValidatorState.Exception}), # Mixed values - ({"description": "Completely valid", "minimum": 0, "maximum": 10.0, "min_warning": 1.0, "max_warning": 9, "current": 5.0, "answer": ValidatorState.Valid}), + ({"description": "Completely valid", "type": "float", "minimum": 0, "maximum": 10.0, "min_warning": 1.0, "max_warning": 9, "current": 5.0, "answer": ValidatorState.Valid}), + # String values + ({"description": "Empty string valid", "type": "str", "allow_empty": True, "current": "", "answer": ValidatorState.Valid}), + ({"description": "Empty string is invalid", "type": "str", "allow_empty": False, "current": "", "answer": ValidatorState.Invalid}), + ({"description": "String is not UUID, OK", "type": "str", "is_uuid": False, "current": "Blorf", "answer": ValidatorState.Valid}), + ({"description": "String is not UUID, :-(", "type": "str", "is_uuid": True, "current": "Blorf", "answer": ValidatorState.Invalid}), + ({"description": "UUID is UUID", "type": "str", "is_uuid": True, "current": "123456AF-ab9d-43E6-ABcd-AB8D43e6abCD", "answer": ValidatorState.Valid}), + ({"description": "Not match regex blacklist", "type": "str", + "regex_blacklist_pattern": "^blacklisted value$", "current": "valid value", "answer": ValidatorState.Valid}), + ({"description": "Match regex blacklist", "type": "str", + "regex_blacklist_pattern": "^blacklisted value$", "current": "blacklisted value", "answer": ValidatorState.Invalid}), + # Bool values + ({"description": "No warning or error states", "type": "bool", "current": True, "answer": ValidatorState.Valid}), + ({"description": "Warning state", "type": "bool", "warning_value": True, "current": True, "answer": ValidatorState.MaximumWarning}), + ({"description": "Error state", "type": "bool", "error_value": True, "current": True, "answer": ValidatorState.MaximumError}), ] @pytest.mark.parametrize("data", test_validate_data) def test_validate(data): setting_instance = MockSettingInstance(data["current"]) - setting_instance.minimum_value = data["minimum"] - setting_instance.maximum_value = data["maximum"] - setting_instance.minimum_value_warning = data["min_warning"] - setting_instance.maximum_value_warning = data["max_warning"] + + setting_instance.type = data.get("type") + setting_instance.minimum_value = data.get("minimum") + setting_instance.maximum_value = data.get("maximum") + setting_instance.minimum_value_warning = data.get("min_warning") + setting_instance.maximum_value_warning = data.get("max_warning") + setting_instance.warning_value = data.get("warning_value") + setting_instance.error_value = data.get("error_value") + setting_instance.allow_empty = data.get("allow_empty") + setting_instance.is_uuid = data.get("is_uuid") + setting_instance.regex_blacklist_pattern = data.get("regex_blacklist_pattern", "") validator = Validator("test") validation_state = validator(setting_instance) #Execute the test. diff -Nru uranium-3.3.0/tests/Shaders/invalid2.shader uranium-4.4.1/tests/Shaders/invalid2.shader --- uranium-3.3.0/tests/Shaders/invalid2.shader 1970-01-01 00:00:00.000000000 +0000 +++ uranium-4.4.1/tests/Shaders/invalid2.shader 2019-11-19 10:50:46.000000000 +0000 @@ -0,0 +1,8 @@ +[shaders] +fragment = + uniform lowp vec4 u_color; + + void main() + { + gl_FragColor = u_color; + } \ No newline at end of file diff -Nru uranium-3.3.0/tests/Shaders/invalid.shader uranium-4.4.1/tests/Shaders/invalid.shader --- uranium-3.3.0/tests/Shaders/invalid.shader 1970-01-01 00:00:00.000000000 +0000 +++ uranium-4.4.1/tests/Shaders/invalid.shader 2019-11-19 10:50:46.000000000 +0000 @@ -0,0 +1,10 @@ +[shaders] +vertex = + uniform highp mat4 u_modelViewProjectionMatrix; + + attribute highp vec4 a_vertex; + + void main() + { + gl_Position = u_modelViewProjectionMatrix * a_vertex; + } \ No newline at end of file diff -Nru uranium-3.3.0/tests/Shaders/test.shader uranium-4.4.1/tests/Shaders/test.shader --- uranium-3.3.0/tests/Shaders/test.shader 1970-01-01 00:00:00.000000000 +0000 +++ uranium-4.4.1/tests/Shaders/test.shader 2019-11-19 10:50:46.000000000 +0000 @@ -0,0 +1,14 @@ +[shaders] +vertex = vertex_code +fragment = fragment_code +geometry = geometry_code + +[defaults] +u_disabledMultiplier = 0.75 +[bindings] +u_modelViewProjectionMatrix = model_view_projection_matrix +u_color = selection_color + +[attributes] +a_vertex = vertex +a_color = color diff -Nru uranium-3.3.0/tests/TestBackend.py uranium-4.4.1/tests/TestBackend.py --- uranium-3.3.0/tests/TestBackend.py 1970-01-01 00:00:00.000000000 +0000 +++ uranium-4.4.1/tests/TestBackend.py 2019-11-19 10:50:46.000000000 +0000 @@ -0,0 +1,132 @@ +import sys +from unittest.mock import patch, MagicMock + +import pytest + +import Arcus + +from UM.Backend.Backend import Backend + +@pytest.fixture +def backend(): + with patch("UM.Application.Application.getInstance"): + backend = Backend() + return backend + +@pytest.fixture +def process(): + mocked_process = MagicMock() + mocked_process.stderr.readline = MagicMock() + mocked_process.stderr.readline.side_effect= [b"blarg", b"", b""] + + mocked_process.stdout.readline = MagicMock() + mocked_process.stdout.readline.side_effect = [b"blarg", b"", b""] + return mocked_process + + +def test_setState(backend): + backend.backendStateChange.emit = MagicMock() + + backend.setState("BEEP") + backend.backendStateChange.emit.assert_called_once_with("BEEP") + + # Calling it again should not cause another emit + backend.setState("BEEP") + backend.backendStateChange.emit.assert_called_once_with("BEEP") + + +def test_startEngine(backend, process): + backend.getEngineCommand = MagicMock(return_value = "blarg") + + backend._runEngineProcess = MagicMock(return_value = process) + + backend.startEngine() + backend._runEngineProcess.assert_called_once_with("blarg") + + backend.startEngine() + process.terminate.assert_called_once_with() + + +def test_startEngineWithoutCommand(backend): + backend.getEngineCommand = MagicMock(return_value = None) + + backend._createSocket = MagicMock() + + backend.startEngine() + backend._createSocket.assert_called_once_with() + + +def test__onSocketStateChanged_listening(backend): + backend.startEngine = MagicMock() + with patch("UM.Application.Application.getInstance"): + backend._onSocketStateChanged(Arcus.SocketState.Listening) + assert backend.startEngine.called_once_with() + + +def test_onSocketStateChanged_connected(backend): + backend.backendConnected = MagicMock() + backend._onSocketStateChanged(Arcus.SocketState.Connected) + assert backend.backendConnected.emit.called_once_with() + + +def test_handleKnownMessage(backend): + handler = MagicMock() + backend._message_handlers = {"beep": handler} + socket = MagicMock() + message = MagicMock() + message.getTypeName = MagicMock(return_value = "beep") + socket.takeNextMessage = MagicMock(return_value = message) + backend._socket = socket + backend._onMessageReceived() + + handler.assert_called_once_with(message) + + +def test_onSocketBindFailed(backend): + port = backend._port + backend._createSocket = MagicMock() + bind_failed_error = MagicMock() + bind_failed_error.getErrorCode = MagicMock(return_value=Arcus.ErrorCode.BindFailedError) + backend._onSocketError(bind_failed_error) + assert backend._createSocket.call_count == 1 + assert port + 1 == backend._port + + +def test_getLog(backend): + backend._backendLog(b"blooop") + + assert backend.getLog() == [b"blooop"] + + backend._backend_log_max_lines = 3 + + backend._backendLog(b"omgzomg") + backend._backendLog(b"omgzomg2") + # The max lines keeps deleting until the number of entries left is lower than the max (2 in this case) + assert backend.getLog() == [b"omgzomg", b"omgzomg2"] + + +@pytest.mark.parametrize("exception", [PermissionError, FileNotFoundError, BlockingIOError]) +def test_runEngineProcessException(backend, exception): + # It should be able to handle a number of exceptions without problems + with patch('subprocess.Popen', side_effect = exception): + assert backend._runEngineProcess([""]) is None + + +def test_createSocket(backend): + # We're not testing the signal socket here, so mock it + mocked_signal_socket = MagicMock() + with patch("UM.Backend.Backend.SignalSocket", MagicMock(return_value = mocked_signal_socket)): + with patch("UM.Application.Application.getInstance"): + backend._createSocket("beep") + + if sys.platform == "win32": + mocked_signal_socket.registerAllMessageTypes.assert_called_once_with(b"beep") + else: + mocked_signal_socket.registerAllMessageTypes.assert_called_once_with("beep") + + # Try to create it again. + backend._createSocket("beep") + mocked_signal_socket.close.assert_called_once_with() + + backend.close() + assert mocked_signal_socket.close.call_count == 2 \ No newline at end of file diff -Nru uranium-3.3.0/tests/TestColor.py uranium-4.4.1/tests/TestColor.py --- uranium-3.3.0/tests/TestColor.py 1970-01-01 00:00:00.000000000 +0000 +++ uranium-4.4.1/tests/TestColor.py 2019-11-19 10:50:46.000000000 +0000 @@ -0,0 +1,49 @@ +import pytest + +from UM.Math.Color import Color + +half_color = 127/255 + +test_validate_data = [ + {"data_to_set": [255, 255, 255, 0], "expected": [1.0, 1.0, 1.0, 0.0]}, + {"data_to_set": [0, 0, 0, 255], "expected": [0, 0, 0, 1.0]}, + {"data_to_set": [127, 127, 127, 127], "expected": [half_color, half_color, half_color, half_color]}, + {"data_to_set": [127, 1.0, 127, 127], "expected": [half_color, 1.0, half_color, half_color]} +] + +@pytest.mark.parametrize("data", test_validate_data) +def test_getAndSet(data): + color = Color(*data["data_to_set"]) + + assert color == Color(*data["expected"]) + + assert color.r == data["expected"][0] + assert color.g == data["expected"][1] + assert color.b == data["expected"][2] + assert color.a == data["expected"][3] + + # And flip the data around to set the values one by one + reversed_data = data["data_to_set"][::-1] + color.setR(reversed_data[0]) + color.setG(reversed_data[1]) + color.setB(reversed_data[2]) + color.setA(reversed_data[3]) + + assert color.r == data["expected"][3] + assert color.g == data["expected"][2] + assert color.b == data["expected"][1] + assert color.a == data["expected"][0] + + +hex_data =[ + {"data_to_set": "#FFFFFF", "expected": [1.0, 1.0, 1.0, 1.0]}, + {"data_to_set": "#00000000", "expected": [0.0, 0.0, 0.0, 0.0]}, + {"data_to_set": "#00cc99", "expected": [0 / 255, 204 / 255, 153 / 255, 1.0]}, + +] + +@pytest.mark.parametrize("data", hex_data) +def test_fromHexString(data): + color = Color.fromHexString(data["data_to_set"]) + expected_color = Color(*data["expected"]) + assert color == expected_color diff -Nru uranium-3.3.0/tests/TestContainerPropertyProvider.py uranium-4.4.1/tests/TestContainerPropertyProvider.py --- uranium-3.3.0/tests/TestContainerPropertyProvider.py 1970-01-01 00:00:00.000000000 +0000 +++ uranium-4.4.1/tests/TestContainerPropertyProvider.py 2019-11-19 10:50:46.000000000 +0000 @@ -0,0 +1,93 @@ +from UM.Settings.ContainerRegistry import ContainerRegistry +from UM.Settings.Models.ContainerPropertyProvider import ContainerPropertyProvider +import pytest +from unittest.mock import patch, MagicMock + + +test_validate_data_get_set = [ + {"attribute": "containerId", "value": "YAY"}, + {"attribute": "watchedProperties", "value": {"beep": "oh noes"}}, + {"attribute": "key", "value": "YAY"}, +] + +@pytest.fixture() +def registry(): + mocked_registry = MagicMock() + mocked_registry.isReadOnly = MagicMock(return_value=False) + mocked_container = MagicMock() + mocked_container.getProperty = MagicMock(return_value = "yay") + mocked_registry.findContainers = MagicMock(return_value = [mocked_container]) + return mocked_registry + + +@pytest.mark.parametrize("data", test_validate_data_get_set) +def test_getAndSet(data): + model = ContainerPropertyProvider() + + # Convert the first letter into a capital + attribute = list(data["attribute"]) + attribute[0] = attribute[0].capitalize() + attribute = "".join(attribute) + + # mock the correct emit + setattr(model, data["attribute"] + "Changed", MagicMock()) + + # Attempt to set the value + with patch("UM.Settings.ContainerRegistry.ContainerRegistry.getInstance"): + getattr(model, "set" + attribute)(data["value"]) + + # Check if signal fired. + signal = getattr(model, data["attribute"] + "Changed") + assert signal.emit.call_count == 1 + + # Ensure that the value got set + assert getattr(model, data["attribute"]) == data["value"] + + # Attempt to set the value again + getattr(model, "set" + attribute)(data["value"]) + # The signal should not fire again + assert signal.emit.call_count == 1 + + +def test_setPropertyValueNoKey(registry): + model = ContainerPropertyProvider() + with patch("UM.Settings.ContainerRegistry.ContainerRegistry.getInstance", MagicMock(return_value = registry)): + model.setContainerId("bloop") + model.setPropertyValue("derp", "zomg") + # Check if the mocked container got it's setProperty targeted + assert ContainerRegistry.getInstance().findContainers()[0].setProperty.call_count == 0 + + +def test_setPropertyValueNotWatchedProperty(registry): + model = ContainerPropertyProvider() + with patch("UM.Settings.ContainerRegistry.ContainerRegistry.getInstance", MagicMock(return_value = registry)): + model.setContainerId("bloop") + model.setKey("whatever") + model.setPropertyValue("derp", "zomg") + # Check if the mocked container got it's setProperty targeted + assert ContainerRegistry.getInstance().findContainers()[0].setProperty.call_count == 0 + +def test_setPropertyValue(registry): + model = ContainerPropertyProvider() + with patch("UM.Settings.ContainerRegistry.ContainerRegistry.getInstance", MagicMock(return_value = registry)): + model.setContainerId("bloop") + model.setWatchedProperties(["derp"]) + model.setKey("whatever") + model.setPropertyValue("derp", "zomg") + # Check if the mocked container got it's setProperty targeted + assert ContainerRegistry.getInstance().findContainers()[0].setProperty.call_count == 1 + + +def test_setPropertyValueCache(registry): + model = ContainerPropertyProvider() + with patch("UM.Settings.ContainerRegistry.ContainerRegistry.getInstance", MagicMock(return_value=registry)): + model.setContainerId("bloop") + model.setWatchedProperties(["derp", "yay"]) + model.setKey("derp") + # Fake that we got a signal indicating the value is already set + model._onPropertyChanged("derp", "yay") + + model.setPropertyValue("derp", "yay") + + # Check if the mocked container got it's setProperty targeted + assert ContainerRegistry.getInstance().findContainers()[0].setProperty.call_count == 0 diff -Nru uranium-3.3.0/tests/TestController.py uranium-4.4.1/tests/TestController.py --- uranium-3.3.0/tests/TestController.py 1970-01-01 00:00:00.000000000 +0000 +++ uranium-4.4.1/tests/TestController.py 2019-11-19 10:50:46.000000000 +0000 @@ -0,0 +1,365 @@ +from unittest.mock import MagicMock + +from UM.Controller import Controller +from UM.Event import ViewEvent, Event +from UM.InputDevice import InputDevice +from UM.Mesh.MeshData import MeshData +from UM.Scene.SceneNode import SceneNode +from UM.Stage import Stage +from UM.Tool import Tool +from UM.View.View import View + + +def test_addView(application): + controller = Controller(application) + view_1 = View() + view_1.setPluginId("test_1") + view_2 = View() + view_2.setPluginId("test_1") + controller.viewsChanged.emit = MagicMock() + controller.addView(view_1) + + assert controller.getAllViews() == {"test_1": view_1} + assert controller.viewsChanged.emit.call_count == 1 + + # Attempting to add the same view twice should not have any effect. + controller.addView(view_1) + assert controller.getAllViews() == {"test_1": view_1} + assert controller.viewsChanged.emit.call_count == 1 + + # It has the same ID (although the view is different). In that case it still shouldn't be added. + controller.addView(view_2) + assert controller.getAllViews() == {"test_1": view_1} + assert controller.viewsChanged.emit.call_count == 1 + + +def test_getView(application): + controller = Controller(application) + view_1 = View() + view_1.setPluginId("test_1") + view_2 = View() + view_2.setPluginId("test_2") + + controller.addView(view_1) + controller.addView(view_2) + + assert controller.getView("test_1") == view_1 + assert controller.getView("test_2") == view_2 + assert controller.getView("NOPE") is None + + +def test_setActiveView(application): + controller = Controller(application) + view_1 = View() + view_1.setPluginId("test_1") + view_2 = View() + view_2.setPluginId("test_2") + + controller.addView(view_1) + controller.addView(view_2) + controller.activeViewChanged.emit = MagicMock() + + # Attempting to set the view to a non existing one shouldn't do anything + controller.setActiveView("blorp") + assert controller.activeViewChanged.emit.call_count == 0 + + view_1.event = MagicMock() + controller.setActiveView("test_1") + assert controller.activeViewChanged.emit.call_count == 1 + assert controller.getActiveView() == view_1 + # Ensure that the view gets notified that it was activated. + assert view_1.event.call_args_list[0][0][0].type == Event.ViewActivateEvent + + controller.setActiveView("test_2") + assert controller.getActiveView() == view_2 + assert controller.activeViewChanged.emit.call_count == 2 + # Ensure that the view was notified that it got deactivated again + assert view_1.event.call_args_list[1][0][0].type == Event.ViewDeactivateEvent + + +def test_addRemoveInputDevice(application): + controller = Controller(application) + + input_device = InputDevice() + input_device.setPluginId("input_device") + + controller.addInputDevice(input_device) + controller.addInputDevice(input_device) # Doing it twice shouldn't cause issues. + + assert controller.getInputDevice("input_device") == input_device + assert controller.getInputDevice("OMGZOMG") is None # This device isn't added + + controller.removeInputDevice("input_device") + assert controller.getInputDevice("input_device") is None + + controller.removeInputDevice("input_device") #Removing it again shouldn't cause issues. + + +def test_setCameraTool(application): + controller = Controller(application) + + camera_tool = Tool() + camera_tool.setPluginId("camera_tool") + + controller.addTool(camera_tool) + + controller.setCameraTool(camera_tool) + assert controller.getCameraTool() == camera_tool + + controller.setCameraTool("") + assert controller.getCameraTool() is None + + controller.setCameraTool("camera_tool") + assert controller.getCameraTool() == camera_tool + + +def test_getSetToolsEnabled(application): + controller = Controller(application) + + controller.setToolsEnabled(True) + assert controller.getToolsEnabled() + + controller.setToolsEnabled(False) + assert not controller.getToolsEnabled() + +def test_addStage(application): + controller = Controller(application) + stage_1 = Stage() + stage_1.setPluginId("test_1") + + stage_2 = Stage() + stage_2.setPluginId("test_1") + controller.stagesChanged.emit = MagicMock() + + controller.addStage(stage_1) + assert controller.stagesChanged.emit.call_count == 1 + assert controller.getAllStages() == {"test_1": stage_1} + + # Adding it again shouldn't influence anything + controller.addStage(stage_1) + assert controller.stagesChanged.emit.call_count == 1 + assert controller.getAllStages() == {"test_1": stage_1} + + # Adding a different stage (but with the same ID) should also not do anything! + controller.addStage(stage_2) + assert controller.stagesChanged.emit.call_count == 1 + assert controller.getAllStages() == {"test_1": stage_1} + + +def test_setActiveStage(application): + controller = Controller(application) + controller.activeStageChanged.emit = MagicMock() + + stage_1 = Stage() + stage_1.setPluginId("test_1") + stage_1.onStageSelected = MagicMock() + stage_1.onStageDeselected = MagicMock() + + stage_2 = Stage() + stage_2.setPluginId("test_2") + controller.addStage(stage_1) + controller.addStage(stage_2) + + # Attempting to set the stage to a non existing one shouldn't do anything + controller.setActiveStage("blorp") + assert controller.activeStageChanged.emit.call_count == 0 + + # Changing it from no state to an added state should work. + controller.setActiveStage("test_1") + assert controller.getActiveStage() == stage_1 + stage_1.onStageSelected.assert_called_once_with() + + # Attempting to change to a stage that doesn't exist shouldn't do anything. + controller.setActiveStage("blorp") + assert controller.getActiveStage() == stage_1 + stage_1.onStageSelected.assert_called_once_with() + stage_1.onStageDeselected.assert_not_called() + + # Changing to the already active stage should also not do anything. + controller.setActiveStage("test_1") + assert controller.getActiveStage() == stage_1 + stage_1.onStageSelected.assert_called_once_with() + stage_1.onStageDeselected.assert_not_called() + + + # Actually changing it to a stage that is added and not active should have an effect + controller.setActiveStage("test_2") + stage_1.onStageDeselected.assert_called_with() + assert controller.getActiveStage() == stage_2 + + +def test_getStage(application): + controller = Controller(application) + stage_1 = Stage() + stage_1.setPluginId("test_1") + stage_2 = Stage() + stage_2.setPluginId("test_2") + + controller.addStage(stage_1) + controller.addStage(stage_2) + + assert controller.getStage("test_1") == stage_1 + assert controller.getStage("test_2") == stage_2 + assert controller.getStage("NOPE") is None + + +def test_toolOperations(application): + controller = Controller(application) + controller.toolOperationStarted.emit = MagicMock() + controller.toolOperationStopped.emit = MagicMock() + test_tool_1 = Tool() + test_tool_1.setPluginId("test_tool_1") + + controller.addTool(test_tool_1) + # The tool starts an operation + test_tool_1.operationStarted.emit(test_tool_1) + + controller.toolOperationStarted.emit.assert_called_with(test_tool_1) + assert controller.isToolOperationActive() + + # The tool stops doing something + test_tool_1.operationStopped.emit(test_tool_1) + controller.toolOperationStopped.emit.assert_called_with(test_tool_1) + assert not controller.isToolOperationActive() + + +def test_addTools(application): + controller = Controller(application) + + # Switch out the emits with a mock. + controller.toolsChanged.emit = MagicMock() + controller.activeToolChanged.emit = MagicMock() + + test_tool_1 = Tool() + test_tool_1.setPluginId("test_tool_1") + test_tool_1.event = MagicMock() + test_tool_2 = Tool() + test_tool_2.setPluginId("test_tool_2") + + controller.addTool(test_tool_1) + assert controller.toolsChanged.emit.call_count == 1 + + controller.addTool(test_tool_2) + assert controller.toolsChanged.emit.call_count == 2 + + controller.addTool(test_tool_1) + assert controller.toolsChanged.emit.call_count == 2 + assert len(controller.getAllTools()) == 2 + + # Set active tool with an unknown name. + controller.setActiveTool("nope nope!") + assert controller.getActiveTool() is None + assert controller.activeToolChanged.emit.call_count == 0 + + # Set active tool by reference + controller.setActiveTool(test_tool_1) + assert controller.getActiveTool() == test_tool_1 + assert controller.activeToolChanged.emit.call_count == 1 + # Check if the tool got notified that it's not active. + assert test_tool_1.event.call_args_list[0][0][0].type == Event.ToolActivateEvent + + # Set active tool by ID, but the same as is already active. + controller.setActiveTool("test_tool_1") + assert controller.getActiveTool() == test_tool_1 + assert controller.activeToolChanged.emit.call_count == 1 + + # Set active tool by ID + controller.setActiveTool("test_tool_2") + assert controller.getActiveTool() == test_tool_2 + assert controller.activeToolChanged.emit.call_count == 2 + # Check if the tool got notified that it's no longer active. + assert test_tool_1.event.call_args_list[1][0][0].type == Event.ToolDeactivateEvent + + assert controller.getTool("ZOMG") is None + assert controller.getTool("test_tool_1") == test_tool_1 + assert controller.getTool("test_tool_2") == test_tool_2 + + +def test_eventHandling(application): + controller = Controller(application) + + selection_tool = Tool() + selection_tool.setPluginId("selection_tool") + selection_tool.event = MagicMock(return_value = True) + + camera_tool = Tool() + camera_tool.setPluginId("camera_tool") + camera_tool.event = MagicMock(return_value=True) + + random_tool = Tool() + random_tool.setPluginId("random_tool") + random_tool.event = MagicMock(return_value=True) + + event = Event(1) + + + controller.setCameraTool(camera_tool) + controller.event(event) + # Only the camera tool should be called now. + camera_tool.event.assert_called_once_with(event) + + controller.setActiveTool(random_tool) + random_tool.event.reset_mock() # We don't care about activation events. + controller.event(event) + # The camera tool should not get an extra call + camera_tool.event.assert_called_once_with(event) + # But the active tool should have gotten one + random_tool.event.assert_called_once_with(event) + + controller.setSelectionTool(selection_tool) + controller.event(event) + # The camera tool should not get an extra call + camera_tool.event.assert_called_once_with(event) + # The active tool should not get an extra call + random_tool.event.assert_called_once_with(event) + # But the selection tool should have gotten one + selection_tool.event.assert_called_once_with(event) + + +def test_setSelectionTool(application): + controller = Controller(application) + controller.getTool = MagicMock() + + controller.setSelectionTool("beep") + + controller.getTool.assert_called_once_with("beep") + + +def test_deleteAllNodesWithMeshData(application): + controller = Controller(application) + + node_1 = SceneNode() + node_1.setMeshData(MeshData()) + node_1.setSelectable(True) + + node_2 = SceneNode() + + node_3 = SceneNode() + node_3.setMeshData(MeshData()) + + controller.getScene().getRoot().addChild(node_1) + controller.getScene().getRoot().addChild(node_2) + controller.getScene().getRoot().addChild(node_3) + + controller.deleteAllNodesWithMeshData() + + children = controller.getScene().getRoot().getAllChildren() + assert node_1 not in children # Should be removed because it's selectable and has a mesh. + assert node_2 in children # Has no mesh. + assert node_3 in children # Has a mesh, but isn't selectable. + + +def test_deleteAllNodesWithMeshData_toolsDisabled(application): + controller = Controller(application) + + node_1 = SceneNode() + node_1.setMeshData(MeshData()) + node_1.setSelectable(True) + + controller.getScene().getRoot().addChild(node_1) + controller.getToolsEnabled = MagicMock(return_value = False) + + controller.deleteAllNodesWithMeshData() + + children = controller.getScene().getRoot().getAllChildren() + assert node_1 in children # Should still be in there, because the tools are not active. diff -Nru uranium-3.3.0/tests/TestDecorators.py uranium-4.4.1/tests/TestDecorators.py --- uranium-3.3.0/tests/TestDecorators.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/tests/TestDecorators.py 2019-11-19 10:50:46.000000000 +0000 @@ -1,10 +1,9 @@ -# Copyright (c) 2016 Ultimaker B.V. +# Copyright (c) 2019 Ultimaker B.V. # Uranium is released under the terms of the LGPLv3 or higher. import pytest from UM.Decorators import interface -from UM.Signal import Signal, signalemitter def test_interface(): def declare_interface(): diff -Nru uranium-3.3.0/tests/TestDepthFirstDecorator.py uranium-4.4.1/tests/TestDepthFirstDecorator.py --- uranium-3.3.0/tests/TestDepthFirstDecorator.py 1970-01-01 00:00:00.000000000 +0000 +++ uranium-4.4.1/tests/TestDepthFirstDecorator.py 2019-11-19 10:50:46.000000000 +0000 @@ -0,0 +1,24 @@ +from UM.Scene.Iterator.DepthFirstIterator import DepthFirstIterator +from UM.Scene.SceneNode import SceneNode + + +def test_DepthFirstIterator(): + + root_node = SceneNode() + + node_1 = SceneNode() + root_node.addChild(node_1) + + node_1_child_1 = SceneNode() + node_1_child_2 = SceneNode() + + node_1.addChild(node_1_child_1) + node_1.addChild(node_1_child_2) + + node_2 = SceneNode() + root_node.addChild(node_2) + + node_2_child_1 = SceneNode() + node_2.addChild(node_2_child_1) + + assert list(DepthFirstIterator(root_node)) == [root_node, node_1, node_2, node_1_child_1, node_1_child_2, node_2_child_1] \ No newline at end of file diff -Nru uranium-3.3.0/tests/TestDictionary.py uranium-4.4.1/tests/TestDictionary.py --- uranium-3.3.0/tests/TestDictionary.py 1970-01-01 00:00:00.000000000 +0000 +++ uranium-4.4.1/tests/TestDictionary.py 2019-11-19 10:50:46.000000000 +0000 @@ -0,0 +1,11 @@ +import pytest +import UM.Dictionary + + +def test_findKey(): + test_dict = {"omg": "zomg", "beep": "meep"} + assert UM.Dictionary.findKey(test_dict, "zomg") == "omg" + assert UM.Dictionary.findKey(test_dict, "meep") == "beep" + + with pytest.raises(ValueError): + UM.Dictionary.findKey(test_dict, "Nope") diff -Nru uranium-3.3.0/tests/TestDuration.py uranium-4.4.1/tests/TestDuration.py --- uranium-3.3.0/tests/TestDuration.py 1970-01-01 00:00:00.000000000 +0000 +++ uranium-4.4.1/tests/TestDuration.py 2019-11-19 10:50:46.000000000 +0000 @@ -0,0 +1,51 @@ +import pytest + +from UM.Qt.Duration import Duration, DurationFormat + +test_data = [ + {"total_time": 22, "seconds": 22, "minutes": 0, "hours": 0, "days": 0}, + {"total_time": 60, "seconds": 0, "minutes": 1, "hours": 0, "days": 0}, + {"total_time": 3600, "seconds": 0, "minutes": 0, "hours": 1, "days": 0}, + {"total_time": 86400, "seconds": 0, "minutes": 0, "hours": 0, "days": 1}, + {"total_time": 90061, "seconds": 1, "minutes": 1, "hours": 1, "days": 1}, +] + +@pytest.mark.parametrize("data", test_data) +def test_durationCreation(data): + duration = Duration(data["total_time"]) + assert duration.days == data["days"] + assert duration.seconds == data["seconds"] + assert duration.minutes == data["minutes"] + assert duration.hours == data["hours"] + assert int(duration) == data["total_time"] + assert duration.valid + assert not duration.isTotalDurationZero + +def test_invalidDuration(): + duration = Duration() + assert not duration.valid + + +def test_zeroDuration(): + zero_duration = Duration(0) + assert zero_duration.isTotalDurationZero + assert zero_duration.valid + + +def test_negativeDuration(): + negative_duration = Duration(-10) + assert not negative_duration.valid + + +def test_hugeDuration(): + duration = Duration(2147483648) + # Reaaaaaaly big numbers should be reset to zero because of python C++ conversion issues. + assert duration.isTotalDurationZero + + +def test_getDisplayString(): + # We only test the ones that are not depending on translations. + assert Duration(1).getDisplayString(DurationFormat.Format.Seconds) == "1" + assert Duration(1).getDisplayString(9002) == "" # Unkown format. + assert Duration(1).getDisplayString(DurationFormat.Format.ISO8601) == "00:00:01" + assert Duration(86401).getDisplayString(DurationFormat.Format.ISO8601) == "24:00:01" \ No newline at end of file diff -Nru uranium-3.3.0/tests/TestExtension.py uranium-4.4.1/tests/TestExtension.py --- uranium-3.3.0/tests/TestExtension.py 1970-01-01 00:00:00.000000000 +0000 +++ uranium-4.4.1/tests/TestExtension.py 2019-11-19 10:50:46.000000000 +0000 @@ -0,0 +1,32 @@ +from unittest.mock import MagicMock + +from UM.Extension import Extension + + +def test_activateMenuItem(): + test_extension = Extension() + mock_object = MagicMock() + mock_function = mock_object.bla + test_extension.addMenuItem("test", mock_function) + test_extension.activateMenuItem("test") + + # Check that the function was called without any attributes being passed along. + mock_function.assert_called_once_with() + + +def test_menuItemOrder(): + test_extension = Extension() + + test_extension.addMenuItem("b", MagicMock()) + test_extension.addMenuItem("a", MagicMock()) + + # Ensure that the order by which the menu items were added is the same. + assert test_extension.getMenuItemList() == ["b", "a"] + + +# Super simple test, there is no reason this should ever change, but now extension is 100% tested +def test_menuName(): + test_extension = Extension() + assert test_extension.getMenuName() is None + test_extension.setMenuName("bloop") + assert test_extension.getMenuName() == "bloop" diff -Nru uranium-3.3.0/tests/TestFileHandler.py uranium-4.4.1/tests/TestFileHandler.py --- uranium-3.3.0/tests/TestFileHandler.py 1970-01-01 00:00:00.000000000 +0000 +++ uranium-4.4.1/tests/TestFileHandler.py 2019-11-19 10:50:46.000000000 +0000 @@ -0,0 +1,76 @@ +import pytest +from unittest.mock import patch, MagicMock + +from UM.FileHandler.FileHandler import FileHandler + + +@pytest.fixture +def file_handler(application): + FileHandler._FileHandler__instance = None + with patch("UM.FileHandler.FileHandler.PluginRegistry.addType"): + handler = FileHandler(application, writer_type= "test_writer", reader_type= "test_reader") + return handler + +@pytest.fixture +def file_writer(): + mocked_writer = MagicMock() + mocked_writer.getPluginId = MagicMock(return_value="beep") + return mocked_writer + + +def test_getSupportedFileTypesRead(file_handler): + registry = MagicMock() + registry.getAllMetaData = MagicMock(return_value = [{"test_reader": [{"extension":".test"}]}]) + with patch("UM.PluginRegistry.PluginRegistry.getInstance", MagicMock(return_value = registry)): + assert file_handler.getSupportedFileTypesRead() == {".test": ".test"} + + +def test_getSupportedFileTypesWrite(file_handler): + registry = MagicMock() + registry.getAllMetaData = MagicMock(return_value=[{"id":"beep", "test_writer":{ "output": [{ "extension": ".test", "mime_type": "test/test"}] }}]) + with patch("UM.PluginRegistry.PluginRegistry.getInstance", MagicMock(return_value=registry)): + assert file_handler.getSupportedFileTypesWrite() == [{'id': 'beep', 'extension': '.test', 'description': '.test', 'mime_type': 'test/test', 'mode': 1, 'hide_in_file_dialog': False}] + + +def test_getWriterByMimeType_KnownMimeType(file_handler, file_writer): + file_handler.addWriter(file_writer) + registry = MagicMock() + registry.getAllMetaData = MagicMock(return_value=[{"id": "beep", "test_writer": {"output": [{"extension": ".test", "mime_type": "test/test"}]}}]) + with patch("UM.PluginRegistry.PluginRegistry.getInstance", MagicMock(return_value=registry)): + assert file_handler.getWriterByMimeType("test/test") == file_writer + + +def test_getWriterByMimeType_UnknownMimeType(file_handler, file_writer): + file_handler.addWriter(file_writer) + registry = MagicMock() + registry.getAllMetaData = MagicMock(return_value=[]) + with patch("UM.PluginRegistry.PluginRegistry.getInstance", MagicMock(return_value=registry)): + assert file_handler.getWriterByMimeType("test/test") is None + + +def test_getWriter_KnownWriter(file_handler, file_writer): + file_handler.addWriter(file_writer) + assert file_handler.getWriter("beep") == file_writer + + +def test_getWriter_UnknownWriter(file_handler): + # We never added a writer, so we should get None + assert file_handler.getWriter("beep") is None + + +def test_getReaderForFile(file_handler): + mocked_reader = MagicMock() + mocked_reader.acceptsFile = MagicMock(return_value = True) + file_handler.addReader(mocked_reader) + + assert file_handler.getReaderForFile("whatever") is mocked_reader + + +def test_getReaderForFileWithException(file_handler): + mocked_reader = MagicMock() + mocked_reader.acceptsFile = MagicMock(side_effect=Exception) + file_handler.addReader(mocked_reader) + + # As file readers are plugins, we ensure that any exceptions are handled and dropped so they don't crash the + # application + assert file_handler.getReaderForFile("whatever") is None diff -Nru uranium-3.3.0/tests/TestFileWriter.py uranium-4.4.1/tests/TestFileWriter.py --- uranium-3.3.0/tests/TestFileWriter.py 1970-01-01 00:00:00.000000000 +0000 +++ uranium-4.4.1/tests/TestFileWriter.py 2019-11-19 10:50:46.000000000 +0000 @@ -0,0 +1,22 @@ +from UM.FileHandler.FileWriter import FileWriter +import pytest +import io + +def test_getAddToRecentFiles(): + writer = FileWriter(add_to_recent_files = True) + assert writer.getAddToRecentFiles() + + other_writer = FileWriter(add_to_recent_files = False) + assert not other_writer.getAddToRecentFiles() + + +def test_write(): + writer = FileWriter() + with pytest.raises(Exception): + writer.write(io.StringIO(), "Some data to write") + + +def test_information(): + writer = FileWriter() + writer.setInformation("Some information about the writer") + assert writer.getInformation() == "Some information about the writer" \ No newline at end of file diff -Nru uranium-3.3.0/tests/TestListModel.py uranium-4.4.1/tests/TestListModel.py --- uranium-3.3.0/tests/TestListModel.py 1970-01-01 00:00:00.000000000 +0000 +++ uranium-4.4.1/tests/TestListModel.py 2019-11-19 10:50:46.000000000 +0000 @@ -0,0 +1,69 @@ +from unittest import TestCase + +from PyQt5.QtCore import Qt, QModelIndex + +from UM.Qt.ListModel import ListModel +from copy import deepcopy + +class TestListModel(TestCase): + + list_model = None # type: ListModel + + test_data = [{"name": "yay", "data": 12}, {"name": "omg", "data": 13}, {"name":"zomg", "data": 14}] + NameRole = Qt.UserRole + 1 + DataRole = Qt.UserRole + 2 + + def setUp(self): + self.list_model = ListModel() + self.list_model.addRoleName(self.NameRole, "name") + self.list_model.addRoleName(self.DataRole, "data") + + self.list_model.setItems(deepcopy(self.test_data)) + + def test_getItem(self): + assert self.list_model.getItem(0) == {"name": "yay", "data": 12} + assert self.list_model.getItem(9001) == {} + + def test_items(self): + assert self.list_model.items == self.test_data + + def test_insertItem(self): + self.list_model.insertItem(0, {"name": "zomg!", "data": "yay"}) + assert self.list_model.getItem(0) == {"name": "zomg!", "data": "yay"} + # Check if the previously first item is now the second one. + assert self.list_model.getItem(1) == {"name": "yay", "data": 12} + + def test_removeItem(self): + self.list_model.removeItem(1) + assert self.list_model.getItem(1) == {"name":"zomg", "data": 14} + + def test_clear(self): + assert self.list_model.count == 3 + self.list_model.clear() + assert self.list_model.count == 0 + + def test_appendItem(self): + self.list_model.appendItem({"name":"!", "data": 9001}) + assert self.list_model.count == 4 + assert self.list_model.getItem(3) == {"name":"!", "data": 9001} + + def test_setProperty(self): + self.list_model.setProperty(0, "name", "new_data") + assert self.list_model.getItem(0)["name"] == "new_data" + + def test_find(self): + assert self.list_model.find("name", "omg") == 1 + assert self.list_model.find("data", 13) == 1 + assert self.list_model.find("name", "zomg") == 2 + + assert self.list_model.find("name", "UNKNOWN") == -1 + + def test_setItems(self): + self.list_model.setItems([{"name": "zomg!", "data": "yay"}]) + assert self.list_model.items == [{"name": "zomg!", "data": "yay"}] + + def test_sort(self): + self.list_model.sort(lambda i: -i["data"]) + + assert self.list_model.getItem(0) == {"name":"zomg", "data": 14} + assert self.list_model.getItem(2) == {"name": "yay", "data": 12} \ No newline at end of file diff -Nru uranium-3.3.0/tests/TestMessage.py uranium-4.4.1/tests/TestMessage.py --- uranium-3.3.0/tests/TestMessage.py 1970-01-01 00:00:00.000000000 +0000 +++ uranium-4.4.1/tests/TestMessage.py 2019-11-19 10:50:46.000000000 +0000 @@ -0,0 +1,31 @@ +from UM.Message import Message + + +def test_addAction(): + message = Message() + message.addAction(action_id = "blarg", name = "zomg", icon = "NO ICON", description="SuperAwesomeMessage") + + assert len(message.getActions()) == 1 + + +def test_gettersAndSetters(): + message = Message(text = "OMG", title="YAY", image_caption="DERP", image_source= "HERP", option_text="FOO", option_state= False) + message.setMaxProgress(200) + assert message.getText() == "OMG" + assert message.getTitle() == "YAY" + assert message.getImageCaption() == "DERP" + assert message.getImageSource() == "HERP" + assert message.getOptionText() == "FOO" + assert message.getMaxProgress() == 200 + assert message.getOptionState() == False + + message.setTitle("whoo") + assert message.getTitle() == "whoo" + + +def test_dismissable(): + # In certain conditions the message is always set to dismissable (even if we asked for a non dimissiable message) + message = Message(lifetime=0, dismissable=False) + assert message.isDismissable() + + diff -Nru uranium-3.3.0/tests/TestOpenGLContext.py uranium-4.4.1/tests/TestOpenGLContext.py --- uranium-3.3.0/tests/TestOpenGLContext.py 1970-01-01 00:00:00.000000000 +0000 +++ uranium-4.4.1/tests/TestOpenGLContext.py 2019-11-19 10:50:46.000000000 +0000 @@ -0,0 +1,51 @@ + +import pytest +from unittest.mock import patch, mock_open, MagicMock + +from UM.View.GL.OpenGLContext import OpenGLContext + +context_without_extensions = MagicMock() +context_without_extensions.hasExtension = MagicMock(return_value = False) + +context_with_extensions = MagicMock() +context_with_extensions.hasExtension = MagicMock(return_value = True) + + +def test_setContext(): + surface_format = MagicMock() + opengl_context = MagicMock() + opengl_context.create = MagicMock(return_value = True) + with patch("UM.View.GL.OpenGLContext.QSurfaceFormat", MagicMock(return_value = surface_format)): + with patch("UM.View.GL.OpenGLContext.QOpenGLContext", MagicMock(return_value=opengl_context)): + assert OpenGLContext.setContext(1,2) == opengl_context + opengl_context.setFormat.assert_called_once_with(surface_format) + + +def test_setContext_failed(): + surface_format = MagicMock() + opengl_context = MagicMock() + opengl_context.create = MagicMock(return_value=False) + with patch("UM.View.GL.OpenGLContext.QSurfaceFormat", MagicMock(return_value=surface_format)): + with patch("UM.View.GL.OpenGLContext.QOpenGLContext", MagicMock(return_value=opengl_context)): + assert OpenGLContext.setContext(1, 2) is None + + +@pytest.mark.parametrize("context, major_version, minor_version, result", [(context_with_extensions, 4, 1, True), + (context_with_extensions, 5, 0, True), + (context_with_extensions, 3, 0, True), + (context_without_extensions, 3, 0, False), + (context_without_extensions, 4, 1, True)]) +def test_supportsVertexArrayObjects(context, major_version, minor_version, result): + OpenGLContext.major_version = major_version + OpenGLContext.minor_version = major_version + assert OpenGLContext.supportsVertexArrayObjects(context) == result + + +@pytest.mark.parametrize("major_version, minor_version, result", [(3, 9009, True), + (4, 0, True), + (4, 1, False), + (5, 2, False)]) +def test_isLegacyOpenGl(major_version, minor_version, result): + OpenGLContext.major_version = major_version + OpenGLContext.minor_version = minor_version + assert OpenGLContext.isLegacyOpenGL() == result diff -Nru uranium-3.3.0/tests/TestOutputDeviceManager.py uranium-4.4.1/tests/TestOutputDeviceManager.py --- uranium-3.3.0/tests/TestOutputDeviceManager.py 1970-01-01 00:00:00.000000000 +0000 +++ uranium-4.4.1/tests/TestOutputDeviceManager.py 2019-11-19 10:50:46.000000000 +0000 @@ -0,0 +1,94 @@ +from unittest.mock import MagicMock + +from UM.OutputDevice.OutputDevice import OutputDevice +from UM.OutputDevice.OutputDeviceManager import OutputDeviceManager +from UM.OutputDevice.OutputDevicePlugin import OutputDevicePlugin + + +def test_addRemoveOutputDevice(): + manager = OutputDeviceManager() + + manager.outputDevicesChanged.emit = MagicMock() + manager.activeDeviceChanged.emit = MagicMock() + + output_device = OutputDevice("test_device_one") + output_device.setPriority(2) + output_device_2 = OutputDevice("test_device_two") + output_device_2.setPriority(9001) + + manager.addOutputDevice(output_device) + assert manager.outputDevicesChanged.emit.call_count == 1 + assert manager.getOutputDevice("test_device_one") == output_device + + # Our new device is also the one with the highest priority (as it's the only one). So it should be active. + assert manager.getActiveDevice() == output_device + + manager.addOutputDevice(output_device) + assert manager.outputDevicesChanged.emit.call_count == 1 + + manager.addOutputDevice(output_device_2) + assert manager.outputDevicesChanged.emit.call_count == 2 + # We added a new device with a higher priority, so that one should be the active one + assert manager.getActiveDevice() == output_device_2 + + assert set([output_device, output_device_2]) == set(manager.getOutputDevices()) + assert set(["test_device_one", "test_device_two"]) == set(manager.getOutputDeviceIds()) + + # Try to manually change the active device a few times + manager.setActiveDevice("test_device_one") + assert manager.activeDeviceChanged.emit.call_count == 3 + assert manager.getActiveDevice() == output_device + manager.setActiveDevice("test_device_two") + assert manager.activeDeviceChanged.emit.call_count == 4 + assert manager.getActiveDevice() == output_device_2 + + # As usual, doing it twice shouldn't cause more updates + manager.setActiveDevice("test_device_two") + assert manager.activeDeviceChanged.emit.call_count == 4 + manager.setActiveDevice("Whatever") # Simply shouldn't cause issues. + + # Time to remove the device again + assert manager.removeOutputDevice("test_device_two") + assert manager.getActiveDevice() == output_device + assert manager.outputDevicesChanged.emit.call_count == 3 + # Trying to remove it again should return false + assert not manager.removeOutputDevice("test_device_two") + assert manager.outputDevicesChanged.emit.call_count == 3 + + +def test_addRemoveOutputDevicePlugin(): + manager = OutputDeviceManager() + plugin_1 = OutputDevicePlugin() + plugin_1.setPluginId("plugin_one") + + plugin_1.start = MagicMock() + plugin_1.stop = MagicMock() + + manager.addOutputDevicePlugin(plugin_1) + assert manager.getOutputDevicePlugin("plugin_one") == plugin_1 + # Outputdevice manager wasn't started, so the start of the plugin should not be called + assert plugin_1.start.call_count == 0 + + # So once we do, it should be called. + manager.start() + assert plugin_1.start.call_count == 1 + + # Adding it again shouldn't cause the start to be called again! + manager.addOutputDevicePlugin(plugin_1) + assert plugin_1.start.call_count == 1 + + manager.removeOutputDevicePlugin("plugin_one") + assert manager.getOutputDevicePlugin("plugin_one") is None + assert plugin_1.start.call_count == 1 + + # And removing it again shouldn't cause issues. + manager.removeOutputDevicePlugin("plugin_two") + assert plugin_1.start.call_count == 1 + + # As the default output device plugin is an interface, the start and stop will raise exceptions. + # but the outputdevice manager should be robust against that, so even in that case it shouldn't fail! + plugin_2 = OutputDevicePlugin() + plugin_2.setPluginId("plugin_two") + manager.addOutputDevicePlugin(plugin_2) + manager.removeOutputDevicePlugin("plugin_two") + diff -Nru uranium-3.3.0/tests/TestOutputDevice.py uranium-4.4.1/tests/TestOutputDevice.py --- uranium-3.3.0/tests/TestOutputDevice.py 1970-01-01 00:00:00.000000000 +0000 +++ uranium-4.4.1/tests/TestOutputDevice.py 2019-11-19 10:50:46.000000000 +0000 @@ -0,0 +1,38 @@ +from unittest.mock import MagicMock + +import pytest + +from UM.OutputDevice.OutputDevice import OutputDevice + +test_validate_data = [ + {"attribute": "IconName", "value": "blarg"}, + {"attribute": "ShortDescription", "value": "omg"}, + {"attribute": "Name", "value": "SHeWhoShallNotBeNamed"}, + {"attribute": "Description", "value": "OH NOES!"}, + {"attribute": "Priority", "value": 12} +] + + +def test_createOutputDevice(): + output_device = OutputDevice("Random_id") + assert output_device.getId() == "Random_id" + + +@pytest.mark.parametrize("data", test_validate_data) +def test_getAndSet(data): + output_device = OutputDevice("Random_id") + + output_device.metaDataChanged = MagicMock() + # Attempt to set the value + getattr(output_device, "set" + data["attribute"])(data["value"]) + + # Ensure that the value got set + assert getattr(output_device, "get" + data["attribute"])() == data["value"] + + # Check if signal fired. + assert output_device.metaDataChanged.emit.call_count == 1 + + # Attempt to set the setter to the same value again. + getattr(output_device, "set" + data["attribute"])(data["value"]) + # Ensure signal fired only once! + assert output_device.metaDataChanged.emit.call_count == 1 diff -Nru uranium-3.3.0/tests/TestPackageManager.py uranium-4.4.1/tests/TestPackageManager.py --- uranium-3.3.0/tests/TestPackageManager.py 1970-01-01 00:00:00.000000000 +0000 +++ uranium-4.4.1/tests/TestPackageManager.py 2019-11-19 10:50:46.000000000 +0000 @@ -0,0 +1,206 @@ +# Copyright (c) 2018 Ultimaker B.V. +# Uranium is released under the terms of the LGPLv3 or higher. +import os +import pytest +import unittest.mock +from unittest.mock import MagicMock, patch + +from UM.PackageManager import PackageManager +from UM.Version import Version + +test_package_path = os.path.abspath(os.path.dirname(os.path.abspath(__file__)) + "/UnitTestPackage.package") + + + +@unittest.mock.patch.object(PackageManager, "__init__", lambda *args, **kwargs: None) +def test_comparePackageVersions(): + test_cases = [ + # same versions + {"info_dict1": {"sdk_version": "1", + "package_version": "1.0"}, + "info_dict2": {"sdk_version": "1", + "package_version": "1.0"}, + "expected_result": 0}, + + # same package versions, different sdk versions + {"info_dict1": {"sdk_version": "1", + "package_version": "1.0"}, + "info_dict2": {"sdk_version": "3", + "package_version": "1.0"}, + "expected_result": -1}, + + # different package versions, same sdk versions + {"info_dict1": {"sdk_version": "1", + "package_version": "3.0"}, + "info_dict2": {"sdk_version": "1", + "package_version": "1.0"}, + "expected_result": 1}, + + # different package versions, different sdk versions #1 + {"info_dict1": {"sdk_version": "1", + "package_version": "3.0"}, + "info_dict2": {"sdk_version": "3", + "package_version": "1.0"}, + "expected_result": -1}, + + # different package versions, different sdk versions #2 + {"info_dict1": {"sdk_version": "7", + "package_version": "3.0"}, + "info_dict2": {"sdk_version": "3", + "package_version": "6.0"}, + "expected_result": -1}, + ] + + package_manager = PackageManager() + for test_case_dict in test_cases: + info_dict1 = test_case_dict["info_dict1"] + info_dict2 = test_case_dict["info_dict2"] + expected_result = test_case_dict["expected_result"] + + assert expected_result == package_manager._comparePackageVersions(info_dict1, info_dict2) + + +def test_getLicence(): + manager = PackageManager(MagicMock()) + assert manager.getPackageLicense(test_package_path) == "Do whatever you want with this.\n" + + +def test_installAndRemovePackage(): + mock_application = MagicMock() + mock_registry = MagicMock() + mock_registry.isActivePlugin = MagicMock(return_value = False) + mock_application.getPluginRegistry = MagicMock(return_value = mock_registry) + manager = PackageManager(mock_application) + manager.installedPackagesChanged = MagicMock() + manager.installPackage(test_package_path) + assert manager.installedPackagesChanged.emit.call_count == 1 + assert manager.isPackageInstalled("UnitTestPackage") + + info = manager.getInstalledPackageInfo("UnitTestPackage") + assert info["author"]["author_id"] == "nallath" + assert info["display_name"] == "UnitTestPackage" + + # We don't want the package to be purged. We need that package for the other tests! + with patch("os.remove", MagicMock()): + manager._installPackage({"package_info": info, "filename": test_package_path}) + + assert "UnitTestPackage" in manager.getAllInstalledPackageIDs() + assert manager.isUserInstalledPackage("UnitTestPackage") + assert manager.getAllInstalledPackagesInfo()["plugin"][0]["display_name"] == "UnitTestPackage" + manager.initialize() + # Now to remove the package again! + manager.removePackage("UnitTestPackage") + assert manager.installedPackagesChanged.emit.call_count == 2 + + +def test_getPackageInfo(): + manager = PackageManager(MagicMock()) + info = manager.getPackageInfo(test_package_path) + + assert info["author"]["author_id"] == "nallath" + assert info["display_name"] == "UnitTestPackage" + + +def test_emptyInit(): + manager = PackageManager(MagicMock()) + + assert not manager.getAllInstalledPackageIDs() + assert not manager.getAllInstalledPackagesInfo() + + manager.installedPackagesChanged = MagicMock() + manager.removePackage("packageThatDoesNotExist") + assert manager.installedPackagesChanged.emit.call_count == 0 + + assert manager.getBundledPackageInfo("packageThatDoesNotExist") is None + + with pytest.raises(FileNotFoundError): + assert manager.getPackageLicense("FileThatDoesntExist.package") == {} + + assert manager.getPackageFiles("packageThatDoesNotExist") == [] + + assert manager.getPackageContainerIds("packageThatDoesNotExist") == [] + + +class TestAddAvailablePackageVersion: + def test_addNewVersionThatCanUpdate(self): + manager = PackageManager(MagicMock()) + manager.checkIfPackageCanUpdate = MagicMock(return_value = True) + manager.addAvailablePackageVersion("beep", Version("1.0.0")) + + assert manager.packagesWithUpdate == {"beep"} + + def test_addNewVersionThatCantUpdate(self): + manager = PackageManager(MagicMock()) + manager.checkIfPackageCanUpdate = MagicMock(return_value=False) + manager.addAvailablePackageVersion("beep", Version("1.0.0")) + + assert manager.packagesWithUpdate == set() + + def test_addMultipleVersions(self): + manager = PackageManager(MagicMock()) + manager.checkIfPackageCanUpdate = MagicMock(return_value=True) + manager.addAvailablePackageVersion("beep", Version("1.2.0")) + manager.addAvailablePackageVersion("beep", Version("1.0.0")) + + assert manager.packagesWithUpdate == {"beep"} + + +class TestCheckIfPackageCanUpdate: + def test_noAvailableVersions(self): + manager = PackageManager(MagicMock()) + assert manager.checkIfPackageCanUpdate("beep") is False + + def test_availableVersionNotInstalledOrBundled(self): + manager = PackageManager(MagicMock()) + manager.addAvailablePackageVersion("beep", Version("1.0.0")) + + # Even though we have a known package version, it's not installed / bundled, so we cant update + assert manager.checkIfPackageCanUpdate("beep") is False + + def test_olderVersionIsBundled(self): + manager = PackageManager(MagicMock()) + manager.addAvailablePackageVersion("beep", Version("1.0.0")) + manager._bundled_package_dict = {"beep": {"package_info": {"package_version": "0.9.0"}}} + + assert manager.checkIfPackageCanUpdate("beep") is True + + def test_newerVersionIsBundled(self): + manager = PackageManager(MagicMock()) + manager.addAvailablePackageVersion("beep", Version("1.0.0")) + manager._bundled_package_dict = {"beep": {"package_info": {"package_version": "1.9.0"}}} + + assert manager.checkIfPackageCanUpdate("beep") is False + + def test_olderVersionIsInstalled(self): + manager = PackageManager(MagicMock()) + manager.addAvailablePackageVersion("beep", Version("1.0.0")) + manager._installed_package_dict = {"beep": {"package_info": {"package_version": "0.9.0"}}} + + assert manager.checkIfPackageCanUpdate("beep") is True + + def test_newerVersionIsInstalled(self): + manager = PackageManager(MagicMock()) + manager.addAvailablePackageVersion("beep", Version("1.0.0")) + manager._installed_package_dict = {"beep": {"package_info": {"package_version": "1.9.1"}}} + + assert manager.checkIfPackageCanUpdate("beep") is False + + +def test_removeAllScheduledPackages(): + manager = PackageManager(MagicMock()) + manager._purgePackage = MagicMock() + + manager._to_remove_package_set = {"beep"} + manager._installed_package_dict = {"beep": {}} + manager._removeAllScheduledPackages() + assert manager._to_remove_package_set == set() + + +def test_removeAllScheduledPackagesWithException(): + manager = PackageManager(MagicMock()) + manager._purgePackage = MagicMock(side_effect = Exception) + manager._installed_package_dict = {"beep": {}} + manager._to_remove_package_set = {"beep"} + + manager._removeAllScheduledPackages() + assert manager._to_remove_package_set == {"beep"} \ No newline at end of file diff -Nru uranium-3.3.0/tests/TestPluginObject.py uranium-4.4.1/tests/TestPluginObject.py --- uranium-3.3.0/tests/TestPluginObject.py 1970-01-01 00:00:00.000000000 +0000 +++ uranium-4.4.1/tests/TestPluginObject.py 2019-11-19 10:50:46.000000000 +0000 @@ -0,0 +1,26 @@ +from UM.PluginObject import PluginObject +import pytest + + +def test_getId_unhappy(): + plugin = PluginObject() + with pytest.raises(ValueError): + plugin.getPluginId() # We didn't set an id yet. + + +def test_getVersion_unhappy(): + plugin = PluginObject() + with pytest.raises(ValueError): + plugin.getVersion() # We didn't set a version yet. + + +def test_getVersion_happy(): + plugin = PluginObject() + plugin.setVersion("12.0.0") + assert plugin.getVersion() == "12.0.0" + + +def test_getId_happy(): + plugin = PluginObject() + plugin.setPluginId("UltiBot") + assert plugin.getPluginId() == "UltiBot" \ No newline at end of file diff -Nru uranium-3.3.0/tests/TestPreferences.py uranium-4.4.1/tests/TestPreferences.py --- uranium-3.3.0/tests/TestPreferences.py 1970-01-01 00:00:00.000000000 +0000 +++ uranium-4.4.1/tests/TestPreferences.py 2019-11-19 10:50:46.000000000 +0000 @@ -0,0 +1,115 @@ +from unittest.mock import MagicMock +import os +from io import StringIO +from UM.Preferences import Preferences +import pytest +from UM.Resources import Resources + +Resources.addSearchPath(os.path.dirname(os.path.abspath(__file__))) + + +test_Preference_data = [ + {"key": "test/zomg", "default": 10}, + {"key": "test/BLORP", "default": "True"}, + {"key": "testing/BLORP", "default": "False"}, + {"key": "testing/omgzomg", "default": dict()} +] + +test_newValues_data = [None, 10, "omgzomg", -20, 12.1, 2j, {"test", "more_test"}, [10, 20, 30], "True", "true", dict()] + + +# Preferences parses "True" to True and "False" to False +def parseValue(value): + if value == "True": + return True + elif value == "False": + return False + else: + return value + + +def test_readWrite(): + preferences = Preferences() + path = Resources.getPath(Resources.Preferences, "preferences_test.cfg") + preferences.readFromFile(path) + + # Check if it has been loaded correctly + assert preferences.getValue("general/foo") == "omgzomg" + assert preferences.getValue("general/derp") == True + + # Write contents of the preference to a buffer + in_memory_storage = StringIO() + preferences.writeToFile(in_memory_storage) # type: ignore + + new_preferences = Preferences() + # For some reason, if write was used, the read doesn't work. If we do it like this, it does work. + new_preferences.readFromFile(StringIO(in_memory_storage.getvalue())) + + assert preferences.getValue("general/foo") == new_preferences.getValue("general/foo") + assert preferences.getValue("test/more_test") == new_preferences.getValue("test/more_test") + + +def test_deserialize(): + preferences = Preferences() + path = Resources.getPath(Resources.Preferences, "preferences_test.cfg") + + with open(path, "r", encoding="utf-8") as f: + preferences.deserialize(f.read()) + assert preferences.getValue("general/foo") == "omgzomg" + assert preferences.getValue("general/derp") == True + + +def test_malformattedKey(): + preferences = Preferences() + with pytest.raises(Exception): + preferences.addPreference("DERP", "DERP") + + +@pytest.mark.parametrize("preference", test_Preference_data) +def test_addPreference(preference): + preferences = Preferences() + preferences.addPreference(preference["key"], preference["default"]) + assert preferences.getValue(preference["key"]) == parseValue(preference["default"]) + + # Attempt to add the preference again, but with a different default. + preferences.addPreference(preference["key"], preference["key"]) + assert preferences.getValue(preference["key"]) == parseValue(preference["key"]) + + +@pytest.mark.parametrize("preference", test_Preference_data) +def test_removePreference(preference): + preferences = Preferences() + preferences.addPreference(preference["key"], preference["default"]) + preferences.removePreference(preference["key"]) + assert preferences.getValue(preference["key"]) is None + + +@pytest.mark.parametrize("new_value", test_newValues_data) +def test_setResetValue(new_value): + preferences = Preferences() + default_value = "omgzomg" + preferences.preferenceChanged.emit = MagicMock() + preferences.addPreference("test/test", default_value) + assert preferences.preferenceChanged.emit.call_count == 0 + preferences.setValue("test/test", new_value) + assert preferences.getValue("test/test") == parseValue(new_value) + + if new_value != default_value: + assert preferences.preferenceChanged.emit.call_count == 1 + + preferences.resetPreference("test/test") + if new_value != default_value: + assert preferences.preferenceChanged.emit.call_count == 2 + else: + # The preference never changed. Neither the set or the reset should trigger an emit. + assert preferences.preferenceChanged.emit.call_count == 0 + + assert preferences.getValue("test/test") == default_value + + +def test_nonExistingSetting(): + preferences = Preferences() + # Test that attempting to modify a non existing setting in any way doesn't break things. + preferences.setDefault("nonExistingPreference", "whatever") + preferences.setValue("nonExistingPreference", "whatever") + preferences.removePreference("nonExistingPreference") \ No newline at end of file diff -Nru uranium-3.3.0/tests/TestQtRenderer.py uranium-4.4.1/tests/TestQtRenderer.py --- uranium-3.3.0/tests/TestQtRenderer.py 1970-01-01 00:00:00.000000000 +0000 +++ uranium-4.4.1/tests/TestQtRenderer.py 2019-11-19 10:50:46.000000000 +0000 @@ -0,0 +1,21 @@ +from unittest.mock import MagicMock + +from UM.Qt.QtRenderer import QtRenderer + + +def test_getAndSetViewportSize(): + renderer = QtRenderer() + mocked_render_pass = MagicMock() + renderer.addRenderPass(mocked_render_pass) + renderer.setViewportSize(100, 200) + mocked_render_pass.setSize.assert_called_with(100, 200) + + assert renderer.getViewportWidth() == 100 + assert renderer.getViewportHeight() == 200 + + +def test_getAndSetWindowSize(): + renderer = QtRenderer() + renderer.setWindowSize(300, 400) + assert (300, 400) == renderer.getWindowSize() + diff -Nru uranium-3.3.0/tests/TestRenderBatch.py uranium-4.4.1/tests/TestRenderBatch.py --- uranium-3.3.0/tests/TestRenderBatch.py 1970-01-01 00:00:00.000000000 +0000 +++ uranium-4.4.1/tests/TestRenderBatch.py 2019-11-19 10:50:46.000000000 +0000 @@ -0,0 +1,93 @@ +from unittest.mock import MagicMock, patch + +import pytest + +from UM.Math.Color import Color +from UM.Math.Matrix import Matrix +from UM.Mesh.MeshBuilder import MeshBuilder +from UM.Mesh.MeshData import MeshData +from UM.View.RenderBatch import RenderBatch + + +test_addItem_data = [ + {"item": {"transformation": Matrix(), "mesh": MeshData()}, "should_add": True}, + {"item": {"transformation": None, "mesh": MeshData()}, "should_add": False}, + {"item": {"transformation": None, "mesh": None}, "should_add": False}, + {"item": {"transformation": Matrix(), "mesh": None}, "should_add": False}, + {"item": {"transformation": Matrix(), "mesh": MeshData(), "uniforms": {}}, "should_add": True}, +] + + +test_compare_data = [ + {"item1": {}, "item2": {"sort": 1}}, + {"item1": {}, "item2": {"sort": 1}}, + {"item1": {"type": RenderBatch.RenderType.Solid, "sort": 0}, "item2": {"sort": 20, "type":RenderBatch.RenderType.NoType}}, # Solid trumps notype, even if sort is higher + {"item1": {"type": RenderBatch.RenderType.Transparent, "sort": 0}, "item2": {"sort": 20, "type":RenderBatch.RenderType.NoType}} +] + + +def test_createRenderBatch(): + mocked_shader = MagicMock() + with patch("UM.View.GL.OpenGL.OpenGL.getInstance"): + render_batch = RenderBatch(mocked_shader) + + + # Ensure that the proper defaults are set. + assert render_batch.renderType == RenderBatch.RenderType.Solid + assert render_batch.renderMode == RenderBatch.RenderMode.Triangles + assert render_batch.shader == mocked_shader + assert not render_batch.backfaceCull + assert render_batch.renderRange is None + assert render_batch.items == [] + + +@pytest.mark.parametrize("data", test_addItem_data) +def test_addItem(data): + mocked_shader = MagicMock() + with patch("UM.View.GL.OpenGL.OpenGL.getInstance"): + render_batch = RenderBatch(mocked_shader) + + render_batch.addItem(**data["item"]) + + if data["should_add"]: + assert len(render_batch.items) != 0 + + +@pytest.mark.parametrize("data", test_compare_data) +def test_compare(data): + mocked_shader = MagicMock() + with patch("UM.View.GL.OpenGL.OpenGL.getInstance"): + render_batch_1 = RenderBatch(mocked_shader, **data["item1"]) + render_batch_2 = RenderBatch(mocked_shader, **data["item2"]) + assert render_batch_1 < render_batch_2 + + +def test_render(): + mocked_shader = MagicMock() + with patch("UM.View.GL.OpenGL.OpenGL.getInstance"): + render_batch = RenderBatch(mocked_shader) + + # Render without a camera shouldn't cause any effect. + render_batch.render(None) + assert mocked_shader.bind.call_count == 0 + + # Rendering with a camera should cause the shader to be bound and released (even if the batch is empty) + mocked_camera = MagicMock() + mocked_camera.getWorldTransformation = MagicMock(return_value = Matrix()) + mocked_camera.getViewProjectionMatrix = MagicMock(return_value=Matrix()) + with patch("UM.View.GL.OpenGLContext.OpenGLContext.properties"): + render_batch.render(mocked_camera) + assert mocked_shader.bind.call_count == 1 + assert mocked_shader.release.call_count == 1 + + # Actualy render with an item in the batch + mb = MeshBuilder() + mb.addPyramid(10, 10, 10, color=Color(0.0, 1.0, 0.0, 1.0)) + mb.calculateNormals() + mesh_data = mb.build() + render_batch.addItem(Matrix(), mesh_data, {}) + with patch("UM.View.GL.OpenGL.OpenGL.getInstance"): + with patch("UM.View.GL.OpenGLContext.OpenGLContext.properties"): + render_batch.render(mocked_camera) + assert mocked_shader.bind.call_count == 2 + assert mocked_shader.release.call_count == 2 \ No newline at end of file diff -Nru uranium-3.3.0/tests/TestRenderer.py uranium-4.4.1/tests/TestRenderer.py --- uranium-3.3.0/tests/TestRenderer.py 1970-01-01 00:00:00.000000000 +0000 +++ uranium-4.4.1/tests/TestRenderer.py 2019-11-19 10:50:46.000000000 +0000 @@ -0,0 +1,21 @@ +from unittest.mock import patch + +from UM.View.RenderPass import RenderPass +from UM.View.Renderer import Renderer + + +def testAddRemoveRenderPas(): + renderer = Renderer() + with patch("UM.View.GL.OpenGL.OpenGL.getInstance"): + render_pass_1 = RenderPass("test1", 1, 1) + + renderer.addRenderPass(render_pass_1) + + assert renderer.getRenderPass("test1") == render_pass_1 + assert renderer.getRenderPass("test2") is None + + assert len(renderer.getRenderPasses()) == 1 + + renderer.removeRenderPass(render_pass_1) + + assert renderer.getRenderPass("test1") is None \ No newline at end of file diff -Nru uranium-3.3.0/tests/TestResources.py uranium-4.4.1/tests/TestResources.py --- uranium-3.3.0/tests/TestResources.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/tests/TestResources.py 2019-11-19 10:50:46.000000000 +0000 @@ -3,9 +3,13 @@ import os import platform +import unittest from unittest import TestCase +from unittest.mock import patch, PropertyMock +import tempfile +import pytest -from UM.Resources import Resources +from UM.Resources import Resources, ResourceTypeError, UnsupportedStorageTypeError class TestResources(TestCase): @@ -13,19 +17,15 @@ # # getConfigStorageRootPath() tests # + @unittest.skipIf(platform.system() != "Windows", "Not on Windows") def test_getConfigStorageRootPath_Windows(self): - if platform.system() != "Windows": - self.skipTest("not on Windows") - config_root_path = Resources._getConfigStorageRootPath() expected_config_root_path = os.getenv("APPDATA") self.assertEqual(expected_config_root_path, config_root_path, "expected %s, got %s" % (expected_config_root_path, config_root_path)) + @unittest.skipIf(platform.system() != "Linux", "Not on linux") def test_getConfigStorageRootPath_Linux(self): - if platform.system() != "Linux": - self.skipTest("not on Linux") - # no XDG_CONFIG_HOME defined if "XDG_CONFIG_HOME" in os.environ: del os.environ["XDG_CONFIG_HOME"] @@ -41,29 +41,20 @@ self.assertEqual(expected_config_root_path, config_root_path, "expected %s, got %s" % (expected_config_root_path, config_root_path)) + @unittest.skipIf(platform.system() != "Darwin", "Not on mac") def test_getConfigStorageRootPath_Mac(self): - if platform.system() != "Darwin": - self.skipTest("not on mac") - config_root_path = Resources._getConfigStorageRootPath() expected_config_root_path = os.path.expanduser("~/Library/Application Support") self.assertEqual(expected_config_root_path, config_root_path, "expected %s, got %s" % (expected_config_root_path, config_root_path)) - # - # getDataStorageRootPath() tests - # + @unittest.skipIf(platform.system() != "Windows", "Not on Windows") def test_getDataStorageRootPath_Windows(self): - if platform.system() != "Windows": - self.skipTest("not on Windows") - data_root_path = Resources._getDataStorageRootPath() self.assertIsNone(data_root_path, "expected None, got %s" % data_root_path) + @unittest.skipIf(platform.system() != "Linux", "Not on linux") def test_getDataStorageRootPath_Linux(self): - if platform.system() != "Linux": - self.skipTest("not on Linux") - # no XDG_CONFIG_HOME defined if "XDG_DATA_HOME" in os.environ: del os.environ["XDG_DATA_HOME"] @@ -79,16 +70,12 @@ self.assertEqual(expected_data_root_path, data_root_path, "expected %s, got %s" % (expected_data_root_path, data_root_path)) + @unittest.skipIf(platform.system() != "Darwin", "Not on mac") def test_getDataStorageRootPath_Mac(self): - if platform.system() != "Darwin": - self.skipTest("not on mac") - data_root_path = Resources._getDataStorageRootPath() self.assertIsNone(data_root_path, "expected None, got %s" % data_root_path) - # - # getCacheStorageRootPath() tests - # + @unittest.skipIf(platform.system() != "Windows", "Not on Windows") def test_getCacheStorageRootPath_Windows(self): if platform.system() != "Windows": self.skipTest("not on Windows") @@ -98,18 +85,154 @@ self.assertEqual(expected_cache_root_path, cache_root_path, "expected %s, got %s" % (expected_cache_root_path, cache_root_path)) + @unittest.skipIf(platform.system() != "Linux", "Not on linux") def test_getCacheStorageRootPath_Linux(self): - if platform.system() != "Linux": - self.skipTest("not on Linux") - cache_root_path = Resources._getCacheStorageRootPath() expected_cache_root_path = os.path.expanduser("~/.cache") self.assertEqual(expected_cache_root_path, cache_root_path, "expected %s, got %s" % (expected_cache_root_path, cache_root_path)) + @unittest.skipIf(platform.system() != "Darwin", "Not on mac") def test_getCacheStorageRootPath_Mac(self): - if platform.system() != "Darwin": - self.skipTest("not on mac") - cache_root_path = Resources._getCacheStorageRootPath() self.assertIsNone("expected None, got %s" % cache_root_path) + + @unittest.skipIf(platform.system() != "Linux", "Not on linux") + def test_getPossibleConfigStorageRootPathList_Linux(self): + # We didn't add any paths, so it will use defaults + assert Resources._getPossibleConfigStorageRootPathList() == ['/tmp/test'] + + @unittest.skipIf(platform.system() != "Linux", "Not on linux") + def test_getPossibleDataStorageRootPathList_Linux(self): + # We didn't add any paths, so it will use defaults + assert Resources._getPossibleDataStorageRootPathList() == ['/tmp/test'] + + def test_factoryReset(self): + # FIXME: This is a temporary workaround. A proper fix should be to make the home directory configurable so a + # unique temporary directory can be used for each test and it can removed afterwards. + # HACK: Record the number of files and directories in the data storage directory before the factory reset, + # so after the reset, we can compare if there's a new ZIP file being created. Note that this will not always + # work, especially when there are multiple tests running on the same host at the same time. + original_filenames = os.listdir(os.path.dirname(Resources.getDataStoragePath())) + + Resources.factoryReset() + # Check if the data is deleted! + assert len(os.listdir(Resources.getDataStoragePath())) == 0 + + # The data folder should still be there, but it should also have created a zip with the data it deleted. + new_filenames = os.listdir(os.path.dirname(Resources.getDataStoragePath())) + assert len(new_filenames) - len(original_filenames) == 1 + + # Clean up after our ass. + folder = os.path.dirname(Resources.getDataStoragePath()) + for file in os.listdir(folder): + file_path = os.path.join(folder, file) + try: + os.unlink(file_path) + except: + pass + folder = os.path.dirname(Resources.getDataStoragePath()) + for file in os.listdir(folder): + file_path = os.path.join(folder, file) + try: + os.unlink(file_path) + except: + pass + + def test_copyLatestDirsIfPresent(self): + # Just don't fail. + Resources._copyLatestDirsIfPresent() + + @unittest.skipIf(platform.system() != "Linux", "Not on linux") + def test_getStoragePathForType_Linux(self): + with pytest.raises(ResourceTypeError): + # No types have been added, so this should break! + Resources.getAllResourcesOfType(0) + with pytest.raises(UnsupportedStorageTypeError): + # We still haven't added it, so it should fail (again) + Resources.getStoragePathForType(0) + + Resources.addStorageType(0, "/test") + assert Resources.getStoragePathForType(0) == "/test" + + def test_getAllResourcesOfType(self): + resouce_folder = tempfile.mkdtemp("test_folder_origin") + resource_file = tempfile.mkstemp(dir=str(resouce_folder)) + Resources.addStorageType(111, resouce_folder) + assert Resources.getAllResourcesOfType(111) == [resource_file[1]] + + def test_copyVersionFolder(self): + + import os + folder_to_copy = tempfile.mkdtemp("test_folder_origin") + file_to_copy = tempfile.mkstemp(dir=str(folder_to_copy)) + + folder_to_move_to = tempfile.mkdtemp("test_folder_destination") + + Resources.copyVersionFolder(str(folder_to_copy), str(folder_to_move_to) + "/target") + # We put a temp file in the folder to copy, check if it arrived there. + assert len(os.listdir(str(folder_to_move_to) + "/target")) == 1 + + # The app version is "dev", and this is considered as the latest version possible. It will upgrade from the highest + # "." directory that's available. + def test_findLatestDirInPathsDevAppVersion(self): + test_folder = tempfile.mkdtemp("test_folder") + for folder in ("whatever", "2.1", "3.4", "4.2", "5.1", "10.2", "50.7"): + os.mkdir(os.path.join(test_folder, folder)) + + with patch("UM.Resources.Resources.ApplicationVersion", new_callable = PropertyMock(return_value = "dev")): + # We should obviously find the folder that was created by means of the ApplicationVersion. + assert Resources._findLatestDirInPaths([test_folder]) == os.path.join(test_folder, "50.7") + + # Tests _findLatestDirInPaths() with a normal application version, that is a version like ".". + # In this case, it should get the highest available "." directory but no higher than the application + # version itself. + def test_findLatestDirInPathsNormalAppVersion(self): + test_folder = tempfile.mkdtemp("test_folder") + for folder in ("whatever", "2.1", "3.4", "4.2", "5.1", "10.2", "50.7"): + os.mkdir(os.path.join(test_folder, folder)) + + with patch("UM.Resources.Resources.ApplicationVersion", new_callable = PropertyMock(return_value = "4.3")): + # We should obviously find the folder that was created by means of the ApplicationVersion. + assert Resources._findLatestDirInPaths([test_folder]) == os.path.join(test_folder, "4.2") + + # In this case, our app version is 4.3, but all the available directories do not have names ".". + # _findLatestDirInPaths() should return None. + def test_findLatestDirInPathsNormalAppVersionNoValidUpgrade(self): + test_folder = tempfile.mkdtemp("test_folder") + for folder in ("whatever1", "whatever2", "foobar1", "dev", "master", "test"): + os.mkdir(os.path.join(test_folder, folder)) + + with patch("UM.Resources.Resources.ApplicationVersion", new_callable = PropertyMock(return_value = "4.3")): + # There is no folder that matches what we're looking for! + assert Resources._findLatestDirInPaths([test_folder]) is None + + # In this case, our app version is 4.3, but all there's no available directory named as ".". + # _findLatestDirInPaths() should return None. + def test_findLatestDirInPathsNormalAppVersionEmptySearchFolder(self): + test_folder = tempfile.mkdtemp("test_folder") + + with patch("UM.Resources.Resources.ApplicationVersion", new_callable = PropertyMock(return_value = "4.3")): + # There is no folder that matches what we're looking for! + assert Resources._findLatestDirInPaths([test_folder]) is None + + def test_addRemoveStorageType(self): + Resources.addStorageType(9901, "YAY") + Resources.addType(9902, "whoo") + Resources.addStorageType(100, "herpderp") + + with pytest.raises(ResourceTypeError): + # We can't add the same type again + Resources.addStorageType(9901, "nghha") + + Resources.removeType(9001) + Resources.removeType(9902) + + with pytest.raises(ResourceTypeError): + # We can't do that, since it's in the range of user types. + Resources.removeType(100) + + with pytest.raises(ResourceTypeError): + # We can't do that, since it's in the range of user types. + Resources.addType(102, "whoo") + diff -Nru uranium-3.3.0/tests/TestShaderProgram.py uranium-4.4.1/tests/TestShaderProgram.py --- uranium-3.3.0/tests/TestShaderProgram.py 1970-01-01 00:00:00.000000000 +0000 +++ uranium-4.4.1/tests/TestShaderProgram.py 2019-11-19 10:50:46.000000000 +0000 @@ -0,0 +1,97 @@ +from unittest.mock import MagicMock, call + +import pytest +from PyQt5.QtGui import QOpenGLShader + +from UM.View.GL.ShaderProgram import ShaderProgram, InvalidShaderProgramError +import os + +def test_ShaderProgramInit(): + # Creating it just shouldn't fail. + shader = ShaderProgram() + + +def test_loadEmpty(): + shader = ShaderProgram() + with pytest.raises(InvalidShaderProgramError): + shader.load(os.path.join(os.path.dirname(os.path.abspath(__file__)), "Shaders", "empty.shader")) + + +def test_loadInvalid(): + shader = ShaderProgram() + with pytest.raises(InvalidShaderProgramError): + shader.load(os.path.join(os.path.dirname(os.path.abspath(__file__)), "Shaders", "invalid.shader")) + + with pytest.raises(InvalidShaderProgramError): + shader.load(os.path.join(os.path.dirname(os.path.abspath(__file__)), "Shaders", "invalid2.shader")) + +def test_load(): + shader = ShaderProgram() + + mocked_shader_program = MagicMock() + + shader._shader_program = mocked_shader_program + shader.load(os.path.join(os.path.dirname(os.path.abspath(__file__)), "Shaders", "test.shader")) + + # It should be called 3 times, once for vertex, once for fragment and once for geometry + call_arg_list = mocked_shader_program.addShaderFromSourceCode.call_args_list + assert call(QOpenGLShader.Vertex, "vertex_code") in call_arg_list + assert call(QOpenGLShader.Fragment, "fragment_code") in call_arg_list + assert call(QOpenGLShader.Geometry, "geometry_code") in call_arg_list + + +def test_bindAndRelease(): + shader = ShaderProgram() + + mocked_shader_program = MagicMock() + shader._shader_program = mocked_shader_program + shader.bind() + assert mocked_shader_program.bind.call_count == 1 + + # Doing it without releasing in between shouldn't cause another bind. + shader.bind() + assert mocked_shader_program.bind.call_count == 1 + + shader.release() + assert mocked_shader_program.release.call_count == 1 + + shader.release() + assert mocked_shader_program.release.call_count == 1 + + # We left it unbound, so now binding should work. + shader.bind() + assert mocked_shader_program.bind.call_count == 2 + + +enable_attribute_data = [("int", 2, 3, 0x1404, 1), + ("float", 5, 9, 0x1406, 1), + ("vector2f", 2, 32, 0x1406, 2), + ("vector3f", 2000, 90, 0x1406, 3), + ("vector4f", 12, 1, 0x1406, 4)] + + +@pytest.mark.parametrize("type, offset, stride, type_result, tuple_size", enable_attribute_data) +def test_enableDisableAttribute(type, offset, stride, type_result, tuple_size): + shader = ShaderProgram() + + mocked_shader_program = MagicMock() + shader._shader_program = mocked_shader_program + + attribute_index = MagicMock() + + mocked_shader_program.attributeLocation = MagicMock(return_value = attribute_index) + + shader.enableAttribute("blorp", type, offset, stride) + + # Validate + mocked_shader_program.setAttributeBuffer.assert_called_once_with(attribute_index, type_result, offset, tuple_size, stride) + mocked_shader_program.enableAttributeArray.assert_called_once_with(attribute_index) + + # Disable it again + shader.disableAttribute("blorp") + mocked_shader_program.disableAttributeArray.assert_called_once_with(attribute_index) + + # Disable unknown attribute + shader.disableAttribute("BEEP") + mocked_shader_program.disableAttributeArray.assert_called_once_with(attribute_index) + diff -Nru uranium-3.3.0/tests/TestSignals.py uranium-4.4.1/tests/TestSignals.py --- uranium-3.3.0/tests/TestSignals.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/tests/TestSignals.py 2019-11-19 10:50:46.000000000 +0000 @@ -1,9 +1,12 @@ # Copyright (c) 2016 Ultimaker B.V. # Uranium is released under the terms of the LGPLv3 or higher. +from unittest.mock import patch, MagicMock import pytest -from UM.Signal import Signal, signalemitter +from UM import FlameProfiler +from UM.Signal import Signal, signalemitter, postponeSignals, CompressTechnique +from copy import deepcopy class SignalReceiver: def __init__(self): @@ -12,9 +15,36 @@ def getEmitCount(self): return self._emit_count - def slot(self): + def slot(self, *args, **kwargs): self._emit_count += 1 + +def test_signalWithFlameProfiler(): + with patch("UM.Signal._recordSignalNames", MagicMock(return_value = True)): + FlameProfiler.record_profile = True + test = SignalReceiver() + + signal = Signal(type=Signal.Direct) + signal.connect(test.slot) + signal.emit() + + assert test.getEmitCount() == 1 + FlameProfiler.record_profile = False + + +def test_doubleSignalWithFlameProfiler(): + FlameProfiler.record_profile = True + test = SignalReceiver() + + signal = Signal(type=Signal.Direct) + signal2 = Signal(type=Signal.Direct) + signal.connect(test.slot) + signal2.connect(signal) + signal2.emit() + assert test.getEmitCount() == 1 + FlameProfiler.record_profile = False + + def test_signal(): test = SignalReceiver() @@ -24,6 +54,96 @@ assert test.getEmitCount() == 1 +def test_postponeEmitNoCompression(): + test = SignalReceiver() + + signal = Signal(type=Signal.Direct) + signal.connect(test.slot) + with postponeSignals(signal, compress=CompressTechnique.NoCompression): + signal.emit() + assert test.getEmitCount() == 0 # as long as we're in this context, nothing should happen! + signal.emit() + assert test.getEmitCount() == 0 + assert test.getEmitCount() == 2 + + +def test_postponeEmitCompressSingle(): + test = SignalReceiver() + + signal = Signal(type=Signal.Direct) + signal.connect(test.slot) + with postponeSignals(signal, compress=CompressTechnique.CompressSingle): + signal.emit() + assert test.getEmitCount() == 0 # as long as we're in this context, nothing should happen! + signal.emit() + assert test.getEmitCount() == 0 + assert test.getEmitCount() == 1 + +def test_postponeEmitCompressPerParameterValue(): + test = SignalReceiver() + + signal = Signal(type=Signal.Direct) + signal.connect(test.slot) + with postponeSignals(signal, compress=CompressTechnique.CompressPerParameterValue): + signal.emit("ZOMG") + assert test.getEmitCount() == 0 # as long as we're in this context, nothing should happen! + signal.emit("ZOMG") + assert test.getEmitCount() == 0 + signal.emit("BEEP") + # We got 3 signal emits, but 2 of them were the same, so we end up with 2 unique emits. + assert test.getEmitCount() == 2 + + +def test_connectWhilePostponed(): + test = SignalReceiver() + + signal = Signal(type=Signal.Direct) + with postponeSignals(signal): + signal.connect(test.slot) # This won't do anything, as we're postponing at the moment! + signal.emit() + assert test.getEmitCount() == 0 # The connection was never made, so we should get 0 + + +def test_disconnectWhilePostponed(): + test = SignalReceiver() + + signal = Signal(type=Signal.Direct) + signal.connect(test.slot) + with postponeSignals(signal): + signal.disconnect(test.slot) # This won't do anything, as we're postponing at the moment! + signal.disconnectAll() # Same holds true for the disconnect all + signal.emit() + assert test.getEmitCount() == 1 # Despite attempting to disconnect, this didn't happen because of the postpone + + +def test_disconnectAll(): + test = SignalReceiver() + + signal = Signal(type=Signal.Direct) + signal.connect(test.slot) + signal.disconnectAll() + signal.emit() + assert test.getEmitCount() == 0 + + +def test_connectSelf(): + signal = Signal(type=Signal.Direct) + signal.connect(signal) + signal.emit() # If they are connected, this crashes with a max recursion depth error + + +def test_deepCopy(): + test = SignalReceiver() + + signal = Signal(type=Signal.Direct) + signal.connect(test.slot) + copied_signal = deepcopy(signal) + + copied_signal.emit() + # Even though the original signal was not called, the copied one should have the same result + assert test.getEmitCount() == 1 + + def test_signalemitter(): def declare_signalemitter(): @signalemitter diff -Nru uranium-3.3.0/tests/TestSortedListModulo.py uranium-4.4.1/tests/TestSortedListModulo.py --- uranium-3.3.0/tests/TestSortedListModulo.py 1970-01-01 00:00:00.000000000 +0000 +++ uranium-4.4.1/tests/TestSortedListModulo.py 2019-11-19 10:50:46.000000000 +0000 @@ -0,0 +1,723 @@ + + +import random +from UM.SortedList import SortedKeyList, SortedList +import pytest + +def modulo(val): + return val % 10 + +def test_init(): + slt = SortedKeyList(key=modulo) + assert slt.key == modulo + slt._check() + + slt = SortedKeyList(key=modulo) + slt._reset(10000) + assert slt._load == 10000 + slt._check() + + slt = SortedKeyList(range(10000), key=modulo) + assert all(tup[0] == tup[1] for tup in zip(slt, sorted(range(10000), key=modulo))) + + slt.clear() + assert slt._len == 0 + assert slt._maxes == [] + assert slt._lists == [] + + assert isinstance(slt, SortedList) + assert isinstance(slt, SortedKeyList) + + slt._check() + +def test_new(): + slt = SortedList(iter(range(1000)), key=modulo) + assert slt == sorted(range(1000), key=modulo) + slt._check() + + assert isinstance(slt, SortedList) + assert isinstance(slt, SortedKeyList) + assert type(slt) == SortedKeyList + + slt = SortedKeyList(iter(range(1000)), key=modulo) + assert slt == sorted(range(1000), key=modulo) + slt._check() + + assert isinstance(slt, SortedList) + assert isinstance(slt, SortedKeyList) + assert type(slt) == SortedKeyList + +def test_new_error(): + class SortedListPlus(SortedList): + pass + with pytest.raises(TypeError): + SortedListPlus(key=modulo) + +def test_key2(): + class Incomparable: + pass + a = Incomparable() + b = Incomparable() + slt = SortedKeyList(key=lambda val: 1) + slt.add(a) + slt.add(b) + assert slt == [a, b] + +def test_add(): + random.seed(0) + slt = SortedKeyList(key=modulo) + for val in range(1000): + slt.add(val) + slt._check() + + slt = SortedKeyList(key=modulo) + for val in range(1000, 0, -1): + slt.add(val) + slt._check() + + slt = SortedKeyList(key=modulo) + for val in range(1000): + slt.add(random.random()) + slt._check() + +def test_update(): + slt = SortedKeyList(key=modulo) + + slt.update(range(1000)) + assert all(tup[0] == tup[1] for tup in zip(slt, sorted(range(1000), key=modulo))) + assert len(slt) == 1000 + slt._check() + + slt.update(range(10000)) + assert len(slt) == 11000 + slt._check() + +def test_contains(): + slt = SortedKeyList(key=modulo) + slt._reset(7) + + assert 0 not in slt + + slt.update(range(100)) + + for val in range(100): + assert val in slt + + assert 100 not in slt + + slt._check() + + slt = SortedKeyList(range(100), key=modulo) + slt._reset(4) + assert all(val not in slt for val in range(100, 200)) + +def test_discard(): + slt = SortedKeyList(key=modulo) + + assert slt.discard(0) == None + assert len(slt) == 0 + slt._check() + + slt = SortedKeyList([1, 2, 2, 2, 3, 3, 5], key=modulo) + slt._reset(4) + + slt.discard(6) + slt._check() + slt.discard(4) + slt._check() + slt.discard(2) + slt._check() + slt.discard(11) + slt.discard(12) + slt.discard(13) + slt.discard(15) + + assert all(tup[0] == tup[1] for tup in zip(slt, [1, 2, 2, 3, 3, 5])) + +def test_remove(): + slt = SortedKeyList(key=modulo) + + assert slt.discard(0) == None + assert len(slt) == 0 + slt._check() + + slt = SortedKeyList([1, 2, 2, 2, 3, 3, 5], key=modulo) + slt._reset(4) + + slt.remove(2) + slt._check() + + assert all(tup[0] == tup[1] for tup in zip(slt, [1, 2, 2, 3, 3, 5])) + +def test_remove_valueerror1(): + slt = SortedKeyList(key=modulo) + with pytest.raises(ValueError): + slt.remove(0) + +def test_remove_valueerror2(): + slt = SortedKeyList(range(100), key=modulo) + slt._reset(10) + with pytest.raises(ValueError): + slt.remove(100) + +def test_remove_valueerror3(): + slt = SortedKeyList([1, 2, 2, 2, 3, 3, 5], key=modulo) + with pytest.raises(ValueError): + slt.remove(4) + +def test_remove_valueerror4(): + slt = SortedKeyList([1, 1, 1, 2, 2, 2], key=modulo) + with pytest.raises(ValueError): + slt.remove(13) + +def test_remove_valueerror5(): + slt = SortedKeyList([1, 1, 1, 2, 2, 2], key=modulo) + with pytest.raises(ValueError): + slt.remove(12) + +def test_delete(): + slt = SortedKeyList(range(20), key=modulo) + slt._reset(4) + slt._check() + for val in range(20): + slt.remove(val) + slt._check() + assert len(slt) == 0 + assert slt._maxes == [] + assert slt._lists == [] + +def test_getitem(): + random.seed(0) + slt = SortedKeyList(key=modulo) + slt._reset(17) + + slt.add(5) + slt._build_index() + slt._check() + slt.clear() + + lst = list(random.random() for rpt in range(100)) + slt.update(lst) + lst.sort(key=modulo) + + assert all(slt[idx] == lst[idx] for idx in range(100)) + assert all(slt[idx - 99] == lst[idx - 99] for idx in range(100)) + +def test_getitem_slice(): + random.seed(0) + slt = SortedKeyList(key=modulo) + slt._reset(17) + + lst = list() + + for rpt in range(100): + val = random.random() + slt.add(val) + lst.append(val) + + lst.sort(key=modulo) + + assert all(slt[start:] == lst[start:] + for start in [-75, -25, 0, 25, 75]) + + assert all(slt[:stop] == lst[:stop] + for stop in [-75, -25, 0, 25, 75]) + + assert all(slt[::step] == lst[::step] + for step in [-5, -1, 1, 5]) + + assert all(slt[start:stop] == lst[start:stop] + for start in [-75, -25, 0, 25, 75] + for stop in [-75, -25, 0, 25, 75]) + + assert all(slt[:stop:step] == lst[:stop:step] + for stop in [-75, -25, 0, 25, 75] + for step in [-5, -1, 1, 5]) + + assert all(slt[start::step] == lst[start::step] + for start in [-75, -25, 0, 25, 75] + for step in [-5, -1, 1, 5]) + + assert all(slt[start:stop:step] == lst[start:stop:step] + for start in [-75, -25, 0, 25, 75] + for stop in [-75, -25, 0, 25, 75] + for step in [-5, -1, 1, 5]) + +def test_getitem_slice_big(): + slt = SortedKeyList(range(4), key=modulo) + lst = sorted(range(4), key=modulo) + + itr = ((start, stop, step) + for start in [-6, -4, -2, 0, 2, 4, 6] + for stop in [-6, -4, -2, 0, 2, 4, 6] + for step in [-3, -2, -1, 1, 2, 3]) + + for start, stop, step in itr: + assert slt[start:stop:step] == lst[start:stop:step] + +def test_getitem_slicezero(): + slt = SortedKeyList(range(100), key=modulo) + slt._reset(17) + with pytest.raises(ValueError): + slt[::0] + +def test_getitem_indexerror1(): + slt = SortedKeyList(key=modulo) + with pytest.raises(IndexError): + slt[5] + +def test_getitem_indexerror2(): + slt = SortedKeyList(range(100), key=modulo) + with pytest.raises(IndexError): + slt[200] + +def test_getitem_indexerror3(): + slt = SortedKeyList(range(100), key=modulo) + with pytest.raises(IndexError): + slt[-101] + +def test_delitem(): + random.seed(0) + + slt = SortedKeyList(range(100), key=modulo) + slt._reset(17) + while len(slt) > 0: + del slt[random.randrange(len(slt))] + slt._check() + + slt = SortedKeyList(range(100), key=modulo) + slt._reset(17) + del slt[:] + assert len(slt) == 0 + slt._check() + +def test_delitem_slice(): + slt = SortedKeyList(range(100), key=modulo) + slt._reset(17) + del slt[10:40:1] + del slt[10:40:-1] + del slt[10:40:2] + del slt[10:40:-2] + +def test_iter(): + slt = SortedKeyList(range(10000), key=modulo) + itr = iter(slt) + assert all(tup[0] == tup[1] for tup in zip(sorted(range(10000), key=modulo), itr)) + +def test_reversed(): + slt = SortedKeyList(range(10000), key=modulo) + rev = reversed(slt) + assert all(tup[0] == tup[1] for tup in zip(reversed(sorted(range(10000), key=modulo)), rev)) + +def test_reverse(): + slt = SortedKeyList(range(10000), key=modulo) + with pytest.raises(NotImplementedError): + slt.reverse() + +def test_islice(): + sl = SortedKeyList(key=modulo) + sl._reset(7) + + assert [] == list(sl.islice()) + + values = sorted(range(100), key=modulo) + sl.update(values) + + for start in range(53): + for stop in range(53): + assert list(sl.islice(start, stop)) == values[start:stop] + + for start in range(53): + for stop in range(53): + assert list(sl.islice(start, stop, reverse=True)) == values[start:stop][::-1] + + for start in range(53): + assert list(sl.islice(start=start)) == values[start:] + assert list(sl.islice(start=start, reverse=True)) == values[start:][::-1] + + for stop in range(53): + assert list(sl.islice(stop=stop)) == values[:stop] + assert list(sl.islice(stop=stop, reverse=True)) == values[:stop][::-1] + +def test_irange(): + values = sorted(range(100), key=modulo) + + for load in range(5, 16): + slt = SortedKeyList(range(100), key=modulo) + slt._reset(load) + + for start in range(10): + for end in range(start, 10): + temp = list(slt.irange(start, end)) + assert temp == values[(start * 10):((end + 1) * 10)] + + temp = list(slt.irange(start, end, reverse=True)) + assert temp == values[(start * 10):((end + 1) * 10)][::-1] + + for start in range(10): + for end in range(start, 10): + temp = list(slt.irange(start, end, inclusive=(True, False))) + assert temp == values[(start * 10):(end * 10)] + + for start in range(10): + for end in range(start, 10): + temp = list(slt.irange(start, end, (False, True))) + assert temp == values[((start + 1) * 10):((end + 1) * 10)] + + for start in range(10): + for end in range(start, 10): + temp = list(slt.irange(start, end, inclusive=(False, False))) + assert temp == values[((start + 1) * 10):(end * 10)] + + for start in range(10): + temp = list(slt.irange(minimum=start)) + assert temp == values[(start * 10):] + + for end in range(10): + temp = list(slt.irange(maximum=end)) + assert temp == values[:(end + 1) * 10] + +def test_irange_key(): + values = sorted(range(100), key=modulo) + + for load in range(5, 16): + slt = SortedKeyList(range(100), key=modulo) + slt._reset(load) + + for start in range(10): + for end in range(start, 10): + temp = list(slt.irange_key(start, end)) + assert temp == values[(start * 10):((end + 1) * 10)] + + temp = list(slt.irange_key(start, end, reverse=True)) + assert temp == values[(start * 10):((end + 1) * 10)][::-1] + + for start in range(10): + for end in range(start, 10): + temp = list(slt.irange_key(start, end, inclusive=(True, False))) + assert temp == values[(start * 10):(end * 10)] + + for start in range(10): + for end in range(start, 10): + temp = list(slt.irange_key(start, end, (False, True))) + assert temp == values[((start + 1) * 10):((end + 1) * 10)] + + for start in range(10): + for end in range(start, 10): + temp = list(slt.irange_key(start, end, inclusive=(False, False))) + assert temp == values[((start + 1) * 10):(end * 10)] + + for start in range(10): + temp = list(slt.irange_key(min_key=start)) + assert temp == values[(start * 10):] + + for end in range(10): + temp = list(slt.irange_key(max_key=end)) + assert temp == values[:(end + 1) * 10] + +def test_len(): + slt = SortedKeyList(key=modulo) + + for val in range(10000): + slt.add(val) + assert len(slt) == (val + 1) + +def test_bisect_left(): + slt = SortedKeyList(key=modulo) + assert slt.bisect_left(0) == 0 + slt = SortedKeyList(range(100), key=modulo) + slt._reset(17) + slt.update(range(100)) + slt._check() + assert slt.bisect_left(50) == 0 + assert slt.bisect_left(0) == 0 + +def test_bisect(): + slt = SortedKeyList(key=modulo) + assert slt.bisect(10) == 0 + slt = SortedKeyList(range(100), key=modulo) + slt._reset(17) + slt.update(range(100)) + slt._check() + assert slt.bisect(10) == 20 + assert slt.bisect(0) == 20 + +def test_bisect_right(): + slt = SortedKeyList(key=modulo) + assert slt.bisect_right(10) == 0 + slt = SortedKeyList(range(100), key=modulo) + slt._reset(17) + slt.update(range(100)) + slt._check() + assert slt.bisect_right(10) == 20 + assert slt.bisect_right(0) == 20 + +def test_bisect_key_left(): + slt = SortedKeyList(key=modulo) + assert slt.bisect_key_left(10) == 0 + slt = SortedKeyList(range(100), key=modulo) + slt._reset(17) + slt.update(range(100)) + slt._check() + assert slt.bisect_key_left(0) == 0 + assert slt.bisect_key_left(5) == 100 + assert slt.bisect_key_left(10) == 200 + +def test_bisect_key_right(): + slt = SortedKeyList(key=modulo) + assert slt.bisect_key_right(0) == 0 + slt = SortedKeyList(range(100), key=modulo) + slt._reset(17) + slt.update(range(100)) + slt._check() + assert slt.bisect_key_right(0) == 20 + assert slt.bisect_key_right(5) == 120 + assert slt.bisect_key_right(10) == 200 + +def test_bisect_key(): + slt = SortedKeyList(key=modulo) + assert slt.bisect_key(0) == 0 + slt = SortedKeyList(range(100), key=modulo) + slt._reset(17) + slt.update(range(100)) + slt._check() + assert slt.bisect_key(0) == 20 + assert slt.bisect_key(5) == 120 + assert slt.bisect_key(10) == 200 + +def test_copy(): + slt = SortedKeyList(range(100), key=modulo) + slt._reset(7) + two = slt.copy() + slt.add(100) + assert len(slt) == 101 + assert len(two) == 100 + +def test_copy_copy(): + import copy + slt = SortedKeyList(range(100), key=modulo) + slt._reset(7) + two = copy.copy(slt) + slt.add(100) + assert len(slt) == 101 + assert len(two) == 100 + +def test_count(): + slt = SortedKeyList(key=modulo) + slt._reset(7) + + assert slt.count(0) == 0 + + for iii in range(100): + for jjj in range(iii): + slt.add(iii) + slt._check() + + for iii in range(100): + assert slt.count(iii) == iii + + slt = SortedKeyList(range(8), key=modulo) + assert slt.count(9) == 0 + +def test_pop(): + slt = SortedKeyList(range(10), key=modulo) + slt._reset(4) + slt._check() + assert slt.pop() == 9 + slt._check() + assert slt.pop(0) == 0 + slt._check() + assert slt.pop(-2) == 7 + slt._check() + assert slt.pop(4) == 5 + slt._check() + +def test_pop_indexerror1(): + slt = SortedKeyList(range(10), key=modulo) + slt._reset(4) + with pytest.raises(IndexError): + slt.pop(-11) + +def test_pop_indexerror2(): + slt = SortedKeyList(range(10), key=modulo) + slt._reset(4) + with pytest.raises(IndexError): + slt.pop(10) + +def test_index(): + slt = SortedKeyList(range(100), key=modulo) + slt._reset(7) + + for pos, val in enumerate(sorted(range(100), key=modulo)): + assert val == slt.index(pos) + + assert slt.index(9, 0, 1000) == 90 + + slt = SortedKeyList((0 for rpt in range(100)), key=modulo) + slt._reset(7) + + for start in range(100): + for stop in range(start, 100): + assert slt.index(0, start, stop + 1) == start + + for start in range(100): + assert slt.index(0, -(100 - start)) == start + + assert slt.index(0, -1000) == 0 + +def test_index_valueerror1(): + slt = SortedKeyList([0] * 10, key=modulo) + slt._reset(4) + with pytest.raises(ValueError): + slt.index(0, 10) + +def test_index_valueerror2(): + slt = SortedKeyList([0] * 10, key=modulo) + slt._reset(4) + with pytest.raises(ValueError): + slt.index(0, 0, -10) + +def test_index_valueerror3(): + slt = SortedKeyList([0] * 10, key=modulo) + slt._reset(4) + with pytest.raises(ValueError): + slt.index(0, 7, 3) + +def test_index_valueerror4(): + slt = SortedKeyList([0] * 10, key=modulo) + slt._reset(4) + with pytest.raises(ValueError): + slt.index(1) + +def test_index_valueerror5(): + slt = SortedKeyList(key=modulo) + with pytest.raises(ValueError): + slt.index(1) + +def test_index_valueerror6(): + slt = SortedKeyList(range(100), key=modulo) + slt._reset(4) + with pytest.raises(ValueError): + slt.index(91, 0, 15) + +def test_index_valueerror7(): + slt = SortedKeyList([0] * 10 + [1] * 10 + [2] * 10, key=modulo) + slt._reset(4) + with pytest.raises(ValueError): + slt.index(1, 0, 10) + +def test_index_valueerror8(): + slt = SortedKeyList(range(10), key=modulo) + slt._reset(4) + with pytest.raises(ValueError): + slt.index(4, 5) + +def test_index_valueerror9(): + slt = SortedKeyList(key=modulo) + slt._reset(4) + with pytest.raises(ValueError): + slt.index(5) + +def test_index_valueerror10(): + slt = SortedKeyList(range(10), key=modulo) + slt._reset(4) + with pytest.raises(ValueError): + slt.index(19) + +def test_mul(): + this = SortedKeyList(range(10), key=modulo) + this._reset(4) + that = this * 5 + this._check() + that._check() + assert this == sorted(range(10), key=modulo) + assert that == sorted(list(range(10)) * 5, key=modulo) + assert this != that + +def test_imul(): + this = SortedKeyList(range(10), key=modulo) + this._reset(4) + this *= 5 + this._check() + assert this == sorted(list(range(10)) * 5, key=modulo) + +def test_op_add(): + this = SortedKeyList(range(10), key=modulo) + this._reset(4) + assert (this + this + this) == (this * 3) + + that = SortedKeyList(range(10), key=modulo) + that._reset(4) + that += that + that += that + assert that == (this * 4) + +def test_eq(): + this = SortedKeyList(range(10), key=modulo) + this._reset(4) + assert this == list(range(10)) + assert this == tuple(range(10)) + assert not (this == list(range(9))) + +def test_ne(): + this = SortedKeyList(range(10, 20), key=modulo) + this._reset(4) + assert this != list(range(11, 21)) + assert this != tuple(range(10, 21)) + assert this != [0, 1, 2, 3, 3, 5, 6, 7, 8, 9] + assert this != (val for val in range(10)) + assert this != set() + +def test_lt(): + this = SortedKeyList(range(10, 15), key=modulo) + this._reset(4) + assert this < [10, 11, 13, 13, 14] + assert this < [10, 11, 12, 13, 14, 15] + assert this < [11] + +def test_le(): + this = SortedKeyList(range(10, 15), key=modulo) + this._reset(4) + assert this <= [10, 11, 12, 13, 14] + assert this <= [10, 11, 12, 13, 14, 15] + assert this <= [10, 11, 13, 13, 14] + assert this <= [11] + +def test_gt(): + this = SortedKeyList(range(10, 15), key=modulo) + this._reset(4) + assert this > [10, 11, 11, 13, 14] + assert this > [10, 11, 12, 13] + assert this > [9] + +def test_ge(): + this = SortedKeyList(range(10, 15), key=modulo) + this._reset(4) + assert this >= [10, 11, 12, 13, 14] + assert this >= [10, 11, 12, 13] + assert this >= [10, 11, 11, 13, 14] + assert this >= [9] + +def test_repr(): + this = SortedKeyList(range(10), key=modulo) + this._reset(4) + assert repr(this).startswith('SortedKeyList([0, 1, 2, 3, 4, 5, 6, 7, 8, 9], key= 0: + pos = random.randrange(len(slt)) + del slt[pos] + slt._check() + + slt = SortedList(range(100)) + slt._reset(17) + del slt[:] + assert len(slt) == 0 + slt._check() + +def test_delitem_slice(): + slt = SortedList(range(100)) + slt._reset(17) + del slt[10:40:1] + del slt[10:40:-1] + del slt[10:40:2] + del slt[10:40:-2] + +def test_iter(): + slt = SortedList(range(10000)) + itr = iter(slt) + assert all(tup[0] == tup[1] for tup in zip(range(10000), itr)) + +def test_reversed(): + slt = SortedList(range(10000)) + rev = reversed(slt) + assert all(tup[0] == tup[1] for tup in zip(range(9999, -1, -1), rev)) + +def test_reverse(): + slt = SortedList(range(10000)) + with pytest.raises(NotImplementedError): + slt.reverse() + +def test_islice(): + sl = SortedList() + sl._reset(7) + + assert [] == list(sl.islice()) + + values = list(range(53)) + sl.update(values) + + for start in range(53): + for stop in range(53): + assert list(sl.islice(start, stop)) == values[start:stop] + + for start in range(53): + for stop in range(53): + assert list(sl.islice(start, stop, reverse=True)) == values[start:stop][::-1] + + for start in range(53): + assert list(sl.islice(start=start)) == values[start:] + assert list(sl.islice(start=start, reverse=True)) == values[start:][::-1] + + for stop in range(53): + assert list(sl.islice(stop=stop)) == values[:stop] + assert list(sl.islice(stop=stop, reverse=True)) == values[:stop][::-1] + +def test_irange(): + sl = SortedList() + sl._reset(7) + + assert [] == list(sl.irange()) + + values = list(range(53)) + sl.update(values) + + for start in range(53): + for end in range(start, 53): + assert list(sl.irange(start, end)) == values[start:(end + 1)] + assert list(sl.irange(start, end, reverse=True)) == values[start:(end + 1)][::-1] + + for start in range(53): + for end in range(start, 53): + assert list(range(start, end)) == list(sl.irange(start, end, (True, False))) + + for start in range(53): + for end in range(start, 53): + assert list(range(start + 1, end + 1)) == list(sl.irange(start, end, (False, True))) + + for start in range(53): + for end in range(start, 53): + assert list(range(start + 1, end)) == list(sl.irange(start, end, (False, False))) + + for start in range(53): + assert list(range(start, 53)) == list(sl.irange(start)) + + for end in range(53): + assert list(range(0, end)) == list(sl.irange(None, end, (True, False))) + + assert values == list(sl.irange(inclusive=(False, False))) + + assert [] == list(sl.irange(53)) + assert values == list(sl.irange(None, 53, (True, False))) + +def test_len(): + slt = SortedList() + + for val in range(10000): + slt.add(val) + assert len(slt) == (val + 1) + +def test_bisect_left(): + slt = SortedList() + assert slt.bisect_left(0) == 0 + slt = SortedList(range(100)) + slt._reset(17) + slt.update(range(100)) + slt._check() + assert slt.bisect_left(50) == 100 + assert slt.bisect_left(200) == 200 + +def test_bisect(): + slt = SortedList() + assert slt.bisect(10) == 0 + slt = SortedList(range(100)) + slt._reset(17) + slt.update(range(100)) + slt._check() + assert slt.bisect(10) == 22 + assert slt.bisect(200) == 200 + +def test_bisect_right(): + slt = SortedList() + assert slt.bisect_right(10) == 0 + slt = SortedList(range(100)) + slt._reset(17) + slt.update(range(100)) + slt._check() + assert slt.bisect_right(10) == 22 + assert slt.bisect_right(200) == 200 + +def test_copy(): + alpha = SortedList(range(100)) + alpha._reset(7) + beta = alpha.copy() + alpha.add(100) + assert len(alpha) == 101 + assert len(beta) == 100 + +def test_copy_copy(): + import copy + alpha = SortedList(range(100)) + alpha._reset(7) + beta = copy.copy(alpha) + alpha.add(100) + assert len(alpha) == 101 + assert len(beta) == 100 + +def test_count(): + slt = SortedList() + slt._reset(7) + + assert slt.count(0) == 0 + + for iii in range(100): + for jjj in range(iii): + slt.add(iii) + slt._check() + + for iii in range(100): + assert slt.count(iii) == iii + + assert slt.count(100) == 0 + +def test_pop(): + slt = SortedList(range(10)) + slt._reset(4) + slt._check() + assert slt.pop() == 9 + slt._check() + assert slt.pop(0) == 0 + slt._check() + assert slt.pop(-2) == 7 + slt._check() + assert slt.pop(4) == 5 + slt._check() + +def test_pop_indexerror1(): + slt = SortedList(range(10)) + slt._reset(4) + with pytest.raises(IndexError): + slt.pop(-11) + +def test_pop_indexerror2(): + slt = SortedList(range(10)) + slt._reset(4) + with pytest.raises(IndexError): + slt.pop(10) + +def test_pop_indexerror3(): + slt = SortedList() + with pytest.raises(IndexError): + slt.pop() + +def test_index(): + slt = SortedList(range(100)) + slt._reset(17) + + for val in range(100): + assert val == slt.index(val) + + assert slt.index(99, 0, 1000) == 99 + + slt = SortedList((0 for rpt in range(100))) + slt._reset(17) + + for start in range(100): + for stop in range(start, 100): + assert slt.index(0, start, stop + 1) == start + + for start in range(100): + assert slt.index(0, -(100 - start)) == start + + assert slt.index(0, -1000) == 0 + +def test_index_valueerror1(): + slt = SortedList([0] * 10) + slt._reset(4) + with pytest.raises(ValueError): + slt.index(0, 10) + +def test_index_valueerror2(): + slt = SortedList([0] * 10) + slt._reset(4) + with pytest.raises(ValueError): + slt.index(0, 0, -10) + +def test_index_valueerror3(): + slt = SortedList([0] * 10) + slt._reset(4) + with pytest.raises(ValueError): + slt.index(0, 7, 3) + +def test_index_valueerror4(): + slt = SortedList([0] * 10) + slt._reset(4) + with pytest.raises(ValueError): + slt.index(1) + +def test_index_valueerror5(): + slt = SortedList() + with pytest.raises(ValueError): + slt.index(1) + +def test_index_valueerror6(): + slt = SortedList(range(10)) + slt._reset(4) + with pytest.raises(ValueError): + slt.index(3, 5) + +def test_index_valueerror7(): + slt = SortedList([0] * 10 + [2] * 10) + slt._reset(4) + with pytest.raises(ValueError): + slt.index(1, 0, 10) + +def test_mul(): + this = SortedList(range(10)) + this._reset(4) + that = this * 5 + this._check() + that._check() + assert this == list(range(10)) + assert that == sorted(list(range(10)) * 5) + assert this != that + +def test_imul(): + this = SortedList(range(10)) + this._reset(4) + this *= 5 + this._check() + assert this == sorted(list(range(10)) * 5) + +def test_op_add(): + this = SortedList(range(10)) + this._reset(4) + assert (this + this + this) == (this * 3) + + that = SortedList(range(10)) + that._reset(4) + that += that + that += that + assert that == (this * 4) + +def test_eq(): + this = SortedList(range(10)) + this._reset(4) + assert this == list(range(10)) + assert this == tuple(range(10)) + assert not (this == list(range(9))) + +def test_ne(): + this = SortedList(range(10)) + this._reset(4) + assert this != list(range(9)) + assert this != tuple(range(11)) + assert this != [0, 1, 2, 3, 3, 5, 6, 7, 8, 9] + assert this != (val for val in range(10)) + assert this != set() + +def test_lt(): + this = SortedList(range(10, 15)) + this._reset(4) + assert this < [10, 11, 13, 13, 14] + assert this < [10, 11, 12, 13, 14, 15] + assert this < [11] + +def test_le(): + this = SortedList(range(10, 15)) + this._reset(4) + assert this <= [10, 11, 12, 13, 14] + assert this <= [10, 11, 12, 13, 14, 15] + assert this <= [10, 11, 13, 13, 14] + assert this <= [11] + +def test_gt(): + this = SortedList(range(10, 15)) + this._reset(4) + assert this > [10, 11, 11, 13, 14] + assert this > [10, 11, 12, 13] + assert this > [9] + +def test_ge(): + this = SortedList(range(10, 15)) + this._reset(4) + assert this >= [10, 11, 12, 13, 14] + assert this >= [10, 11, 12, 13] + assert this >= [10, 11, 11, 13, 14] + assert this >= [9] + +def test_repr(): + this = SortedList(range(10)) + this._reset(4) + assert repr(this) == 'SortedList([0, 1, 2, 3, 4, 5, 6, 7, 8, 9])' + +def test_repr_recursion(): + this = SortedList([[1], [2], [3], [4]]) + this._lists[-1].append(this) + assert repr(this) == 'SortedList([[1], [2], [3], [4], ...])' + +def test_repr_subclass(): + class CustomSortedList(SortedList): + pass + this = CustomSortedList([1, 2, 3, 4]) + assert repr(this) == 'CustomSortedList([1, 2, 3, 4])' + +def test_pickle(): + import pickle + alpha = SortedList(range(10000)) + alpha._reset(500) + beta = pickle.loads(pickle.dumps(alpha)) + assert alpha == beta + assert alpha._load == beta._load + +def test_build_index(): + slt = SortedList([0]) + slt._reset(4) + slt._build_index() + slt._check() + +def test_check(): + slt = SortedList(range(10)) + slt._reset(4) + slt._len = 5 + with pytest.raises(AssertionError): + slt._check() + + diff -Nru uranium-3.3.0/tests/TestStage.py uranium-4.4.1/tests/TestStage.py --- uranium-3.3.0/tests/TestStage.py 1970-01-01 00:00:00.000000000 +0000 +++ uranium-4.4.1/tests/TestStage.py 2019-11-19 10:50:46.000000000 +0000 @@ -0,0 +1,31 @@ +from PyQt5.QtCore import QUrl + +from UM.Stage import Stage + + +def test_addGetDisplayComponent(): + stage = Stage() + stage.addDisplayComponent("BLORP", "location") + assert stage.getDisplayComponent("BLORP") == QUrl.fromLocalFile("location") + + stage.addDisplayComponent("MEEP!", QUrl.fromLocalFile("MEEP")) + assert stage.getDisplayComponent("MEEP!") == QUrl.fromLocalFile("MEEP") + + +def test_iconSource(): + stage = Stage() + + # Should be empty if we didn't do anything yet + assert stage.iconSource == QUrl() + + stage.setIconSource("DERP") + assert stage.iconSource == QUrl.fromLocalFile("DERP") + + stage.setIconSource(QUrl.fromLocalFile("FOO")) + assert stage.iconSource == QUrl.fromLocalFile("FOO") + + +def test_getUnknownDisplayComponent(): + stage = Stage() + # Just an empty QUrl + assert stage.getDisplayComponent("BLORP") == QUrl() \ No newline at end of file diff -Nru uranium-3.3.0/tests/test_theme/icons/test.svg uranium-4.4.1/tests/test_theme/icons/test.svg --- uranium-3.3.0/tests/test_theme/icons/test.svg 1970-01-01 00:00:00.000000000 +0000 +++ uranium-4.4.1/tests/test_theme/icons/test.svg 2019-11-19 10:50:46.000000000 +0000 @@ -0,0 +1,13 @@ + + + + Icon/ info + Created with Sketch. + + + + + + + + \ No newline at end of file Binary files /tmp/tmpZ9Gqtt/Ulw1y65zD_/uranium-3.3.0/tests/test_theme/images/kitten.jpg and /tmp/tmpZ9Gqtt/MTdpndjFmQ/uranium-4.4.1/tests/test_theme/images/kitten.jpg differ diff -Nru uranium-3.3.0/tests/test_theme/theme.json uranium-4.4.1/tests/test_theme/theme.json --- uranium-3.3.0/tests/test_theme/theme.json 1970-01-01 00:00:00.000000000 +0000 +++ uranium-4.4.1/tests/test_theme/theme.json 2019-11-19 10:50:46.000000000 +0000 @@ -0,0 +1,22 @@ +{ + "metadata": { + "name": "Ultimaker" + }, + "fonts": { + "test_font": { + "weight": 40, + "family": "Felidae" + } + }, + "colors": { + "test_color": [ + 255, + 255, + 255, + 255 + ] + }, + "sizes": { + "test_size": [42, 1337] + } +} \ No newline at end of file diff -Nru uranium-3.3.0/tests/TestTheme.py uranium-4.4.1/tests/TestTheme.py --- uranium-3.3.0/tests/TestTheme.py 1970-01-01 00:00:00.000000000 +0000 +++ uranium-4.4.1/tests/TestTheme.py 2019-11-19 10:50:46.000000000 +0000 @@ -0,0 +1,59 @@ +from UM.Qt.Bindings.Theme import Theme +from unittest.mock import MagicMock, patch +from PyQt5.QtGui import QColor, QFont +from PyQt5.QtCore import QSizeF, QUrl +import pytest +import os + +@pytest.fixture +def theme(): + application = MagicMock() + with patch("UM.Qt.Bindings.Theme.QFontMetrics"): + with patch("UM.Qt.Bindings.Theme.QCoreApplication.instance"): + with patch("UM.Application.Application.getInstance", MagicMock(return_value = application)): + with patch("UM.Resources.Resources.getPath", MagicMock(return_value = os.path.join(os.path.dirname(os.path.abspath(__file__)), "test_theme"))): + return Theme(MagicMock()) + + +def test_getColor(theme): + assert theme.getColor("test_color") == QColor(255, 255, 255, 255) + + +def test_getUnknownColor(theme): + assert theme.getColor("Dunno") == QColor() + + +def test_getKnownSize(theme): + assert theme.getSize("test_size") == QSizeF(42, 1337) + + +def test_getUnknownSize(theme): + assert theme.getSize("Dunno?") == QSizeF() + + +def test_getKnownIcon(theme): + icon_location = os.path.join(os.path.dirname(os.path.abspath(__file__)), "test_theme", "icons", "test.svg") + assert theme.getIcon("test") == QUrl.fromLocalFile(icon_location) + + +def test_getUnknownIcon(theme): + assert theme.getIcon("BoringAndProfesisonalIcon") == QUrl() + + +def test_knownFont(theme): + font = theme.getFont("test_font") + assert font.family() == "Felidae" + assert font.weight() == 40 + + +def test_unknownFont(theme): + assert theme.getFont("whatever") == QFont() + + +def test_knownImage(theme): + image_location = os.path.join(os.path.dirname(os.path.abspath(__file__)), "test_theme", "images", "kitten.jpg") + assert theme.getImage("kitten") == QUrl.fromLocalFile(image_location) + + +def test_unknownImage(theme): + assert theme.getImage("BoringBusinessPictureWhichIsAboslutelyNotAKitten") == QUrl() diff -Nru uranium-3.3.0/tests/TestToolHandle.py uranium-4.4.1/tests/TestToolHandle.py --- uranium-3.3.0/tests/TestToolHandle.py 1970-01-01 00:00:00.000000000 +0000 +++ uranium-4.4.1/tests/TestToolHandle.py 2019-11-19 10:50:46.000000000 +0000 @@ -0,0 +1,19 @@ +import pytest + +from UM.Scene.ToolHandle import ToolHandle + +test_validate_data = [ + {"attribute": "LineMesh", "value": "whatever"}, + {"attribute": "SolidMesh", "value": "blorp"}, + {"attribute": "SelectionMesh", "value": "omgzomg"} +] + +@pytest.mark.parametrize("data", test_validate_data) +def test_getAndSet(data): + tool_handle = ToolHandle() + + # Attempt to set the value + getattr(tool_handle, "set" + data["attribute"])(data["value"]) + + # Ensure that the value got set + assert getattr(tool_handle, "get" + data["attribute"])() == data["value"] diff -Nru uranium-3.3.0/tests/TestTools.py uranium-4.4.1/tests/TestTools.py --- uranium-3.3.0/tests/TestTools.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/tests/TestTools.py 2019-11-19 10:50:46.000000000 +0000 @@ -1,70 +1,109 @@ # Copyright (c) 2017 Ultimaker B.V. # Uranium is released under the terms of the LGPLv3 or higher. -from unittest.mock import MagicMock -from UM.Application import Application +from unittest.mock import patch -from UM.Controller import Controller +import pytest + +from UM.Math.Plane import Plane +from UM.Scene.SceneNode import SceneNode +from UM.Scene.Selection import Selection +from UM.Scene.ToolHandle import ToolHandle from UM.Tool import Tool -def test_tools(): - mock_application = MagicMock() +def test_exposedProperties(): + + test_tool_1 = Tool() + test_tool_1.setPluginId("test_tool_1") + + test_tool_1.setExposedProperties("bla", "omg", "zomg") + assert test_tool_1.getExposedProperties() == ["bla", "omg", "zomg"] + + +test_validate_data = [ + {"attribute": "DragPlane", "value": Plane()}, + {"attribute": "Handle", "value": None} +] + - Application.getInstance = MagicMock(return_type = mock_application) - controller = Controller(mock_application) +@pytest.mark.parametrize("data", test_validate_data) +def test_getAndSet(data): + test_tool = Tool() + # Attempt to set the value + getattr(test_tool, "set" + data["attribute"])(data["value"]) - # Switch out the emits with a mock. - controller.toolsChanged.emit = MagicMock() - controller.activeToolChanged.emit = MagicMock() - controller.toolOperationStarted.emit = MagicMock() - controller.toolOperationStopped.emit = MagicMock() + # Ensure that the value got set + assert getattr(test_tool, "get" + data["attribute"])() == data["value"] + +def test_toolEnabledChanged(): test_tool_1 = Tool() test_tool_1.setPluginId("test_tool_1") + assert test_tool_1.getEnabled() - test_tool_2 = Tool() - test_tool_2.setPluginId("test_tool_2") + # Fake the signal from the controller + test_tool_1._onToolEnabledChanged("SomeOtherTOol", True) + assert test_tool_1.getEnabled() + # Fake the signal from the controller, but this time it's a signal that should force the tool to change. + test_tool_1._onToolEnabledChanged("test_tool_1", False) + assert not test_tool_1.getEnabled() - controller.addTool(test_tool_1) - assert controller.toolsChanged.emit.call_count == 1 - controller.addTool(test_tool_2) - assert controller.toolsChanged.emit.call_count == 2 +def test_getShortcutKey(): + test_tool_1 = Tool() + # Test coverage is magic. It should be None by default. + assert test_tool_1.getShortcutKey() is None - controller.addTool(test_tool_1) - assert controller.toolsChanged.emit.call_count == 2 - assert len(controller.getAllTools()) == 2 - - # Set if with an unknown name. - controller.setActiveTool("nope nope!") - assert controller.getActiveTool() is None - assert controller.activeToolChanged.emit.call_count == 0 - - # Set active tool by reference - controller.setActiveTool(test_tool_1) - assert controller.getActiveTool() == test_tool_1 - assert controller.activeToolChanged.emit.call_count == 1 - - # Set active tool by ID, but the same as is already active. - controller.setActiveTool("test_tool_1") - assert controller.getActiveTool() == test_tool_1 - assert controller.activeToolChanged.emit.call_count == 1 - - # Set active tool by ID - controller.setActiveTool("test_tool_2") - assert controller.getActiveTool() == test_tool_2 - assert controller.activeToolChanged.emit.call_count == 2 - - assert controller.getTool("ZOMG") is None - assert controller.getTool("test_tool_1") == test_tool_1 - assert controller.getTool("test_tool_2") == test_tool_2 +def test_getDragVector(): + test_tool_1 = Tool() + test_tool_1.setPluginId("test_tool_1") + # No drag plane set + assert test_tool_1.getDragVector(0, 0) is None + test_tool_1.setDragPlane(Plane()) + # No drag start + assert test_tool_1.getDragVector(0, 0) is None +def test_getDragStart(): + test_tool_1 = Tool() + # Test coverage is magic. It should be None by default. + assert test_tool_1.getDragStart() is None +def test_getController(): + test_tool_1 = Tool() + # Test coverage is magic. It should not be None by default, since the application provided one + assert test_tool_1.getController() is not None +def test_setLockedAxis(): + test_tool_1 = Tool() + test_tool_handle_1 = ToolHandle() + test_tool_handle_1._enabled = True + test_tool_handle_1._auto_scale = False + # Pretend like the toolhandle actually got rendered at least once + with patch("UM.View.GL.OpenGL.OpenGL.getInstance"): + test_tool_handle_1.render(None) + + # Needs to start out with Nothing locked + assert test_tool_1.getLockedAxis() == ToolHandle.NoAxis + + # Just the vanilla changing. + test_tool_1.setLockedAxis(ToolHandle.XAxis) + assert test_tool_1.getLockedAxis() == ToolHandle.XAxis + + test_tool_1.setHandle(test_tool_handle_1) + test_tool_1.setLockedAxis(ToolHandle.YAxis) + assert test_tool_1.getLockedAxis() == ToolHandle.YAxis + assert test_tool_handle_1.getActiveAxis() == ToolHandle.YAxis + + +def test_getSelectedObjectsWithoutSelectedAncestors(): + scene_node_1 = SceneNode() + Selection.add(scene_node_1) + test_tool_1 = Tool() + assert test_tool_1._getSelectedObjectsWithoutSelectedAncestors() == [scene_node_1] diff -Nru uranium-3.3.0/tests/TestUtil.py uranium-4.4.1/tests/TestUtil.py --- uranium-3.3.0/tests/TestUtil.py 1970-01-01 00:00:00.000000000 +0000 +++ uranium-4.4.1/tests/TestUtil.py 2019-11-19 10:50:46.000000000 +0000 @@ -0,0 +1,17 @@ +from unittest.mock import MagicMock + +from UM.Util import parseBool +import pytest + +positive_results = [True, "True", "true", "Yes", "yes", 1] +negative_results = [False, "False", "false", "No", "no", 0, None, "I like turtles", MagicMock()] + + +@pytest.mark.parametrize("value", positive_results) +def test_positive(value): + assert parseBool(value) + + +@pytest.mark.parametrize("value", negative_results) +def test_negative(value): + assert not parseBool(value) \ No newline at end of file diff -Nru uranium-3.3.0/tests/TestVersion.py uranium-4.4.1/tests/TestVersion.py --- uranium-3.3.0/tests/TestVersion.py 1970-01-01 00:00:00.000000000 +0000 +++ uranium-4.4.1/tests/TestVersion.py 2019-11-19 10:50:46.000000000 +0000 @@ -0,0 +1,92 @@ +# Copyright (c) 2018 Ultimaker B.V. +# Uranium is released under the terms of the LGPLv3 or higher. + +from UM.Version import Version +from unittest import TestCase +import pytest + +major_versions = [Version("1"), Version(b"1"), Version(1), Version([1]), Version(["1"]), Version("1."), Version("MOD-1"), Version("1B"), Version(Version("1"))] +major_minor_versions = [Version("1.2"), Version("1-2"), Version("1_2"), Version(b"1.2"), Version("1.2BETA"), Version([1, 2]), Version(["1", "2"]), Version([1, "2"]), Version([1, b"2"])] +major_minor_revision_versions = [Version("1.2.3"), Version("1.2.3BETA"), Version("1_2-3"), Version(b"1.2.3"), Version([1, 2, 3]), Version(["1", "2", "3"]), Version([1, "2", 3]), Version("MOD-1.2.3"), Version(["1", 2, b"3"])] + + +def check_version_equals(first_version: Version, second_version: Version): + assert first_version == second_version + assert first_version.getMajor() == second_version.getMajor() + assert first_version.getMinor() == second_version.getMinor() + assert first_version.getRevision() == second_version.getRevision() + + +@pytest.mark.parametrize("first_version", major_versions) +@pytest.mark.parametrize("second_version", major_versions) +def test_major_equals(first_version, second_version): + check_version_equals(first_version, second_version) + + +@pytest.mark.parametrize("first_version", major_minor_versions) +@pytest.mark.parametrize("second_version", major_minor_versions) +def test_major_and_minor_equals(first_version, second_version): + check_version_equals(first_version, second_version) + + +@pytest.mark.parametrize("first_version", major_minor_revision_versions) +@pytest.mark.parametrize("second_version", major_minor_revision_versions) +def test_major_minor_revision_equals(first_version, second_version): + check_version_equals(first_version, second_version) + + +@pytest.mark.parametrize("first_version", major_versions) +@pytest.mark.parametrize("second_version", major_minor_versions) +def test_check_version_smaller(first_version, second_version): + assert first_version < second_version + + # Just to be on the really safe side + assert first_version != second_version + assert not first_version > second_version + + +@pytest.mark.parametrize("first_version", major_minor_versions) +@pytest.mark.parametrize("second_version", major_minor_revision_versions) +def test_check_version_smaller_2(first_version, second_version): + assert first_version < second_version + + # Just to be on the really safe side + assert first_version != second_version + assert not first_version > second_version + + +def test_versionPostfix(): + version = Version("1.2.3-alpha.4") + assert version.getPostfixType() == "alpha" + assert version.getPostfixVersion() == 4 + assert version.hasPostFix() + assert not Version("").hasPostFix() + + assert version <= Version("1.2.3-alpha.5") + assert version < Version("1.2.3-alpha.5") + + +def test_versionWeirdCompares(): + version = Version("1.2.3-alpha.4") + assert not version == 12 + + +def test_wrongType(): + version = Version(None) + assert version == Version("0") + +def test_compareStrings(): + version_string = "1.0.0" + version = Version(version_string) + assert version == version_string + assert version >= version_string + + assert version < "2.0.0" + assert version <= "2.0.0" + assert "0" < version + + assert Version("1.0.0") > Version("1.0.0-alpha.7") + + # Defend people from ignoring the typing. + assert not version > None + assert not version < None \ No newline at end of file Binary files /tmp/tmpZ9Gqtt/Ulw1y65zD_/uranium-3.3.0/tests/UnitTestPackage.package and /tmp/tmpZ9Gqtt/MTdpndjFmQ/uranium-4.4.1/tests/UnitTestPackage.package differ diff -Nru uranium-3.3.0/tests/VersionUpgrade/TestVersionUpgradeManager.py uranium-4.4.1/tests/VersionUpgrade/TestVersionUpgradeManager.py --- uranium-3.3.0/tests/VersionUpgrade/TestVersionUpgradeManager.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/tests/VersionUpgrade/TestVersionUpgradeManager.py 1970-01-01 00:00:00.000000000 +0000 @@ -1,152 +0,0 @@ -# Copyright (c) 2016 Ultimaker B.V. -# Cura is released under the terms of the LGPLv3 or higher. - -from UM.Application import Application # To use the plug-in manager. -from UM.PluginObject import PluginObject # To create artificial plug-ins. -from UM.VersionUpgrade import VersionUpgrade -from UM.VersionUpgradeManager import VersionUpgradeManager - -import pytest - -pytestmark = pytest.mark.skip("Failing tests due to API changes") - -## Tests the version upgrade manager. -class TestVersionUpgradeManager(): - ## Executed before the first test function is executed. - def setup_method(self, method): - self._upgrade_manager = VersionUpgradeManager() - - ## Executed after the last test function was executed. - def teardown_method(self, method): - pass - - ## The individual test cases for shortest upgrade paths. - # - # Each entry contains a list of possible upgrades. Each upgrade has a - # from_version, a to_version and a preference_type field. Each entry also - # has a destination version to upgrade to and a preference type to filter - # on. Each entry has a list of possible answers, each of which is a - # mapping of version numbers to indices referring to upgrades in the input - # list. Lastly, each entry has a name for debugging. - test_shortest_paths_data = [ - ({ - "name": "two-step", - "upgrades": [ - { "from_version": 0, "to_version": 1, "preference_type": "a" }, - { "from_version": 1, "to_version": 2, "preference_type": "a" } - ], - "destination": 2, - "preference_type": "a", - "answers": [ - { 0: 0, 1: 1 } - ] - }), - ({ - "name": "two-options", - "upgrades": [ - { "from_version": 0, "to_version": 1, "preference_type": "a" }, - { "from_version": 0, "to_version": 1, "preference_type": "a" } - ], - "destination": 1, - "preference_type": "a", - "answers": [ - { 0: 0 }, - { 0: 1 } - ] - }), - ({ - "name": "shortcut", - "upgrades": [ - { "from_version": 0, "to_version": 1, "preference_type": "a" }, - { "from_version": 1, "to_version": 2, "preference_type": "a" }, - { "from_version": 0, "to_version": 2, "preference_type": "a" } - ], - "destination": 2, - "preference_type": "a", - "answers": [ - { 0: 2, 1: 1 } - ] - }), - ({ - "name": "preference-type-filter", - "upgrades": [ - { "from_version": 0, "to_version": 2, "preference_type": "b" }, - { "from_version": 1, "to_version": 2, "preference_type": "a" }, - { "from_version": 0, "to_version": 1, "preference_type": "a" } - ], - "destination": 2, - "preference_type": "a", - "answers": [ - { 0: 2, 1: 1 } - ] - }) - ] - - ## Tests the algorithm to find shortest paths to update plug-ins. - # - # This function is normally not "exposed" (though Python puts no - # limitations on that). However, since the accuracy of this function - # should only affect the execution speed, it is wise to test this function - # nonetheless. - # - # \param data The data containing individual tests. - @pytest.mark.parametrize("data", test_shortest_paths_data) - def test_shortest_paths(self, data): - registry = Application.getInstance().getPluginRegistry() - self._loadUpgrades(data["upgrades"]) - shortest_paths = self._upgrade_manager._findShortestUpgradePaths(data["preference_type"], data["destination"]) # Find the shortest path. - - # Convert the upgrades in the path to indices in our original data. - to_indices = {} - for version, upgrade in shortest_paths.items(): - metadata = registry.getMetaData(upgrade.getPluginId())["version_upgrade"] - for key, value in metadata.items(): # Get just the first element of the dict. There is always only one. - preference_type = key - from_version = metadata[preference_type]["from"] - to_version = metadata[preference_type]["to"] - break - for i in range(0, len(data["upgrades"])): # Which index does it have? - if data["upgrades"][i]["from_version"] == from_version and data["upgrades"][i]["to_version"] == to_version and data["upgrades"][i]["preference_type"] == preference_type: - to_indices[from_version] = i - break - - # Compare with the answers. - for answer in data["answers"]: - if len(answer) != len(to_indices): # Not the same amount of source versions. - continue # Incorrect answer. - for version, upgrade in answer.items(): - if version not in to_indices: # Key is missing! - break # Incorrect answer. - if answer[version] != to_indices[version]: # Different plug-in for this version! - break # Incorrect answer. - else: # No indices were different. Answer is correct. - break - else: # No answers were correct. - assert False # Incorrect path. - - ## Create a plug-in registry with the specified upgrade plug-ins in it. - # - # \param upgrades Metadata of upgrades to fill the registry with, as - # obtained from test_shortest_paths_data. - def _loadUpgrades(self, upgrades): - registry = Application.getInstance().getPluginRegistry() - for upgrade in upgrades: # Artificially fill the plug-in registry with my own metadata! - plugin_object = PluginObject() - metadata = { # Correctly fill the metadata for this plug-in. - "plugin": { - "name": "Upgrade Test", # Note: Don't use internationalisation here, lest it be grabbed by gettext. - "author": "Ultimaker", - "version": "1.0", - "description": "Upgrade plug-in to test with.", - "api": 2 - }, - "version_upgrade": {} - } - metadata["version_upgrade"][upgrade["preference_type"]] = {} - metadata["version_upgrade"][upgrade["preference_type"]]["from"] = upgrade["from_version"] - metadata["version_upgrade"][upgrade["preference_type"]]["to"] = upgrade["to_version"] - id = upgrade["preference_type"] + "-from-" + str(upgrade["from_version"]) + "-to-" + str(upgrade["to_version"]) # ID becomes "type-from-#-to-#". - plugin_object.setPluginId(id) - registry._plugins[id] = plugin_object - registry._meta_data[id] = metadata - self._upgrade_manager._addVersionUpgrade(plugin_object) diff -Nru uranium-3.3.0/UM/Application.py uranium-4.4.1/UM/Application.py --- uranium-3.3.0/UM/Application.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Application.py 2019-11-19 10:50:46.000000000 +0000 @@ -1,35 +1,37 @@ -# Copyright (c) 2017 Ultimaker B.V. +# Copyright (c) 2018 Ultimaker B.V. # Uranium is released under the terms of the LGPLv3 or higher. -import threading import argparse import os import sys +import threading from UM.Controller import Controller +from UM.Message import Message #For typing. +from UM.PackageManager import PackageManager from UM.PluginRegistry import PluginRegistry -from UM.Mesh.MeshFileHandler import MeshFileHandler from UM.Resources import Resources from UM.Operations.OperationStack import OperationStack from UM.Event import CallFunctionEvent -from UM.Settings.ContainerRegistry import ContainerRegistry +import UM.Settings import UM.Settings.ContainerStack import UM.Settings.InstanceContainer -from UM.Signal import Signal, signalemitter, SignalQueue +from UM.Settings.ContainerRegistry import ContainerRegistry +from UM.Signal import Signal, signalemitter from UM.Logger import Logger from UM.Preferences import Preferences +from UM.View.Renderer import Renderer #For typing. from UM.OutputDevice.OutputDeviceManager import OutputDeviceManager from UM.i18n import i18nCatalog -from UM.Workspace.WorkspaceFileHandler import WorkspaceFileHandler - -import UM.Settings +from UM.Version import Version from typing import TYPE_CHECKING, List, Callable, Any, Optional if TYPE_CHECKING: + from UM.Backend.Backend import Backend from UM.Settings.ContainerStack import ContainerStack - from UM.Backend import Backend from UM.Extension import Extension + ## Central object responsible for running the main event loop and creating other central objects. # # The Application object is a central object for accessing other important objects. It is also @@ -41,79 +43,139 @@ # # \param name \type{string} The name of the application. # \param version \type{string} Version, formatted as major.minor.rev - def __init__(self, name: str, version: str, build_type: str = "", is_debug_mode = False, parser = None, parsed_command_line = {}, **kwargs): - if Application._instance is not None: - raise ValueError("Duplicate singleton creation") - - # If the constructor is called and there is no instance, set the instance to self. - # This is done because we can't make constructor private - Application._instance = self - - self._application_name = name - self._version = version - self._build_type = build_type - if "debug" in parsed_command_line.keys(): - if not parsed_command_line["debug"] and is_debug_mode: - parsed_command_line["debug"] = is_debug_mode + # \param build_type Additional version info on the type of build this is, such as "master". + # \param is_debug_mode Whether to run in debug mode. + def __init__(self, name: str, version: str, api_version: str, app_display_name: str = "", build_type: str = "", is_debug_mode: bool = False, **kwargs) -> None: + if Application.__instance is not None: + raise RuntimeError("Try to create singleton '%s' more than once" % self.__class__.__name__) + Application.__instance = self + + super().__init__() # Call super to make multiple inheritance work. + + self._api_version = Version(api_version) # type: Version - os.putenv("UBUNTU_MENUPROXY", "0") # For Ubuntu Unity this makes Qt use its own menu bar rather than pass it on to Unity. + self._app_name = name # type: str + self._app_display_name = app_display_name if app_display_name else name # type: str + self._version = version # type: str + self._build_type = build_type # type: str + self._is_debug_mode = is_debug_mode # type: bool + self._is_headless = False # type: bool + self._use_external_backend = False # type: bool + + self._just_updated_from_old_version = False # type: bool + + self._config_lock_filename = "{name}.lock".format(name = self._app_name) # type: str + + self._cli_args = None # type: argparse.Namespace + self._cli_parser = argparse.ArgumentParser(prog = self._app_name, add_help = False) # type: argparse.ArgumentParser + + self._main_thread = threading.current_thread() # type: threading.Thread + + self.default_theme = self._app_name # type: str # Default theme is the application name + self._default_language = "en_US" # type: str + + self.change_log_url = "https://github.com/Ultimaker/Uranium" # Where to find a more detailed description of the recent updates. + + self._preferences_filename = None # type: str + self._preferences = None # type: Preferences + + self._extensions = [] # type: List[Extension] + self._required_plugins = [] # type: List[str] + + self._package_manager_class = PackageManager # type: type + self._package_manager = None # type: PackageManager + + self._plugin_registry = None # type: PluginRegistry + self._container_registry_class = ContainerRegistry # type: type + self._container_registry = None # type: ContainerRegistry + self._global_container_stack = None # type: ContainerStack + + self._controller = None # type: Controller + self._backend = None # type: Backend + self._output_device_manager = None # type: OutputDeviceManager + self._operation_stack = None # type: OperationStack + + self._visible_messages = [] # type: List[Message] + self._message_lock = threading.Lock() # type: threading.Lock + + self._app_install_dir = self.getInstallPrefix() # type: str + + def getAPIVersion(self) -> "Version": + return self._api_version + + # Adds the command line options that can be parsed by the command line parser. + # Can be overridden to add additional command line options to the parser. + def addCommandLineOptions(self) -> None: + self._cli_parser.add_argument("--version", + action = "version", + version = "%(prog)s version: {0}".format(self._version)) + self._cli_parser.add_argument("--external-backend", + action = "store_true", + default = False, + help = "Use an externally started backend instead of starting it automatically. This is a debug feature to make it possible to run the engine with debug options enabled.") + self._cli_parser.add_argument('--headless', + action = 'store_true', + default = False, + help = "Hides all GUI elements.") + self._cli_parser.add_argument("--debug", + action = "store_true", + default = False, + help = "Turn on the debug mode by setting this option.") + + def parseCliOptions(self) -> None: + self._cli_args = self._cli_parser.parse_args() + + self._is_headless = self._cli_args.headless + self._is_debug_mode = self._cli_args.debug or self._is_debug_mode + self._use_external_backend = self._cli_args.external_backend + + # Performs initialization that must be done before start. + def initialize(self) -> None: + # For Ubuntu Unity this makes Qt use its own menu bar rather than pass it on to Unity. + os.putenv("UBUNTU_MENUPROXY", "0") + # Custom signal handling Signal._app = self Signal._signalQueue = self - Resources.ApplicationIdentifier = name - Resources.ApplicationVersion = version + + # Initialize Resources. Set the application name and version here because we can only know the actual info + # after the __init__() has been called. + Resources.ApplicationIdentifier = self._app_name + Resources.ApplicationVersion = self._version Resources.addSearchPath(os.path.join(os.path.dirname(sys.executable), "resources")) - Resources.addSearchPath(os.path.join(Application.getInstallPrefix(), "share", "uranium", "resources")) - Resources.addSearchPath(os.path.join(Application.getInstallPrefix(), "Resources", "uranium", "resources")) - Resources.addSearchPath(os.path.join(Application.getInstallPrefix(), "Resources", self.getApplicationName(), "resources")) + Resources.addSearchPath(os.path.join(self._app_install_dir, "share", "uranium", "resources")) + Resources.addSearchPath(os.path.join(self._app_install_dir, "Resources", "uranium", "resources")) + Resources.addSearchPath(os.path.join(self._app_install_dir, "Resources", self._app_name, "resources")) if not hasattr(sys, "frozen"): Resources.addSearchPath(os.path.join(os.path.abspath(os.path.dirname(__file__)), "..", "resources")) - self._main_thread = threading.current_thread() - - super().__init__() # Call super to make multiple inheritance work. i18nCatalog.setApplication(self) - self._renderer = None - PluginRegistry.addType("backend", self.setBackend) PluginRegistry.addType("logger", Logger.addLogger) PluginRegistry.addType("extension", self.addExtension) - self.default_theme = self.getApplicationName() - - preferences = Preferences.getInstance() - preferences.addPreference("general/language", "en_US") - preferences.addPreference("general/visible_settings", "") - preferences.addPreference("general/visible_settings_preset", "") - preferences.addPreference("general/preset_setting_visibility_choice", "") - - try: - preferences.readFromFile(Resources.getPath(Resources.Preferences, self._application_name + ".cfg")) - except FileNotFoundError: - pass + self._preferences = Preferences() + self._preferences.addPreference("general/language", self._default_language) + self._preferences.addPreference("general/visible_settings", "") + self._preferences.addPreference("general/plugins_to_remove", "") + self._preferences.addPreference("general/disabled_plugins", "") self._controller = Controller(self) - self._mesh_file_handler = MeshFileHandler.getInstance() - self._mesh_file_handler.setApplication(self) - self._workspace_file_handler = WorkspaceFileHandler.getInstance() - self._workspace_file_handler.setApplication(self) - self._extensions = [] - self._backend = None self._output_device_manager = OutputDeviceManager() - self._required_plugins = [] - - self._operation_stack = OperationStack(self.getController()) + self._operation_stack = OperationStack(self._controller) - self._plugin_registry = PluginRegistry.getInstance() + self._plugin_registry = PluginRegistry(self) - self._plugin_registry.addPluginLocation(os.path.join(Application.getInstallPrefix(), "lib", "uranium")) + self._plugin_registry.addPluginLocation(os.path.join(self._app_install_dir, "lib", "uranium")) + self._plugin_registry.addPluginLocation(os.path.join(self._app_install_dir, "lib64", "uranium")) + self._plugin_registry.addPluginLocation(os.path.join(self._app_install_dir, "lib32", "uranium")) self._plugin_registry.addPluginLocation(os.path.join(os.path.dirname(sys.executable), "plugins")) - self._plugin_registry.addPluginLocation(os.path.join(Application.getInstallPrefix(), "Resources", "uranium", "plugins")) - self._plugin_registry.addPluginLocation(os.path.join(Application.getInstallPrefix(), "Resources", self.getApplicationName(), "plugins")) + self._plugin_registry.addPluginLocation(os.path.join(self._app_install_dir, "Resources", "uranium", "plugins")) + self._plugin_registry.addPluginLocation(os.path.join(self._app_install_dir, "Resources", self._app_name, "plugins")) # Locally installed plugins local_path = os.path.join(Resources.getStoragePath(Resources.Resources), "plugins") # Ensure the local plugins directory exists @@ -126,25 +188,41 @@ if not hasattr(sys, "frozen"): self._plugin_registry.addPluginLocation(os.path.join(os.path.abspath(os.path.dirname(__file__)), "..", "plugins")) - self._plugin_registry.setApplication(self) + self._container_registry = self._container_registry_class(self) - ContainerRegistry.setApplication(self) - UM.Settings.InstanceContainer.setContainerRegistry(self.getContainerRegistry()) - UM.Settings.ContainerStack.setContainerRegistry(self.getContainerRegistry()) - - self._command_line_parser = parser - self._parsed_command_line = parsed_command_line - self.parseCommandLine() + UM.Settings.InstanceContainer.setContainerRegistry(self._container_registry) + UM.Settings.ContainerStack.setContainerRegistry(self._container_registry) - self._visible_messages = [] - self._message_lock = threading.Lock() self.showMessageSignal.connect(self.showMessage) self.hideMessageSignal.connect(self.hideMessage) - self._global_container_stack = None + def startSplashWindowPhase(self) -> None: + pass + + def startPostSplashWindowPhase(self) -> None: + pass + + # Indicates if we have just updated from an older application version. + def hasJustUpdatedFromOldVersion(self) -> bool: + return self._just_updated_from_old_version + + ## Run the main event loop. + # This method should be re-implemented by subclasses to start the main event loop. + # \exception NotImplementedError + def run(self): + self.addCommandLineOptions() + self.parseCliOptions() + self.initialize() + + self.startSplashWindowPhase() + self.startPostSplashWindowPhase() def getContainerRegistry(self): - return ContainerRegistry.getInstance() + return self._container_registry + + ## Get the lock filename + def getApplicationLockFilename(self) -> str: + return self._config_lock_filename ## Emitted when the application window was closed and we need to shut down the application applicationShuttingDown = Signal() @@ -157,44 +235,44 @@ workspaceLoaded = Signal() - def setGlobalContainerStack(self, stack: "ContainerStack"): - self._global_container_stack = stack - self.globalContainerStackChanged.emit() + def setGlobalContainerStack(self, stack: "ContainerStack") -> None: + if self._global_container_stack != stack: + self._global_container_stack = stack + self.globalContainerStackChanged.emit() def getGlobalContainerStack(self) -> Optional["ContainerStack"]: return self._global_container_stack - def hideMessage(self, message): + def hideMessage(self, message: Message) -> None: raise NotImplementedError - def showMessage(self, message): + def showMessage(self, message: Message) -> None: raise NotImplementedError - def showToastMessage(self, title: str, message: str): + def showToastMessage(self, title: str, message: str) -> None: raise NotImplementedError ## Get the version of the application - # \returns version \type{string} def getVersion(self) -> str: return self._version - @classmethod - def getStaticVersion(cls): - return "unknown" - - ## Get the buildtype of the application - # \returns version \type{string} + ## Get the build type of the application def getBuildType(self) -> str: return self._build_type def getIsDebugMode(self) -> bool: - return self.getCommandLineOption("debug") + return self._is_debug_mode + + def getIsHeadLess(self) -> bool: + return self._is_headless + + def getUseExternalBackend(self) -> bool: + return self._use_external_backend visibleMessageAdded = Signal() ## Hide message by ID (as provided by built-in id function) - # \param message_id \type{long} - def hideMessageById(self, message_id): + def hideMessageById(self, message_id: int) -> None: # If a user and the application tries to close same message dialog simultaneously, message_id could become an empty # string, and then the application will raise an error when trying to do "int(message_id)". # So we check the message_id here. @@ -212,59 +290,59 @@ visibleMessageRemoved = Signal() ## Get list of all visible messages - # \returns visible_messages \type{list} - def getVisibleMessages(self): + def getVisibleMessages(self) -> List[Message]: with self._message_lock: return self._visible_messages ## Function that needs to be overridden by child classes with a list of plugins it needs. - def _loadPlugins(self): + def _loadPlugins(self) -> None: pass - def getCommandLineOption(self, name, default = None): - if name not in self._parsed_command_line.keys(): - self.parseCommandLine() - Logger.log("d", "Command line options: %s", str(self._parsed_command_line)) - - return self._parsed_command_line.get(name, default) - ## Get name of the application. - # \returns application_name \type{string} + # \returns app_name \type{string} def getApplicationName(self) -> str: - return self._application_name + return self._app_name + + def getApplicationDisplayName(self) -> str: + return self._app_display_name + + ## Get the preferences. + # \return preferences \type{Preferences} + def getPreferences(self) -> Preferences: + return self._preferences + + def savePreferences(self) -> None: + if self._preferences_filename: + self._preferences.writeToFile(self._preferences_filename) + else: + Logger.log("i", "Preferences filename not set. Unable to save file.") ## Get the currently used IETF language tag. # The returned tag is during runtime used to translate strings. - # \returns language_tag \type{string} - def getApplicationLanguage(self): - override_lang = os.getenv("URANIUM_LANGUAGE") - if override_lang: - return override_lang - - preflang = Preferences.getInstance().getValue("general/language") - if preflang: - return preflang - - env_lang = os.getenv("LANGUAGE") - if env_lang: - return env_lang + # \returns Language tag. + def getApplicationLanguage(self) -> str: + language = os.getenv("URANIUM_LANGUAGE") + if not language: + language = self._preferences.getValue("general/language") + if not language: + language = os.getenv("LANGUAGE") + if not language: + language = self._default_language - return "en_US" + return language ## Application has a list of plugins that it *must* have. If it does not have these, it cannot function. # These plugins can not be disabled in any way. - # \returns required_plugins \type{list} - def getRequiredPlugins(self): + def getRequiredPlugins(self) -> List[str]: return self._required_plugins ## Set the plugins that the application *must* have in order to function. # \param plugin_names \type{list} List of strings with the names of the required plugins - def setRequiredPlugins(self, plugin_names: List[str]): + def setRequiredPlugins(self, plugin_names: List[str]) -> None: self._required_plugins = plugin_names ## Set the backend of the application (the program that does the heavy lifting). - # \param backend \type{Backend} - def setBackend(self, backend: "Backend"): + def setBackend(self, backend: "Backend") -> None: self._backend = backend ## Get the backend of the application (the program that does the heavy lifting). @@ -282,115 +360,54 @@ def getController(self) -> Controller: return self._controller - ## Get the MeshFileHandler of this application. - # \returns MeshFileHandler \type{MeshFileHandler} - def getMeshFileHandler(self) -> MeshFileHandler: - return self._mesh_file_handler - - def getWorkspaceFileHandler(self) -> WorkspaceFileHandler: - return self._workspace_file_handler - def getOperationStack(self) -> OperationStack: return self._operation_stack def getOutputDeviceManager(self) -> OutputDeviceManager: return self._output_device_manager - ## Includes eg. last checks before entering the main event loop. - # \returns None \type{None} - def preRun(self): - return None - - ## Run the main event loop. - # This method should be re-implemented by subclasses to start the main event loop. - # \exception NotImplementedError - def run(self): - raise NotImplementedError("Run must be implemented by application") - ## Return an application-specific Renderer object. # \exception NotImplementedError - def getRenderer(self): + def getRenderer(self) -> Renderer: raise NotImplementedError("getRenderer must be implemented by subclasses.") ## Post a function event onto the event loop. # # This takes a CallFunctionEvent object and puts it into the actual event loop. # \exception NotImplementedError - def functionEvent(self, event): + def functionEvent(self, event: CallFunctionEvent) -> None: raise NotImplementedError("functionEvent must be implemented by subclasses.") ## Call a function the next time the event loop runs. # + # You can't get the result of this function directly. It won't block. # \param function The function to call. # \param args The positional arguments to pass to the function. # \param kwargs The keyword arguments to pass to the function. - def callLater(self, func: Callable[[Any], Any], *args, **kwargs): + def callLater(self, func: Callable[..., Any], *args, **kwargs) -> None: event = CallFunctionEvent(func, args, kwargs) self.functionEvent(event) - ## Get the application"s main thread. - def getMainThread(self): + ## Get the application's main thread. + def getMainThread(self) -> threading.Thread: return self._main_thread - ## Return the singleton instance of the application object - @classmethod - def getInstance(cls, **kwargs) -> "Application": - # Note: Explicit use of class name to prevent issues with inheritance. - if not Application._instance: - Application._instance = cls(**kwargs) - - return Application._instance - - def getCommandlineParser(self, with_help = False): - if not self._command_line_parser: - self._command_line_parser = argparse.ArgumentParser(prog = self.getApplicationName(), add_help = with_help) #pylint: disable=bad-whitespace - self.addCommandLineOptions(self._command_line_parser, parsed_command_line = self._parsed_command_line) - return self._command_line_parser - - def parseCommandLine(self): - parser = self.getCommandlineParser() - new_parsed_args = vars(parser.parse_known_args()[0]) - new_parsed_args.update(self._parsed_command_line) - self._parsed_command_line = new_parsed_args - - ## Can be overridden to add additional command line options to the parser. - # - # \param parser \type{argparse.ArgumentParser} The parser that will parse the command line. - @classmethod - def addCommandLineOptions(cls, parser, parsed_command_line = {}): - - parser.add_argument("--version", - action = "version", - version = "%(prog)s {0}".format(cls.getStaticVersion())) - - parser.add_argument("--external-backend", - dest = "external-backend", - action = "store_true", - default = False, - help = "Use an externally started backend instead of starting it automatically. This is a debug feature to make it possible to run the engine with debug options enabled.") - - parser.add_argument('--headless', - action = 'store_true', - default = False, - help = "Hides all GUI elements.") - - if "debug" not in parsed_command_line.keys(): - parser.add_argument("--debug", - action = "store_true", - default = False, - help = "Turn on the debug mode by setting this option.") - - def addExtension(self, extension: "Extension"): + def addExtension(self, extension: "Extension") -> None: self._extensions.append(extension) def getExtensions(self) -> List["Extension"]: return self._extensions @staticmethod - def getInstallPrefix(): + def getInstallPrefix() -> str: if "python" in os.path.basename(sys.executable): - return os.path.abspath(os.path.join(os.path.dirname(sys.argv[0]), "..")) + executable = sys.argv[0] else: - return os.path.abspath(os.path.join(os.path.dirname(sys.executable), "..")) + executable = sys.executable + return os.path.abspath(os.path.join(os.path.dirname(os.path.realpath(executable)), "..")) + + __instance = None # type: Application - _instance = None # type: Application + @classmethod + def getInstance(cls, *args, **kwargs) -> "Application": + return cls.__instance diff -Nru uranium-3.3.0/UM/Backend/Backend.py uranium-4.4.1/UM/Backend/Backend.py --- uranium-3.3.0/UM/Backend/Backend.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Backend/Backend.py 2019-11-19 10:50:46.000000000 +0000 @@ -1,23 +1,23 @@ -# Copyright (c) 2017 Ultimaker B.V. +# Copyright (c) 2018 Ultimaker B.V. # Uranium is released under the terms of the LGPLv3 or higher. from enum import IntEnum +import struct +import subprocess +import sys +import threading +from time import sleep +from typing import Any, Dict, Optional from UM.Backend.SignalSocket import SignalSocket -from UM.Preferences import Preferences from UM.Logger import Logger from UM.Signal import Signal, signalemitter -from UM.Application import Application +import UM.Application from UM.PluginObject import PluginObject from UM.Platform import Platform import Arcus -import struct -import subprocess -import threading -import sys -from time import sleep ## The current processing state of the backend. class BackendState(IntEnum): @@ -41,17 +41,24 @@ self._socket = None self._port = 49674 - self._process = None + self._process = None # type: Optional[subprocess.Popen] self._backend_log = [] self._backend_log_max_lines = None - Application.getInstance().callLater(self._createSocket) + self._backend_state = BackendState.NotStarted + + UM.Application.Application.getInstance().callLater(self._createSocket) processingProgress = Signal() backendStateChange = Signal() backendConnected = Signal() backendQuit = Signal() + def setState(self, new_state): + if new_state != self._backend_state: + self._backend_state = new_state + self.backendStateChange.emit(self._backend_state) + ## \brief Start the backend / engine. # Runs the engine, this is only called when the socket is fully opened & ready to accept connections def startEngine(self): @@ -87,7 +94,11 @@ self._socket.close() def _backendLog(self, line): - Logger.log('d', "[Backend] " + str(line, encoding="utf-8").strip()) + try: + line_str = line.decode("utf-8") + except UnicodeDecodeError: + line_str = line.decode("latin1") #Latin-1 as a fallback since it can never give decoding errors. All characters are 1 byte. + Logger.log("d", "[Backend] " + line_str.strip()) self._backend_log.append(line) ## Get the logging messages of the backend connection. @@ -97,38 +108,14 @@ while len(self._backend_log) >= self._backend_log_max_lines: del(self._backend_log[0]) return self._backend_log - - ## \brief Convert byte array containing 3 floats per vertex - def convertBytesToVerticeList(self, data): - result = [] - if not (len(data) % 12): - if data is not None: - for index in range(0, int(len(data) / 12)): # For each 12 bits (3 floats) - result.append(struct.unpack("fff", data[index * 12: index * 12 + 12])) - return result - else: - Logger.log("e", "Data length was incorrect for requested type") - return None - - ## \brief Convert byte array containing 6 floats per vertex - def convertBytesToVerticeWithNormalsList(self,data): - result = [] - if not (len(data) % 24): - if data is not None: - for index in range(0,int(len(data)/24)): # For each 24 bits (6 floats) - result.append(struct.unpack("ffffff", data[index * 24: index * 24 + 24])) - return result - else: - Logger.log("e", "Data length was incorrect for requested type") - return None ## Get the command used to start the backend executable def getEngineCommand(self): - return [Preferences.getInstance().getValue("backend/location"), "--port", str(self._socket.getPort())] + return [UM.Application.Application.getInstance().getPreferences().getValue("backend/location"), "--port", str(self._socket.getPort())] ## Start the (external) backend process. - def _runEngineProcess(self, command_list): - kwargs = {} + def _runEngineProcess(self, command_list) -> Optional[subprocess.Popen]: + kwargs = {} #type: Dict[str, Any] if sys.platform == "win32": su = subprocess.STARTUPINFO() su.dwFlags |= subprocess.STARTF_USESHOWWINDOW @@ -141,10 +128,17 @@ Logger.log("e", "Couldn't start back-end: No permission to execute process.") except FileNotFoundError: Logger.logException("e", "Unable to find backend executable: %s", command_list[0]) + except BlockingIOError: + Logger.log("e", "Couldn't start back-end: Resource is temporarily unavailable") + return None def _storeOutputToLogThread(self, handle): while True: - line = handle.readline() + try: + line = handle.readline() + except OSError: + Logger.logException("w", "Exception handling stdout log from backend.") + continue if line == b"": self.backendQuit.emit() break @@ -152,7 +146,11 @@ def _storeStderrToLogThread(self, handle): while True: - line = handle.readline() + try: + line = handle.readline() + except OSError: + Logger.logException("w", "Exception handling stderr log from backend.") + continue if line == b"": break self._backendLog(line) @@ -161,7 +159,7 @@ def _onSocketStateChanged(self, state): self._logSocketState(state) if state == Arcus.SocketState.Listening: - if not Application.getInstance().getCommandLineOption("external-backend", False): + if not UM.Application.Application.getInstance().getUseExternalBackend(): self.startEngine() elif state == Arcus.SocketState.Connected: Logger.log("d", "Backend connected on port %s", self._port) @@ -229,13 +227,14 @@ if Platform.isWindows(): # On Windows, the Protobuf DiskSourceTree does stupid things with paths. # So convert to forward slashes here so it finds the proto file properly. - protocol_file = protocol_file.replace("\\", "/") + # Using sys.getfilesystemencoding() avoid the application crashing if it is + # installed on a path with non-ascii characters GitHub issue #3907 + protocol_file = protocol_file.replace("\\", "/").encode(sys.getfilesystemencoding()) if not self._socket.registerAllMessageTypes(protocol_file): Logger.log("e", "Could not register Uranium protocol messages: %s", self._socket.getLastError()) - if Application.getInstance().getCommandLineOption("external-backend", False): + if UM.Application.Application.getInstance().getUseExternalBackend(): Logger.log("i", "Listening for backend connections on %s", self._port) self._socket.listen("127.0.0.1", self._port) - diff -Nru uranium-3.3.0/UM/Benchmark.py uranium-4.4.1/UM/Benchmark.py --- uranium-3.3.0/UM/Benchmark.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Benchmark.py 1970-01-01 00:00:00.000000000 +0000 @@ -1,24 +0,0 @@ -# Copyright (c) 2018 Ultimaker B.V. -# Uranium is released under the terms of the LGPLv3 or higher. - -import time -from UM.Logger import Logger -from UM.Application import Application - -## Static class used for benchmarking purposes. This class is only meant to be used as a static class. -class Benchmark: - - _start_time = None - - def __init__(self): - raise Exception("This class is static only") - - @classmethod - def start(cls, reference_text): - Logger.log("d", "[BENCHMARK STARTS] %s", reference_text) - Application.getInstance().callLater(cls._finished) - cls._start_time = time.time() - - @classmethod - def _finished(cls): - Logger.log("d", "[BENCHMARK ENDS] Total time: %s", time.time() - cls._start_time) diff -Nru uranium-3.3.0/UM/ConfigurationErrorMessage.py uranium-4.4.1/UM/ConfigurationErrorMessage.py --- uranium-3.3.0/UM/ConfigurationErrorMessage.py 1970-01-01 00:00:00.000000000 +0000 +++ uranium-4.4.1/UM/ConfigurationErrorMessage.py 2019-11-19 10:50:46.000000000 +0000 @@ -0,0 +1,60 @@ +# Copyright (c) 2018 Ultimaker B.V. +# Uranium is released under the terms of the LGPLv3 or higher. + +import itertools +import sys +from typing import Iterable, Union, Optional + +from PyQt5.QtWidgets import QMessageBox + +from UM.i18n import i18nCatalog +from UM.Message import Message +from UM.Resources import Resources + +i18n_catalog = i18nCatalog("uranium") + + +## This is a specialised message that shows errors in the configuration. +# +# This class coalesces all errors in the configuration. Whenever there are new +# errors the message gets updated (and shown if it was hidden). +class ConfigurationErrorMessage(Message): + + def __init__(self, application, *args, **kwargs): + if ConfigurationErrorMessage.__instance is not None: + raise RuntimeError("Try to create singleton '%s' more than once" % self.__class__.__name__) + ConfigurationErrorMessage.__instance = self + + super().__init__(*args, **kwargs) + self._application = application + self._faulty_containers = set() + + self.addAction("reset", name = i18n_catalog.i18nc("@action:button", "Reset"), icon = None, description = "Reset your configuration to factory defaults.") + self.actionTriggered.connect(self._actionTriggered) + + # Show more containers which we know are faulty. + def addFaultyContainers(self, faulty_containers: Union[Iterable, str], *args): + initial_length = len(self._faulty_containers) + if isinstance(faulty_containers, str): + faulty_containers = [faulty_containers] + for container in itertools.chain(faulty_containers, args): + self._faulty_containers.add(container) + + if initial_length != len(self._faulty_containers): + self.setText(i18n_catalog.i18nc("@info:status", "Your configuration seems to be corrupt. Something seems to be wrong with the following profiles:\n- {profiles}\n Would you like to reset to factory defaults? Reset will remove all your current printers and profiles.").format(profiles = "\n- ".join(self._faulty_containers))) + self.show() + + def _actionTriggered(self, _, action_id): + if action_id == "reset": + result = QMessageBox.question(None, i18n_catalog.i18nc("@title:window", "Reset to factory"), + i18n_catalog.i18nc("@label", + "Reset will remove all your current printers and profiles! Are you sure you want to reset?")) + if result == QMessageBox.Yes: + Resources.factoryReset() + sys.exit(1) + + __instance = None # type: ConfigurationErrorMessage + + @classmethod + def getInstance(cls, *args, **kwargs) -> "ConfigurationErrorMessage": + return cls.__instance diff -Nru uranium-3.3.0/UM/Controller.py uranium-4.4.1/UM/Controller.py --- uranium-3.3.0/UM/Controller.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Controller.py 2019-11-19 10:50:46.000000000 +0000 @@ -1,7 +1,9 @@ -# Copyright (c) 2017 Ultimaker B.V. +# Copyright (c) 2018 Ultimaker B.V. # Uranium is released under the terms of the LGPLv3 or higher. +from UM.Scene.Iterator.DepthFirstIterator import DepthFirstIterator from UM.Scene.Scene import Scene -from UM.Event import Event, MouseEvent, ToolEvent, ViewEvent +from UM.Event import Event, KeyEvent, MouseEvent, ToolEvent, ViewEvent +from UM.Scene.SceneNode import SceneNode from UM.Signal import Signal, signalemitter from UM.Logger import Logger from UM.PluginRegistry import PluginRegistry @@ -10,59 +12,53 @@ from UM.View.View import View from UM.Stage import Stage from UM.InputDevice import InputDevice -from typing import Optional, Dict +from typing import cast, Optional, Dict, Union from UM.Math.Vector import Vector - MYPY = False if MYPY: from UM.Application import Application from UM.Tool import Tool -## Glue class that holds the scene, (active) view(s), (active) tool(s) and possible user inputs. + +## Glue class that holds the scene, (active) view(s), (active) tool(s) and possible user inputs. # -# The different types of views / tools / inputs are defined by plugins. -# \sa View -# \sa Tool -# \sa Scene +# The different types of views / tools / inputs are defined by plugins. +# \sa View +# \sa Tool +# \sa Scene @signalemitter class Controller: - def __init__(self, application: "Application"): + def __init__(self, application: "Application") -> None: super().__init__() # Call super to make multiple inheritance work. self._scene = Scene() self._application = application - self._is_model_rendering_enabled = True self._active_view = None # type: Optional[View] self._views = {} # type: Dict[str, View] self._active_tool = None # type: Optional[Tool] + self._fallback_tool = "TranslateTool" # type: str self._tool_operation_active = False self._tools = {} # type: Dict[str, Tool] - self._camera_tool = None - self._selection_tool = None - self._tools_enabled = True + self._camera_tool = None #type: Optional[Tool] + self._selection_tool = None #type: Optional[Tool] + self._tools_enabled = True #type: bool - self._active_stage = None - self._stages = {} + self._active_stage = None #type: Optional[Stage] + self._stages = {} #type: Dict[str, Stage] - self._input_devices = {} + self._input_devices = {} #type: Dict[str, InputDevice] PluginRegistry.addType("stage", self.addStage) PluginRegistry.addType("view", self.addView) PluginRegistry.addType("tool", self.addTool) PluginRegistry.addType("input_device", self.addInputDevice) - ## Get the application. - # \returns Application \type {Application} - def getApplication(self): - return self._application - ## Add a view by name if it"s not already added. - # \param name \type{string} Unique identifier of view (usually the plugin name) # \param view \type{View} The view to be added - def addView(self, view: View): - name = view.getPluginId() + def addView(self, view: View) -> None: + name = view.getId() if name not in self._views: self._views[name] = view view.setRenderer(self._application.getRenderer()) @@ -71,7 +67,6 @@ Logger.log("w", "%s was already added to view list. Unable to add it again.", name) ## Request view by name. Returns None if no view is found. - # \param name \type{string} Unique identifier of view (usually the plugin name) # \return View \type{View} if name was found, none otherwise. def getView(self, name: str) -> Optional[View]: try: @@ -92,7 +87,7 @@ ## Set the currently active view. # \param name \type{string} The name of the view to set as active - def setActiveView(self, name: str): + def setActiveView(self, name: str) -> None: Logger.log("d", "Setting active view to %s", name) try: if self._active_view: @@ -109,15 +104,6 @@ except Exception as e: Logger.logException("e", "An exception occurred while switching views: %s", str(e)) - def enableModelRendering(self): - self._is_model_rendering_enabled = True - - def disableModelRendering(self): - self._is_model_rendering_enabled = False - - def isModelRenderingEnabled(self): - return self._is_model_rendering_enabled - ## Emitted when the list of views changes. viewsChanged = Signal() @@ -127,8 +113,8 @@ ## Add a stage by name if it's not already added. # \param name \type{string} Unique identifier of stage (usually the plugin name) # \param stage \type{Stage} The stage to be added - def addStage(self, stage: Stage): - name = stage.getPluginId() + def addStage(self, stage: Stage) -> None: + name = stage.getId() if name not in self._stages: self._stages[name] = stage self.stagesChanged.emit() @@ -155,11 +141,19 @@ ## Set the currently active stage. # \param name \type{string} The name of the stage to set as active - def setActiveStage(self, name: str): - Logger.log("d", "Setting active stage to %s", name) + def setActiveStage(self, name: str) -> None: try: - self._active_stage = self._stages[name] - self.activeStageChanged.emit() + # Don't actually change the stage if it is the current selected one. + if self._active_stage != self._stages[name]: + previous_stage = self._active_stage + Logger.log("d", "Setting active stage to %s", name) + self._active_stage = self._stages[name] + + # If there is no error switching stages, then finish first the previous stage (if it exists) and start the new stage + if previous_stage is not None: + previous_stage.onStageDeselected() + self._active_stage.onStageSelected() + self.activeStageChanged.emit() except KeyError: Logger.log("e", "No stage named %s found", name) except Exception as e: @@ -173,8 +167,8 @@ ## Add an input device (e.g. mouse, keyboard, etc) if it's not already added. # \param device The input device to be added - def addInputDevice(self, device: InputDevice): - name = device.getPluginId() + def addInputDevice(self, device: InputDevice) -> None: + name = device.getId() if name not in self._input_devices: self._input_devices[name] = device device.event.connect(self.event) @@ -194,15 +188,26 @@ ## Remove an input device from the list of input devices. # Does nothing if the input device is not in the list. # \param name \type{string} The name of the device to remove. - def removeInputDevice(self, name: str): + def removeInputDevice(self, name: str) -> None: if name in self._input_devices: self._input_devices[name].event.disconnect(self.event) del self._input_devices[name] - ## Request tool by name. Returns None if no view is found. + ## Request the current fallbacl tool. + # \return Id of the fallback tool + def getFallbackTool(self) -> str: + return self._fallback_tool + + ## Set the current active tool. The tool must be set by name. + # \param tool The tools name which shall be used as fallback + def setFallbackTool(self, tool: str) -> None: + if self._fallback_tool is not tool: + self._fallback_tool = tool + + ## Request tool by name. Returns None if no tool is found. # \param name \type{string} Unique identifier of tool (usually the plugin name) - # \return tool \type{Tool} if name was found, none otherwise. - def getTool(self, name: str): + # \return tool \type{Tool} if name was found, None otherwise. + def getTool(self, name: str) -> Optional["Tool"]: try: return self._tools[name] except KeyError: # No such tool @@ -211,13 +216,13 @@ ## Get all tools # \return tools \type{dict} - def getAllTools(self): + def getAllTools(self) -> Dict[str, "Tool"]: return self._tools ## Add a Tool (transform object, translate object) if its not already added. # \param tool \type{Tool} Tool to be added - def addTool(self, tool): - name = tool.getPluginId() + def addTool(self, tool: "Tool") -> None: + name = tool.getId() if name not in self._tools: self._tools[name] = tool tool.operationStarted.connect(self._onToolOperationStarted) @@ -226,12 +231,12 @@ else: Logger.log("w", "%s was already added to tool list. Unable to add it again.", name) - def _onToolOperationStarted(self, tool): + def _onToolOperationStarted(self, tool: "Tool") -> None: if not self._tool_operation_active: self._tool_operation_active = True self.toolOperationStarted.emit(tool) - def _onToolOperationStopped(self, tool): + def _onToolOperationStopped(self, tool: "Tool") -> None: if self._tool_operation_active: self._tool_operation_active = False self.toolOperationStopped.emit(tool) @@ -242,20 +247,20 @@ return self._tool_operation_active ## Request active tool. Returns None if there is no active tool - # \return Tool \type{Tool} if an tool is active, None otherwise. - def getActiveTool(self): + # \return Tool if a tool is active, None otherwise. + def getActiveTool(self) -> Optional["Tool"]: return self._active_tool ## Set the current active tool. # The tool can be set by name of the tool or directly passing the tool object. - # \param tool \type{Tool} or \type{string} - def setActiveTool(self, tool): + # \param tool A tool object or the name of a tool. + def setActiveTool(self, tool: Optional[Union["Tool", str]]): from UM.Tool import Tool if self._active_tool: self._active_tool.event(ToolEvent(ToolEvent.ToolDeactivateEvent)) if isinstance(tool, Tool) or tool is None: - new_tool = tool + new_tool = cast(Optional[Tool], tool) else: new_tool = self.getTool(tool) @@ -269,14 +274,16 @@ from UM.Scene.Selection import Selection # Imported here to prevent a circular dependency. if not self._active_tool and Selection.getCount() > 0: # If something is selected, a tool must always be active. - if "TranslateTool" in self._tools: - self._active_tool = self._tools["TranslateTool"] # Then default to the translation tool. + if self._fallback_tool in self._tools: + self._active_tool = self._tools[self._fallback_tool] # Then default to the translation tool. self._active_tool.event(ToolEvent(ToolEvent.ToolActivateEvent)) tool_changed = True else: Logger.log("w", "Controller does not have an active tool and could not default to Translate tool.") if tool_changed: + Selection.setFaceSelectMode(False) + Selection.clearFace() self.activeToolChanged.emit() ## Emitted when the list of tools changes. @@ -307,33 +314,34 @@ ## Process an event # \param event \type{Event} event to be handle. - # The event is first passed to the camera tool, then active tool and finally selection tool. + # The event is first passed to the selection tool, then the active tool and finally the camera tool. # If none of these events handle it (when they return something that does not evaluate to true) # a context menu signal is emitted. def event(self, event: Event): - # First, try to perform camera control + if self._selection_tool and self._selection_tool.event(event): + return + + if self._active_tool and self._active_tool.event(event): + return + if self._camera_tool and self._camera_tool.event(event): return if self._tools and event.type == Event.KeyPressEvent: + event = cast(KeyEvent, event) from UM.Scene.Selection import Selection # Imported here to prevent a circular dependency. if Selection.hasSelection(): for key, tool in self._tools.items(): if tool.getShortcutKey() is not None and event.key == tool.getShortcutKey(): self.setActiveTool(tool) - if self._selection_tool and self._selection_tool.event(event): - return - - # If we are not doing camera control, pass the event to the active tool. - if self._active_tool and self._active_tool.event(event): - return - if self._active_view: self._active_view.event(event) - if event.type == Event.MouseReleaseEvent and MouseEvent.RightButton in event.buttons: - self.contextMenuRequested.emit(event.x, event.y) + if event.type == Event.MouseReleaseEvent: + event = cast(MouseEvent, event) + if MouseEvent.RightButton in event.buttons: + self.contextMenuRequested.emit(event.x, event.y) contextMenuRequested = Signal() @@ -343,16 +351,16 @@ # \param tool \type{Tool} or \type{string} # \sa setSelectionTool # \sa setActiveTool - def setCameraTool(self, tool): + def setCameraTool(self, tool: Union["Tool", str]): from UM.Tool import Tool if isinstance(tool, Tool) or tool is None: - self._camera_tool = tool + self._camera_tool = cast(Optional[Tool], tool) else: self._camera_tool = self.getTool(tool) ## Get the camera tool (if any) # \returns camera tool (or none) - def getCameraTool(self): + def getCameraTool(self) -> Optional["Tool"]: return self._camera_tool ## Set the tool used for performing selections. @@ -361,42 +369,100 @@ # \param tool \type{Tool} or \type{string} # \sa setCameraTool # \sa setActiveTool - def setSelectionTool(self, tool): + def setSelectionTool(self, tool: Union[str, "Tool"]): from UM.Tool import Tool if isinstance(tool, Tool) or tool is None: - self._selection_tool = tool + self._selection_tool = cast(Optional[Tool], tool) else: self._selection_tool = self.getTool(tool) - def getToolsEnabled(self): + def getToolsEnabled(self) -> bool: return self._tools_enabled - def setToolsEnabled(self, enabled): + def setToolsEnabled(self, enabled: bool) -> None: self._tools_enabled = enabled + def deleteAllNodesWithMeshData(self, only_selectable:bool = True) -> None: + Logger.log("i", "Clearing scene") + if not self.getToolsEnabled(): + return + + nodes = [] + for node in DepthFirstIterator(self.getScene().getRoot()): + if not node.isEnabled(): + continue + if not node.getMeshData() and not node.callDecoration("isGroup"): + continue # Node that doesnt have a mesh and is not a group. + if only_selectable and not node.isSelectable(): + continue # Only remove nodes that are selectable. + if node.getParent() and cast(SceneNode, node.getParent()).callDecoration("isGroup"): + continue # Grouped nodes don't need resetting as their parent (the group) is resetted) + nodes.append(node) + if nodes: + from UM.Operations.GroupedOperation import GroupedOperation + op = GroupedOperation() + + for node in nodes: + from UM.Operations.RemoveSceneNodeOperation import RemoveSceneNodeOperation + op.addOperation(RemoveSceneNodeOperation(node)) + + # Reset the print information + self.getScene().sceneChanged.emit(node) + + op.push() + from UM.Scene.Selection import Selection + Selection.clear() + # Rotate camera view according defined angle - def rotateView(self, coordinate = "x", angle = 0): + def setCameraRotation(self, coordinate: str = "x", angle: int = 0) -> None: camera = self._scene.getActiveCamera() - self._camera_tool.setOrigin(Vector(0, 100, 0)) + if not camera: + return + camera.setZoomFactor(camera.getDefaultZoomFactor()) + self._camera_tool.setOrigin(Vector(0, 100, 0)) # type: ignore + self.setCameraOrigin(coordinate) if coordinate == "home": - camera.setPosition(Vector(0, 0, 700)) - camera.setPerspective(True) - camera.lookAt(Vector(0, 100, 100)) - self._camera_tool.rotateCam(0, 0) + camera.setPosition(Vector(0, 100, 700)) + self._camera_tool.rotateCamera(0, 0) # type: ignore elif coordinate == "3d": camera.setPosition(Vector(-750, 600, 700)) - camera.setPerspective(True) - camera.lookAt(Vector(0, 100, 100)) - self._camera_tool.rotateCam(0, 0) - + self._camera_tool.rotateCamera(0, 0) # type: ignore else: # for comparison is == used, because might not store them at the same location # https://stackoverflow.com/questions/1504717/why-does-comparing-strings-in-python-using-either-or-is-sometimes-produce - camera.setPosition(Vector(0, 0, 700)) - camera.setPerspective(True) - camera.lookAt(Vector(0, 100, 0)) if coordinate == "x": - self._camera_tool.rotateCam(angle, 0) + camera.setPosition(Vector(0, 100, 700)) + self._camera_tool.rotateCamera(angle, 0) # type: ignore elif coordinate == "y": - self._camera_tool.rotateCam(0, angle) \ No newline at end of file + if angle == 90: + # Prepare the camera for top view, so no rotation has to be applied after setting the top view. + camera.setPosition(Vector(0, 100, 100)) + self._camera_tool.rotateCamera(90, 0) # type: ignore + # Actually set the top view. + camera.setPosition(Vector(0, 800, 1)) + self.setCameraOrigin("z") + camera.lookAt(Vector(0, 100, 1)) + self._camera_tool.rotateCamera(0, 0) # type: ignore + else: + camera.setPosition(Vector(0, 100, 700)) + self._camera_tool.rotateCamera(0, angle) # type: ignore + + ## Changes the origin of the camera, i.e. where it looks at. + # \param coordinate One of the following options: + # - "home": The centre of the build plate. + # - "3d": The centre of the build volume. + # - "x", "y" and "z": Also the centre of the build plate. These are just + # aliases for the setCameraRotation function. + def setCameraOrigin(self, coordinate: str = "home"): + camera = self._scene.getActiveCamera() + if not camera: + return + coordinates = { + "home": Vector(0, 100, 0), + "3d": Vector(0, 100, 100), + "x": Vector(0, 100, 0), + "y": Vector(0, 100, 0), + "z": Vector(0, 100, 1) + } + camera.lookAt(coordinates[coordinate]) \ No newline at end of file diff -Nru uranium-3.3.0/UM/Decorators.py uranium-4.4.1/UM/Decorators.py --- uranium-3.3.0/UM/Decorators.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Decorators.py 2019-11-19 10:50:46.000000000 +0000 @@ -1,4 +1,4 @@ -# Copyright (c) 2016 Ultimaker B.V. +# Copyright (c) 2018 Ultimaker B.V. # Uranium is released under the terms of the LGPLv3 or higher. import copy @@ -6,7 +6,7 @@ import inspect from UM.Logger import Logger - +import time ## Decorator that can be used to indicate a method has been deprecated # @@ -16,7 +16,7 @@ def deprecated_decorator(function): def deprecated_function(*args, **kwargs): warning = "{0} is deprecated (since {1}): {2}".format(function, since, message) - Logger.log("w", warning) + Logger.log("w_once", warning) warnings.warn(warning, DeprecationWarning, stacklevel=2) return function(*args, **kwargs) return deprecated_function @@ -83,13 +83,14 @@ # Then, replace the new method with a method that checks if all methods have been reimplemented old_new = cls.__new__ def new_new(subclass, *args, **kwargs): - for method in filter(lambda i: inspect.isfunction(i[1]) and not i[1].__name__.startswith("__") and not i[0].startswith("__"), inspect.getmembers(cls)): - sub_method = getattr(subclass, method[0]) - if sub_method == method[1]: - raise NotImplementedError("Class {0} does not implement the complete interface of {1}: Missing method {2}".format(subclass, cls, method[0])) + if cls != subclass: + for method in filter(lambda i: inspect.isfunction(i[1]) and not i[1].__name__.startswith("__") and not i[0].startswith("__"), inspect.getmembers(cls)): + sub_method = getattr(subclass, method[0]) + if sub_method == method[1]: + raise NotImplementedError("Class {0} does not implement the complete interface of {1}: Missing method {2}".format(subclass, cls, method[0])) - if not sameSignature(inspect.signature(sub_method), inspect.signature(method[1])): - raise NotImplementedError("Method {0} of class {1} does not have the same signature as method {2} in interface {3}: {4} vs {5}".format(sub_method, subclass, method[1], cls, inspect.signature(sub_method), inspect.signature(method[1]))) + if not sameSignature(inspect.signature(sub_method), inspect.signature(method[1])): + raise NotImplementedError("Method {0} of class {1} does not have the same signature as method {2} in interface {3}: {4} vs {5}".format(sub_method, subclass, method[1], cls, inspect.signature(sub_method), inspect.signature(method[1]))) if old_new == object.__new__: return object.__new__(subclass) # Because object.__new__() complains if we pass it *args and **kwargs @@ -108,3 +109,19 @@ def sameSignature(a: inspect.Signature, b: inspect.Signature) -> bool: return len(a.parameters) == len(b.parameters) + + +def timeit(method): + def timed(*args, **kw): + ts = time.time() + result = method(*args, **kw) + te = time.time() + + if "log_time" in kw: + name = kw.get("log_name", method.__name__.upper()) + kw["log_time"][name] = int((te - ts) * 1000) + else: + print("Function %r took %2.2f ms" % (method.__name__, (te - ts) * 1000)) + return result + + return timed \ No newline at end of file diff -Nru uranium-3.3.0/UM/Event.py uranium-4.4.1/UM/Event.py --- uranium-3.3.0/UM/Event.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Event.py 2019-11-19 10:50:46.000000000 +0000 @@ -7,7 +7,7 @@ ## Base event class. # Defines the most basic interface for events and several constants to identify event types. -from typing import List, Any, Callable +from typing import List, Any, Callable, Optional class Event: @@ -72,12 +72,12 @@ ## The X coordinate of the previous event. @property - def lastX(self) -> int: + def lastX(self) -> Optional[int]: return self._last_x ## The Y coordinate of the previous event. @property - def lastY(self) -> int: + def lastY(self) -> Optional[int]: return self._last_y ## The change in X position between this event and the previous event. diff -Nru uranium-3.3.0/UM/Extension.py uranium-4.4.1/UM/Extension.py --- uranium-3.3.0/UM/Extension.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Extension.py 2019-11-19 10:50:46.000000000 +0000 @@ -28,7 +28,7 @@ ## Get the name of the menu where all menu items are placed in # \param menu name \type{string} - def getMenuName(self) -> str: + def getMenuName(self) -> Optional[str]: return self._menu_name ## Call function associated with option diff -Nru uranium-3.3.0/UM/FileHandler/FileHandler.py uranium-4.4.1/UM/FileHandler/FileHandler.py --- uranium-3.3.0/UM/FileHandler/FileHandler.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/FileHandler/FileHandler.py 2019-11-19 10:50:46.000000000 +0000 @@ -1,34 +1,36 @@ -# Copyright (c) 2016 Ultimaker B.V. +# Copyright (c) 2018 Ultimaker B.V. # Uranium is released under the terms of the LGPLv3 or higher. -from UM.PluginRegistry import PluginRegistry -from UM.Logger import Logger +from typing import Any, Dict, List, Optional, Union, TYPE_CHECKING, cast + +from .FileReader import FileReader from .FileWriter import FileWriter from PyQt5.QtCore import QObject, pyqtProperty, pyqtSlot, QUrl +from UM.Logger import Logger from UM.Platform import Platform +from UM.PluginRegistry import PluginRegistry from UM.i18n import i18nCatalog i18n_catalog = i18nCatalog("uranium") -MYPY = False -if MYPY: - from UM.Application import Application - from UM.Mesh.MeshReader import MeshReader - from UM.Mesh.MeshWriter import MeshWriter -from typing import Optional, Dict +if TYPE_CHECKING: + from UM.Qt.QtApplication import QtApplication ## Central class for reading and writing meshes. # This class is created by Application and handles reading and writing mesh files. class FileHandler(QObject): - _instance = None # type: FileHandler - _application = None # type: Application - def __init__(self, writer_type: str, reader_type: str, parent = None): + def __init__(self, application: "QtApplication", writer_type: str = "unknown_file_writer", reader_type: str = "unknown_file_reader", parent: QObject = None) -> None: + if cast(FileHandler, self.__class__).__instance is not None: + raise RuntimeError("Try to create singleton '%s' more than once" % self.__class__.__name__) + cast(FileHandler, self.__class__).__instance = self + super().__init__(parent) - self._readers = {} # type: Dict[str, MeshReader] - self._writers = {} # type: Dict[str, MeshWriter] + self._application = application + self._readers = {} # type: Dict[str, FileReader] + self._writers = {} # type: Dict[str, FileWriter] self._writer_type = writer_type # type: str self._reader_type = reader_type # type: str @@ -36,24 +38,8 @@ PluginRegistry.addType(self._writer_type, self.addWriter) PluginRegistry.addType(self._reader_type, self.addReader) - @classmethod - def setApplication(cls, application): - cls._application = application - - @classmethod - def getApplication(cls): - return cls._application - - ## Return the singleton instance of the filehandler. - @classmethod - def getInstance(cls, *args, **kwargs) -> "FileHandler": - if not cls._instance: - cls._instance = cls() - - return cls._instance - - @pyqtProperty("QStringList", constant=True) - def supportedReadFileTypes(self): + @pyqtProperty("QStringList", constant = True) + def supportedReadFileTypes(self) -> List[str]: file_types = [] all_types = [] @@ -72,8 +58,8 @@ return file_types - @pyqtProperty("QStringList", constant=True) - def supportedWriteFileTypes(self): + @pyqtProperty("QStringList", constant = True) + def supportedWriteFileTypes(self) -> List[str]: file_types = [] for item in self.getSupportedFileTypesWrite(): @@ -84,17 +70,17 @@ return file_types @pyqtSlot(QUrl) - def readLocalFile(self, file): + def readLocalFile(self, file: QUrl) -> None: if not file.isValid(): return self._readLocalFile(file) - def _readLocalFile(self, file): + def _readLocalFile(self, file: QUrl) -> None: raise NotImplementedError("_readLocalFile needs to be implemented by subclasses") ## Get list of all supported filetypes for writing. # \return List of dicts containing id, extension, description and mime_type for all supported file types. - def getSupportedFileTypesWrite(self): + def getSupportedFileTypesWrite(self) -> List[Dict[str, Union[str, int]]]: supported_types = [] meta_data = PluginRegistry.getInstance().getAllMetaData(filter={self._writer_type: {}}, active_only=True) for entry in meta_data: @@ -103,18 +89,20 @@ description = output.get("description", ext) mime_type = output.get("mime_type", "text/plain") mode = output.get("mode", FileWriter.OutputMode.TextMode) + hide_in_file_dialog = output.get("hide_in_file_dialog", False) supported_types.append({ "id": entry["id"], "extension": ext, "description": description, "mime_type": mime_type, - "mode": mode + "mode": mode, + "hide_in_file_dialog": hide_in_file_dialog, }) return supported_types # Get list of all supported file types for reading. - # \returns List of strings with all supported file types. - def getSupportedFileTypesRead(self): + # \returns For each supported file type, the description of the plug-in. + def getSupportedFileTypesRead(self) -> Dict[str, str]: supported_types = {} meta_data = PluginRegistry.getInstance().getAllMetaData(filter={self._reader_type: {}}, active_only=True) for entry in meta_data: @@ -126,10 +114,10 @@ supported_types[ext] = description return supported_types - def addReader(self, reader: "MeshReader"): + def addReader(self, reader: "FileReader") -> None: self._readers[reader.getPluginId()] = reader - def addWriter(self, writer: "MeshWriter"): + def addWriter(self, writer: "FileWriter") -> None: self._writers[writer.getPluginId()] = writer # Try to read the data from a file using a specified Reader. @@ -137,15 +125,15 @@ # \param file_name The name of the file to load. # \param kwargs Keyword arguments. # \returns None if nothing was found - def readerRead(self, reader, file_name, **kwargs): + def readerRead(self, reader: FileReader, file_name: str, **kwargs: Any): raise NotImplementedError("readerRead must be implemented by subclasses.") ## Get a mesh writer object that supports writing the specified mime type # # \param mime The mime type that should be supported. - # \return A MeshWriter instance or None if no mesh writer supports the specified mime type. If there are multiple + # \return A FileWriter instance or None if no mesh writer supports the specified mime type. If there are multiple # writers that support the specified mime type, the first entry is returned. - def getWriterByMimeType(self, mime) -> Optional["MeshWriter"]: + def getWriterByMimeType(self, mime: str) -> Optional["FileWriter"]: writer_data = PluginRegistry.getInstance().getAllMetaData(filter={self._writer_type: {}}, active_only=True) for entry in writer_data: for output in entry[self._writer_type].get("output", []): @@ -155,7 +143,7 @@ return None ## Get an instance of a mesh writer by ID - def getWriter(self, writer_id) -> Optional["MeshWriter"]: + def getWriter(self, writer_id: str) -> Optional["FileWriter"]: if writer_id not in self._writers: return None @@ -164,7 +152,7 @@ ## Find a Reader that accepts the given file name. # \param file_name The name of file to load. # \returns Reader that accepts the given file name. If no acceptable Reader is found None is returned. - def getReaderForFile(self, file_name) -> Optional["MeshReader"]: + def getReaderForFile(self, file_name: str) -> Optional["FileReader"]: for id, reader in self._readers.items(): try: if reader.acceptsFile(file_name): @@ -172,4 +160,10 @@ except Exception as e: Logger.log("e", str(e)) - return None \ No newline at end of file + return None + + __instance = None # type: FileHandler + + @classmethod + def getInstance(cls, *args, **kwargs) -> "FileHandler": + return cls.__instance diff -Nru uranium-3.3.0/UM/FileHandler/FileWriter.py uranium-4.4.1/UM/FileHandler/FileWriter.py --- uranium-3.3.0/UM/FileHandler/FileWriter.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/FileHandler/FileWriter.py 2019-11-19 10:50:46.000000000 +0000 @@ -1,4 +1,4 @@ -# Copyright (c) 2016 Ultimaker B.V. +# Copyright (c) 2019 Ultimaker B.V. # Uranium is released under the terms of the LGPLv3 or higher. from UM.PluginObject import PluginObject @@ -9,8 +9,21 @@ TextMode = 1 BinaryMode = 2 - def __init__(self): + def __init__(self, add_to_recent_files: bool = True, *args, **kwargs) -> None: super().__init__() + self._information = "" # type: str + + # Indicates if the file should be added to the "recent files" list if it's saved successfully. + self._add_to_recent_files = add_to_recent_files # type: bool + + def getAddToRecentFiles(self) -> bool: + return self._add_to_recent_files def write(self, stream, data): - raise NotImplementedError("Writer plugin was not correctly implemented, no write was specified") \ No newline at end of file + raise NotImplementedError("Writer plugin was not correctly implemented, no write was specified") + + def setInformation(self, information_message: str): + self._information = information_message + + def getInformation(self) -> str: + return self._information diff -Nru uranium-3.3.0/UM/FileHandler/ReadFileJob.py uranium-4.4.1/UM/FileHandler/ReadFileJob.py --- uranium-3.3.0/UM/FileHandler/ReadFileJob.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/FileHandler/ReadFileJob.py 2019-11-19 10:50:46.000000000 +0000 @@ -1,29 +1,33 @@ -# Copyright (c) 2016 Ultimaker B.V. +# Copyright (c) 2019 Ultimaker B.V. # Uranium is released under the terms of the LGPLv3 or higher. +from typing import Optional +from UM.FileHandler.FileHandler import FileHandler from UM.Job import Job from UM.Message import Message from UM.Logger import Logger -from UM.Mesh.MeshReader import MeshReader + import time from UM.i18n import i18nCatalog i18n_catalog = i18nCatalog("uranium") + ## A Job subclass that performs file loading. # class ReadFileJob(Job): - def __init__(self, filename, handler = None): + def __init__(self, filename: str, handler: Optional[FileHandler] = None) -> None: super().__init__() self._filename = filename self._handler = handler - self._loading_message = None + self._loading_message = None # type: Optional[Message] def getFileName(self): return self._filename - def run(self): + def run(self) -> None: + from UM.Mesh.MeshReader import MeshReader if self._handler is None: Logger.log("e", "FileHandler was not set.") return None @@ -50,24 +54,24 @@ self._loading_message = Message(self._filename, lifetime=0, + progress=0, dismissable=False, title = i18n_catalog.i18nc("@info:title", "Loading")) self._loading_message.setProgress(-1) self._loading_message.show() Job.yieldThread() # Yield to any other thread that might want to do something else. - + begin_time = time.time() try: - begin_time = time.time() self.setResult(self._handler.readerRead(reader, self._filename)) - end_time = time.time() - Logger.log("d", "Loading file took %0.1f seconds", end_time - begin_time) except: Logger.logException("e", "Exception occurred while loading file %s", self._filename) finally: + end_time = time.time() + Logger.log("d", "Loading file took %0.1f seconds", end_time - begin_time) if self._result is None: self._loading_message.hide() - result_message = Message(i18n_catalog.i18nc("@info:status Don't translate the XML tag !", "Failed to load {0}", self._filename), lifetime=0, title = i18n_catalog.i18nc("@info:title", "Invalid File")) + result_message = Message(i18n_catalog.i18nc("@info:status Don't translate the XML tag !", "Failed to load {0}", self._filename), lifetime = 0, title = i18n_catalog.i18nc("@info:title", "Invalid File")) result_message.show() return self._loading_message.hide() diff -Nru uranium-3.3.0/UM/FileHandler/WriteFileJob.py uranium-4.4.1/UM/FileHandler/WriteFileJob.py --- uranium-3.3.0/UM/FileHandler/WriteFileJob.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/FileHandler/WriteFileJob.py 2019-11-19 10:50:46.000000000 +0000 @@ -4,6 +4,7 @@ from UM.Job import Job import time from UM.Logger import Logger +from UM.FileHandler.FileWriter import FileWriter ## A Job subclass that performs writing. @@ -24,6 +25,7 @@ self._data = data self._file_name = "" self._mode = mode + self._add_to_recent_files = False # If this file should be added to the "recent files" list upon success self._message = None self.progress.connect(self._onProgress) self.finished.connect(self._onFinished) @@ -53,9 +55,17 @@ def getMessage(self): return self._message + def setAddToRecentFiles(self, value: bool) -> None: + self._add_to_recent_files = value + + def getAddToRecentFiles(self) -> bool: + return self._add_to_recent_files and self._writer.getAddToRecentFiles() + def run(self): Job.yieldThread() begin_time = time.time() self.setResult(self._writer.write(self._stream, self._data, self._mode)) + if not self.getResult(): + self.setError(self._writer.getInformation()) end_time = time.time() - Logger.log("d", "Writing file took %s seconds", end_time - begin_time) \ No newline at end of file + Logger.log("d", "Writing file took %s seconds", end_time - begin_time) diff -Nru uranium-3.3.0/UM/i18n.py uranium-4.4.1/UM/i18n.py --- uranium-3.3.0/UM/i18n.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/i18n.py 2019-11-19 10:50:46.000000000 +0000 @@ -1,8 +1,8 @@ -# Copyright (c) 2016 Ultimaker B.V. +# Copyright (c) 2018 Ultimaker B.V. # Uranium is released under the terms of the LGPLv3 or higher. import gettext -from typing import Any, Dict +from typing import Any, Dict, Optional, cast from UM.Resources import Resources @@ -37,7 +37,7 @@ self.__name = name self.__language = language self.__translation = None # type: Optional[gettext.NullTranslations] - + self.__require_update = True self._update() #Load the actual translation document now that the language is set. ## Whether the translated texts are loaded into this catalogue. @@ -64,7 +64,7 @@ translated = text # Default to hard-coded text if no translation catalogue is loaded. if self.hasTranslationLoaded(): - translated = self.__translation.gettext(text) + translated = cast(gettext.NullTranslations, self.__translation).gettext(text) if args: translated = translated.format(*args) # Positional arguments are replaced in the (translated) text. @@ -86,7 +86,7 @@ translated = text # Default to hard-coded text if no translation catalogue is loaded. if self.hasTranslationLoaded(): message_with_context = "{0}\x04{1}".format(context, text) # \x04 is "end of transmission" byte, indicating to gettext that they are two different texts. - message = self.__translation.gettext(message_with_context) + message = cast(gettext.NullTranslations, self.__translation).gettext(message_with_context) if message != message_with_context: translated = message @@ -116,7 +116,7 @@ translated = multiple if counter != 1 else single # Default to hard-coded texts if no translation catalogue is loaded. if self.hasTranslationLoaded(): - translated = self.__translation.ngettext(single, multiple, counter) + translated = cast(gettext.NullTranslations, self.__translation).ngettext(single, multiple, counter) translated = translated.format(counter, args) # Positional arguments are replaced in the (translated) text, but this time the counter is treated as the first argument. return self._replaceTags(translated) # Also replace the global keys. @@ -146,7 +146,7 @@ translated = multiple if counter != 1 else single # Default to hard-coded texts if no translation catalogue is loaded. if self.hasTranslationLoaded(): message_with_context = "{0}\x04{1}".format(context, single) # \x04 is "end of transmission" byte, indicating to gettext that they are two different texts. - message = self.__translation.ngettext(message_with_context, multiple, counter) + message = cast(gettext.NullTranslations, self.__translation).ngettext(message_with_context, multiple, counter) if message != message_with_context: translated = message @@ -192,8 +192,8 @@ # Ask gettext for all the translations in the .mo files. for path in Resources.getAllPathsForType(Resources.i18n): - if gettext.find(self.__name, path, languages = [self.__language]): - self.__translation = gettext.translation(self.__name, path, languages = [self.__language]) + if gettext.find(cast(str, self.__name), path, languages = [self.__language]): + self.__translation = gettext.translation(cast(str, self.__name), path, languages = [self.__language]) self.__require_update = False @@ -207,7 +207,7 @@ # \param replacements A dictionary of strings to strings, indicating which # words between tags should get replaced. @classmethod - def setTagReplacements(cls, replacements: Dict[str, str]) -> None: + def setTagReplacements(cls, replacements: Dict[str, Optional[str]]) -> None: cls.__tag_replacements = replacements ## Set the ``Application`` instance to request the language and application @@ -233,5 +233,5 @@ __tag_replacements = { "filename": None, "message": None - } # type: Dict[str, str] + } # type: Dict[str, Optional[str]] __application = None diff -Nru uranium-3.3.0/UM/__init__.py uranium-4.4.1/UM/__init__.py --- uranium-3.3.0/UM/__init__.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/__init__.py 2019-11-19 10:50:46.000000000 +0000 @@ -16,3 +16,6 @@ _ = i18n_catalog.i18nc("@info:status", "Your configuration seems to be corrupt.") _ = i18n_catalog.i18nc("@info:title", "Configuration errors") _ = i18n_catalog.i18nc("@info:button", "Reset your configuration to factory defaults.") + +import warnings +warnings.simplefilter("once", DeprecationWarning) diff -Nru uranium-3.3.0/UM/InputDevice.py uranium-4.4.1/UM/InputDevice.py --- uranium-3.3.0/UM/InputDevice.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/InputDevice.py 2019-11-19 10:50:46.000000000 +0000 @@ -1,4 +1,4 @@ -# Copyright (c) 2015 Ultimaker B.V. +# Copyright (c) 2018 Ultimaker B.V. # Uranium is released under the terms of the LGPLv3 or higher. from UM.Signal import Signal, signalemitter @@ -9,7 +9,7 @@ # Examples of this are mouse & keyboard @signalemitter class InputDevice(PluginObject): - def __init__(self): + def __init__(self) -> None: super().__init__() ## Emitted whenever the device produces an event. diff -Nru uranium-3.3.0/UM/Job.py uranium-4.4.1/UM/Job.py --- uranium-3.3.0/UM/Job.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Job.py 2019-11-19 10:50:46.000000000 +0000 @@ -1,11 +1,11 @@ -# Copyright (c) 2015 Ultimaker B.V. +# Copyright (c) 2018 Ultimaker B.V. # Uranium is released under the terms of the LGPLv3 or higher. import time - -from UM.Signal import Signal, signalemitter +from typing import Any, Optional from UM.JobQueue import JobQueue +from UM.Signal import Signal, signalemitter ## Base class for things that should be performed in a thread. @@ -16,28 +16,37 @@ # \sa JobQueue @signalemitter class Job: - def __init__(self): + def __init__(self) -> None: super().__init__() self._running = False # type: bool self._finished = False # type: bool - self._result = None # type: any - self._error = None + self._result = None # type: Any + self._message = "" # type: str + self._error = None # type: Optional[Exception] ## Perform the actual task of this job. Should be reimplemented by subclasses. # \exception NotImplementedError - def run(self): + def run(self) -> None: raise NotImplementedError() + # Get optional message + def getMessage(self) -> str: + return self._message + + # Set optional message + def setMessage(self, message: str) -> None: + self._message = message + ## Get the result of the job. # # The actual result object returned by this method is dependant on the implementation. - def getResult(self): + def getResult(self) -> Any: return self._result ## Set the result of this job. # # This should be called by run() to set the actual result of the Job. - def setResult(self, result: any): + def setResult(self, result: Any) -> None: self._result = result ## Set an exception that was thrown while the job was being executed. @@ -46,7 +55,7 @@ # to execute properly. # # \param error \type{Exception} The exception to set. - def setError(self, error: Exception): + def setError(self, error: Exception) -> None: self._error = error ## Start the job. @@ -54,14 +63,14 @@ # This will put the Job into the JobQueue to be processed whenever a thread is available. # # \sa JobQueue::add() - def start(self): + def start(self) -> None: JobQueue.getInstance().add(self) ## Cancel the job. # # This will remove the Job from the JobQueue. If the run() function has already been called, # this will do nothing. - def cancel(self): + def cancel(self) -> None: JobQueue.getInstance().remove(self) ## Check whether the job is currently running. @@ -85,7 +94,7 @@ ## Get the error that was encountered during execution. # # \return \type{Exception} The error encountered during execution or None if there was no error. - def getError(self) -> Exception: + def getError(self) -> Optional[Exception]: return self._error ## Emitted when the job has finished processing. @@ -105,5 +114,5 @@ # forces a GIL release and allows a different thread to start processing # if it is waiting. @staticmethod - def yieldThread(): + def yieldThread() -> None: time.sleep(0) # Sleeping for 0 introduces no delay but does allow context switching. diff -Nru uranium-3.3.0/UM/JobQueue.py uranium-4.4.1/UM/JobQueue.py --- uranium-3.3.0/UM/JobQueue.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/JobQueue.py 2019-11-19 10:50:46.000000000 +0000 @@ -1,13 +1,13 @@ -# Copyright (c) 2015 Ultimaker B.V. +# Copyright (c) 2018 Ultimaker B.V. # Uranium is released under the terms of the LGPLv3 or higher. import multiprocessing import threading -from UM.Signal import Signal, signalemitter from UM.Logger import Logger +from UM.Signal import Signal, signalemitter -from typing import TYPE_CHECKING, List, Callable, Any +from typing import cast, List, Optional, TYPE_CHECKING, Union if TYPE_CHECKING: from UM.Job import Job @@ -17,16 +17,15 @@ # can take things from this queue to process them. # \sa Job @signalemitter -class JobQueue(): +class JobQueue: ## Initialize. # # \param thread_count The amount of threads to use. Can be a positive integer or 'auto'. # When 'auto', the number of threads is based on the number of processors and cores on the machine. - def __init__(self, thread_count: (str, int) = "auto"): #pylint: disable=bad-whitespace - if JobQueue._instance is None: - JobQueue._instance = self - else: - raise RuntimeError("Attempted to create multiple instances of JobQueue") + def __init__(self, thread_count: Union[str, int] = "auto") -> None: #pylint: disable=bad-whitespace + if JobQueue.__instance is not None: + raise RuntimeError("Try to create singleton '%s' more than once" % self.__class__.__name__) + JobQueue.__instance = self super().__init__() @@ -35,15 +34,16 @@ thread_count = multiprocessing.cpu_count() except NotImplementedError: thread_count = 0 + thread_count = cast(int, thread_count) #Now it's always an integer. if thread_count <= 0: thread_count = 2 # Assume we can run at least two threads in parallel. self._threads = [_Worker(self) for t in range(thread_count)] - self._semaphore = threading.Semaphore(0) - self._jobs = [] # type: List[Job] - self._jobs_lock = threading.Lock() + self._semaphore = threading.Semaphore(0) # type: threading.Semaphore + self._jobs = [] # type: List[Job] + self._jobs_lock = threading.Lock() # type: threading.Lock for thread in self._threads: thread.daemon = True @@ -51,19 +51,19 @@ ## Add a Job to the queue. # - # \param job \type{Job} The Job to add. - def add(self, job: "Job"): + # \param job The Job to add. + def add(self, job: "Job") -> None: with self._jobs_lock: self._jobs.append(job) self._semaphore.release() ## Remove a waiting Job from the queue. # - # \param job \type{Job} The Job to remove. + # \param job The Job to remove. # # \note If a job has already begun processing it is already removed from the queue # and thus can no longer be cancelled. - def remove(self, job: "Job"): + def remove(self, job: "Job") -> None: with self._jobs_lock: if job in self._jobs: self._jobs.remove(job) @@ -82,7 +82,7 @@ # Get the next job off the queue. # Note that this will block until a job is available. - def _nextJob(self): + def _nextJob(self) -> Optional["Job"]: self._semaphore.acquire() with self._jobs_lock: # Semaphore release() can apparently cause all waiting threads to continue. @@ -91,26 +91,22 @@ return None return self._jobs.pop(0) - ## Get the singleton instance of the JobQueue. - @classmethod - def getInstance(cls) -> "JobQueue": - if not cls._instance: - cls._instance = JobQueue() + __instance = None # type: JobQueue - return cls._instance - - _instance = None # type: JobQueue + @classmethod + def getInstance(cls, *args, **kwargs) -> "JobQueue": + return cls.__instance ## Internal # # A worker thread that can process jobs from the JobQueue. class _Worker(threading.Thread): - def __init__(self, queue): + def __init__(self, queue: JobQueue) -> None: super().__init__() self._queue = queue - def run(self): + def run(self) -> None: while True: # Get the next job from the queue. Note that this blocks until a new job is available. job = self._queue._nextJob() diff -Nru uranium-3.3.0/UM/LockFile.py uranium-4.4.1/UM/LockFile.py --- uranium-3.3.0/UM/LockFile.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/LockFile.py 2019-11-19 10:50:46.000000000 +0000 @@ -1,10 +1,12 @@ -# Copyright (c) 2016 Ultimaker B.V. +# Copyright (c) 2018 Ultimaker B.V. # Uranium is released under the terms of the LGPLv3 or higher. import os import time # For timing lock file +from typing import Any, Optional from UM.Logger import Logger +from UM.Platform import Platform ## Manage a lock file for reading / writing in a directory. @@ -24,54 +26,94 @@ # \param wait_msg A message to log when the thread is blocked by the lock. # It is intended that you modify this to better indicate what lock file is # blocking the thread. - def __init__(self, filename: str, timeout: int = 10, wait_msg: str = "Waiting for lock file to disappear..."): + def __init__(self, filename: str, timeout: int = 10, wait_msg: str = "Waiting for lock file to disappear...") -> None: self._filename = filename self._wait_msg = wait_msg self._timeout = timeout + self._pidfile = None #type: Optional[int] - ## Block the thread until the lock file no longer exists. + ## Creates the lock file on the file system, with exclusive use. # - # This is implemented using a spin loop. - def _waitLockFileDisappear(self): - now = time.time() - while os.path.exists(self._filename) and now < os.path.getmtime(self._filename) + self._timeout and now > os.path.getmtime(self._filename): - Logger.log("d", self._wait_msg) + # If another thread wants to use a concurrent folder/file, but this file is still in use, then wait until the + # current thread releases the lock file. + def _createLockFile(self) -> None: + start_wait = time.time() + while True: + if time.time() - start_wait > self._timeout: # Timeout expired. Overwrite the lock file. + try: + os.remove(self._filename) + except Exception as e: + stats = None + try: + stats = os.stat(self._filename) + except: + pass + raise RuntimeError("Failed to remove lock file with stats = {stats}. Exception: {exception}".format(stats = stats, exception = e)) + open_flags = (os.O_CREAT | os.O_EXCL | os.O_WRONLY) + open_mode = 0o666 + try: + self._pidfile = os.open(self._filename, open_flags, open_mode) + break + except: + pass time.sleep(0.1) - now = time.time() - ## Creates the lock file on the file system. + ## Creates the lock file on Windows, with exclusive use and with the delete on close flag enabled so in case + # the process ends, the file will be automatically removed. # - # The lock file is filled with the current process ID. Python's own GIL - # will ensure that this is thread-safe then. - def _createLockFile(self): - try: - with open(self._filename, "w") as lock_file: - lock_file.write("%s" % os.getpid()) - except: - Logger.log("e", "Could not create lock file [%s]" % self._filename) + # If another thread wants to use a concurrent folder/file, but this file is still in use, then wait until the + # current thread releases the lock file. + def _createLockFileWindows(self) -> None: + from ctypes import windll # type: ignore + start_wait = time.time() + # Define attributes and flags for the file + GENERIC_READ_WRITE = 0x40000000 | 0x80000000 #Read and write rights. + NO_SHARE = 0 + CREATE_NEW = 1 #Only create the file if it doesn't already exist. + FILE_FLAG_DELETE_ON_CLOSE = 0x04000000 #Delete the file when we close the file handle. + FILE_ATTRIBUTE_NORMAL = 0x80 #Default auxiliary flags. + + self._pidfile = None + while True: + if time.time() - start_wait > self._timeout: # Timeout expired. Overwrite the lock file. + self._deleteLockFileWindows() + try: + # Try to create the lock file with the Windows API. For more information visit: + # https://docs.microsoft.com/en-us/windows/desktop/api/fileapi/nf-fileapi-createfilew + self._pidfile = windll.kernel32.CreateFileW(self._filename, GENERIC_READ_WRITE, NO_SHARE, None, CREATE_NEW, + FILE_FLAG_DELETE_ON_CLOSE | FILE_ATTRIBUTE_NORMAL, None) + if self._pidfile is not None and self._pidfile != -1: # -1 is the INVALID_HANDLE + break + except Exception: + Logger.logException("w", "An exception occured while attempting to create the lock file.") + time.sleep(0.1) - ## Deletes the lock file from the file system. - def _deleteLockFile(self): + ## Close and delete the lock file from the file system once the current thread finish what it was doing. + def _deleteLockFile(self) -> None: try: + if self._pidfile is None: + Logger.log("e", "Could not determine process ID file.") + return + os.close(self._pidfile) os.remove(self._filename) - except FileNotFoundError: - #This can happen due to a leak in the thread-safety of this system. - #We ignore this leak for now, but this is how it can happen: - # This thread Other thread - # 1 Check if lock exists Check if lock exists - # 2 Create lock file - # 3 Create lock file (fails) - # 4 Do work Do work - # 5 Delete lock file - # 6 Delete lock file (here) - pass except: Logger.log("e", "Could not delete lock file [%s]" % self._filename) + ## Close and delete the lock file in Windows using the Windows API. For more info visit: + # https://msdn.microsoft.com/en-us/9b84891d-62ca-4ddc-97b7-c4c79482abd9 + def _deleteLockFileWindows(self) -> None: + from ctypes import windll # type: ignore + try: + windll.kernel32.CloseHandle(self._pidfile) + except Exception: + Logger.logException("w", "Failed to remove the lockfile [%s]", self._filename) + ## Attempt to grab the lock file for personal use. - def __enter__(self): - self._waitLockFileDisappear() - self._createLockFile() + def __enter__(self) -> None: + if Platform.isWindows(): + self._createLockFileWindows() + else: + self._createLockFile() ## Release the lock file so that other processes may use it. # @@ -81,5 +123,8 @@ # ``with`` block, if any. Use ``None`` if no exception was raised. # \param exc_tb The traceback frames at the time the exception occurred, # if any. Use ``None`` if no exception was raised. - def __exit__(self, exc_type, exc_val, exc_tb): - self._deleteLockFile() + def __exit__(self, exc_type: type, exc_val: Exception, exc_tb: Any) -> None: #exc_tb is actually a traceback object which is not exposed in Python. + if Platform.isWindows(): + self._deleteLockFileWindows() + else: + self._deleteLockFile() diff -Nru uranium-3.3.0/UM/Logger.py uranium-4.4.1/UM/Logger.py --- uranium-3.3.0/UM/Logger.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Logger.py 2019-11-19 10:50:46.000000000 +0000 @@ -43,7 +43,10 @@ # \param **kwargs \type{dict} List of placeholder replacements that will be passed to str.format(). @classmethod def log(cls, log_type: str, message: str, *args, **kwargs): - caller_frame = inspect.currentframe().f_back + current_frame = inspect.currentframe() + if current_frame is None: # Avoid crash if the inspect module returns None (it should never happen) + return + caller_frame = current_frame.f_back frame_info = inspect.getframeinfo(caller_frame) try: if args or kwargs: # Only format the message if there are args diff -Nru uranium-3.3.0/UM/Math/AxisAlignedBox.py uranium-4.4.1/UM/Math/AxisAlignedBox.py --- uranium-3.3.0/UM/Math/AxisAlignedBox.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Math/AxisAlignedBox.py 2019-11-19 10:50:46.000000000 +0000 @@ -1,12 +1,13 @@ # Copyright (c) 2018 Ultimaker B.V. # Uranium is released under the terms of the LGPLv3 or higher. -from UM.Math.Vector import Vector from UM.Math.Float import Float +from UM.Math.Ray import Ray #For typing. +from UM.Math.Vector import Vector import numpy -from typing import Optional +from typing import Optional, Tuple, Union ## Axis aligned bounding box. @@ -16,7 +17,7 @@ PartialIntersection = 2 FullIntersection = 3 - def __init__(self, minimum: Vector = Vector.Null, maximum: Vector = Vector.Null): + def __init__(self, minimum: Vector = Vector.Null, maximum: Vector = Vector.Null) -> None: if minimum.x > maximum.x or minimum.y > maximum.y or minimum.z > maximum.z: swapped_minimum = Vector(min(minimum.x, maximum.x), min(minimum.y, maximum.y), min(minimum.z, maximum.z)) swapped_maximum = Vector(max(minimum.x, maximum.x), max(minimum.y, maximum.y), max(minimum.z, maximum.z)) @@ -24,8 +25,8 @@ maximum = swapped_maximum minimum.setRoundDigits(3) maximum.setRoundDigits(3) - self._min = minimum - self._max = maximum + self._min = minimum #type: Vector + self._max = maximum #type: Vector def set(self, minimum: Optional[Vector] = None, maximum: Optional[Vector] = None, left: Optional[float] = None, right: Optional[float] = None, top: Optional[float] = None, bottom: Optional[float] = None, @@ -50,8 +51,8 @@ return AxisAlignedBox(minimum, maximum) - def __add__(self, other): - if other is None or not other.isValid(): + def __add__(self, other: object) -> "AxisAlignedBox": + if other is None or not isinstance(other, AxisAlignedBox) or not other.isValid(): return self new_min = Vector(min(self._min.x, other.left), min(self._min.y, other.bottom), @@ -60,55 +61,55 @@ max(self._max.z, other.front)) return AxisAlignedBox(minimum=new_min, maximum=new_max) - def __iadd__(self, other): + def __iadd__(self, other: object) -> "AxisAlignedBox": raise NotImplementedError() @property - def width(self): + def width(self) -> float: return self._max.x - self._min.x @property - def height(self): + def height(self) -> float: return self._max.y - self._min.y @property - def depth(self): + def depth(self) -> float: return self._max.z - self._min.z @property - def center(self): + def center(self) -> Vector: return self._min + ((self._max - self._min) / 2.0) @property - def left(self): + def left(self) -> float: return self._min.x @property - def right(self): + def right(self) -> float: return self._max.x @property - def bottom(self): + def bottom(self) -> float: return self._min.y @property - def top(self): + def top(self) -> float: return self._max.y @property - def back(self): + def back(self) -> float: return self._min.z @property - def front(self): + def front(self) -> float: return self._max.z @property - def minimum(self): + def minimum(self) -> Vector: return self._min @property - def maximum(self): + def maximum(self) -> Vector: return self._max ## Check if the bounding box is valid. @@ -119,10 +120,9 @@ Float.fuzzyCompare(self._min.y, self._max.y) or Float.fuzzyCompare(self._min.z, self._max.z)) - ## Intersect the bounding box with a ray - # \param ray \type{Ray} + ## Intersect the bounding box with a ray # \sa Ray - def intersectsRay(self, ray): + def intersectsRay(self, ray: Ray) -> Union[Tuple[float, float], bool]: inv = ray.inverseDirection t = numpy.empty((2,3), dtype=numpy.float32) @@ -146,7 +146,7 @@ ## Check to see if this box intersects another box. # - # \param box \type{AxisAlignedBox} The box to check for intersection. + # \param box The box to check for intersection. # \return \type{IntersectionResult} NoIntersection when no intersection occurs, PartialIntersection when partially intersected, FullIntersection when box is fully contained inside this box. def intersectsBox(self, box: "AxisAlignedBox") -> int: if self._min.x > box._max.x or box._min.x > self._max.x: @@ -164,7 +164,7 @@ return self.IntersectionResult.PartialIntersection ## private: - def __repr__(self): + def __repr__(self) -> str: return "AxisAlignedBox(min = {0}, max = {1})".format(self._min, self._max) # This field is filled in below. This is needed to help static analysis tools (read: PyCharm) diff -Nru uranium-3.3.0/UM/Math/Color.py uranium-4.4.1/UM/Math/Color.py --- uranium-3.3.0/UM/Math/Color.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Math/Color.py 2019-11-19 10:50:46.000000000 +0000 @@ -3,6 +3,7 @@ from typing import Union + ## An RGBA color value. # # This class represents an RGBA color value, in the range of 0.0 to 1.0. @@ -47,6 +48,14 @@ self._b = b if type(b) is float else b / 255 self._a = a if type(a) is float else a / 255 + def get32BitValue(self): + return( + (int(self._a * 255.) << 24) | + (int(self._r * 255.) << 16) | + (int(self._g * 255.) << 8) | + int(self._b * 255.) + ) + def __eq__(self, other): return self._r == other._r and self._g == other._g and self._b == other._b and self._a == other._a @@ -69,6 +78,32 @@ (value & 0xff000000) >> 24 ) + @staticmethod + def fromARGBLowBits(value): + return Color( + (value & 0x000f0000) >> 16, + (value & 0x00000f00) >> 8, + (value & 0x0000000f) >> 0, + (value & 0x0f000000) >> 24 + ) + + @staticmethod + def fromARGBHighBits(value): + return Color( + (value & 0x00f00000) >> 16, + (value & 0x0000f000) >> 8, + (value & 0x000000f0) >> 0, + (value & 0xf0000000) >> 24 + ) + + @staticmethod + def dropLowBits(color): + return Color.fromARGBHighBits(color.get32BitValue()) + + @staticmethod + def dropHightBits(color): + return Color.fromARGBLowBits(color.get32BitValue()) + ## Returns a new Color constructed from a 7- or 9-character string "#RRGGBB" or "#AARRGGBB" format. # # \param value A 7- or 9-character string representing a color in "#RRGGBB" or "#AARRGGBB" format. @@ -88,16 +123,4 @@ int(value[3:5], 16) / 255, int(value[5:7], 16) / 255, 1.0 - ) - - ## Returns a 7-character string in "#RRGGBB" format representing the color. - # - # \param include_alpha Whether to return a 7-character "#RRGGBB" or a 9 character "#AARRGGBB" format. - # \return A 7- or 9-character string representing a color in "#AARRGGBB" format. - def toHexString(self, include_alpha = False): - value = ((int(self._r * 255) & 255) << 16) + \ - ((int(self._g * 255) & 255) << 8) + \ - (int(self._b * 255) & 255) - if include_alpha: - value += (int(self._a * 255) & 255) << 24 - return "#%s" % hex(value)[2:] \ No newline at end of file + ) \ No newline at end of file diff -Nru uranium-3.3.0/UM/Math/LineSegment.py uranium-4.4.1/UM/Math/LineSegment.py --- uranium-3.3.0/UM/Math/LineSegment.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Math/LineSegment.py 1970-01-01 00:00:00.000000000 +0000 @@ -1,73 +0,0 @@ -# Copyright (c) 2017 Ultimaker B.V. -# Uranium is released under the terms of the LGPLv3 or higher. - -from typing import Optional - -from UM.Math.Float import Float # For fuzzy comparison of edge cases. -from UM.Math.Vector2 import Vector2 #Just for type checking. - -## Represents a line segment in 2D. -# -# The line segment is represented by two endpoints. -class LineSegment: - ## Creates a new line segment with the specified endpoints. - # - # \param endpoint_a An endpoint of the line segment. - # \param endpoint_b An endpoint of the line segment. - def __init__(self, endpoint_a: Vector2, endpoint_b: Vector2): - self._endpoint_a = endpoint_a # type: Vector2 - self._endpoint_b = endpoint_b # type: Vector2 - - ## Gets the second endpoint (B) of the line segment. - # - # \return The second endpoint of the line segment. - def getEnd(self) -> Vector2: - return self._endpoint_b - - ## Gets the first endpoint (A) of the line segment. - # - # \return The first endpoint of the line segment. - def getStart(self) -> Vector2: - return self._endpoint_a - - ## Returns the point of intersection of this line segment with another line - # segment, if any. - # - # \param other The line segment to check intersection with. - # \return The intersection point if they intersect, or None otherwise. - def intersection(self, other: "LineSegment") -> Optional[Vector2]: - if not self.intersectsWithLine(other._endpoint_a, other._endpoint_b) or not other.intersectsWithLine(self._endpoint_a, self._endpoint_b): #Line segments don't intersect. - return None - direction_me = self._endpoint_b - self._endpoint_a - direction_other = other._endpoint_b - other._endpoint_a - diff_endpoint_a = self._endpoint_a - other._endpoint_a - perpendicular = direction_me.perpendicular() - denominator = perpendicular.dot(direction_other) #Project onto the perpendicular. - numerator = perpendicular.dot(diff_endpoint_a) - if denominator == 0: #Lines are parallel. - return None - return (numerator / denominator.astype(float)) * direction_other + other._endpoint_a - - ## Returns whether the line segment intersects the specified (infinite) - # line. - # - # If the line segment touches the line with one or both endpoints, that - # counts as an intersection too. - # - # \param a A point on the line to intersect with. - # \param b A different point on the line to intersect with. - # \return True if the line segment intersects with the line, or False - # otherwise. - def intersectsWithLine(self, a: Vector2, b: Vector2) -> bool: - shifted_b = b - a - #It intersects if either endpoint is on the line, or if one endpoint is on the right but the other is not. - return Float.fuzzyCompare(shifted_b.cross(self._endpoint_a), 0) or Float.fuzzyCompare(shifted_b.cross(self._endpoint_b), 0) or (self._pointIsRight(self._endpoint_a, a, b) != self._pointIsRight(self._endpoint_b, a, b)) - - ## Determines whether point p is to the right of the line through a and b. - # - # \param p The point to determine whether it is to the right of the line. - # \param a A point on the line. - # \param b Another point on the line. - def _pointIsRight(self, p: Vector2, a: Vector2, b: Vector2) -> bool: - shifted_end = b - a - return shifted_end.cross(p - a) < 0 \ No newline at end of file diff -Nru uranium-3.3.0/UM/Math/Matrix.py uranium-4.4.1/UM/Math/Matrix.py --- uranium-3.3.0/UM/Math/Matrix.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Math/Matrix.py 2019-11-19 10:50:46.000000000 +0000 @@ -1,20 +1,17 @@ -# Copyright (c) 2015 Ultimaker B.V. +# Copyright (c) 2018 Ultimaker B.V. # Uranium is released under the terms of the LGPLv3 or higher. import math -from copy import deepcopy import numpy from UM.Math.Vector import Vector -from typing import Union, Optional +from typing import cast, Dict, List, Optional, Tuple, TYPE_CHECKING, Union numpy.seterr(divide="ignore") - -MYPY = False -if MYPY: +if TYPE_CHECKING: from UM.Math.Quaternion import Quaternion @@ -47,33 +44,43 @@ "rxzx": (0, 1, 1, 1), "rxzy": (1, 0, 0, 1), "ryzy": (1, 0, 1, 1), "rzxy": (1, 1, 0, 1), "ryxy": (1, 1, 1, 1), "ryxz": (2, 0, 0, 1), "rzxz": (2, 0, 1, 1), "rxyz": (2, 1, 0, 1), "rzyz": (2, 1, 1, 1) - } + } #type: Dict[str, Tuple[int, int, int, int]] # axis sequences for Euler angles _NEXT_AXIS = [1, 2, 0, 1] - def __init__(self, data = None): + def __init__(self, data: Optional[Union[List[List[float]], numpy.array]] = None) -> None: if data is None: self._data = numpy.identity(4, dtype = numpy.float64) else: self._data = numpy.array(data, copy=True, dtype = numpy.float64) - def __eq__(self, other): + def __deepcopy__(self, memo): + # So, you must be asking yourself, why not let python handle this simple case on it's own? Well, that's because + # we found out that this is about 3x faster. + # Note that actually using Matrix(self._data) (without the deepcopy) is another factor 3 faster. + return Matrix(self._data) + + def copy(self) -> "Matrix": + return Matrix(self._data) + + def __eq__(self, other: object) -> bool: if self is other: return True if type(other) is not Matrix: return False + other = cast(Matrix, other) if self._data is None and other._data is None: return True return numpy.array_equal(self._data, other._data) - def at(self, x: int, y: int): + def at(self, x: int, y: int) -> float: if x >= 4 or y >= 4 or x < 0 or y < 0: raise IndexError return self._data[x,y] - def setRow(self, index: int, value): + def setRow(self, index: int, value: List[float]) -> None: if index < 0 or index > 3: raise IndexError() @@ -86,7 +93,7 @@ else: self._data[3, index] = 0 - def setColumn(self, index: int, value): + def setColumn(self, index: int, value: List[float]) -> None: if index < 0 or index > 3: raise IndexError() @@ -99,35 +106,31 @@ else: self._data[index, 3] = 0 - def multiply(self, other: Union[Vector, "Matrix"], copy: bool = False): + def multiply(self, other: Union[Vector, "Matrix"], copy: bool = False) -> "Matrix": if not copy: self._data = numpy.dot(self._data, other.getData()) return self else: - new_matrix = Matrix(data = self._data) - new_matrix.multiply(other) - return new_matrix + return Matrix(data = numpy.dot(self._data, other.getData())) - def preMultiply(self, other: Union[Vector, "Matrix"], copy: bool = False): + def preMultiply(self, other: Union[Vector, "Matrix"], copy: bool = False) -> "Matrix": if not copy: self._data = numpy.dot(other.getData(), self._data) return self else: - new_matrix = Matrix(data = self._data) - new_matrix.preMultiply(other) - return new_matrix + return Matrix(data = numpy.dot(other.getData(), self._data)) ## Get raw data. # \returns 4x4 numpy array - def getData(self): + def getData(self) -> numpy.ndarray: return self._data.astype(numpy.float32) ## Create a 4x4 identity matrix. This overwrites any existing data. - def setToIdentity(self): + def setToIdentity(self) -> None: self._data = numpy.identity(4, dtype = numpy.float64) ## Invert the matrix - def invert(self): + def invert(self) -> None: self._data = numpy.linalg.inv(self._data) ## Return a inverted copy of the matrix. @@ -136,30 +139,33 @@ try: return Matrix(numpy.linalg.inv(self._data)) except: - return deepcopy(self) + return Matrix(self._data) ## Return the transpose of the matrix. def getTransposed(self) -> "Matrix": try: return Matrix(numpy.transpose(self._data)) except: - return deepcopy(self) + return Matrix(self._data) + + def transpose(self) -> None: + self._data = numpy.transpose(self._data) ## Translate the matrix based on Vector. # \param direction The vector by which the matrix needs to be translated. - def translate(self, direction: Vector): + def translate(self, direction: Vector) -> None: translation_matrix = Matrix() translation_matrix.setByTranslation(direction) self.multiply(translation_matrix) ## Set the matrix by translation vector. This overwrites any existing data. # \param direction The vector by which the (unit) matrix needs to be translated. - def setByTranslation(self, direction: Vector): + def setByTranslation(self, direction: Vector) -> None: M = numpy.identity(4, dtype = numpy.float64) M[:3, 3] = direction.getData()[:3] self._data = M - def setTranslation(self, translation): + def setTranslation(self, translation: Union[Vector, "Matrix"]) -> None: self._data[:3, 3] = translation.getData() def getTranslation(self) -> Vector: @@ -169,7 +175,7 @@ # \param angle The angle by which matrix needs to be rotated. # \param direction Axis by which the matrix needs to be rotated about. # \param point Point where from where the rotation happens. If None, origin is used. - def rotateByAxis(self, angle, direction: Vector, point: Optional[Vector] = None): + def rotateByAxis(self, angle: float, direction: Vector, point: Optional[List[float]] = None) -> None: rotation_matrix = Matrix() rotation_matrix.setByRotationAxis(angle, direction, point) self.multiply(rotation_matrix) @@ -178,7 +184,7 @@ # \param angle The angle by which matrix needs to be rotated in radians. # \param direction Axis by which the matrix needs to be rotated about. # \param point Point where from where the rotation happens. If None, origin is used. - def setByRotationAxis(self, angle, direction: Vector, point: Optional[Vector] = None): + def setByRotationAxis(self, angle: float, direction: Vector, point: Optional[List[float]] = None) -> None: sina = math.sin(angle) cosa = math.cos(angle) direction_data = self._unitVector(direction.getData()) @@ -205,7 +211,7 @@ # @param translate : translation vector along x, y, z axes # @param perspective : perspective partition of matrix # @param mirror: vector with mirror factors (1 if that axis is not mirrored, -1 if it is) - def compose(self, scale: Vector = None, shear: Vector = None, angles: Vector = None, translate: Vector = None, perspective = None, mirror: Vector = None): + def compose(self, scale: Vector = None, shear: Vector = None, angles: Vector = None, translate: Vector = None, perspective: Vector = None, mirror: Vector = None) -> None: M = numpy.identity(4) if perspective is not None: P = numpy.identity(4) @@ -243,12 +249,8 @@ ## Return Euler angles from rotation matrix for specified axis sequence. # axes : One of 24 axis sequences as string or encoded tuple # Note that many Euler angle triplets can describe one matrix. - def getEuler(self, axes = "sxyz"): - try: - firstaxis, parity, repetition, frame = self._AXES2TUPLE[axes.lower()] - except (AttributeError, KeyError): - self._TUPLE2AXES[axes] # validation - firstaxis, parity, repetition, frame = axes + def getEuler(self, axes: str = "sxyz") -> Vector: + firstaxis, parity, repetition, frame = self._AXES2TUPLE[axes.lower()] i = firstaxis j = self._NEXT_AXIS[i + parity] @@ -287,12 +289,8 @@ # @param aj Eulers pitch # @param ak Eulers yaw # @param axes One of 24 axis sequences as string or encoded tuple - def setByEuler(self, ai, aj, ak, axes = "sxyz"): - try: - firstaxis, parity, repetition, frame = self._AXES2TUPLE[axes] - except (AttributeError, KeyError): - self._TUPLE2AXES[axes] # validation - firstaxis, parity, repetition, frame = axes + def setByEuler(self, ai: float, aj: float, ak: float, axes: str = "sxyz") -> None: + firstaxis, parity, repetition, frame = self._AXES2TUPLE[axes.lower()] i = firstaxis j = self._NEXT_AXIS[i + parity] k = self._NEXT_AXIS[i - parity + 1] @@ -334,7 +332,7 @@ # \param factor The factor by which to scale # \param origin From where does the scaling need to be done # \param direction In what direction is the scaling (if None, it's uniform) - def scaleByFactor(self, factor, origin: Optional[Vector] = None, direction: Optional[Vector] = None): + def scaleByFactor(self, factor: float, origin: Optional[List[float]] = None, direction: Optional[Vector] = None) -> None: scale_matrix = Matrix() scale_matrix.setByScaleFactor(factor, origin, direction) self.multiply(scale_matrix) @@ -343,7 +341,7 @@ # \param factor The factor by which to scale # \param origin From where does the scaling need to be done # \param direction In what direction is the scaling (if None, it's uniform) - def setByScaleFactor(self, factor, origin: Optional[Vector] = None, direction: Optional[Vector] = None): + def setByScaleFactor(self, factor: float, origin: Optional[List[float]] = None, direction: Optional[Vector] = None) -> None: if direction is None: # uniform scaling M = numpy.diag([factor, factor, factor, 1.0]) @@ -354,13 +352,13 @@ # nonuniform scaling direction_data = direction.getData() factor = 1.0 - factor - M = numpy.identity(4,dtype = numpy.float64) + M = numpy.identity(4, dtype = numpy.float64) M[:3, :3] -= factor * numpy.outer(direction_data, direction_data) if origin is not None: M[:3, 3] = (factor * numpy.dot(origin[:3], direction_data)) * direction_data self._data = M - def setByScaleVector(self, scale: Vector): + def setByScaleVector(self, scale: Vector) -> None: self._data = numpy.diag([scale.x, scale.y, scale.z, 1.0]) def getScale(self) -> Vector: @@ -377,7 +375,7 @@ # \param bottom The bottom edge of the projection # \param near The near plane of the projection # \param far The far plane of the projection - def setOrtho(self, left, right, bottom, top, near, far): + def setOrtho(self, left: float, right: float, bottom: float, top: float, near: float, far: float) -> None: self.setToIdentity() self._data[0, 0] = 2 / (right - left) self._data[1, 1] = 2 / (top - bottom) @@ -391,7 +389,7 @@ # \param aspect The aspect ratio # \param near Distance to the near plane # \param far Distance to the far plane - def setPerspective(self, fovy, aspect, near, far): + def setPerspective(self, fovy: float, aspect: float, near: float, far: float) -> None: self.setToIdentity() f = 2. / math.tan(math.radians(fovy) / 2.) @@ -402,90 +400,95 @@ self._data[2, 3] = -1. self._data[3, 2] = (2. * far * near) / (near - far) - ## Return sequence of transformations from transformation matrix. - # @return Tuple containing scale (vector), shear (vector), angles (vector) and translation (vector) - # It will raise a ValueError if matrix is of wrong type or degenerative. def decompose(self): - M = numpy.array(self._data, dtype = numpy.float64, copy = True).T - if abs(M[3, 3]) < self._EPS: - raise ValueError("M[3, 3] is zero") - M /= M[3, 3] - P = M.copy() - P[:, 3] = 0.0, 0.0, 0.0, 1.0 - if not numpy.linalg.det(P): - raise ValueError("matrix is singular") - - scale = numpy.zeros((3, )) - shear = [0.0, 0.0, 0.0] - angles = [0.0, 0.0, 0.0] - mirror = [1, 1, 1] - - translate = M[3, :3].copy() - M[3, :3] = 0.0 - - row = M[:3, :3].copy() - scale[0] = math.sqrt(numpy.dot(row[0], row[0])) - row[0] /= scale[0] - shear[0] = numpy.dot(row[0], row[1]) - row[1] -= row[0] * shear[0] - scale[1] = math.sqrt(numpy.dot(row[1], row[1])) - row[1] /= scale[1] - shear[0] /= scale[1] - shear[1] = numpy.dot(row[0], row[2]) - row[2] -= row[0] * shear[1] - shear[2] = numpy.dot(row[1], row[2]) - row[2] -= row[1] * shear[2] - scale[2] = math.sqrt(numpy.dot(row[2], row[2])) - row[2] /= scale[2] - shear[1:] /= scale[2] - - if numpy.dot(row[0], numpy.cross(row[1], row[2])) < 0: - numpy.negative(scale, scale) - numpy.negative(row, row) - - # If the scale was negative, we give back a seperate mirror vector to indicate this. - if M[0, 0] < 0: - mirror[0] = -1 - if M[1, 1] < 0: - mirror[1] = -1 - if M[2, 2] < 0: - mirror[2] = -1 - - angles[1] = math.asin(-row[0, 2]) - if math.cos(angles[1]): - angles[0] = math.atan2(row[1, 2], row[2, 2]) - angles[2] = math.atan2(row[0, 1], row[0, 0]) - else: - angles[0] = math.atan2(-row[2, 1], row[1, 1]) - angles[2] = 0.0 + ''' + SOURCE: https://github.com/matthew-brett/transforms3d/blob/e402e56686648d9a88aa048068333b41daa69d1a/transforms3d/affines.py + Decompose 4x4 homogenous affine matrix into parts. + The parts are translations, rotations, zooms, shears. + This is the same as :func:`decompose` but specialized for 4x4 affines. + Decomposes `A44` into ``T, R, Z, S``, such that:: + Smat = np.array([[1, S[0], S[1]], + [0, 1, S[2]], + [0, 0, 1]]) + RZS = np.dot(R, np.dot(np.diag(Z), Smat)) + A44 = np.eye(4) + A44[:3,:3] = RZS + A44[:-1,-1] = T + The order of transformations is therefore shears, followed by + zooms, followed by rotations, followed by translations. + This routine only works for shape (4,4) matrices + Parameters + ---------- + A44 : array shape (4,4) + Returns + ------- + T : array, shape (3,) + Translation vector + R : array shape (3,3) + rotation matrix + Z : array, shape (3,) + Zoom vector. May have one negative zoom to prevent need for negative + determinant R matrix above + S : array, shape (3,) + Shear vector, such that shears fill upper triangle above + diagonal to form shear matrix (type ``striu``). + ''' + A44 = numpy.asarray(self._data, dtype = numpy.float64) + T = A44[:-1, -1] + RZS = A44[:-1, :-1] + # compute scales and shears + M0, M1, M2 = numpy.array(RZS).T + # extract x scale and normalize + sx = math.sqrt(numpy.sum(M0 ** 2)) + M0 /= sx + # orthogonalize M1 with respect to M0 + sx_sxy = numpy.dot(M0, M1) + M1 -= sx_sxy * M0 + # extract y scale and normalize + sy = math.sqrt(numpy.sum(M1 ** 2)) + M1 /= sy + sxy = sx_sxy / sx + # orthogonalize M2 with respect to M0 and M1 + sx_sxz = numpy.dot(M0, M2) + sy_syz = numpy.dot(M1, M2) + M2 -= (sx_sxz * M0 + sy_syz * M1) + # extract z scale and normalize + sz = math.sqrt(numpy.sum(M2 ** 2)) + M2 /= sz + sxz = sx_sxz / sx + syz = sy_syz / sy + # Reconstruct rotation matrix, ensure positive determinant + Rmat = numpy.array([M0, M1, M2]).T + if numpy.linalg.det(Rmat) < 0: + sx *= -1 + Rmat[:, 0] *= -1 - return Vector(data = scale), Vector(data = shear), Vector(data = angles), Vector(data = translate), Vector(data = mirror) + return Vector(data = T), Matrix(data=Rmat), Vector(data = numpy.array([sx, sy, sz])), Vector(data=numpy.array([sxy, sxz, syz])) - def _unitVector(self, data, axis=None, out=None): + def _unitVector(self, data: numpy.array, axis: Optional[int] = None, out: Optional[numpy.array] = None) -> numpy.array: """Return ndarray normalized by length, i.e. Euclidean norm, along axis. - + >>> matrix = Matrix() >>> v0 = numpy.random.random(3) - >>> v1 = unit_vector(v0) + >>> v1 = matrix._unitVector(v0) >>> numpy.allclose(v1, v0 / numpy.linalg.norm(v0)) True >>> v0 = numpy.random.rand(5, 4, 3) - >>> v1 = unit_vector(v0, axis=-1) - >>> v2 = v0 / numpy.expand_dims(numpy.sqrt(numpy.sum(v0*v0, axis=2)), 2) + >>> v1 = matrix._unitVector(v0, axis=-1) + >>> v2 = v0 / numpy.expand_dims(numpy.sqrt(numpy.sum(v0 * v0, axis=2)), 2) >>> numpy.allclose(v1, v2) True - >>> v1 = unit_vector(v0, axis=1) - >>> v2 = v0 / numpy.expand_dims(numpy.sqrt(numpy.sum(v0*v0, axis=1)), 1) + >>> v1 = matrix._unitVector(v0, axis=1) + >>> v2 = v0 / numpy.expand_dims(numpy.sqrt(numpy.sum(v0 * v0, axis=1)), 1) >>> numpy.allclose(v1, v2) True >>> v1 = numpy.empty((5, 4, 3)) - >>> unit_vector(v0, axis=1, out=v1) + >>> matrix._unitVector(v0, axis=1, out=v1) >>> numpy.allclose(v1, v2) True - >>> list(unit_vector([])) + >>> list(matrix._unitVector([])) [] - >>> list(unit_vector([1])) + >>> list(matrix._unitVector([1])) [1.0] - """ if out is None: data = numpy.array(data, dtype = numpy.float64, copy = True) @@ -504,7 +507,7 @@ if out is None: return data - def __repr__(self): + def __repr__(self) -> str: return "Matrix( {0} )".format(self._data) @staticmethod diff -Nru uranium-3.3.0/UM/Math/NumPyUtil.py uranium-4.4.1/UM/Math/NumPyUtil.py --- uranium-3.3.0/UM/Math/NumPyUtil.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Math/NumPyUtil.py 2019-11-19 10:50:46.000000000 +0000 @@ -1,5 +1,6 @@ # Copyright (c) 2016 Ultimaker B.V. # Uranium is released under the terms of the LGPLv3 or higher. +from typing import Union, List import numpy from copy import deepcopy @@ -9,7 +10,7 @@ # If the array is already immutable then it just returns it. # \param nda \type{numpy.ndarray} the array to copy. May be a list # \return \type{numpy.ndarray} an immutable narray -def immutableNDArray(nda): +def immutableNDArray(nda: Union[List, numpy.array]) -> numpy.array: if nda is None: return None diff -Nru uranium-3.3.0/UM/Math/Polygon.py uranium-4.4.1/UM/Math/Polygon.py --- uranium-3.3.0/UM/Math/Polygon.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Math/Polygon.py 2019-11-19 10:50:46.000000000 +0000 @@ -1,21 +1,13 @@ -# Copyright (c) 2016 Ultimaker B.V. +# Copyright (c) 2018 Ultimaker B.V. # Uranium is released under the terms of the LGPLv3 or higher. +from typing import Optional, Tuple import numpy +import scipy.spatial -from UM.Math.Float import Float #For fuzzy comparison of edge cases. -from UM.Math.LineSegment import LineSegment #For line-line intersections for computing polygon intersections. -from UM.Math.Vector2 import Vector2 #For constructing line segments for polygon intersections. from UM.Logger import Logger - from UM.Math import NumPyUtil - -try: - import scipy.spatial - has_scipy = True -except ImportError: - has_scipy = False - +from UM.Math import ShapelyUtil ## A class representing an immutable arbitrary 2-dimensional polygon. class Polygon: @@ -63,8 +55,8 @@ coordinates = (("[" + str(point[0]) + "," + str(point[1]) + "]") for point in self._points) return "[" + ", ".join(coordinates) + "]" - def isValid(self): - return self._points is not None and len(self._points) + def isValid(self) -> bool: + return bool(self._points is not None and len(self._points) >= 3) def getPoints(self): return self._points @@ -74,7 +66,7 @@ # \param normal The normal to project on. # \return A tuple describing the line segment of this Polygon projected on to the infinite line described by normal. # The first element is the minimum value, the second the maximum. - def project(self, normal): + def project(self, normal) -> Tuple[float, float]: projection_min = numpy.dot(normal, self._points[0]) projection_max = projection_min @@ -83,13 +75,13 @@ projection_min = min(projection_min, projection) projection_max = max(projection_max, projection) - return (projection_min, projection_max) + return projection_min, projection_max ## Moves the polygon by a fixed offset. # # \param x The distance to move along the X-axis. # \param y The distance to move along the Y-axis. - def translate(self, x = 0, y = 0): + def translate(self, x = 0, y = 0) -> "Polygon": if self.isValid(): return Polygon(numpy.add(self._points, numpy.array([[x, y]]))) else: @@ -99,11 +91,11 @@ # # \param point_on_axis A point on the axis to mirror across. # \param axis_direction The direction vector of the axis to mirror across. - def mirror(self, point_on_axis, axis_direction): + def mirror(self, point_on_axis, axis_direction) -> "Polygon": #Input checking. - if axis_direction == [0, 0, 0]: - Logger.log("w", "Tried to mirror a polygon over an axis with direction [0, 0, 0].") - return #Axis has no direction. Can't expect us to mirror anything! + if axis_direction == [0, 0]: + Logger.log("w", "Tried to mirror a polygon over an axis with direction [0, 0].") + return self # Axis has no direction. Can't expect us to mirror anything! axis_direction /= numpy.linalg.norm(axis_direction) #Normalise the direction. if not self.isValid(): # Not a valid polygon, so don't do anything. return self @@ -131,239 +123,91 @@ ## Computes the intersection of the convex hulls of this and another # polygon. # - # This is an implementation of O'Rourke's "Chase" algorithm. For a more - # detailed description of why the algorithm works the way it does, please - # consult the book "Computational Geometry in C", second edition, chapter - # 7.6. - # # \param other The other polygon to intersect convex hulls with. # \return The intersection of the two polygons' convex hulls. - def intersectionConvexHulls(self, other): + def intersectionConvexHulls(self, other: "Polygon") -> "Polygon": me = self.getConvexHull() him = other.getConvexHull() if len(me._points) <= 2 or len(him._points) <= 2: #If either polygon has no surface area, then the intersection is empty. return Polygon() - index_me = 0 #The current vertex index. - index_him = 0 - advances_me = 0 #How often we've advanced. - advances_him = 0 - who_is_inside = "unknown" #Which of the two polygons is currently on the inside. - directions_me = numpy.subtract(numpy.roll(me._points, -1, axis = 0), me._points) #Pre-compute the difference between consecutive points to get a direction for each point. - directions_him = numpy.subtract(numpy.roll(him._points, -1, axis = 0), him._points) - result = [] - - #Iterate through both polygons to find intersections and inside vertices until we've made a loop through both polygons. - while advances_me <= len(me._points) or advances_him <= len(him._points): - vertex_me = me._points[index_me] - vertex_him = him._points[index_him] - if advances_me > len(me._points) * 2 or advances_him > len(him._points) * 2: #Also, if we've looped twice through either polygon, the boundaries of the polygons don't intersect. - if len(result) > 2: - return Polygon(points = result) - if me.isInside(vertex_him): #Other polygon is inside this one. - return him - if him.isInside(vertex_me): #This polygon is inside the other. - return me - #Polygons are disjunct. - return Polygon() - - me_start = Vector2(data = vertex_me) - me_end = Vector2(data = vertex_me + directions_me[index_me]) - him_start = Vector2(data = vertex_him) - him_end = Vector2(data = vertex_him + directions_him[index_him]) - - me_in_him_halfplane = (me_end - him_start).cross(him_end - him_start) #Cross gives positive if him_end is to the left of me_end (as seen from him_start). - him_in_me_halfplane = (him_end - me_start).cross(me_end - me_start) #Arr, I's got him in me halfplane, cap'n. - intersection = LineSegment(me_start, me_end).intersection(LineSegment(him_start, him_end)) - - if intersection: - result.append(intersection.getData()) #The intersection is always in the hull. - if me_in_him_halfplane > 0: #At the intersection, who was inside changes. - who_is_inside = "me" - elif him_in_me_halfplane > 0: - who_is_inside = "him" - else: - pass #Otherwise, whoever is inside remains the same (or unknown). - advances_me += 1 - index_me = advances_me % len(me._points) - advances_him += 1 - index_him = advances_him % len(him._points) - continue - - cross = (Vector2(data = directions_me[index_me]).cross(Vector2(data = directions_him[index_him]))) - - #Edge case: Two exactly opposite edges facing away from each other. - if Float.fuzzyCompare(cross, 0) and me_in_him_halfplane <= 0 and him_in_me_halfplane <= 0: - # The polygons must be disjunct then. - return Polygon() - - #Edge case: Two colinear edges. - if Float.fuzzyCompare(cross, 0) and me_in_him_halfplane <= 0: - advances_me += 1 - index_me = advances_me % len(me._points) - continue - if Float.fuzzyCompare(cross, 0) and him_in_me_halfplane <= 0: - advances_him += 1 - index_him = advances_him % len(him._points) - continue - - #Edge case: Two edges overlap. - if Float.fuzzyCompare(cross, 0): - #Just advance the outside. - if who_is_inside == "me": - advances_him += 1 - index_him = advances_him % len(him._points) - else: #him or unknown. If it's unknown, it doesn't matter which one is advanced, as long as it's the same polygon being advanced every time (me in this case). - advances_me += 1 - index_me = advances_me % len(me._points) - continue - - #Generic case: Advance whichever polygon is on the outside. - if cross >= 0: #This polygon is going faster towards the inside. - if him_in_me_halfplane > 0: - advances_me += 1 - index_me = advances_me % len(me._points) - if who_is_inside == "him": - result.append(vertex_him) - else: - advances_him += 1 - index_him = advances_him % len(him._points) - if who_is_inside == "me": - result.append(vertex_me) - else: #The other polygon is going faster towards the inside. - if me_in_him_halfplane > 0: - advances_him += 1 - index_him = advances_him % len(him._points) - if who_is_inside == "me": - result.append(vertex_me) - else: - advances_me += 1 - index_me = advances_me % len(me._points) - if who_is_inside == "him": - result.append(vertex_him) - if (result[0] == result[-1]).all(): #If the last two edges are parallel, the first vertex will have been added again. So if it is the same as the last element, remove it. - result = result[:-1] #This also handles the case where the intersection is only one point. - return Polygon(points = result) + polygen_me = ShapelyUtil.polygon2ShapelyPolygon(me) + polygon_him = ShapelyUtil.polygon2ShapelyPolygon(him) + + polygon_intersection = polygen_me.intersection(polygon_him) + if polygon_intersection.area == 0: + return Polygon() + + return Polygon(points = [list(p) for p in polygon_intersection.exterior.coords[:4]]) + + # Computes the convex hull of the union of the convex hulls of this and another polygon. + # + # \param other The other polygon to combine convex hulls with. + # \return The convex hull of the union of the two polygons' convex hulls. + def unionConvexHulls(self, other: "Polygon") -> "Polygon": + my_hull = self.getConvexHull() + other_hull = other.getConvexHull() + + if not my_hull.isValid(): + return other_hull + if not other_hull.isValid(): + return my_hull + + my_polygon = ShapelyUtil.polygon2ShapelyPolygon(my_hull) + other_polygon = ShapelyUtil.polygon2ShapelyPolygon(other_hull) + + polygon_union = my_polygon.union(other_polygon).convex_hull + if polygon_union.area == 0: + return Polygon() + + return Polygon(points = [list(p) for p in polygon_union.exterior.coords[:-1]]) ## Check to see whether this polygon intersects with another polygon. # # \param other \type{Polygon} The polygon to check for intersection. # \return A tuple of the x and y distance of intersection, or None if no intersection occured. - def intersectsPolygon(self, other): - if other is None: - return None - if len(self._points) < 2 or len(other.getPoints()) < 2: # Polygon has not enough points, so it cant intersect. + def intersectsPolygon(self, other: "Polygon") -> Optional[Tuple[float, float]]: + if not self.isValid() or not other.isValid(): return None - retSize = 10000000.0 - ret = None - for n in range(0, len(self._points)): - p0 = self._points[n-1] - p1 = self._points[n] - - normal = (p1 - p0)[::-1] - normal[1] = -normal[1] - normal /= numpy.linalg.norm(normal) - - aMin, aMax = self.project(normal) - bMin, bMax = other.project(normal) - if aMin > bMax: - return None - if bMin > aMax: - return None - size = min(aMax, bMax) - max(aMin, bMin) - if size < retSize: - if aMin < bMin: - ret = normal * -size - else: - ret = normal * size - retSize = size - - for n in range(0, len(other._points)): - p0 = other._points[n-1] - p1 = other._points[n] - - normal = (p1 - p0)[::-1] - normal[1] = -normal[1] - normal /= numpy.linalg.norm(normal) - - aMin, aMax = self.project(normal) - bMin, bMax = other.project(normal) - if aMin > bMax: - return None - if bMin > aMax: - return None - size = min(aMax, bMax) - max(aMin, bMin) - if size < retSize: - if aMin < bMin: - ret = normal * -size - else: - ret = normal * size - retSize = size - - if ret is not None: - return (ret[0], ret[1]) - else: + polygon_me = ShapelyUtil.polygon2ShapelyPolygon(self) + polygon_other = ShapelyUtil.polygon2ShapelyPolygon(other) + if polygon_other.is_empty or polygon_me.is_empty: return None + if not (polygon_me.is_valid and polygon_other.is_valid): # If not valid + return None + + polygon_intersection = polygon_me.intersection(polygon_other) + ret_size = None + if polygon_intersection: + ret_size = (polygon_intersection.bounds[2] - polygon_intersection.bounds[0], + polygon_intersection.bounds[3] - polygon_intersection.bounds[1], + ) + return ret_size ## Calculate the convex hull around the set of points of this polygon. - # - # \return \type{Polygon} The convex hull around the points of this polygon. - if has_scipy: - def getConvexHull(self): - points = self._points - - if len(points) < 1: - return Polygon(numpy.zeros((0, 2), numpy.float64)) - if len(points) <= 2: - return Polygon(numpy.array(points, numpy.float64)) - - try: - hull = scipy.spatial.ConvexHull(points) - except scipy.spatial.qhull.QhullError: - return Polygon(numpy.zeros((0, 2), numpy.float64)) - - return Polygon(numpy.flipud(hull.points[hull.vertices])) - else: - def getConvexHull(self): - unique = {} - for p in self._points: - unique[p[0], p[1]] = 1 - - points = list(unique.keys()) - points.sort() - if len(points) < 1: - return Polygon(numpy.zeros((0, 2), numpy.float32)) - if len(points) < 2: - return Polygon(numpy.array(points, numpy.float32)) - - # Build upper half of the hull. - upper = [points[0], points[1]] - for p in points[2:]: - upper.append(p) - while len(upper) > 2 and self._isRightTurn(*upper[-3:]) != 1: - del upper[-2] - - # Build lower half of the hull. - points = points[::-1] - lower = [points[0], points[1]] - for p in points[2:]: - lower.append(p) - while len(lower) > 2 and self._isRightTurn(*lower[-3:]) != 1: - del lower[-2] - - # Remove duplicates. - del lower[0] - del lower[-1] + # \return The convex hull around the points of this polygon. + def getConvexHull(self) -> "Polygon": + points = self._points + + if len(points) < 1: + return Polygon(numpy.zeros((0, 2), numpy.float64)) + if len(points) <= 2: + return Polygon(numpy.array(points, numpy.float64)) + + try: + hull = scipy.spatial.ConvexHull(points) + except scipy.spatial.qhull.QhullError: + return Polygon(numpy.zeros((0, 2), numpy.float64)) - return Polygon(numpy.array(upper + lower, numpy.float32)) + return Polygon(numpy.flipud(hull.points[hull.vertices])) ## Perform a Minkowski sum of this polygon with another polygon. # # \param other The polygon to perform a Minkowski sum with. # \return \type{Polygon} The Minkowski sum of this polygon with other. - def getMinkowskiSum(self, other): + def getMinkowskiSum(self, other: "Polygon") -> "Polygon": points = numpy.zeros((len(self._points) * len(other._points), 2)) for n in range(0, len(self._points)): for m in range(0, len(other._points)): @@ -378,7 +222,7 @@ # # \param other \type{Polygon} The Polygon to do a Minkowski addition with. # \return The convex hull around the Minkowski sum of this Polygon with other - def getMinkowskiHull(self, other): + def getMinkowskiHull(self, other: "Polygon") -> "Polygon": sum = self.getMinkowskiSum(other) return sum.getConvexHull() @@ -389,7 +233,7 @@ # # \param point The point to check of whether it is inside. # \return True if it is inside, or False otherwise. - def isInside(self, point): + def isInside(self, point) -> bool: for i in range(0,len(self._points)): if self._isRightTurn(self._points[i], self._points[(i + 1) % len(self._points)], point) == -1: #Outside this halfplane! return False @@ -405,3 +249,6 @@ return 0 else: return -1 + + +__all__ = ["Polygon"] diff -Nru uranium-3.3.0/UM/Math/Quaternion.py uranium-4.4.1/UM/Math/Quaternion.py --- uranium-3.3.0/UM/Math/Quaternion.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Math/Quaternion.py 2019-11-19 10:50:46.000000000 +0000 @@ -1,4 +1,4 @@ -# Copyright (c) 2015 Ultimaker B.V. +# Copyright (c) 2019 Ultimaker B.V. # Uranium is released under the terms of the LGPLv3 or higher. import numpy @@ -23,7 +23,7 @@ def __init__(self, x=0.0, y=0.0, z=0.0, w=1.0): # Components are stored as XYZW - self._data = numpy.array([x, y, z, w], dtype=numpy.float32) + self._data = numpy.array([x, y, z, w], dtype=numpy.float64) def getData(self): return self._data @@ -143,10 +143,10 @@ def normalize(self): self._data /= numpy.linalg.norm(self._data) - ## Set quaternion by providing a homogenous (4x4) rotation matrix. + ## Set quaternion by providing a homogeneous (4x4) rotation matrix. # \param matrix 4x4 Matrix object - # \param is_precise - def setByMatrix(self, matrix, is_precise = False): + # \param ensure_unit_length + def setByMatrix(self, matrix, ensure_unit_length = False): trace = matrix.at(0, 0) + matrix.at(1, 1) + matrix.at(2, 2) if trace > 0.0: self._data[0] = matrix.at(2, 1) - matrix.at(1, 2) @@ -178,11 +178,11 @@ self._data[1] = matrix.at(2, 1) + matrix.at(1, 2) self._data[1] = matrix.at(2, 2) - matrix.at(0, 0) - matrix.at(1, 1) + 1.0 self._data[3] = matrix.at(1, 0) - matrix.at(0, 1) - - self.normalize() + if ensure_unit_length: + self.normalize() def toMatrix(self): - m = numpy.zeros((4, 4), dtype=numpy.float32) + m = numpy.zeros((4, 4), dtype=numpy.float64) s = 2.0 / (self.x ** 2 + self.y ** 2 + self.z ** 2 + self.w ** 2) @@ -202,19 +202,19 @@ yz = self.y * zs zz = self.z * zs - m[0,0] = 1.0 - (yy + zz) - m[0,1] = xy - wz - m[0,2] = xz + wy - - m[1,0] = xy + wz - m[1,1] = 1.0 - (xx + zz) - m[1,2] = yz - wx - - m[2,0] = xz - wy - m[2,1] = yz + wx - m[2,2] = 1.0 - (xx + yy) + m[0, 0] = 1.0 - (yy + zz) + m[0, 1] = xy - wz + m[0, 2] = xz + wy + + m[1, 0] = xy + wz + m[1, 1] = 1.0 - (xx + zz) + m[1, 2] = yz - wx + + m[2, 0] = xz - wy + m[2, 1] = yz + wx + m[2, 2] = 1.0 - (xx + yy) - m[3,3] = 1.0 + m[3, 3] = 1.0 return Matrix(m) @@ -246,7 +246,7 @@ if Float.fuzzyCompare(axis.length(), 0.0): axis = Vector.Unit_Y.cross(v1) - axis.normalize() + axis = axis.normalized() q = Quaternion() q.setByAngleAxis(math.pi, axis) else: @@ -279,3 +279,6 @@ def __repr__(self): return "Quaternion(x={0}, y={1}, z={2}, w={3})".format(self.x, self.y, self.z, self.w) + + def __str__(self): + return "Q<{0},{1},{2},w={3}>".format(self.x, self.y, self.z, self.w) diff -Nru uranium-3.3.0/UM/Math/ShapelyUtil.py uranium-4.4.1/UM/Math/ShapelyUtil.py --- uranium-3.3.0/UM/Math/ShapelyUtil.py 1970-01-01 00:00:00.000000000 +0000 +++ uranium-4.4.1/UM/Math/ShapelyUtil.py 2019-11-19 10:50:46.000000000 +0000 @@ -0,0 +1,16 @@ +# Copyright (c) 2018 Ultimaker B.V. +# Uranium is released under the terms of the LGPLv3 or higher. + +from typing import TYPE_CHECKING + +import shapely.geometry + +if TYPE_CHECKING: + from UM.Math.Polygon import Polygon + + +# +# Converts a UM.Polygon into a shapely Polygon. +# +def polygon2ShapelyPolygon(polygon: "Polygon") -> shapely.geometry.Polygon: + return shapely.geometry.Polygon([tuple(p) for p in polygon.getPoints()]) diff -Nru uranium-3.3.0/UM/Math/Vector2.py uranium-4.4.1/UM/Math/Vector2.py --- uranium-3.3.0/UM/Math/Vector2.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Math/Vector2.py 1970-01-01 00:00:00.000000000 +0000 @@ -1,213 +0,0 @@ -# Copyright (c) 2015 Ultimaker B.V. -# Uranium is released under the terms of the LGPLv3 or higher. - -import numpy -import numpy.linalg - - -## Simple 2D-vector class based on numpy arrays. -# -# This class represents a 2-dimensional vector. -class Vector2(object): - Unit_X = None # type: Vector2 - Unit_Y = None # type: Vector2 - - ## Creates a new 2D vector. - # - # Usage: - # - Vector2(x,y): Creates a vector [x,y]. - # - Vector2(data = [x,y]): Creates a vector [x,y]. - # - Vector2(): Creates a vector [0,0]. - # - # \param data The numpy array of data to fill the vector with. - def __init__(self, *args, **kwargs): - if len(args) == 2: #X and Y specified. - self._data = numpy.array([args[0], args[1]], dtype=numpy.float32) - elif "data" in kwargs: #Data parameter specified. - self._data = kwargs["data"].copy() - else: #Nothing specified. Fill in 0. - self._data = numpy.zeros(2, dtype=numpy.float32) - - ## Computes the generalised cross product of this vector with another. - # - # \param other The vector to compute the cross product with. - # \return The generalised cross product. - def cross(self, other): - return self._data[0] * other._data[1] - self._data[1] * other._data[0] - - ## Computes the dot product of this vector and another. - # - # \param other The vector to compute the dot product with. - # \return The dot product of the two vectors. - def dot(self, other): - return numpy.dot(self._data, other._data) - - ## Gets the numpy array with the data. - # - # \return A numpy array with the data of this vector. - def getData(self): - return self._data - - ## Gets the Euclidean length of this vector. - # - # \return The length of this vector. - def length(self): - return numpy.linalg.norm(self._data) - - ## Gets a vector that is perpendicular to this vector. - # - # There are exactly two vectors perpendicular. This method gets the - # perpendicular vector that is left of this vector. - # - # \return A perpendicular vector. - def perpendicular(self): - return Vector2(-self._data[1], self._data[0]) - - ## Changes the x-component of this vector. - # - # \param x The new x-component of the vector. - def setX(self, x): - self._data[0] = x - - ## Changes the y-component of this vector. - # - # \param y The new y-component of the vector. - def setY(self, y): - self._data[1] = y - - ## Gets the x-component of the vector. - # - # \return The x-component of the vector. - @property - def x(self): - return self._data[0] - - ## Gets the y-component of the vector. - # - # \return The y-component of the vector. - @property - def y(self): - return self._data[1] - - ## Adds the specified vector to this vector element-wise. - # - # \param other The vector that must be added to this vector. - # \return The result of the adding. - def __add__(self, other): - result = Vector2(data = self._data) - result += other - return result - - ## Adds the specified vector in-place to this vector element-wise. - # - # \param other The vector that must be added to this vector. - def __iadd__(self, other): - if type(other) is float: - self._data[0] += other - self._data[1] += other - elif type(other) is Vector2: - self._data[0] += other._data[0] - self._data[1] += other._data[1] - else: - raise NotImplementedError() - - return self - - ## Divides this vector by the specified vector element-wise. - # - # \param other The vector by which this vector must be divided. - # \return The result of the division. - def __truediv__(self, other): - result = Vector2(data = self._data) - result /= other - return result - - ## Divides this vector in-place by the specified vector element-wise. - # - # \param other The vector by which this vector must be divided. - def __itruediv__(self, other): - if type(other) is float or type(other) is int: - self._data /= other - return self - else: - raise NotImplementedError() - - ## Divides this vector by the specified vector element-wise. - # - # \param other The vector by which this vector must be divided. - # \return The result of the division. - def __rtruediv__(self, other): - if type(other) is float: - result = numpy.float32(other) / self._data - return Vector2(result[0], result[1]) - else: - raise NotImplementedError() - - ## Multiplies the specified vector with this vector element-wise. - # - # \param other The vector that must be multiplied with this vector. - # \return The result of the multiplication. - def __mul__(self, other): - result = Vector2(data = self._data) - result *= other - return result - - ## Multiplies the specified vector in-place with this vector element-wise. - # - # \param other The vector that must be multiplied with this vector. - def __imul__(self, other): - if type(other) is float: - self._data[0] *= other - self._data[1] *= other - elif type(other) is Vector2: - self._data[0] *= other._data[0] - self._data[1] *= other._data[1] - else: - raise NotImplementedError() - - return self - - ## Multiplies the specified vector with this vector element-wise. - # - # \param other The vector that must be multiplied with this vector. - def __rmul__(self, other): - result = Vector2(data = self._data) - result *= other - return result - - ## Negates the vector, resulting in a vector with the opposite direction. - # - # \return The negated vector. - def __neg__(self): - return Vector2(data = -self._data) - - ## Subtracts the specified vector from this vector element-wise. - # - # \param other The vector that must be subtracted from this vector. - # \return The result of the subtraction. - def __sub__(self, other): - result = Vector2(data = self._data) - result -= other - return result - - ## Subtracts the specified vector in-place from this vector element-wise. - # - # \param other The vector that must be subtracted from this vector. - def __isub__(self, other): - if type(other) is float: - self._data[0] -= other - self._data[1] -= other - elif type(other) is Vector2: - self._data[0] -= other._data[0] - self._data[1] -= other._data[1] - else: - raise NotImplementedError() - return self - - ## Gives a programmer-readable string representation of this vector. - # - # The format is: [x,y] - # - # \return A string representation of this vector. - def __str__(self): - return "[" + str(self._data[0]) + "," + str(self._data[1]) + "]" \ No newline at end of file diff -Nru uranium-3.3.0/UM/Math/Vector.py uranium-4.4.1/UM/Math/Vector.py --- uranium-3.3.0/UM/Math/Vector.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Math/Vector.py 2019-11-19 10:50:46.000000000 +0000 @@ -1,4 +1,4 @@ -# Copyright (c) 2015 Ultimaker B.V. +# Copyright (c) 2019 Ultimaker B.V. # Uranium is released under the terms of the LGPLv3 or higher. import numpy @@ -24,7 +24,7 @@ # \param x X coordinate of vector. # \param y Y coordinate of vector. # \param z Z coordinate of vector. - def __init__(self, x=None, y=None, z=None, data=None, round_digits=None): + def __init__(self, x = None, y = None, z = None, data = None, round_digits = None): if x is not None and y is not None and z is not None: self._data = numpy.array([x, y, z], dtype = numpy.float64) elif data is not None: @@ -56,7 +56,7 @@ def z(self): return numpy.float64(self._data[2]) - def set(self, x=None, y=None, z=None): + def set(self, x = None, y = None, z = None): new_x = self._data[0] if x is None else x new_y = self._data[1] if y is None else y new_z = self._data[2] if z is None else z @@ -64,8 +64,8 @@ ## Get the angle from this vector to another def angleToVector(self, vector): - v0 = numpy.array(self._data, dtype = numpy.float64, copy=False) - v1 = numpy.array(vector.getData(), dtype = numpy.float64, copy=False) + v0 = numpy.array(self._data, dtype = numpy.float64, copy = False) + v1 = numpy.array(vector.getData(), dtype = numpy.float64, copy = False) dot = numpy.sum(v0 * v1) dot /= self._normalizeVector(v0) * self._normalizeVector(v1) return numpy.arccos(numpy.fabs(dot)) @@ -80,7 +80,7 @@ ## Return length, i.e. Euclidean norm, of ndarray along axis. def _normalizeVector(self, data): - data = numpy.array(data, dtype = numpy.float64, copy=True) + data = numpy.array(data, dtype = numpy.float64, copy = True) if data.ndim == 1: return math.sqrt(numpy.dot(data, data)) data *= data @@ -99,7 +99,7 @@ return Vector(result[0], result[1], result[2]) def multiply(self, matrix): - d = numpy.empty(4, dtype=numpy.float64) + d = numpy.empty(4, dtype = numpy.float64) d[0] = self._data[0] d[1] = self._data[1] d[2] = self._data[2] @@ -137,25 +137,25 @@ # # \param epsilon optional tolerance value for the comparision. # \returns True if the two vectors are the same. - def equals(self, other, epsilon=1e-6): + def equals(self, other, epsilon = 1e-6): return Float.fuzzyCompare(self.x, other.x, epsilon) and \ Float.fuzzyCompare(self.y, other.y, epsilon) and \ Float.fuzzyCompare(self.z, other.z, epsilon) def __add__(self, other): if type(other) is Vector: - return Vector(data=self._data + other._data) + return Vector(data = self._data + other._data) else: - return Vector(data=self._data + other) + return Vector(data = self._data + other) def __iadd__(self, other): return self + other def __sub__(self, other): if type(other) is Vector: - return Vector(data=self._data - other._data) + return Vector(data = self._data - other._data) else: - return Vector(data=self._data - other) + return Vector(data = self._data - other) def __isub__(self, other): return self - other @@ -182,7 +182,7 @@ new_data = self._data / other._data else: raise NotImplementedError() - return Vector(data=new_data) + return Vector(data = new_data) def __itruediv__(self, other): return self / other @@ -200,7 +200,10 @@ return Vector(data = -1 * self._data) def __repr__(self): - return "Vector({0}, {1}, {2})".format(self._data[0], self._data[1], self._data[2]) + return "Vector({0:.3}, {1:.3}, {2:.3})".format(self._data[0], self._data[1], self._data[2]) + + def __str__(self): + return "<{0:.3},{1:.3},{2:.3}>".format(self._data[0], self._data[1], self._data[2]) def __lt__(self, other): return self._data[0] < other._data[0] and self._data[1] < other._data[1] and self._data[2] < other._data[2] diff -Nru uranium-3.3.0/UM/Mesh/MeshBuilder.py uranium-4.4.1/UM/Mesh/MeshBuilder.py --- uranium-3.3.0/UM/Mesh/MeshBuilder.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Mesh/MeshBuilder.py 2019-11-19 10:50:46.000000000 +0000 @@ -1,4 +1,4 @@ -# Copyright (c) 2018 Ultimaker B.V. +# Copyright (c) 2019 Ultimaker B.V. # Uranium is released under the terms of the LGPLv3 or higher. from UM.Mesh.MeshData import MeshData @@ -38,9 +38,9 @@ # # \return A Mesh data. def build(self): - return MeshData(vertices=self.getVertices(), normals=self.getNormals(), indices=self.getIndices(), - colors=self.getColors(), uvs=self.getUVCoordinates(), file_name=self.getFileName(), - center_position=self.getCenterPosition()) + return MeshData(vertices = self.getVertices(), normals = self.getNormals(), indices = self.getIndices(), + colors = self.getColors(), uvs = self.getUVCoordinates(), file_name = self.getFileName(), + center_position = self.getCenterPosition()) def setCenterPosition(self, position): self._center_position = position @@ -103,7 +103,7 @@ if self._normals is None: return None - return self._normals[0:self._vertex_count] + return self._normals[0 : self._vertex_count] ## Return whether this mesh has indices. def hasIndices(self): @@ -128,7 +128,7 @@ if self._colors is None: return None - return self._colors[0:self._vertex_count] + return self._colors[0 : self._vertex_count] def hasUVCoordinates(self): return self._uvs is not None @@ -194,9 +194,9 @@ Logger.log("w", "Had to convert %s 'num_vertices' with int(): %s -> %s ", type(num_vertices), num_vertices, int(num_vertices)) num_vertices = int(num_vertices) - self._vertices = numpy.zeros((num_vertices, 3), dtype=numpy.float32) - self._colors = numpy.zeros((num_vertices, 4), dtype=numpy.float32) - self._indices = numpy.zeros((num_faces, 3), dtype=numpy.int32) + self._vertices = numpy.zeros((num_vertices, 3), dtype = numpy.float32) + self._colors = numpy.zeros((num_vertices, 4), dtype = numpy.float32) + self._indices = numpy.zeros((num_faces, 3), dtype = numpy.int32) self._vertex_count = 0 self._face_count = 0 @@ -207,10 +207,10 @@ # \param z z coordinate of vertex. def addVertex(self, x, y, z): if self._vertices is None: - self._vertices = numpy.zeros((10, 3), dtype=numpy.float32) + self._vertices = numpy.zeros((10, 3), dtype = numpy.float32) if len(self._vertices) == self._vertex_count: - self._vertices.resize((self._vertex_count * 2, 3)) + self._vertices.resize((self._vertex_count * 2, 3), refcheck = False) # Disabling refcheck allows PyCharm's debugger to use this array. self._vertices[self._vertex_count, 0] = x self._vertices[self._vertex_count, 1] = y @@ -226,18 +226,19 @@ # \param nz z part of normal. def addVertexWithNormal(self, x, y, z, nx, ny, nz): if self._vertices is None: - self._vertices = numpy.zeros((10, 3), dtype=numpy.float32) - if self._normals is None: #Specific case, reserve vert count does not reservere size for normals - self._normals = numpy.zeros((10, 3), dtype=numpy.float32) + self._vertices = numpy.zeros((10, 3), dtype = numpy.float32) + + if self._normals is None: # Specific case, reserve vert count does not reserve size for normals + self._normals = numpy.zeros((10, 3), dtype = numpy.float32) if len(self._vertices) == self._vertex_count: - self._vertices.resize((self._vertex_count * 2, 3)) + self._vertices.resize((self._vertex_count * 2, 3), refcheck = False) # Disabling refcheck allows PyCharm's debugger to use this array. if self._normals is None: - self._normals = numpy.zeros((self._vertex_count, 3), dtype=numpy.float32) + self._normals = numpy.zeros((self._vertex_count, 3), dtype = numpy.float32) if len(self._normals) == self._vertex_count: - self._normals.resize((self._vertex_count * 2, 3)) + self._normals.resize((self._vertex_count * 2, 3), refcheck = False) # Disabling refcheck allows PyCharm's debugger to use this array. self._vertices[self._vertex_count, 0] = x self._vertices[self._vertex_count, 1] = y @@ -259,10 +260,10 @@ # \param z2 z coordinate of third vertex. def addFaceByPoints(self, x0, y0, z0, x1, y1, z1, x2, y2, z2): if self._indices is None: - self._indices = numpy.zeros((10, 3), dtype=numpy.int32) + self._indices = numpy.zeros((10, 3), dtype = numpy.int32) if len(self._indices) == self._face_count: - self._indices.resize((self._face_count * 2, 3)) + self._indices.resize((self._face_count * 2, 3), refcheck = False) # Disabling refcheck allows PyCharm's debugger to use this array. self._indices[self._face_count, 0] = self._vertex_count self._indices[self._face_count, 1] = self._vertex_count + 1 @@ -297,10 +298,10 @@ # \param nz2 The Z coordinate of the normal of the third vertex. def addFaceWithNormals(self,x0, y0, z0, nx0, ny0, nz0, x1, y1, z1, nx1, ny1, nz1, x2, y2, z2, nx2, ny2, nz2): if self._indices is None: - self._indices = numpy.zeros((10, 3), dtype=numpy.int32) + self._indices = numpy.zeros((10, 3), dtype = numpy.int32) if len(self._indices) == self._face_count: - self._indices.resize((self._face_count * 2, 3)) + self._indices.resize((self._face_count * 2, 3), refcheck = False) # Disabling refcheck allows PyCharm's debugger to use this array. self._indices[self._face_count, 0] = self._vertex_count self._indices[self._face_count, 1] = self._vertex_count + 1 @@ -317,10 +318,10 @@ # \param color \type{UM.Math.Color} the color of the vertex. def setVertexColor(self, index, color): if self._colors is None: - self._colors = numpy.zeros((10, 4), dtype=numpy.float32) + self._colors = numpy.zeros((10, 4), dtype = numpy.float32) if len(self._colors) < len(self._vertices): - self._colors.resize((len(self._vertices), 4)) + self._colors.resize((len(self._vertices), 4), refcheck = False) # Disabling refcheck enables PyCharm's debugger to use this array. self._colors[index, 0] = color.r self._colors[index, 1] = color.g @@ -329,10 +330,10 @@ def setVertexUVCoordinates(self, index, u, v): if self._uvs is None: - self._uvs = numpy.zeros((10, 2), dtype=numpy.float32) + self._uvs = numpy.zeros((10, 2), dtype = numpy.float32) if len(self._uvs) < len(self._vertices): - self._uvs.resize((len(self._vertices), 2)) + self._uvs.resize((len(self._vertices), 2), refcheck = False) # Disabling refcheck enables PyCharm's debugger to use this array. self._uvs[index, 0] = u self._uvs[index, 1] = v @@ -343,7 +344,7 @@ self._vertex_count = len(vertices) else: self._vertices = numpy.concatenate((self._vertices[0:self._vertex_count], vertices)) - self._vertex_count += len(vertices) + self._vertex_count += len(vertices) def addIndices(self, indices): if self._indices is None: @@ -366,8 +367,8 @@ # \param indices consists of row triplet indices into the input \p vertices to build up the triangular faces. # \param colors defines the color of each vertex in \p vertices. def addFacesWithColor(self, vertices, indices, colors): - if len(self._indices) < self._face_count + len(indices) or len(self._colors) < self._vertex_count + len(colors) or len(self._vertices) < self._vertex_count + len(vertices): - Logger.log( "w", "Insufficient size of mesh_data: f_c: %s, v_c: %s, _in_l: %s, in_l: %s, _co_l: %s, co_l: %s, _ve_l: %s, ve_l: %s", self._face_count, self._vertex_count, len(self._indices), len(indices), len(self._colors), len(colors),len(self._vertices), len(vertices)) + if len(self._indices) < self._face_count + len(indices) or len(self._colors) < self._vertex_count + len(colors) or len(self._vertices) < self._vertex_count + len(vertices): + Logger.log("w", "Insufficient size of mesh_data: f_c: %s, v_c: %s, _in_l: %s, in_l: %s, _co_l: %s, co_l: %s, _ve_l: %s, ve_l: %s", self._face_count, self._vertex_count, len(self._indices), len(indices), len(self._colors), len(colors),len(self._vertices), len(vertices)) return self._indices[self._face_count:(self._face_count + len(indices)), :] = self._vertex_count + indices @@ -376,7 +377,7 @@ end_index = self._vertex_count + len(vertices) self._colors[self._vertex_count:end_index, :] = colors self._vertices[self._vertex_count:end_index, :] = vertices - self._vertex_count += len(vertices) + self._vertex_count += len(vertices) ## # /param colors is a vertexCount by 4 numpy array with floats in range of 0 to 1. @@ -676,7 +677,7 @@ [minW, 0, minD], [maxW, 0, minD], [0, height, 0] - ], dtype=numpy.float32) + ], dtype = numpy.float32) verts = verts.dot(matrix.getData()[0:3,0:3]) #Rotate the pyramid around the axis. verts[:] += center.getData() self.addVertices(verts) @@ -688,7 +689,7 @@ [start + 2, start, start + 4], [start, start + 3, start + 1], #The base of the pyramid. [start, start + 2, start + 3] - ], dtype=numpy.int32) + ], dtype = numpy.int32) self.addIndices(indices) if color: #If we have a colour, add the colour to each of the vertices. @@ -752,6 +753,6 @@ normal = (v1 - v0).cross(v2 - v0) - self.addQuad(v0, v1, v2, v3, color=color, normal = normal) + self.addQuad(v0, v1, v2, v3, color = color, normal = normal) return True diff -Nru uranium-3.3.0/UM/Mesh/MeshData.py uranium-4.4.1/UM/Mesh/MeshData.py --- uranium-3.3.0/UM/Mesh/MeshData.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Mesh/MeshData.py 2019-11-19 10:50:46.000000000 +0000 @@ -8,7 +8,7 @@ from UM.Math.Matrix import Matrix from enum import Enum -from typing import List, Optional +from typing import List, Optional, Tuple import threading import numpy @@ -55,10 +55,6 @@ self._face_count = len(self._indices) if self._indices is not None else 0 self._type = type self._file_name = file_name # type: Optional[str] - if file_name: - from UM.Application import Application - self._application = Application.getInstance() - self._application.getController().getScene().addWatchedFile(file_name) # original center position self._center_position = center_position # original zero position, is changed after transformation @@ -164,7 +160,7 @@ def hasUVCoordinates(self) -> bool: return self._uvs is not None - def getFileName(self) -> str: + def getFileName(self) -> Optional[str]: return self._file_name ## Transform the meshdata, center and zero position by given Matrix @@ -192,13 +188,13 @@ if self._vertices is None: return None - data = numpy.pad(self.getConvexHullVertices(), ((0, 0), (0, 1)), "constant", constant_values=(0.0, 1.0)) - if matrix is not None: - transposed = matrix.getTransposed().getData() - data = data.dot(transposed) - data += transposed[:, 3] - data = data[:, 0:3] + data = self.getConvexHullTransformedVertices(matrix) + else: + data = self.getConvexHullVertices() + + if data is None: + return None min = data.min(axis=0) max = data.max(axis=0) @@ -260,9 +256,11 @@ ## Gets the convex hull points # # \return \type{numpy.ndarray} the vertices which describe the convex hull - def getConvexHullVertices(self) -> numpy.ndarray: + def getConvexHullVertices(self) -> Optional[numpy.ndarray]: if self._convex_hull_vertices is None: convex_hull = self.getConvexHull() + if convex_hull is None: + return None self._convex_hull_vertices = numpy.take(convex_hull.points, convex_hull.vertices, axis=0) return self._convex_hull_vertices @@ -276,6 +274,24 @@ else: return None + ## Gets the plane the supplied face lies in. The resultant plane is specified by a point and a normal. + # + # \param face_id \type{int} The index of the face (not the flattened indices). + # \return \type{Tuple[numpy.ndarray, numpy.ndarray]} A plane, the 1st vector is the center, the 2nd the normal. + def getFacePlane(self, face_id: int) -> Tuple[numpy.ndarray, numpy.ndarray]: + if not self._indices or len(self._indices) == 0: + base_index = face_id * 3 + v_a = self._vertices[base_index] + v_b = self._vertices[base_index + 1] + v_c = self._vertices[base_index + 2] + else: + v_a = self._vertices[self._indices[face_id][0]] + v_b = self._vertices[self._indices[face_id][1]] + v_c = self._vertices[self._indices[face_id][2]] + in_point = (v_a + v_b + v_c) / 3.0 + face_normal = numpy.cross(v_b - v_a, v_c - v_a) + return in_point, face_normal + def hasAttribute(self, key: str) -> bool: return key in self._attributes @@ -290,6 +306,26 @@ result.sort() return result + def invertNormals(self) -> None: + if self._normals is not None: + mirror = Matrix() + mirror.setToIdentity() + mirror.scaleByFactor(-1.0) + self._normals = transformNormals(self._normals, mirror) + if self._indices is not None: + new_indices = [] + for face in self._indices: + new_indices.append([face[1], face[0], face[2]]) + self._indices = NumPyUtil.immutableNDArray(new_indices) + else: + new_vertices = [] + num_vertices = len(self._vertices) + for i in range(0, num_vertices, 3): + new_vertices.append(self._vertices[i + 1]) + new_vertices.append(self._vertices[i]) + new_vertices.append(self._vertices[i + 2]) + self._vertices = NumPyUtil.immutableNDArray(new_vertices) + def toString(self) -> str: return "MeshData(_vertices=" + str(self._vertices) + ", _normals=" + str(self._normals) + ", _indices=" + \ str(self._indices) + ", _colors=" + str(self._colors) + ", _uvs=" + str(self._uvs) + ", _attributes=" + \ @@ -404,8 +440,7 @@ return hull_result -def createConvexHull(vertex_data: numpy.ndarray) -> Optional[scipy.spatial.ConvexHull]: - hull_result = None +def createConvexHull(vertex_data: numpy.ndarray) -> scipy.spatial.ConvexHull: try: hull_result = scipy.spatial.ConvexHull(vertex_data) except scipy.spatial.qhull.QhullError: diff -Nru uranium-3.3.0/UM/Mesh/MeshFileHandler.py uranium-4.4.1/UM/Mesh/MeshFileHandler.py --- uranium-3.3.0/UM/Mesh/MeshFileHandler.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Mesh/MeshFileHandler.py 2019-11-19 10:50:46.000000000 +0000 @@ -1,19 +1,24 @@ -# Copyright (c) 2015 Ultimaker B.V. +# Copyright (c) 2018 Ultimaker B.V. # Uranium is released under the terms of the LGPLv3 or higher. +import os +from PyQt5.QtCore import QObject #For typing. + from UM.Logger import Logger from UM.Math.Matrix import Matrix from UM.Math.Vector import Vector from UM.FileHandler.FileHandler import FileHandler - -import os.path +from typing import TYPE_CHECKING +if TYPE_CHECKING: + from UM.Qt.QtApplication import QtApplication ## Central class for reading and writing meshes. # This class is created by Application and handles reading and writing mesh files. class MeshFileHandler(FileHandler): - def __init__(self): - super().__init__("mesh_writer", "mesh_reader") + + def __init__(self, application: "QtApplication", writer_type: str = "mesh_writer", reader_type: str = "mesh_reader", parent: QObject = None) -> None: + super().__init__(application, writer_type, reader_type, parent) # Try to read the mesh_data from a file using a specified MeshReader. # \param reader the MeshReader to read the file with. @@ -48,7 +53,7 @@ return results except OSError as e: - Logger.log("e", str(e)) + Logger.logException("e", str(e)) Logger.log("w", "Unable to read file %s", file_name) return None # unable to read diff -Nru uranium-3.3.0/UM/Mesh/MeshReader.py uranium-4.4.1/UM/Mesh/MeshReader.py --- uranium-3.3.0/UM/Mesh/MeshReader.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Mesh/MeshReader.py 2019-11-19 10:50:46.000000000 +0000 @@ -1,18 +1,24 @@ # Copyright (c) 2015 Ultimaker B.V. # Uranium is released under the terms of the LGPLv3 or higher. +from typing import Union, List -import os -from enum import Enum +import UM.Application from UM.FileHandler.FileReader import FileReader +from UM.Scene.SceneNode import SceneNode class MeshReader(FileReader): - def __init__(self): + def __init__(self) -> None: super().__init__() ## Read mesh data from file and returns a node that contains the data # Note that in some cases you can get an entire scene of nodes in this way (eg; 3MF) # # \return node \type{SceneNode} or \type{list(SceneNode)} The SceneNode or SceneNodes read from file. - def read(self, file_name): + def read(self, file_name: str) -> Union[SceneNode, List[SceneNode]]: + result = self._read(file_name) + UM.Application.Application.getInstance().getController().getScene().addWatchedFile(file_name) + return result + + def _read(self, file_name: str) -> Union[SceneNode, List[SceneNode]]: raise NotImplementedError("MeshReader plugin was not correctly implemented, no read was specified") diff -Nru uranium-3.3.0/UM/Mesh/MeshWriter.py uranium-4.4.1/UM/Mesh/MeshWriter.py --- uranium-3.3.0/UM/Mesh/MeshWriter.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Mesh/MeshWriter.py 2019-11-19 10:50:46.000000000 +0000 @@ -8,8 +8,8 @@ ## Base class for mesh writer objects class MeshWriter(FileWriter): - def __init__(self): - super().__init__() + def __init__(self, *args, **kwargs): + super().__init__(*args, **kwargs) ## Output a collection of nodes to stream in such a way that it makes sense # for the file format. diff -Nru uranium-3.3.0/UM/Mesh/ReadMeshJob.py uranium-4.4.1/UM/Mesh/ReadMeshJob.py --- uranium-3.3.0/UM/Mesh/ReadMeshJob.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Mesh/ReadMeshJob.py 2019-11-19 10:50:46.000000000 +0000 @@ -3,7 +3,6 @@ from UM.Message import Message from UM.Math.Vector import Vector -from UM.Preferences import Preferences from UM.Logger import Logger from UM.FileHandler.ReadFileJob import ReadFileJob @@ -13,6 +12,7 @@ from UM.i18n import i18nCatalog i18n_catalog = i18nCatalog("uranium") + ## A Job subclass that performs mesh loading. # # The result of this Job is a MeshData object. @@ -36,19 +36,22 @@ node._resetAABB() build_bounds = node.getBoundingBox() - if Preferences.getInstance().getValue("mesh/scale_to_fit") == True or Preferences.getInstance().getValue("mesh/scale_tiny_meshes") == True: + if build_bounds is None or max_bounds is None: + continue + + if self._application.getInstance().getPreferences().getValue("mesh/scale_to_fit") == True or self._application.getInstance().getPreferences().getValue("mesh/scale_tiny_meshes") == True: scale_factor_width = max_bounds.width / build_bounds.width scale_factor_height = max_bounds.height / build_bounds.height scale_factor_depth = max_bounds.depth / build_bounds.depth scale_factor = min(scale_factor_width, scale_factor_depth, scale_factor_height) - if Preferences.getInstance().getValue("mesh/scale_to_fit") == True and (scale_factor_width < 1 or scale_factor_height < 1 or scale_factor_depth < 1): # Use scale factor to scale large object down + if self._application.getInstance().getPreferences().getValue("mesh/scale_to_fit") == True and (scale_factor_width < 1 or scale_factor_height < 1 or scale_factor_depth < 1): # Use scale factor to scale large object down # Ignore scaling on models which are less than 1.25 times bigger than the build volume ignore_factor = 1.25 if 1 / scale_factor < ignore_factor: Logger.log("i", "Ignoring auto-scaling, because %.3d < %.3d" % (1 / scale_factor, ignore_factor)) scale_factor = 1 pass - elif Preferences.getInstance().getValue("mesh/scale_tiny_meshes") == True and (scale_factor_width > 100 and scale_factor_height > 100 and scale_factor_depth > 100): + elif self._application.getInstance().getPreferences().getValue("mesh/scale_tiny_meshes") == True and (scale_factor_width > 100 and scale_factor_height > 100 and scale_factor_depth > 100): # Round scale factor to lower factor of 10 to scale tiny object up (eg convert m to mm units) try: scale_factor = math.pow(10, math.floor(math.log(scale_factor) / math.log(10))) diff -Nru uranium-3.3.0/UM/Mesh/Vertex.py uranium-4.4.1/UM/Mesh/Vertex.py --- uranium-3.3.0/UM/Mesh/Vertex.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Mesh/Vertex.py 1970-01-01 00:00:00.000000000 +0000 @@ -1,51 +0,0 @@ -# Copyright (c) 2015 Ultimaker B.V. -# Uranium is released under the terms of the LGPLv3 or higher. - -from UM.Math.Vector import Vector -import numpy -from UM.Decorators import deprecated - - -## A vertex with a position and a normal. -class Vertex(object): - ## Construct a vertex. - # - # Possible keyword parameters: - # - position: Vector with the vertex' position. - # - normal: Vector with the vertex' normal - # - # Unnamed arguments: - # - x, y, z passed as numbers. - @deprecated("Vertex class is no longer used as it causes to much overhead. Use numpy arrays instead", "2.6") - def __init__(self, *args, **kwargs): - self._position = Vector() - self._normal = None - - if len(args) == 3: - self._position = Vector(args[0], args[1], args[2]) - - if "position" in kwargs: - self._position = kwargs["position"] - - if "normal" in kwargs: - self._normal = kwargs["normal"] - - ## Get the position the vertex - # \returns position Vector - @property - def position(self): - return self._position - - ## Get the normal the vertex - # \returns normal Vector - @property - def normal(self): - return self._normal - - def hasNormal(self): - return self._normal is not None - - ## Convert the vertex into a string, which is required for parsing over sockets / streams - # It's kinda hackish to do it this way, but it would take to much effort to implement myself. - def toString(self): - return numpy.array([self._position.x(), self._position.y(), self._position.z(), self._normal.x(), self._normal.y(), self._normal.z()]).tostring() diff -Nru uranium-3.3.0/UM/Mesh/WriteMeshJob.py uranium-4.4.1/UM/Mesh/WriteMeshJob.py --- uranium-3.3.0/UM/Mesh/WriteMeshJob.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Mesh/WriteMeshJob.py 1970-01-01 00:00:00.000000000 +0000 @@ -1,21 +0,0 @@ -# Copyright (c) 2016 Ultimaker B.V. -# Uranium is released under the terms of the LGPLv3 or higher. - -from UM.FileHandler.WriteFileJob import WriteFileJob -from UM.Decorators import deprecated - - -## A Job subclass that performs mesh writing. -# -# The result of this Job is a MeshData object. -@deprecated("Use the more generic WriteJob", "2.4") -class WriteMeshJob(WriteFileJob): - ## Creates a new job for writing meshes. - # - # \param writer The file writer to use, with the correct MIME type. - # \param stream The output stream to write to. - # \param nodes A collection of nodes to write to the stream. - # \param mode Additional information to send to the writer, such as whether to - # write in binary format or in ASCII format. - def __init__(self, writer, stream, nodes, mode): - super().__init__(writer, stream, nodes, mode) diff -Nru uranium-3.3.0/UM/Message.py uranium-4.4.1/UM/Message.py --- uranium-3.3.0/UM/Message.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Message.py 2019-11-19 10:50:46.000000000 +0000 @@ -1,10 +1,12 @@ # Copyright (c) 2016 Ultimaker B.V. # Uranium is released under the terms of the LGPLv3 or higher. +from typing import Optional, Union, Dict, List from UM.Signal import Signal, signalemitter from UM.Logger import Logger from PyQt5.QtCore import QTimer, pyqtSignal, QObject + ## Class for displaying messages to the user. @signalemitter class Message(QObject): @@ -12,6 +14,12 @@ class ActionButtonStyle: DEFAULT = 0 LINK = 1 + SECONDARY = 2 + + + class ActionButtonAlignment: + ALIGN_LEFT = 2 + ALIGN_RIGHT = 3 ## Class for displaying messages to the user. @@ -26,20 +34,28 @@ # if lifetime is 0, it will never automatically be destroyed. # \param dismissible Can the user dismiss the message? # \param title Phrase that will be shown above the message + # \param image_source an absolute path where an image can be found to be displayed (QUrl.toLocalFile()) can be used for that. + # \param image_caption Text to be displayed below the image (or anywhere really, it's up tot the QML to handle that) # \progress Is there nay progress to be displayed? if -1, it's seen as indeterminate - def __init__(self, text = "", lifetime = 30, dismissable = True, progress = None, title = None, parent = None, use_inactivity_timer = True): #pylint: disable=bad-whitespace + def __init__(self, text: str = "", lifetime: int = 30, dismissable: bool = True, progress: float = None, + title: Optional[str] = None, parent = None, use_inactivity_timer: bool = True, image_source: str = "", image_caption: str = "", option_text: str = "", option_state: bool = True) -> None: super().__init__(parent) from UM.Application import Application self._application = Application.getInstance() self._visible = False self._text = text - self._progress = progress # If progress is set to -1, the progress is seen as indeterminate - self._max_progress = 100 + self._progress = progress # If progress is set to -1, the progress is seen as indeterminate + self._max_progress = 100 # type: float self._lifetime = lifetime - self._lifetime_timer = None + self._lifetime_timer = None # type: Optional[QTimer] + + self._option_text = option_text + self._option_state = option_state + self._image_source = image_source + self._image_caption = image_caption self._use_inactivity_timer = use_inactivity_timer - self._inactivity_timer = None + self._inactivity_timer = None # type: Optional[QTimer] self._dismissable = dismissable # Can the message be closed by user? if not self._dismissable: @@ -48,7 +64,7 @@ if self._lifetime == 0 and self._progress is None: self._dismissable = True - self._actions = [] + self._actions = [] # type: List[Dict[str, Union[str, int]]] self._title = title # We use these signals as QTimers need to be triggered from a qThread. By using signals to pass it, @@ -56,37 +72,43 @@ inactivityTimerStop = pyqtSignal() inactivityTimerStart = pyqtSignal() actionTriggered = Signal() + optionToggled = Signal() - def _stopInactivityTimer(self): + def _stopInactivityTimer(self) -> None: if self._inactivity_timer: self._inactivity_timer.stop() - def _startInactivityTimer(self): + def _startInactivityTimer(self) -> None: if self._inactivity_timer: # There is some progress indication, but no lifetime, so the inactivity timer needs to run. if self._progress is not None and self._lifetime == 0: self._inactivity_timer.start() - def _onInactivityTriggered(self): + def _onInactivityTriggered(self) -> None: Logger.log("d", "Hiding message because of inactivity") self.hide() ## Show the message (if not already visible) - def show(self): + def show(self) -> None: if not self._visible: self._visible = True self._application.showMessageSignal.emit(self) self.inactivityTimerStart.emit() + ## Returns a boolean indicating whether the message is currently visible. + @property + def visible(self) -> bool: + return self._visible + ## Can the message be closed by user? - def isDismissable(self): + def isDismissable(self) -> bool: return self._dismissable ## Set the lifetime timer of the message. # This is used by the QT application once the message is shown. # If the lifetime is set to 0, no timer is added. # This function is required as the QTimer needs to be created on a QThread. - def setLifetimeTimer(self, timer): + def setLifetimeTimer(self, timer: QTimer) -> None: self._lifetime_timer = timer if self._lifetime_timer: if self._lifetime: @@ -98,7 +120,7 @@ ## Set the inactivity timer of the message. # This function is required as the QTimer needs to be created on a QThread. - def setInactivityTimer(self, inactivity_timer): + def setInactivityTimer(self, inactivity_timer: QTimer) -> None: if not self._use_inactivity_timer: return self._inactivity_timer = inactivity_timer @@ -113,23 +135,36 @@ # \param action_id # \param name The displayed name of the action # \param icon Source of the icon to be used - # \param description Description of the item (used for mouse over, etc) - def addAction(self, action_id, name, icon, description, button_style = ActionButtonStyle.DEFAULT): - self._actions.append({"action_id": action_id, "name": name, "icon": icon, "description": description, "button_style": button_style}) + # \param button_style Description the button style (used for Button and Link) + # \param button_align Define horizontal position of the action item + def addAction(self, action_id: str, name: str, icon: str, description: str, button_style: int = ActionButtonStyle.DEFAULT, button_align: int = ActionButtonAlignment.ALIGN_RIGHT): + self._actions.append({"action_id": action_id, "name": name, "icon": icon, "description": description, "button_style": button_style, "button_align": button_align}) ## Get the list of actions to display buttons for on the message. # # Each action is a dictionary with the elements provided in ``addAction``. # # \return A list of actions. - def getActions(self): + def getActions(self) -> List[Dict[str, Union[str, int]]]: return self._actions + def getOptionText(self) -> str: + return self._option_text + + def getOptionState(self) -> bool: + return self._option_state + + def getImageSource(self) -> str: + return self._image_source + + def getImageCaption(self) -> str: + return self._image_caption + ## Changes the text on the message. # # \param text The new text for the message. Please ensure that this text # is internationalised. - def setText(self, text: str): + def setText(self, text: str) -> None: self._text = text ## Returns the text in the message. @@ -141,7 +176,7 @@ ## Sets the maximum numerical value of the progress bar on the message. # # If the reported progress hits this number, the bar will appear filled. - def setMaxProgress(self, max_progress): + def setMaxProgress(self, max_progress: float) -> None: self._max_progress = max_progress ## Gets the maximum value of the progress bar on the message. @@ -151,16 +186,17 @@ # \return The maximum value of the progress bar on the message. # # \see getProgress - def getMaxProgress(self): + def getMaxProgress(self) -> float: return self._max_progress ## Changes the state of the progress bar. # # \param progress The new progress to display to the user. This should be # between 0 and the value of ``getMaxProgress()``. - def setProgress(self, progress): - self._progress = progress - self.progressChanged.emit(self) + def setProgress(self, progress: float) -> None: + if self._progress != progress: + self._progress = progress + self.progressChanged.emit(self) self.inactivityTimerStart.emit() ## Signal that gets emitted whenever the state of the progress bar on this @@ -170,27 +206,28 @@ ## Returns the current progress. # # This should be a value between 0 and the value of ``getMaxProgress()``. - def getProgress(self): + # If no progress is set (because the message doesn't have it) None is returned + def getProgress(self) -> Optional[float]: return self._progress ## Changes the message title. # # \param text The new title for the message. Please ensure that this text # is internationalised. - def setTitle(self, title: str): + def setTitle(self, title: str) -> None: self._title = title ## Returns the message title. # # \return The message title. - def getTitle(self) -> str: + def getTitle(self) -> Optional[str]: return self._title ## Hides this message. # # While the message object continues to exist in memory, it appears to the # user that it is gone. - def hide(self, send_signal = True): + def hide(self, send_signal = True) -> None: if self._visible: self._visible = False self.inactivityTimerStop.emit() diff -Nru uranium-3.3.0/UM/MimeTypeDatabase.py uranium-4.4.1/UM/MimeTypeDatabase.py --- uranium-3.3.0/UM/MimeTypeDatabase.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/MimeTypeDatabase.py 2019-11-19 10:50:46.000000000 +0000 @@ -1,11 +1,9 @@ -# Copyright (c) 2017 Ultimaker B.V. +# Copyright (c) 2018 Ultimaker B.V. # Uranium is released under the terms of the LGPLv3 or higher. import os.path - from PyQt5.QtCore import QMimeDatabase, QMimeType - -from typing import List, Optional +from typing import cast, List, Optional ## Raised when a MIME type can not be found. class MimeTypeNotFoundError(Exception): @@ -20,7 +18,7 @@ # \param suffixes A list of possible suffixes for the type. # \param preferred_suffix The preferred suffix for the type. Defaults to # ``suffixes[0]`` if not specified. - def __init__(self, name: str, comment: str, suffixes: Optional[List[str]], preferred_suffix: str = None): + def __init__(self, name: str, comment: str, suffixes: Optional[List[str]], preferred_suffix: str = None) -> None: if name is None: raise ValueError("Name cannot be None") @@ -52,11 +50,15 @@ return self.__comment ## The list of file name suffixes for the MIME type. + # + # Example: ["cfg", "tar.gz"] @property def suffixes(self) -> List[str]: return self.__suffixes ## The preferred file name suffix for the MIME type. + # + # Example: "cfg" or "tar.gz". @property def preferredSuffix(self) -> str: return self.__preferred_suffix @@ -74,7 +76,10 @@ # # \return ``True`` if the two MIME types are equal, or ``False`` # otherwise. - def __eq__(self, other) -> bool: + def __eq__(self, other: object) -> bool: + if type(other) is not type(self): + return False + other = cast(MimeType, other) return self.__name == other.name ## Strip the extension from a file name when it corresponds to one of the @@ -84,10 +89,10 @@ # \return ``file_name`` without extension, or ``file_name`` when it does # not match. def stripExtension(self, file_name: str) -> str: - suffixes = sorted(self.__suffixes.copy(), key = lambda i: len(i), reverse = True) for suffix in self.__suffixes: - if file_name.endswith(suffix, file_name.find(".")): - index = file_name.rfind("." + suffix) + suffix = suffix.lower() + if file_name.lower().endswith(suffix, file_name.find(".")): + index = file_name.lower().rfind("." + suffix) return file_name[0:index] return file_name @@ -125,10 +130,10 @@ # \exception MimeTypeNotFoundError Raised when the specified MIME type # cannot be found. @classmethod - def getMimeType(cls, name) -> MimeType: - for mime in cls.__custom_mimetypes: - if mime.name == name: - return mime + def getMimeType(cls, name: str) -> MimeType: + for custom_mime in cls.__custom_mimetypes: + if custom_mime.name == name: + return custom_mime mime = cls.__system_database.mimeTypeForName(name) if mime.isValid(): @@ -146,26 +151,26 @@ # \exception MimeTypeNotFoundError Raised when no MIME type can be found # for the specified file. @classmethod - def getMimeTypeForFile(cls, file_name) -> MimeType: + def getMimeTypeForFile(cls, file_name: str) -> MimeType: # Properly normalize the file name to only be the base name of a path if we pass a path. - file_name = os.path.basename(os.path.realpath(file_name)) + file_name = os.path.basename(file_name) - matches = [] + matches = [] # type: List[MimeType] for mime_type in cls.__custom_mimetypes: # Check if the file name ends with the suffixes, starting at the first . encountered. # This means that "suffix" will not match, ".suffix" will and "suffix.something.suffix" will also match - if file_name.endswith(tuple(mime_type.suffixes), file_name.find(".")): + if file_name.lower().endswith(tuple(mime_type.suffixes), file_name.find(".")): matches.append(mime_type) if len(matches) > 1: - longest_suffix = None + longest_suffix = "" longest_mime = None for match in matches: max_suffix = max(match.suffixes) - if not longest_suffix or len(max_suffix) > len(longest_suffix): + if len(max_suffix) > len(longest_suffix): longest_suffix = max_suffix longest_mime = match - return longest_mime + return cast(MimeType, longest_mime) elif matches: return matches[0] @@ -177,10 +182,15 @@ ## Add a custom MIME type that can be detected. # - # \param mime_type \type{MimeType} The custom MIME type to add. + # \param mime_type The custom MIME type to add. @classmethod - def addMimeType(cls, mime_type) -> None: + def addMimeType(cls, mime_type: MimeType) -> None: cls.__custom_mimetypes.append(mime_type) + @classmethod + def removeMimeType(cls, mime_type: MimeType) -> None: + if mime_type in cls.__custom_mimetypes: + cls.__custom_mimetypes.remove(mime_type) + __system_database = QMimeDatabase() __custom_mimetypes = [] # type: List[MimeType] diff -Nru uranium-3.3.0/UM/Operations/AddSceneNodeOperation.py uranium-4.4.1/UM/Operations/AddSceneNodeOperation.py --- uranium-3.3.0/UM/Operations/AddSceneNodeOperation.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Operations/AddSceneNodeOperation.py 2019-11-19 10:50:46.000000000 +0000 @@ -1,4 +1,4 @@ -# Copyright (c) 2015 Ultimaker B.V. +# Copyright (c) 2018 Ultimaker B.V. # Uranium is released under the terms of the LGPLv3 or higher. from UM.Operations.Operation import Operation @@ -20,7 +20,7 @@ # # \param node The node to add to the scene. # \param parent The parent of the new node. - def __init__(self, node: SceneNode, parent: Optional[SceneNode]): + def __init__(self, node: SceneNode, parent: Optional[SceneNode]) -> None: super().__init__() self._node = node self._parent = parent @@ -29,14 +29,14 @@ ## Reverses the operation of adding a scene node. # # This removes the scene node again. - def undo(self): + def undo(self) -> None: self._node.setParent(None) self._selected = Selection.isSelected(self._node) if self._selected: Selection.remove(self._node) # Also remove the node from the selection. ## Re-applies this operation after it has been undone. - def redo(self): + def redo(self) -> None: self._node.setParent(self._parent) if self._selected: # It was selected while the operation was undone. We should restore that selection. Selection.add(self._node) diff -Nru uranium-3.3.0/UM/Operations/GroupedOperation.py uranium-4.4.1/UM/Operations/GroupedOperation.py --- uranium-3.3.0/UM/Operations/GroupedOperation.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Operations/GroupedOperation.py 2019-11-19 10:50:46.000000000 +0000 @@ -3,6 +3,7 @@ from . import Operation + ## An operation that groups several other operations together. # # The intent of this operation is to hide an underlying chain of operations @@ -16,7 +17,10 @@ def __init__(self): super().__init__() self._children = [] - self._finalised = False #Indicates if this operation is ever used. After that, it may no longer be modified. + self._finalised = False # Indicates if this operation is ever used. After that, it may no longer be modified. + + def getNumChildrenOperations(self) -> int: + return len(self._children) ## Adds an operation to this group. # @@ -59,7 +63,7 @@ def mergeWith(self, other): if type(other) is not GroupedOperation: return False - if len(other._children) != len(self._children): #Must be operations on the same number of children. + if len(other._children) != len(self._children): # Must be operations on the same number of children. return False op = GroupedOperation() @@ -71,7 +75,7 @@ return op def __repr__(self): - output = "GroupedOperation(children = {0})\n".format(len(self._children)) + output = "GroupedOp.(#={0})\n".format(len(self._children)) for child in self._children: - output += " {0!r}\n".format(child) + output += "{0!r}\n".format(child) return output diff -Nru uranium-3.3.0/UM/Operations/LayFlatOperation.py uranium-4.4.1/UM/Operations/LayFlatOperation.py --- uranium-3.3.0/UM/Operations/LayFlatOperation.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Operations/LayFlatOperation.py 2019-11-19 10:50:46.000000000 +0000 @@ -118,11 +118,10 @@ # Rate-limited progress notification # This is done to prevent the UI from being flooded with progress signals. self._progress += progress - new_time = time.monotonic() if not self._progress_emit_time or new_time - self._progress_emit_time > 0.5: #Must be longer than half a second ago. - self.progress.emit(self._progress) self._progress_emit_time = new_time + self.progress.emit(self._progress) self._progress = 0 ## Undoes this lay flat operation. @@ -162,4 +161,4 @@ ## Makes a programmer-readable representation of this operation. def __repr__(self): - return "LayFlatOperation(node = {0})".format(self._node) + return "LayFlatOp.(node={0})".format(self._node) diff -Nru uranium-3.3.0/UM/Operations/MirrorOperation.py uranium-4.4.1/UM/Operations/MirrorOperation.py --- uranium-3.3.0/UM/Operations/MirrorOperation.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Operations/MirrorOperation.py 2019-11-19 10:50:46.000000000 +0000 @@ -28,6 +28,7 @@ ## Undo the operation. def undo(self): + self._node.invertNormals() self._node.setTransformation(self._old_transformation) #We stored the old transformation, so we can just restore that. ## Re-apply the operation after undoing it. @@ -36,6 +37,7 @@ center = self._node.getPosition() self._node.setPosition(-center) self._node.scale(self._mirror, SceneNode.TransformSpace.World) #Then mirror around the origin. + self._node.invertNormals() # Because the mirror is done via a scale operation, the normals where inverted. if self._mirror_around_center: #If we moved the centre, move it back. self._node.setPosition(center) @@ -63,4 +65,4 @@ # # \return A programmer-readable representation of this operation. def __repr__(self): - return "MirrorOperation(node = {0}, mirror={1})".format(self._node, self._mirror) \ No newline at end of file + return "MirrorOp.(node={0},mirror={1})".format(self._node, self._mirror) diff -Nru uranium-3.3.0/UM/Operations/OperationStack.py uranium-4.4.1/UM/Operations/OperationStack.py --- uranium-3.3.0/UM/Operations/OperationStack.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Operations/OperationStack.py 2019-11-19 10:50:46.000000000 +0000 @@ -1,10 +1,11 @@ -# Copyright (c) 2015 Ultimaker B.V. +# Copyright (c) 2019 Ultimaker B.V. # Uranium is released under the terms of the LGPLv3 or higher. -import UM.Application -from UM.Signal import Signal, signalemitter - import threading +import time + +from UM.Logger import Logger +from UM.Signal import Signal, signalemitter ## A stack of operations. # @@ -41,6 +42,7 @@ # # \param operation \type{Operation} The operation to push onto the stack. def push(self, operation): + start_time = time.time() if not self._lock.acquire(False): return @@ -57,6 +59,9 @@ self.changed.emit() finally: self._lock.release() + elapsed_time = time.time() - start_time + + Logger.log("d", " ".join(repr(operation).splitlines()) + ", took {0}ms".format(int(elapsed_time * 1000))) #Don't remove; used in regression-tests. ## Undo the current operation. # diff -Nru uranium-3.3.0/UM/Operations/RemoveSceneNodeOperation.py uranium-4.4.1/UM/Operations/RemoveSceneNodeOperation.py --- uranium-3.3.0/UM/Operations/RemoveSceneNodeOperation.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Operations/RemoveSceneNodeOperation.py 2019-11-19 10:50:46.000000000 +0000 @@ -1,6 +1,6 @@ # Copyright (c) 2015 Ultimaker B.V. # Uranium is released under the terms of the LGPLv3 or higher. - +from UM.Scene.SceneNode import SceneNode from . import Operation from UM.Scene.Selection import Selection @@ -12,17 +12,17 @@ ## Initialises the RemoveSceneNodeOperation. # # \param node The node to remove. - def __init__(self, node): + def __init__(self, node: SceneNode) -> None: super().__init__() self._node = node self._parent = node.getParent() ## Undoes the operation, putting the node back in the scene. - def undo(self): + def undo(self) -> None: self._node.setParent(self._parent) # Hanging it back under its original parent puts it back in the scene. ## Redo the operation, removing the node again. - def redo(self): + def redo(self) -> None: old_parent = self._parent self._node.setParent(None) @@ -31,10 +31,10 @@ # Hack to ensure that the _onchanged is triggered correctly. # We can't do it the right way as most remove changes don't need to trigger - # a reslice (eg; removing hull nodes don't need to trigger reslice). + # a reslice (eg; removing hull nodes don't need to trigger a reslice). try: - Application.getInstance().getBackend().needsSlicing() - except: + Application.getInstance().getBackend().needsSlicing() # type: ignore + except AttributeError: # Todo: This should be removed, Uranium doesn't care or know about slicing! pass if Selection.isSelected(self._node): # Also remove the selection. Selection.remove(self._node) diff -Nru uranium-3.3.0/UM/Operations/RotateOperation.py uranium-4.4.1/UM/Operations/RotateOperation.py --- uranium-3.3.0/UM/Operations/RotateOperation.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Operations/RotateOperation.py 2019-11-19 10:50:46.000000000 +0000 @@ -11,7 +11,7 @@ ## Initialises the operation. # # \param node The node to rotate. - # \param rotation A transformation matrix that rotates a space. This + # \param rotation A transformation quaternion that rotates a space. This # rotation is applied on the node. # \param kwargs Key-word arguments, including: # - rotate_around_point: A point around which to rotate the node. @@ -56,4 +56,4 @@ # # \return A programmer-readable representation of this operation. def __repr__(self): - return "RotateOperation(node = {0}, rotation={1})".format(self._node, self._rotation) + return "RotateOp.(node={0},rot.={1})".format(self._node, self._rotation) diff -Nru uranium-3.3.0/UM/Operations/ScaleOperation.py uranium-4.4.1/UM/Operations/ScaleOperation.py --- uranium-3.3.0/UM/Operations/ScaleOperation.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Operations/ScaleOperation.py 2019-11-19 10:50:46.000000000 +0000 @@ -142,5 +142,5 @@ # \return A programmer-readable representation of this operation. def __repr__(self): mode = "set" if self._set_scale else "add" if self._add_scale else "relative" - return "ScaleOperation(node = {0}, scale={1}, mode={2})".format(self._node, self._scale, mode) + return "ScaleOp.(node={0},scale={1},mode={2})".format(self._node, self._scale, mode) diff -Nru uranium-3.3.0/UM/Operations/ScaleToBoundsOperation.py uranium-4.4.1/UM/Operations/ScaleToBoundsOperation.py --- uranium-3.3.0/UM/Operations/ScaleToBoundsOperation.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Operations/ScaleToBoundsOperation.py 1970-01-01 00:00:00.000000000 +0000 @@ -1,33 +0,0 @@ -# Copyright (c) 2015 Ultimaker B.V. -# Uranium is released under the terms of the LGPLv3 or higher. - -from UM.Operations.Operation import Operation -from UM.Math.Vector import Vector - - -## Operation subclass that will scale a node to fit within the bounds provided. -class ScaleToBoundsOperation(Operation): - ## Creates a new operation that scales a nodes to the bounds. - # - # \param node The node to scale to the bounds. - # \param bounds The bounding box to scale the node to. - def __init__(self, node, bounds): - super().__init__() - - self._node = node - self._old_scale = node.getScale() # Store the old scale so that we can restore it. - - bbox = self._node.getBoundingBox() - - scale_factor = min(bounds.width / bbox.width, bounds.height /bbox.height, bounds.depth / bbox.depth) - - # Apply scale factor on all different sizes to respect the (non-uniform) scaling that already has been done by the user. - self._new_scale = Vector(self._old_scale.x * scale_factor, self._old_scale.y * scale_factor, self._old_scale.z * scale_factor) - - ## Undoes the scale to bounds, restoring the old scale. - def undo(self): - self._node.setScale(self._old_scale) - - ## Re-applies the scale to bounds after it has been undone. - def redo(self): - self._node.setScale(self._new_scale) \ No newline at end of file diff -Nru uranium-3.3.0/UM/Operations/SetTransformOperation.py uranium-4.4.1/UM/Operations/SetTransformOperation.py --- uranium-3.3.0/UM/Operations/SetTransformOperation.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Operations/SetTransformOperation.py 2019-11-19 10:50:46.000000000 +0000 @@ -48,15 +48,7 @@ else: self._new_shear = node.getShear() - if mirror: - self._new_mirror = mirror - else: - # Scale will either be negative or positive. If it's negative, we need to use the inverse mirror. - if self._node.getScale().x < 0: - self._new_mirror = Vector(-node.getMirror().x, -node.getMirror().y, -node.getMirror().z) - else: - self._new_mirror = node.getMirror() - + self._new_mirror = Vector(1, 1, 1) self._new_transformation = Matrix() euler_orientation = self._new_orientation.toMatrix().getEuler() @@ -96,4 +88,4 @@ # # A programmer-readable representation of this operation. def __repr__(self): - return "SetTransformOperation(node = {0})".format(self._node) + return "SetTransformOp.(node={0})".format(self._node) diff -Nru uranium-3.3.0/UM/Operations/TranslateOperation.py uranium-4.4.1/UM/Operations/TranslateOperation.py --- uranium-3.3.0/UM/Operations/TranslateOperation.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Operations/TranslateOperation.py 2019-11-19 10:50:46.000000000 +0000 @@ -57,4 +57,4 @@ # # \return A programmer-readable representation of this operation. def __repr__(self): - return "TranslateOperation(node = {0}, translation={1})".format(self._node, self._translation) + return "TranslateOp.(node={0},trans.={1})".format(self._node, self._translation) diff -Nru uranium-3.3.0/UM/OutputDevice/OutputDeviceManager.py uranium-4.4.1/UM/OutputDevice/OutputDeviceManager.py --- uranium-3.3.0/UM/OutputDevice/OutputDeviceManager.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/OutputDevice/OutputDeviceManager.py 2019-11-19 10:50:46.000000000 +0000 @@ -1,10 +1,23 @@ -# Copyright (c) 2015 Ultimaker B.V. +# Copyright (c) 2019 Ultimaker B.V. # Uranium is released under the terms of the LGPLv3 or higher. +from enum import Enum +from typing import Dict, Optional, TYPE_CHECKING from UM.Signal import Signal, signalemitter from UM.Logger import Logger from UM.PluginRegistry import PluginRegistry +if TYPE_CHECKING: + from UM.OutputDevice.OutputDevice import OutputDevice + from UM.OutputDevice.OutputDevicePlugin import OutputDevicePlugin + +# Used internally to determine plugins capable of 'manual' addition of devices, see also [add|remove]ManualDevice below. +class ManualDeviceAdditionAttempt(Enum): + NO = 0, # The plugin can't add a device 'manually' (or at least not with the given parameters). + POSSIBLE = 1, # The plugin will try to add the (specified) device 'manually', unless another plugin has priority. + PRIORITY = 2 # The plugin has determined by the specified parameters that it's responsible for adding this device + # and thus has priority. If this fails, the plugins that replied 'POSSIBLE' will be tried. + # NOTE: This last value should be used with great care! ## Manages all available output devices and the plugin objects used to create them. # @@ -39,38 +52,50 @@ # device. # @signalemitter -class OutputDeviceManager(): - def __init__(self): +class OutputDeviceManager: + def __init__(self) -> None: super().__init__() - self._output_devices = {} - self._plugins = {} - self._active_device = None + self._output_devices = {} # type: Dict[str, OutputDevice] + self._plugins = {} # type: Dict[str, OutputDevicePlugin] + self._active_device = None # type: Optional[OutputDevice] self._active_device_override = False self._write_in_progress = False PluginRegistry.addType("output_device", self.addOutputDevicePlugin) + self._is_running = False + ## Emitted whenever a registered device emits writeStarted. # # \sa OutputDevice::writeStarted writeStarted = Signal() + ## Emitted whenever a registered device emits writeProgress. # # \sa OutputDevice::writeProgress writeProgress = Signal() + ## Emitted whenever a registered device emits writeFinished. # # \sa OutputDevice::writeFinished writeFinished = Signal() + ## Emitted whenever a registered device emits writeError. # # \sa OutputDevice::writeError writeError = Signal() + ## Emitted whenever a registered device emits writeSuccess. # # \sa OutputDevice::writeSuccess writeSuccess = Signal() + ## Emitted whenever a device has been added manually. + manualDeviceAdded = Signal() + + ## Emitted whenever a device has been removed manually. + manualDeviceRemoved = Signal() + ## Get a list of all registered output devices. # # \return \type{list} A list of all registered output devices. @@ -87,18 +112,46 @@ # # \param device_id The ID of the device to retrieve. # \return \type{OutputDevice} The output device corresponding to the ID or None if not found. - def getOutputDevice(self, device_id): + def getOutputDevice(self, device_id: str) -> Optional["OutputDevice"]: return self._output_devices.get(device_id, None) ## Emitted whenever an output device is added or removed. outputDevicesChanged = Signal() + def start(self): + for plugin_id, plugin in self._plugins.items(): + try: + plugin.start() + except Exception: + Logger.logException("e", "Exception starting OutputDevicePlugin %s", plugin.getPluginId()) + + def stop(self): + for plugin_id, plugin in self._plugins.items(): + try: + plugin.stop() + except Exception: + Logger.logException("e", "Exception starting OutputDevicePlugin %s", plugin.getPluginId()) + + def startDiscovery(self) -> None: + for plugin_id, plugin in self._plugins.items(): + try: + plugin.startDiscovery() + except Exception: + Logger.logException("e", "Exception startDiscovery OutputDevicePlugin %s", plugin.getPluginId()) + + def refreshConnections(self) -> None: + for plugin_id, plugin in self._plugins.items(): + try: + plugin.refreshConnections() + except Exception: + Logger.logException("e", "Exception refreshConnections OutputDevicePlugin %s", plugin.getPluginId()) + ## Add and register an output device. # # \param \type{OutputDevice} The output device to add. # # \note Does nothing if a device with the same ID as the passed device was already added. - def addOutputDevice(self, device): + def addOutputDevice(self, device: "OutputDevice") -> None: if device.getId() in self._output_devices: Logger.log("i", "Output Device %s already added", device.getId()) return @@ -121,7 +174,7 @@ # # \note This does nothing if the device_id does not correspond to a registered device. # \return Whether the device was successfully removed or not. - def removeOutputDevice(self, device_id) -> bool: + def removeOutputDevice(self, device_id: str) -> bool: if device_id not in self._output_devices: Logger.log("w", "Could not find output device with id %s to remove", device_id) return False @@ -135,7 +188,7 @@ device.writeSuccess.disconnect(self.writeSuccess) self.outputDevicesChanged.emit() - if self._active_device.getId() == device_id: + if self._active_device is not None and self._active_device.getId() == device_id: self._write_in_progress = False self.resetActiveDevice() return True @@ -153,7 +206,7 @@ # # \note This does nothing if the device_id does not correspond to a registered device. # \note This will override the default active device selection behaviour. - def setActiveDevice(self, device_id): + def setActiveDevice(self, device_id: str) -> None: if device_id not in self._output_devices: return @@ -164,7 +217,7 @@ self.activeDeviceChanged.emit() ## Reset the active device to the default device. - def resetActiveDevice(self): + def resetActiveDevice(self) -> None: self._active_device = self._findHighestPriorityDevice() self._active_device_override = False self._write_in_progress = False @@ -175,23 +228,24 @@ # \param \type{OutputDevicePlugin} The plugin to add. # # \note This does nothing if the plugin was already added. - def addOutputDevicePlugin(self, plugin): + def addOutputDevicePlugin(self, plugin: "OutputDevicePlugin") -> None: if plugin.getPluginId() in self._plugins: Logger.log("i", "Output Device Plugin %s was already added.", plugin.getPluginId()) return self._plugins[plugin.getPluginId()] = plugin - try: - plugin.start() - except Exception as e: - Logger.log("e", "Exception starting plugin %s: %s", plugin.getPluginId(), repr(e)) + if self._is_running: + try: + plugin.start() + except Exception: + Logger.logException("e", "Exception starting OutputDevicePlugin %s", plugin.getPluginId()) ## Remove an OutputDevicePlugin by ID. # # \param plugin_id The ID of the plugin to remove. # # \note This does nothing if the specified plugin_id was not found. - def removeOutputDevicePlugin(self, plugin_id): + def removeOutputDevicePlugin(self, plugin_id: str) -> None: Logger.log("d", "Remove output device plugin %s", plugin_id) if plugin_id not in self._plugins: return @@ -203,17 +257,20 @@ del self._plugins[plugin_id] + def getAllOutputDevicePlugins(self) -> Dict[str, "OutputDevicePlugin"]: + return self._plugins + ## Get an OutputDevicePlugin by plugin ID # # \param plugin_id The ID of the plugin to retrieve # # \return The plugin corresponding to the specified ID or None if it was not found. - def getOutputDevicePlugin(self, plugin_id): + def getOutputDevicePlugin(self, plugin_id: str) -> Optional["OutputDevicePlugin"]: return self._plugins.get(plugin_id, None) ## private: - def _findHighestPriorityDevice(self): + def _findHighestPriorityDevice(self) -> Optional["OutputDevice"]: device = None for key, value in self._output_devices.items(): if not device or value.getPriority() > device.getPriority(): diff -Nru uranium-3.3.0/UM/OutputDevice/OutputDevicePlugin.py uranium-4.4.1/UM/OutputDevice/OutputDevicePlugin.py --- uranium-3.3.0/UM/OutputDevice/OutputDevicePlugin.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/OutputDevice/OutputDevicePlugin.py 2019-11-19 10:50:46.000000000 +0000 @@ -1,6 +1,9 @@ -# Copyright (c) 2015 Ultimaker B.V. +# Copyright (c) 2019 Ultimaker B.V. # Uranium is released under the terms of the LGPLv3 or higher. +from typing import Optional, Callable + +from UM.OutputDevice.OutputDeviceManager import ManualDeviceAdditionAttempt from UM.PluginObject import PluginObject from UM.Application import Application @@ -18,6 +21,7 @@ # # \sa OutputDeviceManager class OutputDevicePlugin(PluginObject): + def __init__(self): super().__init__() @@ -34,3 +38,28 @@ ## Called by OutputDeviceManager to indicate the plugin should stop its device detection. def stop(self): raise NotImplementedError("Stop should be implemented by subclasses") + + ## Used to check if this adress makes sense to this plugin w.r.t. adding(/removing) a manual device. + # /return 'No', 'possible', or 'priority' (in the last case this plugin takes precedence, use with care). + def canAddManualDevice(self, address: str = "") -> ManualDeviceAdditionAttempt: + return ManualDeviceAdditionAttempt.NO + + ## Add a manual device by the specified address (for example, an IP). + # The optional callback is a function with signature func(success: bool, address: str) -> None, where + # - success is a bool that indicates if the manual device's information was successfully retrieved. + # - address is the address of the manual device. + def addManualDevice(self, address: str, callback: Optional[Callable[[bool, str], None]] = None) -> None: + pass + + ## Remove a manual device by either the name and/or the specified address. + # Since this may be asynchronous, use the 'removeDeviceSignal' when the machine actually has been added. + def removeManualDevice(self, key: str, address: Optional[str] = None) -> None: + pass + + ## Starts to discovery network devices that can be handled by this plugin. + def startDiscovery(self) -> None: + pass + + ## Refresh the available/discovered printers for an output device that handles network printers. + def refreshConnections(self) -> None: + pass diff -Nru uranium-3.3.0/UM/OutputDevice/OutputDevice.py uranium-4.4.1/UM/OutputDevice/OutputDevice.py --- uranium-3.3.0/UM/OutputDevice/OutputDevice.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/OutputDevice/OutputDevice.py 2019-11-19 10:50:46.000000000 +0000 @@ -1,6 +1,10 @@ -# Copyright (c) 2015 Ultimaker B.V. +# Copyright (c) 2018 Ultimaker B.V. # Uranium is released under the terms of the LGPLv3 or higher. +from typing import List, Optional + +from UM.FileHandler.FileHandler import FileHandler #For typing. +from UM.Scene.SceneNode import SceneNode #For typing. from UM.Signal import Signal, signalemitter @@ -21,7 +25,7 @@ # login credentials. @signalemitter class OutputDevice(): - def __init__(self, device_id, **kwargs): + def __init__(self, device_id: str, **kwargs: str) -> None: super().__init__() self._id = device_id @@ -34,17 +38,17 @@ metaDataChanged = Signal() ## Get the device id - def getId(self): + def getId(self) -> str: return self._id ## Get a human-readable name for this device. - def getName(self): + def getName(self) -> str: return self._name ## Set the human-readable name of this device. # # \param name The new name of this device. - def setName(self, name): + def setName(self, name: str) -> None: if name != self._name: self._name = name self.metaDataChanged.emit(self) @@ -54,13 +58,13 @@ # The short description can be used as a button label or similar # and should thus be only a few words at most. For example, # "Save to File", "Print with USB". - def getShortDescription(self): + def getShortDescription(self) -> str: return self._short_description ## Set the short description for this device. # # \param description The new short description to set. - def setShortDescription(self, description): + def setShortDescription(self, description: str) -> None: if description != self._short_description: self._short_description = description self.metaDataChanged.emit(self) @@ -70,13 +74,13 @@ # The full description describes what would happen when writing # to this device. For example, "Save to Removable Drive /media/sdcard", # "Upload to YouMagine with account User". - def getDescription(self): + def getDescription(self) -> str: return self._description ## Set the full description for this device. # # \param description The description of this device. - def setDescription(self, description): + def setDescription(self, description: str) -> None: if description != self._description: self._description = description self.metaDataChanged.emit(self) @@ -84,13 +88,13 @@ ## Get the name of an icon that can be used to identify this device. # # This icon should be available in the theme. - def getIconName(self): + def getIconName(self) -> str: return self._icon_name ## Set the name of an icon to identify this device. # # \param name The name of the icon to use. - def setIconName(self, name): + def setIconName(self, name: str) -> None: if name != self._icon_name: self._icon_name = name self.metaDataChanged.emit(self) @@ -101,13 +105,13 @@ # default device to write to. It should be a number and higher numbers # indicate that the device should be preferred over devices with # lower numbers. - def getPriority(self): + def getPriority(self) -> int: return self._priority ## Set the priority of this device. # - # \param priority \type{int} The priority to use. - def setPriority(self, priority): + # \param priority The priority to use. + def setPriority(self, priority: int) -> None: if priority != self._priority: self._priority = priority self.metaDataChanged.emit(self) @@ -121,13 +125,14 @@ # # \param nodes A collection of scene nodes that should be written to the # device. - # \param file_name \type{string} A suggestion for the file name to write + # \param file_name A suggestion for the file name to write # to. Can be freely ignored if providing a file name makes no sense. # \param limit_mimetype Limit output to these mime types. # \param file_handler The filehandler to use to write the file with. # \param kwargs Keyword arguments. # \exception OutputDeviceError.WriteRequestFailedError - def requestWrite(self, nodes, file_name = None, limit_mimetypes = False, file_handler = None, **kwargs): + def requestWrite(self, nodes: List[SceneNode], file_name: Optional[str] = None, limit_mimetypes: bool = False, + file_handler: Optional[FileHandler] = None, filter_by_machine: bool = False, **kwargs: str) -> None: raise NotImplementedError("requestWrite needs to be implemented") writeStarted = Signal() diff -Nru uranium-3.3.0/UM/PackageManager.py uranium-4.4.1/UM/PackageManager.py --- uranium-3.3.0/UM/PackageManager.py 1970-01-01 00:00:00.000000000 +0000 +++ uranium-4.4.1/UM/PackageManager.py 2019-11-19 10:50:46.000000000 +0000 @@ -0,0 +1,602 @@ +# Copyright (c) 2018 Ultimaker B.V. +# Uranium is released under the terms of the LGPLv3 or higher. +from json import JSONDecodeError +from typing import Any, Dict, List, Optional, Set, Tuple, cast, TYPE_CHECKING +import json +import os +import shutil +import zipfile +import tempfile +import urllib.parse # For interpreting escape characters using unquote_plus. + +from PyQt5.QtCore import pyqtSlot, QObject, pyqtSignal, QUrl, pyqtProperty + +from UM import i18nCatalog +from UM.Logger import Logger +from UM.Message import Message +from UM.MimeTypeDatabase import MimeTypeDatabase # To get the type of container we're loading. +from UM.Resources import Resources +from UM.Version import Version as UMVersion + +catalog = i18nCatalog("uranium") + +if TYPE_CHECKING: + from UM.Qt.QtApplication import QtApplication + + +class PackageManager(QObject): + Version = 1 + + def __init__(self, application: "QtApplication", parent: Optional[QObject] = None) -> None: + super().__init__(parent) + + self._application = application + self._container_registry = self._application.getContainerRegistry() + self._plugin_registry = self._application.getPluginRegistry() + + # JSON files that keep track of all installed packages. + self._user_package_management_file_path = None # type: Optional[str] + self._bundled_package_management_file_paths = [] # type: List[str] + for search_path in Resources.getAllPathsForType(Resources.BundledPackages): + if not os.path.isdir(search_path): + continue + + # Load all JSON files that are located in the bundled_packages directory. + for file_name in os.listdir(search_path): + if not file_name.endswith(".json"): + continue + file_path = os.path.join(search_path, file_name) + if not os.path.isfile(file_path): + continue + self._bundled_package_management_file_paths.append(file_path) + Logger.log("i", "Found bundled packages JSON file: {location}".format(location = file_path)) + + for search_path in (Resources.getDataStoragePath(), Resources.getConfigStoragePath()): + candidate_user_path = os.path.join(search_path, "packages.json") + if os.path.exists(candidate_user_path): + self._user_package_management_file_path = candidate_user_path + if self._user_package_management_file_path is None: # Doesn't exist yet. + self._user_package_management_file_path = os.path.join(Resources.getDataStoragePath(), "packages.json") + + self._installation_dirs_dict = {"plugins": os.path.abspath(Resources.getStoragePath(Resources.Plugins))} # type: Dict[str, str] + + self._bundled_package_dict = {} # type: Dict[str, Dict[str, Any]] # A dict of all bundled packages + self._installed_package_dict = {} # type: Dict[str, Dict[str, Any]] # A dict of all installed packages + self._to_remove_package_set = set() # type: Set[str] # A set of packages that need to be removed at the next start + self._to_install_package_dict = {} # type: Dict[str, Dict[str, Any]] # A dict of packages that need to be installed at the next start + + # There can be plugins that provide remote packages (and thus, newer / different versions for a package). + self._available_package_versions = {} # type: Dict[str, Set[UMVersion]] + + self._packages_with_update_available = set() # type: Set[str] + + installedPackagesChanged = pyqtSignal() # Emitted whenever the installed packages collection have been changed. + packagesWithUpdateChanged = pyqtSignal() + + def initialize(self) -> None: + self._loadManagementData() + self._removeAllScheduledPackages() + self._installAllScheduledPackages() + + # Notify the Package manager that there is an alternative version for a given package. + def addAvailablePackageVersion(self, package_id: str, version: "UMVersion") -> None: + if package_id not in self._available_package_versions: + self._available_package_versions[package_id] = set() + self._available_package_versions[package_id].add(version) + + if self.checkIfPackageCanUpdate(package_id): + self._packages_with_update_available.add(package_id) + self.packagesWithUpdateChanged.emit() + + @pyqtProperty("QStringList", notify = packagesWithUpdateChanged) + def packagesWithUpdate(self) -> Set[str]: + return self._packages_with_update_available + + ## Alternative way of setting the available package updates without having to check all packages in the cloud. + def setPackagesWithUpdate(self, packages: Set[str]): + self._packages_with_update_available = packages + self.packagesWithUpdateChanged.emit() + + def checkIfPackageCanUpdate(self, package_id: str) -> bool: + available_versions = self._available_package_versions.get(package_id) + + if available_versions is None: + return False + + current_version = None + + bundled_package_dict = self._bundled_package_dict.get(package_id) + if bundled_package_dict is not None: + current_version = UMVersion(bundled_package_dict["package_info"]["package_version"]) + + installed_package_dict = self._installed_package_dict.get(package_id) + if installed_package_dict is not None: + current_version = UMVersion(installed_package_dict["package_info"]["package_version"]) + + # One way to check if the package has been updated in looking at the to_install information in the packages.json + to_install_package_dict = self._to_install_package_dict.get(package_id) + if to_install_package_dict is not None: # If it's marked as to_install, that means package will be installed upon restarting + return False + + if current_version is not None: + for available_version in available_versions: + if current_version < available_version: + # Stop looking, there is at least one version that is higher. + return True + return False + + # (for initialize) Loads the package management file if exists + def _loadManagementData(self) -> None: + # The bundled package management file should always be there + if len(self._bundled_package_management_file_paths) == 0: + Logger.log("w", "Bundled package management files could not be found!") + return + # Load the bundled packages: + self._bundled_package_dict = {} + for search_path in self._bundled_package_management_file_paths: + with open(search_path, "r", encoding = "utf-8") as f: + self._bundled_package_dict.update(json.load(f, encoding = "utf-8")) + Logger.log("i", "Loaded bundled packages data from %s", search_path) + + # Need to use the file lock here to prevent concurrent I/O from other processes/threads + container_registry = self._application.getContainerRegistry() + with container_registry.lockFile(): + try: + # Load the user packages: + with open(cast(str, self._user_package_management_file_path), "r", encoding="utf-8") as f: + try: + management_dict = json.load(f, encoding="utf-8") + except JSONDecodeError: + # The file got corrupted, ignore it. This happens extremely infrequently. + # The file will get overridden once a user downloads something. + return + self._installed_package_dict = management_dict.get("installed", {}) + self._to_remove_package_set = set(management_dict.get("to_remove", [])) + self._to_install_package_dict = management_dict.get("to_install", {}) + Logger.log("i", "Loaded user packages management file from %s", self._user_package_management_file_path) + except FileNotFoundError: + Logger.log("i", "User package management file %s doesn't exist, do nothing", self._user_package_management_file_path) + return + + # For packages that become bundled in the new releases, but a lower version was installed previously, we need + # to remove the old lower version that's installed in the user's folder. + for package_id, installed_package_dict in self._installed_package_dict.items(): + bundled_package_dict = self._bundled_package_dict.get(package_id) + if bundled_package_dict is None: + continue + + result = self._comparePackageVersions(installed_package_dict["package_info"], + bundled_package_dict["package_info"]) + # The bundled package is newer + if result <= 0: + self._to_remove_package_set.add(package_id) + continue + + # Also check the to-install packages to avoid installing packages that have a lower version than the bundled + # ones. + to_remove_package_ids = set() + for package_id, to_install_package_dict in self._to_install_package_dict.items(): + bundled_package_dict = self._bundled_package_dict.get(package_id) + if bundled_package_dict is None: + continue + + result = self._comparePackageVersions(to_install_package_dict["package_info"], + bundled_package_dict["package_info"]) + # The bundled package is newer + if result <= 0: + to_remove_package_ids.add(package_id) + continue + for package_id in to_remove_package_ids: + del self._to_install_package_dict[package_id] + + # Compares the SDK versions and the package versions of the two given package info dicts. + # Returns -1, 0, 1 indicating if the versions in dict1 is lower than, equal to, or higher than dict2. + # - The package with the higher SDK version is considered having the higher version number. If they are the same, + # - if the bundled package version is greater than or equal to the given package, -1 is returned. Otherwise, 1. + def _comparePackageVersions(self, info_dict1: Dict[str, Any], info_dict2: Dict[str, Any]) -> int: + # If the bundled version has a higher SDK version, use the bundled version by removing the installed one. + sdk_version1 = UMVersion(info_dict1["sdk_version"]) + sdk_version2 = UMVersion(info_dict2["sdk_version"]) + if sdk_version1 < sdk_version2: + return -1 + + # Remove the package with the old version to favour the newer bundled version. + version1 = UMVersion(info_dict1["package_version"]) + version2 = UMVersion(info_dict2["package_version"]) + if version1 < version2: + return -1 + + if version1 == version2: + return 0 + + return 1 + + def _saveManagementData(self) -> None: + # Need to use the file lock here to prevent concurrent I/O from other processes/threads + container_registry = self._application.getContainerRegistry() + with container_registry.lockFile(): + with open(cast(str,self._user_package_management_file_path), "w", encoding = "utf-8") as f: + data_dict = {"version": PackageManager.Version, + "installed": self._installed_package_dict, + "to_remove": list(self._to_remove_package_set), + "to_install": self._to_install_package_dict} + json.dump(data_dict, f, sort_keys = True, indent = 4) + Logger.log("i", "Package management file %s was saved", self._user_package_management_file_path) + + # (for initialize) Removes all packages that have been scheduled to be removed. + def _removeAllScheduledPackages(self) -> None: + remove_failures = set() + for package_id in self._to_remove_package_set: + try: + self._purgePackage(package_id) + del self._installed_package_dict[package_id] + except: + remove_failures.add(package_id) + + if remove_failures: + message = Message(catalog.i18nc("@error:uninstall", + "There were some errors uninstalling the following packages:\n{packages}".format( + packages = "- " + "\n- ".join(remove_failures))), + title = catalog.i18nc("@info:title", "Uninstalling errors")) + message.show() + + self._to_remove_package_set = remove_failures + self._saveManagementData() + + # (for initialize) Installs all packages that have been scheduled to be installed. + def _installAllScheduledPackages(self) -> None: + while self._to_install_package_dict: + package_id, package_info = list(self._to_install_package_dict.items())[0] + self._installPackage(package_info) + del self._to_install_package_dict[package_id] + self._saveManagementData() + + def getBundledPackageInfo(self, package_id: str) -> Optional[Dict[str, Any]]: + package_info = None + if package_id in self._bundled_package_dict: + package_info = self._bundled_package_dict[package_id]["package_info"] + return package_info + + # Checks the given package is installed. If so, return a dictionary that contains the package's information. + def getInstalledPackageInfo(self, package_id: str) -> Optional[Dict[str, Any]]: + if package_id in self._to_remove_package_set: + return None + + package_info = None + if package_id in self._to_install_package_dict: + package_info = self._to_install_package_dict[package_id]["package_info"] + package_info["is_installed"] = False + elif package_id in self._installed_package_dict: + package_info = self._installed_package_dict[package_id]["package_info"] + package_info["is_installed"] = True + elif package_id in self._bundled_package_dict: + package_info = self._bundled_package_dict[package_id]["package_info"] + package_info["is_installed"] = True + + if package_info: + # We also need to get information from the plugin registry such as if a plugin is active + package_info["is_active"] = self._plugin_registry.isActivePlugin(package_id) + # If the package ID is in bundled, label it as such + package_info["is_bundled"] = package_info["package_id"] in self._bundled_package_dict.keys() and not self.isUserInstalledPackage(package_info["package_id"]) + + return package_info + + def getAllInstalledPackageIDs(self) -> Set[str]: + # Add bundled, installed, and to-install packages to the set of installed package IDs + all_installed_ids = set() # type: Set[str] + + if self._bundled_package_dict.keys(): + all_installed_ids = all_installed_ids.union(set(self._bundled_package_dict.keys())) + if self._installed_package_dict.keys(): + all_installed_ids = all_installed_ids.union(set(self._installed_package_dict.keys())) + all_installed_ids = all_installed_ids.difference(self._to_remove_package_set) + # If it's going to be installed and to be removed, then the package is being updated and it should be listed. + if self._to_install_package_dict.keys(): + all_installed_ids = all_installed_ids.union(set(self._to_install_package_dict.keys())) + + return all_installed_ids + + ## Get a list of tuples that contain the package ID and version. + # Used by the Marketplace to check which packages have updates available. + def getAllInstalledPackageIdsAndVersions(self) -> List[Tuple[str, str]]: + package_ids_and_versions = [] # type: List[Tuple[str, str]] + all_installed_ids = self.getAllInstalledPackageIDs() + for package_id in all_installed_ids: + package_info = self.getInstalledPackageInfo(package_id) + if package_info is None: + continue + if "package_version" not in package_info: + continue + package_ids_and_versions.append((package_id, package_info["package_version"])) + return package_ids_and_versions + + def getAllInstalledPackagesInfo(self) -> Dict[str, List[Dict[str, Any]]]: + + all_installed_ids = self.getAllInstalledPackageIDs() + + # map of -> -> + installed_packages_dict = {} # type: Dict[str, List[Dict[str, Any]]] + for package_id in all_installed_ids: + # Skip required plugins as they should not be tampered with + if package_id in self._application.getRequiredPlugins(): + continue + + package_info = self.getInstalledPackageInfo(package_id) + + if package_info is None: + continue + + # If there is not a section in the dict for this type, add it + if package_info["package_type"] not in installed_packages_dict: + installed_packages_dict[package_info["package_type"]] = [] + + # Finally, add the data + installed_packages_dict[package_info["package_type"]].append(package_info) + + return installed_packages_dict + + def getToRemovePackageIDs(self) -> Set[str]: + return self._to_remove_package_set + + # Checks if the given package is installed (at all). + def isPackageInstalled(self, package_id: str) -> bool: + return self.getInstalledPackageInfo(package_id) is not None + + # This is called by drag-and-dropping curapackage files. + @pyqtSlot(QUrl) + def installPackageViaDragAndDrop(self, file_url: str) -> None: + filename = QUrl(file_url).toLocalFile() + return self.installPackage(filename) + + # Schedules the given package file to be installed upon the next start. + @pyqtSlot(str) + def installPackage(self, filename: str) -> None: + has_changes = False + package_id = "" + try: + # Get package information + package_info = self.getPackageInfo(filename) + if not package_info: + return + package_id = package_info["package_id"] + + # If the package is being installed but it is in the list on to remove, then it is deleted from that list. + if package_id in self._to_remove_package_set: + self._to_remove_package_set.remove(package_id) + + # We do not check if the same package has been installed already here because, for example, in Cura, + # it may need to install a package with the same package-version but with a higher SDK version. So, + # the package-version is not the only version that can be in play here. + + # Need to use the lock file to prevent concurrent I/O issues. + with self._container_registry.lockFile(): + Logger.log("i", "Package [%s] version [%s] is scheduled to be installed.", + package_id, package_info["package_version"]) + # Copy the file to cache dir so we don't need to rely on the original file to be present + package_cache_dir = os.path.join(os.path.abspath(Resources.getCacheStoragePath()), "cura_packages") + if not os.path.exists(package_cache_dir): + os.makedirs(package_cache_dir, exist_ok=True) + + target_file_path = os.path.join(package_cache_dir, package_id + ".curapackage") + shutil.copy2(filename, target_file_path) + + self._to_install_package_dict[package_id] = {"package_info": package_info, + "filename": target_file_path} + has_changes = True + except: + Logger.logException("c", "Failed to install package file '%s'", filename) + finally: + self._saveManagementData() + if has_changes: + self.installedPackagesChanged.emit() + + if package_id in self._packages_with_update_available: + # After installing the update, the check will return that not other updates are available. + # In that case we remove it from the list. This is actually a safe check (could be removed) + if not self.checkIfPackageCanUpdate(package_id): + # The install ensured that the package no longer has a valid update option. + self._packages_with_update_available.remove(package_id) + self.packagesWithUpdateChanged.emit() + + # Schedules the given package to be removed upon the next start. + # \param package_id id of the package + # \param force_add is used when updating. In that case you actually want to uninstall & install + @pyqtSlot(str) + def removePackage(self, package_id: str, force_add: bool = False) -> None: + # Check the delayed installation and removal lists first + if not self.isPackageInstalled(package_id): + Logger.log("i", "Attempt to remove package [%s] that is not installed, do nothing.", package_id) + return + # Extra safety check + if package_id not in self._installed_package_dict and package_id in self._bundled_package_dict: + Logger.log("i", "Not uninstalling [%s] because it is a bundled package.") + return + + if package_id not in self._to_install_package_dict or force_add: + # Schedule for a delayed removal: + self._to_remove_package_set.add(package_id) + else: + if package_id in self._to_install_package_dict: + # Remove from the delayed installation list if present + del self._to_install_package_dict[package_id] + self._saveManagementData() + self.installedPackagesChanged.emit() + + # It might be that a certain update is suddenly available again! + if self.checkIfPackageCanUpdate(package_id): + self._packages_with_update_available.add(package_id) + self.packagesWithUpdateChanged.emit() + + ## Is the package an user installed package? + def isUserInstalledPackage(self, package_id: str) -> bool: + return package_id in self._installed_package_dict + + # Removes everything associated with the given package ID. + def _purgePackage(self, package_id: str) -> None: + # Iterate through all directories in the data storage directory and look for sub-directories that belong to + # the package we need to remove, that is the sub-dirs with the package_id as names, and remove all those dirs. + data_storage_dir = os.path.abspath(Resources.getDataStoragePath()) + + for root, dir_names, _ in os.walk(data_storage_dir): + for dir_name in dir_names: + package_dir = os.path.join(root, dir_name, package_id) + if os.path.exists(package_dir): + Logger.log("i", "Removing '%s' for package [%s]", package_dir, package_id) + shutil.rmtree(package_dir) + break + + # Installs all files associated with the given package. + def _installPackage(self, installation_package_data: Dict[str, Any]) -> None: + package_info = installation_package_data["package_info"] + filename = installation_package_data["filename"] + + package_id = package_info["package_id"] + Logger.log("i", "Installing package [%s] from file [%s]", package_id, filename) + + # Load the cached package file and extract all contents to a temporary directory + if not os.path.exists(filename): + Logger.log("w", "Package [%s] file '%s' is missing, cannot install this package", package_id, filename) + return + try: + with zipfile.ZipFile(filename, "r") as archive: + temp_dir = tempfile.TemporaryDirectory() + archive.extractall(temp_dir.name) + except Exception: + Logger.logException("e", "Failed to install package from file [%s]", filename) + return + + # Remove it first and then install + try: + self._purgePackage(package_id) + except Exception as e: + message = Message(catalog.i18nc("@error:update", + "There was an error uninstalling the package {package} before installing " + "new version:\n{error}.\nPlease try to upgrade again later.".format( + package = package_id, error = str(e))), + title = catalog.i18nc("@info:title", "Updating error")) + message.show() + return + + # Copy the folders there + for sub_dir_name, installation_root_dir in self._installation_dirs_dict.items(): + src_dir_path = os.path.join(temp_dir.name, "files", sub_dir_name) + dst_dir_path = os.path.join(installation_root_dir, package_id) + + if not os.path.exists(src_dir_path): + Logger.log("w", "The path %s does not exist, so not installing the files", src_dir_path) + continue + self.__installPackageFiles(package_id, src_dir_path, dst_dir_path) + + # Remove the file + try: + os.remove(filename) + except Exception: + Logger.log("w", "Tried to delete file [%s], but it failed", filename) + + # Move the info to the installed list of packages only when it succeeds + self._installed_package_dict[package_id] = self._to_install_package_dict[package_id] + self._installed_package_dict[package_id]["package_info"]["is_installed"] = True + + def __installPackageFiles(self, package_id: str, src_dir: str, dst_dir: str) -> None: + Logger.log("i", "Moving package {package_id} from {src_dir} to {dst_dir}".format(package_id=package_id, src_dir=src_dir, dst_dir=dst_dir)) + try: + shutil.move(src_dir, dst_dir) + except FileExistsError: + Logger.log("w", "Not moving %s to %s as the destination already exists", src_dir, dst_dir) + + # Gets package information from the given file. + def getPackageInfo(self, filename: str) -> Dict[str, Any]: + package_json = {} # type: Dict[str, Any] + try: + with zipfile.ZipFile(filename) as archive: + # Go through all the files and use the first successful read as the result + for file_info in archive.infolist(): + if file_info.filename.endswith("package.json"): + Logger.log("d", "Found potential package.json file '%s'", file_info.filename) + try: + with archive.open(file_info.filename, "r") as f: + package_json = json.loads(f.read().decode("utf-8")) + + # Add by default properties + package_json["is_active"] = True + package_json["is_bundled"] = False + package_json["is_installed"] = False + break + except: + Logger.logException("e", "Failed to load potential package.json file '%s' as text file.", + file_info.filename) + except zipfile.BadZipFile: + Logger.logException("e", "Failed to unpack the file %s", filename) + return package_json + + # Gets the license file content if present in the given package file. + # Returns None if there is no license file found. + def getPackageLicense(self, filename: str) -> Optional[str]: + license_string = None + def is_license(zipinfo: zipfile.ZipInfo) -> bool: + return os.path.basename(zipinfo.filename).startswith("LICENSE") + with zipfile.ZipFile(filename) as archive: + # Go through all the files and use the first successful read as the result + license_files = sorted(filter(is_license, archive.infolist()), key = lambda x: len(x.filename)) # Find the one with the shortest path. + for file_info in license_files: + Logger.log("d", "Found potential license file '{filename}'".format(filename = file_info.filename)) + try: + with archive.open(file_info.filename, "r") as f: + data = f.read() + license_string = data.decode("utf-8") + break + except: + Logger.logException("e", "Failed to load potential license file '%s' as text file.", file_info.filename) + license_string = None + return license_string + + ## Find the package files by package_id by looking at the installed folder + @staticmethod + def getPackageFiles(package_id) -> List[Tuple[str, List[str]]]: + data_storage_dir = os.path.abspath(Resources.getDataStoragePath()) + + os_walk = [] + dirs_to_check = [] + result = [] # 2-tuples of (dir, file_names) + for root_path, dir_names, file_names in os.walk(data_storage_dir): + os_walk.append((root_path, dir_names, file_names)) + for dir_name in dir_names: + package_dir = os.path.join(root_path, dir_name, package_id) + if os.path.exists(package_dir): + dirs_to_check.append(package_dir) + + for root_path, dir_names, file_names in os_walk: + for dir_to_check in dirs_to_check: + if root_path.startswith(dir_to_check): + result.append((root_path, file_names)) + + return result + + ## Return container ids for contents found with package_id + @staticmethod + def getPackageContainerIds(package_id: str) -> List[str]: + package_files = PackageManager.getPackageFiles(package_id) + ids = [] + for root_path, file_names in package_files: + for file_name in file_names: + path = os.path.join(root_path, file_name) + id = PackageManager.convertPathToId(path) + if id: + ids.append(id) + return ids + + ## Try to return Id for given path by looking at its existence in the mimetype database + @staticmethod + def convertPathToId(path: str) -> str: + mime = None + try: + mime = MimeTypeDatabase.getMimeTypeForFile(path) + except MimeTypeDatabase.MimeTypeNotFoundError: + pass + if mime: + return urllib.parse.unquote_plus(mime.stripExtension(os.path.basename(path))) + else: + return "" + + +__all__ = ["PackageManager"] diff -Nru uranium-3.3.0/UM/PluginError.py uranium-4.4.1/UM/PluginError.py --- uranium-3.3.0/UM/PluginError.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/PluginError.py 2019-11-19 10:50:46.000000000 +0000 @@ -7,29 +7,18 @@ ## A general class for any error raised by a plugin. class PluginError(Exception): - def __init__(self, error = None): #pylint: disable=bad-whitespace - super().__init__() - self._error = error - - def __str__(self): - return self._error + pass ## Raised when a plugin could not be found. -class PluginNotFoundError(Exception): - def __init__(self, name): - super().__init__() - self._name = name - +class PluginNotFoundError(PluginError): def __str__(self): - return "Could not find plugin " + self._name + name = super().__str__() + return "Could not find plugin " + name ## Raised when a plugin provides incorrect metadata. -class InvalidMetaDataError(Exception): - def __init__(self, name): - super().__init__() - self._name = name - - def __str__(self): - return "Invalid metadata for plugin " + self._name +class InvalidMetaDataError(PluginError): + def __str__(self): + name = super().__str__() + return "Invalid metadata for plugin " + name diff -Nru uranium-3.3.0/UM/PluginObject.py uranium-4.4.1/UM/PluginObject.py --- uranium-3.3.0/UM/PluginObject.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/PluginObject.py 2019-11-19 10:50:46.000000000 +0000 @@ -1,5 +1,6 @@ # Copyright (c) 2018 Ultimaker B.V. # Uranium is released under the terms of the LGPLv3 or higher. +from typing import Optional, Dict, Any ## Base class for objects that can be provided by a plugin. @@ -7,20 +8,42 @@ # This class should be inherited by any class that can be provided # by a plugin. Its only function is to serve as a mapping between # the plugin and the object. - class PluginObject: - def __init__(self): - self._plugin_id = None - self._version = None - - def getPluginId(self): - return self._plugin_id + def __init__(self) -> None: + self._plugin_id = None # type: Optional[str] + self._version = None # type: Optional[str] + self._metadata = {} # type: Dict[str, Any] + self._name = None # type: Optional[str] + + # This returns a globally unique id for this plugin object. + # It prepends it's set name (which should be locally (eg; within the plugin) unique) with the plugin_id, making it + # globally unique. + def getId(self) -> str: + result = self.getPluginId() + if self._name: + result += "_%s" % self._name + return result - def setPluginId(self, plugin_id): + def setPluginId(self, plugin_id: str) -> None: self._plugin_id = plugin_id - def setVersion(self, version: str): + # The metadata of the plugin is set at the moment it is loaded. + def setMetaData(self, metadata: Dict[str, Any]) -> None: + self._metadata = metadata + + def getMetaData(self) -> Dict[str, Any]: + return self._metadata + + def getPluginId(self) -> str: + if not self._plugin_id: + raise ValueError("The plugin ID needs to be set before the plugin can be used") + return self._plugin_id + + def setVersion(self, version: str) -> None: self._version = version def getVersion(self) -> str: + if not self._version: + raise ValueError("The plugin version needs to be set before the plugin can be used") return self._version + diff -Nru uranium-3.3.0/UM/PluginRegistry.py uranium-4.4.1/UM/PluginRegistry.py --- uranium-3.3.0/UM/PluginRegistry.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/PluginRegistry.py 2019-11-19 10:50:46.000000000 +0000 @@ -1,28 +1,30 @@ -# Copyright (c) 2017 Ultimaker B.V. +# Copyright (c) 2018 Ultimaker B.V. # Uranium is released under the terms of the LGPLv3 or higher. import imp +import json import os import shutil # For deleting plugin directories; import stat # For setting file permissions correctly; import zipfile - -from UM.Preferences import Preferences -from UM.PluginError import PluginNotFoundError, InvalidMetaDataError -from UM.Logger import Logger -from typing import Callable, Any, Optional, types, Dict, List +import types +from typing import Any, Callable, Dict, List, Optional, Tuple, TYPE_CHECKING from PyQt5.QtCore import QObject, pyqtSlot, QUrl, pyqtProperty, pyqtSignal -from UM.Resources import Resources -from UM.PluginObject import PluginObject # For type hinting +from UM.i18n import i18nCatalog +from UM.Logger import Logger from UM.Platform import Platform +from UM.PluginError import PluginNotFoundError, InvalidMetaDataError +from UM.PluginObject import PluginObject # For type hinting +from UM.Resources import Resources from UM.Version import Version -from UM.i18n import i18nCatalog -import json i18n_catalog = i18nCatalog("uranium") +if TYPE_CHECKING: + from UM.Application import Application + ## A central object to dynamically load modules as plugins. # @@ -35,58 +37,66 @@ # [plugins]: docs/plugins.md class PluginRegistry(QObject): - APIVersion = 4 + def __init__(self, application: "Application", parent: QObject = None) -> None: + if PluginRegistry.__instance is not None: + raise RuntimeError("Try to create singleton '%s' more than once" % self.__class__.__name__) + PluginRegistry.__instance = self - def __init__(self, parent = None): super().__init__(parent) + self._application = application # type: Application + self._api_version = application.getAPIVersion() # type: Version self._all_plugins = [] # type: List[str] - self._metadata = {} # type: Dict[str, Dict[str, any]] + self._metadata = {} # type: Dict[str, Dict[str, Any]] - self._plugins_available = [] # type: List[str] self._plugins_installed = [] # type: List[str] # NOTE: The disabled_plugins and plugins_to_remove is explicitly set to None. # When actually loading the preferences, it's set to a list. This way we can see the # difference between no list and an empty one. self._disabled_plugins = [] # type: List[str] + self._outdated_plugins = [] # type: List[str] self._plugins_to_install = dict() # type: Dict[str, dict] self._plugins_to_remove = [] # type: List[str] - # Keep track of which plugins are 3rd-party - self._plugins_external = [] # type: List[str] - self._plugins = {} # type: Dict[str, types.ModuleType] self._plugin_objects = {} # type: Dict[str, PluginObject] self._plugin_locations = [] # type: List[str] - self._folder_cache = {} # type: Dict[str, str] + self._folder_cache = {} # type: Dict[str, List[Tuple[str, str]]] - self._application = None - self._supported_file_types = {"umplugin": "Uranium Plugin"} + self._bundled_plugin_cache = {} # type: Dict[str, bool] - # File to store plugin info, such as which ones to install/remove and which ones are disabled. - # Cannot load this here because we don't know the actual Application name yet, so it will result in incorrect - # directory name if we try to get it from Resources now. - self._plugin_config_filename = None + self._supported_file_types = {"umplugin": "Uranium Plugin"} # type: Dict[str, str] - def initializeBeforePluginsAreLoaded(self): + def initializeBeforePluginsAreLoaded(self) -> None: config_path = Resources.getConfigStoragePath() - self._plugin_config_filename = os.path.join(os.path.abspath(config_path), "plugins.json") - # Load the plugin info if exists - if os.path.exists(self._plugin_config_filename): - Logger.log("i", "Loading plugin configuration file '%s'", self._plugin_config_filename) - with open(self._plugin_config_filename, "r", encoding = "utf-8") as f: - data = json.load(f) - self._disabled_plugins = data["disabled"] - self._plugins_to_install = data["to_install"] - self._plugins_to_remove = data["to_remove"] + # File to store plugin info, such as which ones to install/remove and which ones are disabled. + # At this point we can load this here because we already know the actual Application name, so the directory name + self._plugin_config_filename = os.path.join(os.path.abspath(config_path), "plugins.json") # type: str + + from UM.Settings.ContainerRegistry import ContainerRegistry + container_registry = ContainerRegistry.getInstance() + + try: + with container_registry.lockFile(): + # Load the plugin info if exists + if os.path.exists(self._plugin_config_filename): + Logger.log("i", "Loading plugin configuration file '%s'", self._plugin_config_filename) + with open(self._plugin_config_filename, "r", encoding = "utf-8") as f: + data = json.load(f) + self._disabled_plugins = data["disabled"] + self._plugins_to_install = data["to_install"] + self._plugins_to_remove = data["to_remove"] + except: + Logger.logException("e", "Failed to load plugin configuration file '%s'", self._plugin_config_filename) # Also load data from preferences, where the plugin info used to be saved - preferences = Preferences.getInstance() + preferences = self._application.getPreferences() disabled_plugins = preferences.getValue("general/disabled_plugins") disabled_plugins = disabled_plugins.split(",") if disabled_plugins else [] + disabled_plugins = [plugin for plugin in disabled_plugins if len(plugin.strip()) > 0] for plugin_id in disabled_plugins: if plugin_id not in self._disabled_plugins: self._disabled_plugins.append(plugin_id) @@ -111,69 +121,53 @@ self._plugins_to_install = dict() self._savePluginData() - def initializeAfterPlguinsAreLoaded(self): - preferences = Preferences.getInstance() + def initializeAfterPluginsAreLoaded(self) -> None: + preferences = self._application.getPreferences() # Remove the old preferences settings from preferences - preferences.removePreference("general/disabled_plugins") - preferences.removePreference("general/plugins_to_remove") + preferences.resetPreference("general/disabled_plugins") + preferences.resetPreference("general/plugins_to_remove") - def _savePluginData(self): - Logger.log("d", "Saving plugin data to file '%s'", self._plugin_config_filename) - with open(self._plugin_config_filename, "w", encoding = "utf-8") as f: - data = json.dumps({"disabled": self._disabled_plugins, - "to_install": self._plugins_to_install, - "to_remove": self._plugins_to_remove, - }) - f.write(data) - -# TODO: -# - [ ] Improve how metadata is stored. It should not be in the 'plugin' prop -# of the dictionary item. -# - [ ] Remove usage of "active" in favor of "enabled". -# - [ ] Switch self._disabled_plugins to self._plugins_disabled -# - [ ] External plugins only appear in installed after restart -# -# NOMENCLATURE: -# Enabled (active): A plugin which is installed and currently enabled. -# Disabled: A plugin which is installed but not currently enabled. -# Available: A plugin which is not installed but could be. -# Installed: A plugin which is installed locally in Cura. - -#=============================================================================== -# PUBLIC METHODS -#=============================================================================== - - # If used, this can add available plugins (from a remote server) to the - # registry. Cura uses this method to add 3rd-party plugins. - def addExternalPlugins(self, plugin_list): - for plugin in plugin_list: - # Add the plugin id to the the all plugins list if not already there: - if plugin["id"] not in self._all_plugins: - self._all_plugins.append(plugin["id"]) - - # Does this look redundant? - # It is. Should be simplfied in the future but changing it right - # now may break other functionality. - if plugin["id"] not in self._plugins_available: - self._plugins_available.append(plugin["id"]) - self._metadata[plugin["id"]] = { - "id": plugin["id"], - "plugin": plugin, - "update_url": plugin["file_location"] - } - - # Keep a note of plugins which are not Ultimaker plugins: - if plugin["id"] not in self._plugins_external: - self._plugins_external.append(plugin["id"]) + def _savePluginData(self) -> None: + from UM.Settings.ContainerRegistry import ContainerRegistry + container_registry = ContainerRegistry.getInstance() + try: + with container_registry.lockFile(): + with open(self._plugin_config_filename, "w", encoding = "utf-8") as f: + data = json.dumps({"disabled": self._disabled_plugins, + "to_install": self._plugins_to_install, + "to_remove": self._plugins_to_remove, + }) + f.write(data) + except: + # Since we're writing to file (and waiting for a lock), there are a few things that can go wrong. + # There is no need to crash the application for this, but it is a failure that we want to log. + Logger.logException("e", "Unable to save the plugin data.") + + # TODO: + # - [ ] Improve how metadata is stored. It should not be in the 'plugin' prop + # of the dictionary item. + # - [ ] Remove usage of "active" in favor of "enabled". + # - [ ] Switch self._disabled_plugins to self._plugins_disabled + # - [ ] External plugins only appear in installed after restart + # + # NOMENCLATURE: + # Enabled (active): A plugin which is installed and currently enabled. + # Disabled: A plugin which is installed but not currently enabled. + # Available: A plugin which is not installed but could be. + # Installed: A plugin which is installed locally in Cura. + + #=============================================================================== + # PUBLIC METHODS + #=============================================================================== # Add a plugin location to the list of locations to search: - def addPluginLocation(self, location: str): + def addPluginLocation(self, location: str) -> None: #TODO: Add error checking! self._plugin_locations.append(location) # Check if all required plugins are loaded: - def checkRequiredPlugins(self, required_plugins: List[str]): + def checkRequiredPlugins(self, required_plugins: List[str]) -> bool: plugins = self._findInstalledPlugins() for plugin_id in required_plugins: if plugin_id not in plugins: @@ -182,41 +176,37 @@ return True # Remove plugin from the list of enabled plugins and save to preferences: - def disablePlugin(self, plugin_id: str): + def disablePlugin(self, plugin_id: str) -> None: if plugin_id not in self._disabled_plugins: self._disabled_plugins.append(plugin_id) self._savePluginData() # Add plugin to the list of enabled plugins and save to preferences: - def enablePlugin(self, plugin_id: str): + def enablePlugin(self, plugin_id: str) -> None: if plugin_id in self._disabled_plugins: self._disabled_plugins.remove(plugin_id) self._savePluginData() # Get a list of enabled plugins: - def getActivePlugins(self): + def getActivePlugins(self) -> List[str]: plugin_list = [] for plugin_id in self._all_plugins: if self.isActivePlugin(plugin_id): plugin_list.append(plugin_id) return plugin_list - # Get a list of available plugins (ones which are not yet installed): - def getAvailablePlugins(self): - return self._plugins_available - # Get a list of all metadata matching a certain subset of metadata: # \param kwargs Keyword arguments. # Possible keywords: # - filter: \type{dict} The subset of metadata that should be matched. # - active_only: Boolean, True when only active plugin metadata should # be returned. - def getAllMetaData(self, **kwargs): + def getAllMetaData(self, **kwargs: Any): data_filter = kwargs.get("filter", {}) active_only = kwargs.get("active_only", False) metadata_list = [] for plugin_id in self._all_plugins: - if active_only and plugin_id in self._disabled_plugins: + if active_only and (plugin_id in self._disabled_plugins or plugin_id in self._outdated_plugins): continue plugin_metadata = self.getMetaData(plugin_id) if self._subsetInDict(plugin_metadata, data_filter): @@ -224,12 +214,9 @@ return metadata_list # Get a list of disabled plugins: - def getDisabledPlugins(self): + def getDisabledPlugins(self) -> List[str]: return self._disabled_plugins - def getExternalPlugins(self): - return self._plugins_external - # Get a list of installed plugins: # NOTE: These are plugins which have already been registered. This list is # actually populated by the private _findInstalledPlugins() method. @@ -241,19 +228,12 @@ for plugin_id in self._plugins_to_install: if plugin_id not in plugins: plugins.append(plugin_id) - return plugins - - # Get the singleton instance of this class: - @classmethod - def getInstance(cls) -> "PluginRegistry": - if not cls._instance: - cls._instance = PluginRegistry() - return cls._instance + return sorted(plugins) # Get the metadata for a certain plugin: # NOTE: InvalidMetaDataError is raised when no metadata can be found or # the metadata misses the right keys. - def getMetaData(self, plugin_id: str): + def getMetaData(self, plugin_id: str) -> Dict[str, Any]: if plugin_id not in self._metadata: try: if not self._populateMetaData(plugin_id): @@ -263,15 +243,13 @@ return self._metadata[plugin_id] - # Get the list of plugin locations: - def getPluginLocations(self): - return self._plugin_locations - @pyqtSlot(str, result="QVariantMap") - def installPlugin(self, plugin_path: str): + def installPlugin(self, plugin_path: str) -> Optional[Dict[str, str]]: plugin_path = QUrl(plugin_path).toLocalFile() plugin_id = self._getPluginIdFromFile(plugin_path) + if plugin_id is None: #Failed to load. + return None # Remove it from the to-be-removed list if it's there if plugin_id in self._plugins_to_remove: @@ -301,62 +279,69 @@ return result # Check by ID if a plugin is active (enabled): - def isActivePlugin(self, plugin_id): - if plugin_id not in self._disabled_plugins: + def isActivePlugin(self, plugin_id: str) -> bool: + if plugin_id not in self._disabled_plugins and plugin_id not in self._outdated_plugins and plugin_id in self._all_plugins: return True + return False - # Check by ID if a plugin is available: - def isAvailablePlugin(self, plugin_id: str): - return plugin_id in self._plugins_available - - # Check by ID if a plugin is installed: - def isInstalledPlugin(self, plugin_id: str): - return plugin_id in self._plugins_installed - - def isBundledPlugin(self, plugin_id: str, plugin_dir: str) -> bool: - install_prefix = self._application.getInstallPrefix() - install_prefix = os.path.abspath(install_prefix) - plugin_dir = os.path.abspath(plugin_dir) + def isBundledPlugin(self, plugin_id: str) -> bool: + if plugin_id in self._bundled_plugin_cache: + return self._bundled_plugin_cache[plugin_id] + install_prefix = os.path.abspath(self._application.getInstallPrefix()) + + # Go through all plugin locations and check if the given plugin is located in the installation path. + is_bundled = False + for plugin_dir in self._plugin_locations: + try: + is_in_installation_path = os.path.commonpath([install_prefix, plugin_dir]).startswith(install_prefix) + except ValueError: + is_in_installation_path = False + if not is_in_installation_path: + continue - return os.path.commonpath([install_prefix, plugin_dir]).startswith(install_prefix) + result = self._locatePlugin(plugin_id, plugin_dir) + if result: + is_bundled = True + break + self._bundled_plugin_cache[plugin_id] = is_bundled + return is_bundled ## Load all plugins matching a certain set of metadata # \param meta_data \type{dict} The meta data that needs to be matched. # \sa loadPlugin # NOTE: This is the method which kicks everything off at app launch. - def loadPlugins(self, metadata: Optional[dict] = None): + def loadPlugins(self, metadata: Optional[Dict[str, Any]] = None) -> None: # Get a list of all installed plugins: plugin_ids = self._findInstalledPlugins() for plugin_id in plugin_ids: # Get the plugin metadata: plugin_metadata = self.getMetaData(plugin_id) - # Add the plugin to the list: - self._all_plugins.append(plugin_id) - self._plugins_installed.append(plugin_id) - # Save all metadata to the metadata dictionary: self._metadata[plugin_id] = plugin_metadata if metadata is None or self._subsetInDict(self._metadata[plugin_id], metadata): # try: self.loadPlugin(plugin_id) + # Add the plugin to the list after actually load the plugin: + self._all_plugins.append(plugin_id) + self._plugins_installed.append(plugin_id) except PluginNotFoundError: pass + # Checks if the given plugin API version is compatible with the current version. + def isPluginApiVersionCompatible(self, plugin_api_version: "Version") -> bool: + return plugin_api_version.getMajor() == self._api_version.getMajor() \ + and plugin_api_version.getMinor() <= self._api_version.getMinor() + # Load a single plugin by ID: - def loadPlugin(self, plugin_id: str): + def loadPlugin(self, plugin_id: str) -> None: # If plugin has already been loaded, do not load it again: if plugin_id in self._plugins: Logger.log("w", "Plugin %s was already loaded", plugin_id) return - # If the plugin is in the list of disabled plugins, alert and return: - if plugin_id in self._disabled_plugins: - Logger.log("d", "Plugin %s was disabled", plugin_id) - return - # Find the actual plugin on drive: plugin = self._findPlugin(plugin_id) @@ -370,43 +355,68 @@ self._populateMetaData(plugin_id) except InvalidMetaDataError: return - if self._metadata[plugin_id].get("plugin", {}).get("api", 0) != self.APIVersion: - Logger.log("i", "Plugin %s uses an incompatible API version, ignoring", plugin_id) + + # Do not load plugin that has been disabled + if plugin_id in self._disabled_plugins: + Logger.log("i", "Plugin [%s] has been disabled. Skip loading it.", plugin_id) + return + + # If API version is incompatible, don't load it. + supported_sdk_versions = self._metadata[plugin_id].get("plugin", {}).get("supported_sdk_versions", [Version("0")]) + is_plugin_supported = False + for supported_sdk_version in supported_sdk_versions: + is_plugin_supported |= self.isPluginApiVersionCompatible(supported_sdk_version) + if is_plugin_supported: + break + + if not is_plugin_supported: + Logger.log("w", "Plugin [%s] with supported sdk versions [%s] is incompatible with the current sdk version [%s].", + plugin_id, [str(version) for version in supported_sdk_versions], self._api_version) + self._outdated_plugins.append(plugin_id) return + try: - to_register = plugin.register(self._application) + to_register = plugin.register(self._application) # type: ignore # We catch AttributeError on this in case register() doesn't exist. if not to_register: Logger.log("e", "Plugin %s did not return any objects to register", plugin_id) return for plugin_type, plugin_object in to_register.items(): if type(plugin_object) == list: - for nested_plugin_object in plugin_object: + for metadata_index, nested_plugin_object in enumerate(plugin_object): nested_plugin_object.setVersion(self._metadata[plugin_id].get("plugin", {}).get("version")) + all_metadata = self._metadata[plugin_id].get(plugin_type, []) + try: + nested_plugin_object.setMetaData(all_metadata[metadata_index]) + except IndexError: + nested_plugin_object.setMetaData({}) self._addPluginObject(nested_plugin_object, plugin_id, plugin_type) else: plugin_object.setVersion(self._metadata[plugin_id].get("plugin", {}).get("version")) + metadata = self._metadata[plugin_id].get(plugin_type, {}) + if type(metadata) == list: + try: + metadata = metadata[0] + except IndexError: + metadata = {} + plugin_object.setMetaData(metadata) self._addPluginObject(plugin_object, plugin_id, plugin_type) self._plugins[plugin_id] = plugin self.enablePlugin(plugin_id) Logger.log("i", "Loaded plugin %s", plugin_id) - except KeyError as e: - Logger.log("e", "Error loading plugin %s:", plugin_id) - Logger.log("e", "Unknown plugin type: %s", str(e)) - except Exception as e: + except Exception as ex: Logger.logException("e", "Error loading plugin %s:", plugin_id) - # Set the central application object: - def setApplication(self, app): - self._application = app - # Uninstall a plugin with a given ID: @pyqtSlot(str, result="QVariantMap") - def uninstallPlugin(self, plugin_id: str): + def uninstallPlugin(self, plugin_id: str) -> Dict[str, str]: result = {"status": "error", "message": "", "id": plugin_id} success_message = i18n_catalog.i18nc("@info:status", "The plugin has been removed.\nPlease restart {0} to finish uninstall.", self._application.getApplicationName()) + if plugin_id not in self._plugins_installed: + return result + in_to_install = plugin_id in self._plugins_to_install if in_to_install: del self._plugins_to_install[plugin_id] @@ -432,6 +442,9 @@ local_plugin_path = os.path.join(Resources.getStoragePath(Resources.Resources), "plugins") + if plugin_id in self._bundled_plugin_cache: + del self._bundled_plugin_cache[plugin_id] + try: with zipfile.ZipFile(plugin_path, "r") as zip_ref: plugin_folder = os.path.join(local_plugin_path, plugin_id) @@ -457,6 +470,9 @@ plugin_folder = os.path.join(Resources.getStoragePath(Resources.Resources), "plugins") plugin_path = os.path.join(plugin_folder, plugin_id) + if plugin_id in self._bundled_plugin_cache: + del self.bundled_plugin_cache[plugin_id] + Logger.log("i", "Attempting to remove plugin '%s' from directory '%s'", plugin_id, plugin_path) shutil.rmtree(plugin_path) @@ -466,15 +482,22 @@ def _getPluginIdFromFile(self, filename: str) -> Optional[str]: plugin_id = None - with zipfile.ZipFile(filename, "r") as zip_ref: - for file_info in zip_ref.infolist(): - if file_info.filename.endswith("/"): - plugin_id = file_info.filename.strip("/") - break + try: + with zipfile.ZipFile(filename, "r") as zip_ref: + for file_info in zip_ref.infolist(): + if file_info.filename.endswith("/"): + plugin_id = file_info.filename.strip("/") + break + except zipfile.BadZipFile: + Logger.logException("e", "Failed to load plug-in file. The zip archive seems to be corrupt.") + return None # Signals that loading this failed. + except FileNotFoundError: + Logger.logException("e", "Failed to load plug-in file as we were unable to find it.") + return None # Signals that loading this failed. return plugin_id # Returns a list of all possible plugin ids in the plugin locations: - def _findInstalledPlugins(self, paths = None): + def _findInstalledPlugins(self, paths = None) -> List[str]: plugin_ids = [] if not paths: @@ -495,9 +518,9 @@ return plugin_ids ## Try to find a module implementing a plugin - # \param plugin_id \type{string} The name of the plugin to find - # \returns module \type{module} if it was found None otherwise - def _findPlugin(self, plugin_id: str) -> types.ModuleType: + # \param plugin_id The name of the plugin to find + # \returns module if it was found None otherwise + def _findPlugin(self, plugin_id: str) -> Optional[types.ModuleType]: location = None for folder in self._plugin_locations: location = self._locatePlugin(plugin_id, folder) @@ -514,13 +537,13 @@ return None try: - module = imp.load_module(plugin_id, file, path, desc) + module = imp.load_module(plugin_id, file, path, desc) #type: ignore #MyPy gets the wrong output type from imp.find_module for some reason. except Exception: Logger.logException("e", "Import error loading module %s", plugin_id) return None finally: if file: - os.close(file) + os.close(file) #type: ignore #MyPy gets the wrong output type from imp.find_module for some reason. return module @@ -537,16 +560,51 @@ sub_folders.append(entry) self._folder_cache[folder] = sub_folders - for (file, file_path) in self._folder_cache[folder]: + for file, file_path in self._folder_cache[folder]: if file == plugin_id and os.path.exists(os.path.join(file_path, "__init__.py")): return folder else: - file_path = self._locatePlugin(plugin_id, file_path) - if file_path: - return file_path + plugin_path = self._locatePlugin(plugin_id, file_path) + if plugin_path: + return plugin_path return None + # Load the plugin data from the stream and in-place update the metadata. + def _parsePluginInfo(self, plugin_id, file_data, meta_data): + try: + meta_data["plugin"] = json.loads(file_data) + except json.decoder.JSONDecodeError: + Logger.logException("e", "Failed to parse plugin.json for plugin %s", plugin_id) + raise InvalidMetaDataError(plugin_id) + + # Check if metadata is valid; + if "version" not in meta_data["plugin"]: + Logger.log("e", "Version must be set!") + raise InvalidMetaDataError(plugin_id) + + # Check if the plugin states what API version it needs. + if "api" not in meta_data["plugin"] and "supported_sdk_versions" not in meta_data["plugin"]: + Logger.log("e", "The API or the supported_sdk_versions must be set!") + raise InvalidMetaDataError(plugin_id) + else: + # Store the api_version as a Version object. + all_supported_sdk_versions = [] # type: List[Version] + if "supported_sdk_versions" in meta_data["plugin"]: + all_supported_sdk_versions += [Version(supported_version) for supported_version in + meta_data["plugin"]["supported_sdk_versions"]] + if "api" in meta_data["plugin"]: + all_supported_sdk_versions += [Version(meta_data["plugin"]["api"])] + meta_data["plugin"]["supported_sdk_versions"] = all_supported_sdk_versions + + if "i18n-catalog" in meta_data["plugin"]: + # A catalog was set, try to translate a few strings + i18n_catalog = i18nCatalog(meta_data["plugin"]["i18n-catalog"]) + if "name" in meta_data["plugin"]: + meta_data["plugin"]["name"] = i18n_catalog.i18n(meta_data["plugin"]["name"]) + if "description" in meta_data["plugin"]: + meta_data["plugin"]["description"] = i18n_catalog.i18n(meta_data["plugin"]["description"]) + ## private: # Populate the list of metadata # \param plugin_id \type{string} @@ -557,8 +615,6 @@ Logger.log("w", "Could not find plugin %s", plugin_id) return False - meta_data = None - location = None for folder in self._plugin_locations: location = self._locatePlugin(plugin_id, folder) @@ -571,30 +627,11 @@ location = os.path.join(location, plugin_id) try: - meta_data = plugin.getMetaData() - + meta_data = plugin.getMetaData() #type: ignore #We catch the AttributeError that this would raise if the module has no getMetaData function. metadata_file = os.path.join(location, "plugin.json") try: - with open(metadata_file, "r") as f: - try: - meta_data["plugin"] = json.loads(f.read()) - except json.decoder.JSONDecodeError: - Logger.logException("e", "Failed to parse plugin.json for plugin %s", plugin_id) - raise InvalidMetaDataError(plugin_id) - - # Check if metadata is valid; - if "version" not in meta_data["plugin"]: - Logger.log("e", "Version must be set!") - raise InvalidMetaDataError(plugin_id) - - if "i18n-catalog" in meta_data["plugin"]: - # A catalog was set, try to translate a few strings - i18n_catalog = i18nCatalog(meta_data["plugin"]["i18n-catalog"]) - if "name" in meta_data["plugin"]: - meta_data["plugin"]["name"] = i18n_catalog.i18n(meta_data["plugin"]["name"]) - if "description" in meta_data["plugin"]: - meta_data["plugin"]["description"] = i18n_catalog.i18n(meta_data["plugin"]["description"]) - + with open(metadata_file, "r", encoding = "utf-8") as file_stream: + self._parsePluginInfo(plugin_id, file_stream.read(), meta_data) except FileNotFoundError: Logger.logException("e", "Unable to find the required plugin.json file for plugin %s", plugin_id) raise InvalidMetaDataError(plugin_id) @@ -629,13 +666,6 @@ return False return True -#=============================================================================== -# GRAVEYARD -# Methods in the graveyard are no longer used and can eventually be removed and -# forgotten by the ages. They aren't yet though because their memories still -# live on in the hearts of other classes. -#=============================================================================== - ## Get a speficic plugin object given an ID. If not loaded, load it. # \param plugin_id \type{string} The ID of the plugin object to get. def getPluginObject(self, plugin_id: str) -> PluginObject: @@ -645,8 +675,7 @@ raise PluginNotFoundError(plugin_id) return self._plugin_objects[plugin_id] - # Plugin object stuff is definitely considered depreciated. - def _addPluginObject(self, plugin_object: PluginObject, plugin_id: str, plugin_type: str): + def _addPluginObject(self, plugin_object: PluginObject, plugin_id: str, plugin_type: str) -> None: plugin_object.setPluginId(plugin_id) self._plugin_objects[plugin_id] = plugin_object try: @@ -654,7 +683,7 @@ except Exception as e: Logger.logException("e", "Unable to add plugin %s", plugin_id) - def addSupportedPluginExtension(self, extension, description): + def addSupportedPluginExtension(self, extension: str, description: str) -> None: if extension not in self._supported_file_types: self._supported_file_types[extension] = description self.supportedPluginExtensionsChanged.emit() @@ -662,7 +691,7 @@ supportedPluginExtensionsChanged = pyqtSignal() @pyqtProperty("QStringList", notify=supportedPluginExtensionsChanged) - def supportedPluginExtensions(self): + def supportedPluginExtensions(self) -> List[str]: file_types = [] all_types = [] @@ -680,20 +709,13 @@ file_types.append(i18n_catalog.i18nc("@item:inlistbox", "All Files (*)")) return file_types - @pyqtSlot(str, result = bool) - def isPluginFile(self, plugin_path: str): - extension = os.path.splitext(plugin_path)[1].strip(".") - if extension.lower() in self._supported_file_types.keys(): - return True - return False - ## Get the path to a plugin. # # \param plugin_id \type{string} The ID of the plugin. # \return \type{string} The absolute path to the plugin or an empty string if the plugin could not be found. def getPluginPath(self, plugin_id: str) -> Optional[str]: if plugin_id in self._plugins: - plugin = self._plugins[plugin_id] + plugin = self._plugins.get(plugin_id) else: plugin = self._findPlugin(plugin_id) @@ -721,18 +743,20 @@ # \param type \type{string} The name of the plugin type to add. # \param register_function \type{callable} A callable that takes an object as parameter. @classmethod - def addType(cls, plugin_type: str, register_function: Callable[[Any], None]): + def addType(cls, plugin_type: str, register_function: Callable[[Any], None]) -> None: cls._type_register_map[plugin_type] = register_function ## Remove a plugin type. # - # \param type \type{string} The plugin type to remove. + # \param type The plugin type to remove. @classmethod - def removeType(cls, plugin_type: str): + def removeType(cls, plugin_type: str) -> None: if plugin_type in cls._type_register_map: del cls._type_register_map[plugin_type] - - _type_register_map = {} # type: Dict[str, Callable[[Any], None]] - _instance = None # type: PluginRegistry + __instance = None # type: PluginRegistry + + @classmethod + def getInstance(cls, *args, **kwargs) -> "PluginRegistry": + return cls.__instance diff -Nru uranium-3.3.0/UM/Preferences.py uranium-4.4.1/UM/Preferences.py --- uranium-3.3.0/UM/Preferences.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Preferences.py 2019-11-19 10:50:46.000000000 +0000 @@ -1,12 +1,14 @@ -# Copyright (c) 2015 Ultimaker B.V. +# Copyright (c) 2018 Ultimaker B.V. # Uranium is released under the terms of the LGPLv3 or higher. import configparser +from typing import Any, Dict, IO, Optional, Tuple, Union -from UM.Signal import Signal, signalemitter +from UM.Decorators import deprecated from UM.Logger import Logger from UM.MimeTypeDatabase import MimeTypeDatabase, MimeType #To register the MIME type of the preference file. from UM.SaveFile import SaveFile +from UM.Signal import Signal, signalemitter MimeTypeDatabase.addMimeType( MimeType( @@ -17,23 +19,27 @@ ) ) + ## Preferences are application based settings that are saved for future use. # Typical preferences would be window size, standard machine, etc. +# The application preferences can be gotten from the getPreferences() function in Application @signalemitter class Preferences: Version = 6 - def __init__(self): + def __init__(self) -> None: super().__init__() - self._file = None - self._parser = None - self._preferences = {} + self._parser = None # type: Optional[configparser.ConfigParser] + self._preferences = {} # type: Dict[str, Dict[str, _Preference]] - def addPreference(self, key, default_value): + ## Add a new preference to the list. If the preference was already added, it's default is set to whatever is provided + def addPreference(self, key: str, default_value: Any) -> None: + if key.count("/") != 1: + raise Exception("Preferences must be in the [CATEGORY]/[KEY] format") preference = self._findPreference(key) if preference: - preference.setDefault(default_value) + self.setDefault(key, default_value) return group, key = self._splitKey(key) @@ -59,25 +65,25 @@ # # \param key The key of the preference to set the default of. # \param default_value The new default value of the preference. - def setDefault(self, key, default_value): + def setDefault(self, key: str, default_value: Any) -> None: preference = self._findPreference(key) - if not preference: #Key not found. + if not preference: # Key not found. Logger.log("w", "Tried to set the default value of non-existing setting %s.", key) return if preference.getValue() == preference.getDefault(): self.setValue(key, default_value) preference.setDefault(default_value) - def setValue(self, key, value): + def setValue(self, key: str, value: Any) -> None: preference = self._findPreference(key) - if preference: - preference.setValue(value) - self.preferenceChanged.emit(key) + if preference.getValue() != value: + preference.setValue(value) + self.preferenceChanged.emit(key) else: Logger.log("w", "Tried to set the value of non-existing setting %s.", key) - def getValue(self, key): + def getValue(self, key: str) -> Any: preference = self._findPreference(key) if preference: @@ -91,22 +97,25 @@ Logger.log("w", "Tried to get the value of non-existing setting %s.", key) return None - def resetPreference(self, key): + def resetPreference(self, key: str) -> None: preference = self._findPreference(key) if preference: - preference.setValue(preference.getDefault()) - self.preferenceChanged.emit(key) + if preference.getValue() != preference.getDefault(): + preference.setValue(preference.getDefault()) + self.preferenceChanged.emit(key) + else: + Logger.log("w", "Tried to reset unknown setting %s", key) - def readFromFile(self, file): + def readFromFile(self, file: Union[str, IO[str]]) -> None: self._loadFile(file) + self.__initializeSettings() - if not self._parser: + def __initializeSettings(self) -> None: + if self._parser is None: + Logger.log("w", "Read the preferences file before initializing settings!") return - self.__initializeSettings() - - def __initializeSettings(self): for group, group_entries in self._parser.items(): if group == "DEFAULT": continue @@ -121,7 +130,7 @@ self._preferences[group][key].setValue(value) self.preferenceChanged.emit("{0}/{1}".format(group, key)) - def writeToFile(self, file): + def writeToFile(self, file: Union[str, IO[str]]) -> None: parser = configparser.ConfigParser(interpolation = None) #pylint: disable=bad-whitespace for group, group_entries in self._preferences.items(): parser[group] = {} @@ -133,7 +142,7 @@ try: if hasattr(file, "read"): # If it already is a stream like object, write right away - parser.write(file) + parser.write(file) #type: ignore #Can't convince MyPy that it really is an IO object now. else: with SaveFile(file, "wt") as save_file: parser.write(save_file) @@ -142,14 +151,7 @@ preferenceChanged = Signal() - @classmethod - def getInstance(cls) -> "Preferences": - if not cls._instance: - cls._instance = Preferences() - - return cls._instance - - def _splitKey(self, key): + def _splitKey(self, key: str) -> Tuple[str, str]: group = "general" key = key @@ -158,9 +160,9 @@ group = parts[0] key = parts[1] - return (group, key) + return group, key - def _findPreference(self, key): + def _findPreference(self, key: str) -> Optional[Any]: group, key = self._splitKey(key) if group in self._preferences: @@ -169,9 +171,7 @@ return None - def _loadFile(self, file): - if self._file and self._file == file: - return self._parser + def _loadFile(self, file: Union[str, IO[str]]) -> None: try: self._parser = configparser.ConfigParser(interpolation = None) #pylint: disable=bad-whitespace if hasattr(file, "read"): @@ -184,20 +184,23 @@ self._parser = None return except Exception: - Logger.logException("e", "An exception occured while trying to read preferences file") + Logger.logException("e", "An exception occurred while trying to read preferences file") self._parser = None return del self._parser["general"]["version"] - _instance = None # type: Preferences - ## Extract data from string and store it in the Configuration parser. - def deserialize(self, serialized: str) -> str: + def deserialize(self, serialized: str) -> None: updated_preferences = self.__updateSerialized(serialized) - self._parser = configparser.ConfigParser(interpolation=None) - self._parser.read_string(updated_preferences) - has_version = "version" in self._parser["general"] + self._parser = configparser.ConfigParser(interpolation = None) + try: + self._parser.read_string(updated_preferences) + except configparser.MissingSectionHeaderError: + Logger.log("w", "Could not deserialize preferences from loaded project") + self._parser = None + return + has_version = "general" in self._parser and "version" in self._parser["general"] if has_version: if self._parser["general"]["version"] != str(Preferences.Version): @@ -213,40 +216,35 @@ def __updateSerialized(self, serialized: str) -> str: configuration_type = "preferences" - version = None try: - import UM.VersionUpgradeManager - version = UM.VersionUpgradeManager.VersionUpgradeManager.getInstance().getFileVersion(configuration_type, - serialized) + from UM.VersionUpgradeManager import VersionUpgradeManager + version = VersionUpgradeManager.getInstance().getFileVersion(configuration_type, serialized) if version is not None: - from UM.VersionUpgradeManager import VersionUpgradeManager - result = VersionUpgradeManager.getInstance().updateFilesData(configuration_type, version, - [serialized], [""]) + result = VersionUpgradeManager.getInstance().updateFilesData(configuration_type, version, [serialized], [""]) if result is not None: serialized = result.files_data[0] - return serialized + except: + Logger.logException("d", "An exception occurred while trying to update the preferences.") + return serialized - except Exception as e: - Logger.log("d", "Could not get version from serialized: %s", e) - pass class _Preference: - def __init__(self, name, default = None, value = None): #pylint: disable=bad-whitespace + def __init__(self, name: str, default: Any = None, value: Any = None) -> None: self._name = name self._default = default self._value = default if value is None else value - def getName(self): + def getName(self) -> str: return self._name - def getValue(self): + def getValue(self) -> Any: return self._value - def getDefault(self): + def getDefault(self) -> Any: return self._default - def setDefault(self, default): + def setDefault(self, default: Any) -> None: self._default = default - def setValue(self, value): - self._value = value \ No newline at end of file + def setValue(self, value: Any) -> None: + self._value = value diff -Nru uranium-3.3.0/UM/Qt/Bindings/ActiveToolProxy.py uranium-4.4.1/UM/Qt/Bindings/ActiveToolProxy.py --- uranium-3.3.0/UM/Qt/Bindings/ActiveToolProxy.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Qt/Bindings/ActiveToolProxy.py 2019-11-19 10:50:46.000000000 +0000 @@ -1,9 +1,11 @@ -# Copyright (c) 2015 Ultimaker B.V. +# Copyright (c) 2018 Ultimaker B.V. # Uranium is released under the terms of the LGPLv3 or higher. +from typing import Any from PyQt5.QtCore import pyqtSlot, pyqtProperty, pyqtSignal, QObject, QUrl, QVariant from UM.Application import Application +from UM.Logger import Logger from UM.PluginRegistry import PluginRegistry from . import ContainerProxy @@ -31,9 +33,8 @@ def activeToolPanel(self): if not self._active_tool: return QUrl() - try: - panel_file = PluginRegistry.getInstance().getMetaData(self._active_tool.getPluginId())["tool"]["tool_panel"] + panel_file = self._active_tool.getMetaData()["tool_panel"] except KeyError: return QUrl() @@ -43,19 +44,31 @@ def triggerAction(self, action): if not self._active_tool: return + if not hasattr(self._active_tool, action): + Logger.log("w", "Trying to call non-existing action {action} of tool {tool}.".format(action = action, tool = self._active_tool.getPluginId())) + return action = getattr(self._active_tool, action) if action: action() + ## Triggers one of the tools' actions and provides additional parameters to + # the action. + # + # The additional data is passed as a parameter to the function call of the + # action. + # \param action The action to trigger. + # \param data The additional data to call @pyqtSlot(str, QVariant) - def triggerActionWithData(self, action, data): + def triggerActionWithData(self, action: str, data: Any): if not self._active_tool: return + if not hasattr(self._active_tool, action): + Logger.log("w", "Trying to call non-existing action {action} of tool {tool}.".format(action = action, tool = self._active_tool.getPluginId())) + return - action = getattr(self._active_tool, action) - if action: - action(data) + if hasattr(self._active_tool, action): + getattr(self._active_tool, action)(data) propertiesChanged = pyqtSignal() @pyqtProperty(QObject, notify = propertiesChanged) diff -Nru uranium-3.3.0/UM/Qt/Bindings/ActiveViewProxy.py uranium-4.4.1/UM/Qt/Bindings/ActiveViewProxy.py --- uranium-3.3.0/UM/Qt/Bindings/ActiveViewProxy.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Qt/Bindings/ActiveViewProxy.py 1970-01-01 00:00:00.000000000 +0000 @@ -1,54 +0,0 @@ -# Copyright (c) 2015 Ultimaker B.V. -# Uranium is released under the terms of the LGPLv3 or higher. - -from PyQt5.QtCore import pyqtSlot, pyqtProperty, pyqtSignal, QObject, QVariant, QUrl - -from UM.Application import Application -from UM.PluginRegistry import PluginRegistry - -import os.path - -class ActiveViewProxy(QObject): - def __init__(self, parent = None): - super().__init__(parent) - self._active_view = None - Application.getInstance().getController().activeViewChanged.connect(self._onActiveViewChanged) - self._onActiveViewChanged() - - activeViewChanged = pyqtSignal() - - @pyqtProperty(QUrl, notify = activeViewChanged) - def activeViewPanel(self): - if not self._active_view: - return QUrl() - - try: - panel_file = PluginRegistry.getInstance().getMetaData(self._active_view.getPluginId())["view"]["view_panel"] - except KeyError: - return QUrl() - - return QUrl.fromLocalFile(os.path.join(PluginRegistry.getInstance().getPluginPath(self._active_view.getPluginId()), panel_file)) - - ## Allows trigger backend function from QML, example: UM.ActiveTool.triggerAction("layFlat") - # - # \param action The function name which will be triggered. - # \param data The argument which will pass to the action function - @pyqtSlot(str, QVariant) - def triggerAction(self, action, data): - if not self._active_view: - return - - action = getattr(self._active_view, action) - if action: - action(data) - - @pyqtProperty(bool, notify = activeViewChanged) - def valid(self): - return self._active_view != None - - def _onActiveViewChanged(self): - self._active_view = Application.getInstance().getController().getActiveView() - self.activeViewChanged.emit() - -def createActiveViewProxy(engine, script_engine): - return ActiveViewProxy() diff -Nru uranium-3.3.0/UM/Qt/Bindings/ApplicationProxy.py uranium-4.4.1/UM/Qt/Bindings/ApplicationProxy.py --- uranium-3.3.0/UM/Qt/Bindings/ApplicationProxy.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Qt/Bindings/ApplicationProxy.py 2019-11-19 10:50:46.000000000 +0000 @@ -6,27 +6,13 @@ from UM.Application import Application from UM.Logger import Logger -import platform - class ApplicationProxy(QObject): def __init__(self, parent = None): super().__init__(parent) self._application = Application.getInstance() - self._application.mainWindowChanged.connect(self._onMainWindowChanged) - - @pyqtSlot(str, str) - def log(self, type, message): - Logger.log(type, message) @pyqtProperty(str, constant = True) def version(self): return self._application.getVersion() - mainWindowChanged = pyqtSignal() - @pyqtProperty(QObject, notify = mainWindowChanged) - def mainWindow(self): - return self._application.getMainWindow() - - def _onMainWindowChanged(self): - self.mainWindowChanged.emit() diff -Nru uranium-3.3.0/UM/Qt/Bindings/BackendProxy.py uranium-4.4.1/UM/Qt/Bindings/BackendProxy.py --- uranium-3.3.0/UM/Qt/Bindings/BackendProxy.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Qt/Bindings/BackendProxy.py 2019-11-19 10:50:46.000000000 +0000 @@ -1,16 +1,19 @@ # Copyright (c) 2015 Ultimaker B.V. # Uranium is released under the terms of the LGPLv3 or higher. -from PyQt5.QtCore import QObject, pyqtSignal, pyqtProperty +from PyQt5.QtCore import QObject, pyqtSignal, pyqtProperty, Q_ENUMS from UM.i18n import i18nCatalog -from UM.Message import Message from UM.Application import Application from UM.Backend.Backend import BackendState i18n_catalog = i18nCatalog("uranium") + class BackendProxy(QObject): + + Q_ENUMS(BackendState) # Expose the BackendState enum to QML + def __init__(self, parent = None): super().__init__(parent) self._backend = Application.getInstance().getBackend() @@ -36,9 +39,11 @@ return self._state def _onProcessingProgress(self, amount): - self._progress = amount - self.processingProgress.emit(amount) + if self._progress != amount: + self._progress = amount + self.processingProgress.emit(amount) def _onBackendStateChange(self, state): - self._state = state - self.backendStateChange.emit(state) \ No newline at end of file + if self._state != state: + self._state = state + self.backendStateChange.emit(state) diff -Nru uranium-3.3.0/UM/Qt/Bindings/Bindings.py uranium-4.4.1/UM/Qt/Bindings/Bindings.py --- uranium-3.3.0/UM/Qt/Bindings/Bindings.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Qt/Bindings/Bindings.py 2019-11-19 10:50:46.000000000 +0000 @@ -12,7 +12,6 @@ from . import ApplicationProxy from . import ControllerProxy from . import BackendProxy -from . import SceneProxy from . import ResourcesProxy from . import OperationStackProxy from UM.Mesh.MeshFileHandler import MeshFileHandler @@ -22,17 +21,13 @@ from . import OpenGLContextProxy from . import PointingRectangle from . import ActiveToolProxy -from . import ActiveViewProxy from . import OutputDevicesModel from . import SelectionProxy from . import OutputDeviceManagerProxy from . import i18nCatalogProxy from . import ExtensionModel -from . import PluginsModel from . import VisibleMessagesModel -from . import MeshListModel - from UM.Settings.Models.SettingDefinitionsModel import SettingDefinitionsModel from UM.Settings.Models.DefinitionContainersModel import DefinitionContainersModel from UM.Settings.Models.InstanceContainersModel import InstanceContainersModel @@ -56,10 +51,6 @@ return BackendProxy.BackendProxy() @classmethod - def createSceneProxy(self, engine, script_engine): - return SceneProxy.SceneProxy() - - @classmethod def createResourcesProxy(cls, engine, script_engine): return ResourcesProxy.ResourcesProxy() @@ -78,21 +69,18 @@ qmlRegisterType(ToolModel.ToolModel, "UM", 1, 0, "ToolModel") qmlRegisterType(PointingRectangle.PointingRectangle, "UM", 1, 0, "PointingRectangle") qmlRegisterType(ExtensionModel.ExtensionModel, "UM", 1, 0, "ExtensionModel") - qmlRegisterType(PluginsModel.PluginsModel, "UM", 1, 0, "PluginsModel") qmlRegisterType(VisibleMessagesModel.VisibleMessagesModel, "UM", 1, 0, "VisibleMessagesModel") # Singleton proxy objects qmlRegisterSingletonType(ControllerProxy.ControllerProxy, "UM", 1, 0, "Controller", Bindings.createControllerProxy) qmlRegisterSingletonType(ApplicationProxy.ApplicationProxy, "UM", 1, 0, "Application", Bindings.createApplicationProxy) qmlRegisterSingletonType(BackendProxy.BackendProxy, "UM", 1, 0, "Backend", Bindings.createBackendProxy) - qmlRegisterSingletonType(SceneProxy.SceneProxy, "UM", 1, 0, "Scene", Bindings.createSceneProxy) qmlRegisterSingletonType(ResourcesProxy.ResourcesProxy, "UM", 1, 0, "Resources", Bindings.createResourcesProxy) qmlRegisterSingletonType(OperationStackProxy.OperationStackProxy, "UM", 1, 0, "OperationStack", Bindings.createOperationStackProxy) qmlRegisterSingletonType(MeshFileHandler, "UM", 1, 0, "MeshFileHandler", MeshFileHandler.getInstance) qmlRegisterSingletonType(PreferencesProxy.PreferencesProxy, "UM", 1, 0, "Preferences", PreferencesProxy.createPreferencesProxy) qmlRegisterSingletonType(Theme.Theme, "UM", 1, 0, "Theme", Theme.createTheme) qmlRegisterSingletonType(ActiveToolProxy.ActiveToolProxy, "UM", 1, 0, "ActiveTool", ActiveToolProxy.createActiveToolProxy) - qmlRegisterSingletonType(ActiveViewProxy.ActiveViewProxy, "UM", 1, 0, "ActiveView", ActiveViewProxy.createActiveViewProxy) qmlRegisterSingletonType(SelectionProxy.SelectionProxy, "UM", 1, 0, "Selection", SelectionProxy.createSelectionProxy) qmlRegisterUncreatableType(Duration, "UM", 1, 0, "Duration", "") @@ -112,7 +100,6 @@ qmlRegisterType(SettingPropertyProvider, "UM", 1, 2, "SettingPropertyProvider") qmlRegisterType(SettingPreferenceVisibilityHandler, "UM", 1, 2, "SettingPreferenceVisibilityHandler") qmlRegisterType(ContainerPropertyProvider, "UM", 1, 2, "ContainerPropertyProvider") - qmlRegisterType(MeshListModel.MeshListModel, "UM", 1, 2, "MeshListModel") # Additions after 2.3; qmlRegisterSingletonType(WorkspaceFileHandler, "UM", 1, 3, "WorkspaceFileHandler", WorkspaceFileHandler.getInstance) @@ -120,3 +107,7 @@ # Additions after 3.1 qmlRegisterType(StageModel.StageModel, "UM", 1, 4, "StageModel") + + @staticmethod + def addRegisterType(class_type: type, qml_import_name: str, major_version: int, minor_version: int, class_name: str) -> None: + qmlRegisterType(class_type, qml_import_name, major_version, minor_version, class_name) diff -Nru uranium-3.3.0/UM/Qt/Bindings/ContainerProxy.py uranium-4.4.1/UM/Qt/Bindings/ContainerProxy.py --- uranium-3.3.0/UM/Qt/Bindings/ContainerProxy.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Qt/Bindings/ContainerProxy.py 2019-11-19 10:50:46.000000000 +0000 @@ -20,6 +20,10 @@ def getValue(self, value): return self._container.get(value, None) + @pyqtSlot(str, result="QVariantList") + def getValueList(self, value): + return self._container.get(value, None) + @pyqtSlot(str, "QVariant") def setValue(self, key, value): self._container[key] = value diff -Nru uranium-3.3.0/UM/Qt/Bindings/ControllerProxy.py uranium-4.4.1/UM/Qt/Bindings/ControllerProxy.py --- uranium-3.3.0/UM/Qt/Bindings/ControllerProxy.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Qt/Bindings/ControllerProxy.py 2019-11-19 10:50:46.000000000 +0000 @@ -1,13 +1,15 @@ # Copyright (c) 2015 Ultimaker B.V. # Uranium is released under the terms of the LGPLv3 or higher. -from PyQt5.QtCore import QObject, QCoreApplication, pyqtSlot, QUrl, pyqtSignal, pyqtProperty +from PyQt5.QtCore import QObject, pyqtSlot, pyqtSignal, pyqtProperty from UM.Application import Application +from UM.Decorators import deprecated from UM.Scene.Selection import Selection from UM.Operations.RemoveSceneNodeOperation import RemoveSceneNodeOperation from UM.Operations.GroupedOperation import GroupedOperation + class ControllerProxy(QObject): def __init__(self, parent = None): super().__init__(parent) @@ -20,9 +22,11 @@ self._controller.toolOperationStarted.connect(self._onToolOperationStarted) self._controller.toolOperationStopped.connect(self._onToolOperationStopped) self._controller.activeStageChanged.connect(self._onActiveStageChanged) + self._controller.activeViewChanged.connect(self._onActiveViewChanged) toolsEnabledChanged = pyqtSignal() activeStageChanged = pyqtSignal() + activeViewChanged = pyqtSignal() @pyqtProperty(bool, notify = toolsEnabledChanged) def toolsEnabled(self): @@ -36,6 +40,10 @@ def setActiveView(self, view): self._controller.setActiveView(view) + @pyqtProperty(QObject, notify = activeViewChanged) + def activeView(self): + return self._controller.getActiveView() + @pyqtSlot(str) def setActiveStage(self, stage): self._controller.setActiveStage(stage) @@ -55,21 +63,17 @@ op.push() Selection.clear() - @pyqtSlot() - def enableModelRendering(self): - self._controller.enableModelRendering() - - @pyqtSlot() - def disableModelRendering(self): - self._controller.disableModelRendering() - @pyqtSlot(str, int) - def rotateView(self,coordinate, angle): - self._controller.rotateView(coordinate, angle) + def setCameraRotation(self, coordinate: str, angle: int) -> None: + self._controller.setCameraRotation(coordinate, angle) - @pyqtSlot() - def homeView(self, angle): - self._controller.homeView() + ## Changes the position of the origin of the camera. + # \param coordinate The new origin of the camera. Use either: + # "home": The centre of the build plate. + # "3d": The centre of the build volume. + @pyqtSlot(str) + def setCameraOrigin(self, coordinate: str) -> None: + self._controller.setCameraOrigin(coordinate) contextMenuRequested = pyqtSignal("quint64", arguments=["objectId"]) @@ -96,3 +100,6 @@ def _onActiveStageChanged(self): self.activeStageChanged.emit() + + def _onActiveViewChanged(self): + self.activeViewChanged.emit() diff -Nru uranium-3.3.0/UM/Qt/Bindings/DirectoryListModel.py uranium-4.4.1/UM/Qt/Bindings/DirectoryListModel.py --- uranium-3.3.0/UM/Qt/Bindings/DirectoryListModel.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Qt/Bindings/DirectoryListModel.py 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -# Copyright (c) 2015 Ultimaker B.V. -# Uranium is released under the terms of the LGPLv3 or higher. - -from UM.Qt.ListModel import ListModel -from UM.Application import Application - -from PyQt5.QtCore import Qt, pyqtProperty, pyqtSignal, QUrl - -import os -import os.path -import platform - -class DirectoryListModel(ListModel): - NameRole = Qt.UserRole + 1 - UrlRole = Qt.UserRole + 2 - - def __init__(self): - super().__init__() - - self.addRoleName(self.NameRole, "name") - self.addRoleName(self.UrlRole, "url") - - self._directory = None - - directoryChanged = pyqtSignal() - - def getDirectory(self): - return self._directory - - def setDirectory(self, path): - if path != self._directory: - if path.startswith("file://"): - if platform.system() == "Windows" and path.startswith("file:///"): - path = path[8:] - else: - path = path[7:] - self._directory = os.path.dirname(path) - - items = [] - extensions = Application.getInstance().getMeshFileHandler().getSupportedFileTypesRead() - for entry in os.listdir(self._directory): - if os.path.splitext(entry)[1] in extensions: - items.append({ "name": os.path.basename(entry), "url": QUrl.fromLocalFile(os.path.join(self._directory, entry)) }) - - items.sort(key = lambda e: e["name"]) - self.setItems(items) - - directory = pyqtProperty(str, fget = getDirectory, fset = setDirectory, notify = directoryChanged) diff -Nru uranium-3.3.0/UM/Qt/Bindings/i18nCatalogProxy.py uranium-4.4.1/UM/Qt/Bindings/i18nCatalogProxy.py --- uranium-3.3.0/UM/Qt/Bindings/i18nCatalogProxy.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Qt/Bindings/i18nCatalogProxy.py 2019-11-19 10:50:46.000000000 +0000 @@ -3,21 +3,21 @@ import inspect -from PyQt5.QtCore import pyqtProperty, pyqtSignal, QObject, QUrl, QCoreApplication, pyqtSlot +from PyQt5.QtCore import pyqtProperty, pyqtSignal, QObject, QCoreApplication, pyqtSlot from PyQt5.QtQml import QJSValue -# from UM.FlameProfiler import pyqtSlot from UM.i18n import i18nCatalog + class i18nCatalogProxy(QObject): # [CodeStyle: Ultimaker code style requires classes to start with a upper case. But i18n is lower case by convention.] def __init__(self, parent = None): - super().__init__() + super().__init__(parent) self._name = None self._catalog = None # Slightly hacky way of getting at the QML engine defined by QtApplication. - engine = QCoreApplication.instance()._engine + engine = QCoreApplication.instance()._qml_engine self._i18n_function = self._wrapFunction(engine, self, self._call_i18n) self._i18nc_function = self._wrapFunction(engine, self, self._call_i18nc) @@ -86,13 +86,14 @@ # \todo Move this to a more generic place so more things can use it. def _wrapFunction(self, engine, this_object, function): # JavaScript code that wraps the Python method call in a closure - wrap_js = """function(this_object) {{ + wrap_js = """(function(this_object) {{ return function({args}) {{ return this_object.{function}({args}) }} - }}""" + }})""" # Get the function name and argument list. function_name = function.__name__ - function_args = inspect.getargspec(function)[0] + function_args = inspect.getfullargspec(function)[0] + if function_args[0] == "self": function_args = function_args[1:] # Drop "self" from argument list diff -Nru uranium-3.3.0/UM/Qt/Bindings/MainWindow.py uranium-4.4.1/UM/Qt/Bindings/MainWindow.py --- uranium-3.3.0/UM/Qt/Bindings/MainWindow.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Qt/Bindings/MainWindow.py 2019-11-19 10:50:46.000000000 +0000 @@ -1,4 +1,4 @@ -# Copyright (c) 2015 Ultimaker B.V. +# Copyright (c) 2018 Ultimaker B.V. # Uranium is released under the terms of the LGPLv3 or higher. from PyQt5.QtCore import pyqtProperty, Qt, QCoreApplication, pyqtSignal, pyqtSlot, QMetaObject, QRectF @@ -9,14 +9,10 @@ from UM.Qt.QtMouseDevice import QtMouseDevice from UM.Qt.QtKeyDevice import QtKeyDevice from UM.Application import Application -from UM.Preferences import Preferences from UM.Signal import Signal, signalemitter - +from UM.Scene.Camera import Camera from typing import Optional -MYPY = False -if MYPY: - from PyQt5.QtQuick import QQuickItem ## QQuickWindow subclass that provides the main window. @signalemitter @@ -44,13 +40,20 @@ self._app.getController().addInputDevice(self._mouse_device) self._app.getController().addInputDevice(self._key_device) self._app.getController().getScene().sceneChanged.connect(self._onSceneChanged) - self._preferences = Preferences.getInstance() + self._preferences = Application.getInstance().getPreferences() self._preferences.addPreference("general/window_width", 1280) self._preferences.addPreference("general/window_height", 720) self._preferences.addPreference("general/window_left", 50) self._preferences.addPreference("general/window_top", 50) self._preferences.addPreference("general/window_state", Qt.WindowNoState) + self._preferences.addPreference("general/restore_window_geometry", True) + + if not self._preferences.getValue("general/restore_window_geometry"): + self._preferences.resetPreference("general/window_width") + self._preferences.resetPreference("general/window_height") + self._preferences.resetPreference("general/window_left") + self._preferences.resetPreference("general/window_top") # Restore window geometry self.setWidth(int(self._preferences.getValue("general/window_width"))) @@ -74,11 +77,18 @@ self._viewport_rect = QRectF(0, 0, 1.0, 1.0) + self.closing.connect(self.preClosing) + Application.getInstance().setMainWindow(self) self._fullscreen = False self._allow_resize = True + # This event is triggered before hideEvent(self, event) event and might prevent window closing if + # does not pass the check, for example if USB printer is printing + # The implementation is in Cura.qml + preClosing = pyqtSignal("QQuickCloseEvent*", arguments = ["close"]) + def setAllowResize(self, allow_resize: bool): if self._allow_resize != allow_resize: if not allow_resize: @@ -101,6 +111,11 @@ self.setVisibility(QQuickWindow.FullScreen) # Go to fullscreen self._fullscreen = not self._fullscreen + @pyqtSlot() + def exitFullscreen(self): + self.setVisibility(QQuickWindow.Windowed) + self._fullscreen = False + def getBackgroundColor(self): return self._background_color @@ -152,7 +167,7 @@ self._mouse_x = event.x() self._mouse_y = event.y() - if self._mouse_pressed and self._app.getController().isModelRenderingEnabled(): + if self._mouse_pressed: self.mousePositionChanged.emit() super().mouseMoveEvent(event) @@ -224,14 +239,13 @@ @pyqtSlot() def _onWindowGeometryChanged(self): - if self.windowState() == Qt.WindowNoState: - self._preferences.setValue("general/window_width", self.width()) - self._preferences.setValue("general/window_height", self.height()) - self._preferences.setValue("general/window_left", self.x()) - self._preferences.setValue("general/window_top", self.y()) - self._preferences.setValue("general/window_state", Qt.WindowNoState) - elif self.windowState() == Qt.WindowMaximized: - self._preferences.setValue("general/window_state", Qt.WindowMaximized) + self._preferences.setValue("general/window_width", self.width()) + self._preferences.setValue("general/window_height", self.height()) + self._preferences.setValue("general/window_left", self.x()) + self._preferences.setValue("general/window_top", self.y()) + # This is a workaround for QTBUG-30085 + if self.windowState() in (Qt.WindowNoState, Qt.WindowMaximized): + self._preferences.setValue("general/window_state", self.windowState()) def _updateViewportGeometry(self, width: int, height: int): view_width = width * self._viewport_rect.width() @@ -242,13 +256,8 @@ if camera.getAutoAdjustViewPort(): camera.setViewportSize(view_width, view_height) - projection_matrix = Matrix() - if camera.isPerspective(): - if view_width is not 0: - projection_matrix.setPerspective(30, view_width / view_height, 1, 500) - else: - projection_matrix.setOrtho(-view_width / 2, view_width / 2, -view_height / 2, view_height / 2, -500, 500) - camera.setProjectionMatrix(projection_matrix) self._app.getRenderer().setViewportSize(view_width, view_height) self._app.getRenderer().setWindowSize(width, height) + + diff -Nru uranium-3.3.0/UM/Qt/Bindings/MeshFileHandlerProxy.py uranium-4.4.1/UM/Qt/Bindings/MeshFileHandlerProxy.py --- uranium-3.3.0/UM/Qt/Bindings/MeshFileHandlerProxy.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Qt/Bindings/MeshFileHandlerProxy.py 1970-01-01 00:00:00.000000000 +0000 @@ -1,83 +0,0 @@ -# Copyright (c) 2015 Ultimaker B.V. -# Uranium is released under the terms of the LGPLv3 or higher. - -from PyQt5.QtCore import QObject, pyqtSlot, pyqtProperty, pyqtSignal, QUrl -from PyQt5.QtGui import QDesktopServices - -from UM.Application import Application -from UM.Logger import Logger -from UM.Scene.Iterator.DepthFirstIterator import DepthFirstIterator -from UM.Scene.SceneNode import SceneNode -from UM.Scene.PointCloudNode import PointCloudNode -from UM.Mesh.MeshData import MeshType -from UM.Mesh.ReadMeshJob import ReadMeshJob -from UM.Mesh.WriteMeshJob import WriteMeshJob -from UM.Operations.AddSceneNodeOperation import AddSceneNodeOperation -from UM.Message import Message - -from UM.Decorators import deprecated - -import os.path -import platform - -from UM.i18n import i18nCatalog -i18n_catalog = i18nCatalog("uranium") - -class MeshFileHandlerProxy(QObject): - @deprecated("MeshFileHandlerProxy is no longer required. Use MeshFileHandler directly", "2.4") - def __init__(self, parent = None): - super().__init__(parent) - self._mesh_handler = Application.getInstance().getMeshFileHandler() - self._scene = Application.getInstance().getController().getScene() - - @pyqtProperty("QStringList", constant=True) - def supportedReadFileTypes(self): - file_types = [] - all_types = [] - - if platform.system() == "Linux": - for ext, desc in self._mesh_handler.getSupportedFileTypesRead().items(): - file_types.append("{0} (*.{1} *.{2})".format(desc, ext.lower(), ext.upper())) - all_types.append("*.{0} *.{1}".format(ext.lower(), ext.upper())) - else: - for ext, desc in self._mesh_handler.getSupportedFileTypesRead().items(): - file_types.append("{0} (*.{1})".format(desc, ext)) - all_types.append("*.{0}".format(ext)) - - file_types.sort() - file_types.insert(0, i18n_catalog.i18nc("@item:inlistbox", "All Supported Types ({0})", " ".join(all_types))) - file_types.append(i18n_catalog.i18nc("@item:inlistbox", "All Files (*)")) - - return file_types - - @pyqtProperty("QStringList", constant=True) - def supportedWriteFileTypes(self): - file_types = [] - - for item in self._mesh_handler.getSupportedFileTypesWrite(): - file_types.append("{0} (*.{1})".format(item["description"], item["extension"])) - - file_types.sort() - - return file_types - - @pyqtSlot(QUrl) - def readLocalFile(self, file): - if not file.isValid(): - return - job = ReadMeshJob(file.toLocalFile()) - job.finished.connect(self._readMeshFinished) - job.start() - - def _readMeshFinished(self, job): - nodes = job.getResult() - for node in nodes: - node.setSelectable(True) - node.setName(os.path.basename(job.getFileName())) - - op = AddSceneNodeOperation(node, self._scene.getRoot()) - op.push() - self._scene.sceneChanged.emit(node) - -def createMeshFileHandlerProxy(engine, script_engine): - return MeshFileHandlerProxy() diff -Nru uranium-3.3.0/UM/Qt/Bindings/MeshListModel.py uranium-4.4.1/UM/Qt/Bindings/MeshListModel.py --- uranium-3.3.0/UM/Qt/Bindings/MeshListModel.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Qt/Bindings/MeshListModel.py 1970-01-01 00:00:00.000000000 +0000 @@ -1,282 +0,0 @@ -# Copyright (c) 2015 Ultimaker B.V. -# Uranium is released under the terms of the LGPLv3 or higher. - -from PyQt5.QtCore import Qt, QUrl -from UM.FlameProfiler import pyqtSlot -from UM.Qt.ListModel import ListModel -from UM.Application import Application -from UM.Scene.Selection import Selection -from UM.Operations.RemoveSceneNodeOperation import RemoveSceneNodeOperation -from UM.Scene.Iterator.DepthFirstIterator import DepthFirstIterator -from UM.Scene.SceneNode import SceneNode -from UM.Scene.PointCloudNode import PointCloudNode - -class MeshListModel(ListModel): - NameRole = Qt.UserRole + 1 #Label - VisibilityRole = Qt.UserRole + 2 - UniqueKeyRole = Qt.UserRole + 3 - SelectedRole = Qt.UserRole + 4 - CollapsedRole = Qt.UserRole + 5 - IsGroupRole = Qt.UserRole + 6 - IsDummyRole = Qt.UserRole + 7 - - def __init__(self, parent = None): - super().__init__(parent) - self._collapsed_nodes = [] - self._scene = Application.getInstance().getController().getScene() - self.updateList(self._scene.getRoot()) - self._scene.getRoot().childrenChanged.connect(self._onNodeAdded) - self.addRoleName(self.NameRole,"name") - self.addRoleName(self.VisibilityRole, "visibility") - self.addRoleName(self.UniqueKeyRole, "key") - self.addRoleName(self.SelectedRole, "selected") - self.addRoleName(self.CollapsedRole,"collapsed") - self.addRoleName(self.IsGroupRole,"is_group") - self.addRoleName(self.IsDummyRole, "is_dummy") - self._scene.rootChanged.connect(self._rootChanged) - Selection.selectionChanged.connect(self._onSelectionChanged) - - def _onNodeAdded(self, node): - self.updateList(node) - - def _onSelectionChanged(self): - self.updateList(self._scene.getRoot()) - - def _rootChanged(self): - self._scene.getRoot().childrenChanged.connect(self.updateList) - self.updateList(self._scene.getRoot()) # Manually trigger the update - - @pyqtSlot("long",int) - def moveItem(self, key, new_index): - for node in Application.getInstance().getController().getScene().getRoot().getAllChildren(): - if id(node) == key: - # Found moved node. - old_index = self.find("key",key) - if old_index == new_index: # No change. - return - - new_model_entry = self.getItem(new_index) # Model data of location node should move to. - - for parent_node in Application.getInstance().getController().getScene().getRoot().getAllChildren(): - if id(parent_node) == new_model_entry["parent_key"]: - # Found group the object is moving to. - group_move = False - if id(node.getParent()) != id(parent_node): - if new_model_entry["is_group"]: - if old_index > new_index: - # Node was moved onto a group entry, and it was moved from a higher index. - # This means that it needs to move outside of that group and one index lower as the group it moved on. - node.setParent(self._scene.getRoot()) - children = self._scene.getRoot().getChildren() - new_index = children.index(parent_node) # Take the old place of the group node - children.insert(new_index, node) - old_index = [i for i, child in enumerate(children) if child == node and i != new_index][0] - - del children[old_index] - self.updateList(node) - return - - group_move = True - # Move to different group. - node.setParent(parent_node) - self.removeItem(old_index) # Remove 'old' (now moved) item - if parent_node not in self._collapsed_nodes and node in self._collapsed_nodes: - self._collapsed_nodes.remove(node) - if parent_node in self._collapsed_nodes and node not in self._collapsed_nodes: - self._collapsed_nodes.append(node) - else: - # Node was moved within same group; - if new_model_entry["is_group"]: - # A node was moved onto it's own parent. This means that the parent needs to be set to Root - node.setParent(self._scene.getRoot()) - children = self._scene.getRoot().getChildren() - new_index = children.index(parent_node) # Take the old place of the group node - children.insert(new_index, node) - old_index = [i for i, child in enumerate(children) if child == node and i != new_index][0] - - del children[old_index] - self.updateList(node) - return - - # Magical move - for node2 in Application.getInstance().getController().getScene().getRoot().getAllChildren(): - if id(node2) == new_model_entry["key"]: - # Ensure that items within a group are in the correct order. - children = parent_node.getChildren() - - if node2 == parent_node: - a , b = self.find("key",(id(children[0]))), self.find("key",(id(children[-1]))) - children.insert(0, children[-1]) - children.pop() - - else: - new_index = children.index(node2) - if new_index > children.index(node) or (group_move and False): - new_index += 1 - children.insert(new_index, node) - old_index = [i for i, child in enumerate(children) if child == node and i != new_index][0] - del children[old_index] - break - - else: - # Switch happend to dummy? - if old_index < new_index: - # Move is such that parent needs to be reset. - node.setParent(self._scene.getRoot()) - children = self._scene.getRoot().getChildren() - new_index = children.index(parent_node) + 1 - children.insert(new_index, node) - old_index = [i for i, child in enumerate(children) if child == node and i != new_index][0] - del children[old_index] - - self.updateList(node) - break - - def updateList(self, trigger_node): - self.clear() - for root_child in self._scene.getRoot().getChildren(): - if root_child.callDecoration("isGroup"): # Check if its a group node - parent_key = id(root_child) - for node in DepthFirstIterator(root_child): - if root_child in self._collapsed_nodes: - self._collapsed_nodes.append(node) - - data = {"name":node.getName(), - "visibility": node.isVisible(), - "key": (id(node)), - "selected": Selection.isSelected(node), - "collapsed": node in self._collapsed_nodes, - "parent_key": parent_key, - "is_group": bool(node.callDecoration("isGroup")), - "is_dummy": False - } - self.appendItem(data) - data = { "name": "Dummy " + root_child.getName(), - "visibility": True, - "key": 0, - "selected": Selection.isSelected(node), - "collapsed": root_child in self._collapsed_nodes, - "parent_key": parent_key, - "is_group": False, - "is_dummy": True - } - self.appendItem(data) - - elif type(root_child) is SceneNode or type(root_child) is PointCloudNode: # Item is not a group node. - data = {"name":root_child.getName(), - "visibility": root_child.isVisible(), - "key": (id(root_child)), - "selected": Selection.isSelected(root_child), - "collapsed": root_child in self._collapsed_nodes, - "parent_key": 0, - "is_group":bool(root_child.callDecoration("isGroup")), - "is_dummy" : False - } - - # Check if data exists, if yes, remove old and re-add. - index = self.find("key",(id(root_child))) - if index is not None and index >= 0: - self.removeItem(index) - self.insertItem(index,data) - else: - self.appendItem(data) - - # set the visibility of a node (by key) - @pyqtSlot("long",bool) - def setVisibility(self, key, visibility): - for node in self._scene.getRoot().getAllChildren(): - if id(node) == key: - node.setVisible(visibility) - - @pyqtSlot("long",str) - def setName(self, key, name): - for index in range(0,len(self.items)): - if self.items[index]["key"] == key: - for node in Application.getInstance().getController().getScene().getRoot().getAllChildren(): - if id(node) == key: - node.setName(name) - - #Set a single item to be selected, by key - @pyqtSlot("long") - def setSelected(self, key): - for index in range(0,len(self.items)): - if self.items[index]["key"] == key: - for node in Application.getInstance().getController().getScene().getRoot().getAllChildren(): - if id(node) == key: - if node not in Selection.getAllSelectedObjects(): #node already selected - Selection.add(node) - if node.callDecoration("isGroup"): #Its a group node - for child_node in node.getChildren(): - if child_node not in Selection.getAllSelectedObjects(): #Set all children to parent state (if they arent already) - Selection.add(child_node) - else: - Selection.remove(node) - if node.callDecoration("isGroup"): #Its a group - for child_node in node.getChildren(): - if child_node in Selection.getAllSelectedObjects(): - Selection.remove(child_node) - - all_children_selected = True - #Check all group nodes to see if all their children are selected (if so, they also need to be selected!) - for index in range(0,len(self.items)): - if self.items[index]["is_group"]: - for node in Application.getInstance().getController().getScene().getRoot().getAllChildren(): - if node.hasChildren(): - if id(node) == self.items[index]["key"] and id(node) != key: - for index, child_node in enumerate(node.getChildren()): - if not Selection.isSelected(child_node): - all_children_selected = False #At least one of its children is not selected, dont change state - break - if all_children_selected: - Selection.add(node) - else: - Selection.remove(node) - #Force update - self.updateList(Application.getInstance().getController().getScene().getRoot()) - - @pyqtSlot(str) - def setCollapsed(self,key): - for index in range(0, len(self.items)): - item = self.items[index] - if int(item["parent_key"]) == int(key) or int(item["key"]) == int(key): - self.setProperty(index, "collapsed", not item["collapsed"]) - for node in Application.getInstance().getController().getScene().getRoot().getAllChildren(): - if int(item["key"]) == id(node): - if node not in self._collapsed_nodes: - self._collapsed_nodes.append(node) - else: - self._collapsed_nodes.remove(node) - - @pyqtSlot("long", QUrl) - def saveMesh(self, key, file_url): - for node in Application.getInstance().getController().getScene().getRoot().getAllChildren(): - if id(node) == key: - Application.getInstance().getMeshFileHandler().write(file_url.toLocalFile(), Application.getInstance().getStorageDevice("LocalFileStorage"), node.getMeshDataTransformed()) - - - #Remove mesh by key (triggered by context menu) - @pyqtSlot("long") - def removeMesh(self, key): - for node in Application.getInstance().getController().getScene().getRoot().getAllChildren(): - if id(node) == key: - op = RemoveSceneNodeOperation(node) - op.push() - break - - @pyqtSlot() - def removeSelected(self): - keys_to_be_removed = [] - nodes_to_be_removed = [] - for item in self.items: - if item["selected"]: - keys_to_be_removed.append(item["key"]) - for node in Application.getInstance().getController().getScene().getRoot().getAllChildren(): - if id(node) in keys_to_be_removed: - nodes_to_be_removed.append(node) - - if len(nodes_to_be_removed): - op = RemoveSceneNodesOperation(nodes_to_be_removed) - op.push() - - - diff -Nru uranium-3.3.0/UM/Qt/Bindings/OutputDeviceManagerProxy.py uranium-4.4.1/UM/Qt/Bindings/OutputDeviceManagerProxy.py --- uranium-3.3.0/UM/Qt/Bindings/OutputDeviceManagerProxy.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Qt/Bindings/OutputDeviceManagerProxy.py 2019-11-19 10:50:46.000000000 +0000 @@ -2,71 +2,86 @@ # Uranium is released under the terms of the LGPLv3 or higher. from PyQt5.QtCore import QObject, pyqtProperty, pyqtSignal, pyqtSlot -from typing import List +from typing import List, Mapping, Optional, TYPE_CHECKING from UM.Application import Application from UM.i18n import i18nCatalog -from UM.Scene.SceneNode import SceneNode -from UM.Scene.Selection import Selection +from UM.Logger import Logger from UM.Message import Message from UM.OutputDevice import OutputDeviceError -from UM.Logger import Logger +import UM.Qt.QtApplication +from UM.Scene.SceneNode import SceneNode +from UM.Scene.Selection import Selection + +if TYPE_CHECKING: + from PyQt5.QtQml import QQmlEngine, QJSEngine + from UM.FileHandler.FileHandler import FileHandler + from UM.OutputDevice.OutputDeviceManager import OutputDeviceManager catalog = i18nCatalog("uranium") + class OutputDeviceManagerProxy(QObject): - def __init__(self, parent = None): + def __init__(self, parent = None) -> None: super().__init__(parent) - self._device_manager = Application.getInstance().getOutputDeviceManager() + self._device_manager = Application.getInstance().getOutputDeviceManager() #type: OutputDeviceManager self._device_manager.activeDeviceChanged.connect(self._onActiveDeviceChanged) self._onActiveDeviceChanged() activeDeviceChanged = pyqtSignal() @pyqtProperty(str, notify = activeDeviceChanged) - def activeDevice(self): + def activeDevice(self) -> str: return self._device_manager.getActiveDevice().getId() @pyqtSlot(str) - def setActiveDevice(self, device_id): + def setActiveDevice(self, device_id: str) -> None: self._device_manager.setActiveDevice(device_id) @pyqtProperty(str, notify = activeDeviceChanged) - def activeDeviceName(self): + def activeDeviceName(self) -> str: return self._device_manager.getActiveDevice().getName() @pyqtProperty(str, notify = activeDeviceChanged) - def activeDeviceIconName(self): + def activeDeviceIconName(self) -> str: return self._device_manager.getActiveDevice().getIconName() @pyqtProperty(str, notify = activeDeviceChanged) - def activeDeviceShortDescription(self): + def activeDeviceShortDescription(self) -> str: return self._device_manager.getActiveDevice().getShortDescription() @pyqtProperty(str, notify = activeDeviceChanged) - def activeDeviceDescription(self): + def activeDeviceDescription(self) -> str: return self._device_manager.getActiveDevice().getDescription() + @pyqtSlot() + def startDiscovery(self) -> None: + return self._device_manager.startDiscovery() + + @pyqtSlot() + def refreshConnections(self) -> None: + return self._device_manager.refreshConnections() + ## Request that the current scene is written to the output device. # # The output device to write with will be selected based on the device_id. # A file format is chosen from the list of available file formats by the # output device. # - # \param device_id \type{string} The handle of the device to write to. - # \param file_name \type{string} A suggestion for the file name to write + # \param device_id The handle of the device to write to. + # \param file_name A suggestion for the file name to write # to. Can be freely ignored if providing a file name makes no sense. # \param kwargs Keyword arguments: # limit_mimetypes: Limit the possible mimetypes to use for writing to these types. @pyqtSlot(str, str, "QVariantMap") - def requestWriteToDevice(self, device_id, file_name, kwargs): + def requestWriteToDevice(self, device_id: str, file_name: str, kwargs: Mapping[str, str]) -> None: limit_mimetypes = kwargs.get("limit_mimetypes", None) file_type = kwargs.get("file_type", "mesh") - preferred_mimetype = kwargs.get("preferred_mimetype", None) + preferred_mimetypes = kwargs.get("preferred_mimetypes", None) # On Windows, calling requestWrite() on LocalFileOutputDevice crashes when called from a signal # handler attached to a QML MenuItem. So instead, defer the call to the next run of the event # loop, since that does work. - Application.getInstance().callLater(self._writeToDevice, [Application.getInstance().getController().getScene().getRoot()], device_id, file_name, limit_mimetypes, file_type, preferred_mimetype = preferred_mimetype) + Application.getInstance().callLater(self._writeToDevice, [Application.getInstance().getController().getScene().getRoot()], device_id, file_name, limit_mimetypes, file_type, preferred_mimetypes = preferred_mimetypes) ## Request that the current selection is written to the output device. # @@ -74,24 +89,24 @@ # A file format is chosen from the list of available file formats by the # output device. # - # \param device_id \type{string} The handle of the device to write to. - # \param file_name \type{string} A suggestion for the file name to write + # \param device_id The handle of the device to write to. + # \param file_name A suggestion for the file name to write # to. Can be freely ignored if providing a file name makes no sense. # \param kwargs Keyword arguments: # limit_mimetypes: Limit the possible mimetypes to use for writing to these types. @pyqtSlot(str, str, "QVariantMap") - def requestWriteSelectionToDevice(self, device_id, file_name, kwargs): + def requestWriteSelectionToDevice(self, device_id: str, file_name: str, kwargs: Mapping[str, str]) -> None: if not Selection.hasSelection(): return limit_mimetypes = kwargs.get("limit_mimetypes", False) - preferred_mimetype = kwargs.get("preferred_mimetype", None) + preferred_mimetypes = kwargs.get("preferred_mimetypes", None) # On Windows, calling requestWrite() on LocalFileOutputDevice crashes when called from a signal # handler attached to a QML MenuItem. So instead, defer the call to the next run of the event # loop, since that does work. - Application.getInstance().callLater(self._writeToDevice, Selection.getAllSelectedObjects(), device_id, file_name, limit_mimetypes, preferred_mimetype = preferred_mimetype) + Application.getInstance().callLater(self._writeToDevice, Selection.getAllSelectedObjects(), device_id, file_name, limit_mimetypes, preferred_mimetypes = preferred_mimetypes) - def _onActiveDeviceChanged(self): + def _onActiveDeviceChanged(self) -> None: self.activeDeviceChanged.emit() ## Writes the specified node to the output device. @@ -106,17 +121,15 @@ # to. Can be freely ignored if providing a file name makes no sense. # \param limit_mimetypes: Limit the possible mimetypes to use for writing to these types. # \param file_type What file handler to get the writer from. - def _writeToDevice(self, nodes: List[SceneNode], device_id: str, file_name: str, limit_mimetypes: bool, file_type: str = "mesh", **kwargs): + def _writeToDevice(self, nodes: List[SceneNode], device_id: str, file_name: str, limit_mimetypes: bool, file_type: str = "mesh", **kwargs) -> None: device = self._device_manager.getOutputDevice(device_id) if not device: return + file_handler = None #type: Optional[FileHandler] if file_type == "mesh": - file_handler = Application.getInstance().getMeshFileHandler() + file_handler = UM.Qt.QtApplication.QtApplication.getInstance().getMeshFileHandler() elif file_type == "workspace": - file_handler = Application.getInstance().getWorkspaceFileHandler() - else: - # Unrecognised type - file_handler = None + file_handler = UM.Qt.QtApplication.QtApplication.getInstance().getWorkspaceFileHandler() try: device.requestWrite(nodes, file_name, limit_mimetypes, file_handler, **kwargs) @@ -131,5 +144,5 @@ Logger.logException("e", "Unable to write to file %s: %s", file_name, e) -def createOutputDeviceManagerProxy(engine, script_engine): +def createOutputDeviceManagerProxy(engine: "QQmlEngine", script_engine: "QJSEngine") -> OutputDeviceManagerProxy: return OutputDeviceManagerProxy() diff -Nru uranium-3.3.0/UM/Qt/Bindings/OutputDevicesModel.py uranium-4.4.1/UM/Qt/Bindings/OutputDevicesModel.py --- uranium-3.3.0/UM/Qt/Bindings/OutputDevicesModel.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Qt/Bindings/OutputDevicesModel.py 2019-11-19 10:50:46.000000000 +0000 @@ -1,13 +1,13 @@ -# Copyright (c) 2015 Ultimaker B.V. +# Copyright (c) 2018 Ultimaker B.V. # Uranium is released under the terms of the LGPLv3 or higher. from PyQt5.QtCore import Qt, pyqtSlot, pyqtProperty, pyqtSignal from UM.Application import Application from UM.Qt.ListModel import ListModel -from UM.OutputDevice import OutputDeviceError -import time +from PyQt5.QtQml import QQmlEngine + ## A list model providing a list of all registered OutputDevice instances. # @@ -32,6 +32,8 @@ def __init__(self, parent = None): super().__init__(parent) + # Ensure that this model doesn't get garbage collected (Now the bound object is destroyed when the wrapper is) + QQmlEngine.setObjectOwnership(self, QQmlEngine.CppOwnership) self._device_manager = Application.getInstance().getOutputDeviceManager() self.addRoleName(self.IdRole, "id") @@ -56,10 +58,14 @@ @pyqtProperty(int, notify = outputDevicesChanged) def deviceCount(self): - return self.rowCount() + return self.count def _update(self): - self.beginResetModel() + try: + self.beginResetModel() + except RuntimeError: + # Don't break if the object was garbage collected. + return self._items.clear() devices = self._device_manager.getOutputDevices() diff -Nru uranium-3.3.0/UM/Qt/Bindings/PluginsModel.py uranium-4.4.1/UM/Qt/Bindings/PluginsModel.py --- uranium-3.3.0/UM/Qt/Bindings/PluginsModel.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Qt/Bindings/PluginsModel.py 1970-01-01 00:00:00.000000000 +0000 @@ -1,89 +0,0 @@ -# Copyright (c) 2015 Ultimaker B.V. -# Uranium is released under the terms of the LGPLv3 or higher. - -import os - -from PyQt5.QtCore import Qt, QCoreApplication, pyqtSlot - -from UM.Application import Application -from UM.Qt.ListModel import ListModel -from UM.Logger import Logger -from UM.PluginRegistry import PluginRegistry -from UM.Resources import Resources - -class PluginsModel(ListModel): - def __init__(self, parent = None, view = "installed"): - super().__init__(parent) - - self._registry = Application.getInstance().getPluginRegistry() - self._required_plugins = Application.getInstance().getRequiredPlugins() - - # Static props: - # These should be defined in plugin.json and are read-only. - self.addRoleName(Qt.UserRole + 1, "id") - self.addRoleName(Qt.UserRole + 2, "name") - self.addRoleName(Qt.UserRole + 3, "version") - self.addRoleName(Qt.UserRole + 4, "author") - self.addRoleName(Qt.UserRole + 5, "author_email") - self.addRoleName(Qt.UserRole + 6, "description") - - # Computed props: - # These are computed based on the user's system and interactions. - self.addRoleName(Qt.UserRole + 7, "external") - self.addRoleName(Qt.UserRole + 8, "file_location") - self.addRoleName(Qt.UserRole + 9, "status") - self.addRoleName(Qt.UserRole + 10, "enabled") - self.addRoleName(Qt.UserRole + 11, "required") - self.addRoleName(Qt.UserRole + 12, "can_uninstall") - self.addRoleName(Qt.UserRole + 13, "can_upgrade") - self.addRoleName(Qt.UserRole + 14, "update_url") - - - if view == "installed": - self._plugins = self._registry.getInstalledPlugins() - self._update(view) - - if view == "available": - self._plugins = self._registry.getExternalPlugins() - self._update(view) - - def _update(self, view): - items = [] - # Get all active plugins from registry (list of strings): - active_plugins = self._registry.getActivePlugins() - installed_plugins = self._registry.getInstalledPlugins() - plugin_folder = os.path.join(Resources.getStoragePath(Resources.Resources), "plugins") - - # Metadata is used as the official list of "all plugins": - for plugin_id in self._plugins: - - metadata = self._registry.getMetaData(plugin_id) - - if "plugin" not in metadata: - Logger.log("e", "%s is missing a plugin metadata entry", plugin_id) - continue - - props = metadata["plugin"] - - items.append({ - # Static props from above are taken from the plugin's metadata: - "id": metadata["id"], - "name": props.get("name", props.get("label", metadata["id"])), - "version": props.get("version", "Unknown"), - "author": props.get("author", "Anonymous"), - "author_email": props.get("author_email", "plugins@ultimaker.com"), - "description": props.get("description", props.get("short_description", "No description provided...")), - - # Computed props from above are computed - "external": True if metadata["id"] in self._registry._plugins_external else False, - "file_location": props.get("file_location", "/"), - "status": "installed" if metadata["id"] in installed_plugins else "available", - "enabled": True if view == "available" else metadata["id"] in active_plugins, - "required": metadata["id"] in self._required_plugins, - "can_uninstall": True if not self._registry.isBundledPlugin(plugin_id, plugin_folder) else False, - "can_upgrade": False, # Default, potentially overwritten by plugin browser - "update_url": None # Default, potentially overwritten by plugin browser - }) - - items.sort(key = lambda k: k["name"]) - self.setItems(items) diff -Nru uranium-3.3.0/UM/Qt/Bindings/PointingRectangle.py uranium-4.4.1/UM/Qt/Bindings/PointingRectangle.py --- uranium-3.3.0/UM/Qt/Bindings/PointingRectangle.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Qt/Bindings/PointingRectangle.py 2019-11-19 10:50:46.000000000 +0000 @@ -1,10 +1,11 @@ # Copyright (c) 2015 Ultimaker B.V. # Uranium is released under the terms of the LGPLv3 or higher. -from PyQt5.QtCore import pyqtSlot, pyqtProperty, pyqtSignal, PYQT_VERSION +from PyQt5.QtCore import pyqtProperty, pyqtSignal from PyQt5.QtCore import QPoint from PyQt5.QtGui import QColor -from PyQt5.QtQuick import QQuickItem, QSGGeometryNode, QSGGeometry, QSGFlatColorMaterial, QSGSimpleRectNode +from PyQt5.QtQuick import QQuickItem, QSGGeometryNode, QSGGeometry, QSGFlatColorMaterial + class PointingRectangle(QQuickItem): def __init__(self, parent = None): @@ -161,8 +162,9 @@ if self._border_width > 0: if paint_node.childCount() == 0: - paint_node.appendChildNode(QSGGeometryNode()) - border_node = paint_node.firstChild() + border_node = QSGGeometryNode() + else: + border_node = paint_node.firstChild() border_vertices = [] border_vertices.append((0, 0)) @@ -203,6 +205,9 @@ border_material.setColor(self._border_color) border_node.setMaterial(border_material) + + if paint_node.childCount() == 0: + paint_node.appendChildNode(border_node) else: border_node = None border_geometry = None diff -Nru uranium-3.3.0/UM/Qt/Bindings/PreferencesProxy.py uranium-4.4.1/UM/Qt/Bindings/PreferencesProxy.py --- uranium-3.3.0/UM/Qt/Bindings/PreferencesProxy.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Qt/Bindings/PreferencesProxy.py 2019-11-19 10:50:46.000000000 +0000 @@ -1,14 +1,14 @@ -# Copyright (c) 2015 Ultimaker B.V. +# Copyright (c) 2018 Ultimaker B.V. # Uranium is released under the terms of the LGPLv3 or higher. from PyQt5.QtCore import QObject, pyqtSlot, pyqtSignal -from UM.Preferences import Preferences +from UM.Application import Application class PreferencesProxy(QObject): def __init__(self, parent = None): super().__init__(parent) - self._preferences = Preferences.getInstance() + self._preferences = Application.getInstance().getPreferences() self._preferences.preferenceChanged.connect(self._onPreferenceChanged) preferenceChanged = pyqtSignal(str, arguments = ["preference"]) diff -Nru uranium-3.3.0/UM/Qt/Bindings/SceneProxy.py uranium-4.4.1/UM/Qt/Bindings/SceneProxy.py --- uranium-3.3.0/UM/Qt/Bindings/SceneProxy.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Qt/Bindings/SceneProxy.py 1970-01-01 00:00:00.000000000 +0000 @@ -1,34 +0,0 @@ -# Copyright (c) 2015 Ultimaker B.V. -# Uranium is released under the terms of the LGPLv3 or higher. - -from PyQt5.QtCore import QObject, QCoreApplication, pyqtSlot, pyqtSignal, pyqtProperty -from UM.Scene.Selection import Selection - -class SceneProxy(QObject): - def __init__(self, parent = None): - super().__init__(parent) - self._scene = QCoreApplication.instance().getController().getScene() - Selection.selectionChanged.connect(self._onSelectionChanged) - - selectionChanged = pyqtSignal() - - def _onSelectionChanged(self): - self.selectionChanged.emit() - - @pyqtProperty(int, notify = selectionChanged) - def numObjectsSelected(self): - return Selection.getCount() - - @pyqtProperty(bool, notify = selectionChanged) - def isGroupSelected(self): - for node in Selection.getAllSelectedObjects(): - if node.callDecoration("isGroup"): - return True - return False - - @pyqtSlot(str) - def setActiveCamera(self, camera): - self._scene.setActiveCamera(camera) - - - \ No newline at end of file diff -Nru uranium-3.3.0/UM/Qt/Bindings/SelectionProxy.py uranium-4.4.1/UM/Qt/Bindings/SelectionProxy.py --- uranium-3.3.0/UM/Qt/Bindings/SelectionProxy.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Qt/Bindings/SelectionProxy.py 2019-11-19 10:50:46.000000000 +0000 @@ -10,13 +10,29 @@ def __init__(self, parent = None): super().__init__(parent) Selection.selectionChanged.connect(self._onSelectionChanged) + Selection.selectedFaceChanged.connect(self._onSelectedFaceChanged) selectionChanged = pyqtSignal() + selectedFaceChanged = pyqtSignal() @pyqtProperty(bool, notify = selectionChanged) def hasSelection(self): return Selection.hasSelection() + @pyqtProperty(bool, notify = selectedFaceChanged) + def faceSelectMode(self): + return Selection.getFaceSelectMode() + + @pyqtSlot(bool) + def setFaceSelectMode(self, select: bool) -> None: + Selection.setFaceSelectMode(select) + if not select: + Selection.clearFace() + + @pyqtProperty(bool, notify = selectedFaceChanged) + def hasFaceSelected(self): + return Selection.getSelectedFace() is not None + @pyqtProperty(int, notify = selectionChanged) def selectionCount(self): return Selection.getCount() @@ -28,5 +44,15 @@ def _onSelectionChanged(self): self.selectionChanged.emit() + def _onSelectedFaceChanged(self): + self.selectedFaceChanged.emit() + + @pyqtProperty(bool, notify=selectionChanged) + def isGroupSelected(self): + for node in Selection.getAllSelectedObjects(): + if node.callDecoration("isGroup"): + return True + return False + def createSelectionProxy(engine, script_engine): return SelectionProxy() diff -Nru uranium-3.3.0/UM/Qt/Bindings/StageModel.py uranium-4.4.1/UM/Qt/Bindings/StageModel.py --- uranium-3.3.0/UM/Qt/Bindings/StageModel.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Qt/Bindings/StageModel.py 2019-11-19 10:50:46.000000000 +0000 @@ -12,25 +12,21 @@ class StageModel(ListModel): IdRole = Qt.UserRole + 1 NameRole = Qt.UserRole + 2 - ActiveRole = Qt.UserRole + 3 StageRole = Qt.UserRole + 4 def __init__(self, parent = None): super().__init__(parent) self._controller = Application.getInstance().getController() self._controller.stagesChanged.connect(self._onStagesChanged) - self._controller.activeStageChanged.connect(self._onStagesChanged) self._onStagesChanged() self.addRoleName(self.IdRole, "id") self.addRoleName(self.NameRole, "name") - self.addRoleName(self.ActiveRole, "active") self.addRoleName(self.StageRole, "stage") def _onStagesChanged(self): items = [] stages = self._controller.getAllStages() - current_stage = self._controller.getActiveStage() for stage_id, stage in stages.items(): view_meta_data = PluginRegistry.getInstance().getMetaData(stage_id).get("stage", {}) @@ -46,7 +42,6 @@ items.append({ "id": stage_id, "name": name, - "active": stage_id == current_stage.getPluginId(), "stage": stage, "weight": weight }) diff -Nru uranium-3.3.0/UM/Qt/Bindings/Theme.py uranium-4.4.1/UM/Qt/Bindings/Theme.py --- uranium-3.3.0/UM/Qt/Bindings/Theme.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Qt/Bindings/Theme.py 2019-11-19 10:50:46.000000000 +0000 @@ -1,30 +1,30 @@ -# Copyright (c) 2015 Ultimaker B.V. +# Copyright (c) 2018 Ultimaker B.V. # Uranium is released under the terms of the LGPLv3 or higher. -from PyQt5.QtCore import QObject, pyqtProperty, pyqtSignal, QCoreApplication, QUrl, QSizeF -from PyQt5.QtGui import QColor, QFont, QFontMetrics, QFontDatabase, QFontInfo -from PyQt5.QtQml import QQmlComponent, QQmlContext -from UM.FlameProfiler import pyqtSlot import json import os -import os.path import sys +from typing import Dict, Optional, List + +from PyQt5.QtCore import QObject, pyqtProperty, pyqtSignal, QCoreApplication, QUrl, QSizeF +from PyQt5.QtGui import QColor, QFont, QFontMetrics, QFontDatabase +from PyQt5.QtQml import QQmlComponent, QQmlContext +import UM.Application +from UM.FlameProfiler import pyqtSlot from UM.Logger import Logger from UM.Resources import Resources -from UM.Preferences import Preferences -from UM.Application import Application -from UM.Decorators import deprecated + class Theme(QObject): - def __init__(self, engine, parent = None): + def __init__(self, engine, parent = None) -> None: super().__init__(parent) self._engine = engine - self._styles = None + self._styles = None # type: Optional[QObject] self._path = "" - self._icons = {} - self._images = {} + self._icons = {} # type: Dict[str, QUrl] + self._images = {} # type: Dict[str, QUrl] # Workaround for incorrect default font on Windows if sys.platform == "win32": @@ -35,6 +35,13 @@ self._em_height = int(QFontMetrics(QCoreApplication.instance().font()).ascent()) self._em_width = self._em_height + # Cache the initial language in the preferences. For fonts, a special font can be defined with, for example, + # "medium" and "medium_nl_NL". If the special one exists, getFont() will return that, otherwise the default + # will be returned. We cache the initial language here is because Cura can only change its language if it gets + # restarted, so we need to keep the fonts consistent in a single Cura run. + self._preferences = UM.Application.Application.getInstance().getPreferences() + self._lang_code = self._preferences.getValue("general/language") + self._initializeDefaults() self.reload() @@ -46,21 +53,21 @@ self._path = "" self._icons = {} self._images = {} - Preferences.getInstance().addPreference("general/theme", Application.getInstance().default_theme) + application = UM.Application.Application.getInstance() + application.getPreferences().addPreference("general/theme", application.default_theme) try: - theme_path = Resources.getPath(Resources.Themes, Preferences.getInstance().getValue("general/theme")) + theme_path = Resources.getPath(Resources.Themes, application.getPreferences().getValue("general/theme")) self.load(theme_path) except FileNotFoundError: Logger.log("e", "Could not find theme file, resetting to the default theme.") # cannot the current theme, so go back to the default - Preferences.getInstance().setValue("general/theme", Application.getInstance().default_theme) - theme_path = Resources.getPath(Resources.Themes, Preferences.getInstance().getValue("general/theme")) + application.getPreferences().setValue("general/theme", application.default_theme) + theme_path = Resources.getPath(Resources.Themes, application.getPreferences().getValue("general/theme")) self.load(theme_path) - @pyqtSlot(result = "QVariantList") - def getThemes(self): + def getThemes(self) -> List[Dict[str, str]]: themes = [] for path in Resources.getAllPathsForType(Resources.Themes): try: @@ -70,7 +77,7 @@ if os.path.isdir(folder) and os.path.isfile(theme_file): theme_id = os.path.basename(folder) - with open(theme_file) as f: + with open(theme_file, encoding = "utf-8") as f: try: data = json.load(f) except json.decoder.JSONDecodeError: @@ -94,7 +101,7 @@ return themes @pyqtSlot(str, result = "QColor") - def getColor(self, color): + def getColor(self, color: str) -> QColor: if color in self._colors: return self._colors[color] @@ -102,7 +109,7 @@ return QColor() @pyqtSlot(str, result = "QSizeF") - def getSize(self, size): + def getSize(self, size) -> QSizeF: if size in self._sizes: return self._sizes[size] @@ -110,7 +117,7 @@ return QSizeF() @pyqtSlot(str, result = "QUrl") - def getIcon(self, icon_name): + def getIcon(self, icon_name: str) -> QUrl: if icon_name in self._icons: return self._icons[icon_name] @@ -119,7 +126,7 @@ return QUrl() @pyqtSlot(str, result = "QUrl") - def getImage(self, image_name): + def getImage(self, image_name: str) -> QUrl: if image_name in self._images: return self._images[image_name] @@ -127,7 +134,11 @@ return QUrl() @pyqtSlot(str, result = "QFont") - def getFont(self, font_name): + def getFont(self, font_name: str) -> QFont: + lang_specific_font_name = "%s_%s" % (font_name, self._lang_code) + if lang_specific_font_name in self._fonts: + return self._fonts[lang_specific_font_name] + if font_name in self._fonts: return self._fonts[font_name] @@ -138,37 +149,12 @@ def styles(self): return self._styles - @pyqtProperty("QVariantMap", notify = themeLoaded) - @deprecated("Use getIcon for performance reasons", "2.1") - def icons(self): - return self._icons - - @pyqtProperty("QVariantMap", notify = themeLoaded) - @deprecated("Use getImage for performance reasons", "2.1") - def images(self): - return self._images - - @pyqtProperty("QVariantMap", notify = themeLoaded) - @deprecated("Use getColor for performance reasons", "2.1") - def colors(self): - return self._colors - - @pyqtProperty("QVariantMap", notify = themeLoaded) - @deprecated("Use getFont for performance reasons", "2.1") - def fonts(self): - return self._fonts - - @pyqtProperty("QVariantMap", notify = themeLoaded) - @deprecated("Use getSize for performance reasons", "2.1") - def sizes(self): - return self._sizes - @pyqtSlot(str) - def load(self, path, is_first_call = True): + def load(self, path: str, is_first_call: bool = True) -> None: if path == self._path: return - with open(os.path.join(path, "theme.json")) as f: + with open(os.path.join(path, "theme.json"), encoding = "utf-8") as f: Logger.log("d", "Loading theme file: %s", os.path.join(path, "theme.json")) data = json.load(f) @@ -179,36 +165,37 @@ except FileNotFoundError: Logger.log("e", "Could not find inherited theme %s", theme_id) except KeyError: - pass # No metadata or no inherits keyword in the theme.json file + pass # No metadata or no inherits keyword in the theme.json file if "colors" in data: for name, color in data["colors"].items(): c = QColor(color[0], color[1], color[2], color[3]) self._colors[name] = c - fontsdir = os.path.join(path, "fonts") - if os.path.isdir(fontsdir): - for file in os.listdir(fontsdir): - if "ttf" in file: - QFontDatabase.addApplicationFont(os.path.join(fontsdir, file)) + fonts_dir = os.path.join(path, "fonts") + if os.path.isdir(fonts_dir): + for root, dirnames, filenames in os.walk(fonts_dir): + for filename in filenames: + if filename.lower().endswith(".ttf"): + QFontDatabase.addApplicationFont(os.path.join(root, filename)) if "fonts" in data: system_font_size = QCoreApplication.instance().font().pointSize() for name, font in data["fonts"].items(): - f = QFont() - f.setFamily(font.get("family", QCoreApplication.instance().font().family())) + q_font = QFont() + q_font.setFamily(font.get("family", QCoreApplication.instance().font().family())) if font.get("bold"): - f.setBold(font.get("bold", False)) + q_font.setBold(font.get("bold", False)) else: - f.setWeight(font.get("weight", 50)) + q_font.setWeight(font.get("weight", 50)) - f.setLetterSpacing(QFont.AbsoluteSpacing, font.get("letterSpacing", 0)) - f.setItalic(font.get("italic", False)) - f.setPointSize(int(font.get("size", 1) * system_font_size)) - f.setCapitalization(QFont.AllUppercase if font.get("capitalize", False) else QFont.MixedCase) + q_font.setLetterSpacing(QFont.AbsoluteSpacing, font.get("letterSpacing", 0)) + q_font.setItalic(font.get("italic", False)) + q_font.setPointSize(int(font.get("size", 1) * system_font_size)) + q_font.setCapitalization(QFont.AllUppercase if font.get("capitalize", False) else QFont.MixedCase) - self._fonts[name] = f + self._fonts[name] = q_font if "sizes" in data: for name, size in data["sizes"].items(): @@ -248,7 +235,7 @@ if is_first_call: self.themeLoaded.emit() - def _initializeDefaults(self): + def _initializeDefaults(self) -> None: self._fonts = { "system": QCoreApplication.instance().font(), "fixed": QFontDatabase.systemFont(QFontDatabase.FixedFont) @@ -274,6 +261,7 @@ __instance = None # type: 'Theme' + def createTheme(engine, script_engine = None): return Theme.getInstance(engine) diff -Nru uranium-3.3.0/UM/Qt/Bindings/ToolModel.py uranium-4.4.1/UM/Qt/Bindings/ToolModel.py --- uranium-3.3.0/UM/Qt/Bindings/ToolModel.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Qt/Bindings/ToolModel.py 2019-11-19 10:50:46.000000000 +0000 @@ -1,7 +1,8 @@ -# Copyright (c) 2017 Ultimaker B.V. +# Copyright (c) 2018 Ultimaker B.V. # Uranium is released under the terms of the LGPLv3 or higher. from PyQt5.QtCore import Qt +from PyQt5.QtGui import QKeySequence from UM.Application import Application @@ -17,6 +18,7 @@ ToolEnabledRole = Qt.UserRole + 5 DescriptionRole = Qt.UserRole + 6 LocationRole = Qt.UserRole + 7 + ShortcutRole = Qt.UserRole + 8 def __init__(self, parent = None): super().__init__(parent) @@ -34,14 +36,16 @@ self.addRoleName(self.ToolEnabledRole, "enabled") self.addRoleName(self.DescriptionRole, "description") self.addRoleName(self.LocationRole, "location") + self.addRoleName(self.ShortcutRole, "shortcut") def _onToolsChanged(self): items = [] tools = self._controller.getAllTools() for name in tools: - tool_meta_data = PluginRegistry.getInstance().getMetaData(name).get("tool", {}) - location = PluginRegistry.getInstance().getMetaData(name).get("location", "") + plugin_id = tools[name].getPluginId() + tool_meta_data = tools[name].getMetaData() + location = PluginRegistry.getInstance().getMetaData(plugin_id).get("location", "") # Skip tools that are marked as not visible if "visible" in tool_meta_data and not tool_meta_data["visible"]: @@ -51,6 +55,13 @@ description = tool_meta_data.get("description", "") icon_name = tool_meta_data.get("icon", "default.png") + #Get the shortcut and translate it to a string. + shortcut = self._controller.getTool(name).getShortcutKey() + if shortcut: + shortcut = QKeySequence(shortcut).toString() + else: + shortcut = "" + weight = tool_meta_data.get("weight", 0) enabled = self._controller.getTool(name).getEnabled() @@ -63,7 +74,8 @@ "active": False, "enabled": enabled, "description": description, - "weight": weight + "weight": weight, + "shortcut": shortcut }) items.sort(key = lambda t: t["weight"]) @@ -81,4 +93,5 @@ def _onToolEnabledChanged(self, tool_id, enabled): index = self.find("id", tool_id) if index >= 0: - self.setProperty(index, "enabled", enabled) + self._items[index]["enabled"] = enabled + self.dataChanged.emit(self.index(index, 0), self.index(index, 0), [self.ToolEnabledRole]) \ No newline at end of file diff -Nru uranium-3.3.0/UM/Qt/Bindings/ViewModel.py uranium-4.4.1/UM/Qt/Bindings/ViewModel.py --- uranium-3.3.0/UM/Qt/Bindings/ViewModel.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Qt/Bindings/ViewModel.py 2019-11-19 10:50:46.000000000 +0000 @@ -1,12 +1,13 @@ -# Copyright (c) 2015 Ultimaker B.V. +# Copyright (c) 2018 Ultimaker B.V. # Uranium is released under the terms of the LGPLv3 or higher. -from PyQt5.QtCore import QAbstractListModel, QCoreApplication, Qt, QVariant +from PyQt5.QtCore import Qt from UM.Qt.ListModel import ListModel from UM.Application import Application from UM.PluginRegistry import PluginRegistry + class ViewModel(ListModel): IdRole = Qt.UserRole + 1 NameRole = Qt.UserRole + 2 @@ -14,12 +15,12 @@ DescriptionRole = Qt.UserRole + 4 IconRole = Qt.UserRole + 5 - def __init__(self, parent = None): + def __init__(self, parent = None) -> None: super().__init__(parent) self._controller = Application.getInstance().getController() - self._controller.viewsChanged.connect(self._onViewsChanged) - self._controller.activeViewChanged.connect(self._onViewsChanged) - self._onViewsChanged() + self._controller.viewsChanged.connect(self._update) + self._controller.activeViewChanged.connect(self._update) + self._update() self.addRoleName(self.IdRole, "id") self.addRoleName(self.NameRole, "name") @@ -27,25 +28,34 @@ self.addRoleName(self.DescriptionRole, "description") self.addRoleName(self.IconRole, "icon") - def _onViewsChanged(self): + def _update(self) -> None: items = [] views = self._controller.getAllViews() + current_view = self._controller.getActiveView() + if current_view is None: + return - for id in views: - viewMetaData = PluginRegistry.getInstance().getMetaData(id).get("view", {}) + for view_id in views: + view_meta_data = PluginRegistry.getInstance().getMetaData(view_id).get("view", {}) # Skip view modes that are marked as not visible - if "visible" in viewMetaData and not viewMetaData["visible"]: + if "visible" in view_meta_data and not view_meta_data["visible"]: continue # Metadata elements - name = viewMetaData.get("name", id) - description = viewMetaData.get("description", "") - iconName = viewMetaData.get("icon", "") - weight = viewMetaData.get("weight", 0) - - currentView = self._controller.getActiveView() - items.append({ "id": id, "name": name, "active": id == currentView.getPluginId(), "description": description, "icon": iconName, "weight": weight }) + name = view_meta_data.get("name", view_id) + description = view_meta_data.get("description", "") + icon_name = view_meta_data.get("icon", "") + weight = view_meta_data.get("weight", 0) + + items.append({ + "id": view_id, + "name": name, + "active": view_id == current_view.getPluginId(), + "description": description, + "icon": icon_name, + "weight": weight + }) items.sort(key = lambda t: t["weight"]) - self.setItems(items) \ No newline at end of file + self.setItems(items) diff -Nru uranium-3.3.0/UM/Qt/Bindings/VisibleMessagesModel.py uranium-4.4.1/UM/Qt/Bindings/VisibleMessagesModel.py --- uranium-3.3.0/UM/Qt/Bindings/VisibleMessagesModel.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Qt/Bindings/VisibleMessagesModel.py 2019-11-19 10:50:46.000000000 +0000 @@ -17,6 +17,10 @@ DismissableRole = Qt.UserRole + 8 TileRole = Qt.UserRole + 9 StyleRole = Qt.UserRole + 10 + ImageSourceRole = Qt.UserRole + 11 + ImageCaptionRole = Qt.UserRole + 12 + OptionTextRole = Qt.UserRole + 13 + OptionStateRole = Qt.UserRole + 14 def __init__(self, parent=None): super().__init__(parent) @@ -29,6 +33,10 @@ self.addRoleName(self.ActionsRole, "actions") self.addRoleName(self.DismissableRole, "dismissable") self.addRoleName(self.TileRole, "title") + self.addRoleName(self.ImageSourceRole, "image_source") + self.addRoleName(self.ImageCaptionRole, "image_caption") + self.addRoleName(self.OptionTextRole, "option_text") + self.addRoleName(self.OptionStateRole, "option_state") self._populateMessageList() def _populateMessageList(self): @@ -43,8 +51,11 @@ "id": str(id(message)), "actions": self.createActionsModel(message.getActions()), "dismissable": message.isDismissable(), - "title": message.getTitle() - + "title": message.getTitle(), + "image_source": message.getImageSource(), + "image_caption": message.getImageCaption(), + "option_text": message.getOptionText(), + "option_state": message.getOptionState() }) message.progressChanged.connect(self._onMessageProgress) @@ -64,6 +75,13 @@ def hideMessage(self, message_id): Application.getInstance().hideMessageById(message_id) + @pyqtSlot(str, bool) + def optionToggled(self, message_id, value): + for message in Application.getInstance().getVisibleMessages(): + if str(id(message)) == message_id: + message.optionToggled.emit(value) + break + @pyqtSlot(str, str) def actionTriggered(self, message_id, action_id): for message in Application.getInstance().getVisibleMessages(): diff -Nru uranium-3.3.0/UM/Qt/Duration.py uranium-4.4.1/UM/Qt/Duration.py --- uranium-3.3.0/UM/Qt/Duration.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Qt/Duration.py 2019-11-19 10:50:46.000000000 +0000 @@ -1,5 +1,6 @@ # Copyright (c) 2017 Ultimaker B.V. # Uranium is released under the terms of the LGPLv3 or higher. +from typing import Optional from PyQt5.QtCore import QObject, pyqtProperty, Q_ENUMS, pyqtSignal from UM.FlameProfiler import pyqtSlot @@ -28,7 +29,7 @@ # # \param duration The duration in seconds. If this is None (the default), an invalid Duration object will be created. # \param parent The QObject parent. - def __init__(self, duration = None, parent = None): + def __init__(self, duration: Optional[int] = None, parent = None) -> None: super().__init__(parent) self._days = -1 @@ -36,7 +37,7 @@ self._minutes = -1 self._seconds = -1 - if duration != None: + if duration is not None: self.setDuration(duration) durationChanged = pyqtSignal() @@ -96,9 +97,12 @@ self.durationChanged.emit() - ## Get a string representation of this object that can be used to display in interfaces. + ## Get a string representation of this object that can be used to display + # in interfaces. # - # This is not called toString() primarily because that conflicts with JavaScript"s toString() + # This is not called toString() primarily because that conflicts with + # JavaScript's toString(). + # \return A human-readable string representation of this duration. @pyqtSlot(int, result = str) def getDisplayString(self, display_format = DurationFormat.Format.Short): if display_format == DurationFormat.Format.Seconds: @@ -119,3 +123,11 @@ return "%02d:%02d:%02d" % (self._days * 24 + self._hours, self._minutes, self._seconds) return "" + + ## Get an integer representation of this duration. + # + # The integer contains the number of seconds in the duration. Convert it + # back to a Duration instance by providing the number of seconds to the + # constructor. + def __int__(self): + return self._days * 3600 * 24 + self._hours * 3600 + self._minutes * 60 + self._seconds \ No newline at end of file diff -Nru uranium-3.3.0/UM/Qt/ListModel.py uranium-4.4.1/UM/Qt/ListModel.py --- uranium-3.3.0/UM/Qt/ListModel.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Qt/ListModel.py 2019-11-19 10:50:46.000000000 +0000 @@ -1,7 +1,10 @@ -# Copyright (c) 2015 Ultimaker B.V. +# Copyright (c) 2018 Ultimaker B.V. # Uranium is released under the terms of the LGPLv3 or higher. -from PyQt5.QtCore import QObject, QAbstractListModel, QVariant, QModelIndex, pyqtSlot, pyqtProperty, QByteArray, pyqtSignal +from PyQt5.QtCore import QAbstractListModel, QVariant, QModelIndex, pyqtSlot, pyqtProperty, pyqtSignal +from typing import Any, Callable, Dict, List + + ## Convenience base class for models of a list of items. # @@ -10,23 +13,30 @@ # convenience class but supports removing elements so can also be # used for limited writing. class ListModel(QAbstractListModel): - def __init__(self, parent = None): + def __init__(self, parent = None) -> None: super().__init__(parent) - self._items = [] - self._role_names = {} + self._items = [] # type: List[Dict[str, Any]] + self._role_names = {} # type: Dict[int, bytes] - # While it would be nice to expose rowCount() as a count property so - # far implementing that only causes crashes due to an infinite recursion - # in PyQt. + itemsChanged = pyqtSignal() - ## Reimplemented from QAbstractListModel - @pyqtSlot(result=int) - def rowCount(self, parent = None): + @pyqtProperty(int, notify = itemsChanged) + def count(self) -> int: return len(self._items) - def addRoleName(self,role,name): - # Qt roleNames expects a QByteArray. PyQt 5.5 does not convert str to bytearray implicitly so - # force the conversion manually. + ## This function is necessary because it is abstract in QAbstractListModel. + # + # Under the hood, Qt will call this function when it needs to know how + # many items are in the model. + # This pyqtSlot will not be linked to the itemsChanged signal, so please + # use the normal count() function instead. + @pyqtSlot(result = int) + def rowCount(self, parent = None) -> int: + return self.count + + def addRoleName(self, role: int, name: str): + # Qt roleNames expects a QByteArray. PyQt 5 does not convert str to + # bytearray implicitly so force the conversion manually. self._role_names[role] = name.encode("utf-8") def roleNames(self): @@ -40,38 +50,72 @@ ## Get an item from the list @pyqtSlot(int, result="QVariantMap") - def getItem(self, index): + def getItem(self, index: int) -> Dict[str, Any]: try: return self._items[index] except: return {} - itemsChanged = pyqtSignal() - ## The list of items in this model. @pyqtProperty("QVariantList", notify = itemsChanged) - def items(self): + def items(self) -> List[Dict[str, Any]]: return self._items ## Replace all items at once. # \param items The new list of items. - def setItems(self, items): - self.beginResetModel() + def setItems(self, items: List[Dict[str, Any]]) -> None: + # We do not use model reset because of the following: + # - it is very slow + # - it can cause crashes on Mac OS X for some reason when endResetModel() is called (CURA-6015) + # So in this case, we use insertRows(), removeRows() and dataChanged signals to do + # smarter model update. + + old_row_count = len(self._items) + new_row_count = len(items) + changed_row_count = min(old_row_count, new_row_count) + + need_to_add = old_row_count < new_row_count + need_to_remove = old_row_count > new_row_count + + # In the case of insertion and deletion, we need to call beginInsertRows()/beginRemoveRows() and + # endInsertRows()/endRemoveRows() before we modify the items. + # In the case of modification on the existing items, we only need to modify the items and then emit + # dataChanged(). + # + # Here it is simplified to replace the complete items list instead of adding/removing/modifying them one by one, + # and it needs to make sure that the necessary signals (insert/remove/modified) are emitted before and after + # the item replacement. + + if need_to_add: + self.beginInsertRows(QModelIndex(), old_row_count, new_row_count - 1) + elif need_to_remove: + self.beginRemoveRows(QModelIndex(), new_row_count, old_row_count - 1) + self._items = items - self.endResetModel() + + if need_to_add: + self.endInsertRows() + elif need_to_remove: + self.endRemoveRows() + + # Notify that the existing items have been changed. + if changed_row_count >= 0: + self.dataChanged.emit(self.index(0, 0), self.index(changed_row_count - 1, 0)) + + # Notify with the custom signal itemsChanged to keep it backwards compatible in case something relies on it. self.itemsChanged.emit() ## Add an item to the list. # \param item The item to add. @pyqtSlot(dict) - def appendItem(self, item): + def appendItem(self, item: Dict[str, Any]): self.insertItem(len(self._items), item) ## Insert an item into the list at an index. # \param index The index where to insert. # \param item The item to add. @pyqtSlot(int, dict) - def insertItem(self, index, item): + def insertItem(self, index: int, item: Dict[str, Any]) -> None: self.beginInsertRows(QModelIndex(), index, index) self._items.insert(index, item) self.endInsertRows() @@ -80,7 +124,7 @@ ## Remove an item from the list. # \param index The index of the item to remove. @pyqtSlot(int) - def removeItem(self, index): + def removeItem(self, index: int) -> None: self.beginRemoveRows(QModelIndex(), index, index) del self._items[index] self.endRemoveRows() @@ -88,20 +132,20 @@ ## Clear the list. @pyqtSlot() - def clear(self): + def clear(self) -> None: self.beginResetModel() self._items.clear() self.endResetModel() self.itemsChanged.emit() @pyqtSlot(int, str, QVariant) - def setProperty(self, index, property, value): + def setProperty(self, index: int, property: str, value: Any) -> None: self._items[index][property] = value self.dataChanged.emit(self.index(index, 0), self.index(index, 0)) ## Sort the list. # \param fun The callable to use for determining the sort key. - def sort(self, fun): + def sort(self, fun: Callable[[Any], float]) -> None: self.beginResetModel() self._items.sort(key = fun) self.endResetModel() @@ -111,7 +155,7 @@ # \param value # \return index of setting if found, None otherwise @pyqtSlot(str, QVariant, result = int) - def find(self, key, value): + def find(self, key: str, value: Any) -> int: for i in range(len(self._items)): if key in self._items[i]: if self._items[i][key] == value: diff -Nru uranium-3.3.0/UM/Qt/qml/UM/ApplicationMenu.qml uranium-4.4.1/UM/Qt/qml/UM/ApplicationMenu.qml --- uranium-3.3.0/UM/Qt/qml/UM/ApplicationMenu.qml 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Qt/qml/UM/ApplicationMenu.qml 2019-11-19 10:50:46.000000000 +0000 @@ -1,4 +1,4 @@ -// Copyright (c) 2015 Ultimaker B.V. +// Copyright (c) 2018 Ultimaker B.V. // Uranium is released under the terms of the LGPLv3 or higher. import QtQuick 2.1 @@ -9,15 +9,17 @@ * It replicates some of the functionality included in QtQuick Controls' * ApplicationWindow class to make the menu bar actually work. */ -Rectangle { +Rectangle +{ id: menuBackground; property QtObject window; - Binding { - target: menu.__contentItem; - property: "width"; - value: window.width; - when: !menu.__isNative; + Binding + { + target: menu.__contentItem + property: "width" + value: window.width + when: !menu.__isNative } default property alias menus: menu.menus @@ -29,15 +31,19 @@ Keys.forwardTo: menu.__contentItem; - MenuBar { + MenuBar + { id: menu - //__parentWindow: menuBackground.window - - Component.onCompleted: { + Component.onCompleted: + { __contentItem.parent = menuBackground; } } - SystemPalette { id: palette; colorGroup: SystemPalette.Active } + SystemPalette + { + id: palette + colorGroup: SystemPalette.Active + } } diff -Nru uranium-3.3.0/UM/Qt/qml/UM/Dialog.qml uranium-4.4.1/UM/Qt/qml/UM/Dialog.qml --- uranium-3.3.0/UM/Qt/qml/UM/Dialog.qml 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Qt/qml/UM/Dialog.qml 2019-11-19 10:50:46.000000000 +0000 @@ -1,13 +1,15 @@ // Copyright (c) 2017 Ultimaker B.V. // Uranium is released under the terms of the LGPLv3 or higher. -import QtQuick 2.2 -import QtQuick.Window 2.1 -import QtQuick.Layouts 1.1 +import QtQuick 2.10 +import QtQuick.Window 2.2 +import QtQuick.Layouts 1.3 import UM 1.0 as UM -Window { + +Window +{ id: base modality: Qt.ApplicationModal; @@ -23,6 +25,8 @@ default property alias contents: contentItem.children; + property alias loader: contentLoader + property alias leftButtons: leftButtonRow.children; property alias rightButtons: rightButtonRow.children; @@ -76,6 +80,14 @@ bottom: buttonRow.top; bottomMargin: base.margin; } + + Loader + { + id: contentLoader + anchors.fill: parent + active: source != "" + property var manager: null + } } Item { diff -Nru uranium-3.3.0/UM/Qt/qml/UM/MessageStack.qml uranium-4.4.1/UM/Qt/qml/UM/MessageStack.qml --- uranium-3.3.0/UM/Qt/qml/UM/MessageStack.qml 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Qt/qml/UM/MessageStack.qml 2019-11-19 10:50:46.000000000 +0000 @@ -1,247 +1,428 @@ -// Copyright (c) 2015 Ultimaker B.V. +// Copyright (c) 2018 Ultimaker B.V. // Uranium is released under the terms of the LGPLv3 or higher. -import QtQuick 2.2 +import QtQuick 2.3 import QtQuick.Controls 1.1 import QtQuick.Controls.Styles 1.3 import QtQuick.Layouts 1.1 -import UM 1.0 as UM -import "." +import UM 1.3 as UM -ListView { +ListView +{ id: base - boundsBehavior: ListView.StopAtBounds; - verticalLayoutDirection: ListView.BottomToTop; - visible: true + boundsBehavior: ListView.StopAtBounds + verticalLayoutDirection: ListView.BottomToTop model: UM.VisibleMessagesModel { } - spacing: UM.Theme.getSize("message_margin").height - - interactive: false; + spacing: UM.Theme.getSize("default_margin").height + + // Messages can have actions, which are displayed by means of buttons. The message stack supports 3 styles + // of buttons "Primary", "Secondary" and "Link" (aka; "tertiary") + property Component primaryButton: Component + { + Button + { + text: model.name + } + } + + property Component secondaryButton: Component + { + Button + { + text: model.name + } + } + + property Component link: Component + { + Button + { + text: model.name + style: ButtonStyle + { + background: Item {} + + label: Label + { + text: control.text + font: + { + var defaultFont = UM.Theme.getFont("default") + defaultFont.underline = true + return defaultFont + } + color: UM.Theme.getColor("text_link") + } + } + } + } + + interactive: false + delegate: Rectangle { id: message - property int labelTopBottomMargin: Math.round(UM.Theme.getSize("default_margin").height / 2) - property int labelHeight: messageLabel.height + (UM.Theme.getSize("message_inner_margin").height * 2) - property int progressBarHeight: totalProgressBar.height + UM.Theme.getSize("default_margin").height - property int actionButtonsHeight: (actionButtons.height > 0 ? actionButtons.height + UM.Theme.getSize("default_margin").height : 0) + UM.Theme.getSize("default_margin").height * 2 - property int closeButtonHeight: UM.Theme.getSize("message_close").height property variant actions: model.actions property variant model_id: model.id - property int totalMessageHeight: Math.max(message.labelHeight, message.actionButtonsHeight + message.closeButtonHeight) + message.labelTopBottomMargin - property int totalProgressBarHeight : Math.round(message.labelHeight + message.progressBarHeight + message.actionButtonsHeight + UM.Theme.getSize("default_margin").height / 2) - width: UM.Theme.getSize("message").width - height: (model.progress == null) ? totalMessageHeight : totalProgressBarHeight + // Height is the size of the children + a margin on top & bottom. + height: childrenRect.height + 2 * UM.Theme.getSize("default_margin").height + anchors.horizontalCenter: parent.horizontalCenter color: UM.Theme.getColor("message_background") border.width: UM.Theme.getSize("default_lining").width border.color: UM.Theme.getColor("message_border") + radius: UM.Theme.getSize("message_radius").width + + Item + { + id: titleBar - Label { - id: messageTitle + anchors + { + top: parent.top + left: parent.left + right: parent.right + margins: UM.Theme.getSize("default_margin").width + } + + height: UM.Theme.getSize("message_close").height + + Button + { + id: closeButton + width: UM.Theme.getSize("message_close").width + height: UM.Theme.getSize("message_close").height + + anchors.right: parent.right + + style: ButtonStyle + { + background: UM.RecolorImage + { + width: UM.Theme.getSize("message_close").width + sourceSize.width: width + color: control.hovered ? UM.Theme.getColor("message_close_hover") : UM.Theme.getColor("message_close") + source: UM.Theme.getIcon("cross1") + } - anchors { - left: parent.left; - leftMargin: UM.Theme.getSize("message_inner_margin").width - top: parent.top; - topMargin: model.title != undefined ? Math.round(UM.Theme.getSize("default_margin").height / 2) : 0; + label: Item {} + } + + onClicked: base.model.hideMessage(model.id) + visible: model.dismissable + enabled: model.dismissable } - text: model.title == undefined ? "" : model.title - color: UM.Theme.getColor("message_text") - font: UM.Theme.getFont("default_bold") - wrapMode: Text.Wrap; + Label + { + id: messageTitle + + anchors + { + left: parent.left + right: closeButton.left + rightMargin: UM.Theme.getSize("default_margin").width + } + + text: model.title == undefined ? "" : model.title + color: UM.Theme.getColor("text") + font: UM.Theme.getFont("default_bold") + elide: Text.ElideRight + renderType: Text.NativeRendering + height: parent.height + } } + Item + { + id: imageItem + visible: messageImage.progress == 1.0 + height: visible ? childrenRect.height: 0 + + anchors + { + left: parent.left + leftMargin: UM.Theme.getSize("default_margin").width - Label { + right: parent.right + rightMargin: UM.Theme.getSize("default_margin").width + + top: titleBar.bottom + topMargin: visible ? UM.Theme.getSize("default_margin").height: 0 + } + Image + { + id: messageImage + anchors + { + horizontalCenter: parent.horizontalCenter + } + height: UM.Theme.getSize("message_image").height + fillMode: Image.PreserveAspectFit + source: model.image_source + sourceSize + { + height: height + width: width + } + mipmap: true + } + + Label + { + id: imageCaption + anchors + { + left: parent.left + right: parent.right + top: messageImage.bottom + topMargin: UM.Theme.getSize("narrow_margin").height + } + + text: model.image_caption + horizontalAlignment: Text.AlignHCenter + elide: Text.ElideRight + color: UM.Theme.getColor("text") + font: UM.Theme.getFont("large_bold") + height: contentHeight + } + } + + Label + { id: messageLabel - anchors { - left: parent.left; - leftMargin: UM.Theme.getSize("message_inner_margin").width - right: actionButtons.left; - rightMargin: UM.Theme.getSize("message_inner_margin").width + closeButton.width - - top: model.progress != null ? messageTitle.bottom : messageTitle.bottom; - topMargin: message.labelTopBottomMargin; + anchors + { + left: parent.left + leftMargin: UM.Theme.getSize("default_margin").width + + right: parent.right + rightMargin: UM.Theme.getSize("default_margin").width + + top: imageItem.bottom + topMargin: UM.Theme.getSize("narrow_margin").height } - function getProgressText(){ - var progress = Math.floor(model.progress) - return "%1 %2%".arg(model.text).arg(progress) + height: contentHeight + + function getProgressText() + { + return "%1 %2%".arg(model.text).arg(Math.floor(model.progress)) } text: model.progress > 0 ? messageLabel.getProgressText() : model.text == undefined ? "" : model.text - onLinkActivated: { - Qt.openUrlExternally(link); - } - color: UM.Theme.getColor("message_text") + onLinkActivated: Qt.openUrlExternally(link) + color: UM.Theme.getColor("text") font: UM.Theme.getFont("default") - wrapMode: Text.Wrap; + wrapMode: Text.Wrap + renderType: Text.NativeRendering } - ProgressBar + CheckBox { - id: totalProgressBar; - minimumValue: 0; - maximumValue: model.max_progress; + id: optionToggle + anchors + { + top: messageLabel.bottom + topMargin: visible ? UM.Theme.getSize("narrow_margin").height: 0 + left: parent.left + leftMargin: UM.Theme.getSize("default_margin").width + right: parent.right + rightMargin: UM.Theme.getSize("default_margin").width + } + text: model.option_text + visible: text != "" + height: visible ? undefined: 0 + checked: model.option_state + onCheckedChanged: base.model.optionToggled(message.model_id, checked) + style: CheckBoxStyle + { + label: Label + { + text: control.text + font: UM.Theme.getFont("default") + color: UM.Theme.getColor("text") + elide: Text.ElideRight + } + } + } + UM.ProgressBar + { + id: totalProgressBar value: 0 // Doing this in an explicit binding since the implicit binding breaks on occasion. - Binding { target: totalProgressBar; property: "value"; value: model.progress } + Binding + { + target: totalProgressBar + property: "value" + value: model.progress / model.max_progress + } - visible: model.progress == null ? false: true//if the progress is null (for example with the loaded message) -> hide the progressbar - indeterminate: model.progress == -1 ? true: false //if the progress is unknown (-1) -> the progressbar is indeterminate - style: UM.Theme.styles.progressbar + visible: model.progress == null ? false: true // If the progress is null (for example with the loaded message) -> hide the progressbar + indeterminate: model.progress == -1 ? true: false //If the progress is unknown (-1) -> the progressbar is indeterminate - property string backgroundColor: UM.Theme.getColor("message_progressbar_background") - property string controlColor: UM.Theme.getColor("message_progressbar_control") + anchors + { + top: optionToggle.bottom + topMargin: visible ? UM.Theme.getSize("narrow_margin").height: 0 + + left: parent.left + leftMargin: UM.Theme.getSize("default_margin").width - anchors.top: messageLabel.bottom - anchors.topMargin: Math.round(UM.Theme.getSize("message_inner_margin").height / 2) - anchors.left: parent.left - anchors.leftMargin: UM.Theme.getSize("message_inner_margin").width - anchors.right: parent.right - anchors.rightMargin: UM.Theme.getSize("message_inner_margin").width + right: parent.right + rightMargin: UM.Theme.getSize("default_margin").width + } } - Button { - id: closeButton; - width: UM.Theme.getSize("message_close").width; - height: UM.Theme.getSize("message_close").height; + // Right aligned Action Buttons + RowLayout + { + id: actionButtons - anchors { - right: parent.right; - rightMargin: UM.Theme.getSize("default_margin").width; - top: parent.top; - topMargin: UM.Theme.getSize("default_margin").width; - } + anchors + { + right: parent.right + rightMargin: UM.Theme.getSize("default_margin").width - UM.RecolorImage { - anchors.fill: parent; - sourceSize.width: width - sourceSize.height: width - color: UM.Theme.getColor("message_text") - source: UM.Theme.getIcon("cross1") + top: totalProgressBar.bottom + topMargin: UM.Theme.getSize("narrow_margin").width } - onClicked: base.model.hideMessage(model.id) - visible: model.dismissable - enabled: model.dismissable + Repeater + { + model: + { + var filteredModel = new Array() + var sizeOfActions = message.actions == null ? 0 : message.actions.count + if(sizeOfActions == 0) + { + return 0; + } - style: ButtonStyle { - background: Rectangle { - color: UM.Theme.getColor("message_background") + for(var index = 0; index < sizeOfActions; index++) + { + var actionButton = message.actions.getItem(index) + + var alignPosition = actionButton["button_align"] + + // ActionButtonStyle.BUTTON_ALIGN_RIGHT == 3 + if (alignPosition == 3) + { + filteredModel.push(actionButton) + } + } + return filteredModel + } + + // Put the delegate in a loader so we can connect to it's signals. + // We also need to use a different component based on the style of the action. + delegate: Loader + { + id: actionButton + sourceComponent: + { + if (modelData.button_style == 0) + { + return base.primaryButton + } else if (modelData.button_style == 1) + { + return base.link + } else if (modelData.button_style == 2) + { + return base.secondaryButton + } + return base.primaryButton // We got to use something, so use primary. + } + property var model: modelData + Connections + { + target: actionButton.item + onClicked: base.model.actionTriggered(message.model_id, modelData.action_id) + } } } } - ColumnLayout + // Left aligned Action Buttons + RowLayout { - id: actionButtons; + id: leftActionButtons - anchors { - right: parent.right - rightMargin: UM.Theme.getSize("message_inner_margin").width - top: closeButton.bottom - topMargin: UM.Theme.getSize("default_margin").height + anchors + { + left: messageLabel.left + leftMargin: UM.Theme.getSize("narrow_margin").width + + top: totalProgressBar.bottom + topMargin: UM.Theme.getSize("narrow_margin").width } Repeater { - model: message.actions - delegate: Button { - id: messageStackButton - onClicked: base.model.actionTriggered(message.model_id, model.action_id) - text: model.name - style: ButtonStyle { - background: Item { - property int standardWidth: UM.Theme.getSize("message_button").width - property int responsiveWidth: messageStackButtonText.width + UM.Theme.getSize("message_inner_margin").width - implicitWidth: responsiveWidth > standardWidth ? responsiveWidth : standardWidth - implicitHeight: UM.Theme.getSize("message_button").height - Rectangle { - id: messageStackButtonBackground - width: parent.width - height: parent.height - color: - { - if (model.button_style == 0) - { - if(control.pressed) - { - return UM.Theme.getColor("message_button_active"); - } - else if(control.hovered) - { - return UM.Theme.getColor("message_button_hover"); - } - else - { - return UM.Theme.getColor("message_button"); - } - } - else{ - return "transparent"; - } - } - Behavior on color { ColorAnimation { duration: 50; } } - } - Label { - id: messageStackButtonText - anchors.centerIn: parent - text: control.text - color: - { - if (model.button_style == 0) - { - if(control.pressed) - { - return UM.Theme.getColor("message_button_text_active"); - } - else if(control.hovered) - { - return UM.Theme.getColor("message_button_text_hover"); - } - else - { - return UM.Theme.getColor("message_button_text"); - } - } - else - { - return UM.Theme.getColor("black"); - } - } - - font: { - if (model.button_style == 0) - return UM.Theme.getFont("default") - else - { - var obj = UM.Theme.getFont("default") - obj.underline = true - return obj - } - } - } + model: + { + var filteredModel = new Array() + var sizeOfActions = message.actions == null ? 0 : message.actions.count + if(sizeOfActions == 0) + { + return 0; + } + + for(var index = 0; index < sizeOfActions; index++) + { + var actionButton = message.actions.getItem(index) + + var alignPosition = actionButton["button_align"] + + // ActionButtonStyle.BUTTON_ALIGN_LEFT == 2 + if (alignPosition == 2) + { + filteredModel.push(actionButton) } - label: Label{ - visible: false + } + return filteredModel + } + + // Put the delegate in a loader so we can connect to it's signals. + // We also need to use a different component based on the style of the action. + delegate: Loader + { + id: actionButton + sourceComponent: + { + if (modelData.button_style == 0) + { + return base.primaryButton + } else if (modelData.button_style == 1) + { + return base.link + } else if (modelData.button_style == 2) + { + return base.secondaryButton } + return base.primaryButton // We got to use something, so use primary. + } + property var model: modelData + Connections + { + target: actionButton.item + onClicked: base.model.actionTriggered(message.model_id, modelData.action_id) } } } } } - add: Transition { + add: Transition + { NumberAnimation { property: "opacity"; from: 0; to: 1; duration: 200; } } diff -Nru uranium-3.3.0/UM/Qt/qml/UM/Preferences/MachinesPage.qml uranium-4.4.1/UM/Qt/qml/UM/Preferences/MachinesPage.qml --- uranium-3.3.0/UM/Qt/qml/UM/Preferences/MachinesPage.qml 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Qt/qml/UM/Preferences/MachinesPage.qml 2019-11-19 10:50:46.000000000 +0000 @@ -1,4 +1,4 @@ -// Copyright (c) 2015 Ultimaker B.V. +// Copyright (c) 2018 Ultimaker B.V. // Uranium is released under the terms of the LGPLv3 or higher. import QtQuick 2.1 @@ -10,10 +10,10 @@ id: base; title: catalog.i18nc("@title:tab", "Printers"); - property int numInstances: model.rowCount(); + property int numInstances: model.count model: UM.MachineInstancesModel { - onDataChanged: numInstances = model.rowCount() + onDataChanged: numInstances = model.count } onAddObject: model.requestAddMachine(); @@ -31,7 +31,7 @@ Label { text: base.currentItem && base.currentItem.name ? base.currentItem.name : "" - font: UM.Theme.getFont("large") + font: UM.Theme.getFont("large_bold") width: parent.width elide: Text.ElideRight } diff -Nru uranium-3.3.0/UM/Qt/qml/UM/Preferences/ManagementPage.qml uranium-4.4.1/UM/Qt/qml/UM/Preferences/ManagementPage.qml --- uranium-3.3.0/UM/Qt/qml/UM/Preferences/ManagementPage.qml 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Qt/qml/UM/Preferences/ManagementPage.qml 2019-11-19 10:50:46.000000000 +0000 @@ -1,4 +1,4 @@ -// Copyright (c) 2015 Ultimaker B.V. +// Copyright (c) 2018 Ultimaker B.V. // Uranium is released under the terms of the LGPLv3 or higher. import QtQuick 2.1 @@ -15,6 +15,7 @@ property alias section: objectList.section; property alias delegate: objectList.delegate; property string nameRole: "name"; + property string sectionRole: "group" property bool detailsVisible: true; property variant objectList: objectList; @@ -85,7 +86,8 @@ width: base.detailsVisible ? Math.round(parent.width * 0.4) | 0 : parent.width; frameVisible: true; - Rectangle { + Rectangle + { parent: viewport anchors.fill: parent color: palette.light @@ -102,7 +104,7 @@ base.currentItem = (currentIndex != null) ? model.getItem(currentIndex) : null; } - section.property: "group" + section.property: base.sectionRole section.criteria: ViewSection.FullString section.delegate: Rectangle { @@ -122,8 +124,8 @@ delegate: Rectangle { - width: objectListContainer.viewport.width; - height: childrenRect.height; + width: objectListContainer.viewport.width + height: Math.round(childrenRect.height) color: ListView.isCurrentItem ? palette.highlight : index % 2 ? palette.base : palette.alternateBase Label @@ -179,10 +181,11 @@ onItemsChanged: { var itemIndex = -1; - if (base.currentItem === null) { + if (base.currentItem === null) + { return; } - for (var i = 0; i < objectList.model.rowCount(); ++i) + for (var i = 0; i < objectList.model.count; ++i) { if (objectList.model.getItem(i).id == base.currentItem.id) { diff -Nru uranium-3.3.0/UM/Qt/qml/UM/Preferences/PluginsPage.qml uranium-4.4.1/UM/Qt/qml/UM/Preferences/PluginsPage.qml --- uranium-3.3.0/UM/Qt/qml/UM/Preferences/PluginsPage.qml 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Qt/qml/UM/Preferences/PluginsPage.qml 1970-01-01 00:00:00.000000000 +0000 @@ -1,248 +0,0 @@ -// Copyright (c) 2015 Ultimaker B.V. -// Uranium is released under the terms of the LGPLv3 or higher. - -import QtQuick 2.1 -import QtQuick.Controls 1.1 -import QtQuick.Window 2.1 -import QtQuick.Controls.Styles 1.1 -import QtQuick.Dialogs 1.2 - -import UM 1.0 as UM - -import ".." - -PreferencesPage { - id: preferencesPage - - resetEnabled: false; - - title: catalog.i18nc("@title:tab", "Plugins"); - contents: Item { - anchors.fill: parent - - Button { - id: installButton - anchors.top: movedMessage.bottom - anchors.topMargin: UM.Theme.getSize("default_margin").height - onClicked: openDialog.open() - text: catalog.i18nc("@action:button", "Install new plugin") - } - - ScrollView { - anchors { - left: parent.left - right: parent.right - top: installButton.bottom - bottom: pluginsNote.top - } - frameVisible: true - ListView { - id:pluginList - delegate: pluginDelegate - model: UM.PluginsModel { } - section.delegate: Label { text: section } - section.property: "type" - anchors.fill:parent - } - } - Label { - id: pluginsNote - - text: catalog.i18nc("@label", "You will need to restart the application before changes in plugins have effect.") - wrapMode: Text.WordWrap - font.italic: true - - anchors.bottom: parent.bottom - } - } - - Item { - SystemPalette { id: palette } - - Component { - id: pluginDelegate - Rectangle { - width: pluginList.width; - height: childrenRect.height; - color: index % 2 ? palette.base : palette.alternateBase - - CheckBox { - id: pluginCheckbox - checked: model.enabled - onClicked: pluginList.model.setEnabled(model.id, checked) - enabled: !model.required - anchors.verticalCenter: pluginText.verticalCenter - x: y - } - Button - { - id: pluginText //is a button so the user doesn't have te click inconvenientley precise to enable or disable the checkbox - text: model.name - enabled: !model.required - onClicked: - { - pluginCheckbox.checked = !pluginCheckbox.checked; - pluginCheckbox.clicked(); - } - tooltip: model.description + (model.required ? ("\n" + catalog.i18nc("@label", "This plugin is required for the application to run.")) : "") - anchors.left: pluginCheckbox.visible ? pluginCheckbox.right : parent.left - anchors.right: pluginIcon.left - style: ButtonStyle - { - background: Item {} - label: Label - { - renderType: Text.NativeRendering - horizontalAlignment: Text.AlignLeft - text: control.text - } - } - } - Button - { - id: pluginIcon - text: catalog.i18nc("@label", "Info...") - anchors.right: parent.right - iconName: "help-about" - onClicked: - { - about_window.about_text = model.description - about_window.author_text = model.author - about_window.plugin_name = model.name - about_window.version_text = model.version - about_window.visibility = 1 - } - } - } - } - - MessageDialog - { - id: messageDialog - title: catalog.i18nc("@window:title", "Install Plugin"); - standardButtons: StandardButton.Ok - modality: Qt.ApplicationModal - } - - FileDialog - { - id: openDialog; - - title: catalog.i18nc("@title:window", "Open file(s)") - modality: UM.Application.platform == "linux" ? Qt.NonModal : Qt.WindowModal; - nameFilters: PluginRegistry.supportedPluginExtensions - onAccepted: - { - var result = PluginRegistry.installPlugin(fileUrl) - - messageDialog.text = result.message - if(result.status == "ok") - { - messageDialog.icon = StandardIcon.Information - } - else if(result.status == "duplicate") - { - messageDialog.icon = StandardIcon.Warning - } - else - { - messageDialog.icon = StandardIcon.Critical - } - messageDialog.open() - - } - onRejected: - { - console.log("Canceled") - } - } - - Dialog - { - id: about_window - - //: Default description for plugin - property variant about_text: catalog.i18nc("@label", "No text available") - - property variant author_text: "John doe" - property variant plugin_name: "" - property variant version_text: "" - - title: catalog.i18nc("@title:window", "About %1").arg(plugin_name) - - minimumWidth: screenScaleFactor * 320 - minimumHeight: screenScaleFactor * 240 - width: minimumWidth - height: minimumHeight - - Label - { - id: pluginTitle - text: about_window.plugin_name - font.pointSize: 18 - width: parent.width - wrapMode: Text.WordWrap - } - - Label - { - id: pluginCaption - text: about_window.about_text - height: about_window.about_text ? undefined : 0 //if there is no pluginCaption the row height is 0 for layout purposes - width: parent.width - wrapMode: Text.WordWrap - font.italic: true - anchors.top: pluginTitle.bottom - anchors.topMargin: about_window.about_text ? 3 : 0 //if there is no pluginCaption the topMargin is 0 for layout purposes - } - - Label - { - id: pluginAuthorLabel - //: About plugin dialog author label - text: catalog.i18nc("@label", "Author:"); - width: (0.4 * parent.width) | 0 - wrapMode: Text.WordWrap - anchors.top: pluginCaption.bottom - anchors.topMargin: 10 * screenScaleFactor - } - - Label - { - id: pluginAuthor; - text: about_window.author_text - width: (0.6 * parent.width) | 0 - wrapMode: Text.WordWrap - anchors.top: pluginCaption.bottom - anchors.left: pluginAuthorLabel.right - anchors.topMargin: 10 * screenScaleFactor - } - - Label - { - id: pluginVersionLabel - //: About plugin dialog version label - text: catalog.i18nc("@label", "Version:"); - width: Math.round(0.4 * parent.width) - wrapMode: Text.WordWrap - anchors.top: pluginAuthor.bottom - } - - Label - { - id: pluginVersion - text: about_window.version_text - width: Math.round(0.6 * parent.width) - anchors.top: pluginAuthor.bottom - anchors.left: pluginVersionLabel.right - } - - rightButtons: Button - { - //: Close "about plugin" dialog button - text: catalog.i18nc("@action:button", "Close"); - onClicked: about_window.visible = false; - } - } - } -} diff -Nru uranium-3.3.0/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml uranium-4.4.1/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml --- uranium-3.3.0/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Qt/qml/UM/Preferences/PreferencesDialog.qml 2019-11-19 10:50:46.000000000 +0000 @@ -103,6 +103,7 @@ leftButtons: Button { + id: defaultsButton text: catalog.i18nc("@action:button", "Defaults"); enabled: stackView.currentItem.resetEnabled; onClicked: stackView.currentItem.reset(); @@ -110,6 +111,7 @@ rightButtons: Button { + id: closeButton text: catalog.i18nc("@action:button", "Close"); iconName: "dialog-close"; onClicked: base.accept(); @@ -145,7 +147,6 @@ //This uses insertPage here because ListModel is stupid and does not allow using qsTr() on elements. insertPage(0, catalog.i18nc("@title:tab", "General"), Qt.resolvedUrl("GeneralPage.qml")); insertPage(1, catalog.i18nc("@title:tab", "Settings"), Qt.resolvedUrl("SettingVisibilityPage.qml")); - insertPage(2, catalog.i18nc("@title:tab", "Plugins"), Qt.resolvedUrl("PluginsPage.qml")); setPage(0) } diff -Nru uranium-3.3.0/UM/Qt/qml/UM/Preferences/PreferencesToolTip.qml uranium-4.4.1/UM/Qt/qml/UM/Preferences/PreferencesToolTip.qml --- uranium-3.3.0/UM/Qt/qml/UM/Preferences/PreferencesToolTip.qml 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Qt/qml/UM/Preferences/PreferencesToolTip.qml 1970-01-01 00:00:00.000000000 +0000 @@ -1,85 +0,0 @@ -// Copyright (c) 2015 Ultimaker B.V. -// Uranium is released under the terms of the LGPLv3 or higher. - -import QtQuick 2.2 -import QtQuick.Controls 1.1 - - -import UM 1.0 as UM - - -Rectangle{ - id: toolTip - property string text - property int delay - property int animationLength - property int xPos - property int yPos - SystemPalette{id: palette} - opacity: 0 - width: UM.Theme.getSize("tooltip").width - x: xPos - y: yPos - - function show(_text, _delay, _animationLength, _xPos, _yPos){ - toolTip.text = _text - toolTip.delay = _delay - toolTip.animationLength = _animationLength - - if (_xPos == undefined && _yPos == undefined){ - standardPlacement() - } - else { - toolTip.xPos = _xPos + UM.Theme.getSize("default_margin").width - toolTip.yPos = _yPos + UM.Theme.getSize("default_margin").height - } - toolTipTimer.restart() - } - - function hide(_delay, _animationLength){ - toolTip.delay = _delay - toolTip.animationLength = _animationLength - toolTipTimer.restart() - } - - function standardPlacement(){ - toolTip.anchors.top = base.top - toolTip.anchors.topMargin = base.height - settingsScrollView.height - toolTip.anchors.right = base.right - toolTip.anchors.rightMargin = UM.Theme.getSize("default_margin").width - } - - Timer { - id: toolTipTimer - repeat: false - interval: toolTip.delay - onTriggered: toolTip.opacity == 0 ? toolTip.opacity = 1 : toolTip.opacity = 0 //from opacty 0 to 1 and from 1 to 0 - } - - Behavior on opacity{ - NumberAnimation { - alwaysRunToEnd: true; - from: toolTip.opacity == 0 ? 0 : 1 //from 0 or 1 - to: toolTip.opacity == 0 ? 1 : 0 //to 1 or 0 - duration: toolTip.animationLength - } - } - - Label { - width: parent.width - UM.Theme.getSize("default_margin").width - wrapMode: Text.Wrap - text: parent.text - renderType: Text.NativeRendering - color: palette.text - Rectangle { - //a rectangle is used for the background because the childrenRect property generates an unjustified binding loop - z: parent.z - 1 - anchors.verticalCenter: parent.verticalCenter - anchors.horizontalCenter: parent.horizontalCenter - width: UM.Theme.getSize("tooltip").width - height: parent.height + UM.Theme.getSize("default_margin").width - color: palette.light - border.color: "black" - } - } -} diff -Nru uranium-3.3.0/UM/Qt/qml/UM/Preferences/ProfilesPage.qml uranium-4.4.1/UM/Qt/qml/UM/Preferences/ProfilesPage.qml --- uranium-3.3.0/UM/Qt/qml/UM/Preferences/ProfilesPage.qml 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Qt/qml/UM/Preferences/ProfilesPage.qml 1970-01-01 00:00:00.000000000 +0000 @@ -1,236 +0,0 @@ -// Copyright (c) 2015 Ultimaker B.V. -// Uranium is released under the terms of the LGPLv3 or higher. - -import QtQuick 2.1 -import QtQuick.Controls 1.1 -import QtQuick.Dialogs 1.2 - -import UM 1.1 as UM - -ManagementPage -{ - id: base; - - title: catalog.i18nc("@title:tab", "Profiles"); - addText: catalog.i18nc("@label", "Duplicate") - - model: UM.ProfilesModel { addWorkingProfile: true; } - - signal showProfileNameDialog() - onShowProfileNameDialog: { renameDialog.removeWhenRejected = true; renameDialog.open(); renameDialog.selectText(); } - - onAddObject: { - var selectedProfile; - if (objectList.currentIndex == 0) { - // Current settings - selectedProfile = UM.MachineManager.createProfile(); - } else { - selectedProfile = UM.MachineManager.duplicateProfile(currentItem.name); - } - base.selectProfile(selectedProfile); - - renameDialog.removeWhenRejected = true; - renameDialog.open(); - renameDialog.selectText(); - } - onRemoveObject: confirmDialog.open(); - onRenameObject: { renameDialog.removeWhenRejected = false; renameDialog.open(); renameDialog.selectText(); } - onActivateObject: if (activateEnabled) { UM.MachineManager.setActiveProfile(currentItem.name) } - - addEnabled: currentItem != null; - activateEnabled: currentItem != null && currentItem.id != -1 && !currentItem.active - removeEnabled: currentItem != null ? !currentItem.readOnly : false; - renameEnabled: currentItem != null ? !currentItem.readOnly : false; - - scrollviewCaption: catalog.i18nc("@label %1 is printer name","Printer: %1").arg(UM.MachineManager.activeMachineInstance) - - signal selectProfile(string name) - onSelectProfile: { - objectList.currentIndex = objectList.model.find("name", name); - } - - Item { - visible: base.currentItem != null - anchors.fill: parent - - Label { - id: profileName - text: base.currentItem ? base.currentItem.name : "" - font: UM.Theme.getFont("large") - width: parent.width - elide: Text.ElideRight - } - - ScrollView { - anchors.left: parent.left - anchors.top: profileName.bottom - anchors.topMargin: UM.Theme.getSize("default_margin").height - anchors.right: parent.right - anchors.bottom: parent.bottom - - Column - { - spacing: UM.Theme.getSize("default_margin").height - - Row - { - visible: base.currentItem.id == -1 || base.currentItem.active - Button - { - text: { - var profileName = UM.MachineManager.activeProfile; - profileName = profileName.length > 20 ? profileName.substring(0, 20) + '...' : profileName; - return base.currentItem.id == -1 ? catalog.i18nc("@action:button", "Update \"%1\"").arg(profileName) : - catalog.i18nc("@action:button", "Update profile"); - } - enabled: UM.ActiveProfile.hasCustomisedValues && !UM.ActiveProfile.readOnly - onClicked: UM.ActiveProfile.updateProfile() - } - - Button - { - text: base.currentItem.id == -1 ? catalog.i18nc("@action:button", "Discard current changes") : - catalog.i18nc("@action:button", "Reload profile"); - enabled: UM.ActiveProfile.hasCustomisedValues - onClicked: UM.ActiveProfile.discardChanges() - } - } - - Grid - { - id: containerGrid - columns: 2 - spacing: UM.Theme.getSize("default_margin").width - - Label { - text: base.currentItem == null ? "" : - base.currentItem.id == -1 ? catalog.i18nc("@label", "Based on") : catalog.i18nc("@label", "Profile type") - } - Label { - text: base.currentItem == null ? "" : - base.currentItem.id == -1 ? UM.MachineManager.activeProfile : - base.currentItem.readOnly ? catalog.i18nc("@label", "Protected profile") : catalog.i18nc("@label", "Custom profile") - } - - Column { - Repeater { - model: base.currentItem ? base.currentItem.settings : null - Label { - text: modelData.name.toString(); - elide: Text.ElideMiddle; - } - } - } - Column { - Repeater { - model: base.currentItem ? base.currentItem.settings : null - Label { text: modelData.value.toString(); } - } - } - } - } - } - } - - buttons: Row { - - Button - { - text: catalog.i18nc("@action:button", "Import"); - iconName: "document-import"; - onClicked: importDialog.open(); - } - - Button - { - text: catalog.i18nc("@action:button", "Export"); - iconName: "document-export"; - onClicked: exportDialog.open(); - } - } - - Item - { - UM.I18nCatalog { id: catalog; name: "uranium"; } - - ConfirmRemoveDialog - { - id: confirmDialog; - object: base.currentItem != null ? base.currentItem.name : ""; - onYes: { - base.model.removeProfile(base.currentItem.name); - base.objectList.currentIndex = base.activeIndex(); - } - } - RenameDialog - { - id: renameDialog; - object: base.currentItem != null ? base.currentItem.name : ""; - property bool removeWhenRejected: false; - onAccepted: { - var i = base.objectList.currentIndex - base.model.renameProfile(base.currentItem.name, newName.trim()); - base.objectList.currentIndex = i; - } - onRejected: { - if(removeWhenRejected) { - base.model.removeProfile(base.currentItem.name) - } - } - } - MessageDialog - { - id: messageDialog - title: catalog.i18nc("@window:title", "Import Profile"); - standardButtons: StandardButton.Ok - modality: Qt.ApplicationModal - } - - FileDialog - { - id: importDialog; - title: catalog.i18nc("@title:window", "Import Profile"); - selectExisting: true; - nameFilters: base.model.getFileNameFiltersRead() - folder: base.model.getDefaultPath() - onAccepted: - { - var result = base.model.importProfile(fileUrl) - messageDialog.text = result.message - if(result.status == "ok") - { - messageDialog.icon = StandardIcon.Information - } - else if(result.status == "duplicate") - { - messageDialog.icon = StandardIcon.Warning - } - else - { - messageDialog.icon = StandardIcon.Critical - } - messageDialog.open() - } - } - - FileDialog - { - id: exportDialog; - title: catalog.i18nc("@title:window", "Export Profile"); - selectExisting: false; - nameFilters: base.model.getFileNameFiltersWrite() - folder: base.model.getDefaultPath() - onAccepted: - { - var result = base.model.exportProfile(base.currentItem.id, base.currentItem.name, fileUrl, selectedNameFilter) - if(result && result.status == "error") - { - messageDialog.icon = StandardIcon.Critical - messageDialog.text = result.message - messageDialog.open() - } - // else pop-up Message thing from python code - } - } - } -} diff -Nru uranium-3.3.0/UM/Qt/qml/UM/Preferences/RenameDialog.qml uranium-4.4.1/UM/Qt/qml/UM/Preferences/RenameDialog.qml --- uranium-3.3.0/UM/Qt/qml/UM/Preferences/RenameDialog.qml 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Qt/qml/UM/Preferences/RenameDialog.qml 2019-11-19 10:50:46.000000000 +0000 @@ -1,4 +1,4 @@ -// Copyright (c) 2015 Ultimaker B.V. +// Copyright (c) 2019 Ultimaker B.V. // Uranium is released under the terms of the LGPLv3 or higher. import QtQuick 2.1 @@ -10,59 +10,73 @@ UM.Dialog { - id: base; - property string object: ""; + id: base + property string object: "" - property alias newName: nameField.text; - property bool validName: true; - property string validationError; - property string dialogTitle: catalog.i18nc("@title:window", "Rename"); + property alias newName: nameField.text + property bool validName: true + property string validationError + property string dialogTitle: catalog.i18nc("@title:window", "Rename") + property string explanation: catalog.i18nc("@info", "Please provide a new name.") - title: dialogTitle; + title: dialogTitle minimumWidth: 400 * screenScaleFactor minimumHeight: 120 * screenScaleFactor width: minimumWidth height: minimumHeight - property variant catalog: UM.I18nCatalog { name: "uranium"; } + property variant catalog: UM.I18nCatalog { name: "uranium" } - signal textChanged(string text); + signal textChanged(string text) signal selectText() - onSelectText: { + onSelectText: + { nameField.selectAll(); nameField.focus = true; } - Column { - anchors.fill: parent; + Column + { + anchors.fill: parent + + Label + { + text: base.explanation + "\n" //Newline to make some space using system theming. + width: parent.width + wrapMode: Text.WordWrap + } - TextField { - id: nameField; - width: parent.width; - text: base.object; - maximumLength: 40; - onTextChanged: base.textChanged(text); + TextField + { + id: nameField + width: parent.width + text: base.object + maximumLength: 40 + onTextChanged: base.textChanged(text) } - Label { - visible: !base.validName; - text: base.validationError; + Label + { + visible: !base.validName + text: base.validationError } } rightButtons: [ - Button { - text: catalog.i18nc("@action:button","Cancel"); - onClicked: base.reject(); + Button + { + id: cancelButton + text: catalog.i18nc("@action:button","Cancel") + onClicked: base.reject() }, - Button { - text: catalog.i18nc("@action:button", "OK"); - onClicked: base.accept(); - enabled: base.validName; - isDefault: true; + Button + { + text: catalog.i18nc("@action:button", "OK") + onClicked: base.accept() + enabled: base.validName + isDefault: true } - ] } diff -Nru uranium-3.3.0/UM/Qt/qml/UM/Preferences/SettingVisibilityCategory.qml uranium-4.4.1/UM/Qt/qml/UM/Preferences/SettingVisibilityCategory.qml --- uranium-3.3.0/UM/Qt/qml/UM/Preferences/SettingVisibilityCategory.qml 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Qt/qml/UM/Preferences/SettingVisibilityCategory.qml 2019-11-19 10:50:46.000000000 +0000 @@ -58,5 +58,5 @@ checkable: true checked: definition? definition.expanded : "" - onClicked: definition.expanded ? settingDefinitionsModel.collapse(definition.key) : settingDefinitionsModel.expandAll(definition.key) + onClicked: definition.expanded ? settingDefinitionsModel.collapse(definition.key) : settingDefinitionsModel.expandRecursive(definition.key) } diff -Nru uranium-3.3.0/UM/Qt/qml/UM/Preferences/SettingVisibilityItem.qml uranium-4.4.1/UM/Qt/qml/UM/Preferences/SettingVisibilityItem.qml --- uranium-3.3.0/UM/Qt/qml/UM/Preferences/SettingVisibilityItem.qml 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Qt/qml/UM/Preferences/SettingVisibilityItem.qml 2019-11-19 10:50:46.000000000 +0000 @@ -11,8 +11,6 @@ Item { // Use the depth of the model to move the item, but also leave space for the visibility / enabled exclamation mark. - property var visibilityChangeCallback - x: definition ? (definition.depth + 1)* UM.Theme.getSize("default_margin").width : UM.Theme.getSize("default_margin").width UM.TooltipArea { @@ -83,16 +81,11 @@ checked: definition ? definition.visible: false enabled: definition ? !definition.prohibited: false - MouseArea { - anchors.fill: parent; - - onClicked: - { - definitionsModel.setVisible(definition.key, !check.checked); + MouseArea + { + anchors.fill: parent - if (visibilityChangeCallback != null) - visibilityChangeCallback() - } + onClicked: definitionsModel.setVisible(definition.key, !check.checked) } } } diff -Nru uranium-3.3.0/UM/Qt/qml/UM/Preferences/SettingVisibilityPage.qml uranium-4.4.1/UM/Qt/qml/UM/Preferences/SettingVisibilityPage.qml --- uranium-3.3.0/UM/Qt/qml/UM/Preferences/SettingVisibilityPage.qml 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Qt/qml/UM/Preferences/SettingVisibilityPage.qml 1970-01-01 00:00:00.000000000 +0000 @@ -1,151 +0,0 @@ -// Copyright (c) 2016 Ultimaker B.V. -// Uranium is released under the terms of the LGPLv3 or higher. - -import QtQuick 2.1 -import QtQuick.Controls 1.1 -import QtQuick.Controls.Styles 1.1 - -import UM 1.2 as UM - -PreferencesPage -{ - title: catalog.i18nc("@title:tab", "Setting Visibility"); - - property int scrollToIndex: 0 - - signal scrollToSection( string key ) - onScrollToSection: - { - settingsListView.positionViewAtIndex(definitionsModel.getIndex(key), ListView.Beginning) - } - - function reset() - { - UM.Preferences.resetPreference("general/visible_settings") - } - resetEnabled: true; - - Item - { - id: base; - anchors.fill: parent; - - CheckBox - { - id: toggleVisibleSettings - anchors - { - verticalCenter: filter.verticalCenter; - left: parent.left; - leftMargin: UM.Theme.getSize("default_margin").width - } - text: catalog.i18nc("@label:textbox", "Check all") - checkedState: - { - if(definitionsModel.visibleCount == definitionsModel.categoryCount) - { - return Qt.Unchecked - } - else if(definitionsModel.visibleCount == definitionsModel.rowCount(null)) - { - return Qt.Checked - } - else - { - return Qt.PartiallyChecked - } - } - partiallyCheckedEnabled: true - - MouseArea - { - anchors.fill: parent; - onClicked: - { - if(parent.checkedState == Qt.Unchecked || parent.checkedState == Qt.PartiallyChecked) - { - definitionsModel.setAllExpandedVisible(true) - } - else - { - definitionsModel.setAllExpandedVisible(false) - } - } - } - } - - TextField - { - id: filter; - - anchors - { - top: parent.top - left: toggleVisibleSettings.right - leftMargin: UM.Theme.getSize("default_margin").width - right: parent.right - } - - placeholderText: catalog.i18nc("@label:textbox", "Filter...") - - onTextChanged: definitionsModel.filter = {"i18n_label": "*" + text} - } - - ScrollView - { - id: scrollView - - frameVisible: true - - anchors - { - top: filter.bottom; - topMargin: UM.Theme.getSize("default_margin").height - left: parent.left; - right: parent.right; - bottom: parent.bottom; - } - ListView - { - id: settingsListView - - model: UM.SettingDefinitionsModel - { - id: definitionsModel - containerId: "" - showAll: true - exclude: [""] - expanded: ["*"] - visibilityHandler: UM.SettingPreferenceVisibilityHandler { } - } - - delegate: Loader - { - id: loader - - width: parent.width - height: model.type != undefined ? UM.Theme.getSize("section").height : 0 - - property var definition: model - property var settingDefinitionsModel: definitionsModel - - asynchronous: true - active: model.type != undefined - source: - { - switch(model.type) - { - case "category": - return "SettingVisibilityCategory.qml" - default: - return "SettingVisibilityItem.qml" - } - } - } - } - } - - UM.I18nCatalog { name: "uranium"; } - SystemPalette { id: palette; } - } -} diff -Nru uranium-3.3.0/UM/Qt/qml/UM/ProgressBar.qml uranium-4.4.1/UM/Qt/qml/UM/ProgressBar.qml --- uranium-3.3.0/UM/Qt/qml/UM/ProgressBar.qml 1970-01-01 00:00:00.000000000 +0000 +++ uranium-4.4.1/UM/Qt/qml/UM/ProgressBar.qml 2019-11-19 10:50:46.000000000 +0000 @@ -0,0 +1,62 @@ +// Copyright (c) 2019 Ultimaker B.V. +// Uranium is released under the terms of the LGPLv3 or higher. + +import QtQuick 2.10 +import QtQuick.Controls 2.3 as Controls + +import UM 1.3 as UM + +// +// Styled progress bar, with colours from the theme and rounded corners. +// +Controls.ProgressBar +{ + id: progressBar + width: parent.width + height: UM.Theme.getSize("progressbar").height + + background: Rectangle + { + anchors.fill: parent + radius: UM.Theme.getSize("progressbar_radius").width + color: UM.Theme.getColor("progressbar_background") + } + + contentItem: Item + { + anchors.fill: parent + + // The progress block for showing progress value + Rectangle + { + id: progressBlockDeterminate + x: progressBar.indeterminate ? progressBar.visualPosition * parent.width : 0 + width: progressBar.indeterminate ? parent.width * 0.1 : progressBar.visualPosition * parent.width + height: parent.height + radius: UM.Theme.getSize("progressbar_radius").width + color: UM.Theme.getColor("progressbar_control") + } + SequentialAnimation + { + PropertyAnimation + { + target: progressBar + property: "value" + from: 0 + to: 0.9 // The block is not centered, so let it go to 90% (since it's 10% long) + duration: 3000 + } + PropertyAnimation + { + target: progressBar + property: "value" + from: 0.9 // The block is not centered, so let it go to 90% (since it's 10% long) + to: 0 + duration: 3000 + } + + loops: Animation.Infinite + running: progressBar.visible && progressBar.indeterminate + } + } +} diff -Nru uranium-3.3.0/UM/Qt/qml/UM/qmldir uranium-4.4.1/UM/Qt/qml/UM/qmldir --- uranium-3.3.0/UM/Qt/qml/UM/qmldir 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Qt/qml/UM/qmldir 2019-11-19 10:50:46.000000000 +0000 @@ -21,4 +21,7 @@ TooltipArea 1.1 TooltipArea.qml +ProgressBar 1.3 ProgressBar.qml SimpleButton 1.1 SimpleButton.qml +TabRow 1.3 TabRow.qml +TabRowButton 1.3 TabRowButton.qml \ No newline at end of file diff -Nru uranium-3.3.0/UM/Qt/qml/UM/RecolorImage.qml uranium-4.4.1/UM/Qt/qml/UM/RecolorImage.qml --- uranium-3.3.0/UM/Qt/qml/UM/RecolorImage.qml 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Qt/qml/UM/RecolorImage.qml 2019-11-19 10:50:46.000000000 +0000 @@ -1,74 +1,31 @@ -// Copyright (c) 2015 Ultimaker B.V. +// Copyright (c) 2018 Ultimaker B.V. // Uranium is released under the terms of the LGPLv3 or higher. import QtQuick 2.1 +import QtGraphicalEffects 1.0 import UM 1.3 as UM -Item { +Item +{ id: base; - property alias source: img.source; - property alias color: shader.color; - property alias sourceSize: img.sourceSize; - - Image { - id: img; - anchors.fill: parent; - visible: false; + property alias source: img.source + property alias color: overlay.color + property alias sourceSize: img.sourceSize + + Image + { + id: img + anchors.fill: parent + visible: false + sourceSize.width: parent.width + sourceSize.height: parent.height } - ShaderEffect { - id: shader; - anchors.fill: parent; - - property variant src: img; - property color color: "#fff"; - - vertexShader: UM.OpenGLContextProxy.isLegacyOpenGL ? - " - uniform highp mat4 qt_Matrix; - attribute highp vec4 qt_Vertex; - attribute highp vec2 qt_MultiTexCoord0; - varying highp vec2 coord; - void main() { - coord = qt_MultiTexCoord0; - gl_Position = qt_Matrix * qt_Vertex; - } - " : " - #version 410 - uniform highp mat4 qt_Matrix; - in highp vec4 qt_Vertex; - in highp vec2 qt_MultiTexCoord0; - out highp vec2 coord; - void main() { - coord = qt_MultiTexCoord0; - gl_Position = qt_Matrix * qt_Vertex; - } - " - - fragmentShader: UM.OpenGLContextProxy.isLegacyOpenGL ? - " - varying highp vec2 coord; - uniform sampler2D src; - uniform lowp vec4 color; - uniform lowp float qt_Opacity; - void main() { - lowp vec4 tex = texture2D(src, coord); - lowp float alpha = tex.a * qt_Opacity; - gl_FragColor = vec4(color.r * alpha, color.g * alpha, color.b * alpha, alpha); - } - " : " - #version 410 - in highp vec2 coord; - uniform sampler2D src; - uniform lowp vec4 color; - uniform lowp float qt_Opacity; - out vec4 frag_color; - void main() { - lowp vec4 tex = texture(src, coord); - lowp float alpha = tex.a * qt_Opacity; - frag_color = vec4(color.r * alpha, color.g * alpha, color.b * alpha, alpha); - } - " + ColorOverlay { + id: overlay + anchors.fill: parent + source: img + color: "#fff" } } diff -Nru uranium-3.3.0/UM/Qt/qml/UM/SimpleButton.qml uranium-4.4.1/UM/Qt/qml/UM/SimpleButton.qml --- uranium-3.3.0/UM/Qt/qml/UM/SimpleButton.qml 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Qt/qml/UM/SimpleButton.qml 2019-11-19 10:50:46.000000000 +0000 @@ -1,4 +1,4 @@ -// Copyright (c) 2015 Ultimaker B.V. +// Copyright (c) 2018 Ultimaker B.V. // Uranium is released under the terms of the LGPLv3 or higher. import QtQuick 2.1 @@ -7,32 +7,34 @@ { id: base - hoverEnabled: true; + hoverEnabled: true - property color color: "black"; - property color hoverColor: color; - property color backgroundColor: "transparent"; - property color hoverBackgroundColor: backgroundColor; - property alias iconSource: image.source; - - property alias hovered: base.containsMouse; - - Rectangle { - id: background; - anchors.fill: parent; - color: base.containsMouse ? base.hoverBackgroundColor : base.backgroundColor; + property color color: "black" + property color hoverColor: color + property color backgroundColor: "transparent" + property color hoverBackgroundColor: backgroundColor + property alias iconSource: image.source + property real iconMargin: 0 + + property alias hovered: base.containsMouse + + Rectangle + { + id: background + anchors.fill: parent + color: base.containsMouse ? base.hoverBackgroundColor : base.backgroundColor } - RecolorImage { - id: image; + RecolorImage + { + id: image - anchors.fill: parent; - - sourceSize.width: width + anchors.fill: parent + anchors.margins: base.iconMargin sourceSize.height: width - color: base.containsMouse ? base.hoverColor : base.color; + color: base.containsMouse ? base.hoverColor : base.color - visible: source != ""; + visible: source != "" } } diff -Nru uranium-3.3.0/UM/Qt/qml/UM/TabRowButton.qml uranium-4.4.1/UM/Qt/qml/UM/TabRowButton.qml --- uranium-3.3.0/UM/Qt/qml/UM/TabRowButton.qml 1970-01-01 00:00:00.000000000 +0000 +++ uranium-4.4.1/UM/Qt/qml/UM/TabRowButton.qml 2019-11-19 10:50:46.000000000 +0000 @@ -0,0 +1,61 @@ +// Copyright (c) 2018 Ultimaker B.V. +// Uranium is released under the terms of the LGPLv3 or higher. + +import QtQuick 2.10 +import QtQuick.Controls 2.3 +import UM 1.2 as UM + +/* + * Wrapper around TabButton to use our theming and sane defaults. + */ +TabButton +{ + anchors.top: parent.top + height: parent.height + checked: model.index == 0 //First button is checked by default. + + background: Rectangle + { + radius: UM.Theme.getSize("default_radius").width + border.color: UM.Theme.getColor("lining") + border.width: UM.Theme.getSize("default_lining").width + color: UM.Theme.getColor(parent.checked ? "main_background" : (parent.hovered ? "action_button_hovered" : "secondary")) + + //Make the lining go straight down on the bottom side of the left and right sides. + Rectangle + { + anchors.bottom: parent.bottom + width: parent.width + //We take almost the entire height of the tab button, since this "manual" lining has no anti-aliasing. + //We can hardly prevent anti-aliasing on the border of the tab since the tabs are positioned with some spacing that is not necessarily a multiple of the number of tabs. + height: parent.height - (parent.radius + parent.border.width) + color: parent.border.color + + //Don't add lining at the bottom side. + Rectangle + { + anchors + { + bottom: parent.bottom + bottomMargin: parent.parent.parent.checked ? 0 : parent.parent.border.width //Allow margin if tab is not selected. + left: parent.left + leftMargin: parent.parent.border.width + right: parent.right + rightMargin: parent.parent.border.width + } + color: parent.parent.color + height: parent.height - anchors.bottomMargin + } + } + } + contentItem: Label + { + anchors.centerIn: parent + horizontalAlignment: Text.AlignHCenter + verticalAlignment: Text.AlignVCenter + text: parent.text + font: parent.checked ? UM.Theme.getFont("default_bold") : UM.Theme.getFont("default") + color: UM.Theme.getColor("text") + renderType: Text.NativeRendering + } +} diff -Nru uranium-3.3.0/UM/Qt/qml/UM/TabRow.qml uranium-4.4.1/UM/Qt/qml/UM/TabRow.qml --- uranium-3.3.0/UM/Qt/qml/UM/TabRow.qml 1970-01-01 00:00:00.000000000 +0000 +++ uranium-4.4.1/UM/Qt/qml/UM/TabRow.qml 2019-11-19 10:50:46.000000000 +0000 @@ -0,0 +1,27 @@ +// Copyright (c) 2018 Ultimaker B.V. +// Uranium is released under the terms of the LGPLv3 or higher. + +import QtQuick 2.10 +import QtQuick.Controls 2.3 +import UM 1.2 as UM + +/* + * Wrapper around TabBar that uses our theming and more sane defaults. + */ +TabBar +{ + id: base + + width: parent.width + height: visible ? 40 * screenScaleFactor : 0 + + spacing: UM.Theme.getSize("narrow_margin").width //Space between the tabs. + + background: Rectangle + { + width: parent.width + anchors.bottom: parent.bottom + height: UM.Theme.getSize("default_lining").height + color: UM.Theme.getColor("lining") + } +} \ No newline at end of file diff -Nru uranium-3.3.0/UM/Qt/qml/UM/TooltipArea.qml uranium-4.4.1/UM/Qt/qml/UM/TooltipArea.qml --- uranium-3.3.0/UM/Qt/qml/UM/TooltipArea.qml 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Qt/qml/UM/TooltipArea.qml 2019-11-19 10:50:46.000000000 +0000 @@ -1,3 +1,6 @@ +// Copyright (c) 2018 Ultimaker B.V. +// Uranium is released under the terms of the LGPLv3 or higher. + import QtQuick 2.4 import QtQuick.Controls.Private 1.0 @@ -6,7 +9,8 @@ // Tested on: Qt 5.4.1 // Based on https://www.kullo.net/blog/tooltiparea-the-missing-tooltip-component-of-qt-quick/ -MouseArea { +MouseArea +{ id: _root property string text: "" @@ -15,7 +19,8 @@ onExited: Tooltip.hideText() onCanceled: Tooltip.hideText() - Timer { + Timer + { interval: 1000 running: _root.enabled && _root.containsMouse && _root.text.length onTriggered: Tooltip.showText(_root, Qt.point(_root.mouseX, _root.mouseY), wrapText(_root.text)) diff -Nru uranium-3.3.0/UM/Qt/qml/UM/Wizard.qml uranium-4.4.1/UM/Qt/qml/UM/Wizard.qml --- uranium-3.3.0/UM/Qt/qml/UM/Wizard.qml 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Qt/qml/UM/Wizard.qml 2019-11-19 10:50:46.000000000 +0000 @@ -1,5 +1,5 @@ -// Copyright (c) 2015 Ultimaker B.V. -// Cura is released under the terms of the LGPLv3 or higher. +// Copyright (c) 2018 Ultimaker B.V. +// Uranium is released under the terms of the LGPLv3 or higher. import QtQuick 2.2 import QtQuick.Controls 1.1 @@ -150,11 +150,11 @@ anchors.top: progressButton.bottom x: ((wizardProgress.width - progressArrow.width) / 2) | 0 visible: pagesModel.get(pagesModel.count - 1) && title != pagesModel.get(pagesModel.count - 1).title ? true : false - UM.RecolorImage { + UM.RecolorImage + { id: downArrow width: UM.Theme.getSize("standard_arrow").width height: UM.Theme.getSize("standard_arrow").height - sourceSize.width: width sourceSize.height: width color: palette.mid source: UM.Theme.getIcon("arrow_bottom") diff -Nru uranium-3.3.0/UM/Qt/QtApplication.py uranium-4.4.1/UM/Qt/QtApplication.py --- uranium-3.3.0/UM/Qt/QtApplication.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Qt/QtApplication.py 2019-11-19 10:50:46.000000000 +0000 @@ -1,50 +1,67 @@ -# Copyright (c) 2017 Ultimaker B.V. +# Copyright (c) 2018 Ultimaker B.V. # Uranium is released under the terms of the LGPLv3 or higher. import sys import os import signal -from typing import Dict, Optional +from typing import List +from typing import Any, cast, Dict, Optional - -from PyQt5.QtCore import Qt, QCoreApplication, QEvent, QUrl, pyqtProperty, pyqtSignal, pyqtSlot, QLocale, QTranslator, QLibraryInfo, QT_VERSION_STR, PYQT_VERSION_STR -from PyQt5.QtQml import QQmlApplicationEngine, QQmlComponent, QQmlContext +from PyQt5.QtCore import Qt, QCoreApplication, QEvent, QUrl, pyqtProperty, pyqtSignal, QT_VERSION_STR, PYQT_VERSION_STR +from UM.FlameProfiler import pyqtSlot +from PyQt5.QtQml import QQmlApplicationEngine, QQmlComponent, QQmlContext, QQmlError from PyQt5.QtWidgets import QApplication, QSplashScreen, QMessageBox, QSystemTrayIcon -from PyQt5.QtGui import QGuiApplication, QIcon, QPixmap, QFontMetrics +from PyQt5.QtGui import QIcon, QPixmap, QFontMetrics from PyQt5.QtCore import QTimer +from UM.Backend.Backend import Backend #For typing. +from UM.ConfigurationErrorMessage import ConfigurationErrorMessage from UM.FileHandler.ReadFileJob import ReadFileJob +from UM.FileHandler.WriteFileJob import WriteFileJob +from UM.Mesh.MeshFileHandler import MeshFileHandler +from UM.Qt.Bindings.Theme import Theme +from UM.Workspace.WorkspaceFileHandler import WorkspaceFileHandler from UM.Application import Application +from UM.PackageManager import PackageManager #For typing. from UM.Qt.QtRenderer import QtRenderer from UM.Qt.Bindings.Bindings import Bindings +from UM.Qt.Bindings.MainWindow import MainWindow #For typing. from UM.Signal import Signal, signalemitter from UM.Resources import Resources from UM.Logger import Logger -from UM.Preferences import Preferences +from UM.Message import Message #For typing. from UM.i18n import i18nCatalog +from UM.Job import Job #For typing. from UM.JobQueue import JobQueue +from UM.VersionUpgradeManager import VersionUpgradeManager from UM.View.GL.OpenGLContext import OpenGLContext +from UM.Version import Version + +from UM.Operations.GroupedOperation import GroupedOperation #To clear the scene. +from UM.Operations.RemoveSceneNodeOperation import RemoveSceneNodeOperation #To clear the scene. +from UM.Scene.Iterator.DepthFirstIterator import DepthFirstIterator #To clear the scene. +from UM.Scene.SceneNode import SceneNode #To clear the scene. +from UM.Scene.Selection import Selection #To clear the selection after clearing the scene. + import UM.Settings.InstanceContainer # For version upgrade to know the version number. import UM.Settings.ContainerStack # For version upgrade to know the version number. import UM.Preferences # For version upgrade to know the version number. -import UM.VersionUpgradeManager from UM.Mesh.ReadMeshJob import ReadMeshJob import UM.Qt.Bindings.Theme from UM.PluginRegistry import PluginRegistry -MYPY = False -if MYPY: - from PyQt5.QtCore import QObject +from PyQt5.QtCore import QObject # Raised when we try to use an unsupported version of a dependency. class UnsupportedVersionError(Exception): pass -# Check PyQt version, we only support 5.4 or higher. + +# Check PyQt version, we only support 5.9 or higher. major, minor = PYQT_VERSION_STR.split(".")[0:2] -if int(major) < 5 or int(minor) < 4: - raise UnsupportedVersionError("This application requires at least PyQt 5.4.0") +if int(major) < 5 or (int(major) == 5 and int(minor) < 9): + raise UnsupportedVersionError("This application requires at least PyQt 5.9.0") ## Application subclass that provides a Qt application object. @@ -53,131 +70,226 @@ pluginsLoaded = Signal() applicationRunning = Signal() - def __init__(self, tray_icon_name = None, **kwargs): + def __init__(self, tray_icon_name: str = None, **kwargs) -> None: plugin_path = "" if sys.platform == "win32": if hasattr(sys, "frozen"): plugin_path = os.path.join(os.path.dirname(os.path.abspath(sys.executable)), "PyQt5", "plugins") - Logger.log("i", "Adding QT5 plugin path: %s" % (plugin_path)) + Logger.log("i", "Adding QT5 plugin path: %s", plugin_path) QCoreApplication.addLibraryPath(plugin_path) else: import site for sitepackage_dir in site.getsitepackages(): QCoreApplication.addLibraryPath(os.path.join(sitepackage_dir, "PyQt5", "plugins")) elif sys.platform == "darwin": - plugin_path = os.path.join(Application.getInstallPrefix(), "Resources", "plugins") + plugin_path = os.path.join(self.getInstallPrefix(), "Resources", "plugins") if plugin_path: - Logger.log("i", "Adding QT5 plugin path: %s" % (plugin_path)) + Logger.log("i", "Adding QT5 plugin path: %s", plugin_path) QCoreApplication.addLibraryPath(plugin_path) + # use Qt Quick Scene Graph "basic" render loop os.environ["QSG_RENDER_LOOP"] = "basic" - super().__init__(sys.argv, **kwargs) + super().__init__(sys.argv, **kwargs) # type: ignore + + self._qml_import_paths = [] #type: List[str] + self._main_qml = "main.qml" #type: str + self._qml_engine = None #type: Optional[QQmlApplicationEngine] + self._main_window = None #type: Optional[MainWindow] + self._tray_icon_name = tray_icon_name #type: Optional[str] + self._tray_icon = None #type: Optional[str] + self._tray_icon_widget = None #type: Optional[QSystemTrayIcon] + self._theme = None #type: Optional[Theme] + self._renderer = None #type: Optional[QtRenderer] + + self._job_queue = None #type: Optional[JobQueue] + self._version_upgrade_manager = None #type: Optional[VersionUpgradeManager] + + self._is_shutting_down = False #type: bool + + self._recent_files = [] #type: List[QUrl] + + self._configuration_error_message = None #type: Optional[ConfigurationErrorMessage] + + def addCommandLineOptions(self) -> None: + super().addCommandLineOptions() + # This flag is used by QApplication. We don't process it. + self._cli_parser.add_argument("-qmljsdebugger", + help = "For Qt's QML debugger compatibility") + + def initialize(self) -> None: + super().initialize() + # Initialize the package manager to remove and install scheduled packages. + self._package_manager = self._package_manager_class(self, parent = self) + + self._mesh_file_handler = MeshFileHandler(self) #type: MeshFileHandler + self._workspace_file_handler = WorkspaceFileHandler(self) #type: WorkspaceFileHandler + + # Remove this and you will get Windows 95 style for all widgets if you are using Qt 5.10+ + self.setStyle("fusion") self.setAttribute(Qt.AA_UseDesktopOpenGL) major_version, minor_version, profile = OpenGLContext.detectBestOpenGLVersion() - if major_version is None and minor_version is None and profile is None: + if major_version is None and minor_version is None and profile is None and not self.getIsHeadLess(): Logger.log("e", "Startup failed because OpenGL version probing has failed: tried to create a 2.0 and 4.1 context. Exiting") QMessageBox.critical(None, "Failed to probe OpenGL", - "Could not probe OpenGL. This program requires OpenGL 2.0 or higher. Please check your video card drivers.") + "Could not probe OpenGL. This program requires OpenGL 2.0 or higher. Please check your video card drivers.") sys.exit(1) else: - Logger.log("d", "Detected most suitable OpenGL context version: %s" % ( - OpenGLContext.versionAsText(major_version, minor_version, profile))) - OpenGLContext.setDefaultFormat(major_version, minor_version, profile = profile) - - self._plugins_loaded = False # Used to determine when it's safe to use the plug-ins. - self._main_qml = "main.qml" - self._engine = None - self._renderer = None - self._main_window = None - self._theme = None + opengl_version_str = OpenGLContext.versionAsText(major_version, minor_version, profile) + Logger.log("d", "Detected most suitable OpenGL context version: %s", opengl_version_str) + if not self.getIsHeadLess(): + OpenGLContext.setDefaultFormat(major_version, minor_version, profile = profile) - self._shutting_down = False - self._qml_import_paths = [] self._qml_import_paths.append(os.path.join(os.path.dirname(sys.executable), "qml")) - self._qml_import_paths.append(os.path.join(Application.getInstallPrefix(), "Resources", "qml")) + self._qml_import_paths.append(os.path.join(self.getInstallPrefix(), "Resources", "qml")) - self.parseCommandLine() - Logger.log("i", "Command line arguments: %s", self._parsed_command_line) + Logger.log("i", "Initializing job queue ...") + self._job_queue = JobQueue() + self._job_queue.jobFinished.connect(self._onJobFinished) + + Logger.log("i", "Initializing version upgrade manager ...") + self._version_upgrade_manager = VersionUpgradeManager(self) + + def startSplashWindowPhase(self) -> None: + super().startSplashWindowPhase() + i18n_catalog = i18nCatalog("uranium") + self.showSplashMessage(i18n_catalog.i18nc("@info:progress", "Initializing package manager...")) + self._package_manager.initialize() + + # Read preferences here (upgrade won't work) to get the language in use, so the splash window can be shown in + # the correct language. + try: + preferences_filename = Resources.getPath(Resources.Preferences, self._app_name + ".cfg") + self._preferences.readFromFile(preferences_filename) + except FileNotFoundError: + Logger.log("i", "Preferences file not found, ignore and use default language '%s'", self._default_language) signal.signal(signal.SIGINT, signal.SIG_DFL) # This is done here as a lot of plugins require a correct gl context. If you want to change the framework, # these checks need to be done in your Application.py class __init__(). - i18n_catalog = i18nCatalog("uranium") - + self._configuration_error_message = ConfigurationErrorMessage(self, + i18n_catalog.i18nc("@info:status", "Your configuration seems to be corrupt."), + lifetime = 0, + title = i18n_catalog.i18nc("@info:title", "Configuration errors") + ) + # Remove, install, and then loading plugins self.showSplashMessage(i18n_catalog.i18nc("@info:progress", "Loading plugins...")) # Remove and install the plugins that have been scheduled self._plugin_registry.initializeBeforePluginsAreLoaded() self._loadPlugins() - self._plugin_registry.initializeAfterPlguinsAreLoaded() self._plugin_registry.checkRequiredPlugins(self.getRequiredPlugins()) self.pluginsLoaded.emit() self.showSplashMessage(i18n_catalog.i18nc("@info:progress", "Updating configuration...")) - UM.VersionUpgradeManager.VersionUpgradeManager.getInstance().upgrade() + with self._container_registry.lockFile(): + VersionUpgradeManager.getInstance().upgrade() - # Preferences might have changed. Load them again. - # Note that the language can't be updated, so that will always revert to English. - preferences = Preferences.getInstance() + # Load preferences again because before we have loaded the plugins, we don't have the upgrade routine for + # the preferences file. Now that we have, load the preferences file again so it can be upgraded and loaded. try: - file_name = Resources.getPath(Resources.Preferences, self._application_name + ".cfg") - with open(file_name, "r", encoding = "utf-8") as f: + preferences_filename = Resources.getPath(Resources.Preferences, self._app_name + ".cfg") + with open(preferences_filename, "r", encoding = "utf-8") as f: serialized = f.read() - preferences.deserialize(serialized) - except FileNotFoundError: - pass - # Force the configuration file to be written again since the list of plugins to remove maybe changed - Preferences.getInstance().setValue("general/plugins_to_remove", "") - Preferences.getInstance().writeToFile(Resources.getStoragePath(Resources.Preferences, self.getApplicationName() + ".cfg")) + # This performs the upgrade for Preferences + self._preferences.deserialize(serialized) + self._preferences.setValue("general/plugins_to_remove", "") + self._preferences.writeToFile(preferences_filename) + except (FileNotFoundError, UnicodeDecodeError): + Logger.log("i", "The preferences file cannot be found or it is corrupted, so we will use default values") + # Force the configuration file to be written again since the list of plugins to remove maybe changed self.showSplashMessage(i18n_catalog.i18nc("@info:progress", "Loading preferences...")) try: - file_name = Resources.getPath(Resources.Preferences, self.getApplicationName() + ".cfg") - Preferences.getInstance().readFromFile(file_name) + self._preferences_filename = Resources.getPath(Resources.Preferences, self._app_name + ".cfg") + self._preferences.readFromFile(self._preferences_filename) except FileNotFoundError: - pass - - self.getApplicationName() - - Preferences.getInstance().addPreference("%s/recent_files" % self.getApplicationName(), "") - - self._recent_files = [] - file_names = Preferences.getInstance().getValue("%s/recent_files" % self.getApplicationName()).split(";") + Logger.log("i", "The preferences file '%s' cannot be found, will use default values", + self._preferences_filename) + self._preferences_filename = Resources.getStoragePath(Resources.Preferences, self._app_name + ".cfg") + + # FIXME: This is done here because we now use "plugins.json" to manage plugins instead of the Preferences file, + # but the PluginRegistry will still import data from the Preferences files if present, such as disabled plugins, + # so we need to reset those values AFTER the Preferences file is loaded. + self._plugin_registry.initializeAfterPluginsAreLoaded() + + # Check if we have just updated from an older version + self._preferences.addPreference("general/last_run_version", "") + last_run_version_str = self._preferences.getValue("general/last_run_version") + if not last_run_version_str: + last_run_version_str = self._version + last_run_version = Version(last_run_version_str) + current_version = Version(self._version) + if last_run_version < current_version: + self._just_updated_from_old_version = True + self._preferences.setValue("general/last_run_version", str(current_version)) + self._preferences.writeToFile(self._preferences_filename) + + # Preferences: recent files + self._preferences.addPreference("%s/recent_files" % self._app_name, "") + file_names = self._preferences.getValue("%s/recent_files" % self._app_name).split(";") for file_name in file_names: if not os.path.isfile(file_name): continue - self._recent_files.append(QUrl.fromLocalFile(file_name)) - JobQueue.getInstance().jobFinished.connect(self._onJobFinished) + if not self.getIsHeadLess(): + # Initialize System tray icon and make it invisible because it is used only to show pop up messages + self._tray_icon = None + if self._tray_icon_name: + self._tray_icon = QIcon(Resources.getPath(Resources.Images, self._tray_icon_name)) + self._tray_icon_widget = QSystemTrayIcon(self._tray_icon) + self._tray_icon_widget.setVisible(False) - # Initialize System tray icon and make it invisible because it is used only to show pop up messages - self._tray_icon = None - self._tray_icon_widget = None - if tray_icon_name: - self._tray_icon = QIcon(Resources.getPath(Resources.Images, tray_icon_name)) - self._tray_icon_widget = QSystemTrayIcon(self._tray_icon) - self._tray_icon_widget.setVisible(False) + def initializeEngine(self) -> None: + # TODO: Document native/qml import trickery + self._qml_engine = QQmlApplicationEngine(self) + self._qml_engine.setOutputWarningsToStandardError(False) + self._qml_engine.warnings.connect(self.__onQmlWarning) + + for path in self._qml_import_paths: + self._qml_engine.addImportPath(path) + + if not hasattr(sys, "frozen"): + self._qml_engine.addImportPath(os.path.join(os.path.dirname(__file__), "qml")) + + self._qml_engine.rootContext().setContextProperty("QT_VERSION_STR", QT_VERSION_STR) + self._qml_engine.rootContext().setContextProperty("screenScaleFactor", self._screenScaleFactor()) + + self.registerObjects(self._qml_engine) + + Bindings.register() + self._qml_engine.load(self._main_qml) + self.engineCreatedSignal.emit() recentFilesChanged = pyqtSignal() @pyqtProperty("QVariantList", notify=recentFilesChanged) - def recentFiles(self): + def recentFiles(self) -> List[QUrl]: return self._recent_files - def _onJobFinished(self, job): - if (not isinstance(job, ReadMeshJob) and not isinstance(job, ReadFileJob)) or not job.getResult(): + def _onJobFinished(self, job: Job) -> None: + if isinstance(job, WriteFileJob): + if not job.getResult() or not job.getAddToRecentFiles(): + # For a write file job, if it failed or it doesn't need to be added to the recent files list, we do not + # add it. + return + elif (not isinstance(job, ReadMeshJob) and not isinstance(job, ReadFileJob)) or not job.getResult(): return - f = QUrl.fromLocalFile(job.getFileName()) - if f in self._recent_files: - self._recent_files.remove(f) + if isinstance(job, (ReadMeshJob, ReadFileJob, WriteFileJob)): + self.addFileToRecentFiles(job.getFileName()) + + def addFileToRecentFiles(self, file_name: str) -> None: + file_path = QUrl.fromLocalFile(file_name) - self._recent_files.insert(0, f) + if file_path in self._recent_files: + self._recent_files.remove(file_path) + + self._recent_files.insert(0, file_path) if len(self._recent_files) > 10: del self._recent_files[10] @@ -185,20 +297,20 @@ for path in self._recent_files: pref += path.toLocalFile() + ";" - Preferences.getInstance().setValue("%s/recent_files" % self.getApplicationName(), pref) + self.getPreferences().setValue("%s/recent_files" % self.getApplicationName(), pref) self.recentFilesChanged.emit() - def run(self): - pass + def run(self) -> None: + super().run() - def hideMessage(self, message): + def hideMessage(self, message: Message) -> None: with self._message_lock: if message in self._visible_messages: message.hide(send_signal = False) # we're in handling hideMessageSignal so we don't want to resend it self._visible_messages.remove(message) self.visibleMessageRemoved.emit(message) - def showMessage(self, message): + def showMessage(self, message: Message) -> None: with self._message_lock: if message not in self._visible_messages: self._visible_messages.append(message) @@ -207,106 +319,75 @@ self.visibleMessageAdded.emit(message) # also show toast message when the main window is minimized - self.showToastMessage(self._application_name, message.getText()) + self.showToastMessage(self._app_name, message.getText()) - def _onMainWindowStateChanged(self, window_state): - if self._tray_icon: + def _onMainWindowStateChanged(self, window_state: int) -> None: + if self._tray_icon and self._tray_icon_widget: visible = window_state == Qt.WindowMinimized self._tray_icon_widget.setVisible(visible) # Show toast message using System tray widget. - def showToastMessage(self, title: str, message: str): + def showToastMessage(self, title: str, message: str) -> None: if self.checkWindowMinimizedState() and self._tray_icon_widget: # NOTE: Qt 5.8 don't support custom icon for the system tray messages, but Qt 5.9 does. # We should use the custom icon when we switch to Qt 5.9 self._tray_icon_widget.showMessage(title, message) - def setMainQml(self, path): + def setMainQml(self, path: str) -> None: self._main_qml = path - def initializeEngine(self): - # TODO: Document native/qml import trickery - Bindings.register() - - self._engine = QQmlApplicationEngine() - self._engine.setOutputWarningsToStandardError(False) - self._engine.warnings.connect(self.__onQmlWarning) - - for path in self._qml_import_paths: - self._engine.addImportPath(path) - - if not hasattr(sys, "frozen"): - self._engine.addImportPath(os.path.join(os.path.dirname(__file__), "qml")) - - self._engine.rootContext().setContextProperty("QT_VERSION_STR", QT_VERSION_STR) - self._engine.rootContext().setContextProperty("screenScaleFactor", self._screenScaleFactor()) - - self.registerObjects(self._engine) - - self._engine.load(self._main_qml) - self.engineCreatedSignal.emit() - - def exec_(self, *args, **kwargs): + def exec_(self, *args: Any, **kwargs: Any) -> None: self.applicationRunning.emit() super().exec_(*args, **kwargs) @pyqtSlot() - def reloadQML(self): + def reloadQML(self) -> None: # only reload when it is a release build if not self.getIsDebugMode(): return - self._engine.clearComponentCache() - self._theme.reload() - self._engine.load(self._main_qml) - # Hide the window. For some reason we can't close it yet. This needs to be done in the onComponentCompleted. - for obj in self._engine.rootObjects(): - if obj != self._engine.rootObjects()[-1]: - obj.hide() + if self._qml_engine and self._theme: + self._qml_engine.clearComponentCache() + self._theme.reload() + self._qml_engine.load(self._main_qml) + # Hide the window. For some reason we can't close it yet. This needs to be done in the onComponentCompleted. + for obj in self._qml_engine.rootObjects(): + if obj != self._qml_engine.rootObjects()[-1]: + obj.hide() @pyqtSlot() - def purgeWindows(self): + def purgeWindows(self) -> None: # Close all root objects except the last one. # Should only be called by onComponentCompleted of the mainWindow. - for obj in self._engine.rootObjects(): - if obj != self._engine.rootObjects()[-1]: - obj.close() + if self._qml_engine: + for obj in self._qml_engine.rootObjects(): + if obj != self._qml_engine.rootObjects()[-1]: + obj.close() @pyqtSlot("QList") - def __onQmlWarning(self, warnings): + def __onQmlWarning(self, warnings: List[QQmlError]) -> None: for warning in warnings: Logger.log("w", warning.toString()) engineCreatedSignal = Signal() - def isShuttingDown(self): - return self._shutting_down + def isShuttingDown(self) -> bool: + return self._is_shutting_down - def registerObjects(self, engine): + def registerObjects(self, engine) -> None: #type: ignore #Don't type engine, because the type depends on the platform you're running on so it always gives an error somewhere. engine.rootContext().setContextProperty("PluginRegistry", PluginRegistry.getInstance()) - def getRenderer(self): + def getRenderer(self) -> QtRenderer: if not self._renderer: self._renderer = QtRenderer() - return self._renderer - - @classmethod - def addCommandLineOptions(self, parser, parsed_command_line = {}): - super().addCommandLineOptions(parser, parsed_command_line = parsed_command_line) - parser.add_argument("--disable-textures", - dest="disable-textures", - action="store_true", - default=False, - help="Disable Qt texture loading as a workaround for certain crashes.") - parser.add_argument("-qmljsdebugger", - help="For Qt's QML debugger compatibility") + return cast(QtRenderer, self._renderer) mainWindowChanged = Signal() - def getMainWindow(self): + def getMainWindow(self) -> Optional[MainWindow]: return self._main_window - def setMainWindow(self, window): + def setMainWindow(self, window: MainWindow) -> None: if window != self._main_window: if self._main_window is not None: self._main_window.windowStateChanged.disconnect(self._onMainWindowStateChanged) @@ -317,48 +398,50 @@ self.mainWindowChanged.emit() - def setVisible(self, visible): - if self._engine is None: - self.initializeEngine() - + def setVisible(self, visible: bool) -> None: if self._main_window is not None: self._main_window.visible = visible @property - def isVisible(self): + def isVisible(self) -> bool: if self._main_window is not None: - return self._main_window.visible + return self._main_window.visible #type: ignore #MyPy doesn't realise that self._main_window cannot be None here. + return False - def getTheme(self): + def getTheme(self) -> Optional[Theme]: if self._theme is None: - if self._engine is None: + if self._qml_engine is None: Logger.log("e", "The theme cannot be accessed before the engine is initialised") return None - self._theme = UM.Qt.Bindings.Theme.Theme.getInstance(self._engine) + self._theme = UM.Qt.Bindings.Theme.Theme.getInstance(self._qml_engine) return self._theme # Handle a function that should be called later. - def functionEvent(self, event): + def functionEvent(self, event: QEvent) -> None: e = _QtFunctionEvent(event) QCoreApplication.postEvent(self, e) # Handle Qt events - def event(self, event): + def event(self, event: QEvent) -> bool: if event.type() == _QtFunctionEvent.QtFunctionEvent: event._function_event.call() return True return super().event(event) - def windowClosed(self): + def windowClosed(self, save_data: bool = True) -> None: Logger.log("d", "Shutting down %s", self.getApplicationName()) - self._shutting_down = True + self._is_shutting_down = True - try: - Preferences.getInstance().writeToFile(Resources.getStoragePath(Resources.Preferences, self.getApplicationName() + ".cfg")) - except Exception as e: - Logger.log("e", "Exception while saving preferences: %s", repr(e)) + # garbage collect tray icon so it gets properly closed before the application is closed + self._tray_icon_widget = None + + if save_data: + try: + self.savePreferences() + except Exception as e: + Logger.log("e", "Exception while saving preferences: %s", repr(e)) try: self.applicationShuttingDown.emit() @@ -370,9 +453,12 @@ except Exception as e: Logger.log("e", "Exception while closing backend: %s", repr(e)) + if self._tray_icon_widget: + self._tray_icon_widget.deleteLater() + self.quit() - def checkWindowMinimizedState(self): + def checkWindowMinimizedState(self) -> bool: if self._main_window is not None and self._main_window.windowState() == Qt.WindowMinimized: return True else: @@ -380,9 +466,8 @@ ## Get the backend of the application (the program that does the heavy lifting). # The backend is also a QObject, which can be used from qml. - # \returns Backend \type{Backend} @pyqtSlot(result = "QObject*") - def getBackend(self): + def getBackend(self) -> Backend: return self._backend ## Property used to expose the backend @@ -390,59 +475,15 @@ # This makes the connection between backend and QML more reliable than the pyqtSlot above. # \returns Backend \type{Backend} @pyqtProperty("QVariant", constant = True) - def backend(self): + def backend(self) -> Backend: return self.getBackend() - ## Load a Qt translation catalog. - # - # This method will locate, load and install a Qt message catalog that can be used - # by Qt's translation system, like qsTr() in QML files. - # - # \param file_name The file name to load, without extension. It will be searched for in - # the i18nLocation Resources directory. If it can not be found a warning - # will be logged but no error will be thrown. - # \param language The language to load translations for. This can be any valid language code - # or 'default' in which case the language is looked up based on system locale. - # If the specified language can not be found, this method will fall back to - # loading the english translations file. - # - # \note When `language` is `default`, the language to load can be changed with the - # environment variable "LANGUAGE". - def loadQtTranslation(self, file_name, language = "default"): - # TODO Add support for specifying a language from preferences - path = None - if language == "default": - path = self._getDefaultLanguage(file_name) - else: - path = Resources.getPath(Resources.i18n, language, "LC_MESSAGES", file_name + ".qm") - - # If all else fails, fall back to english. - if not path: - Logger.log("w", "Could not find any translations matching {0} for file {1}, falling back to english".format(language, file_name)) - try: - path = Resources.getPath(Resources.i18n, "en_US", "LC_MESSAGES", file_name + ".qm") - except FileNotFoundError: - Logger.log("w", "Could not find English translations for file {0}. Switching to developer english.".format(file_name)) - return - - translator = QTranslator() - if not translator.load(path): - Logger.log("e", "Unable to load translations %s", file_name) - return - - # Store a reference to the translator. - # This prevents the translator from being destroyed before Qt has a chance to use it. - self._translators[file_name] = translator - - # Finally, install the translator so Qt can use it. - self.installTranslator(translator) - ## Create a class variable so we can manage the splash in the CrashHandler dialog when the Application instance # is not yet created, e.g. when an error occurs during the initialization - splash = None + splash = None # type: Optional[QSplashScreen] - def createSplash(self): - if not self.getCommandLineOption("headless"): + def createSplash(self) -> None: + if not self.getIsHeadLess(): try: QtApplication.splash = self._createSplashScreen() except FileNotFoundError: @@ -453,18 +494,18 @@ self.processEvents() ## Display text on the splash screen. - def showSplashMessage(self, message): + def showSplashMessage(self, message: str) -> None: if not QtApplication.splash: self.createSplash() if QtApplication.splash: QtApplication.splash.showMessage(message, Qt.AlignHCenter | Qt.AlignVCenter) self.processEvents() - elif self.getCommandLineOption("headless"): + elif self.getIsHeadLess(): Logger.log("d", message) ## Close the splash screen after the application has started. - def closeSplash(self): + def closeSplash(self) -> None: if QtApplication.splash: QtApplication.splash.close() QtApplication.splash = None @@ -475,10 +516,12 @@ # qml instance before creation. # \return None in case the creation failed (qml error), else it returns the qml instance. # \note If the creation fails, this function will ensure any errors are logged to the logging service. - def createQmlComponent(self, qml_file_path: str, context_properties: Dict[str, "QObject"]=None) -> Optional["QObject"]: + def createQmlComponent(self, qml_file_path: str, context_properties: Dict[str, "QObject"] = None) -> Optional["QObject"]: + if self._qml_engine is None: # Protect in case the engine was not initialized yet + return None path = QUrl.fromLocalFile(qml_file_path) - component = QQmlComponent(self._engine, path) - result_context = QQmlContext(self._engine.rootContext()) + component = QQmlComponent(self._qml_engine, path) + result_context = QQmlContext(self._qml_engine.rootContext()) #type: ignore #MyPy doens't realise that self._qml_engine can't be None here. if context_properties is not None: for name, value in context_properties.items(): result_context.setContextProperty(name, value) @@ -487,16 +530,41 @@ Logger.log("e", str(err.toString())) if result is None: return None - + # We need to store the context with the qml object, else the context gets garbage collected and the qml objects # no longer function correctly/application crashes. result.attached_context = result_context return result - def _createSplashScreen(self): + ## Delete all nodes containing mesh data in the scene. + # \param only_selectable. Set this to False to delete objects from all build plates + @pyqtSlot() + def deleteAll(self, only_selectable = True) -> None: + self.getController().deleteAllNodesWithMeshData(only_selectable) + + ## Get the MeshFileHandler of this application. + def getMeshFileHandler(self) -> MeshFileHandler: + return self._mesh_file_handler + + def getWorkspaceFileHandler(self) -> WorkspaceFileHandler: + return self._workspace_file_handler + + @pyqtSlot(result = QObject) + def getPackageManager(self) -> PackageManager: + return self._package_manager + + ## Gets the instance of this application. + # + # This is just to further specify the type of Application.getInstance(). + # \return The instance of this application. + @classmethod + def getInstance(cls, *args, **kwargs) -> "QtApplication": + return cast(QtApplication, super().getInstance(**kwargs)) + + def _createSplashScreen(self) -> QSplashScreen: return QSplashScreen(QPixmap(Resources.getPath(Resources.Images, self.getApplicationName() + ".png"))) - def _screenScaleFactor(self): + def _screenScaleFactor(self) -> float: # OSX handles sizes of dialogs behind our backs, but other platforms need # to know about the device pixel ratio if sys.platform == "darwin": @@ -505,59 +573,9 @@ # determine a device pixel ratio from font metrics, using the same logic as UM.Theme fontPixelRatio = QFontMetrics(QCoreApplication.instance().font()).ascent() / 11 # round the font pixel ratio to quarters - fontPixelRatio = int(fontPixelRatio * 4)/4 + fontPixelRatio = int(fontPixelRatio * 4) / 4 return fontPixelRatio - def _getDefaultLanguage(self, file_name): - # If we have a language override set in the environment, try and use that. - lang = os.getenv("URANIUM_LANGUAGE") - if lang: - try: - return Resources.getPath(Resources.i18n, lang, "LC_MESSAGES", file_name + ".qm") - except FileNotFoundError: - pass - - # Else, try and get the current language from preferences - lang = Preferences.getInstance().getValue("general/language") - if lang: - try: - return Resources.getPath(Resources.i18n, lang, "LC_MESSAGES", file_name + ".qm") - except FileNotFoundError: - pass - - # If none of those are set, try to use the environment's LANGUAGE variable. - lang = os.getenv("LANGUAGE") - if lang: - try: - return Resources.getPath(Resources.i18n, lang, "LC_MESSAGES", file_name + ".qm") - except FileNotFoundError: - pass - - # If looking up the language from the enviroment or preferences fails, try and use Qt's system locale instead. - locale = QLocale.system() - - # First, try and find a directory for any of the provided languages - for lang in locale.uiLanguages(): - try: - return Resources.getPath(Resources.i18n, lang, "LC_MESSAGES", file_name + ".qm") - except FileNotFoundError: - pass - - # If that fails, see if we can extract a language code from the - # preferred language, regardless of the country code. This will turn - # "en-GB" into "en" for example. - lang = locale.uiLanguages()[0] - lang = lang[0:lang.find("-")] - for subdirectory in os.path.listdir(Resources.getPath(Resources.i18n)): - if subdirectory == "en_7S": #Never automatically go to Pirate. - continue - if not os.path.isdir(Resources.getPath(Resources.i18n, subdirectory)): - continue - if subdirectory.startswith(lang + "_"): #Only match the language code, not the country code. - return Resources.getPath(Resources.i18n, lang, "LC_MESSAGES", file_name + ".qm") - - return None - ## Internal. # @@ -565,7 +583,7 @@ class _QtFunctionEvent(QEvent): QtFunctionEvent = QEvent.User + 1 - def __init__(self, fevent): + def __init__(self, fevent: QEvent) -> None: super().__init__(self.QtFunctionEvent) self._function_event = fevent diff -Nru uranium-3.3.0/UM/Qt/QtMouseDevice.py uranium-4.4.1/UM/Qt/QtMouseDevice.py --- uranium-3.3.0/UM/Qt/QtMouseDevice.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Qt/QtMouseDevice.py 2019-11-19 10:50:46.000000000 +0000 @@ -1,12 +1,12 @@ # Copyright (c) 2015 Ultimaker B.V. # Uranium is released under the terms of the LGPLv3 or higher. -from PyQt5.QtCore import Qt, QEvent, QObject -from PyQt5.QtGui import QMouseEvent +from PyQt5.QtCore import Qt, QEvent from UM.InputDevice import InputDevice from UM.Event import MouseEvent, WheelEvent + ## An InputDevice subclass that processes Qt mouse events and returns a UM.Event.MouseEvent class QtMouseDevice(InputDevice): def __init__(self, window): @@ -17,19 +17,19 @@ def handleEvent(self, event): if event.type() == QEvent.MouseButtonPress: - ex, ey = self._normalizeCoordinates(event.x(), event.y()) + ex, ey = self._normalizeCoordinates(event.windowPos().x(), event.windowPos().y()) e = MouseEvent(MouseEvent.MousePressEvent, ex, ey, self._x, self._y, self._qtButtonsToButtonList(event.buttons())) self._x = ex self._y = ey self.event.emit(e) elif event.type() == QEvent.MouseMove: - ex, ey = self._normalizeCoordinates(event.x(), event.y()) + ex, ey = self._normalizeCoordinates(event.windowPos().x(), event.windowPos().y()) e = MouseEvent(MouseEvent.MouseMoveEvent, ex, ey, self._x, self._y, self._qtButtonsToButtonList(event.buttons())) self._x = ex self._y = ey self.event.emit(e) elif event.type() == QEvent.MouseButtonRelease: - ex, ey = self._normalizeCoordinates(event.x(), event.y()) + ex, ey = self._normalizeCoordinates(event.windowPos().x(), event.windowPos().y()) e = MouseEvent(MouseEvent.MouseReleaseEvent, ex, ey, self._x, self._y, self._qtButtonsToButtonList(event.button())) self._x = ex self._y = ey diff -Nru uranium-3.3.0/UM/Qt/QtRenderer.py uranium-4.4.1/UM/Qt/QtRenderer.py --- uranium-3.3.0/UM/Qt/QtRenderer.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Qt/QtRenderer.py 2019-11-19 10:50:46.000000000 +0000 @@ -1,9 +1,12 @@ -# Copyright (c) 2015 Ultimaker B.V. +# Copyright (c) 2018 Ultimaker B.V. # Uranium is released under the terms of the LGPLv3 or higher. -from PyQt5.QtGui import QColor, QOpenGLBuffer, QOpenGLContext, QOpenGLFramebufferObject, QOpenGLFramebufferObjectFormat, QSurfaceFormat, QOpenGLVersionProfile, QImage, QOpenGLVertexArrayObject +import numpy +from PyQt5.QtGui import QColor, QOpenGLBuffer, QOpenGLVertexArrayObject +from typing import List, Optional, Tuple from UM.Application import Application +import UM.Qt.QtApplication from UM.View.Renderer import Renderer from UM.Math.Vector import Vector from UM.Math.Matrix import Matrix @@ -20,17 +23,14 @@ from UM.Logger import Logger -import numpy - - -from typing import Optional, List - MYPY = False if MYPY: + from UM.Controller import Controller + from UM.Scene.Scene import Scene from UM.Scene.Camera import Camera from UM.Scene.SceneNode import SceneNode from UM.View.RenderPass import RenderPass - from UM.View.GL import ShaderProgram + from UM.View.GL.ShaderProgram import ShaderProgram vertexBufferProperty = "__qtgl2_vertex_buffer" @@ -40,19 +40,16 @@ ## A Renderer implementation using PyQt's OpenGL implementation to render. @signalemitter class QtRenderer(Renderer): - def __init__(self): + def __init__(self) -> None: super().__init__() - self._controller = Application.getInstance().getController() - self._scene = self._controller.getScene() - - self._vertex_buffer_cache = {} - self._index_buffer_cache = {} + self._controller = Application.getInstance().getController() # type: Controller + self._scene = self._controller.getScene() # type: Scene - self._initialized = False + self._initialized = False # type: bool - self._light_position = Vector(0, 0, 0) - self._background_color = QColor(128, 128, 128) + self._light_position = Vector(0, 0, 0) # type: Vector + self._background_color = QColor(128, 128, 128) # type: QColor self._viewport_width = 0 # type: int self._viewport_height = 0 # type: int self._window_width = 0 # type: int @@ -60,17 +57,17 @@ self._batches = [] # type: List[RenderBatch] - self._quad_buffer = None # type: Optional[QOpenGLBuffer] + self._quad_buffer = None # type: QOpenGLBuffer self._camera = None # type: Optional[Camera] initialized = Signal() ## Get an integer multiplier that can be used to correct for screen DPI. - def getPixelMultiplier(self): + def getPixelMultiplier(self) -> int: # Standard assumption for screen pixel density is 96 DPI. We use that as baseline to get # a multiplication factor we can use for screens > 96 DPI. - return round(Application.getInstance().primaryScreen().physicalDotsPerInch() / 96.0) + return round(UM.Qt.QtApplication.QtApplication.getInstance().primaryScreen().physicalDotsPerInch() / 96.0) ## Get the list of render batches. def getBatches(self) -> List[RenderBatch]: @@ -105,18 +102,18 @@ render_pass.setSize(width, height) ## Set the window size. - def setWindowSize(self, width: int, height: int): + def setWindowSize(self, width: int, height: int) -> None: self._window_width = width self._window_height = height ## Get the window size. # # \return A tuple of (window_width, window_height) - def getWindowSize(self)-> (int, int): + def getWindowSize(self) -> Tuple[int, int]: return self._window_width, self._window_height ## Overrides Renderer::beginRendering() - def beginRendering(self): + def beginRendering(self) -> None: if not self._initialized: self._initialize() @@ -179,14 +176,14 @@ shader.disableAttribute("a_uvs") self._quad_buffer.release() - def _initialize(self): + def _initialize(self) -> None: supports_vao = OpenGLContext.supportsVertexArrayObjects() # fill the OpenGLContext.properties Logger.log("d", "Support for Vertex Array Objects: %s", supports_vao) - OpenGL.setInstance(OpenGL()) + OpenGL() self._gl = OpenGL.getInstance().getBindingsObject() - self._default_material = OpenGL.getInstance().createShaderProgram(Resources.getPath(Resources.Shaders, "default.shader")) + self._default_material = OpenGL.getInstance().createShaderProgram(Resources.getPath(Resources.Shaders, "default.shader")) #type: ShaderProgram self._render_passes.add(DefaultPass(self._viewport_width, self._viewport_height)) self._render_passes.add(SelectionPass(self._viewport_width, self._viewport_height)) diff -Nru uranium-3.3.0/UM/Resources.py uranium-4.4.1/UM/Resources.py --- uranium-3.3.0/UM/Resources.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Resources.py 2019-11-19 10:50:46.000000000 +0000 @@ -1,14 +1,18 @@ -# Copyright (c) 2017 Ultimaker B.V. +# Copyright (c) 2018 Ultimaker B.V. # Uranium is released under the terms of the LGPLv3 or higher. +import datetime import os import os.path import re import shutil -from typing import List +import tempfile +from typing import Dict, Generator, List, Optional, Union, cast from UM.Logger import Logger from UM.Platform import Platform +from UM.Version import Version + class ResourceTypeError(Exception): pass @@ -42,8 +46,12 @@ ContainerStacks = 10 ## Location of cached data Cache = 11 - ## Location of preset setting visibility groups - PresetSettingVisibilityGroups = 12 + ## Location of plugins + Plugins = 12 + ## Location of data regarding bundled packages + BundledPackages = 13 + ## Location of text files + Texts = 14 ## Any custom resource types should be greater than this to prevent collisions with standard types. UserType = 128 @@ -51,6 +59,8 @@ ApplicationIdentifier = "UM" ApplicationVersion = "unknown" + __bundled_resources_path = None #type: Optional[str] + ## Get the path to a certain resource file # # \param resource_type \type{int} The type of resource to retrieve a path for. @@ -83,7 +93,7 @@ # \return A list of absolute paths to resources of the specified type. @classmethod def getAllResourcesOfType(cls, resource_type: int) -> List[str]: - files = {} + files = {} #type: Dict[str, List[str]] search_dirs = cls.getAllPathsForType(resource_type) for directory in search_dirs: @@ -143,8 +153,8 @@ ## Return a path where a certain resource type can be stored. # - # \param type \type{int} The type of resource to store. - # \return \type{string} An absolute path where the given resource type can be stored. + # \param type The type of resource to store. + # \return An absolute path where the given resource type can be stored. # # \exception UnsupportedStorageTypeError Raised when writing type is not supported. @classmethod @@ -155,7 +165,6 @@ if cls.__config_storage_path is None or cls.__data_storage_path is None: cls.__initializeStoragePaths() - path = None # Special casing for Linux, since configuration should be stored in ~/.config but data should be stored in ~/.local/share if resource_type == cls.Preferences: path = cls.__config_storage_path @@ -176,13 +185,13 @@ # # \param path The path to add. @classmethod - def addSearchPath(cls, path: str): + def addSearchPath(cls, path: str) -> None: if os.path.isdir(path) and path not in cls.__paths: cls.__paths.append(path) ## Remove a resource search path. @classmethod - def removeSearchPath(cls, path: str): + def removeSearchPath(cls, path: str) -> None: if path in cls.__paths: del cls.__paths[cls.__paths.index(path)] @@ -191,7 +200,7 @@ # \param type \type{int} An integer that can be used to identify the type. Should be greater than UserType. # \param path \type{string} The path relative to the search paths where resources of this type can be found./ @classmethod - def addType(cls, resource_type: int, path: str): + def addType(cls, resource_type: int, path: str) -> None: if resource_type in cls.__types: raise ResourceTypeError("Type {0} already exists".format(resource_type)) @@ -205,7 +214,7 @@ # \param type The type to add a storage path for. # \param path The path to add as storage path. Should be relative to the resources storage path. @classmethod - def addStorageType(cls, resource_type: int, path: str): + def addStorageType(cls, resource_type: int, path: str) -> None: if resource_type in cls.__types: raise ResourceTypeError("Type {0} already exists".format(resource_type)) @@ -244,12 +253,12 @@ # # \return A sequence of paths where resources might be. @classmethod - def getSearchPaths(cls): + def getSearchPaths(cls) -> Generator[str, None, None]: yield from cls.__paths ## Remove a custom resource type. @classmethod - def removeType(cls, resource_type: int): + def removeType(cls, resource_type: int) -> None: if resource_type not in cls.__types: return @@ -261,11 +270,62 @@ if resource_type in cls.__types_storage: del cls.__types_storage[resource_type] + ## Performs a factory reset, compressing the current state of configuration + # into an archive and emptying the resource folders. + # + # When calling this function, be sure to quit the application immediately + # afterwards, lest the save function write the configuration anew. + @classmethod + def factoryReset(cls) -> None: + config_path = cls.getConfigStoragePath() + data_path = cls.getDataStoragePath() + cache_path = cls.getCacheStoragePath() + + folders_to_backup = set() + folders_to_remove = set() # only cache folder needs to be removed + + folders_to_backup.add(config_path) + folders_to_backup.add(data_path) + + # Only remove the cache folder if it's not the same as data or config + if cache_path not in folders_to_backup: + folders_to_remove.add(cache_path) + + for folder in folders_to_remove: + shutil.rmtree(folder, ignore_errors = True) + for folder in folders_to_backup: + base_name = os.path.basename(folder) + root_dir = os.path.dirname(folder) + + date_now = datetime.datetime.now().strftime("%Y%m%d_%H%M%S") + idx = 0 + file_name = base_name + "_" + date_now + zip_file_path = os.path.join(root_dir, file_name + ".zip") + while os.path.exists(zip_file_path): + idx += 1 + file_name = base_name + "_" + date_now + "_" + str(idx) + zip_file_path = os.path.join(root_dir, file_name + ".zip") + try: + # only create the zip backup when the folder exists + if os.path.exists(folder): + # remove the .zip extension because make_archive() adds it + zip_file_path = zip_file_path[:-4] + shutil.make_archive(zip_file_path, "zip", root_dir = root_dir, base_dir = base_name) + + # remove the folder only when the backup is successful + shutil.rmtree(folder, ignore_errors = True) + + # create an empty folder so Resources will not try to copy the old ones + os.makedirs(folder, 0o0755, exist_ok=True) + + except: + Logger.logException("e", "Failed to backup [%s] to file [%s]", folder, zip_file_path) + ## private: # Returns a list of paths where args was found. @classmethod - def __find(cls, resource_type: int, *args) -> List[str]: + def __find(cls, resource_type: int, *args: str) -> List[str]: suffix = cls.__types.get(resource_type, None) if suffix is None: return [] @@ -278,11 +338,12 @@ return files @classmethod - def _getConfigStorageRootPath(cls): + def _getConfigStorageRootPath(cls) -> str: # Returns the path where we store different versions of app configurations - config_path = None if Platform.isWindows(): config_path = os.getenv("APPDATA") + if not config_path: # Protect if the getenv function returns None (it should never happen) + config_path = "." elif Platform.isOSX(): config_path = os.path.expanduser("~/Library/Application Support") elif Platform.isLinux(): @@ -296,12 +357,14 @@ return config_path @classmethod - def _getPossibleConfigStorageRootPathList(cls): + def _getPossibleConfigStorageRootPathList(cls) -> List[str]: # Returns all possible root paths for storing app configurations (in old and new versions) config_root_list = [Resources._getConfigStorageRootPath()] if Platform.isWindows(): # it used to be in LOCALAPPDATA on Windows - config_root_list.append(os.getenv("LOCALAPPDATA")) + config_path = os.getenv("LOCALAPPDATA") + if config_path: # Protect if the getenv function returns None (it should never happen) + config_root_list.append(config_path) elif Platform.isOSX(): config_root_list.append(os.path.expanduser("~")) @@ -314,7 +377,8 @@ # Returns all possible root paths for storing app configurations (in old and new versions) if Platform.isLinux(): - data_root_list.append(os.path.join(Resources._getDataStorageRootPath(), cls.ApplicationIdentifier)) + # We can cast here to str since the _getDataStorageRootPath always returns a string if platform is Linux + data_root_list.append(os.path.join(cast(str, Resources._getDataStorageRootPath()), cls.ApplicationIdentifier)) else: # on Windows and Mac, data and config are saved in the same place data_root_list = Resources._getPossibleConfigStorageRootPathList() @@ -322,7 +386,7 @@ return data_root_list @classmethod - def _getDataStorageRootPath(cls): + def _getDataStorageRootPath(cls) -> Optional[str]: # Returns the path where we store different versions of app data data_path = None if Platform.isLinux(): @@ -333,7 +397,7 @@ return data_path @classmethod - def _getCacheStorageRootPath(cls): + def _getCacheStorageRootPath(cls) -> Optional[str]: # Returns the path where we store different versions of app configurations cache_path = None if Platform.isWindows(): @@ -349,13 +413,12 @@ return cache_path @classmethod - def __initializeStoragePaths(cls): + def __initializeStoragePaths(cls) -> None: Logger.log("d", "Initializing storage paths") # use nested structure: //... if cls.ApplicationVersion == "master" or cls.ApplicationVersion == "unknown": storage_dir_name = os.path.join(cls.ApplicationIdentifier, cls.ApplicationVersion) else: - from UM.Version import Version version = Version(cls.ApplicationVersion) storage_dir_name = os.path.join(cls.ApplicationIdentifier, "%s.%s" % (version.getMajor(), version.getMinor())) @@ -390,7 +453,7 @@ ## Copies the directories of the latest version on this machine if present, so the upgrade will use the copies # as the base for upgrade. See CURA-3529 for more details. @classmethod - def _copyLatestDirsIfPresent(cls): + def _copyLatestDirsIfPresent(cls) -> None: # Paths for the version we are running right now this_version_config_path = Resources.getConfigStoragePath() this_version_data_path = Resources.getDataStoragePath() @@ -401,8 +464,8 @@ Logger.log("d", "Found config: %s and data: %s", config_root_path_list, data_root_path_list) - latest_config_path = Resources._findLatestDirInPaths(config_root_path_list, dir_type="config") - latest_data_path = Resources._findLatestDirInPaths(data_root_path_list, dir_type="data") + latest_config_path = Resources._findLatestDirInPaths(config_root_path_list, dir_type = "config") + latest_data_path = Resources._findLatestDirInPaths(data_root_path_list, dir_type = "data") Logger.log("d", "Latest config path: %s and latest data path: %s", latest_config_path, latest_data_path) if not latest_config_path: # No earlier storage dirs found, do nothing @@ -413,9 +476,7 @@ # If the directory found matches the current version, do nothing Logger.log("d", "Same config path [%s], do nothing.", latest_config_path) else: - # Prevent circular import - import UM.VersionUpgradeManager - UM.VersionUpgradeManager.VersionUpgradeManager.getInstance().copyVersionFolder(latest_config_path, this_version_config_path) + cls.copyVersionFolder(latest_config_path, this_version_config_path) # Copy data folder if needed if latest_data_path == this_version_data_path: @@ -424,9 +485,7 @@ else: # If the data dir is the same as the config dir, don't copy again if latest_data_path is not None and os.path.exists(latest_data_path) and latest_data_path != latest_config_path: - # Prevent circular import - import UM.VersionUpgradeManager - UM.VersionUpgradeManager.VersionUpgradeManager.getInstance().copyVersionFolder(latest_data_path, this_version_data_path) + cls.copyVersionFolder(latest_data_path, this_version_data_path) # Remove "cache" if we copied it together with config suspected_cache_path = os.path.join(this_version_config_path, "cache") @@ -434,65 +493,94 @@ shutil.rmtree(suspected_cache_path) @classmethod - def _findLatestDirInPaths(cls, search_path_list, dir_type="config"): - # version dir name must match: . - version_regex = re.compile(r'^[0-9]+\.[0-9]+.*$') + def copyVersionFolder(cls, src_path: str, dest_path: str) -> None: + Logger.log("i", "Copying directory from '%s' to '%s'", src_path, dest_path) + # we first copy everything to a temporary folder, and then move it to the new folder + base_dir_name = os.path.basename(src_path) + temp_root_dir_path = tempfile.mkdtemp("cura-copy") + temp_dir_path = os.path.join(temp_root_dir_path, base_dir_name) + # src -> temp -> dest + try: + shutil.copytree(src_path, temp_dir_path, ignore = shutil.ignore_patterns("*.lock", "*.log", "old")) + # if the dest_path exist, it needs to be removed first + if not os.path.exists(dest_path): + shutil.move(temp_dir_path, dest_path) + else: + Logger.log("e", "Unable to copy files to %s as the folder already exists", dest_path) + except: + Logger.log("e", "Something occurred when copying the version folder from '%s' to '%s'", src_path, dest_path) + + @classmethod + def _findLatestDirInPaths(cls, search_path_list: List[str], dir_type: str = "config") -> Optional[str]: + # version dir name must match: . + version_regex = re.compile(r"^[0-9]+\.[0-9]+$") check_dir_type_func_dict = { "data": Resources._isNonVersionedDataDir, "config": Resources._isNonVersionedConfigDir } check_dir_type_func = check_dir_type_func_dict[dir_type] - latest_config_path = None + # CURA-6744 + # If the application version matches ".", create a Version object for it for comparison, so we + # can find the directory with the highest version that's below the application version. + # An application version that doesn't match ".", e.g. "master", probably indicates a temporary + # version, and in this case, this temporary version is treated as the latest version. It will ONLY upgrade from + # a highest "." version if it's present. + # For app version, there can be extra version strings at the end. For comparison, we only want the + # ".." part. Here we use a regex to find that part in the app version string. + semantic_version_regex = re.compile(r"(^[0-9]+\.([0-9]+)*).*$") + app_version = None # type: Optional[Version] + app_version_str = cls.ApplicationVersion + if app_version_str is not None: + result = semantic_version_regex.match(app_version_str) + if result is not None: + app_version_str = result.group(0) + app_version = Version(app_version_str) + + latest_config_path = None # type: Optional[str] for search_path in search_path_list: if not os.path.exists(search_path): continue - if check_dir_type_func(search_path): - latest_config_path = search_path - break - + # Give priority to a folder with files with version number in it storage_dir_name_list = next(os.walk(search_path))[1] - if storage_dir_name_list: - storage_dir_name_list = sorted(storage_dir_name_list, reverse=True) - # for now we use alphabetically ordering to determine the latest version (excluding master) - for dir_name in storage_dir_name_list: - if dir_name.endswith("master"): - continue - if version_regex.match(dir_name) is None: - continue - - # make sure that the version we found is not newer than the current version - if version_regex.match(cls.ApplicationVersion): - later_version = sorted([cls.ApplicationVersion, dir_name], reverse=True)[0] - if cls.ApplicationVersion != later_version: - continue - latest_config_path = os.path.join(search_path, dir_name) - break + match_dir_name_list = [n for n in storage_dir_name_list if version_regex.match(n) is not None] + match_dir_version_list = [{"dir_name": n, "version": Version(n)} for n in match_dir_name_list] # type: List[Dict[str, Union[str, Version]]] + match_dir_version_list = sorted(match_dir_version_list, key = lambda x: x["version"], reverse = True) + if app_version is not None: + match_dir_version_list = list(x for x in match_dir_version_list if x["version"] < app_version) + + if len(match_dir_version_list) > 0: + if isinstance(match_dir_version_list[0]["dir_name"], str): + latest_config_path = os.path.join(search_path, match_dir_version_list[0]["dir_name"]) # type: ignore + if latest_config_path is not None: break + + # If not, check if there is a non versioned data dir + if check_dir_type_func(search_path): + latest_config_path = search_path + break + return latest_config_path @classmethod - def _isNonVersionedDataDir(cls, check_path): - # checks if the given path is (probably) a valid app directory for a version earlier than 2.6 - if not cls.__expected_dir_names_in_data: - return True - + def _isNonVersionedDataDir(cls, check_path: str) -> bool: dirs, files = next(os.walk(check_path))[1:] valid_dir_names = [dn for dn in dirs if dn in Resources.__expected_dir_names_in_data] - return valid_dir_names + + return len(valid_dir_names) > 0 @classmethod - def _isNonVersionedConfigDir(cls, check_path): + def _isNonVersionedConfigDir(cls, check_path: str) -> bool: dirs, files = next(os.walk(check_path))[1:] valid_file_names = [fn for fn in files if fn.endswith(".cfg")] - return bool(valid_file_names) + return len(valid_file_names) > 0 @classmethod - def addExpectedDirNameInData(cls, dir_name): + def addExpectedDirNameInData(cls, dir_name: str) -> None: cls.__expected_dir_names_in_data.append(dir_name) __expected_dir_names_in_data = [] # type: List[str] @@ -514,8 +602,10 @@ DefinitionContainers: "definitions", InstanceContainers: "instances", ContainerStacks: "stacks", - PresetSettingVisibilityGroups: "preset_setting_visibility_groups", - } + Plugins: "plugins", + BundledPackages: "bundled_packages", + Texts: "texts", + } #type: Dict[int, str] __types_storage = { Resources: "", Preferences: "", @@ -524,4 +614,5 @@ InstanceContainers: "instances", ContainerStacks: "stacks", Themes: "themes", - } + Plugins: "plugins", + } #type: Dict[int, str] diff -Nru uranium-3.3.0/UM/Scene/Camera.py uranium-4.4.1/UM/Scene/Camera.py --- uranium-3.3.0/UM/Scene/Camera.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Scene/Camera.py 2019-11-19 10:50:46.000000000 +0000 @@ -1,33 +1,40 @@ -# Copyright (c) 2017 Ultimaker B.V. +# Copyright (c) 2018 Ultimaker B.V. # Uranium is released under the terms of the LGPLv3 or higher. from . import SceneNode +from UM.Logger import Logger from UM.Math.Matrix import Matrix from UM.Math.Ray import Ray from UM.Math.Vector import Vector -from typing import Optional - +import enum import numpy import numpy.linalg -import copy +from typing import cast, Dict, Optional, Tuple, TYPE_CHECKING +from UM.Signal import Signal -MYPY = False -if MYPY: +if TYPE_CHECKING: from UM.Mesh.MeshData import MeshData - ## A SceneNode subclass that provides a camera object. # # The camera provides a projection matrix and its transformation matrix # can be used as view matrix. class Camera(SceneNode.SceneNode): - def __init__(self, name: str, parent = None): + class PerspectiveMode(enum.Enum): + PERSPECTIVE = "perspective" + ORTHOGRAPHIC = "orthographic" + + @staticmethod + def getDefaultZoomFactor(): + return -0.3334 + + def __init__(self, name: str = "", parent: SceneNode.SceneNode = None) -> None: super().__init__(parent) self._name = name # type: str self._projection_matrix = Matrix() # type: Matrix - self._projection_matrix.setOrtho(-5, 5, 5, -5, -100, 100) + self._projection_matrix.setOrtho(-5, 5, -5, 5, -100, 100) self._perspective = True # type: bool self._viewport_width = 0 # type: int self._viewport_height = 0 # type: int @@ -35,53 +42,121 @@ self._window_height = 0 # type: int self._auto_adjust_view_port_size = True # type: bool self.setCalculateBoundingBox(False) + self._cached_view_projection_matrix = None # type: Optional[Matrix] - def setMeshData(self, mesh_data: Optional["MeshData"]): - assert mesh_data is not None, "Camera's can't have mesh data" + self._zoom_factor = Camera.getDefaultZoomFactor() - def getAutoAdjustViewPort(self): + from UM.Application import Application + Application.getInstance().getPreferences().addPreference("general/camera_perspective_mode", default_value = self.PerspectiveMode.PERSPECTIVE.value) + Application.getInstance().getPreferences().preferenceChanged.connect(self._preferencesChanged) + self._preferencesChanged("general/camera_perspective_mode") + + def __deepcopy__(self, memo: Dict[int, object]) -> "Camera": + copy = cast(Camera, super().__deepcopy__(memo)) + copy._projection_matrix = self._projection_matrix + copy._window_height = self._window_height + copy._window_width = self._window_width + copy._viewport_height = self._viewport_height + copy._viewport_width = self._viewport_width + return copy + + def getZoomFactor(self): + return self._zoom_factor + + def setZoomFactor(self, zoom_factor: float) -> None: + # Only an orthographic camera has a zoom at the moment. + if not self.isPerspective(): + if self._zoom_factor != zoom_factor: + self._zoom_factor = zoom_factor + self._updatePerspectiveMatrix() + + def setMeshData(self, mesh_data: Optional["MeshData"]) -> None: + assert mesh_data is None, "Camera's can't have mesh data" + + def getAutoAdjustViewPort(self) -> bool: return self._auto_adjust_view_port_size - def setAutoAdjustViewPort(self, auto_adjust): + def setAutoAdjustViewPort(self, auto_adjust: bool) -> None: self._auto_adjust_view_port_size = auto_adjust ## Get the projection matrix of this camera. def getProjectionMatrix(self) -> Matrix: - return copy.deepcopy(self._projection_matrix) + return self._projection_matrix - def getViewportWidth(self): + def getViewportWidth(self) -> int: return self._viewport_width - def setViewportWidth(self, width: int): + def setViewportWidth(self, width: int) -> None: self._viewport_width = width + self._updatePerspectiveMatrix() - def setViewPortHeight(self, height: int): + def setViewportHeight(self, height: int) -> None: self._viewport_height = height + self._updatePerspectiveMatrix() - def setViewportSize(self, width: int, height: int): + def setViewportSize(self, width: int, height: int) -> None: self._viewport_width = width self._viewport_height = height + self._updatePerspectiveMatrix() + + def _updatePerspectiveMatrix(self): + view_width = self._viewport_width + view_height = self._viewport_height + projection_matrix = Matrix() + if self.isPerspective(): + if view_width != 0 and view_height != 0: + projection_matrix.setPerspective(30, view_width / view_height, 1, 500) + else: + # Almost no near/far plane, please. + if view_width != 0 and view_height != 0: + horizontal_zoom = view_width * self._zoom_factor + vertical_zoom = view_height * self._zoom_factor + projection_matrix.setOrtho(-view_width / 2 - horizontal_zoom, view_width / 2 + horizontal_zoom, + -view_height / 2 - vertical_zoom, view_height / 2 + vertical_zoom, + -9001, 9001) + self.setProjectionMatrix(projection_matrix) + self.perspectiveChanged.emit(self) + + def getViewProjectionMatrix(self): + if self._cached_view_projection_matrix is None: + inverted_transformation = self.getWorldTransformation() + inverted_transformation.invert() + self._cached_view_projection_matrix = self._projection_matrix.multiply(inverted_transformation, copy = True) + return self._cached_view_projection_matrix + + def _updateWorldTransformation(self): + self._cached_view_projection_matrix = None + super()._updateWorldTransformation() - def getViewportHeight(self): + def getViewportHeight(self) -> int: return self._viewport_height - def setWindowSize(self, width, height): + def setWindowSize(self, width: int, height: int) -> None: self._window_width = width self._window_height = height - def getWindowSize(self): + def getWindowSize(self) -> Tuple[int, int]: return self._window_width, self._window_height + + def render(self, renderer) -> bool: + # It's a camera. It doesn't need rendering. + return True ## Set the projection matrix of this camera. # \param matrix The projection matrix to use for this camera. - def setProjectionMatrix(self, matrix: Matrix): + def setProjectionMatrix(self, matrix: Matrix) -> None: self._projection_matrix = matrix + self._cached_view_projection_matrix = None - def isPerspective(self): + def isPerspective(self) -> bool: return self._perspective - def setPerspective(self, perspective: Matrix): - self._perspective = perspective + def setPerspective(self, perspective: bool) -> None: + if self._perspective != perspective: + self._perspective = perspective + self._updatePerspectiveMatrix() + + perspectiveChanged = Signal() ## Get a ray from the camera into the world. # @@ -94,7 +169,7 @@ # \return A Ray object representing a ray from the camera origin through X, Y. # # \note The near-plane coordinates should be in normalized form, that is within (-1, 1). - def getRay(self, x, y) -> Ray: + def getRay(self, x: float, y: float) -> Ray: window_x = ((x + 1) / 2) * self._window_width window_y = ((y + 1) / 2) * self._window_height view_x = (window_x / self._viewport_width) * 2 - 1 @@ -113,17 +188,47 @@ far = numpy.dot(transformation, far) far = far[0:3] / far[3] - dir = far - near - dir /= numpy.linalg.norm(dir) + direction = far - near + direction /= numpy.linalg.norm(direction) + + if self.isPerspective(): + origin = self.getWorldPosition() + direction = -direction + else: + # In orthographic mode, the origin is the click position on the plane where the camera resides, and that + # plane is parallel to the near and the far planes. + projection = numpy.array([view_x, -view_y, 0.0, 1.0], dtype = numpy.float32) + projection = numpy.dot(inverted_projection, projection) + projection = numpy.dot(transformation, projection) + projection = projection[0:3] / projection[3] - return Ray(self.getWorldPosition(), Vector(-dir[0], -dir[1], -dir[2])) + origin = Vector(data = projection) + + return Ray(origin, Vector(direction[0], direction[1], direction[2])) ## Project a 3D position onto the 2D view plane. - def project(self, position: Vector): + def project(self, position: Vector) -> Tuple[float, float]: projection = self._projection_matrix - view = self.getWorldTransformation().getInverse() + view = self.getWorldTransformation() + view.invert() position = position.preMultiply(view) position = position.preMultiply(projection) - return position.x / position.z / 2.0, position.y / position.z / 2.0 + + ## Updates the _perspective field if the preference was modified. + def _preferencesChanged(self, key): + if key != "general/camera_perspective_mode": # Only listen to camera_perspective_mode. + return + from UM.Application import Application + new_mode = str(Application.getInstance().getPreferences().getValue("general/camera_perspective_mode")) + + # Translate the selected mode to the camera state. + if new_mode == str(self.PerspectiveMode.ORTHOGRAPHIC.value): + Logger.log("d", "Changing perspective mode to orthographic.") + self.setPerspective(False) + elif new_mode == str(self.PerspectiveMode.PERSPECTIVE.value): + Logger.log("d", "Changing perspective mode to perspective.") + self.setPerspective(True) + else: + Logger.log("w", "Unknown perspective mode {new_mode}".format(new_mode = new_mode)) diff -Nru uranium-3.3.0/UM/Scene/GroupDecorator.py uranium-4.4.1/UM/Scene/GroupDecorator.py --- uranium-3.3.0/UM/Scene/GroupDecorator.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Scene/GroupDecorator.py 2019-11-19 10:50:46.000000000 +0000 @@ -1,33 +1,46 @@ from UM.Scene.SceneNodeDecorator import SceneNodeDecorator from UM.Scene.Selection import Selection +from typing import TYPE_CHECKING, Optional + +if TYPE_CHECKING: + from UM.Scene.SceneNode import SceneNode class GroupDecorator(SceneNodeDecorator): - def __init__(self): + def __init__(self, remove_when_empty: bool = True) -> None: super().__init__() + # Used to keep track of previous parent when an empty group removes itself from the scene. + # We keep this option so that it's possible to undo it. + self._old_parent = None # type: Optional[SceneNode] + self._remove_when_empty = remove_when_empty - self._old_parent = None # Used to keep track of previous parent when an empty group removes itself from the scene - - def setNode(self, node): + def setNode(self, node: "SceneNode") -> None: super().setNode(node) - self.getNode().childrenChanged.connect(self._onChildrenChanged) + if self._node is not None: + self._node.childrenChanged.connect(self._onChildrenChanged) - def isGroup(self): + def isGroup(self) -> bool: return True - def getOldParent(self): + def getOldParent(self) -> Optional["SceneNode"]: return self._old_parent - def _onChildrenChanged(self, node): - if not self.getNode().hasChildren(): + def _onChildrenChanged(self, node: "SceneNode") -> None: + if self._node is None: + return + if not self._remove_when_empty: + return + + if not self._node.hasChildren(): # A group that no longer has children may remove itself from the scene - self._old_parent = self.getNode().getParent() - self.getNode().setParent(None) - Selection.remove(self.getNode()) + self._old_parent = self._node.getParent() + self._node.setParent(None) + Selection.remove(self._node) else: - # A group that has removed itself from the scene because it had no children may add itself back to the scene when a child is added to it - if not self.getNode().getParent() and self._old_parent: - self.getNode().setParent(self._old_parent) + # A group that has removed itself from the scene because it had no children may add itself back to the scene + # when a child is added to it. + if not self._node.getParent() and self._old_parent: + self._node.setParent(self._old_parent) self._old_parent = None def __deepcopy__(self, memo): diff -Nru uranium-3.3.0/UM/Scene/Iterator/BreadthFirstIterator.py uranium-4.4.1/UM/Scene/Iterator/BreadthFirstIterator.py --- uranium-3.3.0/UM/Scene/Iterator/BreadthFirstIterator.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Scene/Iterator/BreadthFirstIterator.py 2019-11-19 10:50:46.000000000 +0000 @@ -6,7 +6,7 @@ class BreadthFirstIterator(Iterator.Iterator): - def __init__(self, scene_node: SceneNode): + def __init__(self, scene_node: SceneNode) -> None: super().__init__(scene_node) def _fillStack(self) -> None: diff -Nru uranium-3.3.0/UM/Scene/Iterator/DepthFirstIterator.py uranium-4.4.1/UM/Scene/Iterator/DepthFirstIterator.py --- uranium-3.3.0/UM/Scene/Iterator/DepthFirstIterator.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Scene/Iterator/DepthFirstIterator.py 2019-11-19 10:50:46.000000000 +0000 @@ -1,11 +1,11 @@ -# Copyright (c) 2015 Ultimaker B.V. +# Copyright (c) 2018 Ultimaker B.V. # Uranium is released under the terms of the LGPLv3 or higher. from UM.Scene.SceneNode import SceneNode from . import Iterator class DepthFirstIterator(Iterator.Iterator): - def __init__(self, scene_node: SceneNode): + def __init__(self, scene_node: SceneNode) -> None: super().__init__(scene_node) def _fillStack(self) -> None: diff -Nru uranium-3.3.0/UM/Scene/Iterator/Iterator.py uranium-4.4.1/UM/Scene/Iterator/Iterator.py --- uranium-3.3.0/UM/Scene/Iterator/Iterator.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Scene/Iterator/Iterator.py 2019-11-19 10:50:46.000000000 +0000 @@ -1,13 +1,18 @@ # Copyright (c) 2018 Ultimaker B.V. # Uranium is released under the terms of the LGPLv3 or higher. -from UM.Scene.SceneNode import SceneNode -from typing import List, Iterable +from typing import List, TYPE_CHECKING + +import typing + +if TYPE_CHECKING: + from UM.Scene.SceneNode import SceneNode + ## Abstract iterator class. class Iterator: - def __init__(self, scene_node: SceneNode): - super().__init__() # Call super to make multiple inheritence work. + def __init__(self, scene_node: "SceneNode") -> None: + super().__init__() # Call super to make multiple inheritance work. self._scene_node = scene_node self._node_stack = [] # type: List[SceneNode] self._fillStack() @@ -16,5 +21,5 @@ def _fillStack(self) -> None: raise NotImplementedError("Iterator is not correctly implemented. Requires a _fill_stack implementation.") - def __iter__(self) -> Iterable[SceneNode]: - return iter(self._node_stack) \ No newline at end of file + def __iter__(self) -> typing.Iterator["SceneNode"]: + return iter(self._node_stack) diff -Nru uranium-3.3.0/UM/Scene/Platform.py uranium-4.4.1/UM/Scene/Platform.py --- uranium-3.3.0/UM/Scene/Platform.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Scene/Platform.py 2019-11-19 10:50:46.000000000 +0000 @@ -29,6 +29,8 @@ self.setCalculateBoundingBox(False) def render(self, renderer): + if not self.isVisible(): + return True if not self._shader: self._shader = OpenGL.getInstance().createShaderProgram(Resources.getPath(Resources.Shaders, "platform.shader")) if self._texture: diff -Nru uranium-3.3.0/UM/Scene/PointCloudNode.py uranium-4.4.1/UM/Scene/PointCloudNode.py --- uranium-3.3.0/UM/Scene/PointCloudNode.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Scene/PointCloudNode.py 1970-01-01 00:00:00.000000000 +0000 @@ -1,91 +0,0 @@ -# Copyright (c) 2015 Ultimaker B.V. -# Uranium is released under the terms of the LGPLv3 or higher. - -from . import SceneNode -from UM.Application import Application -from UM.Resources import Resources -from UM.Math.Color import Color -from UM.ColorGenerator import ColorGenerator -from UM.View.GL.OpenGL import OpenGL -from UM.View.RenderBatch import RenderBatch -import numpy -import colorsys - - -class PointCloudNode(SceneNode.SceneNode): - def __init__(self, parent = None): - super().__init__(parent) - self._name = "Pointcloud" - self._selectable = True - Application.getInstance().addCloudNode(self) - self._material = None - self._color = Color(0,0,0,1) - if parent: - self._onParentChanged(parent) - - self.parentChanged.connect(self._onParentChanged) - - def _onParentChanged(self, parent): - num_scans = 12 #Hardcoded, change this! - if parent.callDecoration("isGroup"): - if not hasattr(parent, "color"): - Application.getInstance().addColorIndex(parent) - color_hsv = ColorGenerator().getColor(Application.getInstance().getColorIndex(parent)) - #r,g,b = colorsys.hsv_to_rgb(color_hsv[0], color_hsv[1], color_hsv[2]) - setattr(parent, "color", color_hsv) - color_hsv = getattr(parent, "color") - if len(parent.getChildren()) > num_scans * 0.5: - color_hsv[1] = 0.4 + (0.6 / ((num_scans * 0.5) - 1) * (len(parent.getChildren()) - 1. - 0.5 * num_scans)) - else: - color_hsv[1] = 1. - (0.6 / ((num_scans * 0.5) - 1) * (len(parent.getChildren()) - 1.)) - - r,g,b = colorsys.hsv_to_rgb(color_hsv[0], color_hsv[1], color_hsv[2]) - self.setColor(Color(r,g,b,1)) - else: - Application.getInstance().addColorIndex(self) - color_hsv = ColorGenerator().getColor(Application.getInstance().getColorIndex(self)) - r,g,b = colorsys.hsv_to_rgb(color_hsv[0], color_hsv[1], color_hsv[2]) - self.setColor(Color(r,g,b,1)) - - def getColor(self): - return self._color - - def setColor(self, color): - self._color = color - self._material = None # Reset material - - ## \brief Create new material. - def createMaterial(self): - self._material = OpenGL.getInstance().createShaderProgram(Resources.getPath(Resources.Shaders, "object.shader")) - - self._material.setUniformValue("u_ambientColor", Color(0.3, 0.3, 0.3, 1.0)) - self._material.setUniformValue("u_diffuseColor", self._color) - self._material.setUniformValue("u_specularColor", Color(1.0, 1.0, 1.0, 1.0)) - self._material.setUniformValue("u_shininess", 50.0) - - def render(self, renderer): - if not self._material: - self.createMaterial() - if self.getMeshData() and self.isVisible(): - renderer.queueNode(self, mode = RenderBatch.RenderMode.Points, shader = self._material) - return True - - ## \brief Set the mesh of this node/object - # \param mesh_data MeshData object - def setMeshData(self, mesh_data): - id = Application.getInstance().getCloudNodeIndex(self) - - # Create a unique color for each vert. First 3 uint 8 represent index in this cloud, final uint8 gives cloud ID. - vertice_indices = numpy.arange(mesh_data.getVertexCount(), dtype = numpy.int32) - cloud_indices = numpy.empty(mesh_data.getVertexCount(), dtype = numpy.int32) - cloud_indices.fill(255 - id) - cloud_indices = numpy.left_shift(cloud_indices, 24) # shift 24 bits. - combined_clouds = numpy.add(cloud_indices,vertice_indices) - data = numpy.fromstring(combined_clouds.tostring(),numpy.uint8) - - colors = numpy.resize(data,(mesh_data.getVertexCount(), 4)) - colors = colors.astype(numpy.float32) - colors /= 255 - self._mesh_data = mesh_data.set(colors=colors) - self._resetAABB() - self.meshDataChanged.emit(self) diff -Nru uranium-3.3.0/UM/Scene/SceneNodeDecorator.py uranium-4.4.1/UM/Scene/SceneNodeDecorator.py --- uranium-3.3.0/UM/Scene/SceneNodeDecorator.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Scene/SceneNodeDecorator.py 2019-11-19 10:50:46.000000000 +0000 @@ -1,24 +1,30 @@ # Copyright (c) 2018 Ultimaker B.V. # Uranium is released under the terms of the LGPLv3 or higher. +from typing import Dict, Optional, TYPE_CHECKING + +if TYPE_CHECKING: + from UM.Scene.SceneNode import SceneNode + + ## The point of a SceneNodeDecorator is that it can be added to a SceneNode, where it then provides decorations # Decorations are functions of a SceneNodeDecorator that can be called (except for functions already defined # in SceneNodeDecorator). # \sa SceneNode class SceneNodeDecorator: - def __init__(self, node: "SceneNode" = None): + def __init__(self, node: Optional["SceneNode"] = None) -> None: super().__init__() - self._node = node + self._node = node # type: Optional["SceneNode"] def setNode(self, node: "SceneNode") -> None: self._node = node - def getNode(self) -> "SceneNode": + def getNode(self) -> Optional["SceneNode"]: return self._node ## Clear all data associated with this decorator. This will be called before the decorator is removed - def clear(self): + def clear(self) -> None: pass - def __deepcopy__(self, memo) -> "SceneNodeDecorator": + def __deepcopy__(self, memo: Dict[int, object]) -> "SceneNodeDecorator": raise NotImplementedError("Subclass {0} of SceneNodeDecorator should implement their own __deepcopy__() method.".format(str(self))) diff -Nru uranium-3.3.0/UM/Scene/SceneNode.py uranium-4.4.1/UM/Scene/SceneNode.py --- uranium-3.3.0/UM/Scene/SceneNode.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Scene/SceneNode.py 2019-11-19 10:50:46.000000000 +0000 @@ -1,9 +1,9 @@ -# Copyright (c) 2018 Ultimaker B.V. +# Copyright (c) 2019 Ultimaker B.V. # Uranium is released under the terms of the LGPLv3 or higher. from copy import deepcopy import numpy -from typing import List, Optional +from typing import Any, Dict, List, Optional, cast from UM.Math.Matrix import Matrix from UM.Math.Vector import Vector @@ -16,7 +16,6 @@ from UM.Logger import Logger from UM.Scene.SceneNodeDecorator import SceneNodeDecorator - ## A scene node object. # # These objects can hold a mesh and multiple children. Each node has a transformation matrix @@ -29,17 +28,15 @@ @signalemitter class SceneNode: class TransformSpace: - Local = 1 - Parent = 2 - World = 3 + Local = 1 #type: int + Parent = 2 #type: int + World = 3 #type: int ## Construct a scene node. # \param parent The parent of this node (if any). Only a root node should have None as a parent. - # \param kwargs Keyword arguments. - # Possible keywords: - # - visible \type{bool} Is the SceneNode (and thus, all it's children) visible? Defaults to True - # - name \type{string} Name of the SceneNode. Defaults to empty string. - def __init__(self, parent: Optional["SceneNode"] = None, **kwargs): + # \param visible Is the SceneNode (and thus, all its children) visible? + # \param name Name of the SceneNode. + def __init__(self, parent: Optional["SceneNode"] = None, visible: bool = True, name: str = "") -> None: super().__init__() # Call super to make multiple inheritance work. self._children = [] # type: List[SceneNode] @@ -77,39 +74,38 @@ self._aabb = None # type: Optional[AxisAlignedBox] self._bounding_box_mesh = None # type: Optional[MeshData] - self._visible = kwargs.get("visible", True) # type: bool - self._name = kwargs.get("name", "") # type: str + self._visible = visible # type: bool + self._name = name # type: str self._decorators = [] # type: List[SceneNodeDecorator] # Store custom settings to be compatible with Savitar SceneNode - self._settings = {} + self._settings = {} # type: Dict[str, Any] ## Signals - self.boundingBoxChanged.connect(self.calculateBoundingBoxMesh) self.parentChanged.connect(self._onParentChanged) if parent: parent.addChild(self) - def __deepcopy__(self, memo): - copy = SceneNode() + def __deepcopy__(self, memo: Dict[int, object]) -> "SceneNode": + copy = self.__class__() copy.setTransformation(self.getLocalTransformation()) copy.setMeshData(self._mesh_data) - copy.setVisible(deepcopy(self._visible, memo)) - copy._selectable = deepcopy(self._selectable, memo) - copy._name = deepcopy(self._name, memo) + copy._visible = cast(bool, deepcopy(self._visible, memo)) + copy._selectable = cast(bool, deepcopy(self._selectable, memo)) + copy._name = cast(str, deepcopy(self._name, memo)) for decorator in self._decorators: - copy.addDecorator(deepcopy(decorator, memo)) + copy.addDecorator(cast(SceneNodeDecorator, deepcopy(decorator, memo))) for child in self._children: - copy.addChild(deepcopy(child, memo)) + copy.addChild(cast(SceneNode, deepcopy(child, memo))) self.calculateBoundingBoxMesh() return copy ## Set the center position of this node. # This is used to modify it's mesh data (and it's children) in such a way that they are centered. # In most cases this means that we use the center of mass as center (which most objects don't use) - def setCenterPosition(self, center: Vector): + def setCenterPosition(self, center: Vector) -> None: if self._mesh_data: m = Matrix() m.setByTranslation(-center) @@ -125,16 +121,18 @@ def getMirror(self) -> Vector: return self._mirror - def setMirror(self, vector) -> Vector: + def setMirror(self, vector) -> None: self._mirror = vector ## Get the MeshData of the bounding box # \returns \type{MeshData} Bounding box mesh. def getBoundingBoxMesh(self) -> Optional[MeshData]: + if self._bounding_box_mesh is None: + self.calculateBoundingBoxMesh() return self._bounding_box_mesh ## (re)Calculate the bounding box mesh. - def calculateBoundingBoxMesh(self): + def calculateBoundingBoxMesh(self) -> None: aabb = self.getBoundingBox() if aabb: bounding_box_mesh = MeshBuilder() @@ -179,9 +177,18 @@ self._bounding_box_mesh = bounding_box_mesh.build() + ## Return if the provided bbox collides with the bbox of this SceneNode + def collidesWithBbox(self, check_bbox: AxisAlignedBox) -> bool: + bbox = self.getBoundingBox() + if bbox is not None: + if check_bbox.intersectsBox(bbox) != AxisAlignedBox.IntersectionResult.FullIntersection: + return True + + return False + ## Handler for the ParentChanged signal # \param node Node from which this event was triggered. - def _onParentChanged(self, node: Optional["SceneNode"]): + def _onParentChanged(self, node: Optional["SceneNode"]) -> None: for child in self.getChildren(): child.parentChanged.emit(self) @@ -190,7 +197,7 @@ ## Add a SceneNodeDecorator to this SceneNode. # \param \type{SceneNodeDecorator} decorator The decorator to add. - def addDecorator(self, decorator: SceneNodeDecorator): + def addDecorator(self, decorator: SceneNodeDecorator) -> None: if type(decorator) in [type(dec) for dec in self._decorators]: Logger.log("w", "Unable to add the same decorator type (%s) to a SceneNode twice.", type(decorator)) return @@ -209,10 +216,11 @@ ## Get SceneNodeDecorators by type. # \param dec_type type of decorator to return. - def getDecorator(self, dec_type) -> Optional[SceneNodeDecorator]: + def getDecorator(self, dec_type: type) -> Optional[SceneNodeDecorator]: for decorator in self._decorators: if type(decorator) == dec_type: return decorator + return None ## Remove all decorators def removeDecorators(self): @@ -223,7 +231,7 @@ ## Remove decorator by type. # \param dec_type type of the decorator to remove. - def removeDecorator(self, dec_type: SceneNodeDecorator): + def removeDecorator(self, dec_type: type) -> None: for decorator in self._decorators: if type(decorator) == dec_type: decorator.clear() @@ -233,16 +241,16 @@ ## Call a decoration of this SceneNode. # SceneNodeDecorators add Decorations, which are callable functions. - # \param \type{string} function The function to be called. + # \param function The function to be called. # \param *args # \param **kwargs - def callDecoration(self, function: str, *args, **kwargs): + def callDecoration(self, function: str, *args, **kwargs) -> Any: for decorator in self._decorators: if hasattr(decorator, function): try: return getattr(decorator, function)(*args, **kwargs) except Exception as e: - Logger.log("e", "Exception calling decoration %s: %s", str(function), str(e)) + Logger.logException("e", "Exception calling decoration %s: %s", str(function), str(e)) return None ## Does this SceneNode have a certain Decoration (as defined by a Decorator) @@ -256,7 +264,7 @@ def getName(self) -> str: return self._name - def setName(self, name: str): + def setName(self, name: str) -> None: self._name = name ## How many nodes is this node removed from the root? @@ -268,7 +276,7 @@ ## \brief Set the parent of this object # \param scene_node SceneNode that is the parent of this object. - def setParent(self, scene_node: Optional["SceneNode"]): + def setParent(self, scene_node: Optional["SceneNode"]) -> None: if self._parent: self._parent.removeChild(self) @@ -287,7 +295,7 @@ return self._visible ## Set the visibility of this SceneNode. - def setVisible(self, visible: bool): + def setVisible(self, visible: bool) -> None: self._visible = visible ## \brief Get the (original) mesh data from the scene node/object. @@ -314,7 +322,8 @@ else: transformed_vertices = numpy.concatenate((transformed_vertices, tv), axis = 0) else: - transformed_vertices = self._mesh_data.getTransformed(self.getWorldTransformation()).getVertices() + if self._mesh_data: + transformed_vertices = self._mesh_data.getTransformed(self.getWorldTransformation()).getVertices() return transformed_vertices ## \brief Get the transformed normals from this scene node/object, based on the transformation of scene nodes wrt root. @@ -330,12 +339,13 @@ else: transformed_normals = numpy.concatenate((transformed_normals, tv), axis = 0) else: - transformed_normals = self._mesh_data.getTransformed(self.getWorldTransformation()).getNormals() + if self._mesh_data: + transformed_normals = self._mesh_data.getTransformed(self.getWorldTransformation()).getNormals() return transformed_normals ## \brief Set the mesh of this node/object # \param mesh_data MeshData object - def setMeshData(self, mesh_data: Optional[MeshData]): + def setMeshData(self, mesh_data: Optional[MeshData]) -> None: self._mesh_data = mesh_data self._resetAABB() self.meshDataChanged.emit(self) @@ -343,12 +353,12 @@ ## Emitted whenever the attached mesh data object changes. meshDataChanged = Signal() - def _onMeshDataChanged(self): + def _onMeshDataChanged(self) -> None: self.meshDataChanged.emit(self) ## \brief Add a child to this node and set it's parent as this node. # \params scene_node SceneNode to add. - def addChild(self, scene_node: "SceneNode"): + def addChild(self, scene_node: "SceneNode") -> None: if scene_node in self._children: return @@ -367,7 +377,7 @@ ## \brief remove a single child # \param child Scene node that needs to be removed. - def removeChild(self, child: "SceneNode"): + def removeChild(self, child: "SceneNode") -> None: if child not in self._children: return @@ -384,7 +394,7 @@ self.childrenChanged.emit(self) ## \brief Removes all children and its children's children. - def removeAllChildren(self): + def removeAllChildren(self) -> None: for child in self._children: child.removeAllChildren() self.removeChild(child) @@ -416,20 +426,20 @@ # \returns 4x4 transformation matrix def getWorldTransformation(self) -> Matrix: if self._world_transformation is None: - self._updateTransformation() + self._updateWorldTransformation() - return deepcopy(self._world_transformation) + return self._world_transformation.copy() ## \brief Returns the local transformation with respect to its parent. (from parent to local) # \retuns transformation 4x4 (homogenous) matrix def getLocalTransformation(self) -> Matrix: if self._transformation is None: - self._updateTransformation() + self._updateLocalTransformation() - return deepcopy(self._transformation) + return self._transformation.copy() def setTransformation(self, transformation: Matrix): - self._transformation = deepcopy(transformation) # Make a copy to ensure we never change the given transformation + self._transformation = transformation.copy() # Make a copy to ensure we never change the given transformation self._transformChanged() ## Get the local orientation value. @@ -443,7 +453,7 @@ # # \param rotation \type{Quaternion} A quaternion indicating the amount of rotation. # \param transform_space The space relative to which to rotate. Can be any one of the constants in SceneNode::TransformSpace. - def rotate(self, rotation: Quaternion, transform_space: int = TransformSpace.Local): + def rotate(self, rotation: Quaternion, transform_space: int = TransformSpace.Local) -> None: if not self._enabled: return @@ -463,21 +473,21 @@ # # \param orientation \type{Quaternion} The new orientation of this scene node. # \param transform_space The space relative to which to rotate. Can be Local or World from SceneNode::TransformSpace. - def setOrientation(self, orientation: Quaternion, transform_space: int = TransformSpace.Local): + def setOrientation(self, orientation: Quaternion, transform_space: int = TransformSpace.Local) -> None: if not self._enabled or orientation == self._orientation: return - new_transform_matrix = Matrix() + if transform_space == SceneNode.TransformSpace.World: if self.getWorldOrientation() == orientation: return - new_orientation = orientation * (self.getWorldOrientation() * self._orientation.getInverse()).getInverse() + new_orientation = orientation * (self.getWorldOrientation() * self._orientation.getInverse()).invert() orientation_matrix = new_orientation.toMatrix() else: # Local orientation_matrix = orientation.toMatrix() euler_angles = orientation_matrix.getEuler() - + new_transform_matrix = Matrix() new_transform_matrix.compose(scale = self._scale, angles = euler_angles, translate = self._position, shear = self._shear) self._transformation = new_transform_matrix self._transformChanged() @@ -493,7 +503,7 @@ # # \param scale \type{Vector} A Vector with three scale values # \param transform_space The space relative to which to scale. Can be any one of the constants in SceneNode::TransformSpace. - def scale(self, scale: Vector, transform_space: int = TransformSpace.Local): + def scale(self, scale: Vector, transform_space: int = TransformSpace.Local) -> None: if not self._enabled: return @@ -514,7 +524,7 @@ # # \param scale \type{Vector} The new scale value of the scene node. # \param transform_space The space relative to which to rotate. Can be Local or World from SceneNode::TransformSpace. - def setScale(self, scale: Vector, transform_space: int = TransformSpace.Local): + def setScale(self, scale: Vector, transform_space: int = TransformSpace.Local) -> None: if not self._enabled or scale == self._scale: return if transform_space == SceneNode.TransformSpace.Local: @@ -538,7 +548,7 @@ # # \param translation \type{Vector} The amount to translate by. # \param transform_space The space relative to which to translate. Can be any one of the constants in SceneNode::TransformSpace. - def translate(self, translation: Vector, transform_space: int = TransformSpace.Local): + def translate(self, translation: Vector, transform_space: int = TransformSpace.Local) -> None: if not self._enabled: return translation_matrix = Matrix() @@ -548,7 +558,7 @@ elif transform_space == SceneNode.TransformSpace.Parent: self._transformation.preMultiply(translation_matrix) elif transform_space == SceneNode.TransformSpace.World: - world_transformation = deepcopy(self._world_transformation) + world_transformation = self._world_transformation.copy() self._transformation.multiply(self._world_transformation.getInverse()) self._transformation.multiply(translation_matrix) self._transformation.multiply(world_transformation) @@ -558,7 +568,7 @@ # # \param position The new position value of the SceneNode. # \param transform_space The space relative to which to rotate. Can be Local or World from SceneNode::TransformSpace. - def setPosition(self, position: Vector, transform_space: int = TransformSpace.Local): + def setPosition(self, position: Vector, transform_space: int = TransformSpace.Local) -> None: if not self._enabled or position == self._position: return if transform_space == SceneNode.TransformSpace.Local: @@ -576,7 +586,7 @@ # # \param target \type{Vector} The target to look at. # \param up \type{Vector} The vector to consider up. Defaults to Vector.Unit_Y, i.e. (0, 1, 0). - def lookAt(self, target: Vector, up: Vector = Vector.Unit_Y): + def lookAt(self, target: Vector, up: Vector = Vector.Unit_Y) -> None: if not self._enabled: return @@ -616,7 +626,7 @@ ## Set whether this SceneNode is enabled. # \param enable True if this object should be enabled, False if not. # \sa isEnabled - def setEnabled(self, enable: bool): + def setEnabled(self, enable: bool) -> None: self._enabled = enable ## Get whether this SceneNode can be selected. @@ -628,7 +638,7 @@ ## Set whether this SceneNode can be selected. # # \param select True if this SceneNode should be selectable, False if not. - def setSelectable(self, select: bool): + def setSelectable(self, select: bool) -> None: self._selectable = select ## Get the bounding box of this node and its children. @@ -642,7 +652,7 @@ ## Set whether or not to calculate the bounding box for this node. # # \param calculate True if the bounding box should be calculated, False if not. - def setCalculateBoundingBox(self, calculate: bool): + def setCalculateBoundingBox(self, calculate: bool) -> None: self._calculate_aabb = calculate boundingBoxChanged = Signal() @@ -653,11 +663,17 @@ def getSetting(self, key: str, default_value: str = "") -> str: return self._settings.get(key, default_value) - def setSetting(self, key: str, value: str): + def setSetting(self, key: str, value: str) -> None: self._settings[key] = value + def invertNormals(self) -> None: + for child in self._children: + child.invertNormals() + if self._mesh_data: + self._mesh_data.invertNormals() + ## private: - def _transformChanged(self): + def _transformChanged(self) -> None: self._updateTransformation() self._resetAABB() self.transformationChanged.emit(self) @@ -665,40 +681,41 @@ for child in self._children: child._transformChanged() - def _updateTransformation(self): - scale, shear, euler_angles, translation, mirror = self._transformation.decompose() + def _updateLocalTransformation(self): + translation, euler_angle_matrix, scale, shear = self._transformation.decompose() + self._position = translation self._scale = scale self._shear = shear - self._mirror = mirror orientation = Quaternion() - euler_angle_matrix = Matrix() - euler_angle_matrix.setByEuler(euler_angles.x, euler_angles.y, euler_angles.z) orientation.setByMatrix(euler_angle_matrix) self._orientation = orientation + + def _updateWorldTransformation(self): if self._parent: - self._world_transformation = self._parent.getWorldTransformation().multiply(self._transformation, copy = True) + self._world_transformation = self._parent.getWorldTransformation().multiply(self._transformation) else: self._world_transformation = self._transformation - world_scale, world_shear, world_euler_angles, world_translation, world_mirror = self._world_transformation.decompose() + world_translation, world_euler_angle_matrix, world_scale, world_shear = self._world_transformation.decompose() self._derived_position = world_translation self._derived_scale = world_scale - - world_euler_angle_matrix = Matrix() - world_euler_angle_matrix.setByEuler(world_euler_angles.x, world_euler_angles.y, world_euler_angles.z) self._derived_orientation.setByMatrix(world_euler_angle_matrix) - def _resetAABB(self): + def _updateTransformation(self) -> None: + self._updateLocalTransformation() + self._updateWorldTransformation() + + def _resetAABB(self) -> None: if not self._calculate_aabb: return self._aabb = None - if self.getParent(): - self.getParent()._resetAABB() + self._bounding_box_mesh = None + if self._parent: + self._parent._resetAABB() self.boundingBoxChanged.emit() - def _calculateAABB(self): - aabb = None + def _calculateAABB(self) -> None: if self._mesh_data: aabb = self._mesh_data.getExtents(self.getWorldTransformation()) else: # If there is no mesh_data, use a boundingbox that encompasses the local (0,0,0) @@ -713,6 +730,6 @@ self._aabb = aabb ## String output for debugging. - def __str__(self): + def __str__(self) -> str: name = self._name if self._name != "" else hex(id(self)) return "<" + self.__class__.__qualname__ + " object: '" + name + "'>" \ No newline at end of file diff -Nru uranium-3.3.0/UM/Scene/SceneNodeSettings.py uranium-4.4.1/UM/Scene/SceneNodeSettings.py --- uranium-3.3.0/UM/Scene/SceneNodeSettings.py 1970-01-01 00:00:00.000000000 +0000 +++ uranium-4.4.1/UM/Scene/SceneNodeSettings.py 2019-11-19 10:50:46.000000000 +0000 @@ -0,0 +1,3 @@ + +class SceneNodeSettings: + LockPosition = "LockPosition" diff -Nru uranium-3.3.0/UM/Scene/Scene.py uranium-4.4.1/UM/Scene/Scene.py --- uranium-3.3.0/UM/Scene/Scene.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Scene/Scene.py 2019-11-19 10:50:46.000000000 +0000 @@ -1,52 +1,61 @@ # Copyright (c) 2018 Ultimaker B.V. # Uranium is released under the terms of the LGPLv3 or higher. -import functools #For partial to update files that were changed. -import os.path #To watch files for changes. -from PyQt5.QtCore import QFileSystemWatcher #To watch files for changes. +import functools # For partial to update files that were changed. +import os.path # To watch files for changes. import threading +from typing import Callable, List, Optional, Set -from UM.i18n import i18nCatalog +from PyQt5.QtCore import QFileSystemWatcher # To watch files for changes. + +from UM.Decorators import deprecated from UM.Logger import Logger -from UM.Mesh.ReadMeshJob import ReadMeshJob #To reload a mesh when its file was changed. -from UM.Message import Message #To display a message for reloading files that were changed. +from UM.Mesh.ReadMeshJob import ReadMeshJob # To reload a mesh when its file was changed. +from UM.Message import Message # To display a message for reloading files that were changed. from UM.Scene.Camera import Camera -from UM.Signal import Signal, signalemitter from UM.Scene.Iterator.BreadthFirstIterator import BreadthFirstIterator +from UM.Scene.SceneNode import SceneNode +from UM.Signal import Signal, signalemitter +from UM.i18n import i18nCatalog +from UM.Platform import Platform i18n_catalog = i18nCatalog("uranium") + ## Container object for the scene graph # # The main purpose of this class is to provide the root SceneNode. @signalemitter -class Scene(): - def __init__(self): - super().__init__() # Call super to make multiple inheritance work. +class Scene: + def __init__(self) -> None: + super().__init__() from UM.Scene.SceneNode import SceneNode - self._root = SceneNode(name= "Root") + self._root = SceneNode(name = "Root") self._root.setCalculateBoundingBox(False) self._connectSignalsRoot() - self._active_camera = None + self._active_camera = None # type: Optional[Camera] self._ignore_scene_changes = False self._lock = threading.Lock() - #Watching file for changes. + # Watching file for changes. self._file_watcher = QFileSystemWatcher() self._file_watcher.fileChanged.connect(self._onFileChanged) - def _connectSignalsRoot(self): + self._reload_message = None # type: Optional[Message] + self._callbacks = set() # type: Set[Callable] # Need to keep these in memory. This is a memory leak every time you refresh, but a tiny one. + + def _connectSignalsRoot(self) -> None: self._root.transformationChanged.connect(self.sceneChanged) self._root.childrenChanged.connect(self.sceneChanged) self._root.meshDataChanged.connect(self.sceneChanged) - def _disconnectSignalsRoot(self): + def _disconnectSignalsRoot(self) -> None: self._root.transformationChanged.disconnect(self.sceneChanged) self._root.childrenChanged.disconnect(self.sceneChanged) self._root.meshDataChanged.disconnect(self.sceneChanged) - def setIgnoreSceneChanges(self, ignore_scene_changes): + def setIgnoreSceneChanges(self, ignore_scene_changes: bool) -> None: if self._ignore_scene_changes != ignore_scene_changes: self._ignore_scene_changes = ignore_scene_changes if self._ignore_scene_changes: @@ -54,34 +63,20 @@ else: self._connectSignalsRoot() - ## Acquire the global scene lock. - # - # This will prevent any read or write actions on the scene from other threads, - # assuming those threads also properly acquire the lock. Most notably, this - # prevents the rendering thread from rendering the scene while it is changing. - # Deprecated, use getSceneLock() instead. - def acquireLock(self): - self._lock.acquire() - - ## Release the global scene lock. - # Deprecated, use getSceneLock() instead. - def releaseLock(self): - self._lock.release() - ## Gets the global scene lock. # # Use this lock to prevent any read or write actions on the scene from other threads, # assuming those threads also properly acquire the lock. Most notably, this # prevents the rendering thread from rendering the scene while it is changing. - def getSceneLock(self): + def getSceneLock(self) -> threading.Lock: return self._lock ## Get the root node of the scene. - def getRoot(self): + def getRoot(self) -> "SceneNode": return self._root ## Change the root node of the scene - def setRoot(self, node): + def setRoot(self, node: "SceneNode") -> None: if self._root != node: if not self._ignore_scene_changes: self._disconnectSignalsRoot() @@ -93,10 +88,10 @@ rootChanged = Signal() ## Get the camera that should be used for rendering. - def getActiveCamera(self): + def getActiveCamera(self) -> Optional[Camera]: return self._active_camera - def getAllCameras(self): + def getAllCameras(self) -> List[Camera]: cameras = [] for node in BreadthFirstIterator(self._root): if isinstance(node, Camera): @@ -105,12 +100,17 @@ ## Set the camera that should be used for rendering. # \param name The name of the camera to use. - def setActiveCamera(self, name): + def setActiveCamera(self, name: str) -> None: camera = self.findCamera(name) - if camera: + if camera and camera != self._active_camera: + if self._active_camera: + self._active_camera.perspectiveChanged.disconnect(self.sceneChanged) self._active_camera = camera + self._active_camera.perspectiveChanged.connect(self.sceneChanged) + else: + Logger.log("w", "Couldn't find camera with name [%s] to activate!" % name) - ## Signal. Emitted whenever something in the scene changes. + ## Signal that is emitted whenever something in the scene changes. # \param object The object that triggered the change. sceneChanged = Signal() @@ -119,65 +119,81 @@ # \param object_id The id of the object to search for, as returned by the python id() method. # # \return The object if found, or None if not. - def findObject(self, object_id): + def findObject(self, object_id: int) -> Optional["SceneNode"]: for node in BreadthFirstIterator(self._root): if id(node) == object_id: return node return None - def findCamera(self, name): + def findCamera(self, name: str) -> Optional[Camera]: for node in BreadthFirstIterator(self._root): if isinstance(node, Camera) and node.getName() == name: return node + return None ## Add a file to be watched for changes. # \param file_path The path to the file that must be watched. - def addWatchedFile(self, file_path): - self._file_watcher.addPath(file_path) + def addWatchedFile(self, file_path: str) -> None: + # The QT 5.10.0 issue, only on Windows. Cura crashes after loading a stl file from USB/sd-card/Cloud-based drive + if not Platform.isWindows(): + self._file_watcher.addPath(file_path) ## Remove a file so that it will no longer be watched for changes. # \param file_path The path to the file that must no longer be watched. - def removeWatchedFile(self, file_path): - self._file_watcher.removePath(file_path) + def removeWatchedFile(self, file_path: str) -> None: + # The QT 5.10.0 issue, only on Windows. Cura crashes after loading a stl file from USB/sd-card/Cloud-based drive + if not Platform.isWindows(): + self._file_watcher.removePath(file_path) ## Triggered whenever a file is changed that we currently have loaded. - def _onFileChanged(self, file_path): - if not os.path.isfile(self.file_path): #File doesn't exist any more. + def _onFileChanged(self, file_path: str) -> None: + if not os.path.isfile(file_path) or os.path.getsize(file_path) == 0: # File doesn't exist any more, or it is empty return - #Multiple nodes may be loaded from the same file at different stages. Reload them all. - from UM.Scene.Iterator.DepthFirstIterator import DepthFirstIterator #To find which nodes to reload when files have changed. - modified_nodes = (node for node in DepthFirstIterator(self.getRoot()) if node.getMeshData() and node.getMeshData().getFileName() == file_path) + # Multiple nodes may be loaded from the same file at different stages. Reload them all. + from UM.Scene.Iterator.DepthFirstIterator import DepthFirstIterator # To find which nodes to reload when files have changed. + modified_nodes = [node for node in DepthFirstIterator(self.getRoot()) if node.getMeshData() and node.getMeshData().getFileName() == file_path] # type: ignore if modified_nodes: - message = Message(i18n_catalog.i18nc("@info", "Would you like to reload {filename}?").format(filename = os.path.basename(self._file_name)), + # Hide the message if it was already visible + if self._reload_message is not None: + self._reload_message.hide() + + self._reload_message = Message(i18n_catalog.i18nc("@info", "Would you like to reload {filename}?").format(filename = os.path.basename(file_path)), title = i18n_catalog.i18nc("@info:title", "File has been modified")) - message.addAction("reload", i18n_catalog.i18nc("@action:button", "Reload"), icon = None, description = i18n_catalog.i18nc("@action:description", "This will trigger the modified files to reload from disk.")) - message.actionTriggered.connect(functools.partialmethod(self._reloadNodes, modified_nodes)) - message.show() + self._reload_message.addAction("reload", i18n_catalog.i18nc("@action:button", "Reload"), icon = "", description = i18n_catalog.i18nc("@action:description", "This will trigger the modified files to reload from disk.")) + self._reload_callback = functools.partial(self._reloadNodes, modified_nodes) + self._reload_message.actionTriggered.connect(self._reload_callback) + self._reload_message.show() ## Reloads a list of nodes after the user pressed the "Reload" button. # \param nodes The list of nodes that needs to be reloaded. # \param message The message that triggered the action to reload them. # \param action The button that triggered the action to reload them. - def _reloadNodes(self, nodes, message, action): + def _reloadNodes(self, nodes: List["SceneNode"], message: str, action: str) -> None: if action != "reload": return + if self._reload_message is not None: + self._reload_message.hide() for node in nodes: - if not os.path.isfile(node.getMeshData().getFileName()): #File doesn't exist any more. - continue - job = ReadMeshJob(node.getMeshData().getFileName()) - job._node = node - job.finished.connect(self._reloadJobFinished) - job.start() + meshdata = node.getMeshData() + if meshdata: + filename = meshdata.getFileName() + if not filename or not os.path.isfile(filename): # File doesn't exist any more. + continue + job = ReadMeshJob(filename) + reload_finished_callback = functools.partial(self._reloadJobFinished, node) + self._callbacks.add(reload_finished_callback) #Store it so it won't get garbage collected. This is a memory leak, but just one partial per reload so it's not much. + job.finished.connect(reload_finished_callback) + job.start() ## Triggered when reloading has finished. # # This then puts the resulting mesh data in the node. - def _reloadJobFinished(self, job): + def _reloadJobFinished(self, replaced_node: SceneNode, job: ReadMeshJob) -> None: for node in job.getResult(): mesh_data = node.getMeshData() if mesh_data: - job._node.setMeshData(mesh_data) + replaced_node.setMeshData(mesh_data) else: Logger.log("w", "Could not find a mesh in reloaded node.") \ No newline at end of file diff -Nru uranium-3.3.0/UM/Scene/Selection.py uranium-4.4.1/UM/Scene/Selection.py --- uranium-3.3.0/UM/Scene/Selection.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Scene/Selection.py 2019-11-19 10:50:46.000000000 +0000 @@ -1,6 +1,7 @@ # Copyright (c) 2015 Ultimaker B.V. # Uranium is released under the terms of the LGPLv3 or higher. -from typing import List + +from typing import List, Optional, Tuple from UM.Signal import Signal from UM.Math.Vector import Vector @@ -9,8 +10,6 @@ from UM.Operations.GroupedOperation import GroupedOperation -import copy - ## This class is responsible for keeping track of what objects are selected # It uses signals to notify others of changes in the selection @@ -18,7 +17,7 @@ # to all selected objects. class Selection: @classmethod - def add(cls, object): + def add(cls, object: SceneNode) -> None: if object not in cls.__selection: cls.__selection.append(object) object.transformationChanged.connect(cls._onTransformationChanged) @@ -26,29 +25,79 @@ cls.selectionChanged.emit() @classmethod - def remove(cls, object): + def remove(cls, object: SceneNode) -> None: if object in cls.__selection: cls.__selection.remove(object) + cls.unsetFace(object) object.transformationChanged.disconnect(cls._onTransformationChanged) cls._onTransformationChanged(object) cls.selectionChanged.emit() @classmethod + def getFaceSelectMode(cls) -> bool: + return cls.__face_select_mode + + @classmethod + def setFaceSelectMode(cls, select: bool) -> None: + if select != cls.__face_select_mode: + cls.__face_select_mode = select + cls.selectedFaceChanged.emit() + + @classmethod + def setFace(cls, object: SceneNode, face_id: int) -> None: + # Don't force-add the object, as the parent may be the 'actual' selected one. + cls.__selected_face = (object, face_id) + cls.selectedFaceChanged.emit() + + @classmethod + def unsetFace(cls, object: Optional["SceneNode"] = None) -> None: + if object is None or cls.__selected_face is None or object == cls.__selected_face[0]: + cls.__selected_face = None + cls.selectedFaceChanged.emit() + + @classmethod + def toggleFace(cls, object: SceneNode, face_id: int) -> None: + current_face = cls.__selected_face + if current_face is None or object != current_face[0] or face_id != current_face[1]: + cls.setFace(object, face_id) + else: + cls.unsetFace(object) + + @classmethod + def hoverFace(cls, object: SceneNode, face_id: int) -> None: + current_hover = cls.__hover_face + if current_hover is None or object != current_hover[0] or face_id != current_hover[1]: + # Don't force-add the object, as the parent may be the 'actual' selected one. + cls.__hover_face = (object, face_id) + cls.hoverFaceChanged.emit() + + @classmethod + def unhoverFace(cls, object: Optional["SceneNode"] = None) -> None: + if object is None or not cls.__hover_face or object == cls.__hover_face[0]: + cls.__hover_face = None + cls.hoverFaceChanged.emit() + + @classmethod ## Get number of selected objects - def getCount(cls): + def getCount(cls) -> int: return len(cls.__selection) @classmethod - def getAllSelectedObjects(cls): + def getAllSelectedObjects(cls) -> List[SceneNode]: return cls.__selection @classmethod - def getBoundingBox(cls): + def getSelectedFace(cls) -> Optional[Tuple[SceneNode, int]]: + return cls.__selected_face + + @classmethod + def getHoverFace(cls) -> Optional[Tuple[SceneNode, int]]: + return cls.__hover_face + + @classmethod + def getBoundingBox(cls) -> AxisAlignedBox: bounding_box = None # don't start with an empty bounding box, because that includes (0,0,0) for node in cls.__selection: - if not isinstance(node, SceneNode): - continue - if not bounding_box: bounding_box = node.getBoundingBox() else: @@ -63,14 +112,14 @@ ## Get selected object by index # \param index index of the object to return # \returns selected object or None if index was incorrect / not found - def getSelectedObject(cls, index): + def getSelectedObject(cls, index: int) -> Optional[SceneNode]: try: return cls.__selection[index] - except: + except IndexError: return None @classmethod - def isSelected(cls, object): + def isSelected(cls, object: SceneNode) -> bool: return object in cls.__selection @classmethod @@ -79,19 +128,27 @@ cls.selectionChanged.emit() @classmethod + def clearFace(cls): + cls.__selected_face = None + cls.__hover_face = None + cls.selectedFaceChanged.emit() + cls.hoverFaceChanged.emit() + + @classmethod ## Check if anything is selected at all. - def hasSelection(cls): + def hasSelection(cls) -> bool: return bool(cls.__selection) selectionChanged = Signal() selectionCenterChanged = Signal() - @classmethod - def getSelectionCenter(cls): - if not cls.__selection: - cls.__selection_center = Vector.Null + selectedFaceChanged = Signal() + hoverFaceChanged = Signal() + + @classmethod + def getSelectionCenter(cls) -> Vector: return cls.__selection_center ## Apply an operation to the entire selection @@ -130,14 +187,11 @@ @classmethod def _onTransformationChanged(cls, node): - cls.__selection_center = Vector.Null - - for object in cls.__selection: - cls.__selection_center = cls.__selection_center + object.getWorldPosition() - - cls.__selection_center = cls.__selection_center / len(cls.__selection) - + cls.__selection_center = cls.getBoundingBox().center cls.selectionCenterChanged.emit() __selection = [] # type: List[SceneNode] __selection_center = Vector(0, 0, 0) + __selected_face = None # type: Optional[Tuple[SceneNode, int]] + __hover_face = None # type: Optional[Tuple[SceneNode, int]] + __face_select_mode = False diff -Nru uranium-3.3.0/UM/Scene/ToolHandle.py uranium-4.4.1/UM/Scene/ToolHandle.py --- uranium-3.3.0/UM/Scene/ToolHandle.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Scene/ToolHandle.py 2019-11-19 10:50:46.000000000 +0000 @@ -1,6 +1,9 @@ -# Copyright (c) 2015 Ultimaker B.V. +# Copyright (c) 2019 Ultimaker B.V. # Uranium is released under the terms of the LGPLv3 or higher. +from typing import Optional +from UM.Logger import Logger +from UM.Mesh.MeshData import MeshData from . import SceneNode from UM.Resources import Resources @@ -15,7 +18,7 @@ ## A tool handle is a object in the scene that gives queues for what the tool it is -# 'paired' with can do. ToolHandles are used for translation, rotation & scale handles. +# 'paired' with can do. ToolHandles are, for example, used for translation, rotation & scale handles. # They can also be used as actual objects to interact with (in the case of translation, # pressing one arrow of the toolhandle locks the translation in that direction) class ToolHandle(SceneNode.SceneNode): @@ -46,52 +49,63 @@ self._scene = Application.getInstance().getController().getScene() - self._solid_mesh = None - self._line_mesh = None - self._selection_mesh = None + self._solid_mesh = None # type: Optional[MeshData] + self._line_mesh = None # type: Optional[MeshData] + self._selection_mesh = None # type: Optional[MeshData] self._shader = None - self._previous_dist = None - self._active_axis = None + self._active_axis = None # type: Optional[int] + + # Auto scale is used to ensure that the tool handle will end up the same size on the camera no matter the zoom + # This should be used to ensure that the tool handles are still usable even if the camera is zoomed in all the way. self._auto_scale = True + self._enabled = False + self.setCalculateBoundingBox(False) Selection.selectionCenterChanged.connect(self._onSelectionCenterChanged) Application.getInstance().engineCreatedSignal.connect(self._onEngineCreated) - def getLineMesh(self): + def getLineMesh(self) -> Optional[MeshData]: return self._line_mesh - def setLineMesh(self, mesh): + def setLineMesh(self, mesh: MeshData) -> None: self._line_mesh = mesh self.meshDataChanged.emit(self) - def getSolidMesh(self): + def getSolidMesh(self) -> Optional[MeshData]: return self._solid_mesh - def setSolidMesh(self, mesh): + def setSolidMesh(self, mesh: MeshData) -> None: self._solid_mesh = mesh self.meshDataChanged.emit(self) - def getSelectionMesh(self): + def getSelectionMesh(self) -> Optional[MeshData]: return self._selection_mesh - def setSelectionMesh(self, mesh): + def setSelectionMesh(self, mesh: MeshData) -> None: self._selection_mesh = mesh self.meshDataChanged.emit(self) - def getMaterial(self): - return self._shader + def render(self, renderer) -> bool: + if not self._enabled: + return True - def render(self, renderer): if not self._shader: self._shader = OpenGL.getInstance().createShaderProgram(Resources.getPath(Resources.Shaders, "toolhandle.shader")) if self._auto_scale: - camera_position = self._scene.getActiveCamera().getWorldPosition() - dist = (camera_position - self.getWorldPosition()).length() - scale = dist / 400 + active_camera = self._scene.getActiveCamera() + if active_camera.isPerspective(): + camera_position = active_camera.getWorldPosition() + dist = (camera_position - self.getWorldPosition()).length() + scale = dist / 400 + else: + view_width = active_camera.getViewportWidth() + current_size = view_width + (2 * active_camera.getZoomFactor() * view_width) + scale = current_size / view_width * 5 + self.setScale(Vector(scale, scale, scale)) if self._line_mesh: @@ -101,29 +115,42 @@ return True - def setActiveAxis(self, axis): + def setActiveAxis(self, axis: Optional[int]) -> None: if axis == self._active_axis or not self._shader: return if axis: - self._shader.setUniformValue("u_activeColor", self._axis_color_map[axis]) + self._shader.setUniformValue("u_activeColor", self._axis_color_map.get(axis, Color())) else: self._shader.setUniformValue("u_activeColor", self._disabled_axis_color) self._active_axis = axis self._scene.sceneChanged.emit(self) + def getActiveAxis(self) -> Optional[int]: + return self._active_axis + def isAxis(self, value): return value in self._axis_color_map - def buildMesh(self): + def buildMesh(self) -> None: # This method should be overridden by toolhandle implementations pass - def _onSelectionCenterChanged(self): - self.setPosition(Selection.getSelectionCenter()) - - def _onEngineCreated(self): - theme = Application.getInstance().getTheme() + def _onSelectionCenterChanged(self) -> None: + if self._enabled: + self.setPosition(Selection.getSelectionCenter()) + + def setEnabled(self, enable: bool): + super().setEnabled(enable) + # Force an update + self._onSelectionCenterChanged() + + def _onEngineCreated(self) -> None: + from UM.Qt.QtApplication import QtApplication + theme = QtApplication.getInstance().getTheme() + if theme is None: + Logger.log("w", "Could not get theme, so unable to create tool handle meshes.") + return self._disabled_axis_color = Color(*theme.getColor("disabled_axis").getRgb()) self._x_axis_color = Color(*theme.getColor("x_axis").getRgb()) self._y_axis_color = Color(*theme.getColor("y_axis").getRgb()) @@ -138,4 +165,4 @@ self.AllAxis: self._all_axis_color } - self.buildMesh() \ No newline at end of file + self.buildMesh() diff -Nru uranium-3.3.0/UM/Settings/constant_instance_containers.py uranium-4.4.1/UM/Settings/constant_instance_containers.py --- uranium-3.3.0/UM/Settings/constant_instance_containers.py 1970-01-01 00:00:00.000000000 +0000 +++ uranium-4.4.1/UM/Settings/constant_instance_containers.py 2019-11-19 10:50:46.000000000 +0000 @@ -0,0 +1,16 @@ +# Copyright (c) 2018 Ultimaker B.V. +# Cura is released under the terms of the LGPLv3 or higher. + +from .EmptyInstanceContainer import EmptyInstanceContainer + +# +# This file contains all constant instance containers. +# + + +# Instance of an empty container +EMPTY_CONTAINER_ID = "empty" +empty_container = EmptyInstanceContainer(EMPTY_CONTAINER_ID) + + +__all__ = ["EMPTY_CONTAINER_ID", "empty_container"] diff -Nru uranium-3.3.0/UM/Settings/ContainerFormatError.py uranium-4.4.1/UM/Settings/ContainerFormatError.py --- uranium-3.3.0/UM/Settings/ContainerFormatError.py 1970-01-01 00:00:00.000000000 +0000 +++ uranium-4.4.1/UM/Settings/ContainerFormatError.py 2019-11-19 10:50:46.000000000 +0000 @@ -0,0 +1,7 @@ +# Copyright (c) 2018 Ultimaker B.V. +# Uranium is released under the terms of the LGPLv3 or higher. + +## A marker exception to indicate that something went wrong in deserialising a +# container because the file is corrupt. +class ContainerFormatError(Exception): + pass \ No newline at end of file diff -Nru uranium-3.3.0/UM/Settings/ContainerProvider.py uranium-4.4.1/UM/Settings/ContainerProvider.py --- uranium-3.3.0/UM/Settings/ContainerProvider.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Settings/ContainerProvider.py 2019-11-19 10:50:46.000000000 +0000 @@ -1,14 +1,12 @@ -# Copyright (c) 2017 Ultimaker B.V. +# Copyright (c) 2018 Ultimaker B.V. # Uranium is released under the terms of the LGPLv3 or higher. -from typing import Any, Dict, Iterable, Optional +from typing import Any, cast, Dict, Iterable, Optional +from UM.Logger import Logger from UM.PluginObject import PluginObject #We're implementing this. from UM.PluginRegistry import PluginRegistry #To get the priority metadata to sort by. - -MYPY = False -if MYPY: - from UM.Settings.Interfaces import ContainerInterface +from UM.Settings.Interfaces import ContainerInterface ## This class serves as a database for containers. # @@ -16,12 +14,12 @@ # ``getAllIds``, ``loadMetadata`` and ``loadContainer`` methods. class ContainerProvider(PluginObject): ## Initialises the provider, which creates a few empty fields. - def __init__(self): + def __init__(self) -> None: super().__init__() #The container data, dictionaries indexed by ID. - self._metadata = {} #The metadata of all containers this provider can provide. - self._containers = {} #The complete containers that have been loaded so far. This is filled lazily upon requesting profiles. + self._metadata = {} #type: Dict[str, Dict[str, Any]] #The metadata of all containers this provider can provide. + self._containers = {} #type: Dict[str, ContainerInterface] #The complete containers that have been loaded so far. This is filled lazily upon requesting profiles. ## Gets a container with a specified ID. # @@ -29,9 +27,13 @@ # # \param container_id The ID of a container to get. # \return The specified container. - def __getitem__(self, container_id: str): + def __getitem__(self, container_id: str) -> ContainerInterface: if container_id not in self._containers: - self._containers[container_id] = self.loadContainer(container_id) + try: + self._containers[container_id] = self.loadContainer(container_id) + except: + Logger.logException("e", "Failed to load container %s", container_id) + raise return self._containers[container_id] ## Compares container providers by their priority so that they are easy to @@ -41,13 +43,21 @@ # \return A positive number if this provider has lower priority than the # other, or a negative number if this provider has higher priority than # the other. - def __lt__(self, other: "ContainerProvider"): + def __lt__(self, other: object) -> bool: + if type(other) is not type(self): + return False + other = cast(ContainerProvider, other) + plugin_registry = PluginRegistry.getInstance() my_metadata = plugin_registry.getMetaData(self.getPluginId()) other_metadata = plugin_registry.getMetaData(other.getPluginId()) return my_metadata["container_provider"]["priority"] < other_metadata["container_provider"]["priority"] - def __eq__(self, other: "ContainerProvider"): + def __eq__(self, other: object) -> bool: + if type(other) is not type(self): + return False + other = cast(ContainerProvider, other) + plugin_registry = PluginRegistry.getInstance() my_metadata = plugin_registry.getMetaData(self.getPluginId()) other_metadata = plugin_registry.getMetaData(other.getPluginId()) @@ -57,7 +67,7 @@ # # This is intended to be called from the implementation of # ``loadMetadata``. - def addMetadata(self, metadata: Dict[str, Any]): + def addMetadata(self, metadata: Dict[str, Any]) -> None: if "id" not in metadata: raise ValueError("The specified metadata has no ID.") if metadata["id"] in self._metadata: @@ -79,9 +89,15 @@ if container_id not in self._metadata: metadata = self.loadMetadata(container_id) if metadata is None: + Logger.log("e", "Failed to load metadata of container %s", container_id) return None return self._metadata[container_id] + # Gets the container file path with for the container with the given ID. Returns None if the container/file doesn't + # exist. + def getContainerFilePathById(self, container_id: str) -> Optional[str]: + raise NotImplementedError("The container provider {class_name} doesn't properly implement getAllIds.".format(class_name = self.__class__.__name__)) + ## Gets a list of IDs of all containers this provider provides. # # \return A list of all container IDs. @@ -124,5 +140,5 @@ # This deletes the container from the source. If it's read only, this # should give an exception. # \param container_id The ID of the container to remove. - def removeContainer(self, container_id): - raise NotImplementedError("The container provider {class_name} doesn't properly implement removeContainer.".format(class_name = self.__class__.__name__)) \ No newline at end of file + def removeContainer(self, container_id: str) -> None: + raise NotImplementedError("The container provider {class_name} doesn't properly implement removeContainer.".format(class_name = self.__class__.__name__)) diff -Nru uranium-3.3.0/UM/Settings/ContainerQuery.py uranium-4.4.1/UM/Settings/ContainerQuery.py --- uranium-3.3.0/UM/Settings/ContainerQuery.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Settings/ContainerQuery.py 2019-11-19 10:50:46.000000000 +0000 @@ -1,8 +1,13 @@ -# Copyright (c) 2017 Ultimaker B.V. +# Copyright (c) 2019 Ultimaker B.V. # Uranium is released under the terms of the LGPLv3 or higher. +import collections # To cache queries. import re -from typing import Optional +from typing import Any, cast, Dict, List, Optional, Tuple, Type, TYPE_CHECKING +import functools + +if TYPE_CHECKING: + from UM.Settings.ContainerRegistry import ContainerRegistry ## Wrapper class to perform a search for a certain set of containers. # @@ -13,19 +18,26 @@ # \note Instances of this class will ignore the query results when # comparing. This is done to simplify the caching code in ContainerRegistry. class ContainerQuery: + cache = {} # type: Dict[Tuple[Any, ...], ContainerQuery] # To speed things up, we're keeping a cache of the container queries we've executed before. + + # If a field is provided in the format "[t1|t2|t3|...]", try to find if any of the given tokens is present in the + # value. Use regex to do matching because certain fields such as name can be filled by a user and it can be string + # like "[my_printer][something]". + OPTIONS_REGEX = re.compile("^\\[[a-zA-Z0-9-_\\+\\. ]+(\\|[a-zA-Z0-9-_\\+\\. ]+)*\\]$") + ## Constructor # # \param registry The ContainerRegistry instance this query operates on. # \param container_type A specific container class that should be filtered for. # \param ignore_case Whether or not the query should be case sensitive. # \param kwargs A dict of key, value pairs that should be searched for. - def __init__(self, registry, *, ignore_case = False, **kwargs): + def __init__(self, registry: "ContainerRegistry", *, ignore_case = False, **kwargs: Any) -> None: self._registry = registry self._ignore_case = ignore_case self._kwargs = kwargs - self._result = None + self._result = None # type: Optional[List[Dict[str, Any]]] ## Get the class of the containers that this query should find, if any. # @@ -36,52 +48,68 @@ ## Retrieve the result of this query. # # \return A list of containers matching this query, or None if the query was not executed. - def getResult(self): + def getResult(self) -> Optional[List[Dict[str, Any]]]: return self._result ## Check to see if this is a very simple query that looks up a single container by ID. # # \return True if this query is case sensitive, has only 1 thing to search for and that thing is "id". - def isIdOnly(self): + def isIdOnly(self) -> bool: return len(self._kwargs) == 1 and not self._ignore_case and "id" in self._kwargs - ## Check to see if any of the kwargs is a Dict, which is not hashable for query caching. - # - # \return True if this query is hashable. - def isHashable(self): - for kwarg in self._kwargs.values(): - if isinstance(kwarg, dict): - return False - return True - ## Execute the actual query. # # This will search the container metadata of the ContainerRegistry based # on the arguments provided to this class' constructor. After it is done, # the result can be retrieved with getResult(). - def execute(self, candidates = None): + def execute(self, candidates: Optional[List[Any]] = None) -> None: + # If we filter on multiple metadata entries, we can filter on each entry + # separately. We then cache the sub-filters so that subsequent filters + # with a similar-but-different query can be sped up. For instance, if we + # are looking for all materials for UM3+AA0.4 and later for UM3+AA0.8, + # then for UM3+AA0.4 we'll first filter on UM3 and then for AA0.4, so + # that we can re-use the cached query for UM3 when we look for + # UM3+AA0.8. + # To this end we'll track the filter so far and progressively refine our + # filter. At every step we check the cache and store the query in the + # cache if it's not there yet. + key_so_far = (self._ignore_case, ) # type: Tuple[Any, ...] if candidates is None: - candidates = list(self._registry.metadata.values()) + filtered_candidates = list(self._registry.metadata.values()) + else: + filtered_candidates = candidates - #Filter on all the key-word arguments. - for key, value in self._kwargs.items(): - if isinstance(value, str): - if ("*" or "|") in value: - key_filter = lambda candidate, key = key, value = value: self._matchRegExp(candidate, key, value) + # Filter on all the key-word arguments one by one. + for key, value in self._kwargs.items(): # For each progressive filter... + key_so_far += (key, value) + if candidates is None and key_so_far in self.cache: + filtered_candidates = cast(List[Dict[str, Any]], self.cache[key_so_far].getResult()) + continue + + # Find the filter to execute. + if isinstance(value, type): + key_filter = functools.partial(self._matchType, property_name = key, value = value) + elif isinstance(value, str): + if ContainerQuery.OPTIONS_REGEX.fullmatch(value) is not None: + # With [token1|token2|token3|...], we try to find if any of the given tokens is present in the value. + key_filter = functools.partial(self._matchRegMultipleTokens, property_name = key, value = value) + elif ("*" or "|") in value: + key_filter = functools.partial(self._matchRegExp, property_name = key, value = value) else: - key_filter = lambda candidate, key = key, value = value: self._matchString(candidate, key, value) + key_filter = functools.partial(self._matchString, property_name = key, value = value) else: - key_filter = lambda candidate, key = key, value = value: self._matchType(candidate, key, value) - candidates = filter(key_filter, candidates) + key_filter = functools.partial(self._matchDirect, property_name = key, value = value) - #Execute all filters. - self._result = list(candidates) + # Execute this filter. + filtered_candidates = list(filter(key_filter, filtered_candidates)) - def __hash__(self): - return hash(self.__key()) + # Store the result in the cache. + if candidates is None: # Only cache if we didn't pre-filter candidates. + cached_arguments = dict(zip(key_so_far[1::2], key_so_far[2::2])) + self.cache[key_so_far] = ContainerQuery(self._registry, ignore_case = self._ignore_case, **cached_arguments) # Cache this query for the next time. + self.cache[key_so_far]._result = filtered_candidates - def __eq__(self, other): - return isinstance(other, ContainerQuery) and self.__key() == other.__key() + self._result = filtered_candidates ## Human-readable string representation for debugging. def __str__(self): @@ -89,11 +117,17 @@ # protected: + def _matchDirect(self, metadata: Dict[str, Any], property_name: str, value: str): + if property_name not in metadata: + return False + + return value == metadata[property_name] + # Check to see if a container matches with a regular expression - def _matchRegExp(self, metadata, property_name, value): + def _matchRegExp(self, metadata: Dict[str, Any], property_name: str, value: str): if property_name not in metadata: return False - value = re.escape(value) #Escape for regex patterns. + value = re.escape(value) # Escape for regex patterns. value = "^" + value.replace("\\*", ".*").replace("\\(", "(").replace("\\)", ")").replace("\\|", "|") + "$" #Instead of (now escaped) asterisks, match on any string. Also add anchors for a complete match. if self._ignore_case: value_pattern = re.compile(value, re.IGNORECASE) @@ -102,26 +136,45 @@ return value_pattern.match(str(metadata[property_name])) + def _matchRegMultipleTokens(self, metadata: Dict[str, Any], property_name: str, value: str): + if property_name not in metadata: + return False + + # Use pattern /^(token1|token2|token3|...)$/ to look for any match of the given tokens + value = "^" + value.replace("[", "(").replace("]", ")") + "$" #Match on any string and add anchors for a complete match. + if self._ignore_case: + value_pattern = re.compile(value, re.IGNORECASE) + else: + value_pattern = re.compile(value) + + return value_pattern.match(str(metadata[property_name])) + # Check to see if a container matches with a string - def _matchString(self, metadata, property_name, value): + def _matchString(self, metadata: Dict[str, Any], property_name: str, value: str) -> bool: if property_name not in metadata: return False - value = self._maybeLowercase(value) - return value == self._maybeLowercase(str(metadata[property_name])) + if self._ignore_case: + return value.lower() == str(metadata[property_name]).lower() + else: + return value == str(metadata[property_name]) # Check to see if a container matches with a specific typed property - def _matchType(self, metadata, property_name, value): + def _matchType(self, metadata: Dict[str, Any], property_name: str, value: Type): if property_name == "container_type": - return issubclass(metadata.get(property_name), value) #Also allow subclasses. - return value == metadata.get(property_name) #If the metadata entry doesn't exist, match on None. + if "container_type" in metadata: + try: + return issubclass(metadata["container_type"], value) # Also allow subclasses. + except TypeError: + # Since the type error that we got is extremely not helpful, we re-raise it with more info. + raise TypeError("The value {value} of the property {property} is not a type but a {type}: {metadata}" + .format(value = value, property = property_name, type = type(value), metadata = metadata)) + else: + return False - # Helper function to simplify ignore case handling - def _maybeLowercase(self, value): - if self._ignore_case: - return value.lower() + if property_name not in metadata: + return False + + return value == metadata[property_name] - return value + __slots__ = ("_ignore_case", "_kwargs", "_result", "_registry") - # Private helper function for __hash__ and __eq__ - def __key(self): - return (type(self), self._ignore_case, tuple(self._kwargs.items())) diff -Nru uranium-3.3.0/UM/Settings/ContainerRegistry.py uranium-4.4.1/UM/Settings/ContainerRegistry.py --- uranium-3.3.0/UM/Settings/ContainerRegistry.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Settings/ContainerRegistry.py 2019-11-19 10:50:46.000000000 +0000 @@ -1,46 +1,35 @@ -# Copyright (c) 2017 Ultimaker B.V. +# Copyright (c) 2018 Ultimaker B.V. # Uranium is released under the terms of the LGPLv3 or higher. +import collections +import gc import os -import queue #For priority sorting of container providers. -import re #For finding containers with asterisks in the constraints and for detecting backup files. -import urllib #For ensuring container file names are proper file names -import urllib.parse import pickle #For serializing/deserializing Python classes to binary files -from typing import Any, cast, Dict, Iterable, List, Optional -import collections +import re #For finding containers with asterisks in the constraints and for detecting backup files. import time +from typing import Any, cast, Dict, List, Optional, Set, Type, TYPE_CHECKING +import UM.Dictionary import UM.FlameProfiler +from UM.LockFile import LockFile +from UM.Logger import Logger +from UM.MimeTypeDatabase import MimeType, MimeTypeDatabase from UM.PluginRegistry import PluginRegistry #To register the container type plug-ins and container provider plug-ins. from UM.Resources import Resources -from UM.MimeTypeDatabase import MimeTypeDatabase -from UM.Logger import Logger -from UM.Settings.Interfaces import ContainerInterface -from UM.Signal import Signal, signalemitter -from UM.LockFile import LockFile - -import UM.Dictionary -import gc - -MYPY = False -if MYPY: - from UM.Application import Application - +from UM.Settings.ContainerFormatError import ContainerFormatError from UM.Settings.ContainerProvider import ContainerProvider -from UM.Settings.DefinitionContainer import DefinitionContainer +from UM.Settings.constant_instance_containers import empty_container +from . import ContainerQuery from UM.Settings.ContainerStack import ContainerStack +from UM.Settings.DefinitionContainer import DefinitionContainer from UM.Settings.InstanceContainer import InstanceContainer -from UM.Settings.Interfaces import ContainerRegistryInterface -from UM.Settings.Interfaces import DefinitionContainerInterface - -import UM.Qt.QtApplication -from . import ContainerQuery +from UM.Settings.Interfaces import ContainerInterface, ContainerRegistryInterface, DefinitionContainerInterface +from UM.Signal import Signal, signalemitter -CONFIG_LOCK_FILENAME = "uranium.lock" +if TYPE_CHECKING: + from UM.PluginObject import PluginObject + from UM.Qt.QtApplication import QtApplication -# The maximum amount of query results we should cache -MaxQueryCacheSize = 1000 ## Central class to manage all setting providers. # @@ -50,24 +39,30 @@ # appropriate providers. @signalemitter class ContainerRegistry(ContainerRegistryInterface): - def __init__(self, *args, **kwargs): - super().__init__(*args, **kwargs) + def __init__(self, application: "QtApplication") -> None: + if ContainerRegistry.__instance is not None: + raise RuntimeError("Try to create singleton '%s' more than once" % self.__class__.__name__) + ContainerRegistry.__instance = self + + super().__init__() - self._emptyInstanceContainer = _EmptyInstanceContainer("empty") + self._application = application # type: QtApplication - #Sorted list of container providers (keep it sorted by sorting each time you add one!). - self._providers = [] # type: List[ContainerProvider] + self._emptyInstanceContainer = empty_container # type: InstanceContainer + + # Sorted list of container providers (keep it sorted by sorting each time you add one!). + self._providers = [] # type: List[ContainerProvider] PluginRegistry.addType("container_provider", self.addProvider) - self.metadata = {} # type: Dict[str, Dict[str, Any]] - self._containers = {} # type: Dict[str, ContainerInterface] - self.source_provider = {} # type: Dict[str, Optional[ContainerProvider]] #Where each container comes from. + self.metadata = {} # type: Dict[str, Dict[str, Any]] + self._containers = {} # type: Dict[str, ContainerInterface] + self._wrong_container_ids = set() # type: Set[str] # Set of already known wrong containers that must be skipped + self.source_provider = {} # type: Dict[str, Optional[ContainerProvider]] # Where each container comes from. # Ensure that the empty container is added to the ID cache. self.metadata["empty"] = self._emptyInstanceContainer.getMetaData() self._containers["empty"] = self._emptyInstanceContainer self.source_provider["empty"] = None self._resource_types = {"definition": Resources.DefinitionContainers} # type: Dict[str, int] - self._query_cache = collections.OrderedDict() # This should really be an ordered set but that does not exist... #Since queries are based on metadata, we need to make sure to clear the cache when a container's metadata changes. self.containerMetaDataChanged.connect(self._clearQueryCache) @@ -90,10 +85,14 @@ return self._providers[0] raise NotImplementedError("Not implemented default save provider for multiple providers") + ## This method adds the current id to the list of wrong containers that are skipped when looking for a container + def addWrongContainerId(self, wrong_container_id: str) -> None: + self._wrong_container_ids.add(wrong_container_id) + ## Adds a container provider to search through containers in. - def addProvider(self, provider: "PluginObject"): + def addProvider(self, provider: ContainerProvider) -> None: self._providers.append(provider) - #Re-sort every time. It's quadratic, but there shouldn't be that many providers anyway... + # Re-sort every time. It's quadratic, but there shouldn't be that many providers anyway... self._providers.sort(key = lambda provider: PluginRegistry.getInstance().getMetaData(provider.getPluginId())["container_provider"].get("priority", 0)) ## Find all DefinitionContainer objects matching certain criteria. @@ -102,7 +101,7 @@ # keys and values that need to match the metadata of the # DefinitionContainer. An asterisk in the values can be used to denote a # wildcard. - def findDefinitionContainers(self, **kwargs) -> List[DefinitionContainerInterface]: + def findDefinitionContainers(self, **kwargs: Any) -> List[DefinitionContainerInterface]: return cast(List[DefinitionContainerInterface], self.findContainers(container_type = DefinitionContainer, **kwargs)) ## Get the metadata of all definition containers matching certain criteria. @@ -112,8 +111,8 @@ # used to denote a wildcard. # \return A list of metadata dictionaries matching the search criteria, or # an empty list if nothing was found. - def findDefinitionContainersMetadata(self, **kwargs) -> List[Dict[str, Any]]: - return cast(List[Dict[str, Any]], self.findContainersMetadata(container_type = DefinitionContainer, **kwargs)) + def findDefinitionContainersMetadata(self, **kwargs: Any) -> List[Dict[str, Any]]: + return self.findContainersMetadata(container_type = DefinitionContainer, **kwargs) ## Find all InstanceContainer objects matching certain criteria. # @@ -121,7 +120,7 @@ # keys and values that need to match the metadata of the # InstanceContainer. An asterisk in the values can be used to denote a # wildcard. - def findInstanceContainers(self, **kwargs) -> List[InstanceContainer]: + def findInstanceContainers(self, **kwargs: Any) -> List[InstanceContainer]: return cast(List[InstanceContainer], self.findContainers(container_type = InstanceContainer, **kwargs)) ## Find the metadata of all instance containers matching certain criteria. @@ -131,15 +130,15 @@ # used to denote a wildcard. # \return A list of metadata dictionaries matching the search criteria, or # an empty list if nothing was found. - def findInstanceContainersMetadata(self, **kwargs) -> List[Dict[str, Any]]: - return cast(List[Dict[str, Any]], self.findContainersMetadata(container_type = InstanceContainer, **kwargs)) + def findInstanceContainersMetadata(self, **kwargs: Any) -> List[Dict[str, Any]]: + return self.findContainersMetadata(container_type = InstanceContainer, **kwargs) ## Find all ContainerStack objects matching certain criteria. # # \param kwargs \type{dict} A dictionary of keyword arguments containing # keys and values that need to match the metadata of the ContainerStack. # An asterisk in the values can be used to denote a wildcard. - def findContainerStacks(self, **kwargs) -> List[ContainerStack]: + def findContainerStacks(self, **kwargs: Any) -> List[ContainerStack]: return cast(List[ContainerStack], self.findContainers(container_type = ContainerStack, **kwargs)) ## Find the metadata of all container stacks matching certain criteria. @@ -149,8 +148,8 @@ # used to denote a wildcard. # \return A list of metadata dictionaries matching the search criteria, or # an empty list if nothing was found. - def findContainerStacksMetadata(self, **kwargs) -> List[Dict[str, Any]]: - return cast(List[Dict[str, Any]], self.findContainersMetadata(container_type = ContainerStack, **kwargs)) + def findContainerStacksMetadata(self, **kwargs: Any) -> List[Dict[str, Any]]: + return self.findContainersMetadata(container_type = ContainerStack, **kwargs) ## Find all container objects matching certain criteria. # @@ -163,21 +162,28 @@ # \return A list of containers matching the search criteria, or an empty # list if nothing was found. @UM.FlameProfiler.profile - def findContainers(self, *, ignore_case = False, **kwargs) -> List[ContainerInterface]: - #Find the metadata of the containers and grab the actual containers from there. + def findContainers(self, *, ignore_case: bool = False, **kwargs: Any) -> List[ContainerInterface]: + # Find the metadata of the containers and grab the actual containers from there. results_metadata = self.findContainersMetadata(ignore_case = ignore_case, **kwargs) result = [] for metadata in results_metadata: - if metadata["id"] in self._containers: #Already loaded, so just return that. + if metadata["id"] in self._containers: # Already loaded, so just return that. result.append(self._containers[metadata["id"]]) - else: #Metadata is loaded, but not the actual data. + else: # Metadata is loaded, but not the actual data. + if metadata["id"] in self._wrong_container_ids: + Logger.logException("e", "Error when loading container {container_id}: This is a weird container, probably some file is missing".format(container_id = metadata["id"])) + continue provider = self.source_provider[metadata["id"]] if not provider: Logger.log("w", "The metadata of container {container_id} was added during runtime, but no accompanying container was added.".format(container_id = metadata["id"])) + continue try: new_container = provider.loadContainer(metadata["id"]) + except ContainerFormatError as e: + Logger.logException("e", "Error in the format of container {container_id}: {error_msg}".format(container_id = metadata["id"], error_msg = str(e))) + continue except Exception as e: - Logger.logException("e", "Error when loading container {container_id}".format(container_id = metadata["id"]), e) + Logger.logException("e", "Error when loading container {container_id}: {error_msg}".format(container_id = metadata["id"], error_msg = str(e))) continue self.addContainer(new_container) self.containerLoadComplete.emit(new_container.getId()) @@ -193,53 +199,39 @@ # denote a wildcard. # \return A list of metadata dictionaries matching the search criteria, or # an empty list if nothing was found. - def findContainersMetadata(self, *, ignore_case = False, **kwargs) -> List[Dict[str, Any]]: - #Create the query object. - query = ContainerQuery.ContainerQuery(self, ignore_case = ignore_case, **kwargs) + def findContainersMetadata(self, *, ignore_case: bool = False, **kwargs: Any) -> List[Dict[str, Any]]: candidates = None - if "id" in kwargs and kwargs["id"] is not None and "*" not in kwargs["id"] and not ignore_case: - if kwargs["id"] not in self.metadata: #If we're looking for an unknown ID, try to lazy-load that one. + if kwargs["id"] not in self.metadata: # If we're looking for an unknown ID, try to lazy-load that one. if kwargs["id"] not in self.source_provider: - for provider in self._providers: - if kwargs["id"] in provider.getAllIds(): - self.source_provider[kwargs["id"]] = provider + for candidate in self._providers: + if kwargs["id"] in candidate.getAllIds(): + self.source_provider[kwargs["id"]] = candidate break else: return [] provider = self.source_provider[kwargs["id"]] - try: - metadata = provider.loadMetadata(kwargs["id"]) - except Exception as e: - Logger.logException("e", "Error when loading metadata of container {container_id}".format(container_id = kwargs["id"]), e) + if not provider: + Logger.log("w", "Metadata of container {container_id} is missing even though the container is added during run-time.") + return [] + metadata = provider.loadMetadata(kwargs["id"]) + if metadata is None or metadata.get("id", "") in self._wrong_container_ids or "id" not in metadata: return [] self.metadata[metadata["id"]] = metadata self.source_provider[metadata["id"]] = provider - #Since IDs are the primary key and unique we can now simply request the candidate and check if it matches all requirements. + # Since IDs are the primary key and unique we can now simply request the candidate and check if it matches all requirements. if kwargs["id"] not in self.metadata: - return [] #No result, so return an empty list. + return [] # Still no result, so return an empty list. + if len(kwargs) == 1: + return [self.metadata[kwargs["id"]]] candidates = [self.metadata[kwargs["id"]]] + del kwargs["id"] # No need to check for the ID again. - if query.isHashable() and query in self._query_cache: - #If the exact same query is in the cache, we can re-use the query result. - self._query_cache.move_to_end(query) #Query was used, so make sure to update its position so that it doesn't get pushed off as a rarely-used query. - return self._query_cache[query].getResult() - + query = ContainerQuery.ContainerQuery(self, ignore_case = ignore_case, **kwargs) query.execute(candidates = candidates) - # Only cache query result when it is hashable - if query.isHashable(): - self._query_cache[query] = query - - if len(self._query_cache) > MaxQueryCacheSize: - # Since we use an OrderedDict, we can use a simple FIFO scheme - # to discard queries. As long as we properly update queries - # that are being used, this results in the least used queries - # to be discarded. - self._query_cache.popitem(last = False) - - return query.getResult() + return cast(List[Dict[str, Any]], query.getResult()) # As the execute of the query is done, result won't be none. ## Specialized find function to find only the modified container objects # that also match certain criteria. @@ -257,21 +249,21 @@ # values of metadata. # \return A list of containers matching the search criteria, or an empty # list if nothing was found. - def findDirtyContainers(self, *, ignore_case = False, **kwargs) -> List[ContainerInterface]: - #Find the metadata of the containers and grab the actual containers from there. + def findDirtyContainers(self, *, ignore_case: bool = False, **kwargs: Any) -> List[ContainerInterface]: + # Find the metadata of the containers and grab the actual containers from there. # - #We could apply the "is in self._containers" filter and the "isDirty" filter - #to this metadata find function as well to filter earlier, but since the - #filters in findContainersMetadata are applied in arbitrary order anyway - #this will have very little effect except to prevent a list copy. + # We could apply the "is in self._containers" filter and the "isDirty" filter + # to this metadata find function as well to filter earlier, but since the + # filters in findContainersMetadata are applied in arbitrary order anyway + # this will have very little effect except to prevent a list copy. results_metadata = self.findContainersMetadata(ignore_case = ignore_case, **kwargs) result = [] for metadata in results_metadata: - if metadata["id"] not in self._containers: #Not yet loaded, so it can't be dirty. + if metadata["id"] not in self._containers: # Not yet loaded, so it can't be dirty. continue candidate = self._containers[metadata["id"]] - if hasattr(candidate, "isDirty") and candidate.isDirty(): #Check for hasattr because only InstanceContainers and Stacks have this method. + if candidate.isDirty(): result.append(self._containers[metadata["id"]]) return result @@ -288,9 +280,17 @@ def isReadOnly(self, container_id: str) -> bool: provider = self.source_provider.get(container_id) if not provider: - return False #If no provider had the container, that means that the container was only in memory. Then it's always modifiable. + return False # If no provider had the container, that means that the container was only in memory. Then it's always modifiable. return provider.isReadOnly(container_id) + # Gets the container file path with for the container with the given ID. Returns None if the container/file doesn't + # exist. + def getContainerFilePathById(self, container_id: str) -> Optional[str]: + provider = self.source_provider.get(container_id) + if not provider: + return None + return provider.getContainerFilePathById(container_id) + ## Returns whether a container is completely loaded or not. # # If only its metadata is known, it is not yet completely loaded. @@ -301,13 +301,24 @@ ## Load the metadata of all available definition containers, instance # containers and container stacks. - def loadAllMetadata(self): - for provider in self._providers: #Automatically sorted by the priority queue. - for container_id in list(provider.getAllIds()): #Make copy of all IDs since it might change during iteration. + def loadAllMetadata(self) -> None: + self._clearQueryCache() + gc.disable() + resource_start_time = time.time() + for provider in self._providers: # Automatically sorted by the priority queue. + for container_id in list(provider.getAllIds()): # Make copy of all IDs since it might change during iteration. if container_id not in self.metadata: - UM.Qt.QtApplication.QtApplication.getInstance().processEvents() #Update the user interface because loading takes a while. Specifically the loading screen. - self.metadata[container_id] = provider.loadMetadata(container_id) + self._application.processEvents() # Update the user interface because loading takes a while. Specifically the loading screen. + metadata = provider.loadMetadata(container_id) + if not self._isMetadataValid(metadata): + Logger.log("w", "Invalid metadata for container {container_id}: {metadata}".format(container_id = container_id, metadata = metadata)) + if container_id in self.metadata: + del self.metadata[container_id] + continue + self.metadata[container_id] = metadata self.source_provider[container_id] = provider + Logger.log("d", "Loading metadata into container registry took %s seconds", time.time() - resource_start_time) + gc.enable() ContainerRegistry.allMetadataLoaded.emit() ## Load all available definition containers, instance containers and @@ -317,18 +328,21 @@ # that were already added when the first call to this method happened will not be re-added. @UM.FlameProfiler.profile def load(self) -> None: - #Disable garbage collection to speed up the loading (at the cost of memory usage). + # Disable garbage collection to speed up the loading (at the cost of memory usage). gc.disable() resource_start_time = time.time() - with self.lockCache(): #Because we might be writing cache files. + with self.lockCache(): # Because we might be writing cache files. for provider in self._providers: - for container_id in list(provider.getAllIds()): #Make copy of all IDs since it might change during iteration. + for container_id in list(provider.getAllIds()): # Make copy of all IDs since it might change during iteration. if container_id not in self._containers: - #Update UI while loading. - UM.Qt.QtApplication.QtApplication.getInstance().processEvents() #Update the user interface because loading takes a while. Specifically the loading screen. - - self._containers[container_id] = provider.loadContainer(container_id) + # Update UI while loading. + self._application.processEvents() # Update the user interface because loading takes a while. Specifically the loading screen. + try: + self._containers[container_id] = provider.loadContainer(container_id) + except: + Logger.logException("e", "Failed to load container %s", container_id) + raise self.metadata[container_id] = self._containers[container_id].getMetaData() self.source_provider[container_id] = provider self.containerLoadComplete.emit(container_id) @@ -340,7 +354,6 @@ def addContainer(self, container: ContainerInterface) -> None: container_id = container.getId() if container_id in self._containers: - Logger.log("w", "Container with ID %s was already added.", container_id) return if hasattr(container, "metaDataChanged"): @@ -351,8 +364,13 @@ if container_id not in self.source_provider: self.source_provider[container_id] = None #Added during runtime. self._clearQueryCacheByContainer(container) - self.containerAdded.emit(container) - Logger.log("d", "Container [%s] added.", container_id) + + # containerAdded is a custom signal and can trigger direct calls to its subscribers. This should be avoided + # because with the direct calls, the subscribers need to know everything about what it tries to do to avoid + # triggering this signal again, which eventually can end up exceeding the max recursion limit. + # We avoid the direct calls here to make sure that the subscribers do not need to take into account any max + # recursion problem. + self._application.callLater(self.containerAdded.emit, container) @UM.FlameProfiler.profile def removeContainer(self, container_id: str) -> None: @@ -362,36 +380,45 @@ Logger.log("w", "Tried to delete container {container_id}, which doesn't exist or isn't loaded.".format(container_id = container_id)) return # Ignore. - # TODO: This is not efficient. Now we can load metadata before any container is loaded, operations such as - # removing a container and its resulting signals should not depend on having a container first. It should be - # possible to remove a container that exists in the provider without loading it first. - # For now, we load the container if it is not there to prevent breaking dependencies. - container = self._containers.get(container_id) - if container is None: - metadata = self.metadata[container_id] - if issubclass(metadata["container_type"], InstanceContainer): - container = self.findInstanceContainers(id = container_id)[0] - elif issubclass(metadata["container_type"], ContainerStack): - container = self.findContainerStacks(id = container_id)[0] + # CURA-6237 + # Do not try to operate on invalid containers because removeContainer() needs to load it if it's not loaded yet + # (see below), but an invalid container cannot be loaded. + if container_id in self._wrong_container_ids: + Logger.log("w", "Container [%s] is faulty, it won't be able to be loaded, so no need to remove, skip.") + # delete the metadata if present + if container_id in self.metadata: + del self.metadata[container_id] + return - source_provider = self.source_provider[container_id] + container = None if container_id in self._containers: + container = self._containers[container_id] + if hasattr(container, "metaDataChanged"): + container.metaDataChanged.disconnect(self._onContainerMetaDataChanged) del self._containers[container_id] - del self.metadata[container_id] - del self.source_provider[container_id] - if source_provider is not None: - source_provider.removeContainer(container_id) - - if hasattr(container, "metaDataChanged"): - container.metaDataChanged.disconnect(self._onContainerMetaDataChanged) - - self._clearQueryCacheByContainer(container) - self.containerRemoved.emit(container) + if container_id in self.metadata: + if container is None: + # We're in a bit of a weird state now. We want to notify the rest of the code that the container + # has been deleted, but due to lazy loading, it hasnt even been loaded yet. The issues is that in order + # to notify the rest of the code, we need to actually *have* the container. So we need to load it + # in order to remove it... + provider = self.source_provider.get(container_id) + if provider: + container = provider.loadContainer(container_id) + del self.metadata[container_id] + if container_id in self.source_provider: + if self.source_provider[container_id] is not None: + cast(ContainerProvider, self.source_provider[container_id]).removeContainer(container_id) + del self.source_provider[container_id] + + if container is not None: + self._clearQueryCacheByContainer(container) + self.containerRemoved.emit(container) Logger.log("d", "Removed container %s", container_id) @UM.FlameProfiler.profile - def renameContainer(self, container_id, new_name, new_id = None): + def renameContainer(self, container_id: str, new_name: str, new_id: Optional[str] = None) -> None: Logger.log("d", "Renaming container %s to %s", container_id, new_name) # Same as removeContainer(), metadata is always loaded but containers may not, so always check metadata. if container_id not in self.metadata: @@ -400,11 +427,8 @@ container = self._containers.get(container_id) if container is None: - metadata = self.metadata[container_id] - if issubclass(metadata["container_type"], InstanceContainer): - container = self.findInstanceContainers(id = container_id)[0] - elif issubclass(metadata["container_type"], ContainerStack): - container = self.findContainerStacks(id = container_id)[0] + container = self.findContainers(id = container_id)[0] + container = cast(ContainerInterface, container) if new_name == container.getName(): Logger.log("w", "Unable to rename container %s, because the name (%s) didn't change", container_id, new_name) @@ -412,8 +436,11 @@ self.containerRemoved.emit(container) - container.setName(new_name) - if new_id: + try: + container.setName(new_name) #type: ignore + except TypeError: #Some containers don't allow setting the name. + return + if new_id is not None: source_provider = self.source_provider[container.getId()] del self._containers[container.getId()] del self.metadata[container.getId()] @@ -438,6 +465,7 @@ # a number behind it to make it unique. @UM.FlameProfiler.profile def uniqueName(self, original: str) -> str: + original = original.replace("*", "") # Filter out wildcards, since this confuses the ContainerQuery. name = original.strip() num_check = re.compile(r"(.*?)\s*#\d+$").match(name) @@ -461,7 +489,7 @@ # # \param container An instance of the container type to add. @classmethod - def addContainerType(cls, container): + def addContainerType(cls, container: "PluginObject") -> None: plugin_id = container.getPluginId() metadata = PluginRegistry.getInstance().getMetaData(plugin_id) if "settings_container" not in metadata or "mimetype" not in metadata["settings_container"]: @@ -473,7 +501,7 @@ # \param type_name # \param mime_type @classmethod - def addContainerTypeByName(cls, container_type, type_name, mime_type): + def addContainerTypeByName(cls, container_type: type, type_name: str, mime_type: str) -> None: cls.__container_types[type_name] = container_type cls.mime_type_map[mime_type] = container_type @@ -483,7 +511,7 @@ # # \return A MimeType object that matches the mime type of the container or None if not found. @classmethod - def getMimeTypeForContainer(cls, container_type): + def getMimeTypeForContainer(cls, container_type: type) -> Optional[MimeType]: try: mime_type_name = UM.Dictionary.findKey(cls.mime_type_map, container_type) if mime_type_name: @@ -511,23 +539,18 @@ ## Save single dirty container def saveContainer(self, container: "ContainerInterface", provider: Optional["ContainerProvider"] = None) -> None: - if provider is None: + if not hasattr(provider, "saveContainer"): provider = self.getDefaultSaveProvider() if not container.isDirty(): return - provider.saveContainer(container) + provider.saveContainer(container) #type: ignore self.source_provider[container.getId()] = provider ## Save all the dirty containers by calling the appropriate container providers - def saveDirtyContainers(self): + def saveDirtyContainers(self) -> None: # Lock file for "more" atomically loading and saving to/from config dir. with self.lockFile(): - # Save base files first - for instance in self.findDirtyContainers(container_type = InstanceContainer): - if instance.getId() == instance.getMetaData().get("base_file"): - self.saveContainer(instance) - for instance in self.findDirtyContainers(container_type = InstanceContainer): self.saveContainer(instance) @@ -535,9 +558,9 @@ self.saveContainer(stack) # Load a binary cached version of a DefinitionContainer - def _loadCachedDefinition(self, definition_id, path): + def _loadCachedDefinition(self, definition_id: str, path: str) -> None: try: - cache_path = Resources.getPath(Resources.Cache, "definitions", self.getApplication().getVersion(), definition_id) + cache_path = Resources.getPath(Resources.Cache, "definitions", self._application.getVersion(), definition_id) cache_mtime = os.path.getmtime(cache_path) definition_mtime = os.path.getmtime(path) @@ -547,7 +570,6 @@ Logger.log("d", "Definition file %s is newer than cache, ignoring cached version", path) return None - definition = None with open(cache_path, "rb") as f: definition = pickle.load(f) @@ -560,15 +582,15 @@ return None except Exception as e: # We could not load a cached version for some reason. Ignore it. - Logger.logException("d", "Could not load cached definition for %s", path) + Logger.logException("d", "Could not load cached definition for {path}: {err}".format(path = path, err = str(e))) return None # Store a cached version of a DefinitionContainer - def _saveCachedDefinition(self, definition): - cache_path = Resources.getStoragePath(Resources.Cache, "definitions", self.getApplication().getVersion(), definition.id) + def _saveCachedDefinition(self, definition: DefinitionContainer): + cache_path = Resources.getStoragePath(Resources.Cache, "definitions", self._application.getVersion(), definition.id) # Ensure the cache path exists - os.makedirs(os.path.dirname(cache_path), exist_ok=True) + os.makedirs(os.path.dirname(cache_path), exist_ok = True) try: with open(cache_path, "wb") as f: @@ -583,49 +605,55 @@ os.remove(cache_path) #The pickling might be half-complete, which causes EOFError in Pickle when you load it later. # Clear the internal query cache - def _clearQueryCache(self, *args, **kwargs): - self._query_cache.clear() + def _clearQueryCache(self, *args: Any, **kwargs: Any) -> None: + ContainerQuery.ContainerQuery.cache.clear() ## Clear the query cache by using container type. # This is a slightly smarter way of clearing the cache. Only queries that are of the same type (or without one) # are cleared. - def _clearQueryCacheByContainer(self, container): - # Use the base classes to clear the - if isinstance(container, DefinitionContainer): - container_type = DefinitionContainer - elif isinstance(container, InstanceContainer): - container_type = InstanceContainer - elif isinstance(container, ContainerStack): - container_type = ContainerStack - else: - Logger.log("w", "While clearing query cache, we got an unrecognised base type (%s). Clearing entire cache instead", type(container)) - self._clearQueryCache() - return - - for key in list(self._query_cache.keys()): - if self._query_cache[key].getContainerType() == container_type or self._query_cache[key].getContainerType() is None: - del self._query_cache[key] + def _clearQueryCacheByContainer(self, container: ContainerInterface) -> None: + # Remove all case-insensitive matches since we won't find those with the below "<=" subset check. + # TODO: Properly check case-insensitively in the dict's values. + for key in list(ContainerQuery.ContainerQuery.cache): + if not key[0]: + del ContainerQuery.ContainerQuery.cache[key] + + # Remove all cache items that this container could fall in. + for key in list(ContainerQuery.ContainerQuery.cache): + query_metadata = dict(zip(key[1::2], key[2::2])) + if query_metadata.items() <= container.getMetaData().items(): + del ContainerQuery.ContainerQuery.cache[key] ## Called when any container's metadata changed. # # This function passes it on to the containerMetaDataChanged signal. Sadly # that doesn't work automatically between pyqtSignal and UM.Signal. - def _onContainerMetaDataChanged(self, *args, **kwargs): + def _onContainerMetaDataChanged(self, *args: ContainerInterface, **kwargs: Any) -> None: container = args[0] + # Always emit containerMetaDataChanged, even if the dictionary didn't actually change: The contents of the dictionary might have changed in-place! self.metadata[container.getId()] = container.getMetaData() # refresh the metadata self.containerMetaDataChanged.emit(*args, **kwargs) + ## Validate a metadata object. + # + # If the metadata is invalid, the container is not allowed to be in the + # registry. + # \param metadata A metadata object. + # \return Whether this metadata was valid. + def _isMetadataValid(self, metadata: Optional[Dict[str, Any]]) -> bool: + return metadata is not None + ## Get the lock filename including full path # Dependent on when you call this function, Resources.getConfigStoragePath may return different paths - def getLockFilename(self): - return Resources.getStoragePath(Resources.Resources, CONFIG_LOCK_FILENAME) + def getLockFilename(self) -> str: + return Resources.getStoragePath(Resources.Resources, self._application.getApplicationLockFilename()) ## Get the cache lock filename including full path. - def getCacheLockFilename(self): - return Resources.getStoragePath(Resources.Cache, CONFIG_LOCK_FILENAME) + def getCacheLockFilename(self) -> str: + return Resources.getStoragePath(Resources.Cache, self._application.getApplicationLockFilename()) ## Contextmanager to create a lock file and remove it afterwards. - def lockFile(self): + def lockFile(self) -> LockFile: return LockFile( self.getLockFilename(), timeout = 10, @@ -634,32 +662,13 @@ ## Context manager to create a lock file for the cache directory and remove # it afterwards. - def lockCache(self): + def lockCache(self) -> LockFile: return LockFile( self.getCacheLockFilename(), timeout = 10, wait_msg = "Waiting for lock file in cache directory to disappear." ) - ## Get the singleton instance for this class. - @classmethod - def getInstance(cls) -> "ContainerRegistry": - # Note: Explicit use of class name to prevent issues with inheritance. - if not ContainerRegistry.__instance: - ContainerRegistry.__instance = cls() - return ContainerRegistry.__instance - - @classmethod - def setApplication(cls, application): - cls.__application = application - - @classmethod - def getApplication(cls): - return cls.__application - - __application = None # type: Application - __instance = None # type: ContainerRegistry - __container_types = { "definition": DefinitionContainer, "instance": InstanceContainer, @@ -671,24 +680,13 @@ "application/x-uranium-instancecontainer": InstanceContainer, "application/x-uranium-containerstack": ContainerStack, "application/x-uranium-extruderstack": ContainerStack - } - -PluginRegistry.addType("settings_container", ContainerRegistry.addContainerType) - + } # type: Dict[str, Type[ContainerInterface]] -class _EmptyInstanceContainer(InstanceContainer): - def isDirty(self) -> bool: - return False - - def getProperty(self, key, property_name, context = None): - return None + __instance = None # type: ContainerRegistry - def setProperty(self, key, property_name, property_value, container = None, set_from_cache = False): - Logger.log("e", "Setting property %s of container %s which should remain empty", key, self.getName()) - return + @classmethod + def getInstance(cls, *args, **kwargs) -> "ContainerRegistry": + return cls.__instance - def getConfigurationType(self) -> str: - return "" # FIXME: not sure if this is correct - def serialize(self, ignored_metadata_keys: Optional[set] = None) -> str: - return "[general]\n version = " + str(InstanceContainer.Version) + "\n name = empty\n definition = fdmprinter\n" +PluginRegistry.addType("settings_container", ContainerRegistry.addContainerType) diff -Nru uranium-3.3.0/UM/Settings/ContainerStack.py uranium-4.4.1/UM/Settings/ContainerStack.py --- uranium-3.3.0/UM/Settings/ContainerStack.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Settings/ContainerStack.py 2019-11-19 10:50:46.000000000 +0000 @@ -1,21 +1,25 @@ -# Copyright (c) 2017 Ultimaker B.V. +# Copyright (c) 2019 Ultimaker B.V. # Uranium is released under the terms of the LGPLv3 or higher. import configparser import io -from typing import Any, cast, Dict, List, Optional, Set +from typing import Any, cast, Dict, List, Optional, Set, Tuple from PyQt5.QtCore import QObject, pyqtProperty, pyqtSignal + +from UM.Logger import Logger +from PyQt5.QtQml import QQmlEngine import UM.FlameProfiler -from UM.Settings.SettingDefinition import SettingDefinition +from UM.ConfigurationErrorMessage import ConfigurationErrorMessage from UM.Signal import Signal, signalemitter from UM.PluginObject import PluginObject -from UM.Logger import Logger from UM.MimeTypeDatabase import MimeTypeDatabase, MimeType +from UM.Settings.ContainerFormatError import ContainerFormatError from UM.Settings.DefinitionContainer import DefinitionContainer #For getting all definitions in this stack. from UM.Settings.Interfaces import ContainerInterface, ContainerRegistryInterface from UM.Settings.PropertyEvaluationContext import PropertyEvaluationContext +from UM.Settings.SettingDefinition import SettingDefinition from UM.Settings.SettingFunction import SettingFunction from UM.Settings.Validator import ValidatorState @@ -27,6 +31,7 @@ class InvalidContainerStackError(Exception): pass + MimeTypeDatabase.addMimeType( MimeType( name = "application/x-uranium-containerstack", @@ -47,49 +52,48 @@ ## A stack of setting containers to handle setting value retrieval. @signalemitter class ContainerStack(QObject, ContainerInterface, PluginObject): - Version = 4 # type: int + Version = 4 # type: int ## Constructor # - # \param stack_id \type{string} A unique, machine readable/writable ID. - def __init__(self, stack_id: str, parent = None, *args, **kwargs): - # Note that we explicitly pass None as QObject parent here. This is to be able - # to support pickling. - super().__init__(parent = parent, *args, **kwargs) + # \param stack_id A unique, machine readable/writable ID. + def __init__(self, stack_id: str) -> None: + super().__init__() + QQmlEngine.setObjectOwnership(self, QQmlEngine.CppOwnership) self._metadata = { "id": stack_id, "name": stack_id, "version": self.Version, "container_type": ContainerStack - } + } #type: Dict[str, Any] self._containers = [] # type: List[ContainerInterface] self._next_stack = None # type: Optional[ContainerStack] self._read_only = False # type: bool - self._dirty = True # type: bool + self._dirty = False # type: bool self._path = "" # type: str - self._postponed_emits = [] # gets filled with 2-tuples: signal, signal_argument(s) + self._postponed_emits = [] # type: List[Tuple[Signal, ContainerInterface]] # gets filled with 2-tuples: signal, signal_argument(s) - self._property_changes = {} + self._property_changes = {} # type: Dict[str, Set[str]] self._emit_property_changed_queued = False # type: bool ## For pickle support - def __getnewargs__(self): + def __getnewargs__(self) -> Tuple[str]: return (self.getId(),) ## For pickle support - def __getstate__(self): + def __getstate__(self) -> Dict[str, Any]: return self.__dict__ ## For pickle support - def __setstate__(self, state): + def __setstate__(self, state: Dict[str, Any]) -> None: self.__dict__.update(state) ## \copydoc ContainerInterface::getId # # Reimplemented from ContainerInterface def getId(self) -> str: - return self._metadata["id"] + return cast(str, self._metadata["id"]) id = pyqtProperty(str, fget = getId, constant = True) @@ -118,7 +122,7 @@ def isReadOnly(self) -> bool: return self._read_only - def setReadOnly(self, read_only): + def setReadOnly(self, read_only: bool) -> None: if read_only != self._read_only: self._read_only = read_only self.readOnlyChanged.emit() @@ -129,14 +133,25 @@ ## \copydoc ContainerInterface::getMetaData # # Reimplemented from ContainerInterface - def getMetaData(self): + def getMetaData(self) -> Dict[str, Any]: return self._metadata ## Set the complete set of metadata - def setMetaData(self, meta_data): - if meta_data != self._meta_data: - self._meta_data = meta_data - self.metaDataChanged.emit(self) + def setMetaData(self, meta_data: Dict[str, Any]) -> None: + if meta_data == self.getMetaData(): + return #Unnecessary. + + #We'll fill a temporary dictionary with all the required metadata and overwrite it with the new metadata. + #This way it is ensured that at least the required metadata is still there. + self._metadata = { + "id": self.getId(), + "name": self.getName(), + "version": self.getMetaData().get("version", 0), + "container_type": ContainerStack + } + + self._metadata.update(meta_data) + self.metaDataChanged.emit(self) metaDataChanged = pyqtSignal(QObject) metaData = pyqtProperty("QVariantMap", fget = getMetaData, fset = setMetaData, notify = metaDataChanged) @@ -144,7 +159,7 @@ ## \copydoc ContainerInterface::getMetaDataEntry # # Reimplemented from ContainerInterface - def getMetaDataEntry(self, entry: str, default = None): + def getMetaDataEntry(self, entry: str, default: Any = None) -> Any: value = self._metadata.get(entry, None) if value is None: @@ -158,23 +173,13 @@ else: return value - def addMetaDataEntry(self, key: str, value): - if key not in self._metadata: - self._dirty = True + def setMetaDataEntry(self, key: str, value: Any) -> None: + if key not in self._metadata or self._metadata[key] != value: self._metadata[key] = value - self.metaDataChanged.emit(self) - else: - Logger.log("w", "Meta data with key %s was already added.", key) - - def setMetaDataEntry(self, key, value): - if key in self._metadata: self._dirty = True - self._metadata[key] = value self.metaDataChanged.emit(self) - else: - Logger.log("w", "Meta data with key %s was not found. Unable to change.", key) - def removeMetaDataEntry(self, key): + def removeMetaDataEntry(self, key: str) -> None: if key in self._metadata: del self._metadata[key] self.metaDataChanged.emit(self) @@ -200,7 +205,7 @@ # Note that if the property value is a function, this method will return the # result of evaluating that property with the current stack. If you need the # actual function, use getRawProperty() - def getProperty(self, key: str, property_name: str, context: Optional[PropertyEvaluationContext] = None): + def getProperty(self, key: str, property_name: str, context: Optional[PropertyEvaluationContext] = None) -> Any: value = self.getRawProperty(key, property_name, context = context) if isinstance(value, SettingFunction): if context is not None: @@ -227,8 +232,8 @@ # \return The raw property value of the property, or None if not found. Note that # the value might be a SettingFunction instance. # - def getRawProperty(self, key, property_name, *, context: Optional[PropertyEvaluationContext] = None, - use_next = True, skip_until_container = None): + def getRawProperty(self, key: str, property_name: str, *, context: Optional[PropertyEvaluationContext] = None, + use_next: bool = True, skip_until_container: Optional[ContainerInterface] = None) -> Any: containers = self._containers if context is not None: # if context is provided, check if there is any container that needs to be skipped. @@ -279,7 +284,7 @@ # Reimplemented from ContainerInterface # # TODO: Expand documentation here, include the fact that this should _not_ include all containers - def serialize(self, ignored_metadata_keys: Optional[set] = None): + def serialize(self, ignored_metadata_keys: Optional[Set[str]] = None) -> str: parser = configparser.ConfigParser(interpolation = None, empty_lines_in_values = False) parser["general"] = {} @@ -310,7 +315,7 @@ # the serialized data. Due to legacy problem, those data may not be available if it comes from an ancient Cura. @classmethod def _readAndValidateSerialized(cls, serialized: str) -> configparser.ConfigParser: - parser = configparser.ConfigParser(interpolation=None, empty_lines_in_values=False) + parser = configparser.ConfigParser(interpolation = None, empty_lines_in_values=False) parser.read_string(serialized) if "general" not in parser or any(pn not in parser["general"] for pn in ("version", "name", "id")): @@ -324,6 +329,8 @@ try: parser = cls._readAndValidateSerialized(serialized) configuration_type = parser["metadata"]["type"] + except InvalidContainerStackError as icse: + raise icse except Exception as e: Logger.log("e", "Could not get configuration type: %s", e) return configuration_type @@ -331,12 +338,15 @@ @classmethod def getVersionFromSerialized(cls, serialized: str) -> Optional[int]: configuration_type = cls.getConfigurationTypeFromSerialized(serialized) - # get version + if not configuration_type: + Logger.log("d", "Could not get type from serialized.") + return None + + # Get version version = None try: - import UM.VersionUpgradeManager - version = UM.VersionUpgradeManager.VersionUpgradeManager.getInstance().getFileVersion(configuration_type, - serialized) + from UM.VersionUpgradeManager import VersionUpgradeManager + version = VersionUpgradeManager.getInstance().getFileVersion(configuration_type, serialized) except Exception as e: Logger.log("d", "Could not get version from serialized: %s", e) return version @@ -346,13 +356,13 @@ # Reimplemented from ContainerInterface # # TODO: Expand documentation here, include the fact that this should _not_ include all containers - def deserialize(self, serialized, file_name = None) -> str: - # update the serialized data first + def deserialize(self, serialized: str, file_name: Optional[str] = None) -> str: + # Update the serialized data first serialized = super().deserialize(serialized, file_name) parser = self._readAndValidateSerialized(serialized) - if parser["general"].getint("version") != self.Version: - raise IncorrectVersionError + if parser.getint("general", "version") != self.Version: + raise IncorrectVersionError() # Clear all data before starting. for container in self._containers: @@ -365,7 +375,7 @@ self._metadata = dict(parser["metadata"]) self._metadata["id"] = parser["general"]["id"] self._metadata["name"] = parser["general"].get("name", self.getId()) - self._metadata["version"] = self.Version #Guaranteed to be equal to what's in the container. See above. + self._metadata["version"] = self.Version # Guaranteed to be equal to what's in the container. See above. self._metadata["container_type"] = ContainerStack if "containers" in parser: @@ -375,12 +385,15 @@ containers[0].propertyChanged.connect(self._collectPropertyChanges) self._containers.append(containers[0]) else: - raise Exception("When trying to deserialize %s, we received an unknown ID (%s) for container" % (self.getId(), container_id)) + self._containers.append(_containerRegistry.getEmptyInstanceContainer()) + ConfigurationErrorMessage.getInstance().addFaultyContainers(container_id, self.getId()) + Logger.log("e", "When trying to deserialize %s, we received an unknown container ID (%s)" % (self.getId(), container_id)) + raise ContainerFormatError("When trying to deserialize %s, we received an unknown container ID (%s)" % (self.getId(), container_id)) elif parser.has_option("general", "containers"): # Backward compatibility with 2.3.1: The containers used to be saved in a single comma-separated list. container_string = parser["general"].get("containers", "") - Logger.log("d", "While deserializeing, we got the following container string: %s", container_string) + Logger.log("d", "While deserializing, we got the following container string: %s", container_string) container_id_list = container_string.split(",") for container_id in container_id_list: if container_id != "": @@ -389,7 +402,10 @@ containers[0].propertyChanged.connect(self._collectPropertyChanges) self._containers.append(containers[0]) else: - raise Exception("When trying to deserialize %s, we received an unknown ID (%s) for container" % (self.getId(), container_id)) + self._containers.append(_containerRegistry.getEmptyInstanceContainer()) + ConfigurationErrorMessage.getInstance().addFaultyContainers(container_id, self.getId()) + Logger.log("e", "When trying to deserialize %s, we received an unknown container ID (%s)" % (self.getId(), container_id)) + raise ContainerFormatError("When trying to deserialize %s, we received an unknown container ID (%s)" % (self.getId(), container_id)) ## TODO; Deserialize the containers. @@ -408,7 +424,7 @@ # instead. @classmethod def deserializeMetadata(cls, serialized: str, container_id: str) -> List[Dict[str, Any]]: - serialized = cls._updateSerialized(serialized) #Update to most recent version. + serialized = cls._updateSerialized(serialized) # Update to most recent version. parser = configparser.ConfigParser(interpolation = None) parser.read_string(serialized) @@ -419,8 +435,8 @@ try: metadata["name"] = parser["general"]["name"] metadata["version"] = parser["general"]["version"] - except KeyError: #One of the keys or the General section itself is missing. - return [] + except KeyError as e: # One of the keys or the General section itself is missing. + raise InvalidContainerStackError("Missing required fields: {error_msg}".format(error_msg = str(e))) if "metadata" in parser: metadata.update(parser["metadata"]) @@ -434,7 +450,7 @@ # # \return A set of all setting keys in this container stack. def getAllKeys(self) -> Set[str]: - keys = set() # type: Set[str] + keys = set() # type: Set[str] definition_containers = [container for container in self.getContainers() if container.__class__ == DefinitionContainer] #To get all keys, get all definitions from all definition containers. for definition_container in cast(List[DefinitionContainer], definition_containers): keys |= definition_container.getAllKeys() @@ -455,7 +471,7 @@ ## Get a container by index. # - # \param index \type{int} The index of the container to get. + # \param index The index of the container to get. # # \return The container at the specified index. # @@ -496,11 +512,11 @@ ## \copydoc ContainerInterface::setPath # # Reimplemented from ContainerInterface - def setPath(self, path: str): + def setPath(self, path: str) -> None: self._path = path ## Get the SettingDefinition object for a specified key - def getSettingDefinition(self, key: str): + def getSettingDefinition(self, key: str) -> Optional[SettingDefinition]: for container in self._containers: if not isinstance(container, DefinitionContainer): continue @@ -516,15 +532,14 @@ ## Find a container matching certain criteria. # - # \param filter \type{dict} A dictionary containing key and value pairs - # that need to match the container. Note that the value of "*" can be used - # as a wild card. This will ensure that any container that has the - # specified key in the meta data is found. - # \param container_type \type{class} An optional type of container to - # filter on. + # \param criteria A dictionary containing key and value pairs that need to + # match the container. Note that the value of "*" can be used as a wild + # card. This will ensure that any container that has the specified key in + # the meta data is found. + # \param container_type An optional type of container to filter on. # \return The first container that matches the filter criteria or None if not found. @UM.FlameProfiler.profile - def findContainer(self, criteria = None, container_type = None, **kwargs) -> Optional[ContainerInterface]: + def findContainer(self, criteria: Dict[str, Any] = None, container_type: type = None, **kwargs: Any) -> Optional[ContainerInterface]: if not criteria and kwargs: criteria = kwargs elif criteria is None: @@ -554,21 +569,22 @@ ## Add a container to the top of the stack. # # \param container The container to add to the stack. - def addContainer(self, container): + def addContainer(self, container: ContainerInterface) -> None: self.insertContainer(0, container) ## Insert a container into the stack. # - # \param index \type{int} The index of to insert the container at. + # \param index The index of to insert the container at. # A negative index counts from the bottom # \param container The container to add to the stack. - def insertContainer(self, index, container): + def insertContainer(self, index: int, container: ContainerInterface) -> None: if container is self: raise Exception("Unable to add stack to itself.") container.propertyChanged.connect(self._collectPropertyChanges) self._containers.insert(index, container) self.containersChanged.emit(container) + self._dirty = True ## Replace a container in the stack. # @@ -578,7 +594,7 @@ # # \exception IndexError Raised when the specified index is out of bounds. # \exception Exception when trying to replace container ContainerStack. - def replaceContainer(self, index: int, container: ContainerInterface, postpone_emit=False): + def replaceContainer(self, index: int, container: ContainerInterface, postpone_emit: bool = False) -> None: if index < 0: raise IndexError if container is self: @@ -587,6 +603,7 @@ self._containers[index].propertyChanged.disconnect(self._collectPropertyChanges) container.propertyChanged.connect(self._collectPropertyChanges) self._containers[index] = container + self._dirty = True if postpone_emit: # send it using sendPostponedEmits self._postponed_emits.append((self.containersChanged, container)) @@ -598,11 +615,12 @@ # \param index \type{int} The index of the container to remove. # # \exception IndexError Raised when the specified index is out of bounds. - def removeContainer(self, index: int = 0): + def removeContainer(self, index: int = 0) -> None: if index < 0: raise IndexError try: container = self._containers[index] + self._dirty = True container.propertyChanged.disconnect(self._collectPropertyChanges) del self._containers[index] self.containersChanged.emit(container) @@ -623,7 +641,7 @@ # \param stack \type{ContainerStack} The next stack to set. Can be None. # Raises Exception when trying to set itself as next stack (to prevent infinite loops) # \sa getNextStack - def setNextStack(self, stack: "ContainerStack", connect_signals: bool = True): + def setNextStack(self, stack: "ContainerStack", connect_signals: bool = True) -> None: if self is stack: raise Exception("Next stack can not be itself") if self._next_stack == stack: @@ -640,7 +658,7 @@ ## Send postponed emits # These emits are collected from the option postpone_emit. # Note: the option can be implemented for all functions modifying the stack. - def sendPostponedEmits(self): + def sendPostponedEmits(self) -> None: while self._postponed_emits: signal, signal_arg = self._postponed_emits.pop(0) signal.emit(signal_arg) @@ -657,12 +675,12 @@ # Setting is not validated. This can happen if there is only a setting definition. # We do need to validate it, because a setting defintions value can be set by a function, which could # be an invalid setting. - definition = self.getSettingDefinition(key) + definition = cast(SettingDefinition, self.getSettingDefinition(key)) validator_type = SettingDefinition.getValidatorForType(definition.type) if validator_type: validator = validator_type(key) validation_state = validator(self) - if validation_state in (ValidatorState.Exception, ValidatorState.MaximumError, ValidatorState.MinimumError): + if validation_state in (ValidatorState.Exception, ValidatorState.MaximumError, ValidatorState.MinimumError, ValidatorState.Invalid): return True return False @@ -676,12 +694,12 @@ # Setting is not validated. This can happen if there is only a setting definition. # We do need to validate it, because a setting defintions value can be set by a function, which could # be an invalid setting. - definition = self.getSettingDefinition(key) + definition = cast(SettingDefinition, self.getSettingDefinition(key)) validator_type = SettingDefinition.getValidatorForType(definition.type) if validator_type: validator = validator_type(key) validation_state = validator(self) - if validation_state in (ValidatorState.Exception, ValidatorState.MaximumError, ValidatorState.MinimumError): + if validation_state in (ValidatorState.Exception, ValidatorState.MaximumError, ValidatorState.MinimumError, ValidatorState.Invalid): error_keys.append(key) return error_keys @@ -691,18 +709,19 @@ # loop can run. This prevents us from sending the same change signal multiple times. # In addition, it allows us to emit a single signal that reports all properties that # have changed. - def _collectPropertyChanges(self, key: str, property_name: str): + def _collectPropertyChanges(self, key: str, property_name: str) -> None: if key not in self._property_changes: self._property_changes[key] = set() self._property_changes[key].add(property_name) if not self._emit_property_changed_queued: - _containerRegistry.getApplication().callLater(self._emitCollectedPropertyChanges) + from UM.Application import Application + Application.getInstance().callLater(self._emitCollectedPropertyChanges) self._emit_property_changed_queued = True # Perform the emission of the change signals that were collected in a previous step. - def _emitCollectedPropertyChanges(self): + def _emitCollectedPropertyChanges(self) -> None: for key, property_names in self._property_changes.items(): self.propertiesChanged.emit(key, property_names) @@ -712,7 +731,12 @@ self._property_changes = {} self._emit_property_changed_queued = False -_containerRegistry = None # type: ContainerRegistryInterface + def __str__(self) -> str: + return "%s(%s)" % (type(self).__name__, self.getId()) + + +_containerRegistry = ContainerRegistryInterface() # type: ContainerRegistryInterface + def setContainerRegistry(registry: ContainerRegistryInterface) -> None: global _containerRegistry diff -Nru uranium-3.3.0/UM/Settings/DefinitionContainer.py uranium-4.4.1/UM/Settings/DefinitionContainer.py --- uranium-3.3.0/UM/Settings/DefinitionContainer.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Settings/DefinitionContainer.py 2019-11-19 10:50:46.000000000 +0000 @@ -1,4 +1,4 @@ -# Copyright (c) 2017 Ultimaker B.V. +# Copyright (c) 2019 Ultimaker B.V. # Uranium is released under the terms of the LGPLv3 or higher. import json @@ -6,21 +6,23 @@ import copy from PyQt5.QtCore import QObject, pyqtProperty +from PyQt5.QtQml import QQmlEngine -from UM.Resources import Resources -from UM.PluginObject import PluginObject +from UM.i18n import i18nCatalog #For typing. from UM.Logger import Logger from UM.MimeTypeDatabase import MimeTypeDatabase, MimeType -from UM.Signal import Signal - +from UM.PluginObject import PluginObject +from UM.Resources import Resources from UM.Settings.Interfaces import DefinitionContainerInterface +from UM.Settings.PropertyEvaluationContext import PropertyEvaluationContext from UM.Settings.SettingDefinition import SettingDefinition from UM.Settings.SettingDefinition import DefinitionPropertyType from UM.Settings.SettingRelation import SettingRelation from UM.Settings.SettingRelation import RelationType from UM.Settings.SettingFunction import SettingFunction +from UM.Signal import Signal -from typing import Dict, Any, List, Optional +from typing import Dict, Any, List, Optional, Set, Tuple class InvalidDefinitionError(Exception): pass @@ -51,10 +53,9 @@ ## Constructor # # \param container_id A unique, machine readable/writable ID for this container. - def __init__(self, container_id: str, i18n_catalog = None, parent = None, *args, **kwargs): - # Note that we explicitly pass None as QObject parent here. This is to be able - # to support pickling. - super().__init__(parent = parent, *args, **kwargs) + def __init__(self, container_id: str, i18n_catalog: i18nCatalog = None, parent: QObject = None, *args, **kwargs) -> None: + super().__init__() + QQmlEngine.setObjectOwnership(self, QQmlEngine.CppOwnership) self._metadata = {"id": container_id, "name": container_id, @@ -62,26 +63,26 @@ "version": self.Version} # type: Dict[str, Any] self._definitions = [] # type: List[SettingDefinition] self._inherited_files = [] # type: List[str] - self._i18n_catalog = i18n_catalog + self._i18n_catalog = i18n_catalog # type: Optional[i18nCatalog] self._definition_cache = {} # type: Dict[str, SettingDefinition] self._path = "" ## Reimplement __setattr__ so we can make sure the definition remains unchanged after creation. - def __setattr__(self, name, value): + def __setattr__(self, name: str, value: Any) -> None: super().__setattr__(name, value) #raise NotImplementedError() ## For pickle support - def __getnewargs__(self): + def __getnewargs__(self) -> Tuple[str, Optional[i18nCatalog]]: return (self.getId(), self._i18n_catalog) ## For pickle support - def __getstate__(self): + def __getstate__(self) -> Dict[str, Any]: return self.__dict__ ## For pickle support - def __setstate__(self, state): + def __setstate__(self, state: Dict[str, Any]) -> None: # We need to call QObject.__init__() in order to initialize the underlying C++ object. # pickle doesn't do that so we have to do this here. QObject.__init__(self, parent = None) @@ -117,25 +118,25 @@ ## \copydoc ContainerInterface::getPath. # # Reimplemented from ContainerInterface - def getPath(self): + def getPath(self) -> str: return self._path ## \copydoc ContainerInterface::setPath # # Reimplemented from ContainerInterface - def setPath(self, path): + def setPath(self, path: str) -> None: self._path = path ## \copydoc ContainerInterface::getMetaData # # Reimplemented from ContainerInterface - def getMetaData(self): + def getMetaData(self) -> Dict[str, Any]: return self._metadata metaData = pyqtProperty("QVariantMap", fget = getMetaData, constant = True) @property - def definitions(self): + def definitions(self) -> List[SettingDefinition]: return self._definitions ## Gets all ancestors of this definition container. @@ -147,14 +148,14 @@ # container. # # \return A list of ancestors, in order from near ancestor to the root. - def getInheritedFiles(self): + def getInheritedFiles(self) -> List[str]: return self._inherited_files - ## Gets all keys of settings in this container. + ## \copydoc DefinitionContainerInterface::getAllKeys # # \return A set of all keys of settings in this container. - def getAllKeys(self) -> List[str]: - keys = set() + def getAllKeys(self) -> Set[str]: + keys = set() # type: Set[str] for definition in self.definitions: keys |= definition.getAllKeys() return keys @@ -162,13 +163,13 @@ ## \copydoc ContainerInterface::getMetaDataEntry # # Reimplemented from ContainerInterface - def getMetaDataEntry(self, entry, default = None): + def getMetaDataEntry(self, entry: str, default: Any = None) -> Any: return self._metadata.get(entry, default) ## \copydoc ContainerInterface::getProperty # # Reimplemented from ContainerInterface. - def getProperty(self, key, property_name, context = None): + def getProperty(self, key: str, property_name: str, context: PropertyEvaluationContext = None) -> Any: definition = self._getDefinition(key) if not definition: return None @@ -184,7 +185,7 @@ ## \copydoc ContainerInterface::hasProperty # # Reimplemented from ContainerInterface - def hasProperty(self, key, property_name, ignore_inherited: bool = False): + def hasProperty(self, key: str, property_name: str, ignore_inherited: bool = False) -> Any: definition = self._getDefinition(key) if not definition: return False @@ -203,13 +204,13 @@ # data about inheritance and overrides was lost when deserialising. # # Reimplemented from ContainerInterface - def serialize(self, ignored_metadata_keys: Optional[set] = None): - data = { } # The data to write to a JSON file. + def serialize(self, ignored_metadata_keys: Optional[set] = None) -> str: + data = {} # type: Dict[str, Any] # The data to write to a JSON file. data["name"] = self.getName() data["version"] = DefinitionContainer.Version data["metadata"] = self.getMetaData().copy() - # remove the keys that we want to ignore in the metadata + # Remove the keys that we want to ignore in the metadata if not ignored_metadata_keys: ignored_metadata_keys = set() ignored_metadata_keys |= {"name", "version", "id", "container_type"} @@ -217,23 +218,25 @@ if key in data["metadata"]: del data["metadata"][key] - data["settings"] = { } + data["settings"] = {} for definition in self.definitions: data["settings"][definition.key] = definition.serialize_to_dict() - return json.dumps(data, separators = (", ", ": "), indent = 4) # Pretty print the JSON. + return json.dumps(data, separators = (", ", ": "), indent = 4) # Pretty print the JSON. @classmethod def getConfigurationTypeFromSerialized(cls, serialized: str) -> Optional[str]: configuration_type = None try: parsed = json.loads(serialized, object_pairs_hook = collections.OrderedDict) - configuration_type = parsed["metadata"].get("type", "machine") #TODO: Not all definitions have a type. They get this via inheritance but that requires an instance. + configuration_type = parsed.get("metadata", {}).get("type", "machine") #TODO: Not all definitions have a type. They get this via inheritance but that requires an instance. + except InvalidDefinitionError as ide: + raise ide except Exception as e: Logger.log("d", "Could not get configuration type: %s", e) return configuration_type - def _readAndValidateSerialized(self, serialized: str) -> dict: + def readAndValidateSerialized(self, serialized: str) -> Tuple[Dict[str, Any], bool]: parsed = json.loads(serialized, object_pairs_hook = collections.OrderedDict) if "inherits" in parsed: @@ -242,8 +245,9 @@ self._verifyJson(parsed) - parsed = self._preprocessParsedJson(parsed) - return parsed + is_valid = self._preprocessParsedJson(parsed) + + return parsed, is_valid @classmethod def getVersionFromSerialized(cls, serialized: str) -> Optional[int]: @@ -255,22 +259,25 @@ Logger.log("d", "Could not get version from serialized: %s", e) return version - def _preprocessParsedJson(self, parsed): + # Returns whether the parsed JSON is valid. + def _preprocessParsedJson(self, parsed: Dict[str, Any]) -> bool: # Pre-process the JSON data to include the overrides. + is_valid = True if "overrides" in parsed: for key, value in parsed["overrides"].items(): setting = self._findInDict(parsed["settings"], key) if setting is None: - Logger.log("w","Unable to override setting %s", key) + Logger.log("w", "Unable to override setting %s", key) + is_valid = False else: setting.update(value) - return parsed + return is_valid ## Add a setting definition instance if it doesn't exist yet. # # Warning: this might not work when there are relationships higher up in the stack. - def addDefinition(self, definition: SettingDefinition): + def addDefinition(self, definition: SettingDefinition) -> None: if definition.key not in [d.key for d in self._definitions]: self._definitions.append(definition) self._updateRelations(definition) @@ -278,10 +285,10 @@ ## \copydoc ContainerInterface::deserialize # # Reimplemented from ContainerInterface - def deserialize(self, serialized, file_name: Optional[str] = None) -> str: + def deserialize(self, serialized: str, file_name: Optional[str] = None) -> str: # update the serialized data first serialized = super().deserialize(serialized, file_name) - parsed = self._readAndValidateSerialized(serialized) + parsed, is_valid = self.readAndValidateSerialized(serialized) # Update properties with the data from the JSON old_id = self.getId() #The ID must be set via the constructor. Retain it. @@ -319,7 +326,7 @@ except json.JSONDecodeError as e: Logger.log("d", "Could not parse definition: %s", e) return [] - metadata = {} + metadata = {} #type: Dict[str, Any] if "inherits" in parsed: import UM.Settings.ContainerRegistry #To find the definitions we're inheriting from. parent_metadata = UM.Settings.ContainerRegistry.ContainerRegistry.getInstance().findDefinitionContainersMetadata(id = parsed["inherits"]) @@ -327,28 +334,27 @@ Logger.log("e", "Could not load parent definition container {parent} of child {child}".format(parent = parsed["inherits"], child = container_id)) #Ignore the parent then. else: - parent_metadata = parent_metadata[0] - metadata.update(parent_metadata) + metadata.update(parent_metadata[0]) metadata["inherits"] = parsed["inherits"] metadata["container_type"] = DefinitionContainer metadata["id"] = container_id - try: #Move required fields to metadata. + try: # Move required fields to metadata. metadata["name"] = parsed["name"] metadata["version"] = parsed["version"] - except KeyError: #Required fields not present! - return [] + except KeyError as e: # Required fields not present! + raise InvalidDefinitionError("Missing required fields: {error_msg}".format(error_msg = str(e))) if "metadata" in parsed: metadata.update(parsed["metadata"]) return [metadata] ## Find definitions matching certain criteria. # - # \param kwargs \type{dict} A dictionary of keyword arguments containing key-value pairs which should match properties of the definition. - def findDefinitions(self, **kwargs) -> List[SettingDefinition]: + # \param kwargs A dictionary of keyword arguments containing key-value pairs which should match properties of the definition. + def findDefinitions(self, **kwargs: Any) -> List[SettingDefinition]: if len(kwargs) == 1 and "key" in kwargs: # If we are searching for a single definition by exact key, we can speed up things by retrieving from the cache. - key = kwargs.get("key") + key = kwargs["key"] if key in self._definition_cache: return [self._definition_cache[key]] @@ -365,7 +371,7 @@ # protected: # Load a file from disk, used to handle inheritance and includes - def _loadFile(self, file_name: str) -> dict: + def _loadFile(self, file_name: str) -> Dict[str, Any]: path = Resources.getPath(Resources.DefinitionContainers, file_name + ".def.json") with open(path, encoding = "utf-8") as f: contents = json.load(f, object_pairs_hook=collections.OrderedDict) @@ -374,7 +380,7 @@ return contents # Recursively resolve loading inherited files - def _resolveInheritance(self, file_name: str) -> dict: + def _resolveInheritance(self, file_name: str) -> Dict[str, Any]: json_dict = self._loadFile(file_name) if "inherits" in json_dict: @@ -386,17 +392,17 @@ return json_dict # Verify that a loaded json matches our basic expectations. - def _verifyJson(cls, json_dict: Dict[str, Any]): + def _verifyJson(self, json_dict: Dict[str, Any]): required_fields = {"version", "name", "settings", "metadata"} missing_fields = required_fields - json_dict.keys() if missing_fields: raise InvalidDefinitionError("Missing required properties: {properties}".format(properties = ", ".join(missing_fields))) - if json_dict["version"] != cls.Version: - raise IncorrectDefinitionVersionError("Definition uses version {0} but expected version {1}".format(json_dict["version"], cls.Version)) + if json_dict["version"] != self.Version: + raise IncorrectDefinitionVersionError("Definition uses version {0} but expected version {1}".format(json_dict["version"], self.Version)) # Recursively find a key in a dictionary - def _findInDict(self, dictionary: dict, key: str): + def _findInDict(self, dictionary: Dict[str, Any], key: str): if key in dictionary: return dictionary[key] for k, v in dictionary.items(): if isinstance(v, dict): @@ -405,7 +411,7 @@ return item # Recursively merge two dictionaries, returning a new dictionary - def _mergeDicts(self, first: dict, second: dict): + def _mergeDicts(self, first: Dict[Any, Any], second: Dict[Any, Any]) -> Dict[Any, Any]: result = copy.deepcopy(first) for key, value in second.items(): if key in result: @@ -419,17 +425,17 @@ return result # Recursively update relations of settings - def _updateRelations(self, definition: SettingDefinition): - for property in SettingDefinition.getPropertyNames(DefinitionPropertyType.Function): - self._processFunction(definition, property) + def _updateRelations(self, definition: SettingDefinition) -> None: + for property_name in SettingDefinition.getPropertyNames(DefinitionPropertyType.Function): + self._processFunction(definition, property_name) for child in definition.children: self._updateRelations(child) # Create relation objects for all settings used by a certain function - def _processFunction(self, definition: SettingDefinition, property: str): + def _processFunction(self, definition: SettingDefinition, property_name: str) -> None: try: - function = getattr(definition, property) + function = getattr(definition, property_name) except AttributeError: return @@ -440,21 +446,21 @@ # Prevent circular relations between the same setting and the same property # Note that the only property used by SettingFunction is the "value" property, which # is why this is hard coded here. - if setting == definition.key and property == "value": + if setting == definition.key and property_name == "value": Logger.log("w", "Found circular relation for property 'value' between {0} and {1}", definition.key, setting) continue other = self._getDefinition(setting) if not other: - continue + other = SettingDefinition(setting) - relation = SettingRelation(definition, other, RelationType.RequiresTarget, property) + relation = SettingRelation(definition, other, RelationType.RequiresTarget, property_name) definition.relations.append(relation) - relation = SettingRelation(other, definition, RelationType.RequiredByTarget, property) + relation = SettingRelation(other, definition, RelationType.RequiredByTarget, property_name) other.relations.append(relation) - def _getDefinition(self, key: str) -> SettingDefinition: + def _getDefinition(self, key: str) -> Optional[SettingDefinition]: definition = None if key in self._definition_cache: definition = self._definition_cache[key] @@ -466,6 +472,9 @@ return definition + def isDirty(self) -> bool: + return False + ## Simple short string representation for debugging purposes. - def __str__(self): + def __str__(self) -> str: return "".format(definition_id = self.getId(), name = self.getName()) \ No newline at end of file diff -Nru uranium-3.3.0/UM/Settings/EmptyInstanceContainer.py uranium-4.4.1/UM/Settings/EmptyInstanceContainer.py --- uranium-3.3.0/UM/Settings/EmptyInstanceContainer.py 1970-01-01 00:00:00.000000000 +0000 +++ uranium-4.4.1/UM/Settings/EmptyInstanceContainer.py 2019-11-19 10:50:46.000000000 +0000 @@ -0,0 +1,32 @@ +# Copyright (c) 2018 Ultimaker B.V. +# Cura is released under the terms of the LGPLv3 or higher. + +from typing import Optional, Any, TYPE_CHECKING + +from UM.Logger import Logger +from UM.Settings.InstanceContainer import InstanceContainer + +if TYPE_CHECKING: + from UM.Settings.Interfaces import ContainerInterface + from UM.Settings.PropertyEvaluationContext import PropertyEvaluationContext + + +# +# Represents an empty instance container which is not allowed to store any +# +class EmptyInstanceContainer(InstanceContainer): + def isDirty(self) -> bool: + return False + + def getProperty(self, key: str, property_name: str, context: Optional["PropertyEvaluationContext"] = None) -> Any: + return None + + def setProperty(self, key: str, property_name: str, property_value: Any, container: Optional["ContainerInterface"] = None, set_from_cache: bool = False) -> None: + Logger.log("e", "Setting property %s of container %s which should remain empty", key, self.getName()) + return + + def getConfigurationType(self) -> str: + return "" # FIXME: not sure if this is correct + + def serialize(self, ignored_metadata_keys: Optional[set] = None) -> str: + return "[general]\n version = " + str(InstanceContainer.Version) + "\n name = empty\n definition = fdmprinter\n" diff -Nru uranium-3.3.0/UM/Settings/InstanceContainer.py uranium-4.4.1/UM/Settings/InstanceContainer.py --- uranium-3.3.0/UM/Settings/InstanceContainer.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Settings/InstanceContainer.py 2019-11-19 10:50:46.000000000 +0000 @@ -1,14 +1,16 @@ -# Copyright (c) 2017 Ultimaker B.V. +# Copyright (c) 2018 Ultimaker B.V. # Uranium is released under the terms of the LGPLv3 or higher. import configparser import io import copy -from typing import Any, Dict, List, Optional +from typing import Any, cast, Dict, List, Optional, Set, Tuple from PyQt5.QtCore import QObject, pyqtProperty, pyqtSignal +from PyQt5.QtQml import QQmlEngine #To take ownership of this class ourselves. from UM.Settings.Interfaces import DefinitionContainerInterface +from UM.Settings.PropertyEvaluationContext import PropertyEvaluationContext #For typing. from UM.Signal import Signal, signalemitter from UM.PluginObject import PluginObject from UM.Logger import Logger @@ -17,15 +19,19 @@ from UM.Settings.Interfaces import ContainerInterface, ContainerRegistryInterface from UM.Settings.SettingInstance import SettingInstance + class InvalidInstanceError(Exception): pass + class IncorrectInstanceVersionError(Exception): pass + class DefinitionNotFoundError(Exception): pass + MimeTypeDatabase.addMimeType( MimeType( name = "application/x-uranium-instancecontainer", @@ -40,13 +46,14 @@ # @signalemitter class InstanceContainer(QObject, ContainerInterface, PluginObject): - Version = 3 + Version = 4 ## Constructor # # \param container_id A unique, machine readable/writable ID for this container. - def __init__(self, container_id: str, parent = None, *args, **kwargs): - super().__init__(parent = parent, *args, **kwargs) + def __init__(self, container_id: str, parent: QObject = None, *args: Any, **kwargs: Any) -> None: + super().__init__() + QQmlEngine.setObjectOwnership(self, QQmlEngine.CppOwnership) self._metadata = { "id": container_id, @@ -55,35 +62,37 @@ "container_type": InstanceContainer } # type: Dict[str, Any] self._instances = {} # type: Dict[str, SettingInstance] - self._read_only = False - self._dirty = False - self._path = "" - self._postponed_emits = [] + self._read_only = False # type: bool + self._dirty = False # type: bool + self._path = "" # type: str + self._postponed_emits = [] # type: List[Tuple[Signal, Tuple[str, str]]] + self._definition = None # type: Optional[DefinitionContainerInterface] - self._cached_values = None + self._cached_values = None # type: Optional[Dict[str, Any]] - def __hash__(self): + def __hash__(self) -> int: # We need to re-implement the hash, because we defined the __eq__ operator. # According to some, returning the ID is technically not right, as objects with the same value should return # the same hash. The way we use it, it is acceptable for objects with the same value to return a different hash. return id(self) - def __deepcopy__(self, memo): + def __deepcopy__(self, memo: Dict[int, object]) -> "InstanceContainer": new_container = self.__class__(self.getId()) - new_container._metadata = copy.deepcopy(self._metadata, memo) - new_container._instances = copy.deepcopy(self._instances, memo) + new_container._metadata = cast(Dict[str, Any], copy.deepcopy(self._metadata, memo)) + new_container._instances = cast(Dict[str, SettingInstance], copy.deepcopy(self._instances, memo)) for instance in new_container._instances.values(): #Set the back-links of the new instances correctly to the copied container. instance._container = new_container instance.propertyChanged.connect(new_container.propertyChanged) new_container._read_only = self._read_only new_container._dirty = self._dirty - new_container._path = copy.deepcopy(self._path, memo) - new_container._cached_values = copy.deepcopy(self._cached_values, memo) + new_container._path = cast(str, copy.deepcopy(self._path, memo)) + new_container._cached_values = cast(Optional[Dict[str, Any]], copy.deepcopy(self._cached_values, memo)) return new_container - def __eq__(self, other): + def __eq__(self, other: object) -> bool: if type(self) != type(other): return False # Type mismatch + other = cast(InstanceContainer, other) self._instantiateCachedValues() other._instantiateCachedValues() @@ -109,19 +118,19 @@ return False # Other has an instance that this object does not have. return True - def __ne__(self, other): + def __ne__(self, other: object) -> bool: return not (self == other) ## For pickle support - def __getnewargs__(self): + def __getnewargs__(self) -> Tuple[str]: return (self.getId(),) ## For pickle support - def __getstate__(self): + def __getstate__(self) -> Dict[str, Any]: return self.__dict__ ## For pickle support - def __setstate__(self, state): + def __setstate__(self, state: Dict[str, Any]) -> None: self.__dict__.update(state) ## \copydoc ContainerInterface::getId @@ -132,7 +141,7 @@ id = pyqtProperty(str, fget = getId, constant = True) - def setCachedValues(self, cached_values): + def setCachedValues(self, cached_values: Dict[str, Any]) -> None: if not self._instances: self._cached_values = cached_values else: @@ -145,13 +154,13 @@ ## \copydoc ContainerInterface::getPath. # # Reimplemented from ContainerInterface - def getPath(self): + def getPath(self) -> str: return self._path ## \copydoc ContainerInterface::setPath # # Reimplemented from ContainerInterface - def setPath(self, path): + def setPath(self, path: str) -> None: self._path = path ## \copydoc ContainerInterface::getName @@ -160,7 +169,7 @@ def getName(self) -> str: return self._metadata["name"] - def setName(self, name): + def setName(self, name: str) -> None: if name != self.getName(): self._metadata["name"] = name self._dirty = True @@ -186,13 +195,16 @@ return _containerRegistry.isReadOnly(self.getId()) readOnly = pyqtProperty(bool, fget = getReadOnly) + def getNumInstances(self) -> int: + return len(self._instances) + ## \copydoc ContainerInterface::getMetaData # # Reimplemented from ContainerInterface - def getMetaData(self): + def getMetaData(self) -> Dict[str, Any]: return self._metadata - def setMetaData(self, metadata): + def setMetaData(self, metadata: Dict[str, Any]) -> None: if metadata == self._metadata: return #No need to do anything or even emit the signal. @@ -202,7 +214,8 @@ "id": self.getId(), "name": self.getName(), "definition": self.getMetaData().get("definition"), - "version": self.getMetaData().get("version", 0) + "version": self.getMetaData().get("version", 0), + "container_type": InstanceContainer } self._metadata.update(metadata) self._dirty = True @@ -214,42 +227,26 @@ ## \copydoc ContainerInterface::getMetaDataEntry # # Reimplemented from ContainerInterface - def getMetaDataEntry(self, entry, default = None): + def getMetaDataEntry(self, entry: str, default = None) -> Any: return self._metadata.get(entry, default) - ## Add a new entry to the metadata of this container. - # - # \param key \type{str} The key of the new entry. - # \param value The value of the new entry. - # - # \note This does nothing if the key already exists. - def addMetaDataEntry(self, key, value): - if key not in self._metadata: - self._metadata[key] = value - self._dirty = True - self.metaDataChanged.emit(self) - else: - Logger.log("w", "Meta data with key %s was already added.", key) - ## Set a metadata entry to a certain value. # # \param key The key of the metadata entry to set. # \param value The new value of the metadata. # # \note This does nothing if the key is not already added to the metadata. - def setMetaDataEntry(self, key, value): - if key in self._metadata: + def setMetaDataEntry(self, key: str, value: Any) -> None: + if key not in self._metadata or self._metadata[key] != value: self._metadata[key] = value self._dirty = True self.metaDataChanged.emit(self) - else: - Logger.log("w", "Meta data with key %s was not found. Unable to change.", key) ## Check if this container is dirty, that is, if it changed from deserialization. - def isDirty(self): + def isDirty(self) -> bool: return self._dirty - def setDirty(self, dirty): + def setDirty(self, dirty: bool) -> None: if self._read_only: Logger.log("w", "Tried to set dirty on read-only object.") else: @@ -258,7 +255,7 @@ ## \copydoc ContainerInterface::getProperty # # Reimplemented from ContainerInterface - def getProperty(self, key, property_name, context = None): + def getProperty(self, key: str, property_name: str, context: PropertyEvaluationContext = None) -> Any: self._instantiateCachedValues() if key in self._instances: try: @@ -271,7 +268,7 @@ ## \copydoc ContainerInterface::hasProperty # # Reimplemented from ContainerInterface. - def hasProperty(self, key, property_name): + def hasProperty(self, key: str, property_name: str) -> bool: # --- Kinda a hack: # When we check if a property exists, it is not necessary to flush the cache because we simply want to know # whether it is there. Flushing the cache can cause propertyChanged signals being emitted, and, as a result, @@ -281,14 +278,14 @@ # **WITHOUT** applying the cached values. This way there won't be any property changed signals when we are # just checking if a property exists. # - self._instantiateMissingSettingInstancesInCache() if self._cached_values and key in self._cached_values and property_name == "value": return True + self._instantiateMissingSettingInstancesInCache() return key in self._instances and hasattr(self._instances[key], property_name) ## Creates SettingInstances that are missing in this InstanceContainer from the cache if any. # This function will **ONLY instantiate SettingInstances. The cached values will not be applied.** - def _instantiateMissingSettingInstancesInCache(self): + def _instantiateMissingSettingInstancesInCache(self) -> None: if not self._cached_values: return @@ -313,26 +310,28 @@ # If no instance has been created for the specified key, a new one will be created and inserted # into this instance. # - # \param key \type{string} The key of the setting to set a property of. - # \param property_name \type{string} The name of the property to set. + # \param key The key of the setting to set a property of. + # \param property_name The name of the property to set. # \param property_value The new value of the property. # \param container The container to use for retrieving values when changing the property triggers property updates. Defaults to None, which means use the current container. # \param set_from_cache Flag to indicate that the property was set from cache. This triggers the behavior that the read_only and setDirty are ignored. # # \note If no definition container is set for this container, new instances cannot be created and this method will do nothing. - def setProperty(self, key, property_name, property_value, container = None, set_from_cache = False): + def setProperty(self, key: str, property_name: str, property_value: Any, container: ContainerInterface = None, set_from_cache: bool = False) -> None: if self._read_only and not set_from_cache: Logger.log( "w", "Tried to setProperty [%s] with value [%s] with key [%s] on read-only object [%s]" % ( property_name, property_value, key, self.id)) return + if key not in self._instances: - if not self.getDefinition(): - Logger.log("w", "Tried to set value of setting %s that has no instance in container %s and the container has no definition", key, self.getName()) + try: + definition = self.getDefinition() + except DefinitionNotFoundError: + Logger.log("w", "Tried to set value of setting when the container has no definition") return - - setting_definition = self.getDefinition().findDefinitions(key = key) + setting_definition = definition.findDefinitions(key = key) if not setting_definition: Logger.log("w", "Tried to set value of setting %s that has no instance in container %s or its definition %s", key, self.getName(), self.getDefinition().getName()) return @@ -341,7 +340,8 @@ instance.propertyChanged.connect(self.propertyChanged) self._instances[instance.definition.key] = instance - self._instances[key].setProperty(property_name, property_value, container) + # Do not emit any signal if the value is set from cache + self._instances[key].setProperty(property_name, property_value, container, emit_signals = not set_from_cache) if not set_from_cache: self.setDirty(True) @@ -349,7 +349,7 @@ propertyChanged = Signal() ## Remove all instances from this container. - def clear(self): + def clear(self) -> None: self._instantiateCachedValues() all_keys = self._instances.copy() for key in all_keys: @@ -358,20 +358,20 @@ ## Get all the keys of the instances of this container # \returns list of keys - def getAllKeys(self): + def getAllKeys(self) -> Set[str]: keys = set(key for key in self._instances) if self._cached_values: # If we only want the keys and the actual values are still cached, just get the keys from the cache. keys.update(self._cached_values.keys()) - return list(keys) + return keys ## Create a new InstanceContainer with the same contents as this container # - # \param new_id \type{str} The new ID of the container - # \param new_name \type{str} The new name of the container. Defaults to None to indicate the name should not change. + # \param new_id The new ID of the container + # \param new_name The new name of the container. Defaults to None to indicate the name should not change. # # \return A new InstanceContainer with the same contents as this container. - def duplicate(self, new_id: str, new_name: str = None): + def duplicate(self, new_id: str, new_name: str = None) -> "InstanceContainer": self._instantiateCachedValues() new_container = self.__class__(new_id) new_metadata = copy.deepcopy(self._metadata) @@ -404,7 +404,9 @@ self._instantiateCachedValues() parser = configparser.ConfigParser(interpolation = None) - if not self.getDefinition(): + try: + self.getDefinition() + except DefinitionNotFoundError: Logger.log("w", "Tried to serialize an instance container without definition, this is not supported") return "" @@ -438,12 +440,12 @@ def _readAndValidateSerialized(cls, serialized: str) -> configparser.ConfigParser: # Disable comments in the ini files, so text values can start with a ; # without being removed as a comment - parser = configparser.ConfigParser(interpolation=None, comment_prefixes = ()) + parser = configparser.ConfigParser(interpolation = None, comment_prefixes = ()) parser.read_string(serialized) has_general = "general" in parser - has_version = "version" in parser["general"] - has_definition = "definition" in parser["general"] + has_version = has_general and "version" in parser["general"] + has_definition = has_general and "definition" in parser["general"] if not has_general or not has_version or not has_definition: exception_string = "Missing the required" @@ -462,6 +464,8 @@ try: parser = cls._readAndValidateSerialized(serialized) configuration_type = parser["metadata"].get("type") + except InvalidInstanceError as iie: + raise iie except Exception as e: Logger.log("d", "Could not get configuration type: %s", e) return configuration_type @@ -469,6 +473,9 @@ @classmethod def getVersionFromSerialized(cls, serialized: str) -> Optional[int]: configuration_type = cls.getConfigurationTypeFromSerialized(serialized) + if configuration_type is None: + Logger.log("w", "Could not determine configuration type.") + return None # get version version = None try: @@ -490,7 +497,7 @@ try: parser_version = int(parser["general"]["version"]) - except ValueError: #Version number is not integer. + except ValueError: # Version number is not integer. raise IncorrectInstanceVersionError("Reported version {0} is not an integer.".format(parser["general"]["version"])) if parser_version != self.Version: raise IncorrectInstanceVersionError("Reported version {0} but expected version {1}".format(str(parser_version), self.Version)) @@ -529,7 +536,7 @@ # instead. @classmethod def deserializeMetadata(cls, serialized: str, container_id: str) -> List[Dict[str, Any]]: - serialized = cls._updateSerialized(serialized) #Update to most recent version. + serialized = cls._updateSerialized(serialized) # Update to most recent version. parser = configparser.ConfigParser(interpolation = None) parser.read_string(serialized) @@ -541,8 +548,8 @@ metadata["name"] = parser["general"]["name"] metadata["version"] = parser["general"]["version"] metadata["definition"] = parser["general"]["definition"] - except KeyError: #One of the keys or the General section itself is missing. - return [] + except KeyError as e: #One of the keys or the General section itself is missing. + raise InvalidInstanceError("Missing required fields: {error_msg}".format(error_msg = str(e))) if "metadata" in parser: metadata = {**metadata, **parser["metadata"]} @@ -550,19 +557,19 @@ return [metadata] ## Instance containers are lazy loaded. This function ensures that it happened. - def _instantiateCachedValues(self): + def _instantiateCachedValues(self) -> None: if not self._cached_values: return - + definition = self.getDefinition() for key, value in self._cached_values.items(): - self.setProperty(key, "value", value, self.getDefinition(), set_from_cache=True) + self.setProperty(key, "value", value, definition, set_from_cache=True) self._cached_values = None ## Find instances matching certain criteria. # - # \param kwargs \type{dict} A dictionary of keyword arguments with key-value pairs that should match properties of the instances. - def findInstances(self, **kwargs) -> List[SettingInstance]: + # \param kwargs A dictionary of keyword arguments with key-value pairs that should match properties of the instances. + def findInstances(self, **kwargs: Any) -> List[SettingInstance]: self._instantiateCachedValues() result = [] for setting_key, instance in self._instances.items(): @@ -596,7 +603,7 @@ ## Remove an instance from this container. # /param postpone_emit postpone emit until calling sendPostponedEmits - def removeInstance(self, key: str, postpone_emit: bool=False) -> None: + def removeInstance(self, key: str, postpone_emit: bool = False) -> None: self._instantiateCachedValues() if key not in self._instances: return @@ -625,7 +632,7 @@ instance.updateRelations(self) ## Update all instances from this container. - def update(self): + def update(self) -> None: self._instantiateCachedValues() for key, instance in self._instances.items(): instance.propertyChanged.emit(key, "value") @@ -638,41 +645,47 @@ ## Get the DefinitionContainer used for new instance creation. def getDefinition(self) -> DefinitionContainerInterface: - definitions = _containerRegistry.findDefinitionContainers(id = self._metadata["definition"]) - if not definitions: - raise DefinitionNotFoundError("Could not find definition {0} required for instance {1}".format(self._metadata["definition"], self.getId())) - return definitions[0] + if self._definition is None: + definitions = _containerRegistry.findDefinitionContainers(id = self._metadata.get("definition", "")) + if not definitions: + raise DefinitionNotFoundError("Could not find definition {0} required for instance {1}".format(self._metadata.get("definition", ""), self.getId())) + self._definition = definitions[0] + return self._definition ## Set the DefinitionContainer to use for new instance creation. # # Since SettingInstance needs a SettingDefinition to work properly, we need some # way of figuring out what SettingDefinition to use when creating a new SettingInstance. - def setDefinition(self, definition_id: str): + def setDefinition(self, definition_id: str) -> None: self._metadata["definition"] = definition_id + self._definition = None - def __lt__(self, other): + def __lt__(self, other: object) -> bool: + if type(other) != type(self): + return True + other = cast(InstanceContainer, other) own_weight = int(self.getMetaDataEntry("weight", 0)) other_weight = int(other.getMetaDataEntry("weight", 0)) - if own_weight and other_weight: return own_weight < other_weight return self.getName() < other.getName() ## Simple string representation for debugging. - def __str__(self): + def __str__(self) -> str: return "".format(container_id = self.getId(), name = self.getName()) - ## Send postponed emits + ## Send the postponed emits # These emits are collected from the option postpone_emit. # Note: the option can be implemented for all functions modifying the container. - def sendPostponedEmits(self): + def sendPostponedEmits(self) -> None: while self._postponed_emits: signal, signal_arg = self._postponed_emits.pop(0) signal.emit(*signal_arg) -_containerRegistry = None # type: ContainerRegistryInterface +_containerRegistry = ContainerRegistryInterface() # type: ContainerRegistryInterface + def setContainerRegistry(registry: ContainerRegistryInterface) -> None: global _containerRegistry diff -Nru uranium-3.3.0/UM/Settings/Interfaces.py uranium-4.4.1/UM/Settings/Interfaces.py --- uranium-3.3.0/UM/Settings/Interfaces.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Settings/Interfaces.py 2019-11-19 10:50:46.000000000 +0000 @@ -1,28 +1,34 @@ -# Copyright (c) 2017 Ultimaker B.V. +# Copyright (c) 2018 Ultimaker B.V. # Uranium is released under the terms of the LGPLv3 or higher. -import os #To get the IDs from file names. -from typing import List, Dict, Any, Optional -import urllib.parse #To get the IDs from file names. +from typing import Any, Dict, List, Optional, Set, TYPE_CHECKING import UM.Decorators from UM.Logger import Logger -from UM.MimeTypeDatabase import MimeTypeDatabase from UM.Signal import Signal from UM.Settings.PropertyEvaluationContext import PropertyEvaluationContext +if TYPE_CHECKING: + from UM.Application import Application + from UM.Settings.InstanceContainer import InstanceContainer + from UM.Settings.SettingDefinition import SettingDefinition + ## Shared interface between setting container types # @UM.Decorators.interface class ContainerInterface: + + def __init__(self, *args, **kwargs): + pass + ## Get the ID of the container. # # The ID should be unique, machine readable and machine writable. It is # intended to be used for example when referencing the container in # configuration files or when writing a file to disk. # - # \return \type{string} The unique ID of this container. + # \return The unique ID of this container. def getId(self) -> str: pass @@ -31,7 +37,7 @@ # This should return a human-readable name for the container, that can be # used in the interface. # - # \return \type{string} The name of this container. + # \return The name of this container. def getName(self) -> str: pass @@ -40,13 +46,13 @@ # This returns a dictionary containing all the metadata for this container. # How this metadata is used depends on the application. # - # \return \type{dict} The metadata for this container. + # \return The metadata for this container. def getMetaData(self) -> Dict[str, Any]: pass ## Get the value of a single metadata entry. # - # \param entry \type{string} The key of the metadata to retrieve. + # \param entry The key of the metadata to retrieve. # \param default The default value to return if the entry cannot be found. # # \return The value of the metadata corresponding to `name`, or `default` @@ -55,10 +61,8 @@ pass ## Get the value of a property of the container item. - # - # \param key \type{string} The key of the item to retrieve a property from. - # \param name \type{string} The name of the property to retrieve. - # + # \param key The key of the item to retrieve a property from. + # \param property_name The name of the property to retrieve. # \return The specified property value of the container item corresponding to key, or None if not found. def getProperty(self, key: str, property_name: str, context: Optional[PropertyEvaluationContext] = None) -> Any: pass @@ -73,6 +77,11 @@ def hasProperty(self, key: str, property_name: str) -> bool: pass + ## Get all the setting keys known to this container. + # \return Set of keys. + def getAllKeys(self) -> Set[str]: + pass + ## Serialize this container to a string. # # The serialized representation of the container can be used to write the @@ -81,10 +90,23 @@ # \param ignored_metadata_keys A set of keys that should be ignored when # it serializes the metadata. # - # \return \type{string} A string representation of this container. + # \return A string representation of this container. def serialize(self, ignored_metadata_keys: Optional[set] = None) -> str: pass + ## Change a property of a container item. + # \param key The key of the item to change the property of. + # \param property_name The name of the property to change. + # \param property_value The new value of the property. + # \param container The container to use for retrieving values when + # changing the property triggers property updates. Defaults to None, which + # means use the current container. + # \param set_from_cache Flag to indicate that the property was set from + # cache. This triggers the behavior that the read_only and setDirty are + # ignored. + def setProperty(self, key: str, property_name: str, property_value: Any, container: "ContainerInterface" = None, set_from_cache: bool = False) -> None: + pass + ## Deserialize the container from a string representation. # # This should replace the contents of this container with those in the serialized @@ -142,17 +164,39 @@ def setPath(self, path: str) -> None: pass + def isDirty(self) -> bool: + pass + propertyChanged = None # type: Signal metaDataChanged = None # type: Signal +@UM.Decorators.interface class DefinitionContainerInterface(ContainerInterface): - pass + def findDefinitions(self, **kwargs: Any) -> List["SettingDefinition"]: + raise NotImplementedError() + + def setProperty(self, key: str, property_name: str, property_value: Any, container: "ContainerInterface" = None, set_from_cache: bool = False) -> None: + raise TypeError("Can't change properties in definition containers.") ## Shared interface between setting container types # @UM.Decorators.interface class ContainerRegistryInterface: - def findDefinitionContainers(self, **kwargs: Any) -> List[DefinitionContainerInterface]: pass + def findContainers(self, *, ignore_case: bool = False, **kwargs: Any) -> List[ContainerInterface]: + raise NotImplementedError() + + def findDefinitionContainers(self, **kwargs: Any) -> List[DefinitionContainerInterface]: + raise NotImplementedError() + + @classmethod + def getApplication(cls) -> "Application": + raise NotImplementedError() + + def getEmptyInstanceContainer(self) -> "InstanceContainer": + raise NotImplementedError() + + def isReadOnly(self, container_id: str) -> bool: + raise NotImplementedError() \ No newline at end of file diff -Nru uranium-3.3.0/UM/Settings/Models/ContainerPropertyProvider.py uranium-4.4.1/UM/Settings/Models/ContainerPropertyProvider.py --- uranium-3.3.0/UM/Settings/Models/ContainerPropertyProvider.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Settings/Models/ContainerPropertyProvider.py 2019-11-19 10:50:46.000000000 +0000 @@ -10,13 +10,14 @@ from UM.Settings.SettingDefinition import SettingDefinition from UM.Settings.DefinitionContainer import DefinitionContainer + ## This class provides the value and change notifications for the properties of a single setting # # This class provides the property values through QObject dynamic properties so that they # are available from QML. class ContainerPropertyProvider(QObject): - def __init__(self, parent = None, *args, **kwargs): - super().__init__(parent = parent, *args, **kwargs) + def __init__(self, parent = None): + super().__init__(parent = parent) self._container_id = "" self._container = None @@ -27,7 +28,7 @@ ## Set the containerId property. def setContainerId(self, container_id): if container_id == self._container_id: - return #No change. + return # No change. self._container_id = container_id @@ -119,7 +120,6 @@ if property_name not in self._watched_properties: return - value = self._getPropertyValue(property_name) if self._property_values.get(property_name, None) != value: diff -Nru uranium-3.3.0/UM/Settings/Models/ContainerStacksModel.py uranium-4.4.1/UM/Settings/Models/ContainerStacksModel.py --- uranium-3.3.0/UM/Settings/Models/ContainerStacksModel.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Settings/Models/ContainerStacksModel.py 2019-11-19 10:50:46.000000000 +0000 @@ -1,6 +1,9 @@ +# Copyright (c) 2018 Ultimaker B.V. +# Uranium is released under the terms of the LGPLv3 or higher. + from UM.Qt.ListModel import ListModel -from PyQt5.QtCore import pyqtSlot, pyqtProperty, Qt, pyqtSignal +from PyQt5.QtCore import pyqtProperty, Qt, pyqtSignal from UM.Settings.ContainerRegistry import ContainerRegistry from UM.Settings.ContainerStack import ContainerStack diff -Nru uranium-3.3.0/UM/Settings/Models/DefinitionContainersModel.py uranium-4.4.1/UM/Settings/Models/DefinitionContainersModel.py --- uranium-3.3.0/UM/Settings/Models/DefinitionContainersModel.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Settings/Models/DefinitionContainersModel.py 2019-11-19 10:50:46.000000000 +0000 @@ -1,4 +1,4 @@ -# Copyright (c) 2017 Ultimaker B.V. +# Copyright (c) 2019 Ultimaker B.V. # Uranium is released under the terms of the LGPLv3 or higher. from UM.Qt.ListModel import ListModel @@ -7,6 +7,7 @@ from UM.Settings.ContainerRegistry import ContainerRegistry from UM.Settings.DefinitionContainer import DefinitionContainer +from typing import Dict ## Model that holds definition containers. By setting the filter property the definitions held by this model can be @@ -27,7 +28,11 @@ ContainerRegistry.getInstance().containerRemoved.connect(self._onContainerChanged) self._section_property = "" - self._preferred_section_value = "" + + #Preference for which sections should be shown on top. Weights for each section. + #Sections with the lowest value are shown on top. Sections not on this + #list will get a value of 0. + self._preferred_sections = {} #type: Dict[str, int] self._filter_dict = {} self._update() @@ -45,7 +50,7 @@ definition_containers.sort(key = self._sortKey) for metadata in definition_containers: - metadata = metadata.copy() + metadata = dict(metadata) # For fully loaded definitions, the metadata is an OrderedDict which does not pass to QML correctly items.append({ "name": metadata["name"], @@ -66,16 +71,17 @@ def sectionProperty(self): return self._section_property - def setPreferredSectionValue(self, value): - if self._preferred_section_value != value: - self._preferred_section_value = value - self.preferredSectionValueChanged.emit() + def setPreferredSections(self, weights: Dict[str, int]): + if self._preferred_sections != weights: + self._preferred_sections = weights + self.preferredSectionsChanged.emit() self._update() - preferredSectionValueChanged = pyqtSignal() - @pyqtProperty(str, fset = setPreferredSectionValue, notify = preferredSectionValueChanged) - def preferredSectionValue(self): - return self._preferred_section_value + preferredSectionsChanged = pyqtSignal() + + @pyqtProperty("QVariantMap", fset = setPreferredSections, notify = preferredSectionsChanged) + def preferredSections(self): + return self._preferred_sections ## Set the filter of this model based on a string. # \param filter_dict Dictionary to do the filtering by. @@ -93,12 +99,12 @@ if self._section_property: section_value = item.get(self._section_property, "") - if self._preferred_section_value: - result.append(section_value != self._preferred_section_value) - result.append(section_value) + section_weight = self._preferred_sections.get(section_value, 0) + result.append(section_weight) + result.append(section_value.lower()) - result.append(int(item.get("weight", 0))) - result.append(item["name"]) + result.append(int(item.get("weight", 0))) #Weight within a section. + result.append(item["name"].lower()) return result diff -Nru uranium-3.3.0/UM/Settings/Models/InstanceContainersModel.py uranium-4.4.1/UM/Settings/Models/InstanceContainersModel.py --- uranium-3.3.0/UM/Settings/Models/InstanceContainersModel.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Settings/Models/InstanceContainersModel.py 2019-11-19 10:50:46.000000000 +0000 @@ -1,13 +1,13 @@ -# Copyright (c) 2017 Ultimaker B.V. +# Copyright (c) 2018 Ultimaker B.V. # Uranium is released under the terms of the LGPLv3 or higher. -import os -from typing import Any, Dict, List, Tuple +import os +from typing import Any, cast, Dict, Generator, List, Tuple from PyQt5.QtCore import pyqtProperty, Qt, pyqtSignal, pyqtSlot, QUrl, QTimer from UM.Qt.ListModel import ListModel - from UM.PluginRegistry import PluginRegistry # For getting the possible profile readers and writers. +from UM.Settings.Interfaces import ContainerInterface #For typing. from UM.Settings.ContainerRegistry import ContainerRegistry from UM.Settings.InstanceContainer import InstanceContainer from UM.i18n import i18nCatalog @@ -23,7 +23,7 @@ ReadOnlyRole = Qt.UserRole + 4 SectionRole = Qt.UserRole + 5 - def __init__(self, parent = None): + def __init__(self, parent = None) -> None: super().__init__(parent) self.addRoleName(self.NameRole, "name") self.addRoleName(self.IdRole, "id") @@ -49,17 +49,17 @@ self._container_change_timer.timeout.connect(self._update) # List of filters for queries. The result is the union of the each list of results. - self._filter_dicts = [] # type: List[Dict[str,str]] + self._filter_dicts = [] # type: List[Dict[str, str]] self._container_change_timer.start() ## Handler for container added / removed events from registry - def _onContainerChanged(self, container): + def _onContainerChanged(self, container: ContainerInterface) -> None: # We only need to update when the changed container is a instanceContainer if isinstance(container, InstanceContainer): self._container_change_timer.start() ## Private convenience function to reset & repopulate the model. - def _update(self): + def _update(self) -> None: #You can only connect on the instance containers, not on the metadata. #However the metadata can't be edited, so it's not needed. for container in self._instance_containers.values(): @@ -78,7 +78,7 @@ # # This does not set the items in the list itself. It is intended to be # overwritten by subclasses that add their own roles to the model. - def _recomputeItems(self): + def _recomputeItems(self) -> Generator[Dict[str, Any], None, None]: registry = ContainerRegistry.getInstance() result = [] for container in self._instance_containers.values(): @@ -110,19 +110,19 @@ # containers of which only the metadata is known. def _fetchInstanceContainers(self) -> Tuple[Dict[str, InstanceContainer], Dict[str, Dict[str, Any]]]: registry = ContainerRegistry.getInstance() #Cache this for speed. - containers = {} #Mapping from container ID to container. - metadatas = {} #Mapping from container ID to metadata. + containers = {} #type: Dict[str, InstanceContainer] #Mapping from container ID to container. + metadatas = {} #type: Dict[str, Dict[str, Any]] #Mapping from container ID to metadata. for filter_dict in self._filter_dicts: this_filter = registry.findInstanceContainersMetadata(**filter_dict) for metadata in this_filter: if metadata["id"] not in containers and metadata["id"] not in metadatas: #No duplicates please. if registry.isLoaded(metadata["id"]): #Only add it to the full containers if it's already fully loaded. - containers[metadata["id"]] = registry.findContainers(id = metadata["id"])[0] + containers[metadata["id"]] = cast(InstanceContainer, registry.findContainers(id = metadata["id"])[0]) else: metadatas[metadata["id"]] = metadata return containers, metadatas - def setSectionProperty(self, property_name): + def setSectionProperty(self, property_name: str) -> None: if self._section_property != property_name: self._section_property = property_name self.sectionPropertyChanged.emit() @@ -130,7 +130,7 @@ sectionPropertyChanged = pyqtSignal() @pyqtProperty(str, fset = setSectionProperty, notify = sectionPropertyChanged) - def sectionProperty(self): + def sectionProperty(self) -> str: return self._section_property ## Set the filter of this model based on a string. @@ -141,40 +141,32 @@ filterChanged = pyqtSignal() @pyqtProperty("QVariantMap", fset = setFilter, notify = filterChanged) def filter(self) -> Dict[str, str]: - return self._filter_dicts[0] if len(self._filter_dicts) != 0 else None + return self._filter_dicts[0] if len(self._filter_dicts) != 0 else {} ## Set a list of filters to use when fetching containers. # - # \param filter_list \type{List[Dict]} List of filter dicts to fetch multiple - # sets of containers. The final result is the union of these sets. - def setFilterList(self, filter_list): + # \param filter_list List of filter dicts to fetch multiple sets of + # containers. The final result is the union of these sets. + def setFilterList(self, filter_list: List[Dict]) -> None: if filter_list != self._filter_dicts: self._filter_dicts = filter_list self.filterChanged.emit() self._container_change_timer.start() @pyqtProperty("QVariantList", fset=setFilterList, notify=filterChanged) - def filterList(self): + def filterList(self) -> List[Dict[str, str]]: return self._filter_dicts - @pyqtSlot(str, str) - def rename(self, instance_id, new_name): - if new_name != self.getName(): - containers = ContainerRegistry.getInstance().findInstanceContainers(id = instance_id) - if containers: - containers[0].setName(new_name) - self._container_change_timer.start() - ## Gets a list of the possible file filters that the plugins have # registered they can read or write. The convenience meta-filters # "All Supported Types" and "All Files" are added when listing # readers, but not when listing writers. # - # \param io_type \type{str} name of the needed IO type + # \param io_type Name of the needed IO type # \return A list of strings indicating file name filters for a file # dialog. @pyqtSlot(str, result="QVariantList") - def getFileNameFilters(self, io_type): + def getFileNameFilters(self, io_type: str) -> List[str]: #TODO: This function should be in UM.Resources! filters = [] all_types = [] @@ -193,12 +185,12 @@ return filters @pyqtSlot(result=QUrl) - def getDefaultPath(self): + def getDefaultPath(self) -> QUrl: return QUrl.fromLocalFile(os.path.expanduser("~/")) ## Gets a list of profile reader or writer plugins # \return List of tuples of (plugin_id, meta_data). - def _getIOPlugins(self, io_type): + def _getIOPlugins(self, io_type: str) -> List[Tuple[str, Dict[str, Any]]]: pr = PluginRegistry.getInstance() active_plugin_ids = pr.getActivePlugins() @@ -206,28 +198,10 @@ for plugin_id in active_plugin_ids: meta_data = pr.getMetaData(plugin_id) if io_type in meta_data: - result.append( (plugin_id, meta_data) ) + result.append((plugin_id, meta_data)) return result - @pyqtSlot("QVariantList", QUrl, str) - def exportProfile(self, instance_id, file_url, file_type): - if not file_url.isValid(): - return - path = file_url.toLocalFile() - if not path: - return - ContainerRegistry.getInstance().exportProfile(instance_id, path, file_type) - - @pyqtSlot(QUrl, result="QVariantMap") - def importProfile(self, file_url): - if not file_url.isValid(): - return - path = file_url.toLocalFile() - if not path: - return - return ContainerRegistry.getInstance().importProfile(path) - - def _sortKey(self, item): + def _sortKey(self, item: Dict[str, Any]) -> List[Any]: result = [] if self._section_property: result.append(item.get(self._section_property, "")) @@ -238,7 +212,7 @@ return result - def _updateMetaData(self, container): + def _updateMetaData(self, container: InstanceContainer) -> None: index = self.find("id", container.id) if self._section_property: @@ -250,7 +224,7 @@ ## If a container has loaded fully (rather than just metadata) we need to # move it from the dict of metadata to the dict of full containers. - def _onContainerLoadComplete(self, container_id): + def _onContainerLoadComplete(self, container_id: str) -> None: if container_id in self._instance_containers_metadata: del self._instance_containers_metadata[container_id] self._instance_containers[container_id] = ContainerRegistry.getInstance().findContainers(id = container_id)[0] diff -Nru uranium-3.3.0/UM/Settings/Models/SettingDefinitionsModel.py uranium-4.4.1/UM/Settings/Models/SettingDefinitionsModel.py --- uranium-3.3.0/UM/Settings/Models/SettingDefinitionsModel.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Settings/Models/SettingDefinitionsModel.py 2019-11-19 10:50:46.000000000 +0000 @@ -2,21 +2,20 @@ # Uranium is released under the terms of the LGPLv3 or higher. import collections -import itertools import os.path +from typing import List from PyQt5.QtCore import Qt, QAbstractListModel, QVariant, QModelIndex, QObject, pyqtProperty, pyqtSignal from UM.FlameProfiler import pyqtSlot from UM.Logger import Logger -from UM.Preferences import Preferences -from UM.Resources import Resources from UM.Settings import SettingRelation from UM.i18n import i18nCatalog from UM.Application import Application from UM.Settings.ContainerRegistry import ContainerRegistry -from UM.Settings.SettingDefinition import SettingDefinition, DefinitionPropertyType +from UM.Settings.SettingDefinition import SettingDefinition + ## Model that provides a flattened list of the tree of SettingDefinition objects in a DefinitionContainer # @@ -33,7 +32,7 @@ ExpandedRole = Qt.UserRole + 4 def __init__(self, parent = None, *args, **kwargs): - super().__init__(parent = parent, *args, **kwargs) + super().__init__(parent = parent) self._container_id = None self._container = None @@ -49,10 +48,13 @@ self._visible = set() self._exclude = set() - self._show_all = False - self._show_ancestors = False + self._show_all = False # type: bool + self._show_ancestors = False # type: bool self._visibility_handler = None + self._update_visible_row_scheduled = False # type: bool + self._destroyed = False # type: bool + self._filter_dict = {} self._role_names = { @@ -66,22 +68,31 @@ self._role_names[index] = name.encode() index += 1 + self.destroyed.connect(self._onDestroyed) + ## Emitted whenever the showAncestors property changes. showAncestorsChanged = pyqtSignal() - def setShowAncestors(self, show_ancestors): + def _onDestroyed(self) -> None: + self._destroyed = True + + @pyqtSlot(bool) + def setDestroyed(self, value: bool) -> None: + self._destroyed = value + + def setShowAncestors(self, show_ancestors: bool) -> None: if show_ancestors != self._show_ancestors: self._show_ancestors = show_ancestors self._update() - self.showAncestorsChanged.emit() + self._scheduleUpdateVisibleRows() @pyqtProperty(bool, fset=setShowAncestors, notify=showAncestorsChanged) # Should we still show ancestors, even if filter says otherwise? - def showAncestors(self): + def showAncestors(self) -> bool: return self._show_ancestors ## Set the containerId property. - def setContainerId(self, container_id): + def setContainerId(self, container_id: str) -> None: if container_id != self._container_id: self._container_id = container_id @@ -96,13 +107,14 @@ ## Emitted whenever the containerId property changes. containerIdChanged = pyqtSignal() + ## The ID of the DefinitionContainer object this model exposes. @pyqtProperty(str, fset = setContainerId, notify = containerIdChanged) - def containerId(self): + def containerId(self) -> str: return self._container_id ## Set the rootKey property. - def setRootKey(self, key): + def setRootKey(self, key: str) -> None: if key != self._root_key: self._root_key = key @@ -119,24 +131,25 @@ ## Emitted when the rootKey property changes. rootKeyChanged = pyqtSignal() + ## The SettingDefinition to use as root for the list. @pyqtProperty(str, fset = setRootKey, notify = rootKeyChanged) def rootKey(self): return self._root_key ## Set the showAll property. - def setShowAll(self, show): + def setShowAll(self, show: bool) -> None: if show != self._show_all: self._show_all = show self.showAllChanged.emit() - self._updateVisibleRows() + self._scheduleUpdateVisibleRows() ## Emitted when the showAll property changes. showAllChanged = pyqtSignal() ## Whether or not the model should show all definitions regardless of visibility. @pyqtProperty(bool, fset = setShowAll, notify = showAllChanged) - def showAll(self): + def showAll(self) -> bool: return self._show_all visibilityChanged = pyqtSignal() @@ -170,7 +183,7 @@ if exclude != self._exclude: self._exclude = exclude self.excludeChanged.emit() - self._updateVisibleRows() + self._scheduleUpdateVisibleRows() ## Emitted whenever the exclude property changes excludeChanged = pyqtSignal() @@ -181,7 +194,7 @@ return list(self._exclude) ## Set the expanded property - def setExpanded(self, expanded): + def setExpanded(self, expanded: List[str]) -> None: new_expanded = set() for item in expanded: if item == "*": @@ -194,19 +207,19 @@ if new_expanded != self._expanded: self._expanded = new_expanded self.expandedChanged.emit() - self._updateVisibleRows() + self._scheduleUpdateVisibleRows() ## Emitted whenever the exclude property changes expandedChanged = pyqtSignal() ## This property indicates which settings should never be visibile. @pyqtProperty("QStringList", fset = setExpanded, notify = expandedChanged) - def expanded(self): + def expanded(self) -> List[str]: return list(self._expanded) visibleCountChanged = pyqtSignal() @pyqtProperty(int, notify = visibleCountChanged) - def visibleCount(self): + def visibleCount(self) -> int: count = 0 for index in self._row_index_list: definition = self._definition_list[index] @@ -216,7 +229,7 @@ return count @pyqtProperty(int, notify = visibleCountChanged) - def categoryCount(self): + def categoryCount(self) -> int: count = 0 for index in self._row_index_list: definition = self._definition_list[index] @@ -231,7 +244,7 @@ if filter_dict != self._filter_dict: self._filter_dict = filter_dict self.filterChanged.emit() - self._updateVisibleRows() + self._scheduleUpdateVisibleRows() filterChanged = pyqtSignal() @@ -245,57 +258,55 @@ if key not in self._expanded: self._expanded.add(key) self.expandedChanged.emit() - self._updateVisibleRows() + self._scheduleUpdateVisibleRows() - ## Show the children of a specified SettingDefinition and all children of those settings as well. - @pyqtSlot(str) - def expandAll(self, key): + def _getDefinitionsByKey(self, key: str) -> List["SettingDefinition"]: if not self._container: - return + return [] - definitions = self._container.findDefinitions(key = key) + return self._container.findDefinitions(key = key) + + ## Show the children of a specified SettingDefinition and all children of those settings as well. + @pyqtSlot(str) + def expandRecursive(self, key: str) -> None: + definitions = self._getDefinitionsByKey(key) if not definitions: return self.expand(key) for child in definitions[0].children: - if child.children: - self.expandAll(child.key) + self.expandRecursive(child.key) ## Hide the children of a specified SettingDefinition. @pyqtSlot(str) - def collapse(self, key): - if not self._container: + def collapse(self, key: str) -> None: + definitions = self._getDefinitionsByKey(key) + if not definitions: return if key not in self._expanded: return - definitions = self._container.findDefinitions(key = key) - if not definitions: - return - self._expanded.remove(key) for child in definitions[0].children: - if child.children: - self.collapse(child.key) + self.collapse(child.key) self.expandedChanged.emit() - self._updateVisibleRows() + self._scheduleUpdateVisibleRows() ## Show a single SettingDefinition. @pyqtSlot(str) - def show(self, key): + def show(self, key: str) -> None: self.setVisible(key, True) ## Hide a single SettingDefinition. @pyqtSlot(str) - def hide(self, key): + def hide(self, key: str) -> None: self.setVisible(key, False) @pyqtSlot(bool) - def setAllExpandedVisible(self, visible): + def setAllExpandedVisible(self, visible: bool) -> None: new_visible = set() for index in self._row_index_list: @@ -309,7 +320,7 @@ self._visibility_handler.setVisible(self._visible - new_visible) @pyqtSlot(bool) - def setAllVisible(self, visible): + def setAllVisible(self, visible: bool) -> None: new_visible = set() for definition in self._definition_list: @@ -323,7 +334,7 @@ ## Set a single SettingDefinition's visible state @pyqtSlot(str, bool) - def setVisible(self, key, visible): + def setVisible(self, key: str, visible: bool) -> None: if key in self._visible and visible: # Ignore already visible settings that need to be made visible. return @@ -332,9 +343,9 @@ # Ignore already hidden settings that need to be hidden. return - definitions = self._container.findDefinitions(key = key) + definitions = self._getDefinitionsByKey(key) if not definitions: - Logger.log("e", "Tried to change visiblity of a non-existant SettingDefinition") + Logger.log("e", "Tried to change visibility of a non-existent SettingDefinition") return if visible: @@ -347,19 +358,22 @@ ## Get a single SettingDefinition's visible state @pyqtSlot(str, result = bool) - def getVisible(self, key): + def getVisible(self, key: str) -> bool: return key in self._visible @pyqtSlot(str, result = int) - def getIndex(self, key): - if not self._container: - return -1 - definitions = self._container.findDefinitions(key = key) + def getIndex(self, key: str) -> int: + definitions = self._getDefinitionsByKey(key) if not definitions: return -1 index = self._definition_list.index(definitions[0]) + # Make sure self._row_index_list is populated + if self._update_visible_row_scheduled: + self._update_visible_row_scheduled = False + self._updateVisibleRows() + try: return self._row_index_list.index(index) except ValueError: @@ -367,10 +381,7 @@ @pyqtSlot(str, str, result = "QVariantList") def getRequires(self, key, role = None): - if not self._container: - return [] - - definitions = self._container.findDefinitions(key = key) + definitions = self._getDefinitionsByKey(key) if not definitions: return [] @@ -392,10 +403,7 @@ @pyqtSlot(str, str, result = "QVariantList") def getRequiredBy(self, key, role = None): - if not self._container: - return [] - - definitions = self._container.findDefinitions(key = key) + definitions = self._getDefinitionsByKey(key) if not definitions: return [] @@ -415,17 +423,33 @@ return result + ## Reimplemented from ListModel only because we want to use it in static + # context in the subclass. + itemsChanged = pyqtSignal() + ## Reimplemented from QAbstractListModel - # Note that rowCount() is overridden from QAbstractItemModel. The signature of the method in that - # class is "int rowCount(const QModelIndex& parent)" which makes this slot declaration incorrect. - # TODO: fix the pointer when actually using this parameter. - @pyqtSlot(QObject, result = int) - def rowCount(self, parent = None): + # + # Note that count() is overridden from QAbstractItemModel. The signature + # of the method in that class is "int count()" which makes this slot + # declaration incorrect. + # TODO: fix the pointer when actually using this parameter. + @pyqtProperty(int, notify = itemsChanged) + def count(self): if not self._container: return 0 return len(self._row_index_list) + ## This function is necessary because it is abstract in QAbstractListModel. + # + # Under the hood, Qt will call this function when it needs to know how + # many items are in the model. + # This pyqtSlot will not be linked to the itemsChanged signal, so please + # use the normal count() function instead. + @pyqtSlot(QObject, result = int) + def rowCount(self, parent = None) -> int: + return self.count + ## Reimplemented from QAbstractListModel def data(self, index, role): if not self._container: @@ -476,7 +500,7 @@ def roleNames(self): return self._role_names - def _onVisibilityChanged(self): + def _onVisibilityChanged(self) -> None: self._visible = self._visibility_handler.getVisible() for row in range(len(self._row_index_list)): @@ -484,16 +508,22 @@ self._updateVisibleRows() + # Schedules to call _updateVisibleRows() later. + def _scheduleUpdateVisibleRows(self) -> None: + if not self._update_visible_row_scheduled: + self._update_visible_row_scheduled = True + Application.getInstance().callLater(self._updateVisibleRows) + ## Force updating the model. @pyqtSlot() - def forceUpdate(self): + def forceUpdate(self) -> None: self._update() # Update the internal list of definitions and the visibility mapping. # # Note that this triggers a model reset and should only be called when the # underlying data needs to be updated. Otherwise call _updateVisibleRows. - def _update(self): + def _update(self) -> None: if not self._container: return @@ -503,25 +533,39 @@ if catalog.hasTranslationLoaded(): self._i18n_catalog = catalog - self.beginResetModel() - - self._definition_list.clear() - self._row_index_list.clear() - if self._root: - self._definition_list = self._root.findDefinitions() + new_definitions = self._root.findDefinitions() else: - self._definition_list = self._container.findDefinitions() + new_definitions = self._container.findDefinitions() - self._updateVisibleRows() - - self.endResetModel() + # Check if a full reset is required + if len(new_definitions) != len(self._definition_list): + self.beginResetModel() + self._definition_list = new_definitions + self._row_index_list.clear() + self._scheduleUpdateVisibleRows() + self.endResetModel() + else: + # If the length hasn't changed, we can just notify that the data was changed. This will prevent the existing + # QML setting items from being re-created every you switch between machines. + self._definition_list = new_definitions + self._scheduleUpdateVisibleRows() + self.dataChanged.emit(self.index(0, 0), self.index(len(self._definition_list) - 1, 0)) # Update the list of visible rows. # # This will compute the difference between the old state and the new state and # insert/remove rows as appropriate. - def _updateVisibleRows(self): + def _updateVisibleRows(self) -> None: + # This function is scheduled on the Qt event loop. By the time this is called, this object can already been + # destroyed because the owner QML widget was destroyed or so. We cannot cancel a call that has been scheduled, + # so in this case, we should do nothing if this object has already been destroyed. + if self._destroyed: + return + + # Reset the scheduled flag + self._update_visible_row_scheduled = False + currently_visible = set(self._row_index_list) # A set of currently visible items new_visible = set() # A new set of visible items @@ -614,7 +658,7 @@ continue if child.key in self._visible: - if Application.getInstance().getGlobalContainerStack().getProperty(child.key, "enabled"): + if self._container.getProperty(child.key, "enabled"): return True if self._isAnyDescendantVisible(child): diff -Nru uranium-3.3.0/UM/Settings/Models/SettingPreferenceVisibilityHandler.py uranium-4.4.1/UM/Settings/Models/SettingPreferenceVisibilityHandler.py --- uranium-3.3.0/UM/Settings/Models/SettingPreferenceVisibilityHandler.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Settings/Models/SettingPreferenceVisibilityHandler.py 2019-11-19 10:50:46.000000000 +0000 @@ -1,4 +1,4 @@ -from UM.Preferences import Preferences +from UM.Application import Application from . import SettingVisibilityHandler @@ -6,7 +6,7 @@ def __init__(self, parent = None, *args, **kwargs): super().__init__(parent = parent, *args, **kwargs) - Preferences.getInstance().preferenceChanged.connect(self._onPreferencesChanged) + Application.getInstance().getPreferences().preferenceChanged.connect(self._onPreferencesChanged) self._onPreferencesChanged("general/visible_settings") self.visibilityChanged.connect(self._onVisibilityChanged) @@ -16,7 +16,7 @@ return new_visible = set() - visibility_string = Preferences.getInstance().getValue("general/visible_settings") + visibility_string = Application.getInstance().getPreferences().getValue("general/visible_settings") if visibility_string is None: return for key in visibility_string.split(";"): @@ -26,4 +26,4 @@ def _onVisibilityChanged(self): preference = ";".join(self.getVisible()) - Preferences.getInstance().setValue("general/visible_settings", preference) + Application.getInstance().getPreferences().setValue("general/visible_settings", preference) diff -Nru uranium-3.3.0/UM/Settings/Models/SettingPropertyProvider.py uranium-4.4.1/UM/Settings/Models/SettingPropertyProvider.py --- uranium-3.3.0/UM/Settings/Models/SettingPropertyProvider.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Settings/Models/SettingPropertyProvider.py 2019-11-19 10:50:46.000000000 +0000 @@ -1,5 +1,6 @@ # Copyright (c) 2017 Ultimaker B.V. # Uranium is released under the terms of the LGPLv3 or higher. +from typing import Optional, List, Set, Any from PyQt5.QtCore import QObject, QTimer, pyqtProperty, pyqtSignal from PyQt5.QtQml import QQmlPropertyMap @@ -7,14 +8,17 @@ from UM.Logger import Logger from UM.Application import Application +from UM.Settings.ContainerStack import ContainerStack from UM.Settings.SettingFunction import SettingFunction from UM.Settings.ContainerRegistry import ContainerRegistry from UM.Settings.DefinitionContainer import DefinitionContainer from UM.Settings.InstanceContainer import InstanceContainer -from UM.Settings.Interfaces import PropertyEvaluationContext +from UM.Settings.Interfaces import PropertyEvaluationContext, ContainerInterface from UM.Settings.SettingInstance import InstanceState from UM.Settings.SettingRelation import RelationType from UM.Settings.SettingDefinition import SettingDefinition +from UM.Settings.Validator import Validator + ## This class provides the value and change notifications for the properties of a single setting # @@ -24,78 +28,91 @@ # This class provides the property values through QObject dynamic properties so that they # are available from QML. class SettingPropertyProvider(QObject): - def __init__(self, parent = None, *args, **kwargs): - super().__init__(parent = parent, *args, **kwargs) + def __init__(self, parent = None) -> None: + super().__init__(parent = parent) self._property_map = QQmlPropertyMap(self) - self._stack_id = "" - self._stack = None + self._stack = None # type: Optional[ContainerStack] self._key = "" - self._relations = set() - self._watched_properties = [] + self._relations = set() # type: Set[str] + self._watched_properties = [] # type: List[str] self._store_index = 0 - self._value_used = None - self._stack_levels = [] + self._value_used = None # type: Optional[bool] + self._stack_levels = [] # type: List[int] self._remove_unused_value = True - self._validator = None + self._validator = None # type: Optional[Validator] - self._update_timer = QTimer() + self._update_timer = QTimer(self) self._update_timer.setInterval(100) self._update_timer.setSingleShot(True) self._update_timer.timeout.connect(self._update) self.storeIndexChanged.connect(self._storeIndexChanged) - ## Set the containerStackId property. - def setContainerStackId(self, stack_id): - if stack_id == self._stack_id: - return # No change. - - self._stack_id = stack_id + def setContainerStack(self, stack: Optional[ContainerStack]) -> None: + if self._stack == stack: + return # Nothing to do, attempting to set stack to the same value. if self._stack: self._stack.propertiesChanged.disconnect(self._onPropertiesChanged) self._stack.containersChanged.disconnect(self._containersChanged) - if self._stack_id: - if self._stack_id == "global": - self._stack = Application.getInstance().getGlobalContainerStack() - else: - stacks = ContainerRegistry.getInstance().findContainerStacks(id = self._stack_id) - if stacks: - self._stack = stacks[0] + self._stack = stack - if self._stack: - self._stack.propertiesChanged.connect(self._onPropertiesChanged) - self._stack.containersChanged.connect(self._containersChanged) - else: - self._stack = None + if self._stack: + self._stack.propertiesChanged.connect(self._onPropertiesChanged) + self._stack.containersChanged.connect(self._containersChanged) self._validator = None self._update() - self.containerStackIdChanged.emit() + self.containerStackChanged.emit() + + ## Set the containerStackId property. + def setContainerStackId(self, stack_id: str) -> None: + if stack_id == self.containerStackId: + return # No change. + + if stack_id: + if stack_id == "global": + self.setContainerStack(Application.getInstance().getGlobalContainerStack()) + else: + stacks = ContainerRegistry.getInstance().findContainerStacks(id = stack_id) + if stacks: + self.setContainerStack(stacks[0]) + else: + self.setContainerStack(None) ## Emitted when the containerStackId property changes. containerStackIdChanged = pyqtSignal() + ## The ID of the container stack we should query for property values. @pyqtProperty(str, fset = setContainerStackId, notify = containerStackIdChanged) - def containerStackId(self): - return self._stack_id + def containerStackId(self) -> str: + if self._stack: + return self._stack.id + + return "" + + containerStackChanged = pyqtSignal() + + @pyqtProperty(QObject, fset=setContainerStack, notify=containerStackChanged) + def containerStack(self) -> Optional[ContainerInterface]: + return self._stack removeUnusedValueChanged = pyqtSignal() - def setRemoveUnusedValue(self, remove_unused_value): + def setRemoveUnusedValue(self, remove_unused_value: bool) -> None: if self._remove_unused_value != remove_unused_value: self._remove_unused_value = remove_unused_value self.removeUnusedValueChanged.emit() @pyqtProperty(bool, fset = setRemoveUnusedValue, notify = removeUnusedValueChanged) - def removeUnusedValue(self): + def removeUnusedValue(self) -> bool: return self._remove_unused_value ## Set the watchedProperties property. - def setWatchedProperties(self, properties): + def setWatchedProperties(self, properties: List[str]) -> None: if properties != self._watched_properties: self._watched_properties = properties self._update() @@ -104,12 +121,12 @@ ## Emitted when the watchedProperties property changes. watchedPropertiesChanged = pyqtSignal() ## A list of property names that should be watched for changes. - @pyqtProperty("QVariantList", fset = setWatchedProperties, notify = watchedPropertiesChanged) - def watchedProperties(self): + @pyqtProperty("QStringList", fset = setWatchedProperties, notify = watchedPropertiesChanged) + def watchedProperties(self) -> List[str]: return self._watched_properties ## Set the key property. - def setKey(self, key): + def setKey(self, key: str) -> None: if key != self._key: self._key = key self._validator = None @@ -206,7 +223,7 @@ # \param property_name The name of the property to get the value from. # \param stack_level the index of the container to get the value from. @pyqtSlot(str, int, result = "QVariant") - def getPropertyValue(self, property_name, stack_level): + def getPropertyValue(self, property_name: str, stack_level: int) -> Any: try: # Because we continue to count if there are multiple linked stacks, we need to check what stack is targeted current_stack = self._stack @@ -214,7 +231,7 @@ num_containers = len(current_stack.getContainers()) if stack_level >= num_containers: stack_level -= num_containers - current_stack = self._stack.getNextStack() + current_stack = current_stack.getNextStack() else: break # Found the right stack @@ -228,14 +245,18 @@ return None return value + @pyqtSlot(str, result = str) + def getPropertyValueAsString(self, property_name: str) -> str: + return self._getPropertyValue(property_name) + @pyqtSlot(int) - def removeFromContainer(self, index): + def removeFromContainer(self, index: int) -> None: current_stack = self._stack while current_stack: num_containers = len(current_stack.getContainers()) if index >= num_containers: index -= num_containers - current_stack = self._stack.getNextStack() + current_stack = current_stack.getNextStack() else: break # Found the right stack @@ -252,7 +273,7 @@ isValueUsedChanged = pyqtSignal() @pyqtProperty(bool, notify = isValueUsedChanged) - def isValueUsed(self): + def isValueUsed(self) -> bool: if self._value_used is not None: return self._value_used if not self._stack: @@ -272,21 +293,28 @@ if self._stack.getProperty(key, "state") != InstanceState.User: value_used_count += 1 + break # If the setting has a formula the value is still used. if isinstance(self._stack.getRawProperty(key, "value"), SettingFunction): value_used_count += 1 + break self._value_used = relation_count == 0 or (relation_count > 0 and value_used_count != 0) return self._value_used - # protected: - - def _onPropertiesChanged(self, key, property_names): + def _onPropertiesChanged(self, key: str, property_names: List[str]) -> None: if key != self._key: if key in self._relations: self._value_used = None - self.isValueUsedChanged.emit() + try: + self.isValueUsedChanged.emit() + except RuntimeError: + # QtObject has been destroyed, no need to handle the signals anymore. + # This can happen when the QtObject in C++ has been destroyed, but the python object hasn't quite + # caught on yet. Once we call any signals, it will cause a runtimeError since all the underlying + # logic to emit pyqtSignals is gone. + return return has_values_changed = False @@ -295,11 +323,25 @@ continue has_values_changed = True - self._property_map.insert(property_name, self._getPropertyValue(property_name)) + try: + self._property_map.insert(property_name, self._getPropertyValue(property_name)) + except RuntimeError: + # QtObject has been destroyed, no need to handle the signals anymore. + # This can happen when the QtObject in C++ has been destroyed, but the python object hasn't quite + # caught on yet. Once we call any signals, it will cause a runtimeError since all the underlying + # logic to emit pyqtSignals is gone. + return self._updateStackLevels() if has_values_changed: - self.propertiesChanged.emit() + try: + self.propertiesChanged.emit() + except RuntimeError: + # QtObject has been destroyed, no need to handle the signals anymore. + # This can happen when the QtObject in C++ has been destroyed, but the python object hasn't quite + # caught on yet. Once we call any signals, it will cause a runtimeError since all the underlying + # logic to emit pyqtSignals is gone. + return def _update(self, container = None): if not self._stack or not self._watched_properties or not self._key: @@ -319,7 +361,12 @@ self.isValueUsedChanged.emit() def _updateDelayed(self, container = None): - self._update_timer.start() + try: + self._update_timer.start() + except RuntimeError: + # Sometimes the python object is not yet deleted, but the wrapped part is already gone. + # In that case there is nothing else to do but ignore this. + pass def _containersChanged(self, container = None): self._updateDelayed(container = container) @@ -329,7 +376,7 @@ ## Updates the self._stack_levels field, which indicates at which levels in # the stack the property is set. - def _updateStackLevels(self): + def _updateStackLevels(self) -> None: levels = [] # Start looking at the stack this provider is attached to. current_stack = self._stack diff -Nru uranium-3.3.0/UM/Settings/SettingDefinition.py uranium-4.4.1/UM/Settings/SettingDefinition.py --- uranium-3.3.0/UM/Settings/SettingDefinition.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Settings/SettingDefinition.py 2019-11-19 10:50:46.000000000 +0000 @@ -1,4 +1,4 @@ -# Copyright (c) 2017 Ultimaker B.V. +# Copyright (c) 2019 Ultimaker B.V. # Uranium is released under the terms of the LGPLv3 or higher. import ast @@ -43,7 +43,7 @@ ## Literal eval does not like "02" as a value, but users see this as "2". ## We therefore look numbers with leading "0", provided they are not used in variable names ## example: "test02 * 20" should not be changed, but "test * 02 * 20" should be changed (into "test * 2 * 20") - regex_pattern = '(? None: + def __init__(self, key: str, container: Optional[DefinitionContainerInterface] = None, parent: Optional["SettingDefinition"] = None, i18n_catalog: Optional[i18nCatalog] = None) -> None: super().__init__() - + self._all_keys = set() # type: Set[str] self._key = key # type: str self._container = container # type: Optional[DefinitionContainerInterface] self._parent = parent # type: Optional["SettingDefinition"] - self._i18n_catalog = i18n_catalog # type: i18nCatalog + self._i18n_catalog = i18n_catalog # type: Optional[i18nCatalog] self._children = [] # type: List[SettingDefinition] self._relations = [] # type: List[SettingRelation] @@ -127,6 +135,11 @@ # behaviour doesn't combine well with a non-default __getattr__. def __setstate__(self, state): self.__dict__.update(state) + # For 4.0 we added the _all_keys property, but the pickling fails to restore this. + # This is just there to prevent issues for developers, since only releases ignore caches. + # If you're reading this after that. Remove this. + if not hasattr(self, "_all_keys"): + self._all_keys = set() ## The key of this setting. # @@ -173,17 +186,19 @@ # # \return A set of the key in this definition and all its descendants. def getAllKeys(self) -> Set[str]: - keys = set() - keys.add(self.key) - for child in self.children: - keys |= child.getAllKeys() #Recursively get all keys of all descendants. - return keys + if not self._all_keys: + # It was reset, re-calculate them + self._all_keys = set() + self._all_keys.add(self.key) + for child in self.children: + self._all_keys |= child.getAllKeys() # Recursively get all keys of all descendants. + return self._all_keys ## Serialize this setting to a dict. # # \return \type{dict} A representation of this setting definition. def serialize_to_dict(self) -> Dict[str, Any]: - result = {} # type: Dict[str, Any] + result = {} # type: Dict[str, Any] result["label"] = self.key result["children"] = {} @@ -397,12 +412,10 @@ # # \return A list of all the names of supported properties. @classmethod - def getPropertyNames(cls, type: DefinitionPropertyType = None) -> List[str]: - result = [] - for key, value in cls.__property_definitions.items(): - if not type or value["type"] == type: - result.append(key) - return result + def getPropertyNames(cls, def_type: DefinitionPropertyType = None) -> List[str]: + if def_type is None: + return list(cls.__property_definitions.keys()) + return [key for key, value in cls.__property_definitions.items() if not def_type or value["type"] == def_type] ## Check if a property with the specified name is defined as a supported property. # @@ -460,7 +473,7 @@ # # \return \type{string} The property it depends on or None if it does not depend on another property. @classmethod - def dependsOnProperty(cls, name: str) -> str: + def dependsOnProperty(cls, name: str) -> Optional[str]: if name in cls.__property_definitions: return cls.__property_definitions[name]["depends_on"] return None @@ -472,7 +485,8 @@ # \param to_string A function that converts a value of this type to a string. # @classmethod - def addSettingType(cls, type_name: str, from_string: Callable[[str], Any], to_string: Callable[[Any],str], validator: Validator = None) -> None: + def addSettingType(cls, type_name: str, from_string: Optional[Callable[[str], Any]], + to_string: Callable[[Any], str], validator: Optional[Validator] = None) -> None: cls.__type_definitions[type_name] = { "from": from_string, "to": to_string, "validator": validator } ## Convert a string to a value according to a setting type. @@ -574,7 +588,7 @@ def _updateDescendants(self, definition: "SettingDefinition" = None) -> Dict[str, "SettingDefinition"]: result = {} - + self._all_keys = set() # Reset the keys cache. if not definition: definition = self @@ -616,46 +630,28 @@ # A dictionary of key-value pairs that provide the options for an enum type setting. The key is the actual value, the value is a translated display string. "options": {"type": DefinitionPropertyType.Any, "required": False, "read_only": True, "default": {}, "depends_on" : None}, # Optional comments that apply to the setting. Will be ignored. - "comments": {"type": DefinitionPropertyType.String, "required": False, "read_only": True, "default": "", "depends_on" : None} + "comments": {"type": DefinitionPropertyType.String, "required": False, "read_only": True, "default": "", "depends_on" : None}, + # For string type: Indicates if this string setting is allowed to have empty value. This can only be used for string settings. + "allow_empty": {"type": DefinitionPropertyType.Function, "required": False, "read_only": True, "default": True, "depends_on": None}, + # For string type: Indicates that this string setting should be an UUID. This can only be used for string settings. + "is_uuid": {"type": DefinitionPropertyType.Function, "required": False, "read_only": True, "default": False, "depends_on": None}, + # For string type: If a non-empty string is provided, it will be used as a regex pattern to validate the value string. The value will be invalid if the value string matches the pattern. + "regex_blacklist_pattern": {"type": DefinitionPropertyType.String, "required": False, "read_only": True, "default": "", "depends_on": None}, + # For bool type: if the value is the same as the warning value, the setting will be in the warning state. + "warning_value": {"type": DefinitionPropertyType.Function, "required": False, "read_only": True, "default": None, "depends_on": None}, + # For bool type: if the value is the same as the error value, the setting will be in the error state. + "error_value": {"type": DefinitionPropertyType.Function, "required": False, "read_only": True, "default": None, "depends_on": None}, } # type: Dict[str, Dict[str, Any]] - ## Conversion from string to integer. - # - # \param value The string representation of an integer. - def _toIntConversion(value): - try: - return ast.literal_eval(value) - except SyntaxError: - return 0 - - ## Conversion of string to float. - def _toFloatConversion(value): - ## Ensure that all , are replaced with . (so they are seen as floats) - value = value.replace(",", ".") - - def stripLeading0(matchobj): - return matchobj.group(0).lstrip("0") - - ## Literal eval does not like "02" as a value, but users see this as "2". - ## We therefore look numbers with leading "0", provided they are not used in variable names - ## example: "test02 * 20" should not be changed, but "test * 02 * 20" should be changed (into "test * 2 * 20") - regex_pattern = '(? Any: Logger.log("d", "Setting Function: %s", value) return value -## Encapsulates Python code that provides a simple value calculation function. + +# +# This class is used to evaluate Python codes (or you can call them formulas) for a setting's property. If a setting's +# property is a static type, e.g., a string, an int, a float, etc., its value will just be interpreted as it is, but +# when it's a Python code (formula), the value needs to be evaluated via this class. # class SettingFunction: ## Constructor. # # \param code The Python code this function should evaluate. - def __init__(self, code: str) -> None: + def __init__(self, expression: str) -> None: super().__init__() - self._code = code + self._code = expression # Keys of all settings that are referenced to in this function. - self._used_keys = frozenset() # type: frozenset[str] - self._used_values = frozenset() + self._used_keys = frozenset() # type: FrozenSet[str] + self._used_values = frozenset() # type: FrozenSet[str] - self._compiled = None - self._valid = False # type: str + self._compiled = None # type: Optional[CodeType] #Actually an Optional['code'] object, but Python doesn't properly expose this 'code' object via any library. + self._valid = False # type: bool try: tree = ast.parse(self._code, "eval") @@ -84,17 +94,23 @@ g.update(context.context.get("override_operators", {})) try: - return eval(self._compiled, g, locals) + if self._compiled: + return eval(self._compiled, g, locals) + Logger.log("e", "An error ocurred evaluating the function {0}.".format(self)) + return 0 except Exception as e: - Logger.logException("d", "An exception occurred in inherit function %s", self) + Logger.logException("d", "An exception occurred in inherit function {0}: {1}".format(self, str(e))) return 0 # Settings may be used in calculations and they need a value - def __eq__(self, other) -> bool: + def __eq__(self, other: object) -> bool: if not isinstance(other, SettingFunction): return False return self._code == other._code + def __hash__(self) -> int: + return hash(self._code) + ## Returns whether the function is ready to be executed. # # \return True if the function is valid, or False if it's not. @@ -142,6 +158,7 @@ _VisitResult = NamedTuple("_VisitResult", [("values", Set[str]), ("keys", Set[str])]) + # Helper class used to analyze a parsed function. # # It walks a Python AST generated from a Python expression. It will analyze the AST and @@ -149,26 +166,34 @@ # setting keys (strings) that are used by the expression, whereas "used values" are # actual variable references that are needed for the function to be executed. class _SettingExpressionVisitor(ast.NodeVisitor): - def __init__(self): + def __init__(self) -> None: super().__init__() - self.values = set() - self.keys = set() + self.values = set() # type: Set[str] + self.keys = set() # type: Set[str] def visit(self, node: ast.AST) -> _VisitResult: super().visit(node) return _VisitResult(values = self.values, keys = self.keys) - def visit_Name(self, node: ast.AST) -> None: # [CodeStyle: ast.NodeVisitor requires this function name] + def visit_Name(self, node: ast.Name) -> None: # [CodeStyle: ast.NodeVisitor requires this function name] if node.id in self._blacklist: raise IllegalMethodError(node.id) - if node.id not in self._knownNames and node.id not in __builtins__: + if node.id not in self._knownNames and node.id not in dir(builtins): self.values.add(node.id) self.keys.add(node.id) + ## This one is used before Python 3.8 to visit string types. + # + # visit_Str will be marked as deprecated from Python 3.8 and onwards. def visit_Str(self, node: ast.AST) -> None: - if node.s not in self._knownNames and node.s not in __builtins__: - self.keys.add(node.s) + if node.s not in self._knownNames and node.s not in dir(builtins): # type: ignore #AST uses getattr stuff, so ignore type of node.s. + self.keys.add(node.s) # type: ignore + + ## This one is used on Python 3.8+ to visit string types. + def visit_Constant(self, node: ast.AST) -> None: + if isinstance(node.value, str) and node.value not in self._knownNames and node.value not in dir(builtins): # type: ignore #AST uses getattr stuff, so ignore type of node.value. + self.keys.add(node.value) # type: ignore _knownNames = { "math", @@ -176,8 +201,11 @@ "min", "debug", "sum", - "len" - } + "len", + "uuid", + "hashlib", + "base64" + } # type: Set[str] _blacklist = { "sys", @@ -187,4 +215,4 @@ "eval", "exec", "subprocess", - } + } # type: Set[str] diff -Nru uranium-3.3.0/UM/Settings/SettingInstance.py uranium-4.4.1/UM/Settings/SettingInstance.py --- uranium-3.3.0/UM/Settings/SettingInstance.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Settings/SettingInstance.py 2019-11-19 10:50:46.000000000 +0000 @@ -1,18 +1,18 @@ -# Copyright (c) 2017 Ultimaker B.V. +# Copyright (c) 2018 Ultimaker B.V. # Uranium is released under the terms of the LGPLv3 or higher. import copy #To implement deepcopy. import enum import os -from typing import Any, List, Set, Dict, Optional, Iterable +from typing import Any, cast, Dict, Iterable, List, Optional, Set, TYPE_CHECKING from UM.Settings.Interfaces import ContainerInterface from UM.Signal import Signal, signalemitter from UM.Logger import Logger from UM.Decorators import call_if_enabled +from UM.Settings.Validator import Validator #For typing. -MYPY = False -if MYPY: +if TYPE_CHECKING: from UM.Settings.SettingRelation import SettingRelation from UM.Settings.SettingRelation import RelationType from . import SettingFunction @@ -71,9 +71,6 @@ # \param definition The SettingDefinition object this is an instance of. # \param container The container of this instance. Needed for relation handling. def __init__(self, definition: SettingDefinition, container: ContainerInterface, *args: Any, **kwargs: Any) -> None: - if container is None: - raise ValueError("Cannot create a setting instance without a container") - super().__init__() self._definition = definition # type: SettingDefinition @@ -99,17 +96,18 @@ # not deep-copied but just taken over from the original, since they are # seen as back-links. Please set them correctly after deep-copying this # instance. - def __deepcopy__(self, memo): + def __deepcopy__(self, memo: Dict[int, Dict[str, Any]]) -> "SettingInstance": result = SettingInstance(self._definition, self._container) result._visible = self._visible - result._validator = copy.deepcopy(self._validator, memo) + result._validator = copy.deepcopy(self._validator, memo) #type: ignore #I give up trying to get the type of deepcopy argument 1 right. result._state = self._state result.__property_values = copy.deepcopy(self.__property_values, memo) return result - def __eq__(self, other: Any) -> bool: + def __eq__(self, other: object) -> bool: if type(self) != type(other): return False # Type mismatch + other = cast(SettingInstance, other) for property_name in self.__property_values: try: @@ -117,9 +115,14 @@ return False # Property values don't match except AttributeError: return False # Other does not have the property + + # Check if the other has properties that self doesn't have. + for property_name in other.getPropertyNames(): + if property_name not in self.__property_values: + return False return True - def __ne__(self, other: Any) -> bool: + def __ne__(self, other: object) -> bool: return not (self == other) def __getattr__(self, name: str) -> Any: @@ -141,7 +144,7 @@ raise AttributeError("'SettingInstance' object has no attribute '{0}'".format(name)) @call_if_enabled(_traceSetProperty, _isTraceEnabled()) - def setProperty(self, name: str, value: Any, container: ContainerInterface = None): + def setProperty(self, name: str, value: Any, container: Optional[ContainerInterface] = None, emit_signals: bool = True) -> None: if SettingDefinition.hasProperty(name): if SettingDefinition.isReadOnlyProperty(name): Logger.log("e", "Tried to set property %s which is a read-only property", name) @@ -158,41 +161,30 @@ ## If state changed, emit the signal if self._state != InstanceState.User: self._state = InstanceState.User - self.propertyChanged.emit(self._definition.key, "state") + if emit_signals: + self.propertyChanged.emit(self._definition.key, "state") - self.updateRelations(container) + self.updateRelations(container, emit_signals = emit_signals) - if self._validator: + if self._validator and emit_signals: self.propertyChanged.emit(self._definition.key, "validationState") - self.propertyChanged.emit(self._definition.key, name) + if emit_signals: + self.propertyChanged.emit(self._definition.key, name) for property_name in self._definition.getPropertyNames(): if self._definition.dependsOnProperty(property_name) == name: - self.propertyChanged.emit(self._definition.key, property_name) + if emit_signals: + self.propertyChanged.emit(self._definition.key, property_name) else: if name == "state": if value == "InstanceState.Calculated": if self._state != InstanceState.Calculated: self._state = InstanceState.Calculated - self.propertyChanged.emit(self._definition.key, "state") + if emit_signals: + self.propertyChanged.emit(self._definition.key, "state") else: raise AttributeError("No property {0} defined".format(name)) - @call_if_enabled(_traceUpdateProperty, _isTraceEnabled()) - def updateProperty(self, name: str, container: Optional[ContainerInterface] = None): - if not SettingDefinition.hasProperty(name): - Logger.log("e", "Trying to update unknown property %s", name) - return - - if name == "value" and self._state == InstanceState.User: - Logger.log("d", "Ignoring update of value for setting %s since it has been set by the user.", self._definition.key) - return - - if self._validator: - self.propertyChanged.emit(self._definition.key, "validationState") - - self.propertyChanged.emit(self._definition.key, name) - ## Emitted whenever a property of this instance changes. # # \param instance The instance that reported the property change (usually self). @@ -211,11 +203,8 @@ ## Get the state of validation of this instance. @property - def validationState(self): - if self._validator: - return self._validator - - return None + def validationState(self) -> Optional[Validator]: + return self._validator @property def state(self) -> InstanceState: @@ -229,7 +218,7 @@ ## protected: @call_if_enabled(_traceRelations, _isTraceEnabled()) - def updateRelations(self, container: ContainerInterface) -> None: + def updateRelations(self, container: ContainerInterface, emit_signals: bool = True) -> None: property_names = SettingDefinition.getPropertyNames() property_names.remove("value") # Move "value" to the front of the list so we always update that first. property_names.insert(0, "value") @@ -243,17 +232,18 @@ # TODO: We should send this as a single change event instead of several of them. # That would increase performance by reducing the amount of updates. - for relation in changed_relations: - container.propertyChanged.emit(relation.target.key, relation.role) - # If the value/minimum value/etc state is updated, the validation state must be re-evaluated - if relation.role in {"value", "minimum_value", "maximum_value", "minimum_value_warning", "maximum_value_warning"}: - container.propertyChanged.emit(relation.target.key, "validationState") + if emit_signals: + for relation in changed_relations: + container.propertyChanged.emit(relation.target.key, relation.role) + # If the value/minimum value/etc state is updated, the validation state must be re-evaluated + if relation.role in {"value", "minimum_value", "maximum_value", "minimum_value_warning", "maximum_value_warning"}: + container.propertyChanged.emit(relation.target.key, "validationState") ## Recursive function to put all settings that require eachother for changes of a property value in a list # \param relations_set \type{set} Set of keys (strings) of settings that are influenced # \param relations list of relation objects that need to be checked. # \param role name of the property value of the settings - def _addRelations(self, relations_set: Set["SettingRelation"], relations: List["SettingRelation"], role: str): + def _addRelations(self, relations_set: Set["SettingRelation"], relations: List["SettingRelation"], role: str) -> None: for relation in filter(lambda r: r.role == role, relations): if relation.type == RelationType.RequiresTarget: continue diff -Nru uranium-3.3.0/UM/Settings/SettingRelation.py uranium-4.4.1/UM/Settings/SettingRelation.py --- uranium-3.3.0/UM/Settings/SettingRelation.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Settings/SettingRelation.py 2019-11-19 10:50:46.000000000 +0000 @@ -5,11 +5,13 @@ from UM.Settings.SettingDefinition import SettingDefinition + ## The type of relation, i.e. what direction does this relation have. class RelationType(enum.IntEnum): RequiresTarget = 1 # The relation represents that the owner requires the target. RequiredByTarget = 2 # The relation represents that the target requires the owner. + ## A representation of a relationship between two settings. # # This is a simple class representing a relationship between two settings. diff -Nru uranium-3.3.0/UM/Settings/Validator.py uranium-4.4.1/UM/Settings/Validator.py --- uranium-3.3.0/UM/Settings/Validator.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Settings/Validator.py 2019-11-19 10:50:46.000000000 +0000 @@ -2,27 +2,28 @@ # Uranium is released under the terms of the LGPLv3 or higher. from enum import Enum -from typing import Any, Optional +import re +from typing import Optional +import uuid from UM.Settings.Interfaces import ContainerInterface from UM.Settings.PropertyEvaluationContext import PropertyEvaluationContext from UM.Logger import Logger -MYPY = False -if MYPY: - from UM.Settings.SettingInstance import SettingInstance - from . import SettingFunction + class ValidatorState(Enum): Exception = "Exception" Unknown = "Unknown" Valid = "Valid" + Invalid = "Invalid" MinimumError = "MinimumError" MinimumWarning = "MinimumWarning" MaximumError = "MaximumError" MaximumWarning = "MaximumWarning" + ## Validates that a SettingInstance's value is within a certain minimum and maximum value. # # This class performs validation of any value that has __lt__ and __gt__ implemented, but @@ -40,16 +41,23 @@ self._key = key # type: str ## Perform the actual validation. - def __call__(self, value_provider: ContainerInterface, context: Optional[PropertyEvaluationContext] = None) -> Any: + def __call__(self, value_provider: ContainerInterface, context: Optional[PropertyEvaluationContext] = None) -> Optional[ValidatorState]: if not value_provider: - return + return None state = ValidatorState.Unknown try: - minimum = value_provider.getProperty(self._key, "minimum_value") - maximum = value_provider.getProperty(self._key, "maximum_value") - minimum_warning = value_provider.getProperty(self._key, "minimum_value_warning") - maximum_warning = value_provider.getProperty(self._key, "maximum_value_warning") + allow_empty = value_provider.getProperty(self._key, "allow_empty", context = context) # For string only + is_uuid = value_provider.getProperty(self._key, "is_uuid", context = context) # For string only + regex_blacklist_pattern = value_provider.getProperty(self._key, "regex_blacklist_pattern", context = context) # For string only + minimum = value_provider.getProperty(self._key, "minimum_value", context = context) + maximum = value_provider.getProperty(self._key, "maximum_value", context = context) + minimum_warning = value_provider.getProperty(self._key, "minimum_value_warning", context = context) + maximum_warning = value_provider.getProperty(self._key, "maximum_value_warning", context = context) + + # For boolean + boolean_warning_value = value_provider.getProperty(self._key, "warning_value", context = context) + boolean_error_value = value_provider.getProperty(self._key, "error_value", context = context) if minimum is not None and maximum is not None and minimum > maximum: raise ValueError("Cannot validate a state of setting {0} with minimum > maximum".format(self._key)) @@ -57,11 +65,47 @@ if context is not None: value_provider = context.rootStack() - value = value_provider.getProperty(self._key, "value") + value = value_provider.getProperty(self._key, "value", context = context) if value is None or value != value: raise ValueError("Cannot validate None, NaN or similar values in setting {0}, actual value: {1}".format(self._key, value)) - if minimum is not None and value < minimum: + setting_type = value_provider.getProperty(self._key, "type", context = context) + + if setting_type == "str": + # "allow_empty is not None" is not necessary here because of "allow_empty is False", but it states + # explicitly that we should not do this check when "allow_empty is None". + if allow_empty is not None and allow_empty is False and str(value) == "": + state = ValidatorState.Invalid + return state + + if is_uuid is not None and is_uuid is True: + # Try to parse the UUID string with uuid.UUID(). It will raise a ValueError if it's not valid. + try: + uuid.UUID(str(value)) + state = ValidatorState.Valid + except ValueError: + state = ValidatorState.Invalid + return state + + # If "regex_blacklist_pattern" is set, it will be used to validate the value string. If the value string + # matches the blacklist pattern, the value will be invalid. + if regex_blacklist_pattern is not None and len(regex_blacklist_pattern) > 0: + regex = re.compile(regex_blacklist_pattern) + is_valid = regex.fullmatch(str(value).lower()) is None + state = ValidatorState.Valid if is_valid else ValidatorState.Invalid + return state + + state = ValidatorState.Valid + return state + + elif setting_type == "bool": + state = ValidatorState.Valid + if boolean_warning_value is not None and value == boolean_warning_value: + state = ValidatorState.MaximumWarning + elif boolean_error_value is not None and value == boolean_error_value: + state = ValidatorState.MaximumError + + elif minimum is not None and value < minimum: state = ValidatorState.MinimumError elif maximum is not None and value > maximum: state = ValidatorState.MaximumError diff -Nru uranium-3.3.0/UM/Signal.py uranium-4.4.1/UM/Signal.py --- uranium-3.3.0/UM/Signal.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Signal.py 2019-11-19 10:50:46.000000000 +0000 @@ -17,7 +17,7 @@ import functools from UM.Event import CallFunctionEvent -from UM.Decorators import deprecated, call_if_enabled +from UM.Decorators import call_if_enabled from UM.Logger import Logger from UM.Platform import Platform from UM import FlameProfiler @@ -142,8 +142,8 @@ self.__type = type self._postpone_emit = False - self._postpone_thread = None # type: threading.Thread - self._compress_postpone = False + self._postpone_thread = None # type: Optional[threading.Thread] + self._compress_postpone = False # type: bool self._postponed_emits = None # type: Any if _recordSignalNames(): @@ -292,7 +292,7 @@ # set by the Application instance. _app = None # type: Application - _signalQueue = None # type: SignalQueue + _signalQueue = None # type: Application # Private implementation of the actual emit. # This is done to make it possible to freely push function events without needing to maintain state. @@ -341,8 +341,9 @@ # return "Signal<{}> {{ __functions={{ {} }}, __methods={{ {} }}, __signals={{ {} }} }}".format(id(self), function_str, method_str, signal_str) -def strMethodSet(method_set): - return "{" + ", ".join([str(m) for m in method_set]) + "}" +#def strMethodSet(method_set): +# return "{" + ", ".join([str(m) for m in method_set]) + "}" + class CompressTechnique(enum.Enum): NoCompression = 0 @@ -400,25 +401,6 @@ signal._compress_postpone = False -## Convenience class to simplify signal creation. -# -# This class is a Convenience class to simplify signal creation. Since signals -# need to be instance variables, normally you would need to create all signals -# in the class" `__init__` method. However, this makes them rather awkward to -# document. This class instead makes it possible to declare them as class variables, -# which makes documenting them near the function they are used possible. -# During the call to `__init__()`, this class will then search through all the -# properties of the instance and create instance variables for each class variable -# that is an instance of Signal. -class SignalEmitter: - ## Initialize method. - @deprecated("Please use the new @signalemitter decorator", "2.2") - def __init__(self, **kwargs): - super().__init__() - for name, signal in inspect.getmembers(self, lambda i: isinstance(i, Signal)): - setattr(self, name, Signal(type = signal.getType())) #pylint: disable=bad-whitespace - - ## Class decorator that ensures a class has unique instances of signals. # # Since signals need to be instance variables, normally you would need to create all @@ -449,6 +431,7 @@ cls.__new__ = new_new return cls + T = TypeVar('T') @@ -576,4 +559,4 @@ left = pair[0]() right = pair[1]() - return (left, right) + return left, right diff -Nru uranium-3.3.0/UM/SortedList.py uranium-4.4.1/UM/SortedList.py --- uranium-3.3.0/UM/SortedList.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/SortedList.py 2019-11-19 10:50:46.000000000 +0000 @@ -1,170 +1,380 @@ -# Copyright 2014 Grant Jenks -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# Copied from https://github.com/grantjenks/sorted_containers -# -# -*- coding: utf-8 -*- -# -# Sorted list implementation. +"""Sorted List +============== + +:doc:`Sorted Containers` is an Apache2 licensed Python sorted +collections library, written in pure-Python, and fast as C-extensions. The +:doc:`introduction` is the best way to get started. + +Sorted list implementations: + +.. currentmodule:: sortedcontainers + +* :class:`SortedList` +* :class:`SortedKeyList` + +""" +# pylint: disable=too-many-lines +from __future__ import print_function from bisect import bisect_left, bisect_right, insort from itertools import chain, repeat, starmap -from collections import Sequence, MutableSequence -import operator as op -from operator import iadd, add -from functools import wraps from math import log +from operator import add, eq, ne, gt, ge, lt, le, iadd +from textwrap import dedent + +from typing import Any, Callable + + +############################################################################### +# BEGIN Python 2/3 Shims +############################################################################### -from functools import reduce try: - from _thread import get_ident + from collections.abc import Sequence, MutableSequence except ImportError: - from _dummy_thread import get_ident + from collections import Sequence, MutableSequence + +from functools import wraps +from sys import hexversion + +if hexversion < 0x03000000: + from itertools import imap as map # type: ignore + from itertools import izip as zip # type: ignore + try: + from thread import get_ident + except ImportError: + from dummy_thread import get_ident +else: + from functools import reduce + try: + from _thread import get_ident + except ImportError: + from _dummy_thread import get_ident + + +def _make_cmp(seq_op: Callable[[Any, Any], bool], symbol: str, doc: str) -> Callable: + "Make comparator method." + def comparer(one: "SortedList", other: "SortedList") -> bool: + "Compare method for sorted list and sequence." + if not isinstance(other, Sequence): + return NotImplemented -def recursive_repr(func): - """Decorator to prevent infinite repr recursion.""" - repr_running = set() + one_len = one._len + len_other = len(other) - @wraps(func) - def wrapper(self): - key = id(self), get_ident() + if one_len != len_other: + if seq_op is eq: + return False + if seq_op is ne: + return True - if key in repr_running: - return '...' + for alpha, beta in zip(one, other): + if alpha != beta: + return seq_op(alpha, beta) - repr_running.add(key) + return seq_op(one_len, len_other) - try: - return func(self) - finally: - repr_running.discard(key) + seq_op_name = seq_op.__name__ + comparer.__name__ = '__{0}__'.format(seq_op_name) + doc_str = """Return true if and only if sorted list is {0} `other`. - return wrapper + ``sl.__{1}__(other)`` <==> ``sl {2} other`` + Comparisons use lexicographical order as with sequences. + + Runtime complexity: `O(n)` + + :param other: `other` sequence + :return: true if sorted list is {0} `other` -class SortedList(MutableSequence): """ - SortedList provides most of the same methods as a list but keeps the items - in sorted order. + comparer.__doc__ = dedent(doc_str.format(doc, seq_op_name, symbol)) + return comparer + + +def recursive_repr(fillvalue='...'): + "Decorator to make a repr function return fillvalue for a recursive call." + # pylint: disable=missing-docstring + # Copied from reprlib in Python 3 + # https://hg.python.org/cpython/file/3.6/Lib/reprlib.py + + def decorating_function(user_function): + repr_running = set() + + @wraps(user_function) + def wrapper(self): + key = id(self), get_ident() + if key in repr_running: + return fillvalue + repr_running.add(key) + try: + result = user_function(self) + finally: + repr_running.discard(key) + return result + + return wrapper + + return decorating_function + +############################################################################### +# END Python 2/3 Shims +############################################################################### + + +class SortedList(MutableSequence): + """Sorted list is a sorted mutable sequence. + + Sorted list values are maintained in sorted order. + + Sorted list values must be comparable. The total ordering of values must + not change while they are stored in the sorted list. + + Methods for adding values: + + * :func:`SortedList.add` + * :func:`SortedList.update` + * :func:`SortedList.__add__` + * :func:`SortedList.__iadd__` + * :func:`SortedList.__mul__` + * :func:`SortedList.__imul__` + + Methods for removing values: + + * :func:`SortedList.clear` + * :func:`SortedList.discard` + * :func:`SortedList.remove` + * :func:`SortedList.pop` + * :func:`SortedList.__delitem__` + + Methods for looking up values: + + * :func:`SortedList.bisect_left` + * :func:`SortedList.bisect_right` + * :func:`SortedList.count` + * :func:`SortedList.index` + * :func:`SortedList.__contains__` + * :func:`SortedList.__getitem__` + + Methods for iterating values: + + * :func:`SortedList.irange` + * :func:`SortedList.islice` + * :func:`SortedList.__iter__` + * :func:`SortedList.__reversed__` + + Methods for miscellany: + + * :func:`SortedList.copy` + * :func:`SortedList.__len__` + * :func:`SortedList.__repr__` + * :func:`SortedList._check` + * :func:`SortedList._reset` + + Sorted lists use lexicographical ordering semantics when compared to other + sequences. + + Some methods of mutable sequences are not supported and will raise + not-implemented error. + """ + DEFAULT_LOAD_FACTOR = 1000 - def __init__(self, iterable=None, load=1000): - """ - SortedList provides most of the same methods as a list but keeps the - items in sorted order. - An optional *iterable* provides an initial series of items to populate - the SortedList. + def __init__(self, iterable=None, key=None): + """Initialize sorted list instance. + + Optional `iterable` argument provides an initial iterable of values to + initialize the sorted list. + + Runtime complexity: `O(n*log(n))` + + >>> sl = SortedList() + >>> sl + SortedList([]) + >>> sl = SortedList([3, 1, 2, 5, 4]) + >>> sl + SortedList([1, 2, 3, 4, 5]) + + :param iterable: initial values (optional) - An optional *load* specifies the load-factor of the list. The default - load factor of '1000' works well for lists from tens to tens of millions - of elements. Good practice is to use a value that is the cube root of - the list size. With billions of elements, the best load factor depends - on your usage. It's best to leave the load factor at the default until - you start benchmarking. """ - self._len, self._maxes, self._lists, self._index = 0, [], [], [] - self._load, self._twice, self._half = load, load * 2, load >> 1 + assert key is None + self._len = 0 + self._load = self.DEFAULT_LOAD_FACTOR + self._lists = [] + self._maxes = [] + self._index = [] self._offset = 0 if iterable is not None: self._update(iterable) - def __new__(cls, iterable=None, key=None, load=1000): - """ - SortedList provides most of the same methods as a list but keeps the - items in sorted order. - An optional *iterable* provides an initial series of items to populate - the SortedList. + def __new__(cls, iterable=None, key=None): + """Create new sorted list or sorted-key list instance. + + Optional `key`-function argument will return an instance of subtype + :class:`SortedKeyList`. + + >>> sl = SortedList() + >>> isinstance(sl, SortedList) + True + >>> sl = SortedList(key=lambda x: -x) + >>> isinstance(sl, SortedList) + True + >>> isinstance(sl, SortedKeyList) + True + + :param iterable: initial values (optional) + :param key: function used to extract comparison key (optional) + :return: sorted list or sorted-key list instance - An optional *key* argument will return an instance of subtype - SortedListWithKey. - - An optional *load* specifies the load-factor of the list. The default - load factor of '1000' works well for lists from tens to tens of millions - of elements. Good practice is to use a value that is the cube root of - the list size. With billions of elements, the best load factor depends - on your usage. It's best to leave the load factor at the default until - you start benchmarking. """ + # pylint: disable=unused-argument if key is None: return object.__new__(cls) else: if cls is SortedList: - return SortedListWithKey(iterable=iterable, key=key, load=load) + return object.__new__(SortedKeyList) else: - raise TypeError('inherit SortedListWithKey for key argument') + raise TypeError('inherit SortedKeyList for key argument') + + + @property + def key(self): # pylint: disable=useless-return + """Function used to extract comparison key from values. + + Sorted list compares values directly so the key function is none. + + """ + return None + + + def _reset(self, load): + """Reset sorted list load factor. + + The `load` specifies the load-factor of the list. The default load + factor of 1000 works well for lists from tens to tens-of-millions of + values. Good practice is to use a value that is the cube root of the + list size. With billions of elements, the best load factor depends on + your usage. It's best to leave the load factor at the default until you + start benchmarking. + + See :doc:`implementation` and :doc:`performance-scale` for more + information. + + Runtime complexity: `O(n)` + + :param int load: load-factor for sorted list sublists + + """ + values = reduce(iadd, self._lists, []) + self._clear() + self._load = load + self._update(values) + def clear(self): - """Remove all the elements from the list.""" + """Remove all values from sorted list. + + Runtime complexity: `O(n)` + + """ self._len = 0 - del self._maxes[:] del self._lists[:] + del self._maxes[:] del self._index[:] + self._offset = 0 _clear = clear - def add(self, val): - """Add the element *val* to the list.""" - _maxes, _lists = self._maxes, self._lists + + def add(self, value): + """Add `value` to sorted list. + + Runtime complexity: `O(log(n))` -- approximate. + + >>> sl = SortedList() + >>> sl.add(3) + >>> sl.add(1) + >>> sl.add(2) + >>> sl + SortedList([1, 2, 3]) + + :param value: value to add to sorted list + + """ + _lists = self._lists + _maxes = self._maxes if _maxes: - pos = bisect_right(_maxes, val) + pos = bisect_right(_maxes, value) if pos == len(_maxes): pos -= 1 - _maxes[pos] = val - _lists[pos].append(val) + _lists[pos].append(value) + _maxes[pos] = value else: - insort(_lists[pos], val) + insort(_lists[pos], value) self._expand(pos) else: - _maxes.append(val) - _lists.append([val]) + _lists.append([value]) + _maxes.append(value) self._len += 1 + def _expand(self, pos): - """Splits sublists that are more than double the load level. + """Split sublists with length greater than double the load-factor. Updates the index when the sublist length is less than double the load - level. This requires incrementing the nodes in a traversal from the leaf - node to the root. For an example traversal see self._loc. + level. This requires incrementing the nodes in a traversal from the + leaf node to the root. For an example traversal see + ``SortedList._loc``. + """ - _lists, _index = self._lists, self._index + _load = self._load + _lists = self._lists + _index = self._index + + if len(_lists[pos]) > (_load << 1): + _maxes = self._maxes + + _lists_pos = _lists[pos] + half = _lists_pos[_load:] + del _lists_pos[_load:] + _maxes[pos] = _lists_pos[-1] - if len(_lists[pos]) > self._twice: - _maxes, _load = self._maxes, self._load - half = _lists[pos][_load:] - del _lists[pos][_load:] - _maxes[pos] = _lists[pos][-1] - _maxes.insert(pos + 1, half[-1]) _lists.insert(pos + 1, half) + _maxes.insert(pos + 1, half[-1]) + del _index[:] else: if _index: child = self._offset + pos - while child > 0: + while child: _index[child] += 1 child = (child - 1) >> 1 _index[0] += 1 + def update(self, iterable): - """Update the list by adding all elements from *iterable*.""" - _maxes, _lists = self._maxes, self._lists + """Update sorted list by adding all values from `iterable`. + + Runtime complexity: `O(k*log(n))` -- approximate. + + >>> sl = SortedList() + >>> sl.update([3, 1, 2]) + >>> sl + SortedList([1, 2, 3]) + + :param iterable: iterable of values to add + + """ + _lists = self._lists + _maxes = self._maxes values = sorted(iterable) if _maxes: @@ -178,96 +388,146 @@ _add(val) return - _load, _index = self._load, self._index + _load = self._load _lists.extend(values[pos:(pos + _load)] for pos in range(0, len(values), _load)) _maxes.extend(sublist[-1] for sublist in _lists) self._len = len(values) - del _index[:] + del self._index[:] _update = update - def __contains__(self, val): - """Return True if and only if *val* is an element in the list.""" + + def __contains__(self, value): + """Return true if `value` is an element of the sorted list. + + ``sl.__contains__(value)`` <==> ``value in sl`` + + Runtime complexity: `O(log(n))` + + >>> sl = SortedList([1, 2, 3, 4, 5]) + >>> 3 in sl + True + + :param value: search for value in sorted list + :return: true if `value` in sorted list + + """ _maxes = self._maxes if not _maxes: return False - pos = bisect_left(_maxes, val) + pos = bisect_left(_maxes, value) if pos == len(_maxes): return False _lists = self._lists - idx = bisect_left(_lists[pos], val) - return _lists[pos][idx] == val + idx = bisect_left(_lists[pos], value) - def discard(self, val): - """ - Remove the first occurrence of *val*. + return _lists[pos][idx] == value + + + def discard(self, value): + """Remove `value` from sorted list if it is a member. + + If `value` is not a member, do nothing. + + Runtime complexity: `O(log(n))` -- approximate. + + >>> sl = SortedList([1, 2, 3, 4, 5]) + >>> sl.discard(5) + >>> sl.discard(0) + >>> sl == [1, 2, 3, 4] + True + + :param value: `value` to discard from sorted list - If *val* is not a member, does nothing. """ _maxes = self._maxes if not _maxes: return - pos = bisect_left(_maxes, val) + pos = bisect_left(_maxes, value) if pos == len(_maxes): return _lists = self._lists - idx = bisect_left(_lists[pos], val) - if _lists[pos][idx] == val: + idx = bisect_left(_lists[pos], value) + + if _lists[pos][idx] == value: self._delete(pos, idx) - def remove(self, val): - """ - Remove first occurrence of *val*. - Raises ValueError if *val* is not present. + def remove(self, value): + """Remove `value` from sorted list; `value` must be a member. + + If `value` is not a member, raise ValueError. + + Runtime complexity: `O(log(n))` -- approximate. + + >>> sl = SortedList([1, 2, 3, 4, 5]) + >>> sl.remove(5) + >>> sl == [1, 2, 3, 4] + True + >>> sl.remove(0) + Traceback (most recent call last): + ... + ValueError: 0 not in list + + :param value: `value` to remove from sorted list + :raises ValueError: if `value` is not in sorted list + """ _maxes = self._maxes if not _maxes: - raise ValueError('{0} not in list'.format(repr(val))) + raise ValueError('{0!r} not in list'.format(value)) - pos = bisect_left(_maxes, val) + pos = bisect_left(_maxes, value) if pos == len(_maxes): - raise ValueError('{0} not in list'.format(repr(val))) + raise ValueError('{0!r} not in list'.format(value)) _lists = self._lists - idx = bisect_left(_lists[pos], val) - if _lists[pos][idx] == val: + idx = bisect_left(_lists[pos], value) + + if _lists[pos][idx] == value: self._delete(pos, idx) else: - raise ValueError('{0} not in list'.format(repr(val))) + raise ValueError('{0!r} not in list'.format(value)) + def _delete(self, pos, idx): - """Delete the item at the given (pos, idx). + """Delete value at the given `(pos, idx)`. Combines lists that are less than half the load level. Updates the index when the sublist length is more than half the load - level. This requires decrementing the nodes in a traversal from the leaf - node to the root. For an example traversal see self._loc. + level. This requires decrementing the nodes in a traversal from the + leaf node to the root. For an example traversal see + ``SortedList._loc``. + + :param int pos: lists index + :param int idx: sublist index + """ - _maxes, _lists, _index = self._maxes, self._lists, self._index + _lists = self._lists + _maxes = self._maxes + _index = self._index - lists_pos = _lists[pos] + _lists_pos = _lists[pos] - del lists_pos[idx] + del _lists_pos[idx] self._len -= 1 - len_lists_pos = len(lists_pos) - - if len_lists_pos > self._half: + len_lists_pos = len(_lists_pos) - _maxes[pos] = lists_pos[-1] + if len_lists_pos > (self._load >> 1): + _maxes[pos] = _lists_pos[-1] if _index: child = self._offset + pos @@ -275,9 +535,7 @@ _index[child] -= 1 child = (child - 1) >> 1 _index[0] -= 1 - elif len(_lists) > 1: - if not pos: pos += 1 @@ -285,31 +543,29 @@ _lists[prev].extend(_lists[pos]) _maxes[prev] = _lists[prev][-1] - del _maxes[pos] del _lists[pos] + del _maxes[pos] del _index[:] self._expand(prev) - elif len_lists_pos: - - _maxes[pos] = lists_pos[-1] - + _maxes[pos] = _lists_pos[-1] else: - - del _maxes[pos] del _lists[pos] + del _maxes[pos] del _index[:] + def _loc(self, pos, idx): - """Convert an index pair (alpha, beta) into a single index that corresponds to - the position of the value in the sorted list. + """Convert an index pair (lists index, sublist index) into a single + index number that corresponds to the position of the value in the + sorted list. - Most queries require the index be built. Details of the index are - described in self._build_index. + Many queries require the index be built. Details of the index are + described in ``SortedList._build_index``. Indexing requires traversing the tree from a leaf node to the root. The - parent of each node is easily computable at (pos - 1) // 2. + parent of each node is easily computable at ``(pos - 1) // 2``. Left-child nodes are always at odd indices and right-child nodes are always at even indices. @@ -319,19 +575,19 @@ The final index is the sum from traversal and the index in the sublist. - For example, using the index from self._build_index: + For example, using the index from ``SortedList._build_index``:: - _index = 14 5 9 3 2 4 5 - _offset = 3 + _index = 14 5 9 3 2 4 5 + _offset = 3 - Tree: + Tree:: 14 5 9 3 2 4 5 - Converting index pair (2, 3) into a single index involves iterating like - so: + Converting an index pair (2, 3) into a single index involves iterating + like so: 1. Starting at the leaf node: offset + alpha = 3 + 2 = 5. We identify the node as a left-child node. At such nodes, we simply traverse to @@ -343,14 +599,19 @@ 3. Iteration ends at the root. - Computing the index is the sum of the total and beta: 5 + 3 = 8. + The index is then the sum of the total and sublist index: 5 + 3 = 8. + + :param int pos: lists index + :param int idx: sublist index + :return: index in sorted list + """ if not pos: return idx _index = self._index - if not len(_index): + if not _index: self._build_index() total = 0 @@ -366,7 +627,7 @@ # Right-child nodes are at odd indices. At such indices # account the total below the left child node. - if not (pos & 1): + if not pos & 1: total += _index[pos - 1] # Advance pos to the parent node. @@ -375,16 +636,18 @@ return total + idx + def _pos(self, idx): - """Convert an index into a pair (alpha, beta) that can be used to access - the corresponding _lists[alpha][beta] position. + """Convert an index into an index pair (lists index, sublist index) + that can be used to access the corresponding lists position. - Most queries require the index be built. Details of the index are - described in self._build_index. + Many queries require the index be built. Details of the index are + described in ``SortedList._build_index``. - Indexing requires traversing the tree to a leaf node. Each node has - two children which are easily computable. Given an index, pos, the - left-child is at pos * 2 + 1 and the right-child is at pos * 2 + 2. + Indexing requires traversing the tree to a leaf node. Each node has two + children which are easily computable. Given an index, pos, the + left-child is at ``pos * 2 + 1`` and the right-child is at ``pos * 2 + + 2``. When the index is less than the left-child, traversal moves to the left sub-tree. Otherwise, the index is decremented by the left-child @@ -394,12 +657,12 @@ position of the child node as compared with the offset and the remaining index. - For example, using the index from self._build_index: + For example, using the index from ``SortedList._build_index``:: - _index = 14 5 9 3 2 4 5 - _offset = 3 + _index = 14 5 9 3 2 4 5 + _offset = 3 - Tree: + Tree:: 14 5 9 @@ -424,12 +687,19 @@ The final index pair from our example is (2, 3) which corresponds to index 8 in the sorted list. + + :param int idx: index in sorted list + :return: (lists index, sublist index) pair + """ if idx < 0: last_len = len(self._lists[-1]) + if (-idx) <= last_len: return len(self._lists) - 1, last_len + idx + idx += self._len + if idx < 0: raise IndexError('list index out of range') elif idx >= self._len: @@ -460,39 +730,42 @@ return (pos - self._offset, idx) + def _build_index(self): - """Build an index for indexing the sorted list. + """Build a positional index for indexing the sorted list. Indexes are represented as binary trees in a dense array notation similar to a binary heap. - For example, given a _lists representation storing integers: + For example, given a lists representation storing integers:: - [0]: 1 2 3 - [1]: 4 5 - [2]: 6 7 8 9 - [3]: 10 11 12 13 14 + 0: [1, 2, 3] + 1: [4, 5] + 2: [6, 7, 8, 9] + 3: [10, 11, 12, 13, 14] The first transformation maps the sub-lists by their length. The - first row of the index is the length of the sub-lists. + first row of the index is the length of the sub-lists:: - [0]: 3 2 4 5 + 0: [3, 2, 4, 5] - Each row after that is the sum of consecutive pairs of the previous row: + Each row after that is the sum of consecutive pairs of the previous + row:: - [1]: 5 9 - [2]: 14 + 1: [5, 9] + 2: [14] - Finally, the index is built by concatenating these lists together: + Finally, the index is built by concatenating these lists together:: - _index = 14 5 9 3 2 4 5 + _index = [14, 5, 9, 3, 2, 4, 5] - An offset storing the start of the first row is also stored: + An offset storing the start of the first row is also stored:: - _offset = 3 + _offset = 3 When built, the index can be used for efficient indexing into the list. - See the comment and notes on self._pos for details. + See the comment and notes on ``SortedList._pos`` for details. + """ row0 = list(map(len, self._lists)) @@ -526,10 +799,30 @@ reduce(iadd, reversed(tree), self._index) self._offset = size * 2 - 1 - def __delitem__(self, idx): - """Remove the element at *idx*. Supports slicing.""" - if isinstance(idx, slice): - start, stop, step = idx.indices(self._len) + + def __delitem__(self, index): + """Remove value at `index` from sorted list. + + ``sl.__delitem__(index)`` <==> ``del sl[index]`` + + Supports slicing. + + Runtime complexity: `O(log(n))` -- approximate. + + >>> sl = SortedList('abcde') + >>> del sl[2] + >>> sl + SortedList(['a', 'b', 'd', 'e']) + >>> del sl[:2] + >>> sl + SortedList(['d', 'e']) + + :param index: integer or slice for indexing + :raises IndexError: if index out of range + + """ + if isinstance(index, slice): + start, stop, step = index.indices(self._len) if step == 1 and start < stop: if start == 0 and stop == self._len: @@ -555,17 +848,36 @@ pos, idx = _pos(index) _delete(pos, idx) else: - pos, idx = self._pos(idx) + pos, idx = self._pos(index) self._delete(pos, idx) - _delitem = __delitem__ - def __getitem__(self, idx): - """Return the element at *idx*. Supports slicing.""" + def __getitem__(self, index): + """Lookup value at `index` in sorted list. + + ``sl.__getitem__(index)`` <==> ``sl[index]`` + + Supports slicing. + + Runtime complexity: `O(log(n))` -- approximate. + + >>> sl = SortedList('abcde') + >>> sl[1] + 'b' + >>> sl[-1] + 'e' + >>> sl[2:5] + ['c', 'd', 'e'] + + :param index: integer or slice for indexing + :return: value or list of values + :raises IndexError: if index out of range + + """ _lists = self._lists - if isinstance(idx, slice): - start, stop, step = idx.indices(self._len) + if isinstance(index, slice): + start, stop, step = index.indices(self._len) if step == 1 and start < stop: if start == 0 and stop == self._len: @@ -602,211 +914,111 @@ return list(self._getitem(index) for index in indices) else: if self._len: - if idx == 0: + if index == 0: return _lists[0][0] - elif idx == -1: + elif index == -1: return _lists[-1][-1] else: raise IndexError('list index out of range') - if 0 <= idx < len(_lists[0]): - return _lists[0][idx] + if 0 <= index < len(_lists[0]): + return _lists[0][index] len_last = len(_lists[-1]) - if -len_last < idx < 0: - return _lists[-1][len_last + idx] + if -len_last < index < 0: + return _lists[-1][len_last + index] - pos, idx = self._pos(idx) + pos, idx = self._pos(index) return _lists[pos][idx] _getitem = __getitem__ - def _check_order(self, idx, val): - _lists, _len = self._lists, self._len - - pos, loc = self._pos(idx) - - if idx < 0: - idx += _len - - # Check that the inserted value is not less than the - # previous value. - - if idx > 0: - idx_prev = loc - 1 - pos_prev = pos - - if idx_prev < 0: - pos_prev -= 1 - idx_prev = len(_lists[pos_prev]) - 1 - - if _lists[pos_prev][idx_prev] > val: - msg = '{0} not in sort order at index {1}'.format(repr(val), idx) - raise ValueError(msg) - - # Check that the inserted value is not greater than - # the previous value. - - if idx < (_len - 1): - idx_next = loc + 1 - pos_next = pos - - if idx_next == len(_lists[pos_next]): - pos_next += 1 - idx_next = 0 - - if _lists[pos_next][idx_next] < val: - msg = '{0} not in sort order at index {1}'.format(repr(val), idx) - raise ValueError(msg) def __setitem__(self, index, value): - """ - Replace the item at position *index* with *value*. - - Supports slice notation. Raises a :exc:`ValueError` if the sort order - would be violated. When used with a slice and iterable, the - :exc:`ValueError` is raised before the list is mutated if the sort order - would be violated by the operation. - """ - _maxes, _lists, _pos = self._maxes, self._lists, self._pos - _check_order = self._check_order - - if isinstance(index, slice): - start, stop, step = index.indices(self._len) - indices = range(start, stop, step) - - if step != 1: - if not hasattr(value, '__len__'): - value = list(value) - - indices = list(indices) - - if len(value) != len(indices): - raise ValueError( - 'attempt to assign sequence of size {0}' - ' to extended slice of size {1}' - .format(len(value), len(indices))) - - # Keep a log of values that are set so that we can - # roll back changes if ordering is violated. + """Raise not-implemented error. - log = [] - _append = log.append + ``sl.__setitem__(index, value)`` <==> ``sl[index] = value`` - for idx, val in zip(indices, value): - pos, loc = _pos(idx) - _append((idx, _lists[pos][loc], val)) - _lists[pos][loc] = val - if len(_lists[pos]) == (loc + 1): - _maxes[pos] = val + :raises NotImplementedError: use ``del sl[index]`` and + ``sl.add(value)`` instead - try: - # Validate ordering of new values. - - for idx, oldval, newval in log: - _check_order(idx, newval) - - except ValueError: + """ + message = 'use ``del sl[index]`` and ``sl.add(value)`` instead' + raise NotImplementedError(message) - # Roll back changes from log. - for idx, oldval, newval in log: - pos, loc = _pos(idx) - _lists[pos][loc] = oldval - if len(_lists[pos]) == (loc + 1): - _maxes[pos] = oldval + def __iter__(self): + """Return an iterator over the sorted list. - raise - else: - if start == 0 and stop == self._len: - self._clear() - return self._update(value) + ``sl.__iter__()`` <==> ``iter(sl)`` - # Test ordering using indexing. If the given value - # isn't a Sequence, convert it to a tuple. + Iterating the sorted list while adding or deleting values may raise a + :exc:`RuntimeError` or fail to iterate over all values. - if not isinstance(value, Sequence): - value = tuple(value) + """ + return chain.from_iterable(self._lists) - # Check that the given values are ordered properly. - iterator = range(1, len(value)) + def __reversed__(self): + """Return a reverse iterator over the sorted list. - if not all(value[pos - 1] <= value[pos] for pos in iterator): - raise ValueError('given sequence not in sort order') + ``sl.__reversed__()`` <==> ``reversed(sl)`` - # Check ordering in context of sorted list. + Iterating the sorted list while adding or deleting values may raise a + :exc:`RuntimeError` or fail to iterate over all values. - if not start or not len(value): - # Nothing to check on the lhs. - pass - else: - if self._getitem(start - 1) > value[0]: - msg = '{0} not in sort order at index {1}'.format(repr(value[0]), start) - raise ValueError(msg) - - if stop == len(self) or not len(value): - # Nothing to check on the rhs. - pass - else: - # "stop" is exclusive so we don't need - # to add one for the index. - if self._getitem(stop) < value[-1]: - msg = '{0} not in sort order at index {1}'.format(repr(value[-1]), stop) - raise ValueError(msg) + """ + return chain.from_iterable(map(reversed, reversed(self._lists))) - # Delete the existing values. - self._delitem(index) + def reverse(self): + """Raise not-implemented error. - # Insert the new values. + Sorted list maintains values in ascending sort order. Values may not be + reversed in-place. - _insert = self.insert - for idx, val in enumerate(value): - _insert(start + idx, val) - else: - pos, loc = _pos(index) - _check_order(index, value) - _lists[pos][loc] = value - if len(_lists[pos]) == (loc + 1): - _maxes[pos] = value + Use ``reversed(sl)`` for an iterator over values in descending sort + order. - def __iter__(self): - """ - Return an iterator over the Sequence. + Implemented to override `MutableSequence.reverse` which provides an + erroneous default implementation. - Iterating the Sequence while adding or deleting values may raise a - `RuntimeError` or fail to iterate over all entries. - """ - return chain.from_iterable(self._lists) + :raises NotImplementedError: use ``reversed(sl)`` instead - def __reversed__(self): """ - Return an iterator to traverse the Sequence in reverse. + raise NotImplementedError('use ``reversed(sl)`` instead') - Iterating the Sequence while adding or deleting values may raise a - `RuntimeError` or fail to iterate over all entries. - """ - return chain.from_iterable(map(reversed, reversed(self._lists))) def islice(self, start=None, stop=None, reverse=False): - """ - Returns an iterator that slices `self` from `start` to `stop` index, - inclusive and exclusive respectively. + """Return an iterator that slices sorted list from `start` to `stop`. - When `reverse` is `True`, values are yielded from the iterator in - reverse order. + The `start` and `stop` index are treated inclusive and exclusive, + respectively. Both `start` and `stop` default to `None` which is automatically - inclusive of the beginning and end. + inclusive of the beginning and end of the sorted list. + + When `reverse` is `True` the values are yielded from the iterator in + reverse order; `reverse` defaults to `False`. + + >>> sl = SortedList('abcdefghij') + >>> it = sl.islice(2, 6) + >>> list(it) + ['c', 'd', 'e', 'f'] + + :param int start: start index (inclusive) + :param int stop: stop index (exclusive) + :param bool reverse: yield values in reverse order + :return: iterator + """ _len = self._len if not _len: return iter(()) - start, stop, step = slice(start, stop).indices(self._len) + start, stop, _ = slice(start, stop).indices(self._len) if start >= stop: return iter(()) @@ -823,60 +1035,97 @@ return self._islice(min_pos, min_idx, max_pos, max_idx, reverse) + def _islice(self, min_pos, min_idx, max_pos, max_idx, reverse): - """ - Returns an iterator that slices `self` using two index pairs, - `(min_pos, min_idx)` and `(max_pos, max_idx)`; the first inclusive - and the latter exclusive. See `_pos` for details on how an index - is converted to an index pair. + """Return an iterator that slices sorted list using two index pairs. + + The index pairs are (min_pos, min_idx) and (max_pos, max_idx), the + first inclusive and the latter exclusive. See `_pos` for details on how + an index is converted to an index pair. When `reverse` is `True`, values are yielded from the iterator in reverse order. + """ _lists = self._lists if min_pos > max_pos: return iter(()) - elif min_pos == max_pos and not reverse: - return iter(_lists[min_pos][min_idx:max_idx]) - elif min_pos == max_pos and reverse: - return reversed(_lists[min_pos][min_idx:max_idx]) - elif min_pos + 1 == max_pos and not reverse: - return chain(_lists[min_pos][min_idx:], _lists[max_pos][:max_idx]) - elif min_pos + 1 == max_pos and reverse: - return chain( - reversed(_lists[max_pos][:max_idx]), - reversed(_lists[min_pos][min_idx:]), - ) - elif not reverse: + + if min_pos == max_pos: + if reverse: + indices = reversed(range(min_idx, max_idx)) + return map(_lists[min_pos].__getitem__, indices) + + indices = range(min_idx, max_idx) + return map(_lists[min_pos].__getitem__, indices) + + next_pos = min_pos + 1 + + if next_pos == max_pos: + if reverse: + min_indices = range(min_idx, len(_lists[min_pos])) + max_indices = range(max_idx) + return chain( + map(_lists[max_pos].__getitem__, reversed(max_indices)), + map(_lists[min_pos].__getitem__, reversed(min_indices)), + ) + + min_indices = range(min_idx, len(_lists[min_pos])) + max_indices = range(max_idx) return chain( - _lists[min_pos][min_idx:], - chain.from_iterable(_lists[(min_pos + 1):max_pos]), - _lists[max_pos][:max_idx], + map(_lists[min_pos].__getitem__, min_indices), + map(_lists[max_pos].__getitem__, max_indices), ) - else: - temp = map(reversed, reversed(_lists[(min_pos + 1):max_pos])) + + if reverse: + min_indices = range(min_idx, len(_lists[min_pos])) + sublist_indices = range(next_pos, max_pos) + sublists = map(_lists.__getitem__, reversed(sublist_indices)) + max_indices = range(max_idx) return chain( - reversed(_lists[max_pos][:max_idx]), - chain.from_iterable(temp), - reversed(_lists[min_pos][min_idx:]), + map(_lists[max_pos].__getitem__, reversed(max_indices)), + chain.from_iterable(map(reversed, sublists)), + map(_lists[min_pos].__getitem__, reversed(min_indices)), ) + min_indices = range(min_idx, len(_lists[min_pos])) + sublist_indices = range(next_pos, max_pos) + sublists = map(_lists.__getitem__, sublist_indices) + max_indices = range(max_idx) + return chain( + map(_lists[min_pos].__getitem__, min_indices), + chain.from_iterable(sublists), + map(_lists[max_pos].__getitem__, max_indices), + ) + + def irange(self, minimum=None, maximum=None, inclusive=(True, True), reverse=False): - """ - Create an iterator of values between `minimum` and `maximum`. - - `inclusive` is a pair of booleans that indicates whether the minimum - and maximum ought to be included in the range, respectively. The - default is (True, True) such that the range is inclusive of both - minimum and maximum. + """Create an iterator of values between `minimum` and `maximum`. Both `minimum` and `maximum` default to `None` which is automatically - inclusive of the start and end of the list, respectively. + inclusive of the beginning and end of the sorted list. + + The argument `inclusive` is a pair of booleans that indicates whether + the minimum and maximum ought to be included in the range, + respectively. The default is ``(True, True)`` such that the range is + inclusive of both minimum and maximum. When `reverse` is `True` the values are yielded from the iterator in reverse order; `reverse` defaults to `False`. + + >>> sl = SortedList('abcdefghij') + >>> it = sl.irange('c', 'f') + >>> list(it) + ['c', 'd', 'e', 'f'] + + :param minimum: minimum value to start iterating + :param maximum: maximum value to stop iterating + :param inclusive: pair of booleans + :param bool reverse: yield values in reverse order + :return: iterator + """ _maxes = self._maxes @@ -933,273 +1182,263 @@ return self._islice(min_pos, min_idx, max_pos, max_idx, reverse) + def __len__(self): - """Return the number of elements in the list.""" - return self._len + """Return the size of the sorted list. + + ``sl.__len__()`` <==> ``len(sl)`` + + :return: size of sorted list - def bisect_left(self, val): - """ - Similar to the *bisect* module in the standard library, this returns an - appropriate index to insert *val*. If *val* is already present, the - insertion point will be before (to the left of) any existing entries. """ - _maxes = self._maxes + return self._len - if not _maxes: - return 0 - pos = bisect_left(_maxes, val) + def bisect_left(self, value): + """Return an index to insert `value` in the sorted list. - if pos == len(_maxes): - return self._len + If the `value` is already present, the insertion point will be before + (to the left of) any existing values. - idx = bisect_left(self._lists[pos], val) + Similar to the `bisect` module in the standard library. - return self._loc(pos, idx) + Runtime complexity: `O(log(n))` -- approximate. + + >>> sl = SortedList([10, 11, 12, 13, 14]) + >>> sl.bisect_left(12) + 2 + + :param value: insertion index of value in sorted list + :return: index - def bisect_right(self, val): - """ - Same as *bisect_left*, but if *val* is already present, the insertion - point will be after (to the right of) any existing entries. """ _maxes = self._maxes if not _maxes: return 0 - pos = bisect_right(_maxes, val) + pos = bisect_left(_maxes, value) if pos == len(_maxes): return self._len - idx = bisect_right(self._lists[pos], val) + idx = bisect_left(self._lists[pos], value) + return self._loc(pos, idx) + + + def bisect_right(self, value): + """Return an index to insert `value` in the sorted list. + + Similar to `bisect_left`, but if `value` is already present, the + insertion point with be after (to the right of) any existing values. + + Similar to the `bisect` module in the standard library. + + Runtime complexity: `O(log(n))` -- approximate. + + >>> sl = SortedList([10, 11, 12, 13, 14]) + >>> sl.bisect_right(12) + 3 + + :param value: insertion index of value in sorted list + :return: index + + """ + _maxes = self._maxes + + if not _maxes: + return 0 + pos = bisect_right(_maxes, value) + + if pos == len(_maxes): + return self._len + + idx = bisect_right(self._lists[pos], value) return self._loc(pos, idx) bisect = bisect_right _bisect_right = bisect_right - def count(self, val): - """Return the number of occurrences of *val* in the list.""" + + def count(self, value): + """Return number of occurrences of `value` in the sorted list. + + Runtime complexity: `O(log(n))` -- approximate. + + >>> sl = SortedList([1, 2, 2, 3, 3, 3, 4, 4, 4, 4]) + >>> sl.count(3) + 3 + + :param value: value to count in sorted list + :return: count + + """ _maxes = self._maxes if not _maxes: return 0 - pos_left = bisect_left(_maxes, val) + pos_left = bisect_left(_maxes, value) if pos_left == len(_maxes): return 0 _lists = self._lists - idx_left = bisect_left(_lists[pos_left], val) - pos_right = bisect_right(_maxes, val) + idx_left = bisect_left(_lists[pos_left], value) + pos_right = bisect_right(_maxes, value) if pos_right == len(_maxes): return self._len - self._loc(pos_left, idx_left) - idx_right = bisect_right(_lists[pos_right], val) + idx_right = bisect_right(_lists[pos_right], value) if pos_left == pos_right: return idx_right - idx_left right = self._loc(pos_right, idx_right) left = self._loc(pos_left, idx_left) - return right - left + def copy(self): - """Return a shallow copy of the sorted list.""" - return self.__class__(self, load=self._load) + """Return a shallow copy of the sorted list. - __copy__ = copy + Runtime complexity: `O(n)` + + :return: new sorted list - def append(self, val): - """ - Append the element *val* to the list. Raises a ValueError if the *val* - would violate the sort order. """ - _maxes, _lists = self._maxes, self._lists + return self.__class__(self) - if not _maxes: - _maxes.append(val) - _lists.append([val]) - self._len = 1 - return + __copy__ = copy - pos = len(_lists) - 1 - if val < _lists[pos][-1]: - msg = '{0} not in sort order at index {1}'.format(repr(val), self._len) - raise ValueError(msg) + def append(self, value): + """Raise not-implemented error. - _maxes[pos] = val - _lists[pos].append(val) - self._len += 1 - self._expand(pos) + Implemented to override `MutableSequence.append` which provides an + erroneous default implementation. + + :raises NotImplementedError: use ``sl.add(value)`` instead - def extend(self, values): - """ - Extend the list by appending all elements from the *values*. Raises a - ValueError if the sort order would be violated. """ - _maxes, _lists, _load = self._maxes, self._lists, self._load + raise NotImplementedError('use ``sl.add(value)`` instead') - if not isinstance(values, list): - values = list(values) - if any(values[pos - 1] > values[pos] - for pos in range(1, len(values))): - raise ValueError('given sequence not in sort order') + def extend(self, values): + """Raise not-implemented error. - offset = 0 + Implemented to override `MutableSequence.extend` which provides an + erroneous default implementation. - if _maxes: - if values[0] < _lists[-1][-1]: - msg = '{0} not in sort order at index {1}'.format(repr(values[0]), self._len) - raise ValueError(msg) - - if len(_lists[-1]) < self._half: - _lists[-1].extend(values[:_load]) - _maxes[-1] = _lists[-1][-1] - offset = _load - - len_lists = len(_lists) - - for idx in range(offset, len(values), _load): - _lists.append(values[idx:(idx + _load)]) - _maxes.append(_lists[-1][-1]) + :raises NotImplementedError: use ``sl.update(values)`` instead - _index = self._index + """ + raise NotImplementedError('use ``sl.update(values)`` instead') - if len_lists == len(_lists): - len_index = len(_index) - if len_index > 0: - len_values = len(values) - child = len_index - 1 - while child: - _index[child] += len_values - child = (child - 1) >> 1 - _index[0] += len_values - else: - del _index[:] - self._len += len(values) + def insert(self, index, value): + """Raise not-implemented error. + + :raises NotImplementedError: use ``sl.add(value)`` instead - def insert(self, idx, val): - """ - Insert the element *val* into the list at *idx*. Raises a ValueError if - the *val* at *idx* would violate the sort order. """ - _maxes, _lists, _len = self._maxes, self._lists, self._len + raise NotImplementedError('use ``sl.add(value)`` instead') - if idx < 0: - idx += _len - if idx < 0: - idx = 0 - if idx > _len: - idx = _len - if not _maxes: - # The idx must be zero by the inequalities above. - _maxes.append(val) - _lists.append([val]) - self._len = 1 - return + def pop(self, index=-1): + """Remove and return value at `index` in sorted list. - if not idx: - if val > _lists[0][0]: - msg = '{0} not in sort order at index {1}'.format(repr(val), 0) - raise ValueError(msg) - else: - _lists[0].insert(0, val) - self._expand(0) - self._len += 1 - return + Raise :exc:`IndexError` if the sorted list is empty or index is out of + range. - if idx == _len: - pos = len(_lists) - 1 - if _lists[pos][-1] > val: - msg = '{0} not in sort order at index {1}'.format(repr(val), _len) - raise ValueError(msg) - else: - _lists[pos].append(val) - _maxes[pos] = _lists[pos][-1] - self._expand(pos) - self._len += 1 - return + Negative indices are supported. - pos, idx = self._pos(idx) - idx_before = idx - 1 - if idx_before < 0: - pos_before = pos - 1 - idx_before = len(_lists[pos_before]) - 1 - else: - pos_before = pos + Runtime complexity: `O(log(n))` -- approximate. - before = _lists[pos_before][idx_before] - if before <= val <= _lists[pos][idx]: - _lists[pos].insert(idx, val) - self._expand(pos) - self._len += 1 - else: - msg = '{0} not in sort order at index {1}'.format(repr(val), idx) - raise ValueError(msg) + >>> sl = SortedList('abcde') + >>> sl.pop() + 'e' + >>> sl.pop(2) + 'c' + >>> sl + SortedList(['a', 'b', 'd']) + + :param int index: index of value (default -1) + :return: value + :raises IndexError: if index is out of range - def pop(self, idx=-1): - """ - Remove and return item at *idx* (default last). Raises IndexError if - list is empty or index is out of range. Negative indices are supported, - as for slice indices. """ if not self._len: raise IndexError('pop index out of range') _lists = self._lists - if idx == 0: + if index == 0: val = _lists[0][0] self._delete(0, 0) return val - if idx == -1: + if index == -1: pos = len(_lists) - 1 loc = len(_lists[pos]) - 1 val = _lists[pos][loc] self._delete(pos, loc) return val - if 0 <= idx < len(_lists[0]): - val = _lists[0][idx] - self._delete(0, idx) + if 0 <= index < len(_lists[0]): + val = _lists[0][index] + self._delete(0, index) return val len_last = len(_lists[-1]) - if -len_last < idx < 0: + if -len_last < index < 0: pos = len(_lists) - 1 - loc = len_last + idx + loc = len_last + index val = _lists[pos][loc] self._delete(pos, loc) return val - pos, idx = self._pos(idx) + pos, idx = self._pos(index) val = _lists[pos][idx] self._delete(pos, idx) - return val - def index(self, val, start=None, stop=None): - """ - Return the smallest *k* such that L[k] == val and i <= k < j`. Raises - ValueError if *val* is not present. *stop* defaults to the end of the - list. *start* defaults to the beginning. Negative indices are supported, - as for slice indices. + + def index(self, value, start=None, stop=None): + """Return first index of value in sorted list. + + Raise ValueError if `value` is not present. + + Index must be between `start` and `stop` for the `value` to be + considered present. The default value, None, for `start` and `stop` + indicate the beginning and end of the sorted list. + + Negative indices are supported. + + Runtime complexity: `O(log(n))` -- approximate. + + >>> sl = SortedList('abcde') + >>> sl.index('d') + 3 + >>> sl.index('z') + Traceback (most recent call last): + ... + ValueError: 'z' is not in list + + :param value: value in sorted list + :param int start: start index (default None, start of sorted list) + :param int stop: stop index (default None, end of sorted list) + :return: index of value + :raises ValueError: if value is not present + """ - _len, _maxes = self._len, self._maxes + _len = self._len - if not _maxes: - raise ValueError('{0} is not in list'.format(repr(val))) + if not _len: + raise ValueError('{0!r} is not in list'.format(value)) if start is None: start = 0 @@ -1216,174 +1455,196 @@ stop = _len if stop <= start: - raise ValueError('{0} is not in list'.format(repr(val))) + raise ValueError('{0!r} is not in list'.format(value)) - stop -= 1 - pos_left = bisect_left(_maxes, val) + _maxes = self._maxes + pos_left = bisect_left(_maxes, value) if pos_left == len(_maxes): - raise ValueError('{0} is not in list'.format(repr(val))) + raise ValueError('{0!r} is not in list'.format(value)) _lists = self._lists - idx_left = bisect_left(_lists[pos_left], val) + idx_left = bisect_left(_lists[pos_left], value) - if _lists[pos_left][idx_left] != val: - raise ValueError('{0} is not in list'.format(repr(val))) + if _lists[pos_left][idx_left] != value: + raise ValueError('{0!r} is not in list'.format(value)) + stop -= 1 left = self._loc(pos_left, idx_left) if start <= left: if left <= stop: return left else: - right = self._bisect_right(val) - 1 + right = self._bisect_right(value) - 1 if start <= right: return start - raise ValueError('{0} is not in list'.format(repr(val))) + raise ValueError('{0!r} is not in list'.format(value)) + + + def __add__(self, other): + """Return new sorted list containing all values in both sequences. + + ``sl.__add__(other)`` <==> ``sl + other`` + + Values in `other` do not need to be in sorted order. + + Runtime complexity: `O(n*log(n))` + + >>> sl1 = SortedList('bat') + >>> sl2 = SortedList('cat') + >>> sl1 + sl2 + SortedList(['a', 'a', 'b', 'c', 't', 't']) + + :param other: other iterable + :return: new sorted list - def __add__(self, that): - """ - Return a new sorted list containing all the elements in *self* and - *that*. Elements in *that* do not need to be properly ordered with - respect to *self*. """ values = reduce(iadd, self._lists, []) - values.extend(that) - return self.__class__(values, load=self._load) + values.extend(other) + return self.__class__(values) + + __radd__ = __add__ + + + def __iadd__(self, other): + """Update sorted list with values from `other`. + + ``sl.__iadd__(other)`` <==> ``sl += other`` + + Values in `other` do not need to be in sorted order. + + Runtime complexity: `O(k*log(n))` -- approximate. + + >>> sl = SortedList('bat') + >>> sl += 'cat' + >>> sl + SortedList(['a', 'a', 'b', 'c', 't', 't']) + + :param other: other iterable + :return: existing sorted list - def __iadd__(self, that): - """ - Update *self* to include all values in *that*. Elements in *that* do not - need to be properly ordered with respect to *self*. """ - self._update(that) + self._update(other) return self - def __mul__(self, that): - """ - Return a new sorted list containing *that* shallow copies of each item - in SortedList. - """ - values = reduce(iadd, self._lists, []) * that - return self.__class__(values, load=self._load) - def __imul__(self, that): + def __mul__(self, num): + """Return new sorted list with `num` shallow copies of values. + + ``sl.__mul__(num)`` <==> ``sl * num`` + + Runtime complexity: `O(n*log(n))` + + >>> sl = SortedList('abc') + >>> sl * 3 + SortedList(['a', 'a', 'a', 'b', 'b', 'b', 'c', 'c', 'c']) + + :param int num: count of shallow copies + :return: new sorted list + """ - Increase the length of the list by appending *that* shallow copies of - each item. + values = reduce(iadd, self._lists, []) * num + return self.__class__(values) + + __rmul__ = __mul__ + + + def __imul__(self, num): + """Update the sorted list with `num` shallow copies of values. + + ``sl.__imul__(num)`` <==> ``sl *= num`` + + Runtime complexity: `O(n*log(n))` + + >>> sl = SortedList('abc') + >>> sl *= 3 + >>> sl + SortedList(['a', 'a', 'a', 'b', 'b', 'b', 'c', 'c', 'c']) + + :param int num: count of shallow copies + :return: existing sorted list + """ - values = reduce(iadd, self._lists, []) * that + values = reduce(iadd, self._lists, []) * num self._clear() self._update(values) return self - def _make_cmp(seq_op, doc): - def comparer(self, that): - if not isinstance(that, Sequence): - return NotImplemented - - self_len = self._len - len_that = len(that) - if self_len != len_that: - if seq_op is op.eq: - return False - if seq_op is op.ne: - return True + __eq__ = _make_cmp(eq, '==', 'equal to') + __ne__ = _make_cmp(ne, '!=', 'not equal to') + __lt__ = _make_cmp(lt, '<', 'less than') + __gt__ = _make_cmp(gt, '>', 'greater than') + __le__ = _make_cmp(le, '<=', 'less than or equal to') + __ge__ = _make_cmp(ge, '>=', 'greater than or equal to') + __make_cmp = staticmethod(_make_cmp) # type: ignore - for alpha, beta in zip(self, that): - if alpha != beta: - return seq_op(alpha, beta) - return seq_op(self_len, len_that) + @recursive_repr() + def __repr__(self): + """Return string representation of sorted list. - comparer.__name__ = '__{0}__'.format(seq_op.__name__) - doc_str = 'Return `True` if and only if Sequence is {0} `that`.' - comparer.__doc__ = doc_str.format(doc) + ``sl.__repr__()`` <==> ``repr(sl)`` - return comparer + :return: string representation - __eq__ = _make_cmp(op.eq, 'equal to') - __ne__ = _make_cmp(op.ne, 'not equal to') - __lt__ = _make_cmp(op.lt, 'less than') - __gt__ = _make_cmp(op.gt, 'greater than') - __le__ = _make_cmp(op.le, 'less than or equal to') - __ge__ = _make_cmp(op.ge, 'greater than or equal to') + """ + return '{0}({1!r})'.format(type(self).__name__, list(self)) - @recursive_repr - def __repr__(self): - """Return string representation of sequence.""" - temp = '{0}({1}, load={2})' - return temp.format( - self.__class__.__name__, - repr(list(self)), - repr(self._load) - ) def _check(self): - try: - # Check load parameters. + """Check invariants of sorted list. - assert self._load >= 4 - assert self._half == (self._load >> 1) - assert self._twice == (self._load * 2) + Runtime complexity: `O(n)` - # Check empty sorted list case. - - if self._maxes == []: - assert self._lists == [] - return - - assert len(self._maxes) > 0 and len(self._lists) > 0 + """ + try: + assert self._load >= 4 + assert len(self._maxes) == len(self._lists) + assert self._len == sum(len(sublist) for sublist in self._lists) # Check all sublists are sorted. - assert all(sublist[pos - 1] <= sublist[pos] - for sublist in self._lists - for pos in range(1, len(sublist))) + for sublist in self._lists: + for pos in range(1, len(sublist)): + assert sublist[pos - 1] <= sublist[pos] # Check beginning/end of sublists are sorted. for pos in range(1, len(self._lists)): assert self._lists[pos - 1][-1] <= self._lists[pos][0] - # Check length of _maxes and _lists match. - - assert len(self._maxes) == len(self._lists) - - # Check _maxes is a map of _lists. + # Check _maxes index is the last value of each sublist. - assert all(self._maxes[pos] == self._lists[pos][-1] - for pos in range(len(self._maxes))) + for pos in range(len(self._maxes)): + assert self._maxes[pos] == self._lists[pos][-1] - # Check load level is less than _twice. + # Check sublist lengths are less than double load-factor. - assert all(len(sublist) <= self._twice for sublist in self._lists) + double = self._load << 1 + assert all(len(sublist) <= double for sublist in self._lists) - # Check load level is greater than _half for all + # Check sublist lengths are greater than half load-factor for all # but the last sublist. - assert all(len(self._lists[pos]) >= self._half - for pos in range(0, len(self._lists) - 1)) - - # Check length. - - assert self._len == sum(len(sublist) for sublist in self._lists) - - # Check index. + half = self._load >> 1 + for pos in range(0, len(self._lists) - 1): + assert len(self._lists[pos]) >= half - if len(self._index): - assert len(self._index) == self._offset + len(self._lists) + if self._index: assert self._len == self._index[0] + assert len(self._index) == self._offset + len(self._lists) + + # Check index leaf nodes equal length of sublists. - def test_offset_pos(pos): - from_index = self._index[self._offset + pos] - return from_index == len(self._lists[pos]) + for pos in range(len(self._lists)): + leaf = self._index[self._offset + pos] + assert leaf == len(self._lists[pos]) - assert all(test_offset_pos(pos) - for pos in range(len(self._lists))) + # Check index branch nodes are the sum of their children. for pos in range(self._offset): child = (pos << 1) + 1 @@ -1393,16 +1654,13 @@ assert self._index[pos] == self._index[child] else: child_sum = self._index[child] + self._index[child + 1] - assert self._index[pos] == child_sum - + assert child_sum == self._index[pos] except: import sys import traceback - traceback.print_exc(file=sys.stdout) - print('len', self._len) - print('load', self._load, self._half, self._twice) + print('load', self._load) print('offset', self._offset) print('len_index', len(self._index)) print('index', self._index) @@ -1410,119 +1668,201 @@ print('maxes', self._maxes) print('len_lists', len(self._lists)) print('lists', self._lists) - raise + def identity(value): + "Identity function." return value -class SortedListWithKey(SortedList): - """ - SortedListWithKey provides most of the same methods as a list but keeps - the items in sorted order. - """ - def __init__(self, iterable=None, key=identity, load=1000): - """ - SortedListWithKey provides most of the same methods as a list but - keeps the items in sorted order. +class SortedKeyList(SortedList): + """Sorted-key list is a subtype of sorted list. + + The sorted-key list maintains values in comparison order based on the + result of a key function applied to every value. + + All the same methods that are available in :class:`SortedList` are also + available in :class:`SortedKeyList`. - An optional *iterable* provides an initial series of items to populate - the SortedListWithKey. + Additional methods provided: - An optional *key* argument defines a callable that, like the `key` + * :attr:`SortedKeyList.key` + * :func:`SortedKeyList.bisect_key_left` + * :func:`SortedKeyList.bisect_key_right` + * :func:`SortedKeyList.irange_key` + + Some examples below use: + + >>> from operator import neg + >>> neg + + >>> neg(1) + -1 + + """ + def __init__(self, iterable=None, key=identity): + """Initialize sorted-key list instance. + + Optional `iterable` argument provides an initial iterable of values to + initialize the sorted-key list. + + Optional `key` argument defines a callable that, like the `key` argument to Python's `sorted` function, extracts a comparison key from - each element. The default is the identity function. + each value. The default is the identity function. + + Runtime complexity: `O(n*log(n))` + + >>> from operator import neg + >>> skl = SortedKeyList(key=neg) + >>> skl + SortedKeyList([], key=) + >>> skl = SortedKeyList([3, 1, 2], key=neg) + >>> skl + SortedKeyList([3, 2, 1], key=) + + :param iterable: initial values (optional) + :param key: function used to extract comparison key (optional) - An optional *load* specifies the load-factor of the list. The default - load factor of '1000' works well for lists from tens to tens of millions - of elements. Good practice is to use a value that is the cube root of - the list size. With billions of elements, the best load factor depends - on your usage. It's best to leave the load factor at the default until - you start benchmarking. """ - self._len, self._maxes, self._lists, self._keys, self._index = 0, [], [], [], [] - self._key, self._load, self._twice, self._half = key, load, load * 2, load >> 1 + self._key = key + self._len = 0 + self._load = self.DEFAULT_LOAD_FACTOR + self._lists = [] + self._keys = [] + self._maxes = [] + self._index = [] self._offset = 0 if iterable is not None: self._update(iterable) - def __new__(cls, iterable=None, key=identity, load=1000): + + def __new__(cls, iterable=None, key=identity): return object.__new__(cls) + + @property + def key(self): + "Function used to extract comparison key from values." + return self._key + + def clear(self): - """Remove all the elements from the list.""" + """Remove all values from sorted-key list. + + Runtime complexity: `O(n)` + + """ self._len = 0 - del self._maxes[:] del self._lists[:] del self._keys[:] + del self._maxes[:] del self._index[:] _clear = clear - def add(self, val): - """Add the element *val* to the list.""" - _maxes, _lists, _keys = self._maxes, self._lists, self._keys - key = self._key(val) + def add(self, value): + """Add `value` to sorted-key list. + + Runtime complexity: `O(log(n))` -- approximate. + + >>> from operator import neg + >>> skl = SortedKeyList(key=neg) + >>> skl.add(3) + >>> skl.add(1) + >>> skl.add(2) + >>> skl + SortedKeyList([3, 2, 1], key=) + + :param value: value to add to sorted-key list + + """ + _lists = self._lists + _keys = self._keys + _maxes = self._maxes + + key = self._key(value) if _maxes: pos = bisect_right(_maxes, key) if pos == len(_maxes): pos -= 1 - _maxes[pos] = key + _lists[pos].append(value) _keys[pos].append(key) - _lists[pos].append(val) + _maxes[pos] = key else: idx = bisect_right(_keys[pos], key) + _lists[pos].insert(idx, value) _keys[pos].insert(idx, key) - _lists[pos].insert(idx, val) self._expand(pos) else: - _maxes.append(key) + _lists.append([value]) _keys.append([key]) - _lists.append([val]) + _maxes.append(key) self._len += 1 + def _expand(self, pos): - """ - Splits sublists that are more than double the load level. + """Split sublists with length greater than double the load-factor. Updates the index when the sublist length is less than double the load - level. This requires incrementing the nodes in a traversal from the leaf - node to the root. For an example traversal see self._loc. - """ - _lists, _keys, _index = self._lists, self._keys, self._index + level. This requires incrementing the nodes in a traversal from the + leaf node to the root. For an example traversal see + ``SortedList._loc``. - if len(_keys[pos]) > self._twice: - _maxes, _load = self._maxes, self._load + """ + _lists = self._lists + _keys = self._keys + _index = self._index - half = _keys[pos][_load:] - half_list = _lists[pos][_load:] - del _keys[pos][_load:] - del _lists[pos][_load:] - _maxes[pos] = _keys[pos][-1] + if len(_keys[pos]) > (self._load << 1): + _maxes = self._maxes + _load = self._load + + _lists_pos = _lists[pos] + _keys_pos = _keys[pos] + half = _lists_pos[_load:] + half_keys = _keys_pos[_load:] + del _lists_pos[_load:] + del _keys_pos[_load:] + _maxes[pos] = _keys_pos[-1] - _maxes.insert(pos + 1, half[-1]) - _keys.insert(pos + 1, half) - _lists.insert(pos + 1, half_list) + _lists.insert(pos + 1, half) + _keys.insert(pos + 1, half_keys) + _maxes.insert(pos + 1, half_keys[-1]) del _index[:] else: if _index: child = self._offset + pos - while child > 0: + while child: _index[child] += 1 child = (child - 1) >> 1 _index[0] += 1 + def update(self, iterable): - """Update the list by adding all elements from *iterable*.""" - _maxes, _lists, _keys = self._maxes, self._lists, self._keys + """Update sorted-key list by adding all values from `iterable`. + + Runtime complexity: `O(k*log(n))` -- approximate. + + >>> from operator import neg + >>> skl = SortedKeyList(key=neg) + >>> skl.update([3, 1, 2]) + >>> skl + SortedKeyList([3, 2, 1], key=) + + :param iterable: iterable of values to add + + """ + _lists = self._lists + _keys = self._keys + _maxes = self._maxes values = sorted(iterable, key=self._key) if _maxes: @@ -1536,31 +1876,46 @@ _add(val) return - _load, _index = self._load, self._index + _load = self._load _lists.extend(values[pos:(pos + _load)] for pos in range(0, len(values), _load)) _keys.extend(list(map(self._key, _list)) for _list in _lists) _maxes.extend(sublist[-1] for sublist in _keys) self._len = len(values) - del _index[:] + del self._index[:] _update = update - def __contains__(self, val): - """Return True if and only if *val* is an element in the list.""" + + def __contains__(self, value): + """Return true if `value` is an element of the sorted-key list. + + ``skl.__contains__(value)`` <==> ``value in skl`` + + Runtime complexity: `O(log(n))` + + >>> from operator import neg + >>> skl = SortedKeyList([1, 2, 3, 4, 5], key=neg) + >>> 3 in skl + True + + :param value: search for value in sorted-key list + :return: true if `value` in sorted-key list + + """ _maxes = self._maxes if not _maxes: return False - key = self._key(val) + key = self._key(value) pos = bisect_left(_maxes, key) if pos == len(_maxes): return False - _keys = self._keys _lists = self._lists + _keys = self._keys idx = bisect_left(_keys[pos], key) @@ -1570,7 +1925,7 @@ while True: if _keys[pos][idx] != key: return False - if _lists[pos][idx] == val: + if _lists[pos][idx] == value: return True idx += 1 if idx == len_sublist: @@ -1580,34 +1935,45 @@ len_sublist = len(_keys[pos]) idx = 0 - def discard(self, val): - """ - Remove the first occurrence of *val*. - If *val* is not a member, does nothing. + def discard(self, value): + """Remove `value` from sorted-key list if it is a member. + + If `value` is not a member, do nothing. + + Runtime complexity: `O(log(n))` -- approximate. + + >>> from operator import neg + >>> skl = SortedKeyList([5, 4, 3, 2, 1], key=neg) + >>> skl.discard(1) + >>> skl.discard(0) + >>> skl == [5, 4, 3, 2] + True + + :param value: `value` to discard from sorted-key list + """ _maxes = self._maxes if not _maxes: return - key = self._key(val) + key = self._key(value) pos = bisect_left(_maxes, key) if pos == len(_maxes): return - _keys = self._keys _lists = self._lists + _keys = self._keys idx = bisect_left(_keys[pos], key) - len_keys = len(_keys) len_sublist = len(_keys[pos]) while True: if _keys[pos][idx] != key: return - if _lists[pos][idx] == val: + if _lists[pos][idx] == value: self._delete(pos, idx) return idx += 1 @@ -1618,56 +1984,78 @@ len_sublist = len(_keys[pos]) idx = 0 - def remove(self, val): - """ - Remove first occurrence of *val*. - Raises ValueError if *val* is not present. + def remove(self, value): + """Remove `value` from sorted-key list; `value` must be a member. + + If `value` is not a member, raise ValueError. + + Runtime complexity: `O(log(n))` -- approximate. + + >>> from operator import neg + >>> skl = SortedKeyList([1, 2, 3, 4, 5], key=neg) + >>> skl.remove(5) + >>> skl == [4, 3, 2, 1] + True + >>> skl.remove(0) + Traceback (most recent call last): + ... + ValueError: 0 not in list + + :param value: `value` to remove from sorted-key list + :raises ValueError: if `value` is not in sorted-key list + """ _maxes = self._maxes if not _maxes: - raise ValueError('{0} not in list'.format(repr(val))) + raise ValueError('{0!r} not in list'.format(value)) - key = self._key(val) + key = self._key(value) pos = bisect_left(_maxes, key) if pos == len(_maxes): - raise ValueError('{0} not in list'.format(repr(val))) + raise ValueError('{0!r} not in list'.format(value)) - _keys = self._keys _lists = self._lists + _keys = self._keys idx = bisect_left(_keys[pos], key) - len_keys = len(_keys) len_sublist = len(_keys[pos]) while True: if _keys[pos][idx] != key: - raise ValueError('{0} not in list'.format(repr(val))) - if _lists[pos][idx] == val: + raise ValueError('{0!r} not in list'.format(value)) + if _lists[pos][idx] == value: self._delete(pos, idx) return idx += 1 if idx == len_sublist: pos += 1 if pos == len_keys: - raise ValueError('{0} not in list'.format(repr(val))) + raise ValueError('{0!r} not in list'.format(value)) len_sublist = len(_keys[pos]) idx = 0 + def _delete(self, pos, idx): - """ - Delete the item at the given (pos, idx). + """Delete value at the given `(pos, idx)`. Combines lists that are less than half the load level. Updates the index when the sublist length is more than half the load - level. This requires decrementing the nodes in a traversal from the leaf - node to the root. For an example traversal see self._loc. - """ - _maxes, _lists, _keys, _index = self._maxes, self._lists, self._keys, self._index + level. This requires decrementing the nodes in a traversal from the + leaf node to the root. For an example traversal see + ``SortedList._loc``. + :param int pos: lists index + :param int idx: sublist index + + """ + _lists = self._lists + _keys = self._keys + _maxes = self._maxes + _index = self._index keys_pos = _keys[pos] lists_pos = _lists[pos] @@ -1677,8 +2065,7 @@ len_keys_pos = len(keys_pos) - if len_keys_pos > self._half: - + if len_keys_pos > (self._load >> 1): _maxes[pos] = keys_pos[-1] if _index: @@ -1687,9 +2074,7 @@ _index[child] -= 1 child = (child - 1) >> 1 _index[0] -= 1 - elif len(_keys) > 1: - if not pos: pos += 1 @@ -1698,220 +2083,84 @@ _lists[prev].extend(_lists[pos]) _maxes[prev] = _keys[prev][-1] - del _keys[pos] del _lists[pos] + del _keys[pos] del _maxes[pos] del _index[:] self._expand(prev) - elif len_keys_pos: - _maxes[pos] = keys_pos[-1] - else: - - del _keys[pos] del _lists[pos] + del _keys[pos] del _maxes[pos] del _index[:] - def _check_order(self, idx, key, val): - _keys, _len = self._keys, self._len - - pos, loc = self._pos(idx) - - if idx < 0: - idx += _len - - # Check that the inserted value is not less than the - # previous value. - - if idx > 0: - idx_prev = loc - 1 - pos_prev = pos - - if idx_prev < 0: - pos_prev -= 1 - idx_prev = len(_keys[pos_prev]) - 1 - - if _keys[pos_prev][idx_prev] > key: - msg = '{0} not in sort order at index {1}'.format(repr(val), idx) - raise ValueError(msg) - - # Check that the inserted value is not greater than - # the previous value. - - if idx < (_len - 1): - idx_next = loc + 1 - pos_next = pos - - if idx_next == len(_keys[pos_next]): - pos_next += 1 - idx_next = 0 - - if _keys[pos_next][idx_next] < key: - msg = '{0} not in sort order at index {1}'.format(repr(val), idx) - raise ValueError(msg) - - def __setitem__(self, index, value): - """ - Replace the item at position *index* with *value*. - - Supports slice notation. Raises a :exc:`ValueError` if the sort order - would be violated. When used with a slice and iterable, the - :exc:`ValueError` is raised before the list is mutated if the sort order - would be violated by the operation. - """ - _maxes, _lists, _keys, _pos = self._maxes, self._lists, self._keys, self._pos - _check_order = self._check_order - - if isinstance(index, slice): - start, stop, step = index.indices(self._len) - indices = range(start, stop, step) - - if step != 1: - if not hasattr(value, '__len__'): - value = list(value) - - indices = list(indices) - - if len(value) != len(indices): - raise ValueError( - 'attempt to assign sequence of size {0}' - ' to extended slice of size {1}' - .format(len(value), len(indices))) - - # Keep a log of values that are set so that we can - # roll back changes if ordering is violated. - - log = [] - _append = log.append - - for idx, val in zip(indices, value): - pos, loc = _pos(idx) - key = self._key(val) - _append((idx, _keys[pos][loc], key, _lists[pos][loc], val)) - _keys[pos][loc] = key - _lists[pos][loc] = val - if len(_keys[pos]) == (loc + 1): - _maxes[pos] = key - - try: - # Validate ordering of new values. - - for idx, oldkey, newkey, oldval, newval in log: - _check_order(idx, newkey, newval) - - except ValueError: - - # Roll back changes from log. - - for idx, oldkey, newkey, oldval, newval in log: - pos, loc = _pos(idx) - _keys[pos][loc] = oldkey - _lists[pos][loc] = oldval - if len(_keys[pos]) == (loc + 1): - _maxes[pos] = oldkey - - raise - else: - if start == 0 and stop == self._len: - self._clear() - return self._update(value) - - # Test ordering using indexing. If the given value - # isn't a Sequence, convert it to a tuple. - - if not isinstance(value, Sequence): - value = tuple(value) - - # Check that the given values are ordered properly. - - keys = tuple(map(self._key, value)) - iterator = range(1, len(keys)) - - if not all(keys[pos - 1] <= keys[pos] for pos in iterator): - raise ValueError('given sequence not in sort order') - - # Check ordering in context of sorted list. - - if not start or not len(value): - # Nothing to check on the lhs. - pass - else: - pos, loc = _pos(start - 1) - if _keys[pos][loc] > keys[0]: - msg = '{0} not in sort order at index {1}'.format(repr(value[0]), start) - raise ValueError(msg) - - if stop == len(self) or not len(value): - # Nothing to check on the rhs. - pass - else: - # "stop" is exclusive so we don't need - # to add one for the index. - pos, loc = _pos(stop) - if _keys[pos][loc] < keys[-1]: - msg = '{0} not in sort order at index {1}'.format(repr(value[-1]), stop) - raise ValueError(msg) - - # Delete the existing values. - - self._delitem(index) - - # Insert the new values. - - _insert = self.insert - for idx, val in enumerate(value): - _insert(start + idx, val) - else: - pos, loc = _pos(index) - key = self._key(value) - _check_order(index, key, value) - _keys[pos][loc] = key - _lists[pos][loc] = value - if len(_lists[pos]) == (loc + 1): - _maxes[pos] = key def irange(self, minimum=None, maximum=None, inclusive=(True, True), reverse=False): - """ - Create an iterator of values between `minimum` and `maximum`. - - `inclusive` is a pair of booleans that indicates whether the minimum - and maximum ought to be included in the range, respectively. The - default is (True, True) such that the range is inclusive of both - minimum and maximum. + """Create an iterator of values between `minimum` and `maximum`. Both `minimum` and `maximum` default to `None` which is automatically - inclusive of the start and end of the list, respectively. + inclusive of the beginning and end of the sorted-key list. + + The argument `inclusive` is a pair of booleans that indicates whether + the minimum and maximum ought to be included in the range, + respectively. The default is ``(True, True)`` such that the range is + inclusive of both minimum and maximum. When `reverse` is `True` the values are yielded from the iterator in reverse order; `reverse` defaults to `False`. + + >>> from operator import neg + >>> skl = SortedKeyList([11, 12, 13, 14, 15], key=neg) + >>> it = skl.irange(14.5, 11.5) + >>> list(it) + [14, 13, 12] + + :param minimum: minimum value to start iterating + :param maximum: maximum value to stop iterating + :param inclusive: pair of booleans + :param bool reverse: yield values in reverse order + :return: iterator + """ - minimum = self._key(minimum) if minimum is not None else None - maximum = self._key(maximum) if maximum is not None else None + min_key = self._key(minimum) if minimum is not None else None + max_key = self._key(maximum) if maximum is not None else None return self._irange_key( - min_key=minimum, max_key=maximum, + min_key=min_key, max_key=max_key, inclusive=inclusive, reverse=reverse, ) + def irange_key(self, min_key=None, max_key=None, inclusive=(True, True), reverse=False): - """ - Create an iterator of values between `min_key` and `max_key`. - - `inclusive` is a pair of booleans that indicates whether the min_key - and max_key ought to be included in the range, respectively. The - default is (True, True) such that the range is inclusive of both - `min_key` and `max_key`. + """Create an iterator of values between `min_key` and `max_key`. Both `min_key` and `max_key` default to `None` which is automatically - inclusive of the start and end of the list, respectively. + inclusive of the beginning and end of the sorted-key list. + + The argument `inclusive` is a pair of booleans that indicates whether + the minimum and maximum ought to be included in the range, + respectively. The default is ``(True, True)`` such that the range is + inclusive of both minimum and maximum. When `reverse` is `True` the values are yielded from the iterator in reverse order; `reverse` defaults to `False`. + + >>> from operator import neg + >>> skl = SortedKeyList([11, 12, 13, 14, 15], key=neg) + >>> it = skl.irange_key(-14, -12) + >>> list(it) + [14, 13, 12] + + :param min_key: minimum key to start iterating + :param max_key: maximum key to stop iterating + :param inclusive: pair of booleans + :param bool reverse: yield values in reverse order + :return: iterator + """ _maxes = self._maxes @@ -1970,29 +2219,71 @@ _irange_key = irange_key - def bisect_left(self, val): - """ - Similar to the *bisect* module in the standard library, this returns an - appropriate index to insert *val*. If *val* is already present, the - insertion point will be before (to the left of) any existing entries. - """ - return self._bisect_key_left(self._key(val)) - def bisect_right(self, val): + def bisect_left(self, value): + """Return an index to insert `value` in the sorted-key list. + + If the `value` is already present, the insertion point will be before + (to the left of) any existing values. + + Similar to the `bisect` module in the standard library. + + Runtime complexity: `O(log(n))` -- approximate. + + >>> from operator import neg + >>> skl = SortedKeyList([5, 4, 3, 2, 1], key=neg) + >>> skl.bisect_left(1) + 4 + + :param value: insertion index of value in sorted-key list + :return: index + """ - Same as *bisect_left*, but if *val* is already present, the insertion - point will be after (to the right of) any existing entries. + return self._bisect_key_left(self._key(value)) + + + def bisect_right(self, value): + """Return an index to insert `value` in the sorted-key list. + + Similar to `bisect_left`, but if `value` is already present, the + insertion point with be after (to the right of) any existing values. + + Similar to the `bisect` module in the standard library. + + Runtime complexity: `O(log(n))` -- approximate. + + >>> from operator import neg + >>> skl = SortedList([5, 4, 3, 2, 1], key=neg) + >>> skl.bisect_right(1) + 5 + + :param value: insertion index of value in sorted-key list + :return: index + """ - return self._bisect_key_right(self._key(val)) + return self._bisect_key_right(self._key(value)) bisect = bisect_right + def bisect_key_left(self, key): - """ - Similar to the *bisect* module in the standard library, this returns an - appropriate index to insert a value with a given *key*. If values with - *key* are already present, the insertion point will be before (to the - left of) any existing entries. + """Return an index to insert `key` in the sorted-key list. + + If the `key` is already present, the insertion point will be before (to + the left of) any existing keys. + + Similar to the `bisect` module in the standard library. + + Runtime complexity: `O(log(n))` -- approximate. + + >>> from operator import neg + >>> skl = SortedKeyList([5, 4, 3, 2, 1], key=neg) + >>> skl.bisect_key_left(-1) + 4 + + :param key: insertion index of key in sorted-key list + :return: index + """ _maxes = self._maxes @@ -2010,10 +2301,25 @@ _bisect_key_left = bisect_key_left + def bisect_key_right(self, key): - """ - Same as *bisect_key_left*, but if *key* is already present, the insertion - point will be after (to the right of) any existing entries. + """Return an index to insert `key` in the sorted-key list. + + Similar to `bisect_key_left`, but if `key` is already present, the + insertion point with be after (to the right of) any existing keys. + + Similar to the `bisect` module in the standard library. + + Runtime complexity: `O(log(n))` -- approximate. + + >>> from operator import neg + >>> skl = SortedList([5, 4, 3, 2, 1], key=neg) + >>> skl.bisect_key_right(-1) + 5 + + :param key: insertion index of key in sorted-key list + :return: index + """ _maxes = self._maxes @@ -2032,24 +2338,35 @@ bisect_key = bisect_key_right _bisect_key_right = bisect_key_right - def count(self, val): - """Return the number of occurrences of *val* in the list.""" + + def count(self, value): + """Return number of occurrences of `value` in the sorted-key list. + + Runtime complexity: `O(log(n))` -- approximate. + + >>> from operator import neg + >>> skl = SortedKeyList([4, 4, 4, 4, 3, 3, 3, 2, 2, 1], key=neg) + >>> skl.count(2) + 2 + + :param value: value to count in sorted-key list + :return: count + + """ _maxes = self._maxes if not _maxes: return 0 - key = self._key(val) + key = self._key(value) pos = bisect_left(_maxes, key) if pos == len(_maxes): return 0 - _keys = self._keys _lists = self._lists - + _keys = self._keys idx = bisect_left(_keys[pos], key) - total = 0 len_keys = len(_keys) len_sublist = len(_keys[pos]) @@ -2057,7 +2374,7 @@ while True: if _keys[pos][idx] != key: return total - if _lists[pos][idx] == val: + if _lists[pos][idx] == value: total += 1 idx += 1 if idx == len_sublist: @@ -2067,169 +2384,53 @@ len_sublist = len(_keys[pos]) idx = 0 - def copy(self): - """Return a shallow copy of the sorted list.""" - return self.__class__(self, key=self._key, load=self._load) - - __copy__ = copy - - def append(self, val): - """ - Append the element *val* to the list. Raises a ValueError if the *val* - would violate the sort order. - """ - _maxes, _lists, _keys = self._maxes, self._lists, self._keys - - key = self._key(val) - - if not _maxes: - _maxes.append(key) - _keys.append([key]) - _lists.append([val]) - self._len = 1 - return - - pos = len(_keys) - 1 - - if key < _keys[pos][-1]: - msg = '{0} not in sort order at index {1}'.format(repr(val), self._len) - raise ValueError(msg) - - _maxes[pos] = key - _keys[pos].append(key) - _lists[pos].append(val) - self._len += 1 - self._expand(pos) - - def extend(self, values): - """ - Extend the list by appending all elements from the *values*. Raises a - ValueError if the sort order would be violated. - """ - _maxes, _keys, _lists, _load = self._maxes, self._keys, self._lists, self._load - - if not isinstance(values, list): - values = list(values) - - keys = list(map(self._key, values)) - - if any(keys[pos - 1] > keys[pos] - for pos in range(1, len(keys))): - raise ValueError('given sequence not in sort order') - - offset = 0 - - if _maxes: - if keys[0] < _keys[-1][-1]: - msg = '{0} not in sort order at index {1}'.format(repr(values[0]), self._len) - raise ValueError(msg) - - if len(_keys[-1]) < self._half: - _lists[-1].extend(values[:_load]) - _keys[-1].extend(keys[:_load]) - _maxes[-1] = _keys[-1][-1] - offset = _load - - len_keys = len(_keys) - - for idx in range(offset, len(keys), _load): - _lists.append(values[idx:(idx + _load)]) - _keys.append(keys[idx:(idx + _load)]) - _maxes.append(_keys[-1][-1]) - _index = self._index + def copy(self): + """Return a shallow copy of the sorted-key list. - if len_keys == len(_keys): - len_index = len(_index) - if len_index > 0: - len_values = len(values) - child = len_index - 1 - while child: - _index[child] += len_values - child = (child - 1) >> 1 - _index[0] += len_values - else: - del _index[:] + Runtime complexity: `O(n)` - self._len += len(values) + :return: new sorted-key list - def insert(self, idx, val): - """ - Insert the element *val* into the list at *idx*. Raises a ValueError if - the *val* at *idx* would violate the sort order. """ - _maxes, _lists, _keys, _len = self._maxes, self._lists, self._keys, self._len + return self.__class__(self, key=self._key) - if idx < 0: - idx += _len - if idx < 0: - idx = 0 - if idx > _len: - idx = _len - - key = self._key(val) - - if not _maxes: - # The idx must be zero by the inequalities above. - _maxes.append(key) - _lists.append([val]) - _keys.append([key]) - self._len = 1 - return + __copy__ = copy - if not idx: - if key > _keys[0][0]: - msg = '{0} not in sort order at index {1}'.format(repr(val), 0) - raise ValueError(msg) - else: - _keys[0].insert(0, key) - _lists[0].insert(0, val) - self._expand(0) - self._len += 1 - return - if idx == _len: - pos = len(_keys) - 1 - if _keys[pos][-1] > key: - msg = '{0} not in sort order at index {1}'.format(repr(val), _len) - raise ValueError(msg) - else: - _keys[pos].append(key) - _lists[pos].append(val) - _maxes[pos] = _keys[pos][-1] - self._expand(pos) - self._len += 1 - return + def index(self, value, start=None, stop=None): + """Return first index of value in sorted-key list. - pos, idx = self._pos(idx) - idx_before = idx - 1 - if idx_before < 0: - pos_before = pos - 1 - idx_before = len(_keys[pos_before]) - 1 - else: - pos_before = pos + Raise ValueError if `value` is not present. - before = _keys[pos_before][idx_before] - if before <= key <= _keys[pos][idx]: - _lists[pos].insert(idx, val) - _keys[pos].insert(idx, key) - self._expand(pos) - self._len += 1 - else: - msg = '{0} not in sort order at index {1}'.format(repr(val), idx) - raise ValueError(msg) + Index must be between `start` and `stop` for the `value` to be + considered present. The default value, None, for `start` and `stop` + indicate the beginning and end of the sorted-key list. + + Negative indices are supported. + + Runtime complexity: `O(log(n))` -- approximate. + + >>> from operator import neg + >>> skl = SortedKeyList([5, 4, 3, 2, 1], key=neg) + >>> skl.index(2) + 3 + >>> skl.index(0) + Traceback (most recent call last): + ... + ValueError: 0 is not in list + + :param value: value in sorted-key list + :param int start: start index (default None, start of sorted-key list) + :param int stop: stop index (default None, end of sorted-key list) + :return: index of value + :raises ValueError: if value is not present - def index(self, val, start=None, stop=None): - """ - Return the smallest *k* such that L[k] == val and i <= k < j`. Raises - ValueError if *val* is not present. *stop* defaults to the end of the - list. *start* defaults to the beginning. Negative indices are supported, - as for slice indices. """ - _len, _maxes = self._len, self._maxes + _len = self._len - if not _maxes: - raise ValueError('{0} is not in list'.format(repr(val))) + if not _len: + raise ValueError('{0!r} is not in list'.format(value)) if start is None: start = 0 @@ -2246,27 +2447,26 @@ stop = _len if stop <= start: - raise ValueError('{0} is not in list'.format(repr(val))) + raise ValueError('{0!r} is not in list'.format(value)) - stop -= 1 - key = self._key(val) + _maxes = self._maxes + key = self._key(value) pos = bisect_left(_maxes, key) if pos == len(_maxes): - raise ValueError('{0} is not in list'.format(repr(val))) + raise ValueError('{0!r} is not in list'.format(value)) - _keys = self._keys + stop -= 1 _lists = self._lists - + _keys = self._keys idx = bisect_left(_keys[pos], key) - len_keys = len(_keys) len_sublist = len(_keys[pos]) while True: if _keys[pos][idx] != key: - raise ValueError('{0} is not in list'.format(repr(val))) - if _lists[pos][idx] == val: + raise ValueError('{0!r} is not in list'.format(value)) + if _lists[pos][idx] == value: loc = self._loc(pos, idx) if start <= loc <= stop: return loc @@ -2276,141 +2476,145 @@ if idx == len_sublist: pos += 1 if pos == len_keys: - raise ValueError('{0} is not in list'.format(repr(val))) + raise ValueError('{0!r} is not in list'.format(value)) len_sublist = len(_keys[pos]) idx = 0 - raise ValueError('{0} is not in list'.format(repr(val))) + raise ValueError('{0!r} is not in list'.format(value)) + + + def __add__(self, other): + """Return new sorted-key list containing all values in both sequences. + + ``skl.__add__(other)`` <==> ``skl + other`` + + Values in `other` do not need to be in sorted-key order. + + Runtime complexity: `O(n*log(n))` + + >>> from operator import neg + >>> skl1 = SortedKeyList([5, 4, 3], key=neg) + >>> skl2 = SortedKeyList([2, 1, 0], key=neg) + >>> skl1 + skl2 + SortedKeyList([5, 4, 3, 2, 1, 0], key=) + + :param other: other iterable + :return: new sorted-key list - def __add__(self, that): - """ - Return a new sorted list containing all the elements in *self* and - *that*. Elements in *that* do not need to be properly ordered with - respect to *self*. """ values = reduce(iadd, self._lists, []) - values.extend(that) - return self.__class__(values, key=self._key, load=self._load) + values.extend(other) + return self.__class__(values, key=self._key) - def __mul__(self, that): - """ - Return a new sorted list containing *that* shallow copies of each item - in SortedListWithKey. - """ - values = reduce(iadd, self._lists, []) * that - return self.__class__(values, key=self._key, load=self._load) + __radd__ = __add__ + + + def __mul__(self, num): + """Return new sorted-key list with `num` shallow copies of values. + + ``skl.__mul__(num)`` <==> ``skl * num`` + + Runtime complexity: `O(n*log(n))` + + >>> from operator import neg + >>> skl = SortedKeyList([3, 2, 1], key=neg) + >>> skl * 2 + SortedKeyList([3, 3, 2, 2, 1, 1], key=) + + :param int num: count of shallow copies + :return: new sorted-key list - def __imul__(self, that): - """ - Increase the length of the list by appending *that* shallow copies of - each item. """ - values = reduce(iadd, self._lists, []) * that - self._clear() - self._update(values) - return self + values = reduce(iadd, self._lists, []) * num + return self.__class__(values, key=self._key) + - @recursive_repr + @recursive_repr() def __repr__(self): - """Return string representation of sequence.""" - temp = '{0}({1}, key={2}, load={3})' - return temp.format( - self.__class__.__name__, - repr(list(self)), - repr(self._key), - repr(self._load) - ) + """Return string representation of sorted-key list. - def _check(self): - try: - # Check load parameters. + ``skl.__repr__()`` <==> ``repr(skl)`` - assert self._load >= 4 - assert self._half == (self._load >> 1) - assert self._twice == (self._load * 2) + :return: string representation - # Check empty sorted list case. + """ + type_name = type(self).__name__ + return '{0}({1!r}, key={2!r})'.format(type_name, list(self), self._key) - if self._maxes == []: - assert self._keys == [] - assert self._lists == [] - return - assert len(self._maxes) > 0 and len(self._keys) > 0 and len(self._lists) > 0 + def _check(self): + """Check invariants of sorted-key list. + + Runtime complexity: `O(n)` + + """ + try: + assert self._load >= 4 + assert len(self._maxes) == len(self._lists) == len(self._keys) + assert self._len == sum(len(sublist) for sublist in self._lists) # Check all sublists are sorted. - assert all(sublist[pos - 1] <= sublist[pos] - for sublist in self._keys - for pos in range(1, len(sublist))) + for sublist in self._keys: + for pos in range(1, len(sublist)): + assert sublist[pos - 1] <= sublist[pos] # Check beginning/end of sublists are sorted. for pos in range(1, len(self._keys)): assert self._keys[pos - 1][-1] <= self._keys[pos][0] - # Check length of _maxes and _lists match. - - assert len(self._maxes) == len(self._lists) == len(self._keys) - # Check _keys matches _key mapped to _lists. - assert all(len(val_list) == len(key_list) - for val_list, key_list in zip(self._lists, self._keys)) - assert all(self._key(val) == key for val, key in - zip((_val for _val_list in self._lists for _val in _val_list), - (_key for _key_list in self._keys for _key in _key_list))) + for val_sublist, key_sublist in zip(self._lists, self._keys): + assert len(val_sublist) == len(key_sublist) + for val, key in zip(val_sublist, key_sublist): + assert self._key(val) == key - # Check _maxes is a map of _keys. + # Check _maxes index is the last value of each sublist. - assert all(self._maxes[pos] == self._keys[pos][-1] - for pos in range(len(self._maxes))) + for pos in range(len(self._maxes)): + assert self._maxes[pos] == self._keys[pos][-1] - # Check load level is less than _twice. + # Check sublist lengths are less than double load-factor. - assert all(len(sublist) <= self._twice for sublist in self._lists) + double = self._load << 1 + assert all(len(sublist) <= double for sublist in self._lists) - # Check load level is greater than _half for all + # Check sublist lengths are greater than half load-factor for all # but the last sublist. - assert all(len(self._lists[pos]) >= self._half - for pos in range(0, len(self._lists) - 1)) - - # Check length. + half = self._load >> 1 + for pos in range(0, len(self._lists) - 1): + assert len(self._lists[pos]) >= half - assert self._len == sum(len(sublist) for sublist in self._lists) - - # Check index. - - if len(self._index): - assert len(self._index) == self._offset + len(self._lists) + if self._index: assert self._len == self._index[0] + assert len(self._index) == self._offset + len(self._lists) - def test_offset_pos(pos): - from_index = self._index[self._offset + pos] - return from_index == len(self._lists[pos]) + # Check index leaf nodes equal length of sublists. - assert all(test_offset_pos(pos) - for pos in range(len(self._lists))) + for pos in range(len(self._lists)): + leaf = self._index[self._offset + pos] + assert leaf == len(self._lists[pos]) + + # Check index branch nodes are the sum of their children. for pos in range(self._offset): child = (pos << 1) + 1 - if self._index[pos] == 0: - assert child >= len(self._index) + if child >= len(self._index): + assert self._index[pos] == 0 elif child + 1 == len(self._index): assert self._index[pos] == self._index[child] else: child_sum = self._index[child] + self._index[child + 1] - assert self._index[pos] == child_sum - + assert child_sum == self._index[pos] except: import sys import traceback - traceback.print_exc(file=sys.stdout) - print('len', self._len) - print('load', self._load, self._half, self._twice) + print('load', self._load) print('offset', self._offset) print('len_index', len(self._index)) print('index', self._index) @@ -2420,5 +2624,7 @@ print('keys', self._keys) print('len_lists', len(self._lists)) print('lists', self._lists) - raise + + +SortedListWithKey = SortedKeyList diff -Nru uranium-3.3.0/UM/Stage.py uranium-4.4.1/UM/Stage.py --- uranium-3.3.0/UM/Stage.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Stage.py 2019-11-19 10:50:46.000000000 +0000 @@ -18,6 +18,14 @@ self._components = {} self._icon_source = QUrl() + ## Something to do when this Stage is selected + def onStageSelected(self): + pass + + ## Something to do when this Stage is deselected + def onStageDeselected(self): + pass + ## Add a QML component to the stage def addDisplayComponent(self, name: str, source: Union[str, QUrl]): if type(source) == str: diff -Nru uranium-3.3.0/UM/Tool.py uranium-4.4.1/UM/Tool.py --- uranium-3.3.0/UM/Tool.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Tool.py 2019-11-19 10:50:46.000000000 +0000 @@ -1,36 +1,41 @@ -# Copyright (c) 2015 Ultimaker B.V. +# Copyright (c) 2018 Ultimaker B.V. # Uranium is released under the terms of the LGPLv3 or higher. -from UM.Signal import Signal, signalemitter -from UM.PluginObject import PluginObject -from UM.Event import Event -from UM.Scene.Selection import Selection import UM.Application # Circular dependency blah - from UM.Controller import Controller +from UM.Event import Event, MouseEvent +from UM.Math.Plane import Plane #Typing for drag plane. +from UM.Math.Vector import Vector #Typing for drag coordinates. +from UM.PluginObject import PluginObject +from UM.Scene.SceneNode import SceneNode +from UM.Scene.Selection import Selection from UM.Scene.ToolHandle import ToolHandle +from UM.Signal import Signal, signalemitter +from UM.View.SelectionPass import SelectionPass -from typing import Optional - +from typing import cast, List, Optional ## Abstract base class for tools that manipulate (or otherwise interact with) the scene. # @signalemitter class Tool(PluginObject): - def __init__(self): + def __init__(self) -> None: super().__init__() self._controller = UM.Application.Application.getInstance().getController() # Circular dependency blah self._enabled = True self._handle = None # type: Optional[ToolHandle] - self._locked_axis = None - self._drag_plane = None - self._drag_start = None - self._exposed_properties = [] + self._locked_axis = ToolHandle.NoAxis #type: int + self._drag_plane = None #type: Optional[Plane] + self._drag_start = None #type: Optional[Vector] + self._exposed_properties = [] #type: List[str] - self._selection_pass = None + self._selection_pass = None #type: Optional[SelectionPass] self._controller.toolEnabledChanged.connect(self._onToolEnabledChanged) + Selection.selectionChanged.connect(self._onSelectionChanged) + self._selected_objects_without_selected_ancestors = None #type: Optional[List[SceneNode]] + self._shortcut_key = None ## Should be emitted whenever a longer running operation is started, like a drag to scale an object. @@ -45,31 +50,35 @@ propertyChanged = Signal() - def getExposedProperties(self): + def getExposedProperties(self) -> List[str]: return self._exposed_properties - def setExposedProperties(self, *args): - self._exposed_properties = args + def setExposedProperties(self, *args: str): + self._exposed_properties = list(args) def getShortcutKey(self): return self._shortcut_key ## Handle an event. - # \param event \type{Event} The event to handle. - # \return \type{bool} true if this event has been handled and requires - # no further processing. + # \param event The event to handle. + # \return True if this event has been handled and requires no further + # processing. # \sa Event - def event(self, event: Event) -> Optional[bool]: + def event(self, event: Event) -> bool: if not self._selection_pass: - self._selection_pass = UM.Application.Application.getInstance().getRenderer().getRenderPass("selection") + self._selection_pass = cast(SelectionPass, UM.Application.Application.getInstance().getRenderer().getRenderPass("selection")) + if not self._selection_pass: + return False if event.type == Event.ToolActivateEvent: if Selection.hasSelection() and self._handle: self._handle.setParent(self.getController().getScene().getRoot()) + self._handle.setEnabled(True) if event.type == Event.MouseMoveEvent and self._handle: - if self._locked_axis: - return + event = cast(MouseEvent, event) + if self._locked_axis != ToolHandle.NoAxis: + return False tool_id = self._selection_pass.getIdAtPosition(event.x, event.y) @@ -80,7 +89,7 @@ if event.type == Event.ToolDeactivateEvent and self._handle: self._handle.setParent(None) - + self._handle.setEnabled(False) return False ## Convenience function @@ -101,32 +110,39 @@ def setHandle(self, handle: ToolHandle): self._handle = handle - def getLockedAxis(self): + ## Get which axis is locked, if any. + # + # \return The ID of the axis or axes that are locked. See the `ToolHandle` + # class for the associations of IDs to each axis. + def getLockedAxis(self) -> int: return self._locked_axis - def setLockedAxis(self, axis): + def setLockedAxis(self, axis: int) -> None: self._locked_axis = axis if self._handle: self._handle.setActiveAxis(axis) - def getDragPlane(self): + def getDragPlane(self) -> Optional[Plane]: return self._drag_plane - def setDragPlane(self, plane): + def setDragPlane(self, plane: Optional[Plane]) -> None: self._drag_plane = plane - def getDragStart(self): + def getDragStart(self) -> Optional[Vector]: return self._drag_start - def setDragStart(self, x, y): + def setDragStart(self, x: float, y: float) -> None: self._drag_start = self.getDragPosition(x, y) - def getDragPosition(self, x, y): + def getDragPosition(self, x: float, y: float) -> Optional[Vector]: if not self._drag_plane: return None - ray = self._controller.getScene().getActiveCamera().getRay(x, y) + camera = self._controller.getScene().getActiveCamera() + if not camera: + return None + ray = camera.getRay(x, y) target = self._drag_plane.intersectsRay(ray) if target: @@ -134,7 +150,7 @@ return None - def getDragVector(self, x, y): + def getDragVector(self, x: float, y: float) -> Optional[Vector]: if not self._drag_plane: return None @@ -147,6 +163,27 @@ return None - def _onToolEnabledChanged(self, tool_id: str, enabled: bool): + def _onToolEnabledChanged(self, tool_id: str, enabled: bool) -> None: if tool_id == self._plugin_id: self._enabled = enabled + + def _onSelectionChanged(self) -> None: + self._selected_objects_without_selected_ancestors = None + + def _getSelectedObjectsWithoutSelectedAncestors(self) -> List[SceneNode]: + if not isinstance(self._selected_objects_without_selected_ancestors, list): + nodes = Selection.getAllSelectedObjects() + self._selected_objects_without_selected_ancestors = [] + for node in nodes: + has_selected_ancestor = False + ancestor = node.getParent() + while ancestor: + if Selection.isSelected(ancestor): + has_selected_ancestor = True + break + ancestor = ancestor.getParent() + + if not has_selected_ancestor: + self._selected_objects_without_selected_ancestors.append(node) + + return self._selected_objects_without_selected_ancestors diff -Nru uranium-3.3.0/UM/Version.py uranium-4.4.1/UM/Version.py --- uranium-3.3.0/UM/Version.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Version.py 2019-11-19 10:50:46.000000000 +0000 @@ -1,44 +1,57 @@ # Copyright (c) 2018 Ultimaker B.V. # Uranium is released under the terms of the LGPLv3 or higher. +import re # To replace parts of version strings with regex. +from typing import cast, Union, List +from UM.Logger import Logger -import re #To replace parts of version strings with regex. -from typing import Union ## Represents a version number, like "3.2.8" and allows comparison of those # numbers. class Version: + ## Constructs the version instance from a string representing the version. # # The string representation may have dashes or underscores that separate # the major, minor and revision version numbers. All text is ignored. # # \param version A string or bytes representing a version number. - def __init__(self, version: Union[str, bytes]): + def __init__(self, version: Union[str, bytes, int, "Version", List[Union[int, str, bytes]]]) -> None: super().__init__() if type(version) == bytes: + version = cast(bytes, version) version = version.decode("utf-8") if isinstance(version, str): - # Versions are in (MOD-)x.x.x(-x) format. + version = cast(str, version) + # Versions are in (MOD-)x.x.x(-POSTFIX.x) format. version = version.replace("MOD-", "") version = version.replace("-", ".") version = version.replace("_", ".") version = version.replace("\"", "") version = re.sub(r"[A-Z]+", "", version) - version_list = version.split(".") + version_list = version.split(".") # type: ignore elif isinstance(version, list): - version_list = version + version_list = version # type: ignore + elif isinstance(version, int): + version_list = [version] # type: ignore + elif isinstance(version, Version): + version_list = [version.getMajor(), version.getMinor(), version.getRevision(), version.getPostfixType(), version.getPostfixVersion()] # type: ignore else: + Logger.log("w", "Unable to convert version %s of type %s into a usable version", version, type(version)) version_list = [] self._major = 0 self._minor = 0 self._revision = 0 + self._postfix_type = "" + self._postfix_version = 0 try: self._major = int(version_list[0]) self._minor = int(version_list[1]) self._revision = int(version_list[2]) + self._postfix_type = version_list[3] + self._postfix_version = int(version_list[4]) except IndexError: pass except ValueError: @@ -65,6 +78,22 @@ def getRevision(self) -> int: return self._revision + ## Gets the postfix type. + # + # The postfix type is the name of the postfix, e.g. "alpha" in the version "1.2.3-alpha.4" + def getPostfixType(self) -> str: + return self._postfix_type + + ## Gets the postfix version number. + # + # The postfix version is the last number, e.g. "4" in the version "1.2.3-alpha.4" + def getPostfixVersion(self) -> int: + return self._postfix_version + + ## Check if a version has a postfix. + def hasPostFix(self) -> bool: + return self.getPostfixVersion() > 0 and self._postfix_type != "" + ## Indicates whether this version is later than the specified version. # # Implements the > operator. @@ -84,11 +113,33 @@ def __lt__(self, other: Union["Version", str]) -> bool: if isinstance(other, Version): if self._major < other.getMajor(): + # The major version is lower. return True - if self._minor < other.getMinor() and self._major == other.getMajor(): + if self._minor < other.getMinor() \ + and self._major == other.getMajor(): + # The minor version is lower. return True - if self._revision < other.getRevision() and self._major == other.getMajor() and self._minor == other.getMinor(): + if self._revision < other.getRevision() \ + and self._major == other.getMajor() \ + and self._minor == other.getMinor(): + # The revision version is lower. return True + if self.hasPostFix() and other.hasPostFix() \ + and self._postfix_version < other.getPostfixVersion() \ + and self._postfix_type == other.getPostfixType() \ + and self._revision == other.getRevision() \ + and self._major == other.getMajor() \ + and self._minor == other.getMinor(): + # The postfix version is lower. This is only allowed if the postfix type is the same! + return True + if self.hasPostFix() and not other.hasPostFix(): + # If the root version is the same but the other has no postfix, we consider the other larger. + # E.g. Version("1.0.0") > Version("1.0.0-alpha.7") + return Version("{}.{}.{}".format( + self.getMajor(), + self.getMinor(), + self.getRevision() + )) == other return False elif isinstance(other, str): return self < Version(other) @@ -99,13 +150,20 @@ # # Implements the == operator. # \param other Either another version object or a string representing one. - def __eq__(self, other: Union["Version", str]) -> bool: + def __eq__(self, other: object) -> bool: if isinstance(other, Version): - return self._major == other.getMajor() and self._minor == other.getMinor() and self._revision == other.getRevision() - elif isinstance(other, str): + # Direct comparison with same type. + return self._major == other.getMajor() \ + and self._minor == other.getMinor() \ + and self._revision == other.getRevision() \ + and self._postfix_type == other.getPostfixType() \ + and self._postfix_version == other.getPostfixVersion() + + if isinstance(other, str): + # Comparison with string by converting to Version first. return self == Version(other) - else: - return False + + return False ## Indicates whether this version is later or equal to the specified # version. @@ -128,7 +186,11 @@ # # Such as "3.2.8". def __str__(self) -> str: - return "%s.%s.%s" %(self._major, self._minor, self._revision) + if self._postfix_type: + # If we have a postfix, return a string including that postfix. + return "%s.%s.%s-%s.%s"\ + % (self._major, self._minor, self._revision, self._postfix_type, self._postfix_version) + return "%s.%s.%s" % (self._major, self._minor, self._revision) ## Returns a number reasonably representing the identity of the version. def __hash__(self) -> int: diff -Nru uranium-3.3.0/UM/VersionUpgradeManager.py uranium-4.4.1/UM/VersionUpgradeManager.py --- uranium-3.3.0/UM/VersionUpgradeManager.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/VersionUpgradeManager.py 2019-11-19 10:50:46.000000000 +0000 @@ -1,24 +1,24 @@ -# Copyright (c) 2016 Ultimaker B.V. -# Cura is released under the terms of the LGPLv3 or higher. +# Copyright (c) 2018 Ultimaker B.V. +# Uranium is released under the terms of the LGPLv3 or higher. import collections # For deque, for breadth-first search and to track tasks, and namedtuple. import os # To get the configuration file names and to rename files. +import re import traceback +from typing import Any, Dict, Callable, Iterator, List, Optional, Set, Tuple +import UM.Message # To show the "upgrade succeeded" message. +import UM.MimeTypeDatabase # To know how to save the resulting files. +import UM.i18n # To translate the "upgrade succeeded" message. from UM.Application import Application from UM.Logger import Logger -from UM.Platform import Platform +from UM.MimeTypeDatabase import MimeType +from UM.PluginObject import PluginObject from UM.PluginRegistry import PluginRegistry # To find plug-ins. from UM.Resources import Resources # To load old versions from. -import UM.i18n # To translate the "upgrade succeeded" message. -import UM.Message # To show the "upgrade succeeded" message. -import UM.MimeTypeDatabase # To know how to save the resulting files. -import tempfile -import shutil catalogue = UM.i18n.i18nCatalog("uranium") - ## File that needs upgrading, with all the required info to upgrade it. # # Fields are: @@ -33,6 +33,7 @@ ["configuration_type", "version", "files_data", "file_names_without_extension"]) + ## Regulates the upgrading of configuration from one application version to the # next. # @@ -52,31 +53,62 @@ # to the current (upgraded) versions, where they are never loaded again unless # the user manually retrieves the files. class VersionUpgradeManager: - ## The singleton instance of this class. - __instance = None # type: VersionUpgradeManager - - ## Gets the instance of the VersionUpgradeManager, or creates one. - @classmethod - def getInstance(cls) -> "VersionUpgradeManager": - if not cls.__instance: - cls.__instance = VersionUpgradeManager() - return cls.__instance ## Initialises the version upgrade manager. # # This initialises the cache for shortest upgrade routes, and registers # the version upgrade plug-ins. - def __init__(self): - self._version_upgrades = {} #For each config type and each version, gives a set of upgrade plug-ins that can convert them to something else. - self._get_version_functions = {} #For each config type, gives a function with which to get the version number from those files. - self._storage_paths = {} #For each config type, a set of storage paths to search for old config files. - self._current_versions = {} #To know which preference versions and types to upgrade to. - self._upgrade_tasks = collections.deque() #The files that we still have to upgrade. - self._upgrade_routes = {} #How to upgrade from one version to another. Needs to be pre-computed after all version upgrade plug-ins are registered. + def __init__(self, application: Application) -> None: + if VersionUpgradeManager.__instance is not None: + raise RuntimeError("Try to create singleton '%s' more than once" % self.__class__.__name__) + VersionUpgradeManager.__instance = self + + super().__init__() + + self._application = application + self._version_upgrades = {} # type: Dict[Tuple[str, int], Set[Tuple[str, int, Callable[[str, str], Optional[Tuple[List[str], List[str]]]]]]] # For each config type and each version, gives a set of upgrade plug-ins that can convert them to something else. - self._registry = PluginRegistry.getInstance() + # For each config type, gives a function with which to get the version number from those files. + self._get_version_functions = {} # type: Dict[str, Callable[[str], int]] + + # For each config type, a set of storage paths to search for old config files. + self._storage_paths = {} # type: Dict[str, Dict[int, Set[str]]] + + # To know which preference versions and types to upgrade to. + self._current_versions = {} # type: Dict[Tuple[str, int], Any] + + self._upgrade_tasks = collections.deque() # type: collections.deque # The files that we still have to upgrade. + self._upgrade_routes = {} # type: Dict[Tuple[str, int], Tuple[str, int, Callable[[str, str], Optional[Tuple[List[str], List[str]]]]]] #How to upgrade from one version to another. Needs to be pre-computed after all version upgrade plug-ins are registered. + + self._registry = PluginRegistry.getInstance() # type: PluginRegistry PluginRegistry.addType("version_upgrade", self._addVersionUpgrade) + #Regular expressions of the files that should not be checked, such as log files. + self._ignored_files = [ + ".*\.lock", # Don't upgrade the configuration file lock. It's not persistent. + "plugins\.json", # plugins.json and packages.json need to remain the same for the version upgrade plug-ins. + "packages\.json", + ".*\.log", # Don't process the log. It's not needed and it could be really big. + "3.[0-3]\\.*", # Don't upgrade folders that are back-ups from older version upgrades. Until v3.3 we stored the back-up in the config folder itself. + "3.[0-3]/.*", + "2.[0-7]\\.*", + "2.[0-7]/.*", + "cura\\.*", + "cura/.*", + "plugins\\.*", # Don't upgrade manually installed plug-ins. + "plugins/.*", + "./*packages\.json", + "./*plugins\.json" + ] # type: List[str] + + ## Registers a file to be ignored by version upgrade checks (eg log files). + # \param file_name The base file name of the file to be ignored. + + def registerIgnoredFile(self, file_name: str) -> None: + # Convert the file name to a regular expresion to add to the ignored files + file_name_regex = re.escape(file_name) + self._ignored_files.append(file_name_regex) + ## Gets the paths where a specified type of file should be stored. # # This differs from the storage path in the Resources class, since it also @@ -85,7 +117,7 @@ # # \param configuration_type The type of configuration to be stored. # \return A set of storage paths for the specified configuration type. - def getStoragePaths(self, configuration_type): + def getStoragePaths(self, configuration_type: str) -> Dict[int, Set[str]]: return self._storage_paths[configuration_type] ## Changes the target versions to upgrade to. @@ -93,10 +125,10 @@ # \param current_versions A dictionary of tuples of configuration types # and their versions currently in use, and with each of these a tuple of # where to store this type of file and its MIME type. - def setCurrentVersions(self, current_versions): + def setCurrentVersions(self, current_versions: Dict[Tuple[str, int], Any]) -> None: self._current_versions = current_versions - def registerCurrentVersion(self, version_info, type_info): + def registerCurrentVersion(self, version_info: Tuple[str, int], type_info: Any) -> None: if version_info in self._current_versions: Logger.log("d", "Overwriting current version info: %s", repr(version_info)) self._current_versions[version_info] = type_info @@ -109,18 +141,18 @@ # # \return True if anything was upgraded, or False if it was already up to # date. - def upgrade(self): + def upgrade(self) -> bool: Logger.log("i", "Looking for old configuration files to upgrade.") - self._upgrade_tasks.extend(self._getUpgradeTasks()) #Get the initial files to upgrade. - self._upgrade_routes = self._findShortestUpgradeRoutes() #Pre-compute the upgrade routes. + self._upgrade_tasks.extend(self._getUpgradeTasks()) # Get the initial files to upgrade. + self._upgrade_routes = self._findShortestUpgradeRoutes() # Pre-compute the upgrade routes. - upgraded = False #Did we upgrade something? + upgraded = False # Did we upgrade something? while self._upgrade_tasks: upgrade_task = self._upgrade_tasks.popleft() - self._upgradeFile(upgrade_task.storage_path, upgrade_task.file_name, upgrade_task.configuration_type) #Upgrade this file. + self._upgradeFile(upgrade_task.storage_path, upgrade_task.file_name, upgrade_task.configuration_type) # Upgrade this file. if upgraded: - message = UM.Message.Message(text=catalogue.i18nc("@info:version-upgrade", "A configuration from an older version of {0} was imported.", Application.getInstance().getApplicationName()), title = catalogue.i18nc("@info:title", "Version Upgrade")) + message = UM.Message.Message(text = catalogue.i18nc("@info:version-upgrade", "A configuration from an older version of {0} was imported.", Application.getInstance().getApplicationName()), title = catalogue.i18nc("@info:title", "Version Upgrade")) message.show() return upgraded @@ -140,7 +172,7 @@ # \param file_name The path to the file to upgrade, relative to the # storage path. # \param configuration_type The file type of the specified file. - def upgradeExtraFile(self, storage_path, file_name, configuration_type): + def upgradeExtraFile(self, storage_path: str, file_name: str, configuration_type: str) -> None: self._upgrade_tasks.append(UpgradeTask(storage_path = storage_path, file_name = file_name, configuration_type = configuration_type)) # private: @@ -153,28 +185,39 @@ # # \param version_upgrade_plugin The plug-in object of the version upgrade # plug-in. - def _addVersionUpgrade(self, version_upgrade_plugin): + def _addVersionUpgrade(self, version_upgrade_plugin: PluginObject) -> None: meta_data = self._registry.getMetaData(version_upgrade_plugin.getPluginId()) if "version_upgrade" not in meta_data: Logger.log("w", "Version upgrade plug-in %s doesn't define any configuration types it can upgrade.", version_upgrade_plugin.getPluginId()) - return #Don't need to add. + return # Don't need to add. + + # Take a note of the source version of each configuration type. The source directories defined in each version + # upgrade should only be limited to that version. + src_version_dict = {} + for item in meta_data.get("version_upgrade", {}): + configuration_type, src_version = item + src_version_dict[configuration_type] = src_version - #Additional metadata about the source types: How to recognise the version and where to find them. + # Additional metadata about the source types: How to recognise the version and where to find them. if "sources" in meta_data: for configuration_type, source in meta_data["sources"].items(): if "get_version" in source: - self._get_version_functions[configuration_type] = source["get_version"] #May overwrite from other plug-ins that can also load the same configuration type. + self._get_version_functions[configuration_type] = source["get_version"] # May overwrite from other plug-ins that can also load the same configuration type. if "location" in source: - if configuration_type not in self._storage_paths: - self._storage_paths[configuration_type] = set() - self._storage_paths[configuration_type] |= source["location"] + if configuration_type in src_version_dict: + src_version = src_version_dict[configuration_type] + if configuration_type not in self._storage_paths: + self._storage_paths[configuration_type] = {} + if src_version not in self._storage_paths[configuration_type]: + self._storage_paths[configuration_type][src_version] = set() + self._storage_paths[configuration_type][src_version] |= source["location"] upgrades = self._registry.getMetaData(version_upgrade_plugin.getPluginId())["version_upgrade"] - for source, destination in upgrades.items(): #Each conversion that this plug-in can perform. + for source, destination in upgrades.items(): # Each conversion that this plug-in can perform. source_type, source_version = source destination_type, destination_version, upgrade_function = destination - #Fill in the dictionary representing the graph, if it doesn't have the keys yet. + # Fill in the dictionary representing the graph, if it doesn't have the keys yet. if (destination_type, destination_version) not in self._version_upgrades: self._version_upgrades[(destination_type, destination_version)] = set() self._version_upgrades[(destination_type, destination_version)].add((source_type, source_version, upgrade_function)) #Add the edge to the graph. @@ -185,22 +228,23 @@ # \return A dictionary of type/version pairs that map to functions that # upgrade said data format one step towards the most recent version, such # that the fewest number of steps is required. - def _findShortestUpgradeRoutes(self): - result = {} #For each (type, version) tuple, which upgrade function to use to upgrade it towards the newest versions. + def _findShortestUpgradeRoutes(self) -> Dict[Tuple[str, int], Tuple[str, int, Callable[[str, str], Optional[Tuple[List[str], List[str]]]]]]: + # For each (type, version) tuple, which upgrade function to use to upgrade it towards the newest versions. + result = {} # type: Dict[Tuple[str, int], Tuple[str, int, Callable[[str, str], Optional[Tuple[List[str], List[str]]]]]] - #Perform a many-to-many shortest path search with Dijkstra's algorithm. - front = collections.deque() #Use as a queue for breadth-first iteration: Append right, pop left. + # Perform a many-to-many shortest path search with Dijkstra's algorithm. + front = collections.deque() # type: collections.deque #Use as a queue for breadth-first iteration: Append right, pop left. for configuration_type, version in self._current_versions: front.append((configuration_type, version)) - explored_versions = set() + explored_versions = set() # type: Set[Tuple[str, int]] while len(front) > 0: - destination_type, destination_version = front.popleft() #To make it a queue, pop on the opposite side of where you append! - if (destination_type, destination_version) in self._version_upgrades: #We can upgrade to this version. + destination_type, destination_version = front.popleft() # To make it a queue, pop on the opposite side of where you append! + if (destination_type, destination_version) in self._version_upgrades: # We can upgrade to this version. for source_type, source_version, upgrade_function in self._version_upgrades[(destination_type, destination_version)]: if (source_type, source_version) in explored_versions: continue front.append((source_type, source_version)) - if (source_type, source_version) not in result: #First time we encounter this version. Due to breadth-first search, this must be part of the shortest route then. + if (source_type, source_version) not in result: # First time we encounter this version. Due to breadth-first search, this must be part of the shortest route then. result[(source_type, source_version)] = (destination_type, destination_version, upgrade_function) explored_versions.add((destination_type, destination_version)) @@ -212,90 +256,70 @@ # the specified directory). # # \param directory The directory to read the files from. - # \return The filename of each file relative to the specified directory. - def _getFilesInDirectory(self, directory): - for (path, directory_names, filenames) in os.walk(directory, topdown = True): - directory_names[:] = [] # Only go to one level. - for filename in filenames: + # \return The filename of each file relative to the specified directory. Note that without an * in the path, it + # will not look at sub directories. + def _getFilesInDirectory(self, directory: str) -> Iterator[str]: + include_sub_dirs = directory.endswith("*") + directory_to_search = directory + if include_sub_dirs: + # Remove the * from the directory to search. + directory_to_search = directory[:-1] + for path, directory_names, file_names in os.walk(directory_to_search, topdown = True): + if not include_sub_dirs: + # Delete the list of sub dirs. + directory_names.clear() + for filename in file_names: relative_path = os.path.relpath(path, directory) yield os.path.join(relative_path, filename) ## Gets all files that need to be upgraded. # # \return A sequence of UpgradeTasks of files to upgrade. - def _getUpgradeTasks(self): + def _getUpgradeTasks(self) -> Iterator[UpgradeTask]: storage_path_prefixes = set() storage_path_prefixes.add(Resources.getConfigStoragePath()) storage_path_prefixes.add(Resources.getDataStoragePath()) - for old_configuration_type, storage_paths in self._storage_paths.items(): - for prefix in storage_path_prefixes: - for storage_path in storage_paths: - path = os.path.join(prefix, storage_path) - for configuration_file in self._getFilesInDirectory(path): - yield UpgradeTask(storage_path = path, file_name = configuration_file, configuration_type = old_configuration_type) - - def copyVersionFolder(self, src_path, dest_path): - Logger.log("i", "Copying directory from '%s' to '%s'", src_path, dest_path) - # we first copy everything to a temporary folder, and then move it to the new folder - base_dir_name = os.path.basename(src_path) - temp_root_dir_path = tempfile.mkdtemp("cura-copy") - temp_dir_path = os.path.join(temp_root_dir_path, base_dir_name) - # src -> temp -> dest - shutil.copytree(src_path, temp_dir_path) - shutil.move(temp_dir_path, dest_path) - - ## Stores an old version of a configuration file away. - # - # This old file is intended as a back-up. It will be stored in the ./old - # directory in the resource directory, in a subdirectory made specifically - # for the version of the old file. The subdirectory will mirror the - # directory structure of the original directory. - # - # \param resource_directory The resource directory of the configuration - # type of the file in question. - # \param relative_path The path relative to the resource directory to the - # file in question. - # \param old_version The version number in the file in question. - def _storeOldFile(self, resource_directory, relative_path, old_version): - old_path = os.path.join(resource_directory, relative_path) - old_path = os.path.abspath(old_path) - if Platform.isWindows(): - # remove all unnecessary "\.\"s because it won't work with network storage on Windows - # os.abspath and os.normpath cannot remove all of them, so we need this manual step - while "\\.\\" in old_path: - old_path = old_path.replace("\\.\\", "\\") - - newpath = os.path.join(resource_directory, "old", str(old_version), relative_path) - newpath = os.path.abspath(newpath) - if Platform.isWindows(): - # remove all unnecessary "\.\"s because it won't work with network storage on Windows - # os.abspath and os.normpath cannot remove all of them, so we need this manual step - while "\\.\\" in newpath: - newpath = newpath.replace("\\.\\", "\\") - newpath_dir = os.path.dirname(newpath) - - if os.path.exists(newpath): #If we've updated previously but this old version was launched again, overwrite the old configuration. - try: - os.remove(newpath) - except OSError: #Couldn't remove. Permissions? - return - try: #For speed, first just try to rename the file without checking if the directory exists and stuff. - os.rename(old_path, newpath) #Store the old file away. - except FileNotFoundError: #Assume the target directory doesn't exist yet. The other case is that the file itself doesn't exist, but that's a coding error anyway. - try: - os.makedirs(newpath_dir, exist_ok = True) - except OSError: #Assume that the directory already existed. Otherwise it's probably a permission error or OS-internal error, in which case we can't write anyway. - pass - try: - os.rename(old_path, newpath) #Try again! - except FileExistsError: #Couldn't remove the old file for some other reason. Internal OS error? - pass - except FileExistsError: - pass + + # Make sure the types and paths are ordered so we always get the same results. + self._storage_paths = collections.OrderedDict(sorted(self._storage_paths.items())) + for key in self._storage_paths: + self._storage_paths[key] = collections.OrderedDict(sorted(self._storage_paths[key].items())) + + # Use pattern: /^(pattern_a|pattern_b|pattern_c|...)$/ + combined_regex_ignored_files = "^(" + "|".join(self._ignored_files) + ")" + for old_configuration_type, version_storage_paths_dict in self._storage_paths.items(): + for src_version, storage_paths in version_storage_paths_dict.items(): + for prefix in storage_path_prefixes: + for storage_path in storage_paths: + path = os.path.join(prefix, storage_path) + for configuration_file in self._getFilesInDirectory(path): + # Get file version. Only add this upgrade task if the current file version matches with + # the defined version that scans through this folder. + if re.match(combined_regex_ignored_files, configuration_file): + continue + try: + with open(os.path.join(path, configuration_file), "r", encoding = "utf-8") as f: + file_version = self._get_version_functions[old_configuration_type](f.read()) + if file_version != src_version: + continue + except: + Logger.log("w", "Failed to get file version: %s, skip it", configuration_file) + continue + + Logger.log("i", "Create upgrade task for configuration file [%s] with type [%s] and source version [%s]", + configuration_file, old_configuration_type, file_version) + yield UpgradeTask(storage_path = path, file_name = configuration_file, + configuration_type = old_configuration_type) ## Gets the version of the given file data - def getFileVersion(self, configuration_type, file_data): - return self._get_version_functions[configuration_type](file_data) + def getFileVersion(self, configuration_type: str, file_data: str) -> Optional[int]: + if configuration_type not in self._get_version_functions: + return None + try: + return self._get_version_functions[configuration_type](file_data) + except: + Logger.logException("w", "Unable to get version from file.") + return None ## Upgrades a single file to any version in self._current_versions. # @@ -307,7 +331,7 @@ # \param old_configuration_type The type of the configuration file before # upgrading it. # \return True if the file was successfully upgraded, or False otherwise. - def _upgradeFile(self, storage_path_absolute, configuration_file, old_configuration_type): + def _upgradeFile(self, storage_path_absolute: str, configuration_file: str, old_configuration_type: str) -> bool: configuration_file_absolute = os.path.join(storage_path_absolute, configuration_file) # Read the old file. @@ -327,6 +351,7 @@ old_version = self._get_version_functions[old_configuration_type](files_data[0]) except: # Version getter gives an exception. Not a valid file. Can't upgrade it then. return False + version = old_version configuration_type = old_configuration_type @@ -337,20 +362,18 @@ return False filenames_without_extension = [self._stripMimeTypeExtension(mime_type, configuration_file)] - result_data = self.updateFilesData(configuration_type, version, - files_data, filenames_without_extension) + result_data = self.updateFilesData(configuration_type, version, files_data, filenames_without_extension) if not result_data: return False configuration_type, version, files_data, filenames_without_extension = result_data # If the version changed, save the new files. if version != old_version or configuration_type != old_configuration_type: - self._storeOldFile(storage_path_absolute, configuration_file, old_version) # Finding out where to store these files. - resource_type, mime_type = self._current_versions[(configuration_type, version)] + resource_type, mime_type_name = self._current_versions[(configuration_type, version)] storage_path = Resources.getStoragePathForType(resource_type) - mime_type = UM.MimeTypeDatabase.MimeTypeDatabase.getMimeType(mime_type) # Get the actual MIME type object, from the name. + mime_type = UM.MimeTypeDatabase.MimeTypeDatabase.getMimeType(mime_type_name) # Get the actual MIME type object, from the name. if mime_type.preferredSuffix: extension = "." + mime_type.preferredSuffix elif mime_type.suffixes: @@ -371,7 +394,7 @@ return True return False # Version didn't change. Was already current. - def updateFilesData(self, configuration_type, version, files_data, file_names_without_extension): + def updateFilesData(self, configuration_type: str, version: int, files_data: List[str], file_names_without_extension: List[str]) -> Optional[FilesDataUpdateResult]: old_configuration_type = configuration_type # Keep converting the file until it's at one of the current versions. @@ -380,12 +403,12 @@ # No version upgrade plug-in claims to be able to upgrade this file. return None new_type, new_version, upgrade_step = self._upgrade_routes[(configuration_type, version)] - new_file_names_without_extension = [] - new_files_data = [] + new_file_names_without_extension = [] # type: List[str] + new_files_data = [] # type: List[str] for file_idx, file_data in enumerate(files_data): try: upgrade_step_result = upgrade_step(file_data, file_names_without_extension[file_idx]) - except Exception as e: # Upgrade failed due to a coding error in the plug-in. + except Exception: # Upgrade failed due to a coding error in the plug-in. Logger.logException("w", "Exception in %s upgrade with %s: %s", old_configuration_type, upgrade_step.__module__, traceback.format_exc()) return None @@ -402,12 +425,12 @@ version = new_version configuration_type = new_type - return FilesDataUpdateResult(configuration_type=configuration_type, - version=version, - files_data=files_data, - file_names_without_extension=file_names_without_extension) + return FilesDataUpdateResult(configuration_type = configuration_type, + version = version, + files_data = files_data, + file_names_without_extension = file_names_without_extension) - def _stripMimeTypeExtension(self, mime_type, file_name): + def _stripMimeTypeExtension(self, mime_type: MimeType, file_name: str) -> str: suffixes = mime_type.suffixes[:] if mime_type.preferredSuffix: suffixes.append(mime_type.preferredSuffix) @@ -416,3 +439,9 @@ return file_name[: -len(suffix) - 1] # last -1 is for the dot separating name and extension. return file_name + + __instance = None # type: VersionUpgradeManager + + @classmethod + def getInstance(cls, *args, **kwargs) -> "VersionUpgradeManager": + return cls.__instance diff -Nru uranium-3.3.0/UM/View/CompositePass.py uranium-4.4.1/UM/View/CompositePass.py --- uranium-3.3.0/UM/View/CompositePass.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/View/CompositePass.py 2019-11-19 10:50:46.000000000 +0000 @@ -1,4 +1,4 @@ -# Copyright (c) 2015 Ultimaker B.V. +# Copyright (c) 2018 Ultimaker B.V. # Uranium is released under the terms of the LGPLv3 or higher. from UM.Application import Application @@ -12,7 +12,7 @@ MYPY = False if MYPY: - from UM.View.GL import ShaderProgram + from UM.View.GL.ShaderProgram import ShaderProgram ## A RenderPass subclass providing the final composition render. diff -Nru uranium-3.3.0/UM/View/GL/FrameBufferObject.py uranium-4.4.1/UM/View/GL/FrameBufferObject.py --- uranium-3.3.0/UM/View/GL/FrameBufferObject.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/View/GL/FrameBufferObject.py 2019-11-19 10:50:46.000000000 +0000 @@ -1,7 +1,7 @@ -# Copyright (c) 2015 Ultimaker B.V. +# Copyright (c) 2018 Ultimaker B.V. # Uranium is released under the terms of the LGPLv3 or higher. -from PyQt5.QtGui import QOpenGLFramebufferObject, QOpenGLFramebufferObjectFormat +from PyQt5.QtGui import QImage, QOpenGLFramebufferObject, QOpenGLFramebufferObjectFormat ## An interface for OpenGL FrameBuffer Objects. # @@ -18,20 +18,20 @@ self._contents = None ## Get the texture ID of the texture target of this FBO. - def getTextureId(self): + def getTextureId(self) -> int: return self._fbo.texture() ## Bind the FBO so it can be rendered to. - def bind(self): + def bind(self) -> None: self._contents = None self._fbo.bind() ## Release the FBO so it will no longer be rendered to. - def release(self): + def release(self) -> None: self._fbo.release() ## Get the contents of the FBO as an image data object. - def getContents(self): + def getContents(self) -> QImage: if not self._contents: self._contents = self._fbo.toImage() diff -Nru uranium-3.3.0/UM/View/GL/OpenGLContext.py uranium-4.4.1/UM/View/GL/OpenGLContext.py --- uranium-3.3.0/UM/View/GL/OpenGLContext.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/View/GL/OpenGLContext.py 2019-11-19 10:50:46.000000000 +0000 @@ -1,18 +1,18 @@ -# Copyright (c) 2017 Ultimaker B.V. +# Copyright (c) 2019 Ultimaker B.V. # Uranium is released under the terms of the LGPLv3 or higher. from typing import Dict -from PyQt5.QtGui import QOpenGLContext, QSurfaceFormat +from PyQt5.QtGui import QOpenGLVersionProfile, QOpenGLContext, QSurfaceFormat, QWindow from UM.Logger import Logger -class OpenGLContext(object): +class OpenGLContext: ## Set OpenGL context, given major, minor version + core using QOpenGLContext # Unfortunately, what you get back does not have to be the requested version. @classmethod - def setContext(cls, major_version, minor_version, core = False, profile = None): + def setContext(cls, major_version: int, minor_version: int, core = False, profile = None): new_format = QSurfaceFormat() new_format.setMajorVersion(major_version) new_format.setMinorVersion(minor_version) @@ -40,7 +40,7 @@ # # \return True if the extension is available, False if not. @classmethod - def hasExtension(cls, extension_name, ctx = None): + def hasExtension(cls, extension_name: str, ctx = None) -> bool: if ctx is None: ctx = QOpenGLContext.currentContext() return ctx.hasExtension(bytearray(extension_name, "utf-8")) @@ -49,7 +49,7 @@ # # \param ctx (optional) context. @classmethod - def supportsVertexArrayObjects(cls, ctx = None): + def supportsVertexArrayObjects(cls, ctx = None) -> bool: if ctx is None: ctx = QOpenGLContext.currentContext() result = False @@ -68,7 +68,7 @@ # \param core (optional) True for QSurfaceFormat.CoreProfile, False for CompatibilityProfile # \param profile (optional) QSurfaceFormat.CoreProfile, CompatibilityProfile or NoProfile, overrules option core @classmethod - def setDefaultFormat(cls, major_version, minor_version, core = False, profile = None): + def setDefaultFormat(cls, major_version: int, minor_version: int, core = False, profile = None) -> None: new_format = QSurfaceFormat() new_format.setMajorVersion(major_version) new_format.setMinorVersion(minor_version) @@ -87,17 +87,19 @@ ## Return if the OpenGL context version we ASKED for is legacy or not @classmethod - def isLegacyOpenGL(cls): + def isLegacyOpenGL(cls) -> bool: if cls.major_version < 4: return True if cls.major_version == 4 and cls.minor_version < 1: return True return False - ## Return "best" OpenGL to use, 4.1 core or 2.1. + ## Return "best" OpenGL to use, 4.1 core or 2.0. # result is , , # The version depends on what versions are supported in Qt (4.1 and 2.0) and what # the GPU supports. If creating a context fails at all, (None, None, None) is returned + # Note that PyQt only supports 4.1, 2.1 and 2.0. Cura omits support for 2.1, so the + # only returned options are 4.1 and 2.0. @classmethod def detectBestOpenGLVersion(cls): Logger.log("d", "Trying OpenGL context 4.1...") @@ -111,7 +113,57 @@ Logger.log("d", "Yay, we got at least OpenGL 4.1 core: %s", cls.versionAsText(fmt.majorVersion(), fmt.minorVersion(), profile)) - return 4, 1, QSurfaceFormat.CoreProfile + + # https://riverbankcomputing.com/pipermail/pyqt/2017-January/038640.html + # PyQt currently only implements 2.0, 2.1 and 4.1Core + # If eg 4.5Core would be detected and used here, PyQt would not be able to handle it. + major_version = 4 + minor_version = 1 + + # CURA-6092: Check if we're not using software backed 4.1 context; A software 4.1 context + # is much slower than a hardware backed 2.0 context + gl_window = QWindow() + gl_window.setSurfaceType(QWindow.OpenGLSurface) + gl_window.showMinimized() + + gl_format = QSurfaceFormat() + gl_format.setMajorVersion(major_version) + gl_format.setMinorVersion(minor_version) + gl_format.setProfile(profile) + + gl_context = QOpenGLContext() + gl_context.setFormat(gl_format) + gl_context.create() + gl_context.makeCurrent(gl_window) + + gl_profile = QOpenGLVersionProfile() + gl_profile.setVersion(major_version, minor_version) + gl_profile.setProfile(profile) + + gl = gl_context.versionFunctions(gl_profile) # type: Any #It's actually a protected class in PyQt that depends on the requested profile and the implementation of your graphics card. + + gpu_type = "Unknown" # type: str + + result = None + if gl: + result = gl.initializeOpenGLFunctions() + + if not result: + Logger.log("e", "Could not initialize OpenGL to get gpu type") + else: + # WORKAROUND: Cura/#1117 Cura-packaging/12 + # Some Intel GPU chipsets return a string, which is not undecodable via PyQt5. + # This workaround makes the code fall back to a "Unknown" renderer in these cases. + try: + gpu_type = gl.glGetString(gl.GL_RENDERER) #type: str + except UnicodeDecodeError: + Logger.log("e", "DecodeError while getting GL_RENDERER via glGetString!") + + Logger.log("d", "OpenGL renderer type for this OpenGL version: %s", gpu_type) + if "software" in gpu_type.lower(): + Logger.log("w", "Unfortunately OpenGL 4.1 uses software rendering") + else: + return major_version, minor_version, QSurfaceFormat.CoreProfile else: Logger.log("d", "Failed to create OpenGL context 4.1.") @@ -138,7 +190,7 @@ ## Return OpenGL version number and profile as a nice formatted string @classmethod - def versionAsText(cls, major_version, minor_version, profile): + def versionAsText(cls, major_version: int, minor_version: int, profile) -> str: if profile == QSurfaceFormat.CompatibilityProfile: xtra = "Compatibility profile" elif profile == QSurfaceFormat.CoreProfile: @@ -154,5 +206,5 @@ minor_version = 0 profile = None # type: QSurfaceFormat - # to be filled by helper functions - properties = {} # type: Dict[str, bool] + # To be filled by helper functions + properties = {} # type: Dict[str, bool] diff -Nru uranium-3.3.0/UM/View/GL/OpenGL.py uranium-4.4.1/UM/View/GL/OpenGL.py --- uranium-3.3.0/UM/View/GL/OpenGL.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/View/GL/OpenGL.py 2019-11-19 10:50:46.000000000 +0000 @@ -1,26 +1,28 @@ -# Copyright (c) 2017 Ultimaker B.V. +# Copyright (c) 2019 Ultimaker B.V. # Uranium is released under the terms of the LGPLv3 or higher. import sys import ctypes # type: ignore -from PyQt5.QtGui import QOpenGLVersionProfile, QOpenGLContext, QOpenGLFramebufferObject, QOpenGLBuffer, QSurfaceFormat +from PyQt5.QtGui import QOpenGLVersionProfile, QOpenGLContext, QOpenGLFramebufferObject, QOpenGLBuffer from PyQt5.QtWidgets import QMessageBox +from typing import Any, TYPE_CHECKING, cast from UM.Logger import Logger -from UM.View.GL import FrameBufferObject -from UM.View.GL import ShaderProgram +from UM.Version import Version +from UM.View.GL.FrameBufferObject import FrameBufferObject +from UM.View.GL.ShaderProgram import ShaderProgram from UM.View.GL.ShaderProgram import InvalidShaderProgramError -from UM.View.GL import Texture +from UM.View.GL.Texture import Texture from UM.View.GL.OpenGLContext import OpenGLContext from UM.i18n import i18nCatalog # To make dialogs translatable. i18n_catalog = i18nCatalog("uranium") -MYPY = False -if MYPY: +if TYPE_CHECKING: from UM.Mesh.MeshData import MeshData + ## Convenience methods for dealing with OpenGL. # # This class simplifies dealing with OpenGL and different Python OpenGL bindings. It @@ -39,12 +41,23 @@ Intel = 3 Other = 4 - def __init__(self): + def __init__(self) -> None: + if OpenGL.__instance is not None: + raise RuntimeError("Try to create singleton '%s' more than once" % self.__class__.__name__) + OpenGL.__instance = self + + super().__init__() + profile = QOpenGLVersionProfile() profile.setVersion(OpenGLContext.major_version, OpenGLContext.minor_version) profile.setProfile(OpenGLContext.profile) - self._gl = QOpenGLContext.currentContext().versionFunctions(profile) + context = QOpenGLContext.currentContext() + if not context: + Logger.log("e", "Startup failed due to OpenGL context creation failing") + QMessageBox.critical(None, i18n_catalog.i18nc("@message", "Failed to Initialize OpenGL", "Could not initialize an OpenGL context. This program requires OpenGL 2.0 or higher. Please check your video card drivers.")) + sys.exit(1) + self._gl = context.versionFunctions(profile) # type: Any #It's actually a protected class in PyQt that depends on the implementation of your graphics card. if not self._gl: Logger.log("e", "Startup failed due to OpenGL initialization failing") QMessageBox.critical(None, i18n_catalog.i18nc("@message", "Failed to Initialize OpenGL", "Could not initialize OpenGL. This program requires OpenGL 2.0 or higher. Please check your video card drivers.")) @@ -56,13 +69,13 @@ # those methods, in this case primarily QOpenGLFrameBufferObject::toImage(), making us # hard-depend on FrameBuffer Objects. if not self.hasFrameBufferObjects(): - Logger.log("e", "Starup failed, OpenGL does not support Frame Buffer Objects") + Logger.log("e", "Startup failed, OpenGL does not support Frame Buffer Objects") QMessageBox.critical(None, i18n_catalog.i18nc("Critical OpenGL Extensions Missing", "Critical OpenGL extensions are missing. This program requires support for Framebuffer Objects. Please check your video card drivers.")) sys.exit(1) self._gl.initializeOpenGLFunctions() - self._gpu_vendor = OpenGL.Vendor.Other + self._gpu_vendor = OpenGL.Vendor.Other #type: int vendor_string = self._gl.glGetString(self._gl.GL_VENDOR) if vendor_string is None: vendor_string = "Unknown" @@ -75,6 +88,7 @@ elif "intel" in vendor_string: self._gpu_vendor = OpenGL.Vendor.Intel + self._gpu_type = "Unknown" # type: str # WORKAROUND: Cura/#1117 Cura-packaging/12 # Some Intel GPU chipsets return a string, which is not undecodable via PyQt5. # This workaround makes the code fall back to a "Unknown" renderer in these cases. @@ -82,9 +96,14 @@ self._gpu_type = self._gl.glGetString(self._gl.GL_RENDERER) except UnicodeDecodeError: Logger.log("e", "DecodeError while getting GL_RENDERER via glGetString!") - self._gpu_type = "Unknown" - self._opengl_version = self._gl.glGetString(self._gl.GL_VERSION) + self._opengl_version = self._gl.glGetString(self._gl.GL_VERSION) #type: str + + self._opengl_shading_language_version = Version("0.0") # type: Version + try: + self._opengl_shading_language_version = Version(self._gl.glGetString(self._gl.GL_SHADING_LANGUAGE_VERSION)) + except: + self._opengl_shading_language_version = Version("1.0") if not self.hasFrameBufferObjects(): Logger.log("w", "No frame buffer support, falling back to texture copies.") @@ -93,6 +112,7 @@ Logger.log("d", "OpenGL Version: %s", self._opengl_version) Logger.log("d", "OpenGL Vendor: %s", self._gl.glGetString(self._gl.GL_VENDOR)) Logger.log("d", "OpenGL Renderer: %s", self._gpu_type) + Logger.log("d", "GLSL Version: %s", self._opengl_shading_language_version) ## Check if the current OpenGL implementation supports FrameBuffer Objects. # @@ -103,25 +123,31 @@ ## Get the current OpenGL version. # # \return Version of OpenGL - def getOpenGLVersion(self): + def getOpenGLVersion(self) -> str: return self._opengl_version + ## Get the current OpenGL shading language version. + # + # \return Shading language version of OpenGL + def getOpenGLShadingLanguageVersion(self) -> "Version": + return self._opengl_shading_language_version + ## Get the current GPU vendor name. # # \return Name of the vendor of current GPU - def getGPUVendorName(self): + def getGPUVendorName(self) -> str: return self._gl.glGetString(self._gl.GL_VENDOR) ## Get the current GPU vendor. # # \return One of the items of OpenGL.Vendor. - def getGPUVendor(self): + def getGPUVendor(self) -> int: return self._gpu_vendor ## Get a string describing the current GPU type. # # This effectively should return the OpenGL renderer string. - def getGPUType(self): + def getGPUType(self) -> str: return self._gpu_type ## Get the OpenGL bindings object. @@ -136,20 +162,20 @@ ## Create a FrameBuffer Object. # # This should return an implementation-specifc FrameBufferObject subclass. - def createFrameBufferObject(self, width, height): - return FrameBufferObject.FrameBufferObject(width, height) + def createFrameBufferObject(self, width: int, height: int) -> FrameBufferObject: + return FrameBufferObject(width, height) ## Create a Texture Object. # - # This should return an implementation-specifc Texture subclass. - def createTexture(self): - return Texture.Texture(self._gl) + # This should return an implementation-specific Texture subclass. + def createTexture(self) -> Texture: + return Texture(self._gl) ## Create a ShaderProgram Object. # # This should return an implementation-specifc ShaderProgram subclass. def createShaderProgram(self, file_name: str) -> ShaderProgram: - shader = ShaderProgram.ShaderProgram() + shader = ShaderProgram() # The version_string must match the keys in shader files. if OpenGLContext.isLegacyOpenGL(): version_string = "" # Nothing is added to "fragment" and "vertex" @@ -157,7 +183,7 @@ version_string = "41core" try: - shader.load(file_name, version=version_string) + shader.load(file_name, version = version_string) except InvalidShaderProgramError: # If the loading failed, it could be that there is no specific shader for this version. # Try again without a version nr to get the generic one. @@ -178,7 +204,7 @@ # \param kwargs Keyword arguments. # Possible values: # - force_recreate: Ignore the cached value if set and always create a new buffer. - def createVertexBuffer(self, mesh: "MeshData", **kwargs) -> QOpenGLBuffer: + def createVertexBuffer(self, mesh: "MeshData", **kwargs: Any) -> QOpenGLBuffer: if not kwargs.get("force_recreate", False) and hasattr(mesh, OpenGL.VertexBufferProperty): return getattr(mesh, OpenGL.VertexBufferProperty) @@ -218,17 +244,17 @@ offset += len(vertices) if mesh.hasNormals(): - normals = mesh.getNormalsAsByteArray() + normals = cast(bytes, mesh.getNormalsAsByteArray()) buffer.write(offset, normals, len(normals)) offset += len(normals) if mesh.hasColors(): - colors = mesh.getColorsAsByteArray() + colors = cast(bytes, mesh.getColorsAsByteArray()) buffer.write(offset, colors, len(colors)) offset += len(colors) if mesh.hasUVCoordinates(): - uvs = mesh.getUVCoordinatesAsByteArray() + uvs = cast(bytes, mesh.getUVCoordinatesAsByteArray()) buffer.write(offset, uvs, len(uvs)) offset += len(uvs) @@ -256,7 +282,7 @@ # \param kwargs Keyword arguments. # Possible values: # - force_recreate: Ignore the cached value if set and always create a new buffer. - def createIndexBuffer(self, mesh, **kwargs): + def createIndexBuffer(self, mesh: "MeshData", **kwargs: Any): if not mesh.hasIndices(): return None @@ -267,7 +293,7 @@ buffer.create() buffer.bind() - data = mesh.getIndicesAsByteArray() + data = cast(bytes, mesh.getIndicesAsByteArray()) # We check for None at the beginning of the method if 'index_start' in kwargs and 'index_stop' in kwargs: buffer.allocate(data[4 * kwargs['index_start']:4 * kwargs['index_stop']], 4*(kwargs['index_stop'] - kwargs['index_start'])) else: @@ -277,21 +303,8 @@ setattr(mesh, OpenGL.IndexBufferProperty, buffer) return buffer + __instance = None # type: OpenGL - ## Get the singleton instance. - # - # \return The singleton instance. - @classmethod - def getInstance(cls) -> "OpenGL": - return cls._instance - - ## Set the singleton instance. - # - # This is mostly meant to simplify the singleton logic and should be called - # by the OpenGL implementation as soon as possible. @classmethod - def setInstance(cls, instance): - cls._instance = instance - - ## private: - _instance = None # type: OpenGL + def getInstance(cls, *args, **kwargs) -> "OpenGL": + return cls.__instance diff -Nru uranium-3.3.0/UM/View/GL/ShaderProgram.py uranium-4.4.1/UM/View/GL/ShaderProgram.py --- uranium-3.3.0/UM/View/GL/ShaderProgram.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/View/GL/ShaderProgram.py 2019-11-19 10:50:46.000000000 +0000 @@ -4,7 +4,7 @@ import configparser import ast -from PyQt5.QtGui import QOpenGLShader, QOpenGLShaderProgram, QVector2D, QVector3D, QVector4D, QMatrix4x4, QColor, QImage, QOpenGLTexture, QOpenGLVertexArrayObject, QOpenGLBuffer +from PyQt5.QtGui import QOpenGLShader, QOpenGLShaderProgram, QVector2D, QVector3D, QVector4D, QMatrix4x4, QColor from UM.Logger import Logger from UM.Math.Vector import Vector @@ -16,6 +16,7 @@ class InvalidShaderProgramError(Exception): pass + ## An abstract class for dealing with shader programs. # # This class provides an interface an some basic elements for dealing with @@ -201,15 +202,15 @@ if attribute == -1: return - if type is "int": + if type == "int": self._shader_program.setAttributeBuffer(attribute, 0x1404, offset, 1, stride) #GL_INT - elif type is "float": + elif type == "float": self._shader_program.setAttributeBuffer(attribute, 0x1406, offset, 1, stride) #GL_FLOAT - elif type is "vector2f": + elif type == "vector2f": self._shader_program.setAttributeBuffer(attribute, 0x1406, offset, 2, stride) #GL_FLOAT - elif type is "vector3f": + elif type == "vector3f": self._shader_program.setAttributeBuffer(attribute, 0x1406, offset, 3, stride) #GL_FLOAT - elif type is "vector4f": + elif type == "vector4f": self._shader_program.setAttributeBuffer(attribute, 0x1406, offset, 4, stride) #GL_FLOAT self._shader_program.enableAttributeArray(attribute) @@ -312,8 +313,7 @@ del self._attribute_bindings[key] def _matrixToQMatrix4x4(self, m): - return QMatrix4x4(m.at(0, 0), m.at(0, 1), m.at(0, 2), m.at(0, 3), m.at(1, 0), m.at(1, 1), m.at(1, 2), m.at(1, 3), - m.at(2, 0), m.at(2, 1), m.at(2, 2), m.at(2, 3), m.at(3, 0), m.at(3, 1), m.at(3, 2), m.at(3, 3)) + return QMatrix4x4(m.getData().flatten()) def _setUniformValueDirect(self, uniform, value): if type(value) is Vector: diff -Nru uranium-3.3.0/UM/View/RenderBatch.py uranium-4.4.1/UM/View/RenderBatch.py --- uranium-3.3.0/UM/View/RenderBatch.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/View/RenderBatch.py 2019-11-19 10:50:46.000000000 +0000 @@ -1,17 +1,21 @@ -# Copyright (c) 2015 Ultimaker B.V. +# Copyright (c) 2019 Ultimaker B.V. # Uranium is released under the terms of the LGPLv3 or higher. - -import copy +from typing import List, Dict, Union, Optional from UM.Logger import Logger +from UM.Math.Matrix import Matrix from UM.Math.Vector import Vector +from UM.Mesh.MeshData import MeshData +from UM.Scene.Camera import Camera from UM.View.GL.OpenGL import OpenGL from UM.View.GL.OpenGLContext import OpenGLContext from PyQt5.QtGui import QOpenGLVertexArrayObject +from UM.View.GL.ShaderProgram import ShaderProgram + vertexBufferProperty = "__gl_vertex_buffer" indexBufferProperty = "__gl_index_buffer" @@ -29,7 +33,7 @@ # RenderBatch-changes. Whenever (sets of) RenderBatches are managed throughout # the lifetime of a session, crossing multiple frames, the usage of VAO's can # improve performance by reusing them. -class RenderBatch(): +class RenderBatch: ## The type of render batch. # # This determines some basic state values, like blending on/off and additionally @@ -40,6 +44,7 @@ Transparent = 2 ## Depth testing is enabled, depth writing is disabled. Overlay = 3 ## Depth testing is disabled. + ## The mode to render objects in. These correspond to OpenGL render modes. class RenderMode: Points = 0x0000 @@ -50,6 +55,7 @@ TriangleStrip = 0x0005 TriangleFan = 0x0006 + ## Blending mode. class BlendMode: NoBlending = 0 ## Blending disabled. @@ -71,23 +77,22 @@ # This can be used to do additional alterations to the state that can not be done otherwise. # The callback is passed the OpenGL bindings object as first and only parameter. # - state_teardown_callback: A callback similar to state_setup_callback, but called after everything was rendered, to handle cleaning up state changes made in state_setup_callback. - def __init__(self, shader, **kwargs): + def __init__(self, shader: ShaderProgram, **kwargs) -> None: self._shader = shader - self._render_type = kwargs.get("type", self.RenderType.Solid) - self._render_mode = kwargs.get("mode", self.RenderMode.Triangles) - self._backface_cull = kwargs.get("backface_cull", False) + self._render_type = kwargs.get("type", self.RenderType.Solid) # type: int + self._render_mode = kwargs.get("mode", self.RenderMode.Triangles) # type: int + self._backface_cull = kwargs.get("backface_cull", False) # type: bool self._render_range = kwargs.get("range", None) - self._sort_weight = kwargs.get("sort", 0) + self._sort_weight = kwargs.get("sort", 0) # type: int self._blend_mode = kwargs.get("blend_mode", None) if not self._blend_mode: self._blend_mode = self.BlendMode.NoBlending if self._render_type == self.RenderType.Solid else self.BlendMode.Normal self._state_setup_callback = kwargs.get("state_setup_callback", None) self._state_teardown_callback = kwargs.get("state_teardown_callback", None) - self._items = [] + self._items = [] # type: List[Dict[str, Union[MeshData, Matrix, Dict]]] - self._view_matrix = None - self._projection_matrix = None - self._view_projection_matrix = None + self._view_matrix = None # type: Optional[Matrix] + self._projection_matrix = None # type: Optional[Matrix] self._gl = OpenGL.getInstance().getBindingsObject() @@ -147,7 +152,7 @@ # \param mesh The mesh to render with the transform matrix. # \param uniforms A dict of additional uniform bindings to set when rendering the item. # Note these are set specifically for this item. - def addItem(self, transformation, mesh, uniforms = None): + def addItem(self, transformation: Optional[Matrix], mesh: Optional[MeshData], uniforms = None): if not transformation: Logger.log("w", "Tried to add an item to batch without transformation") return @@ -160,7 +165,7 @@ ## Render the batch. # # \param camera The camera to render from. - def render(self, camera): + def render(self, camera: Optional[Camera]): if camera is None: Logger.log("e", "Unable to render batch without a camera.") return @@ -193,14 +198,13 @@ if self._state_setup_callback: self._state_setup_callback(self._gl) - self._view_matrix = camera.getWorldTransformation().getInverse() + self._view_matrix = camera.getWorldTransformation() + self._view_matrix.invert() self._projection_matrix = camera.getProjectionMatrix() - self._view_projection_matrix = camera.getProjectionMatrix().multiply(self._view_matrix) self._shader.updateBindings( view_matrix = self._view_matrix, projection_matrix = self._projection_matrix, - view_projection_matrix = self._view_projection_matrix, view_position = camera.getWorldPosition(), light_0_position = camera.getWorldPosition() + Vector(0, 50, 0) ) @@ -223,25 +227,25 @@ self._shader.release() - def _renderItem(self, item): + def _renderItem(self, item: Dict): transformation = item["transformation"] mesh = item["mesh"] + # Do not render if there's no vertex (empty mesh) + if mesh.getVertexCount() == 0: + return + normal_matrix = None if mesh.hasNormals(): - normal_matrix = copy.deepcopy(transformation) + normal_matrix = Matrix(transformation.getData()) normal_matrix.setRow(3, [0, 0, 0, 1]) normal_matrix.setColumn(3, [0, 0, 0, 1]) - normal_matrix = normal_matrix.getInverse().getTransposed() - - model_view_matrix = copy.deepcopy(transformation).preMultiply(self._view_matrix) - model_view_projection_matrix = copy.deepcopy(transformation).preMultiply(self._view_projection_matrix) + normal_matrix.invert() + normal_matrix.transpose() self._shader.updateBindings( model_matrix = transformation, - normal_matrix = normal_matrix, - model_view_matrix = model_view_matrix, - model_view_projection_matrix = model_view_projection_matrix + normal_matrix = normal_matrix ) if item["uniforms"] is not None: diff -Nru uranium-3.3.0/UM/View/Renderer.py uranium-4.4.1/UM/View/Renderer.py --- uranium-3.3.0/UM/View/Renderer.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/View/Renderer.py 2019-11-19 10:50:46.000000000 +0000 @@ -1,13 +1,11 @@ -# Copyright (c) 2015 Ultimaker B.V. +# Copyright (c) 2018 Ultimaker B.V. # Uranium is released under the terms of the LGPLv3 or higher. + from typing import Optional from UM.SortedList import SortedListWithKey - -MYPY = False -if MYPY: - from UM.View.RenderPass import RenderPass - from UM.Scene.SceneNode import SceneNode +from UM.View.RenderPass import RenderPass #For typing. +from UM.Scene.SceneNode import SceneNode #For typing. ## Abstract base class for different rendering implementations. @@ -18,15 +16,15 @@ # objects should be rendered but the actual rendering process happening after a # sorting step. class Renderer: - def __init__(self): + def __init__(self) -> None: super().__init__() - self._render_passes = SortedListWithKey(key = lambda k: k.getPriority()) + self._render_passes = SortedListWithKey(key = lambda k: k.getPriority()) #type: SortedListWithKey ## Signal the beginning of the rendering process. # # This should set up any required state before any actual rendering happens. - def beginRendering(self): + def beginRendering(self) -> None: raise NotImplementedError() ## Queue a node to be rendered. @@ -36,27 +34,27 @@ # Most of these are passed to the RenderBatch constructor directly. See RenderBatch for all available options. # In addition, the parameter "shader" is available, which determines the shader to render with. When not specified, # it defaults to a simple vertex color shader. - def queueNode(self, node: "SceneNode", **kwargs): + def queueNode(self, node: SceneNode, **kwargs) -> None: raise NotImplementedError() ## Render everything that was set up to be rendered. - def render(self): + def render(self) -> None: raise NotImplementedError() ## Finish rendering, finalize and clear state. - def endRendering(self): + def endRendering(self) -> None: raise NotImplementedError() ## Add a render pass that should be rendered. # # \param render_pass The render pass to add. - def addRenderPass(self, render_pass: "RenderPass"): + def addRenderPass(self, render_pass: RenderPass) -> None: self._render_passes.add(render_pass) ## Remove a render pass from the list of render passes to render. # # \param render_pass The render pass to remove. - def removeRenderPass(self, render_pass: "RenderPass"): + def removeRenderPass(self, render_pass: RenderPass) -> None: if render_pass in self._render_passes: self._render_passes.remove(render_pass) @@ -65,7 +63,7 @@ # \param name The name of the render pass to get. # # \return The named render pass or None if not found. - def getRenderPass(self, name: str) -> Optional["RenderPass"]: + def getRenderPass(self, name: str) -> Optional[RenderPass]: for render_pass in self._render_passes: if render_pass.getName() == name: return render_pass @@ -73,5 +71,5 @@ return None ## Get the list of all render passes that should be rendered. - def getRenderPasses(self): + def getRenderPasses(self) -> SortedListWithKey: return self._render_passes diff -Nru uranium-3.3.0/UM/View/RenderPass.py uranium-4.4.1/UM/View/RenderPass.py --- uranium-3.3.0/UM/View/RenderPass.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/View/RenderPass.py 2019-11-19 10:50:46.000000000 +0000 @@ -1,11 +1,12 @@ -# Copyright (c) 2017 Ultimaker B.V. +# Copyright (c) 2018 Ultimaker B.V. # Uranium is released under the terms of the LGPLv3 or higher. -from UM.Application import Application +from typing import Optional, Tuple +from PyQt5.QtGui import QImage #For typing. from UM.Logger import Logger - from UM.View.GL.OpenGL import OpenGL +from UM.View.GL.FrameBufferObject import FrameBufferObject ## Base class for a rendering pass. @@ -23,23 +24,23 @@ # less than this. MaximumPriority = 999 - def __init__(self, name: str, width: int, height: int, priority:int = 0): - self._name = name - self._width = width - self._height = height - self._priority = priority + def __init__(self, name: str, width: int, height: int, priority: int = 0) -> None: + self._name = name #type: str + self._width = width #type: int + self._height = height #type: int + self._priority = priority #type: int self._gl = OpenGL.getInstance().getBindingsObject() - self._fbo = None + self._fbo = None #type: Optional[FrameBufferObject] ## Get the name of this RenderPass. # - # \return \type{string} The name of the render pass. - def getName(self): + # \return The name of the render pass. + def getName(self) -> str: return self._name - def getSize(self): + def getSize(self) -> Tuple[int, int]: return self._width, self._height ## Get the priority of this RenderPass. @@ -48,19 +49,19 @@ # are rendered earlier and are available for later render passes to use as texture # sources. # - # \return \type{int} The priority of this render pass. - def getPriority(self): + # \return The priority of this render pass. + def getPriority(self) -> int: return self._priority ## Set the size of this render pass. # - # \param width \type{int} The new width of the render pass. - # \param height \type{int} The new height of the render pass. + # \param width The new width of the render pass. + # \param height The new height of the render pass. # # \note This will recreate the storage object used by the render # pass. Due to that, the contents will be invalid after resizing # until the render pass is rendered again. - def setSize(self, width: int, height: int): + def setSize(self, width: int, height: int) -> None: if self._width != width or self._height != height: self._width = width self._height = height @@ -74,7 +75,7 @@ # # \note It is very important to call release() after a call to # bind(), once done with rendering. - def bind(self): + def bind(self) -> None: if self._fbo is None: # Ensure that the fbo is created. This is done on (first) bind, as this needs to be done on the main thread. self._updateRenderStorage() @@ -92,7 +93,9 @@ # # This makes sure the contents of this render pass are properly # updated at the end of rendering. - def release(self): + def release(self) -> None: + if self._fbo is None: + return #Already released. Nothing more to do. self._fbo.release() # Workaround for a driver bug with recent Intel chips on OSX. @@ -104,13 +107,16 @@ # # This method should be reimplemented by subclasses to perform the # actual rendering of the render pass. - def render(self): + def render(self) -> None: raise NotImplementedError("Should be implemented by subclasses") ## Get the texture ID of this render pass so it can be reused by other passes. # - # \return \type{int} The OpenGL texture ID used by this pass. - def getTextureId(self): + # \return The OpenGL texture ID used by this pass. + def getTextureId(self) -> int: + if self._fbo is None: + Logger.log("w", "FrameBufferObject has been released. Can't get any frame buffer texture ID.") + return -1 return self._fbo.getTextureId() ## Get the pixel data produced by this render pass. @@ -119,15 +125,19 @@ # # \note The current object type returned is currently dependant on the specific # implementation of the UM.View.GL.FrameBufferObject class. - def getOutput(self): + def getOutput(self) -> QImage: + if self._fbo is None: + Logger.log("w", "FrameBufferObject has been released. Can't get frame output.") + return QImage() return self._fbo.getContents() ## private: - def _updateRenderStorage(self): + def _updateRenderStorage(self) -> None: # On Mac OS X, this function may get called by a main window resize signal during closing. # This will cause a crash, so don't do anything when it is shutting down. - if Application.getInstance().isShuttingDown(): + import UM.Qt.QtApplication + if UM.Qt.QtApplication.QtApplication.getInstance().isShuttingDown(): return if self._width <= 0 or self._height <= 0: Logger.log("w", "Tried to create render pass with size <= 0") diff -Nru uranium-3.3.0/UM/View/SelectionPass.py uranium-4.4.1/UM/View/SelectionPass.py --- uranium-3.3.0/UM/View/SelectionPass.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/View/SelectionPass.py 2019-11-19 10:50:46.000000000 +0000 @@ -1,6 +1,7 @@ -# Copyright (c) 2015 Ultimaker B.V. +# Copyright (c) 2019 Ultimaker B.V. # Uranium is released under the terms of the LGPLv3 or higher. +import enum import random from UM.Resources import Resources @@ -24,10 +25,15 @@ # information about what objects are actually selected is rendered into the alpha channel # of this render pass so it can be used later on in the composite pass. class SelectionPass(RenderPass): + class SelectionMode(enum.Enum): + OBJECTS = "objects" + FACES = "faces" + def __init__(self, width, height): super().__init__("selection", width, height, -999) self._shader = OpenGL.getInstance().createShaderProgram(Resources.getPath(Resources.Shaders, "selection.shader")) + self._face_shader = OpenGL.getInstance().createShaderProgram(Resources.getPath(Resources.Shaders, "select_face.shader")) self._tool_handle_shader = OpenGL.getInstance().createShaderProgram(Resources.getPath(Resources.Shaders, "default.shader")) self._gl = OpenGL.getInstance().getBindingsObject() self._scene = Application.getInstance().getController().getScene() @@ -48,10 +54,22 @@ ToolHandle.AllAxisSelectionColor: ToolHandle.AllAxis } + self._mode = SelectionPass.SelectionMode.OBJECTS + Selection.selectedFaceChanged.connect(self._onSelectedFaceChanged) + self._output = None + def _onSelectedFaceChanged(self): + self._mode = SelectionPass.SelectionMode.FACES if Selection.getFaceSelectMode() else SelectionPass.SelectionMode.OBJECTS + ## Perform the actual rendering. def render(self): + if self._mode == SelectionPass.SelectionMode.OBJECTS: + self._renderObjectsMode() + elif self._mode == SelectionPass.SelectionMode.FACES: + self._renderFacesMode() + + def _renderObjectsMode(self): self._selection_map = self._toolhandle_selection_map.copy() batch = RenderBatch(self._shader) @@ -80,6 +98,24 @@ self.release() + def _renderFacesMode(self): + batch = RenderBatch(self._face_shader) + + selectable_objects = False + for node in Selection.getAllSelectedObjects(): + if isinstance(node, ToolHandle): + continue # Ignore tool-handles in this mode. + + if node.isSelectable() and node.getMeshData(): + selectable_objects = True + batch.addItem(transformation = node.getWorldTransformation(), mesh = node.getMeshData()) + + self.bind() + if selectable_objects: + batch.render(self._scene.getActiveCamera()) + + self.release() + ## Get the object id at a certain pixel coordinate. def getIdAtPosition(self, x, y): output = self.getOutput() @@ -95,6 +131,26 @@ pixel = output.pixel(px, py) return self._selection_map.get(Color.fromARGB(pixel), None) + ## Get an unique identifier to the face of the polygon at a certain pixel-coordinate. + def getFaceIdAtPosition(self, x, y): + output = self.getOutput() + + window_size = self._renderer.getWindowSize() + + px = (0.5 + x / 2.0) * window_size[0] + py = (0.5 + y / 2.0) * window_size[1] + + if px < 0 or px > (output.width() - 1) or py < 0 or py > (output.height() - 1): + return -1 + + face_color = Color.fromARGB(output.pixel(px, py)) + if int(face_color.b * 255) % 2 == 0: + return -1 + return ( + ((int(face_color.b * 255.) - 1) << 15) | + (int(face_color.g * 255.) << 8) | + int(face_color.r * 255.) + ) def _getNodeColor(self, node): while True: @@ -124,4 +180,4 @@ if Selection.isSelected(group_node): return True group_node = group_node.getParent() - return False \ No newline at end of file + return False diff -Nru uranium-3.3.0/UM/View/View.py uranium-4.4.1/UM/View/View.py --- uranium-3.3.0/UM/View/View.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/View/View.py 2019-11-19 10:50:46.000000000 +0000 @@ -1,6 +1,10 @@ -# Copyright (c) 2015 Ultimaker B.V. +# Copyright (c) 2019 Ultimaker B.V. # Uranium is released under the terms of the LGPLv3 or higher. -from typing import Optional + +from typing import Optional, Union, Dict + +from PyQt5.QtCore import QUrl, QObject, pyqtProperty + from UM.View.Renderer import Renderer from UM.PluginObject import PluginObject @@ -12,43 +16,54 @@ ## Abstract base class for view objects. -class View(PluginObject): - def __init__(self): - super().__init__() +class View(QObject, PluginObject): + def __init__(self, parent = None): + super().__init__(parent) self._renderer = None # type: Optional[Renderer] self._controller = UM.Application.Application.getInstance().getController() # type: Controller + self._components = {} # type: Dict[str, QUrl] + + @pyqtProperty(str, constant = True) + def name(self) -> str: + return self.getPluginId() + + ## Add a QML component that is provided by this View. + def addDisplayComponent(self, name: str, source: Union[str, QUrl]) -> None: + if type(source) == str: + source = QUrl.fromLocalFile(source) + self._components[name] = source + + ## Get a QUrl by name. + def getDisplayComponent(self, name: str) -> QUrl: + if name in self._components: + return self._components[name] + return QUrl() ## Get the controller object associated with this View. # \sa Controller def getController(self): return self._controller - ## Set the controller object associated with this View. - # \param controller The controller object to use. - # \sa Controller - def setController(self, controller: "Controller"): - self._controller = controller - ## Get the Renderer instance for this View. def getRenderer(self): return self._renderer ## Set the renderer object to use with this View. # \param renderer \type{Renderer} The renderer to use. - def setRenderer(self, renderer: Renderer): + def setRenderer(self, renderer: Renderer) -> None: self._renderer = renderer ## Begin the rendering process. # # This should queue all the meshes that should be rendered. - def beginRendering(self): + def beginRendering(self) -> None: raise NotImplementedError() ## Perform any steps needed when ending the rendering process. # # If there is any cleanup or other tasks that need to be performed # after rendering this method should be used. - def endRendering(self): + def endRendering(self) -> None: raise NotImplementedError() ## Handle an event. diff -Nru uranium-3.3.0/UM/Workspace/WorkspaceFileHandler.py uranium-4.4.1/UM/Workspace/WorkspaceFileHandler.py --- uranium-3.3.0/UM/Workspace/WorkspaceFileHandler.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Workspace/WorkspaceFileHandler.py 2019-11-19 10:50:46.000000000 +0000 @@ -1,42 +1,50 @@ -# Copyright (c) 2016 Ultimaker B.V. +# Copyright (c) 2018 Ultimaker B.V. # Uranium is released under the terms of the LGPLv3 or higher. +from PyQt5.QtCore import QObject, QUrl #For typing. +from typing import Optional + from UM.Logger import Logger from UM.FileHandler.FileHandler import FileHandler +from UM.FileHandler.FileReader import FileReader #For typing. +from UM.FileHandler.ReadFileJob import ReadFileJob #For typing. +from typing import TYPE_CHECKING +if TYPE_CHECKING: + from UM.Qt.QtApplication import QtApplication ## Central class for reading and writing workspaces. # This class is created by Application and handles reading and writing workspace files. class WorkspaceFileHandler(FileHandler): - def __init__(self): - super().__init__("workspace_writer", "workspace_reader") - self.workspace_reader = None + def __init__(self, application: "QtApplication", writer_type: str = "workspace_writer", reader_type: str = "workspace_reader", parent: QObject = None) -> None: + super().__init__(application, writer_type, reader_type, parent) + self.workspace_reader = None # type: Optional[FileReader] - def readerRead(self, reader, file_name, **kwargs): + def readerRead(self, reader: FileReader, file_name: str, **kwargs) -> Optional[str]: self.workspace_reader = reader + results = None try: results = reader.read(file_name) - return results except: - Logger.logException("e", "An exception occured while loading workspace.") + Logger.logException("e", "An exception occurred while loading workspace.") + Logger.log("w", "Unable to load workspace %s", file_name) - Logger.log("w", "Unable to load workspace %s", file_name) - return None + return results - def _readLocalFile(self, file): + def _readLocalFile(self, file: QUrl) -> None: from UM.FileHandler.ReadFileJob import ReadFileJob job = ReadFileJob(file.toLocalFile(), handler = self) job.finished.connect(self._readWorkspaceFinished) job.start() - def _readWorkspaceFinished(self, job): + def _readWorkspaceFinished(self, job: ReadFileJob) -> None: # Add the loaded nodes to the scene. nodes = job.getResult() if nodes is not None: # Job was not a failure. # Delete all old nodes. self._application.deleteAll() # The name of the project is set after deleting all - self._application.workspaceLoaded.emit(self.workspace_reader.workspaceName()) + self._application.workspaceLoaded.emit(job._filename) # Add the loaded nodes to the scene. nodes = job.getResult() @@ -45,4 +53,4 @@ from UM.Operations.AddSceneNodeOperation import AddSceneNodeOperation op = AddSceneNodeOperation(node, self._application.getController().getScene().getRoot()) op.push() - self._application.getController().getScene().sceneChanged.emit(node) \ No newline at end of file + self._application.getController().getScene().sceneChanged.emit(node) diff -Nru uranium-3.3.0/UM/Workspace/WorkspaceReader.py uranium-4.4.1/UM/Workspace/WorkspaceReader.py --- uranium-3.3.0/UM/Workspace/WorkspaceReader.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Workspace/WorkspaceReader.py 2019-11-19 10:50:46.000000000 +0000 @@ -2,19 +2,19 @@ # Uranium is released under the terms of the LGPLv3 or higher. from UM.FileHandler.FileReader import FileReader - +from typing import Optional class WorkspaceReader(FileReader): - def __init__(self): + def __init__(self) -> None: super().__init__() - self.workspace_name = None + self._workspace_name = None # type: Optional[str] ## Read an entire workspace - def read(self, file_name): + def read(self, file_name: str): pass - def workspaceName(self): - return self.workspace_name + def workspaceName(self) -> Optional[str]: + return self._workspace_name - def setWorkspaceName(self, workspace_name): - self.workspace_name = workspace_name \ No newline at end of file + def setWorkspaceName(self, workspace_name: str) -> None: + self._workspace_name = workspace_name diff -Nru uranium-3.3.0/UM/Workspace/WorkspaceWriter.py uranium-4.4.1/UM/Workspace/WorkspaceWriter.py --- uranium-3.3.0/UM/Workspace/WorkspaceWriter.py 2018-04-24 09:15:53.000000000 +0000 +++ uranium-4.4.1/UM/Workspace/WorkspaceWriter.py 2019-11-19 10:50:46.000000000 +0000 @@ -5,8 +5,8 @@ class WorkspaceWriter(FileWriter): - def __init__(self): - super().__init__() + def __init__(self, add_to_recent_files: bool = True) -> None: + super().__init__(add_to_recent_files) def write(self, stream, node): - pass \ No newline at end of file + raise NotImplementedError("WorkspaceWriter plugin was not correctly implemented, no write was specified") \ No newline at end of file