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


Python QThread.__init__方法代码示例

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


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

示例1: __init__

# 需要导入模块: from PySide.QtCore import QThread [as 别名]
# 或者: from PySide.QtCore.QThread import __init__ [as 别名]
 def __init__(self):
     QThread.__init__(self)
     self.code = ""
     self.carte = Carte()
     self.planification = Cheminement(self.carte)
     self.voltageRestant = ""
     self.ileCible = -1
     self.positionTresor = []
     self.destination = []
     self.pause = True
     self.reset = False
     self.startCycle = False
     self.demiCercle = 180
     self.tempAttenteRotation = 9
     self.delaiAjustement = 4.5
     self.metreSeconde = 15
     self.metre = 100
     self.actionPrecedente = ""
     self.actionCourrante = ""
     self.nouvelleAction = False
     self.finCycle = False
     self.connected = False
     self.noPathFound = False
     self.aIle = False
     self.diametreIle = 2.125
     self.deltaPosition = 15
     self.deltaAngle = 4
     self.deltaDiametreIle = 0.125
开发者ID:phil888,项目名称:Design3,代码行数:30,代码来源:ProgrammeThread.py

示例2: __init__

# 需要导入模块: from PySide.QtCore import QThread [as 别名]
# 或者: from PySide.QtCore.QThread import __init__ [as 别名]
 def __init__(self, patches, db, parent=None):
     QThread.__init__(self, parent)
     
     self.logger = logging.getLogger(__name__)
     self.process = None
     self.patches = patches
     self.parentDb = db
开发者ID:Rogueleader89,项目名称:server,代码行数:9,代码来源:createPatch.py

示例3: __init__

# 需要导入模块: from PySide.QtCore import QThread [as 别名]
# 或者: from PySide.QtCore.QThread import __init__ [as 别名]
    def __init__(self):
        QThread.__init__(self)
        
        self.running = True
        self.queue = queue.Queue()

        # If we have internet connetction we can receive dat from server
        self.data_from_server = True

        # Offsets period
        self.p_offsets = config['p_offsets']
        # Offsets stack size
        self.n_samples = config['o_buffer']
        # Offsets list
        self.offsets = None

        # Socket
        self.sock_con = None

        # Graph density. Send to pipeline every n-th sample
        self.density = calculateDensity(config['time_axe_range']) # self.calculateDensity(2) 

        # Data server
        if self.data_from_server:
            self.host = config['host']
            # self.host = 'localhost'
            self.port = config['port']
开发者ID:alberand,项目名称:Logger_GUI,代码行数:29,代码来源:model.py

示例4: __init__

# 需要导入模块: from PySide.QtCore import QThread [as 别名]
# 或者: from PySide.QtCore.QThread import __init__ [as 别名]
    def __init__(self):
        QThread.__init__(self)

        Bin.exporter = JupiterExporter()
        BinPacking.bin_packing_progress = self

        self.directory = None
        self.images = []

        self.method = BinPackingThread.METHODS[0]
        self.bin_size = BinPackingThread.SIZES[0]

        self.bin_parameter = {
            "next_fit_shelf": {},
            "first_fit_shelf": {
                "selection_variant": FirstFitShelfBin.BEST_VARIANTS,
                "selection_heuristic": FirstFitShelfBin.SHORT_SIDE_FIT,
            },
            "guillotine": {
                "selection_variant": GuillotineBin.BEST_VARIANTS,
                "selection_heuristic": GuillotineBin.SHORT_SIDE_FIT,
                "split_rule": Rect.RULE_SAS,
            },
            "max_rects": {},
        }
开发者ID:Ingener74,项目名称:Small-Screwdriver,代码行数:27,代码来源:ScreamingMercury.py

示例5: __init__

# 需要导入模块: from PySide.QtCore import QThread [as 别名]
# 或者: from PySide.QtCore.QThread import __init__ [as 别名]
    def __init__(
        self,
        account,
        call,
        #dbus_handler,
        ):
        """
        account: An account.

        call is one of

          'HomeTimeline': Fetch the home time line
          'Mentions': Fetch user mentions
          'DMs': Fetch direct messages
          'Search:*': Fetch search results where * is the terms to search for
          'RetrieveLists': Retrive lists
          'List:*:*': The first * should be replace with the user and
                      the second with the id
          'Near:*:*': Fetch tweets near (1km) a the specified
                      location.  The first start is the the first
                      geocode and the second * is the second geocode.
        """
        QThread.__init__(self)
        self.account = account
        self.call = call
        #self.dbus_handler = dbus_handler
        socket.setdefaulttimeout(60)
开发者ID:Jonney,项目名称:Khweeteur,代码行数:29,代码来源:retriever.py

示例6: __init__

# 需要导入模块: from PySide.QtCore import QThread [as 别名]
# 或者: from PySide.QtCore.QThread import __init__ [as 别名]
 def __init__(self, maximum, parent=None):
     QThread.__init__(self, parent)
     self.maximum = maximum
     # this semaphore is used to stop the thread from outside.  As long
     # as the thread is permitted to run, it has yet a single resource
     # available.  If the thread is stopped, this resource is acquired,
     # and the thread breaks its counting loop at the next iteration.
     self._run_semaphore = QSemaphore(1)
开发者ID:MiguelCarrilhoGT,项目名称:snippets,代码行数:10,代码来源:thread_progress.py

