本文整理汇总了Python中PyQt4.QtCore.QThread.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python QThread.__init__方法的具体用法?Python QThread.__init__怎么用?Python QThread.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PyQt4.QtCore.QThread
的用法示例。
在下文中一共展示了QThread.__init__方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from PyQt4.QtCore import QThread [as 别名]
# 或者: from PyQt4.QtCore.QThread import __init__ [as 别名]
def __init__(self):
QThread.__init__(self)
self.display_size = 2048
self.buffer_size = 256
self.rband_buffer_size = 1024
self.display_buf = deque([0]*self.display_size)
self.data_buf = deque([0]*self.buffer_size)
self.display_filters = filters.Filters(self.display_size,8,20)
self.analyze_filters = filters.Filters(self.buffer_size,5,12)
self.rband_buf1 = deque([0]*self.rband_buffer_size)
self.rband_buf2 = deque([0]*self.rband_buffer_size)
self.rband_buf3 = deque([0]*self.rband_buffer_size)
self.analysis = Analysis()
self.respiratory_analysis1 = Analysis()
self.respiratory_analysis2 = Analysis()
self.respiratory_analysis3 = Analysis()
self.count = 0
self.board = None
示例2: __init__
# 需要导入模块: from PyQt4.QtCore import QThread [as 别名]
# 或者: from PyQt4.QtCore.QThread import __init__ [as 别名]
def __init__(self):
self.sequencers = [0]*MAX_SEQS
self.trackers = [0]*MAX_TRACKERS
self.patterns = []
self.open_trackers = 0
self.num_sequencers = 1
self.num_banks = 1
self.mainwindow = None
self.cur_seq = 0
self.cur_bank = 0
self.cur_pattern = 0
self.cur_tracker = 0
self.num_seqs = 0
self.midi_channel = 0
self.bTrackerOn = False
self.bStopped = False
self.bActiveTranspose=False
self.num_steps=16
for i in range(MAX_SEQS):
self.sequencers[i] = Voice()
for i in range(MAX_TRACKERS):
self.trackers[i] = Tracker()
示例3: __init__
# 需要导入模块: from PyQt4.QtCore import QThread [as 别名]
# 或者: from PyQt4.QtCore.QThread import __init__ [as 别名]
def __init__(self):
self.notes = [0]*16
self.cur_step = 0
self.ppq = [0]*16
self.repeats = [0]*16
self.rests = [0]*16
self.num_steps = 16
self.mainwindow = None
self.cur_rest = 0
self.cur_ppq = 6
self.cur_repeats = 0
self.cur_note = 0
self.cur_note = 0
self.ppq_cnt = 0
self.cur_instep=0
self.midi_input = None
self.midi_output = None
self.kb_channel = 0
self.midi_channel = 0
示例4: __init__
# 需要导入模块: from PyQt4.QtCore import QThread [as 别名]
# 或者: from PyQt4.QtCore.QThread import __init__ [as 别名]
def __init__(self,mainwindow,parent=None):
QThread.__init__(self,parent)
self.exiting = False
self.mainwindow = mainwindow
self.scene_len = PLAY_LEN
self.ppq = -1
self.cur_ppq = -1
self.input_buffer = [0]*256
self.cur_step = 0
self.note = 0
self.repeats = 0
self.cur_note = 0
self.rest = 0
self.midi_channel = MIDI_CHANNEL
self.kb_channel = MIDIKB_CHANNEL
self.midi_input = None
self.midi_output = None
self.num_steps = 16
示例5: __init__
# 需要导入模块: from PyQt4.QtCore import QThread [as 别名]
# 或者: from PyQt4.QtCore.QThread import __init__ [as 别名]
def __init__(self):
global mw
QDialog.__init__(self, mw, Qt.Window)
self.mw = mw
self.frm = kind2anki_ui.Ui_kind2ankiDialog()
self.frm.setupUi(self)
self.t = ThreadTranslate()
self.t.done.connect(importToAnki)
self.t.startProgress.connect(startProgressBar)
b = QPushButton(_("Import"))
self.frm.buttonBox.addButton(b, QDialogButtonBox.AcceptRole)
self.deck = DeckChooser(
self.mw, self.frm.deckArea, label=False)
self.frm.importMode.setCurrentIndex(
self.mw.pm.profile.get('importMode', 1))
self.daysSinceLastRun = self.getDaysSinceLastRun()
self.frm.importDays.setValue(self.daysSinceLastRun)
self.exec_()
示例6: __init__
# 需要导入模块: from PyQt4.QtCore import QThread [as 别名]
# 或者: from PyQt4.QtCore.QThread import __init__ [as 别名]
def __init__(self):
QThread.__init__(self)
self.url = "http://movie.douban.com/subject/{0}/"
self.timeout = 15
self.movie_ids = []
self.log = log.FinalLogger.getLogger() # ????logger??????
self.__create_images_folder()
self.max_year_process = int(conn.SqliteConn().max_year_and_count_from_process()['max_year'])
self.count_process = int(conn.SqliteConn().max_year_and_count_from_process()['count'])
self.current_year = int(time.strftime('%Y',time.localtime(time.time())))+1 # 2016
# ??requests?????????????????
示例7: __init__
# 需要导入模块: from PyQt4.QtCore import QThread [as 别名]
# 或者: from PyQt4.QtCore.QThread import __init__ [as 别名]
def __init__(self):
self._soundThread = self.SoundThread()
self.soundAvailable = self.platformSupportsAudio()
if not self.platformSupportsSpeech():
self.useSpokenNotifications = False
if self.soundAvailable:
self._soundThread.start()
示例8: __init__
# 需要导入模块: from PyQt4.QtCore import QThread [as 别名]
# 或者: from PyQt4.QtCore.QThread import __init__ [as 别名]
def __init__(self):
QThread.__init__(self)
self.alerted = False
示例9: __init__
# 需要导入模块: from PyQt4.QtCore import QThread [as 别名]
# 或者: from PyQt4.QtCore.QThread import __init__ [as 别名]
def __init__(self):
QThread.__init__(self)
self.queue = queue.Queue()
self.active = True
示例10: __init__
# 需要导入模块: from PyQt4.QtCore import QThread [as 别名]
# 或者: from PyQt4.QtCore.QThread import __init__ [as 别名]
def __init__(self, username, password, server, channel, client_tag):
print 'chat_thread.__init__()'
QThread.__init__(self)
self.username = str(username)
self.password = str(password)
self.server = str(server)
self.channel = str(channel)
self.client_tag = str(client_tag)
self.login_attempts = 0
self.end_flag = 0
示例11: __init__
# 需要导入模块: from PyQt4.QtCore import QThread [as 别名]
# 或者: from PyQt4.QtCore.QThread import __init__ [as 别名]
def __init__(self, communicate):
QThread.__init__(self)
self.__host = None
self.__arguments = None
self.__targets = []
self.__communicate = communicate
示例12: __init__
# 需要导入模块: from PyQt4.QtCore import QThread [as 别名]
# 或者: from PyQt4.QtCore.QThread import __init__ [as 别名]
def __init__(self, communicate):
QThread.__init__(self)
self.__communicate = communicate
self.__exploit = None
self.__data = None
示例13: __init__
# 需要导入模块: from PyQt4.QtCore import QThread [as 别名]
# 或者: from PyQt4.QtCore.QThread import __init__ [as 别名]
def __init__(self, url, label=None, btn=None):
QNetworkAccessManager.__init__(self)
self.messageBuffer = QByteArray()
self.label = label
self.btn = btn
self.frmt = "PNG" if url.rsplit('.', 1)[1] == 'png' else "JPG"
request = QNetworkRequest(QUrl(url))
self.reply = self.get(request)
self.reply.finished.connect(self.slotFinished)
self.reply.readyRead.connect(self.slotReadData)
示例14: __init__
# 需要导入模块: from PyQt4.QtCore import QThread [as 别名]
# 或者: from PyQt4.QtCore.QThread import __init__ [as 别名]
def __init__(self,port=None,GUI=False):
self.default_settings = OrderedDict()
self.current_settings = OrderedDict()
self.GUI = GUI
if not self.GUI:
if port is None:
self.initialize_board(autodetect=True)
else:
self.initialize_board(port=port)
else:
QThread.__init__(self)
self.count=0
self.init_board_settings()
示例15: __init__
# 需要导入模块: from PyQt4.QtCore import QThread [as 别名]
# 或者: from PyQt4.QtCore.QThread import __init__ [as 别名]
def __init__(self, folder_to_be_monitored, parent=None):
QObject.__init__(self, parent)
self.worker = None
self.mountingFolder = folder_to_be_monitored