當前位置: 首頁>>代碼示例>>Python>>正文


Python Qt.SIGNAL屬性代碼示例

本文整理匯總了Python中PyQt4.Qt.SIGNAL屬性的典型用法代碼示例。如果您正苦於以下問題:Python Qt.SIGNAL屬性的具體用法?Python Qt.SIGNAL怎麽用?Python Qt.SIGNAL使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在PyQt4.Qt的用法示例。


在下文中一共展示了Qt.SIGNAL屬性的12個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: main

# 需要導入模塊: from PyQt4 import Qt [as 別名]
# 或者: from PyQt4.Qt import SIGNAL [as 別名]
def main(top_block_cls=control_gui, options=None):

    from distutils.version import StrictVersion
    if StrictVersion(Qt.qVersion()) >= StrictVersion("4.5.0"):
        style = gr.prefs().get_string('qtgui', 'style', 'raster')
        Qt.QApplication.setGraphicsSystem(style)
    qapp = Qt.QApplication(sys.argv)
    
    tb = top_block_cls()
    #connection_string = tb.sitl.connection_string()
    #print connection_string
    tb.connect_to_vehicle('udp:127.0.0.1:14562')
    tb.start()
    tb.show()

    # Connect to the Vehicle.
    #print("Connecting to vehicle on: %s" % (connection_string,))
    #vehicle = connect(connection_string, wait_ready=True)
    def quitting():
        tb.stop()
        tb.wait()
    qapp.connect(qapp, Qt.SIGNAL("aboutToQuit()"), quitting)
    qapp.exec_() 
開發者ID:deptofdefense,項目名稱:gr-uaslink,代碼行數:25,代碼來源:control_gui_override.py

示例2: main

# 需要導入模塊: from PyQt4 import Qt [as 別名]
# 或者: from PyQt4.Qt import SIGNAL [as 別名]
def main(top_block_cls=control_gui, options=None):

    from distutils.version import StrictVersion
    if StrictVersion(Qt.qVersion()) >= StrictVersion("4.5.0"):
        style = gr.prefs().get_string('qtgui', 'style', 'raster')
        Qt.QApplication.setGraphicsSystem(style)
    qapp = Qt.QApplication(sys.argv)
    
    tb = top_block_cls()
    #connection_string = tb.sitl.connection_string()
    #print connection_string
    #tb.connect_to_vehicle('udp:127.0.0.1:14552',baud_rate)
    tb.zmq_setup('tcp://127.0.0.1:14000')
    tb.start()
    tb.show()

    # Connect to the Vehicle.
    #print("Connecting to vehicle on: %s" % (connection_string,))
    #vehicle = connect(connection_string, wait_ready=True)
    def quitting():
        tb.stop()
        tb.wait()
    qapp.connect(qapp, Qt.SIGNAL("aboutToQuit()"), quitting)
    qapp.exec_() 
開發者ID:deptofdefense,項目名稱:gr-uaslink,代碼行數:26,代碼來源:control_gui_override_mavutil.py

示例3: main

# 需要導入模塊: from PyQt4 import Qt [as 別名]
# 或者: from PyQt4.Qt import SIGNAL [as 別名]
def main(top_block_cls=control_gui, options=None):

    from distutils.version import StrictVersion
    if StrictVersion(Qt.qVersion()) >= StrictVersion("4.5.0"):
        style = gr.prefs().get_string('qtgui', 'style', 'raster')
        Qt.QApplication.setGraphicsSystem(style)
    qapp = Qt.QApplication(sys.argv)
    
    tb = top_block_cls()
    #connection_string = tb.sitl.connection_string()
    #print connection_string
    #tb.connect_to_vehicle('udp:127.0.0.1:14552',baud_rate)
    tb.zmq_setup('tcp://127.0.0.1:14000')
    tb.start()
    tb.show()

    # Connect to the Vehicle.
    #print("Connecting to vehicle on: %s" % (connection_string,))
    #vehicle = connect(connection_string, wait_ready=True)
    def quitting():
        tb.running=False
        tb.stop()
        tb.wait()
    qapp.connect(qapp, Qt.SIGNAL("aboutToQuit()"), quitting)
    qapp.exec_() 
開發者ID:deptofdefense,項目名稱:gr-uaslink,代碼行數:27,代碼來源:control_gui_override_control.py

示例4: main

