当前位置: 首页>>代码示例>>Python>>正文


Python QObject.__init__方法代码示例

本文整理汇总了Python中qtpy.QtCore.QObject.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python QObject.__init__方法的具体用法?Python QObject.__init__怎么用?Python QObject.__init__使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在qtpy.QtCore.QObject的用法示例。


在下文中一共展示了QObject.__init__方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: from qtpy.QtCore import QObject [as 别名]
# 或者: from qtpy.QtCore.QObject import __init__ [as 别名]
 def __init__(self, dock_tabbar, main):
     QObject.__init__(self)
     self.dock_tabbar = dock_tabbar
     self.main = main
     self.moving = False
     self.from_index = None
     self.to_index = None
开发者ID:DLlearn,项目名称:spyder,代码行数:9,代码来源:__init__.py

示例2: __init__

# 需要导入模块: from qtpy.QtCore import QObject [as 别名]
# 或者: from qtpy.QtCore.QObject import __init__ [as 别名]
    def __init__(self, parent, repo_files, prefix, root_prefix, pip_packages):
        QObject.__init__(self)
        self._parent = parent
        self._repo_files = repo_files
        self._prefix = prefix
        self._root_prefix = root_prefix
        self._pip_packages_names = {}

        for p in pip_packages:
            n, v, b = conda_api_q.CondaProcess.split_canonical_name(p)
            local = ''
            if '(' in n:
                name = n.split('-(')
                n = name[0]
                local = name[-1].replace(')', '')
            self._pip_packages_names[n] = {}
            self._pip_packages_names[n]['version'] = v
            self._pip_packages_names[n]['local'] = local
            self._pip_packages_names[n]['build'] = b

        self.packages_names = None
        self.row_data = None
        self.packages_versions = None
        self._packages = None

        # Define helper function locally
        self._get_package_metadata = parent.get_package_metadata
开发者ID:ccordoba12,项目名称:conda-manager,代码行数:29,代码来源:packages.py

示例3: __init__

# 需要导入模块: from qtpy.QtCore import QObject [as 别名]
# 或者: from qtpy.QtCore.QObject import __init__ [as 别名]
 def __init__(self, original_out):
     QObject.__init__(self)
     # If the file descriptor of the stream is < 0 then we are running in a no-external-console mode
     if not hasattr(original_out, 'fileno') or original_out.fileno() < 0:
         self._original_out = None
     else:
         self._original_out = original_out
开发者ID:mantidproject,项目名称:mantid,代码行数:9,代码来源:writetosignal.py

示例4: __init__

# 需要导入模块: from qtpy.QtCore import QObject [as 别名]
# 或者: from qtpy.QtCore.QObject import __init__ [as 别名]
 def __init__(self, callee):
     QObject.__init__(self)
     self.moveToThread(qApp.thread())
     self.callee = callee
     # Help should then give the correct doc
     self.__call__.__func__.__doc__ = callee.__doc__
     self._args = None
     self._kwargs = None
     self._result = None
     self._exc_info = None
开发者ID:DanNixon,项目名称:mantid,代码行数:12,代码来源:figuremanager.py

示例5: __init__

# 需要导入模块: from qtpy.QtCore import QObject [as 别名]
# 或者: from qtpy.QtCore.QObject import __init__ [as 别名]
    def __init__(self, parent, startup, version="", releases=None):
        QObject.__init__(self)
        self._parent = parent
        self.error = None
        self.latest_release = None
        self.startup = startup
        self.releases = releases

        if not version:
            self.version = __version__
        else:
            self.version = version
开发者ID:burrbull,项目名称:spyder,代码行数:14,代码来源:updates.py

示例6: __init__

# 需要导入模块: from qtpy.QtCore import QObject [as 别名]
# 或者: from qtpy.QtCore.QObject import __init__ [as 别名]
 def __init__(self, callee):
     QObject.__init__(self)
     qapp = QApplication.instance()
     if qapp is not None:
         self.moveToThread(qapp.thread())
         self.qApp = qapp
     self.callee = callee
     # Help should then give the correct doc
     self.__call__.__func__.__doc__ = callee.__doc__
     self._args = None
     self._kwargs = None
     self._result = None
     self._exc_info = None
开发者ID:mantidproject,项目名称:mantid,代码行数:15,代码来源:qappthreadcall.py

示例7: __init__

# 需要导入模块: from qtpy.QtCore import QObject [as 别名]
# 或者: from qtpy.QtCore.QObject import __init__ [as 别名]
    def __init__(self, parent, repo_files, env, prefix):
        QObject.__init__(self)
        self._parent = parent
        self._repo_files = repo_files
        self._env = env
        self._prefix = prefix

        self.packages_names = None
        self.row_data = None
        self.packages_versions = None

        # define helper function locally
        self._get_package_metadata = parent.get_package_metadata
开发者ID:lzfernandes,项目名称:conda-manager,代码行数:15,代码来源:packages.py

示例8: __init__

# 需要导入模块: from qtpy.QtCore import QObject [as 别名]
# 或者: from qtpy.QtCore.QObject import __init__ [as 别名]
    def __init__(self, cacheSize=DEFAULT_CACHE_SIZE, userAgent='(PyQt) TileMap 1.0', parent=None):
        QObject.__init__(self, parent=parent)
        self._manager = None
        self._cache = None
        self._cacheSize = cacheSize

        try:
            # Convert user agent to bytes
            userAgent = userAgent.encode()
        except:
            # no encode method exists. This hsould be the Python 2 case
            pass

        self._userAgent = userAgent
        self._tileInDownload = dict()
开发者ID:allebacco,项目名称:PyTileMap,代码行数:17,代码来源:maptilesourcehttp.py

