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


Python Keyboard.show方法代碼示例

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


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

示例1: setup_network_connection

# 需要導入模塊: from keyboard import Keyboard [as 別名]
# 或者: from keyboard.Keyboard import show [as 別名]
    def setup_network_connection(self):
        Keyboard.show(layout=[])

        from subprocess import Popen
        if self.wicd is not None:
            if self.wicd.poll() is None:
                return
        self.wicd = Popen(['xterm', '-maximized', '-e', 'wicd-curses'])
開發者ID:stdk,項目名稱:stoppark_panel,代碼行數:10,代碼來源:config_ui.py

示例2: setup

# 需要導入模塊: from keyboard import Keyboard [as 別名]
# 或者: from keyboard.Keyboard import show [as 別名]
    def setup(self, terminals, payment):
        self.terminals = terminals
        self.payment = payment

        self.ui.setTime.clicked.connect(self.set_time)
        self.ui.showKeyboard.clicked.connect(lambda: Keyboard.show())

        self.ui.setDBIP.clicked.connect(self.set_db_ip)
        self.ui.testDisplay.clicked.connect(self.test_display)
開發者ID:stdk,項目名稱:stoppark_panel,代碼行數:11,代碼來源:config_ui.py

示例3: Manager

# 需要導入模塊: from keyboard import Keyboard [as 別名]
# 或者: from keyboard.Keyboard import show [as 別名]
class Manager( QtCore.QObject ) :
    def __init__( self ) :
        QtCore.QObject .__init__( self )
        self.keyboard = None
        self.vkeyboard = None
        self.controlor = Controlor()

        self.controlor.longpressed.connect( self.controlor.close )
        self.controlor.clicked.connect( self.toggle_keyboard )
        #self.controlor.setAttribute( QtCore.Qt.WA_Maemo5AutoOrientation, True )
        #self.desktop = QtGui.QDesktopWidget()
        #self.desktop.resized.connect( self.remap_layout )
        self.is_show = False

        self.remap_layout()
    def create_keyboard( self ) :
        self.keyboard = Keyboard( "qml/Keyboard.qml" )
        self.keyboard.toggled.connect( self.toggle_keyboard )
        #self.keyboard.resize( 800, 480 )
        #self.keyboard.view.resize( 800, 480 )
        self.controlor.longpressed.connect( self.keyboard.close )
    def create_vkeyboard( self ) :
        self.vkeyboard = Keyboard( "qml/VKeyboard.qml" )
        self.vkeyboard.toggled.connect( self.toggle_keyboard )
        #self.vkeyboard.resize( 480, 800 )
        #self.vkeyboard.view.resize( 480, 800 )
        self.controlor.longpressed.connect( self.vkeyboard.close )
    QtCore.Slot()
    def toggle_keyboard( self ) :
        self.is_show = not self.is_show
        self.remap_layout()
    QtCore.Slot( int )
    def remap_layout( self, flag = 0 ) :
        #print "remap"
        if self.keyboard :
            self.keyboard.hide()
        if self.vkeyboard :
            self.vkeyboard.hide()
        self.controlor.hide()
        desktop = QtGui.QDesktopWidget()
        is_v = False
        if desktop.width() < desktop.height() :
            is_v = True
        if not self.is_show :
            if is_v :
                #self.controlor.move( 720 * 480 / 800 , 335 * 800 / 480)
                self.controlor.move( 15, 335 )
            else :
                #self.controlor.move( 720, 335 )
                self.controlor.move( 15, 335 )
            self.controlor.show()
        else :
            if is_v :
                #self.vkeyboard.resize( 480, 800 )
                #self.vkeyboard.view.resize( 480, 800 )
                #self.vkeyboard.move( 0, 0 )
                if not self.vkeyboard :
                    self.create_vkeyboard()
                self.vkeyboard.show()
            else :
                #self.keyboard.resize( 480, 800 )
                #self.keyboard.view.resize( 800, 480 )
                #self.keyboard.move( 0, 0 )
                if not self.keyboard :
                    self.create_keyboard()
                self.keyboard.show()
開發者ID:foolegg,項目名稱:maemo-virtual-keyboard,代碼行數:68,代碼來源:manager.py


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