# 需要導入模塊: from PyQt4 import Qt [as 別名]
# 或者: from PyQt4.Qt import SIGNAL [as 別名]
def main(top_block_cls=control_gui, options=None):

    from distutils.version import StrictVersion
    if StrictVersion(Qt.qVersion()) >= StrictVersion("4.5.0"):
        style = gr.prefs().get_string('qtgui', 'style', 'raster')
        Qt.QApplication.setGraphicsSystem(style)
    qapp = Qt.QApplication(sys.argv)

    tb = top_block_cls()
    tb.start()
    tb.show()

    def quitting():
        tb.stop()
        tb.wait()
    qapp.connect(qapp, Qt.SIGNAL("aboutToQuit()"), quitting)
    qapp.exec_() 
開發者ID:deptofdefense,項目名稱:gr-uaslink,代碼行數:19,代碼來源:control_gui_run.py

示例5: main

# 需要導入模塊: from PyQt4 import Qt [as 別名]
# 或者: from PyQt4.Qt import SIGNAL [as 別名]
def main(top_block_cls=top_block, options=None):

    from distutils.version import StrictVersion

    if StrictVersion(Qt.qVersion()) >= StrictVersion("4.5.0"):
        style = gr.prefs().get_string("qtgui", "style", "raster")
        Qt.QApplication.setGraphicsSystem(style)
    qapp = Qt.QApplication(sys.argv)

    tb = top_block_cls()
    tb.start()
    if GUI:
        tb.show()

    def quitting():
        tb.stop()
        tb.wait()

    qapp.connect(qapp, Qt.SIGNAL("aboutToQuit()"), quitting)
    qapp.exec_() 
開發者ID:scivision,項目名稱:piradar,代碼行數:22,代碼來源:rp_eclipse.py

示例6: main

# 需要導入模塊: from PyQt4 import Qt [as 別名]
# 或者: from PyQt4.Qt import SIGNAL [as 別名]
def main(top_block_cls=os_uhf_rx, options=None):

    from distutils.version import StrictVersion
    if StrictVersion(Qt.qVersion()) >= StrictVersion("4.5.0"):
        style = gr.prefs().get_string('qtgui', 'style', 'raster')
        Qt.QApplication.setGraphicsSystem(style)
    qapp = Qt.QApplication(sys.argv)

    tb = top_block_cls()
    tb.start()
    tb.show()

    def quitting():
        tb.stop()
        tb.wait()
    qapp.connect(qapp, Qt.SIGNAL("aboutToQuit()"), quitting)
    qapp.exec_() 
開發者ID:esa,項目名稱:gr-opssat,代碼行數:19,代碼來源:os_uhf_rx.py

示例7: main

# 需要導入模塊: from PyQt4 import Qt [as 別名]
# 或者: from PyQt4.Qt import SIGNAL [as 別名]
def main(top_block_cls=os_demod_decode, options=None):

    from distutils.version import StrictVersion
    if StrictVersion(Qt.qVersion()) >= StrictVersion("4.5.0"):
        style = gr.prefs().get_string('qtgui', 'style', 'raster')
        Qt.QApplication.setGraphicsSystem(style)
    qapp = Qt.QApplication(sys.argv)

    tb = top_block_cls()
    tb.start()
    tb.show()

    def quitting():
        tb.stop()
        tb.wait()
    qapp.connect(qapp, Qt.SIGNAL("aboutToQuit()"), quitting)
    qapp.exec_() 
開發者ID:esa,項目名稱:gr-opssat,代碼行數:19,代碼來源:os_demod_decode.py

示例8: start

# 需要導入模塊: from PyQt4 import Qt [as 別名]
# 或者: from PyQt4.Qt import SIGNAL [as 別名]
def start(self, message):
        self.d = QDialog()
        self.d.setModal(1)
        self.d.setWindowTitle('Please Wait')
        self.d.setWindowFlags(self.d.windowFlags() | QtCore.Qt.WindowStaysOnTopHint)
        l = QLabel(message)
        vbox = QVBoxLayout(self.d)
        vbox.addWidget(l)
        self.d.show()
        if not self.waiting:
            self.waiting = True
            self.d.connect(waitDialog, SIGNAL('dongle_done'), self.stop) 
開發者ID:mazaclub,項目名稱:encompass,代碼行數:14,代碼來源:btchipwallet.py

示例9: decrypt_message