示例7: __init__

# 需要导入模块: from PySide.QtCore import QThread [as 别名]
# 或者: from PySide.QtCore.QThread import __init__ [as 别名]
 def __init__(self):
     QThread.__init__(self)
     self.grblWriter = None
     self.gcode = None
     self.stopFlag = False
     self.pauseFlag = False
     self.currentLine = 0
     self.waitForPause = False
开发者ID:GeorgeIoak,项目名称:rasPyCNCController,代码行数:10,代码来源:GCodeRunner.py

示例8: __init__

# 需要导入模块: from PySide.QtCore import QThread [as 别名]
# 或者: from PySide.QtCore.QThread import __init__ [as 别名]
 def __init__(self, *params):
     QThread.__init__(self)        
     self.parms = params
     self.ret_code = None
     self.output = StringIO()
     self.procs = []
     self.procs_str = ''
     Logger.getLoggerFor(self.__class__)
开发者ID:juanchitot,项目名称:jaimeboot,代码行数:10,代码来源:human_event.py

示例9: __init__

# 需要导入模块: from PySide.QtCore import QThread [as 别名]
# 或者: from PySide.QtCore.QThread import __init__ [as 别名]
 def __init__(self, monitorable, args=(), kwargs=None):
     QThread.__init__(self)
     self._monitorable = monitorable
     self._args = args
     if kwargs is None:
         kwargs = {}
     self._kwargs = kwargs
     self._is_cancelled = False
开发者ID:pymontecarlo,项目名称:pymontecarlo-gui,代码行数:10,代码来源:wrapper.py

示例10: __init__

# 需要导入模块: from PySide.QtCore import QThread [as 别名]
# 或者: from PySide.QtCore.QThread import __init__ [as 别名]
    def __init__(self, script):
        """
        This is a wrapper for scripts that are not QThread, to execute them on a different thread than the gui
        Args:
            script: script to be executed

        """
        self.script = script
        QThread.__init__(self)
开发者ID:EdwardBetts,项目名称:PythonLab,代码行数:11,代码来源:scripts.py

示例11: __init__

# 需要导入模块: from PySide.QtCore import QThread [as 别名]
# 或者: from PySide.QtCore.QThread import __init__ [as 别名]
 def __init__(self, instruments, scripts, name = None, settings = None,  log_output = None):
     """
     Example of a script that emits a QT signal for the gui
     Args:
         name (optional): name of script, if empty same as class name
         settings (optional): settings for this script, if empty same as default settings
     """
     Script.__init__(self, name, settings = settings,scripts =scripts, instruments = instruments, log_output = log_output)
     QThread.__init__(self)
开发者ID:EdwardBetts,项目名称:PythonLab,代码行数:11,代码来源:keysight_spectra_vs_power.py

示例12: __init__

# 需要导入模块: from PySide.QtCore import QThread [as 别名]
# 或者: from PySide.QtCore.QThread import __init__ [as 别名]
 def __init__(self, network, logLevel=None, **kwargs):
     assert(isinstance(network, Network))
     self._network = network
     self.stepsLeft = 0
     self.logger = logging.getLogger('pymote.simulation')
     self.logger.level = logLevel or logging.DEBUG
     self.logger.debug('Simulation %s created successfully.' %
                       (hex(id(self))))
     QThread.__init__(self)
开发者ID:darbula,项目名称:pymote,代码行数:11,代码来源:simulation.py

示例13: __init__

# 需要导入模块: from PySide.QtCore import QThread [as 别名]
# 或者: from PySide.QtCore.QThread import __init__ [as 别名]
 def __init__(self, name, readTimeout=1000, dev = None, parent=None):
   Keithley.__init__(self,dev)
   QThread.__init__(self)
   self.name = name
   self.readTimeout = readTimeout
   self.connectInstrument()
   self.selectCurrent()
   self.zeroCorrect()
   self.sr = SignalReceiver(self)
   self.sr.moveToThread(self)
开发者ID:lsst-camera-dh,项目名称:pybench-ccd-reb,代码行数:12,代码来源:KeithleyThread.py

示例14: __init__

# 需要导入模块: from PySide.QtCore import QThread [as 别名]
# 或者: from PySide.QtCore.QThread import __init__ [as 别名]
 def __init__(self, url):
     QThread.__init__(self)
     self.url = url
     self.new_version = None 
     self.frozenapp = esky.Esky(sys.executable, self.url)
     try:
         log.Debug('Checking for new version at {0}'.format(self.url))
         self.new_version = self.frozenapp.find_update()
     except Exception, e:
         log.Error(str(e))
开发者ID:GuangGuo,项目名称:assetjet,代码行数:12,代码来源:updater.py

示例15: __init__

# 需要导入模块: from PySide.QtCore import QThread [as 别名]
# 或者: from PySide.QtCore.QThread import __init__ [as 别名]
 def __init__(self, app, *args, **kwargs):
     QThread.__init__(self, *args, **kwargs)
     self.app = app
     self.status = STATUS_NONE
     self.last_sync = datetime.now()
     self.timer = QTimer()
     self.timer.timeout.connect(self.sync)
     self.update_timer()
     self.wait_condition = QWaitCondition()
     self.mutex = QMutex()
开发者ID:fabianofranz,项目名称:everpad,代码行数:12,代码来源:sync.py


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