本文整理汇总了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
示例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
示例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']
示例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": {},
}
示例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)
示例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)
示例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
示例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__)
示例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
示例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)
示例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)
示例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)
示例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)
示例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))
示例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()