# 需要導入模塊: from PyQt4 import Qt [as 別名]
# 或者: from PyQt4.Qt import SIGNAL [as 別名]
def decrypt_message(self, pubkey, message, password):
        raise BaseException( _('Decrypt method is not implemented in Trezor') )
        #address = public_key_to_bc_address(pubkey.decode('hex'))
        #address_path = self.address_id(address)
        #address_n = self.get_client().expand_path(address_path)
        #try:
        #    decrypted_msg = self.get_client().decrypt_message(address_n, b64decode(message))
        #except Exception, e:
        #    give_error(e)
        #finally:
        #    twd.emit(SIGNAL('trezor_done'))
        #return str(decrypted_msg) 
開發者ID:mazaclub,項目名稱:encompass,代碼行數:14,代碼來源:trezor.py

示例10: start

# 需要導入模塊: from PyQt4 import Qt [as 別名]
# 或者: from PyQt4.Qt import SIGNAL [as 別名]
def start(self, message):
        self.d = QDialog()
        self.d.setModal(1)
        self.d.setWindowTitle('Please Check Trezor Device')
        self.d.setWindowFlags(self.d.windowFlags() | QtCore.Qt.WindowStaysOnTopHint)
        l = QLabel(message)
        vbox = QVBoxLayout(self.d)
        vbox.addWidget(l)
        self.d.show()
        if not self.waiting:
            self.waiting = True
            self.d.connect(twd, SIGNAL('trezor_done'), self.stop) 
開發者ID:mazaclub,項目名稱:encompass,代碼行數:14,代碼來源:trezor.py

示例11: __init__

# 需要導入模塊: from PyQt4 import Qt [as 別名]
# 或者: from PyQt4.Qt import SIGNAL [as 別名]
def __init__(self , *args):
        apply(Qt.QFrame.__init__, (self,) + args)
        vknobpos=scopeheight+30
        hknobpos=scopewidth+10
        # the following: setPal..  doesn't seem to work on Ein
        try:
            self.setPaletteBackgroundColor( QColor(240,240,245))
        except: pass
        self.setFixedSize(scopewidth+160, scopeheight+160)
        self.freezeState = 0

        self.knbSignal = LblKnob(self,160, vknobpos, "Signal",1)
        self.knbTime = LblKnob(self,310, vknobpos,"Frequency", 1) 
        self.knbTime.setRange(1.0, 1250.0)

        self.knbSignal.setRange(100, 1000000)

        self.plot = FScope(self)
        self.plot.setGeometry(12.5, 10, scopewidth+120, scopeheight)
        self.picker = Qwt.QwtPlotPicker(
            Qwt.QwtPlot.xBottom,
            Qwt.QwtPlot.yLeft,
            Qwt.QwtPicker.PointSelection | Qwt.QwtPicker.DragSelection,
            Qwt.QwtPlotPicker.CrossRubberBand,
            Qwt.QwtPicker.ActiveOnly, #AlwaysOn,
            self.plot.canvas())
        self.picker.setRubberBandPen(Qt.QPen(Qt.Qt.green))
        self.picker.setTrackerPen(Qt.QPen(Qt.Qt.cyan))

        self.connect(self.knbTime.knob, Qt.SIGNAL("valueChanged(double)"),
                     self.setTimebase)
        self.knbTime.setValue(1000.0)
        self.connect(self.knbSignal.knob, Qt.SIGNAL("valueChanged(double)"),
                     self.setAmplitude)
        self.knbSignal.setValue(1000000)

        self.plot.show() 
開發者ID:ggventurini,項目名稱:dualscope123,代碼行數:39,代碼來源:main.py

示例12: gnuradio_main

# 需要導入模塊: from PyQt4 import Qt [as 別名]
# 或者: from PyQt4.Qt import SIGNAL [as 別名]
def gnuradio_main(samp_rate, gain, freq, block_size):
    import ctypes
    import sys
    if sys.platform.startswith('linux'):
        try:
            x11 = ctypes.cdll.LoadLibrary('libX11.so')
            x11.XInitThreads()
        except:
            print "Warning: failed to XInitThreads()"

    from distutils.version import StrictVersion
    if StrictVersion(Qt.qVersion()) >= StrictVersion("4.5.0"):
        style = gr.prefs().get_string('qtgui', 'style', 'raster')
        Qt.QApplication.setGraphicsSystem(style)

    qapp = Qt.QApplication([])

    tb = scope(samp_rate, gain, freq, block_size)
    tb.start()
    tb.show()

    def quitting():
        tb.stop()
        tb.wait()
    qapp.connect(qapp, Qt.SIGNAL("aboutToQuit()"), quitting)
    qapp.exec_() 
開發者ID:swkrueger,項目名稱:Thrifty,代碼行數:28,代碼來源:scope.py


注:本文中的PyQt4.Qt.SIGNAL屬性示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。