本文整理汇总了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_()
示例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_()
示例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_()
示例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_()
示例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_()
示例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_()
示例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_()
示例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)
示例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)
示例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)
示例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()
示例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_()