示例9: __init__

# 需要导入模块: from qtpy.QtCore import QObject [as 别名]
# 或者: from qtpy.QtCore.QObject import __init__ [as 别名]
    def __init__(self, parent):
        QObject.__init__(self)
        self.main = parent

        self.clients = {}
        self.requests = {}
        self.register_queue = {}

        # Register languages to create clients for
        for language in self.get_languages():
            self.clients[language] = {
                'status': self.STOPPED,
                'config': self.get_language_config(language),
                'instance': None
            }
            self.register_queue[language] = []
开发者ID:impact27,项目名称:spyder,代码行数:18,代码来源:manager.py

示例10: __init__

# 需要导入模块: from qtpy.QtCore import QObject [as 别名]
# 或者: from qtpy.QtCore.QObject import __init__ [as 别名]
    def __init__(self, parent):
        QObject.__init__(self, parent)
        self._parent = parent
        self._output = None
        self._partial = None
        self._stdout = None
        self._error = None
        self._parse = False
        self._function_called = ""
        self._name = None
        self._process = QProcess()
        self.set_root_prefix()

        # Signals
        self._process.finished.connect(self._call_conda_ready)
        self._process.readyReadStandardOutput.connect(self._call_conda_partial)
开发者ID:spyder-ide,项目名称:conda-api-q,代码行数:18,代码来源:conda_api_q.py

示例11: __init__

# 需要导入模块: from qtpy.QtCore import QObject [as 别名]
# 或者: from qtpy.QtCore.QObject import __init__ [as 别名]
    def __init__(self, widget, resultfilename=None):
        """
        Construct test runner.

        Parameters
        ----------
        widget : UnitTestWidget
            Unit test widget which constructs the test runner.
        resultfilename : str or None
            Name of file in which to store test results. If None, use default.
        """
        QObject.__init__(self, widget)
        self.process = None
        if resultfilename is None:
            self.resultfilename = os.path.join(tempfile.gettempdir(),
                                               'unittest.results')
        else:
            self.resultfilename = resultfilename
开发者ID:jitseniesen,项目名称:spyder.unittest,代码行数:20,代码来源:runnerbase.py

示例12: __init__

# 需要导入模块: from qtpy.QtCore import QObject [as 别名]
# 或者: from qtpy.QtCore.QObject import __init__ [as 别名]
    def __init__(self, parent, server_args_fmt='',
                 server_settings={}, external_server=False,
                 folder=getcwd(), language='python',
                 plugin_configurations={}):
        QObject.__init__(self)
        # LSPMethodProviderMixIn.__init__(self)
        self.manager = parent
        self.zmq_in_socket = None
        self.zmq_out_socket = None
        self.zmq_in_port = None
        self.zmq_out_port = None
        self.transport_client = None
        self.language = language

        self.initialized = False
        self.ready_to_close = False
        self.request_seq = 1
        self.req_status = {}
        self.plugin_registry = {}
        self.watched_files = {}
        self.req_reply = {}

        self.transport_args = [sys.executable, '-u',
                               osp.join(LOCATION, 'transport', 'main.py')]
        self.external_server = external_server

        self.folder = folder
        self.plugin_configurations = plugin_configurations
        self.client_capabilites = CLIENT_CAPABILITES
        self.server_capabilites = SERVER_CAPABILITES
        self.context = zmq.Context()

        server_args = server_args_fmt % (server_settings)
        # transport_args = self.local_server_fmt % (server_settings)
        # if self.external_server:
        transport_args = self.external_server_fmt % (server_settings)

        self.server_args = [server_settings['cmd']]
        self.server_args += server_args.split(' ')
        self.transport_args += transport_args.split(' ')
        self.transport_args += ['--folder', folder]
        self.transport_args += ['--transport-debug', str(get_debug_level())]
开发者ID:burrbull,项目名称:spyder,代码行数:44,代码来源:client.py

示例13: __init__

# 需要导入模块: from qtpy.QtCore import QObject [as 别名]
# 或者: from qtpy.QtCore.QObject import __init__ [as 别名]
    def __init__(self, parent, on_finished=None, on_partial=None):
        QObject.__init__(self, parent)
        self._parent = parent
        self.output = None
        self.partial = None
        self.stdout = None
        self.error = None
        self._parse = False
        self._function_called = ''
        self._name = None
        self._process = QProcess()
        self._on_finished = on_finished

        self._process.finished.connect(self._call_conda_ready)
        self._process.readyReadStandardOutput.connect(self._call_conda_partial)

        if on_finished is not None:
            self._process.finished.connect(on_finished)
        if on_partial is not None:
            self._process.readyReadStandardOutput.connect(on_partial)

        self.set_root_prefix()
开发者ID:lzfernandes,项目名称:conda-manager,代码行数:24,代码来源:conda_api_q.py

示例14: __init__

# 需要导入模块: from qtpy.QtCore import QObject [as 别名]
# 或者: from qtpy.QtCore.QObject import __init__ [as 别名]
 def __init__(self, original_out):
     QObject.__init__(self)
     self.__original_out = original_out
开发者ID:samueljackson92,项目名称:mantid,代码行数:5,代码来源:writetosignal.py

示例15: __init__

# 需要导入模块: from qtpy.QtCore import QObject [as 别名]
# 或者: from qtpy.QtCore.QObject import __init__ [as 别名]
 def __init__(self, editor, lsp_manager):
     QObject.__init__(self)
     self.editor = editor
     self.lsp_manager = lsp_manager
开发者ID:pijyoi,项目名称:spyder,代码行数:6,代码来源:fixtures.py


注:本文中的qtpy.QtCore.QObject.__init__方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。