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


Python QThread.__init__方法代码示例

本文整理汇总了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 
开发者ID:gabrielibagon,项目名称:ECG_Respiratory_Monitor,代码行数:21,代码来源:heart-monitor.py

示例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() 
开发者ID:Gaultus,项目名称:ProStep,代码行数:26,代码来源:seq16x8.py

示例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 
开发者ID:Gaultus,项目名称:ProStep,代码行数:23,代码来源:seq16.py

示例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 
开发者ID:Gaultus,项目名称:ProStep,代码行数:20,代码来源:SeqX16.py

示例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_() 
开发者ID:prz3m,项目名称:kind2anki,代码行数:24,代码来源:__init__.py

示例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????????????????? 
开发者ID:Qua4re,项目名称:DoubanMovieCrawlerUI,代码行数:15,代码来源:doubanMovieCralwer.py

示例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() 
开发者ID:Crypta-Eve,项目名称:spyglass,代码行数:9,代码来源:soundmanager.py

示例8: __init__

# 需要导入模块: from PyQt4.QtCore import QThread [as 别名]
# 或者: from PyQt4.QtCore.QThread import __init__ [as 别名]
def __init__(self):
        QThread.__init__(self)
        self.alerted = False 
开发者ID:Crypta-Eve,项目名称:spyglass,代码行数:5,代码来源:amazon_s3.py

示例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 
开发者ID:Crypta-Eve,项目名称:spyglass,代码行数:6,代码来源:threads.py

示例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 
开发者ID:reillychase,项目名称:WarChatter,代码行数:14,代码来源:main.py

示例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 
开发者ID:DaniLabs,项目名称:rexploit,代码行数:8,代码来源:scanthread.py

示例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 
开发者ID:DaniLabs,项目名称:rexploit,代码行数:7,代码来源:exploitthread.py

示例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) 
开发者ID:MaximeCheramy,项目名称:remotefreebox-gui,代码行数:12,代码来源:freebox.py

示例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() 
开发者ID:OpenBCI,项目名称:OpenBCI_LSL,代码行数:16,代码来源:streamerlsl.py

示例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 
开发者ID:Acer54,项目名称:Webradio_v2,代码行数:7,代码来源:usb_manager.py


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