本文整理汇总了Python中PyQt4.QtCore.pyqtSignal方法的典型用法代码示例。如果您正苦于以下问题:Python QtCore.pyqtSignal方法的具体用法?Python QtCore.pyqtSignal怎么用?Python QtCore.pyqtSignal使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PyQt4.QtCore
的用法示例。
在下文中一共展示了QtCore.pyqtSignal方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: setupUi
# 需要导入模块: from PyQt4 import QtCore [as 别名]
# 或者: from PyQt4.QtCore import pyqtSignal [as 别名]
def setupUi(self, Dialog):
Dialog.setObjectName(_fromUtf8("Dialog"))
Dialog.resize(265, 122)
Dialog.setLocale(QtCore.QLocale(QtCore.QLocale.English, QtCore.QLocale.UnitedStates))
Dialog.setModal(False)
self.buttonBox = QtGui.QDialogButtonBox(Dialog)
self.buttonBox.setGeometry(QtCore.QRect(20, 80, 231, 32))
self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel|QtGui.QDialogButtonBox.Ok)
self.buttonBox.setObjectName(_fromUtf8("buttonBox"))
self.horizontalSlider = QtGui.QSlider(Dialog)
self.horizontalSlider.setGeometry(QtCore.QRect(10, 40, 241, 22))
self.horizontalSlider.setLocale(QtCore.QLocale(QtCore.QLocale.English, QtCore.QLocale.UnitedStates))
self.horizontalSlider.setMaximum(9)
self.horizontalSlider.setSliderPosition(3)
self.horizontalSlider.setOrientation(QtCore.Qt.Horizontal)
self.horizontalSlider.setObjectName(_fromUtf8("horizontalSlider"))
self.label = QtGui.QLabel(Dialog)
self.label.setGeometry(QtCore.QRect(10, 10, 111, 16))
self.label.setObjectName(_fromUtf8("label"))
text_auto = QtCore.pyqtSignal(str)
self.retranslateUi(Dialog)
QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(_fromUtf8("accepted()")), Dialog.accept)
QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(_fromUtf8("rejected()")), Dialog.reject)
QtCore.QObject.connect(self.horizontalSlider, QtCore.SIGNAL('valueChanged(int)'), self.getValue)
#self.horizontalSlider.valueChanged.connect(functools.partial(class_changed, self))
QtCore.QMetaObject.connectSlotsByName(Dialog)
示例2: init_GUI
# 需要导入模块: from PyQt4 import QtCore [as 别名]
# 或者: from PyQt4.QtCore import pyqtSignal [as 别名]
def init_GUI(self):
''' Este método inicializa la interfaz y sus elementos'''
my_signal = QtCore.pyqtSignal().connect()
self.label1 = QtGui.QLabel('Texto:', self)
self.label1.move(10, 15)
self.edit1 = QtGui.QLineEdit('', self)
self.edit1.setGeometry(45, 15, 100, 20)
self.boton1 = QtGui.QPushButton('&Calcular', self)
self.boton1.resize(self.boton1.sizeHint())
''' Aquí se crea el objeto QHBoxLayout() y QVBoxLayout() y se agregan los Widgets mediante el método addWidget. El método
stretch() permite incluir un espaciador que expande el layout hacia la derecha y hacia abajo.'''
hbox = QtGui.QHBoxLayout()
hbox.addWidget(self.label1)
hbox.addWidget(self.edit1)
hbox.addWidget(self.boton1)
hbox.addStretch(1)
vbox = QtGui.QVBoxLayout()
vbox.setAlignment(QtCore.Qt.AlignTop)
#vbox.addStretch(1)
vbox.addLayout(hbox)
self.setLayout(vbox) # el layout horizontal está contenido en el vertical
示例3: insert_property
# 需要导入模块: from PyQt4 import QtCore [as 别名]
# 或者: from PyQt4.QtCore import pyqtSignal [as 别名]
def insert_property(classdict,name,property_placeholder):
notify_name = name + '_changed'
notify = QtCore.pyqtSignal(property_placeholder.property_type)
classdict[notify_name] = notify
getter = property_placeholder.create_getter(name)
setter = property_placeholder.create_full_setter(name,notify_name)
classdict[name] = QtCore.pyqtProperty(property_placeholder.property_type,fget=getter,fset=setter,notify=notify)
示例4: __init__
# 需要导入模块: from PyQt4 import QtCore [as 别名]
# 或者: from PyQt4.QtCore import pyqtSignal [as 别名]
def __init__(self):
QtGui.QWidget.__init__(self)
self.setupUi(self)
self.index = -1
self.indexSpeed = QtCore.pyqtSignal(int, int)
self.connect(
self.lightLevel, QtCore.SIGNAL("valueChanged(int)"), self, QtCore.SLOT("emitIndexedSpeedSignal(int)")
)
示例5: __init__
# 需要导入模块: from PyQt4 import QtCore [as 别名]
# 或者: from PyQt4.QtCore import pyqtSignal [as 别名]
def __init__(self):
#On init we must check dependencies: if it raises no error, it's used.
# try:
from PyQt4 import QtCore, QtGui
# except:
# from PySide import QtCore, QtGui
self.ping = type('Ping', (QtCore.QThread,), {'call': QtCore.pyqtSignal(object)})()
self.ping.call.connect(lambda cb: cb(), type=QtCore.Qt.BlockingQueuedConnection)
self.app = pydev_guisupport.get_app_qt4()
示例6: __init__
# 需要导入模块: from PyQt4 import QtCore [as 别名]
# 或者: from PyQt4.QtCore import pyqtSignal [as 别名]
def __init__(self, CodeGenerator, mainDrawWidget, runConfigDictionary, dataDictionary):
QtCore.QThread.__init__(self)
self.__CodeGenerator = CodeGenerator
self.__runThreadMessageQueue = CodeGenerator._PX_CodeAnalyser__runThreadMessageQueue
self.__drawWidget = mainDrawWidget
self.__signalUpdated = QtCore.pyqtSignal(str)
self.__RunConfigDictionary = runConfigDictionary
self.__DataDictionary = dataDictionary
self.__bRecord = False
示例7: __init__
# 需要导入模块: from PyQt4 import QtCore [as 别名]
# 或者: from PyQt4.QtCore import pyqtSignal [as 别名]
def __init__(self,fileName,addressHead,path,id):
QtCore.QObject.__init__(self)
self.fileAddress = addressHead+"images/"+fileName
self.fileName = fileName
self.QprcessBar = QtGui.QProgressBar()
self.QprcessBar.setMaximum = 100
self.QprcessBar.setMinimum = 0
self.path = path
self.ID = id
self.updateSignal = QtCore.pyqtSignal(int,int)
示例8: __init__
# 需要导入模块: from PyQt4 import QtCore [as 别名]
# 或者: from PyQt4.QtCore import pyqtSignal [as 别名]
def __init__(self):
QDialog.__init__(self)
# Set up the user interface from Designer.
self.ui = Ui_ColorRampManager()
self.setupUi(self)
#self.updateUi()
self.installDir = ''
self.packageType = ''
self.checkUpdateAuto = QtCore.pyqtSignal()
self.connect(self, SIGNAL("checkUpdate"),
self.pbtnUpdateCheck, SIGNAL('clicked()'))
示例9: __init__
# 需要导入模块: from PyQt4 import QtCore [as 别名]
# 或者: from PyQt4.QtCore import pyqtSignal [as 别名]
def __init__(self,xmlrpc):
QtGui.QDialog.__init__(self)
self.dialog = QtGui.QDialog()
self.ui = Ui_MethodCallDialog.Ui_Dialog()
self.ui.setupUi(self)
self.setWindowFlags(QtCore.Qt.WindowMinMaxButtonsHint | QtCore.Qt.WindowCloseButtonHint)
self.__xmlrpc = None
self.__historyPath = ''
self.__aboutDig = None
sig_historyPathChanged = QtCore.pyqtSignal(['QString'])
sig_methodCallCompleted = QtCore.pyqtSignal(['QString'])
QtCore.QObject.connect(self.ui.m_methodLW, QtCore.SIGNAL('itemDoubleClicked(QListWidgetItem*)'), self.ItemDC )
QtCore.QObject.connect(self.ui.m_methodCallPb, QtCore.SIGNAL('clicked()'), self.MethodCall )
QtCore.QObject.connect(self.ui.m_savePb, QtCore.SIGNAL('clicked()'), self.SaveParams2Txt )
QtCore.QObject.connect(self.ui.m_loadPb, QtCore.SIGNAL('clicked()'), self.LoadTxt2Params )
QtCore.QObject.connect(self.ui.m_resSavePb, QtCore.SIGNAL('clicked()'), self.SaveRes2Html )
QtCore.QObject.connect(self, QtCore.SIGNAL('sig_methodCallCompleted(QString)'), self.MethodCallCompleted )
QtCore.QObject.connect(self.ui.m_aboutPb, QtCore.SIGNAL('clicked()'), self.About )
QtCore.QObject.connect(self.ui.m_confPb, QtCore.SIGNAL('clicked()'), self.OpenConfDialog )
示例10: __init__
# 需要导入模块: from PyQt4 import QtCore [as 别名]
# 或者: from PyQt4.QtCore import pyqtSignal [as 别名]
def __init__(self,parent=None):
super(QtGui.QPlainTextEdit,self).__init__(parent)
self._fn = None
self._fileChanged = False
self._changed_prev = False
file_Changed = QtCore.pyqtSignal(bool,name="fileChanged")
self.name = "NoName"
self._title = self.name
self._title2 = self.name
self.just_name = ""
self.textChanged.connect(self._text_changed)
示例11: __init__
# 需要导入模块: from PyQt4 import QtCore [as 别名]
# 或者: from PyQt4.QtCore import pyqtSignal [as 别名]
def __init__(self, iface):
QtCore.QObject.__init__(self)
self.iface = iface
self.qgsMapCanvas = None
self.sourcePointLayer = None
self.sourcePoint = []
self.targetPointLayer = None
self.targetPoint = []
self.road = None
self.calculatedRoute = None
self.manyLongPath = None
self.maxLength = None
self.isContinueWork = True
self.error = QtCore.pyqtSignal(Exception, basestring)
示例12: __init__
# 需要导入模块: from PyQt4 import QtCore [as 别名]
# 或者: from PyQt4.QtCore import pyqtSignal [as 别名]
def __init__(self):
QtCore.QThread.__init__(self)
self._socket = socket.socket(socket.AF_INET,socket.SOCK_STREAM)
self._messaggi = queue.Queue(255)
self._stop = False
self._logger = logging.getLogger()
_refreshcursor = QtCore.pyqtSignal(int,name='refreshCursor')
_applydelete = QtCore.pyqtSignal(int, name='applyDelete')
_applyaggiunta = QtCore.pyqtSignal(str, name='applyAggiunta')
_nuovopost = QtCore.pyqtSignal(int,name='nuovoPost')
_selpost = QtCore.pyqtSignal(int,name='refreshPost')
_nuovutente = QtCore.pyqtSignal(int,name='selectUser')
_myid = QtCore.pyqtSignal(int,name='myId')
示例13: initUI
# 需要导入模块: from PyQt4 import QtCore [as 别名]
# 或者: from PyQt4.QtCore import pyqtSignal [as 别名]
def initUI(self):
self.modeSelected = QtCore.pyqtSignal(str)
self.offline_btn = QtGui.QPushButton("Offline mode",self)
self.settings_btn = QtGui.QPushButton("Change proxy settings", self)
self.fail_label = QtGui.QLabel("Could not connect\nto internet",self)
self.mainlayout = QtGui.QGridLayout(self)
self.mainlayout.addWidget(self.fail_label,1,0)
self.mainlayout.addWidget(self.offline_btn,2,0)
self.mainlayout.addWidget(self.settings_btn,3,0)
self.offline_btn.pressed.connect(self.offline_btn_trigger)
self.settings_btn.pressed.connect(self.settings_btn_trigger)
self.show()
示例14: __init__
# 需要导入模块: from PyQt4 import QtCore [as 别名]
# 或者: from PyQt4.QtCore import pyqtSignal [as 别名]
def __init__(self, libMgr):
self.libMgr = libMgr
self.fileList = []
self.fileDirs = None
self.regexs = self.initRegexs()
self.ignoreFileChanged = {} #key/value is explained in ignoreFileChanged
#Setup the file watcher related stuff
self.rTimer = QtCore.QObject()
self.rTimerSignal = QtCore.pyqtSignal()
self.fWatcher = QtCore.QFileSystemWatcher()
QtCore.QObject.connect(self.fWatcher, QtCore.SIGNAL("fileChanged(const QString&)"), self.__fileChanged)
QtCore.QObject.connect(self.rTimer, QtCore.SIGNAL("reloadFile(const QString&)"), self.__reloadFile)
QtCore.QObject.connect(self.rTimer, QtCore.SIGNAL("skipReloadFile(const QString&)"), self.__skipReloadFile)
QtCore.QObject.connect(self.fWatcher, QtCore.SIGNAL("directoryChanged(const QString&)"), self.__directoryChanged)
示例15: __init__
# 需要导入模块: from PyQt4 import QtCore [as 别名]
# 或者: from PyQt4.QtCore import pyqtSignal [as 别名]
def __init__(self, parent=None):
import os
import pymel.core as pm
# initialize the QlistView
QtGui.QTreeWidget.__init__(self, parent)
self.GData = g.GData()
self.dropOp = QtCore.pyqtSignal(QtCore.Qt.KeyboardModifiers, bool, str)
#locate the directory where all of the images for the UI live
ScriptDir = pm.internalVar(uad = True)
self.imgDirectory = str(ScriptDir+"/scripts/pipeline/general/filebrowse/images/")
self.setAcceptDrops(True)
self.setDragEnabled(False)
self.setDragDropMode(QtGui.QAbstractItemView.DropOnly)
self.setColumnCount(1)
self.setHeaderHidden(True)
self.reloadBookmarks()