本文整理汇总了Python中backend.Backend.append方法的典型用法代码示例。如果您正苦于以下问题:Python Backend.append方法的具体用法?Python Backend.append怎么用?Python Backend.append使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类backend.Backend
的用法示例。
在下文中一共展示了Backend.append方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: InputPad
# 需要导入模块: from backend import Backend [as 别名]
# 或者: from backend.Backend import append [as 别名]
#.........这里部分代码省略.........
self.setAttribute( QtCore.Qt.WA_Maemo5PortraitOrientation, True )
self.sub_palette = self.palette()
self.sub_palette.setColor( QtGui.QPalette.ButtonText, self.sub_palette.mid().color() )
self.text_palette = self.palette()
self.text_palette.setColor( QtGui.QPalette.Text, self.sub_palette.windowText().color() )
self.text_palette.setColor( QtGui.QPalette.Base, self.sub_palette.window().color() )
self.text_palette.setColor( QtGui.QPalette.Base, self.sub_palette.window().color() )
self.text_palette.setColor( QtGui.QPalette.Base, QtGui.QColor( 0, 0, 0, 0 ) )
self.text_palette.setColor( QtGui.QPalette.Background, QtGui.QColor( 0, 0, 0, 0 ) )
self.rotater = Rotater()
self.layout = QtGui.QVBoxLayout()
self.layout.setSpacing( 0 )
self.layout.setContentsMargins( 0, 0, 0, 0 )
self.setLayout( self.layout )
self.textedit = TextEditKey( self.KEYCODE_BACKSPACE, self )
#self.textedit.setStyleSheet( "QTextEdit { border-width : 0px ; padding : 0px }" )
#self.textedit.setPalette( self.text_palette )
self.textedit.setFixedHeight( self.TEXTEDIT_HEIGHT )
self.textedit.clicked.connect( self.slot_key_click )
self.textedit.longpressed.connect( self.slot_key_longpress )
self.textedit.setAttribute( QtCore.Qt.WA_TranslucentBackground, True )
self.layout.addWidget( self.textedit )
self.stack = QtGui.QStackedLayout()
self.layout.addLayout( self.stack )
self.keypad_list = []
keypad = QtGui.QWidget( self )
self.keypad_list.append( keypad )
keypad_vlayout = QtGui.QVBoxLayout()
keypad_vlayout.setSpacing( 0 )
#keypad_vlayout.setContentsMargins( 0, 0, 0, 0 )
keypad.setLayout( keypad_vlayout )
keypad_layout = QtGui.QGridLayout()
keypad_layout.setSpacing( 0 )
keypad_layout.setContentsMargins( 0, 0, 0, 0 )
keypad_vlayout.addLayout( keypad_layout )
self.key_list = []
self.key_label_list = []
self.key_sub_label_list = []
for keycode in range( len( self.KEY_MAP ) ) :
key_map = self.KEY_MAP[keycode]
key = NumPadKey( keycode, self )
key.setFocusProxy( self.textedit )
#key.setText( self.KEY_TEXT[keycode][0] )
key.setFixedHeight( self.KEY_HEIGHT * key_map[2] )
keypad_layout.addWidget( key, key_map[1][0], key_map[1][1] ,key_map[1][2] ,key_map[1][3] )
self.key_list.append( key )
key.clicked.connect( self.slot_key_click )
key.longpressed.connect( self.slot_key_longpress )
key_layout = QtGui.QGridLayout()
key_layout.setSpacing( 0 )
key_layout.setContentsMargins( 0, 0, 0, 0 )
key.setLayout( key_layout )
#label = QtGui.QLabel()
#key_layout.addWidget( label, 0, 0, 1, 1 )