00001 # Copyright (C) 2008 by Albert Cervera i Areny 00002 # albert@nan-tic.com 00003 # 00004 # This program is free software; you can redistribute it and/or modify 00005 # it under the terms of the GNU General Public License as published by 00006 # the Free Software Foundation; either version 2 of the License, or 00007 # (at your option) any later version. 00008 # 00009 # This program is distributed in the hope that it will be useful, 00010 # but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 # GNU General Public License for more details. 00013 # 00014 # You should have received a copy of the GNU General Public License 00015 # along with this program; if not, write to the 00016 # Free Software Foundation, Inc., 00017 # 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00018 00019 from PyQt4.QtCore import * 00020 from PyQt4.QtGui import * 00021 from PyQt4.uic import * 00022 from Koo.Common import Common 00023 from AbstractKeyboardWidget import * 00024 00025 (KeypadWidgetUi, KeypadWidgetBase) = loadUiType( Common.uiPath('keypad.ui') ) 00026 00027 ## @brief The KeyboardWidget class provides a virtual on-screen numeric keyboard. 00028 class KeypadWidget(AbstractKeyboardWidget, KeypadWidgetUi): 00029 ## @brief Creates a KeypadWidget that will send keyboard events to it's parent. It will 00030 # also be positioned in the screen acording to its parent coordinates. 00031 def __init__(self, parent): 00032 AbstractKeyboardWidget.__init__(self, parent) 00033 KeypadWidgetUi.__init__( self ) 00034 self.setupUi( self ) 00035 self.init() 00036