src/hbcore/inputfw/hbinputvirtualkeyboard.cpp
changeset 34 ed14f46c0e55
parent 6 c3690ec91ef8
equal deleted inserted replaced
31:7516d6d86cf5 34:ed14f46c0e55
    24 ****************************************************************************/
    24 ****************************************************************************/
    25 
    25 
    26 #include "hbinputvirtualkeyboard.h"
    26 #include "hbinputvirtualkeyboard.h"
    27 
    27 
    28 /*!
    28 /*!
    29 \proto
    29 @stable
       
    30 @hbcore
    30 \class HbVirtualKeyboard
    31 \class HbVirtualKeyboard
    31 \brief Abstract base class for virtual keyboards.
    32 \brief The HbVirtualKeyboard class is an abstract base class for virtual keyboards.
    32 
    33 
    33 This class is an abstract base class for virtual keyaboards. It is
    34 This class is an abstract base class for virtual keyboards. It is not responsible
    34 not reponsible for the visual appearance of the keyboard, but contains methods that HbVkbHost
    35 for the visual appearance of the keyboard, but contains methods that the HbVkbHost
    35 class needs when interacting with the keyboard. The actual Qt widget inheriting from this
    36 class needs when interacting with the keyboard. The concrete widget inheriting
    36 class will fill and layout the keyboard contents.
    37 from this class will fill and define the layout for the keyboard contents.
    37 
    38 
    38 The virtual keyboard host calls aboutToOpen() method when it is about to open the keyboard
    39 The virtual keyboard host calls aboutToOpen() when it is about to open the keyboard
    39 and aboutToClose() when it is about to close it. Similarly, it calls keyboardOpened()
    40 and aboutToClose() when it is about to close it. Similarly, it calls keyboardOpened()
    40 and keyboardClosed() methods when open and close operations have been completed.
    41 and keyboardClosed() when the open and close operations have been completed.
    41 
    42 
    42 Every time the host runs keyboard related animations, it calls keyboardAnimationFrame()
    43 Every time the host runs keyboard related animations, it calls keyboardAnimationFrame()
    43 method after each frame so that that the keyboard widget has possibility to run local animation
    44 after each frame so that that the keyboard widget has the possibility of running
    44 effects inside the widget if needed.
    45 local animation effects inside the widget if needed.
       
    46 
       
    47 See \ref vkbHandling "virtual keyboard handling guide" for more information
    45 
    48 
    46 \sa HbVkbHost
    49 \sa HbVkbHost
       
    50 */
       
    51 
       
    52 
       
    53 /*!
       
    54 \enum HbVirtualKeyboard::HbVkbAnimationType
       
    55 Specifies known virtual keyboard animation types.
       
    56 */
       
    57 
       
    58 /*!
       
    59 \var HbVirtualKeyboard::HbVkbAnimOpen
       
    60 Animation type for virtual keyboard opening.
       
    61 */
       
    62 
       
    63 /*!
       
    64 \var HbVirtualKeyboard::HbVkbAnimClose
       
    65 Animation type for virtual keyboard closing.
    47 */
    66 */
    48 
    67 
    49 /*!
    68 /*!
    50 \fn void HbVirtualKeyboard::aboutToOpen(HbVkbHost *host)
    69 \fn void HbVirtualKeyboard::aboutToOpen(HbVkbHost *host)
    51 
    70 
    52 HbVkbHost calls this method right before keyboard becomes visible.
    71 HbVkbHost calls this function right before the keyboard becomes visible.
    53 Virtual keyboard widget can then do any last minute initializations
    72 The virtual keyboard widget can then do any last minute initializations
    54 if needed. The default implementation is empty.
    73 if needed.
    55 
    74 
    56 \sa HbVkbHost
    75 \sa HbVkbHost
    57 */
    76 */
    58 
    77 
    59 /*!
    78 /*!
    60 \fn void HbVirtualKeyboard::aboutToClose(HbVkbHost *host)
    79 \fn void HbVirtualKeyboard::aboutToClose(HbVkbHost *host)
    61 
    80 
    62 HbVkbHost calls this method right before keyboard becomes visible.
    81 HbVkbHost calls this function right before keyboard is closed.
    63 Virtual keyboard widget can then do any cleaning operations it needs to do.
    82 The virtual keyboard widget can then do any cleaning operations it needs to do.
    64 The default implemntation is empty.
       
    65 
    83 
    66 \sa HbVkbHost
    84 \sa HbVkbHost
    67 */
    85 */
    68 
    86 
    69 /*!
    87 /*!
    70 \fn void HbVirtualKeyboard::keyboardOpened(HbVkbHost *host)
    88 \fn void HbVirtualKeyboard::keyboardOpened(HbVkbHost *host)
    71 
    89 
    72 HbVkbHost calls this method when the keyboard open operation is finished and the keyboard is
    90 HbVkbHost calls this function when the keyboard opening operation is finished
    73 visible on the screen in its final position. The default implementation is empty.
    91 and the keyboard is visible on the screen in its final position.
    74 
    92 
    75 \sa HbVkbHost
    93 \sa HbVkbHost
    76 */
    94 */
    77 
    95 
    78 /*!
    96 /*!
    79 \fn void HbVirtualKeyboard::keyboardClosed(HbVkbHost *host)
    97 \fn void HbVirtualKeyboard::keyboardClosed(HbVkbHost *host)
    80 
    98 
    81 HbVkbHost calls this method when keyboard closing operation is finished and the keyboard is not
    99 HbVkbHost calls this function when the keyboard closing operation is finished
    82 visible on the screen anymore. The deafult implementation is empty.
   100 and the keyboard is no longer visible on the screen.
    83 */
   101 */
    84 
   102 
    85 /*!
   103 /*!
    86 \fn void HbVirtualKeyboard::keyboardMinimized(HbVkbHost *host)
   104 \fn QSizeF HbVirtualKeyboard::preferredKeyboardSize()
       
   105 Returns the size of the preferred keyboard.
       
   106 */
       
   107  
       
   108 /*!
       
   109 \fn void HbVirtualKeyboard::keyboardAnimationFrame(HbVkbAnimationType type, qreal x)
    87 
   110 
    88 HbVkbHost calls this method when keyboard minimizing operation is finished and only the close bar
   111 HbVkbHost calls this function when the keyboard animation frame is drawn.
    89 is visible on the keypad. The deafult implementation is empty.
   112 The keyboard widget may then animate its contents if needed. Parameter \a type
       
   113 specifies the animation type and value \a x is the animation phase (between 0.0 and 1.0).
    90 */
   114 */
    91 
   115 
    92 /*!
   116 /*!
    93 \fn QSizeF HbVirtualKeyboard::minimizedKeyboardSize()
   117 \fn HbKeyboardType HbVirtualKeyboard::keyboardType() const
    94 The vkb host queries the size of minimized keyboard through this method.
   118 
       
   119 Returns the keyboard type. See file \c hbinputdef.h for the possible HbKeyboardType values. 
       
   120 The default implementation returns HbKeyboardNone.
    95 */
   121 */
    96 
   122 
    97 /*!
   123 /*!
    98 \fn void HbVirtualKeyboard::keyboardAnimationFrame(HbVkbAnimationType type, qreal x)
   124 \fn QWidget * HbVirtualKeyboard::asWidget()
    99 
   125 
   100 Vkb host calls this method when keyboard animation frame is drawn. Keyboard widget may then
   126 Returns a QWidget pointer to the virtual keyboard widget.
   101 animate its contents if needed. Parameter type specifies animation type and value
   127 */
   102 x is animation phase (between 0.0 and 1.0). The default implementation is empty.
   128 
       
   129 /*!
       
   130 \fn QGraphicsWidget * HbVirtualKeyboard::asGraphicsWidget()
       
   131 
       
   132 Returns a QGraphicsWidget pointer to the virtual keyboard widget.
   103 */
   133 */
   104 
   134 
   105 // End of file
   135 // End of file