本文整理汇总了Python中helper.QHelper.master方法的典型用法代码示例。如果您正苦于以下问题:Python QHelper.master方法的具体用法?Python QHelper.master怎么用?Python QHelper.master使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类helper.QHelper
的用法示例。
在下文中一共展示了QHelper.master方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from helper import QHelper [as 别名]
# 或者: from helper.QHelper import master [as 别名]
def __init__( self, parent ):
super( self.__class__, self ).__init__( parent )
self.textCursor = QtGui.QTextCursor( self.document() )
self.setReadOnly( 1 )
self.project = None
self.connect( QHelper.master(), QtCore.SIGNAL( 'pickedProject' ), self.pickedProjectCallback )
self.connect( QHelper.master(), QtCore.SIGNAL( 'projectData' ), self.projectDataCallback )
示例2: keyPressEvent
# 需要导入模块: from helper import QHelper [as 别名]
# 或者: from helper.QHelper import master [as 别名]
def keyPressEvent( self, event ):
if event.key() == QtCore.Qt.Key_Shift:
self.__sendMessageOnReturn = False
elif event.key() == QtCore.Qt.Key_Return:
if self.__sendMessageOnReturn:
if len( self.toPlainText() ):
QHelper.master().emit( QtCore.SIGNAL( 'sendMessage' ), self.contact, self.toPlainText() )
return
QtGui.QTextEdit.keyPressEvent( self, event )
示例3: reportSubmitCallback
# 需要导入模块: from helper import QHelper [as 别名]
# 或者: from helper.QHelper import master [as 别名]
def reportSubmitCallback( self ):
QHelper.log( '::CONNECT:QReportView:reportSubmit' )
data = self.values()
reportData = 'report %sh %sm on %s %s' % (
QHelper.str( data.get( 'h', '0' ) ),
QHelper.str( data.get( 'm', '0' ) ),
QHelper.str( data.get( 'project', '' ) ),
QHelper.str( data.get( 'summary', '' ) ),
)
print '::REPORT:MESSAGE', reportData
QHelper.master().emit( QtCore.SIGNAL( 'transportSignal' ), 'sendMessage', DBConf.get( 'bot' ), reportData )
self.hide()
示例4: SIGNALCBloginSuccessCallback
# 需要导入模块: from helper import QHelper [as 别名]
# 或者: from helper.QHelper import master [as 别名]
def SIGNALCBloginSuccessCallback( self ):
QHelper.log( '::CONNECT:master:loginSuccess' )
self.master.show()
self.master.View.contact().show()
self.master.View.chat().hide()
QHelper.master().emit( QtCore.SIGNAL( 'transportSignal' ), 'sendMessage', DBConf.get( 'bot' ), 'online' )
示例5: SIGNALCBsendMessageCallback
# 需要导入模块: from helper import QHelper [as 别名]
# 或者: from helper.QHelper import master [as 别名]
def SIGNALCBsendMessageCallback( self, contact, message ):
QHelper.log( '::CONNECT:master:sendMessage', contact, message )
QHelper.master().emit( QtCore.SIGNAL( 'transportSignal' ), 'sendMessage', contact, message.replace( '<br />', '\n' ).replace( '<br/>', '\n' ).replace( '<br>', '\n' ) )
示例6: projectsActionCallback
# 需要导入模块: from helper import QHelper [as 别名]
# 或者: from helper.QHelper import master [as 别名]
def projectsActionCallback( self ):
self.master.View.projects().show()
QHelper.master().emit( QtCore.SIGNAL( 'dbSignal' ), 'doc', {'type':'project', 'emit':'projectList'} )
示例7: preferencesCancelCallback
# 需要导入模块: from helper import QHelper [as 别名]
# 或者: from helper.QHelper import master [as 别名]
def preferencesCancelCallback( self ):
QHelper.log( '::CONNECT:QLoginView:preferencesCancel' )
if not QHelper.master().isVisible() and not self.isVisible():
self.show()
示例8: loginSubmitCallback
# 需要导入模块: from helper import QHelper [as 别名]
# 或者: from helper.QHelper import master [as 别名]
def loginSubmitCallback( self, username, passwd ):
QHelper.log( '::CONNECT:QLoginView:loginSubmit', username, passwd )
self.status.setStyleSheet( 'QLabel { color : gray; }' )
self.status.setText( '...authentication' )
QHelper.master().emit( QtCore.SIGNAL( 'transportSignal' ), '_connect', username, passwd, {'server':DBConf.get('server'),'port':DBConf.get('port'),'nickname':DBConf.get('username').split('.')[0].title()} )
示例9: SIGNALCBpickedProjectCallback
# 需要导入模块: from helper import QHelper [as 别名]
# 或者: from helper.QHelper import master [as 别名]
def SIGNALCBpickedProjectCallback( self, project ):
QHelper.log( '::CONNECT:master:pickedProject', project )
QHelper.master().emit( QtCore.SIGNAL( 'dbSignal' ), 'doc', {'type':'project', 'id':project, 'emit':'projectData'} )
示例10: mousePressEvent
# 需要导入模块: from helper import QHelper [as 别名]
# 或者: from helper.QHelper import master [as 别名]
def mousePressEvent( self, event ):
QHelper.master().emit( QtCore.SIGNAL( 'clickedContact' ), self.name )
示例11: reportActionCallback
# 需要导入模块: from helper import QHelper [as 别名]
# 或者: from helper.QHelper import master [as 别名]
def reportActionCallback( self ):
self.master.View.report().show()
#QHelper.master().emit( QtCore.SIGNAL( 'transportSignal' ), 'query' )
QHelper.master().emit( QtCore.SIGNAL( 'dbSignal' ), 'doc', {'type':'project', 'emit':'projectList'} )
示例12: mouseDoubleClickEvent
# 需要导入模块: from helper import QHelper [as 别名]
# 或者: from helper.QHelper import master [as 别名]
def mouseDoubleClickEvent( self, event ):
QHelper.master().emit( QtCore.SIGNAL( 'pickedContact' ), self.name )