qtmobileextensions/src/keycapture/xqkeycapture.cpp
changeset 14 6fbed849b4f4
parent 5 453da2cfceef
child 15 1f895d8a5b2b
equal deleted inserted replaced
11:06b8e2af4411 14:6fbed849b4f4
    25 #include <qnamespace.h>
    25 #include <qnamespace.h>
    26 
    26 
    27 /*!
    27 /*!
    28  Constructor.
    28  Constructor.
    29 */
    29 */
       
    30 XQKeyCapture::XQKeyCapture() :
       
    31     d(new KeyCapturePrivate())
       
    32 {
       
    33 
       
    34 }
       
    35 
       
    36 /*!
       
    37  Destructor.
       
    38 */
       
    39 XQKeyCapture::~XQKeyCapture()
       
    40 {
       
    41     delete d;
       
    42 }
       
    43 
       
    44 /*!
       
    45  Initializes remote key handler(s) given by parameter.    
       
    46  \param flags  Flag representing supported remote handler. Flags can be ORed for simulteanous initializations.  
       
    47  */
       
    48 bool XQKeyCapture::captureRemoteKeys(CapturingFlags flags)
       
    49 {
       
    50     return d->initRemote(flags);
       
    51 }
       
    52  
       
    53 /*!
       
    54  Cancels remote key handler(s) given by parameter.   
       
    55  \param flags  Flag representing supported remote interfaces. Flags can be ORed for simulteanous cancellations.  
       
    56  */
       
    57 bool XQKeyCapture::cancelCaptureRemoteKeys(CapturingFlags flags)
       
    58 {
       
    59     return d->closeRemote(flags);
       
    60 }
       
    61 
       
    62 /*!
       
    63  Selects a given key for capturing key pressing. Requires a Qt key code.
       
    64  \param aKey A Qt key.
       
    65  \param aModifiersMask
       
    66  \param aModifier 
       
    67  \retval Returns true if aKey was succesfully added to the capturing system, otherwise returns false.
       
    68  */
       
    69 bool XQKeyCapture::captureKey(Qt::Key aKey,
       
    70     Qt::KeyboardModifiers aModifiersMask, Qt::KeyboardModifiers aModifier)
       
    71 {
       
    72     return d->captureKey(aKey, aModifiersMask, aModifier);
       
    73 }
       
    74 
       
    75 /*!
       
    76  Selects a given key for capturing key pressing. Requires a S60 key code (TKeyCode).
       
    77  \param aKey A S60 key code (TKeyCode).
       
    78  \param aModifiersMask
       
    79  \param aModifier 
       
    80  \retval Returns true if aKey was succesfully added to the capturing system, otherwise returns false.
       
    81  */
       
    82 bool XQKeyCapture::captureKey(TUint aKey,
       
    83     Qt::KeyboardModifiers aModifiersMask, Qt::KeyboardModifiers aModifier)
       
    84 {
       
    85     return d->captureKey(aKey, aModifiersMask, aModifier);
       
    86 }
       
    87 
       
    88 /*!
       
    89  Selects a given key for capturing long pressing. Requires a Qt key code.
       
    90  \param aKey A Qt key.
       
    91  \param aModifiersMask
       
    92  \param aModifier 
       
    93  \retval Returns true if aKey was succesfully added to the capturing system, otherwise returns false.
       
    94  */
       
    95 bool XQKeyCapture::captureLongKey(Qt::Key aKey,
       
    96     Qt::KeyboardModifiers aModifiersMask, Qt::KeyboardModifiers aModifier,
       
    97     XQKeyCapture::LongFlags aLongType)
       
    98 {
       
    99     return d->captureLongKey(aKey, aModifiersMask, aModifier, aLongType);
       
   100 }
       
   101 
       
   102 /*!
       
   103  Selects a given key for capturing long pressing. Requires a S60 key code (TKeyCode).
       
   104  \param aKey A S60 key code (TKeyCode).
       
   105  \param aModifiersMap
       
   106  \param aModifier 
       
   107  \retval Returns true if aKey was succesfully added to the capturing system, otherwise returns false.
       
   108  */
       
   109 bool XQKeyCapture::captureLongKey(TUint aKey,
       
   110     Qt::KeyboardModifiers aModifiersMap, Qt::KeyboardModifiers aModifier,
       
   111     XQKeyCapture::LongFlags aLongType)
       
   112 {
       
   113     return d->captureLongKey(aKey, aModifiersMap, aModifier, aLongType);
       
   114 }
       
   115 
       
   116 /*!
       
   117  Selects a given key for capturing pressing up and down. Requires a Qt key code.
       
   118  \param aKey A Qt key.
       
   119  \param aModifiersMask
       
   120  \param aModifier 
       
   121  \retval Returns true if aKey was succesfully added to the capturing system, otherwise returns false.
       
   122  */
       
   123 bool XQKeyCapture::captureKeyUpAndDowns(Qt::Key aKey,
       
   124     Qt::KeyboardModifiers aModifiersMask, Qt::KeyboardModifiers aModifier)
       
   125 {
       
   126     return d->captureKeyUpAndDowns(aKey, aModifiersMask, aModifier);
       
   127 }
       
   128 
       
   129 /*!
       
   130  Selects a given key for capturing pressing up and down. Requires a S60 key scan code (TStdScanCode).
       
   131  \param aKey A S60 key scan code (TStdScanCode).
       
   132  \param aModifiersMask
       
   133  \param aModifier 
       
   134  \retval Returns true if aKey was succesfully added to the capturing system, otherwise returns false.
       
   135  */
       
   136 bool XQKeyCapture::captureKeyUpAndDowns(TUint aKey,
       
   137     Qt::KeyboardModifiers aModifiersMask, Qt::KeyboardModifiers aModifier)
       
   138 {
       
   139     return d->captureKeyUpAndDowns(aKey, aModifiersMask, aModifier);
       
   140 }
       
   141 
       
   142 /*!
       
   143  Deselects a given key from key capturing. Requires a Qt key code.
       
   144  \param aKey A Qt key.
       
   145  \param aModifiersMask
       
   146  \param aModifier 
       
   147  \retval Returns true if aKey was succesfully removed from the capturing system, otherwise returns false.
       
   148  */
       
   149 bool XQKeyCapture::cancelCaptureKey(Qt::Key aKey,
       
   150     Qt::KeyboardModifiers aModifiersMask, Qt::KeyboardModifiers aModifier)
       
   151 {
       
   152     return d->cancelCaptureKey(aKey, aModifiersMask, aModifier);
       
   153 }
       
   154 
       
   155 /*!
       
   156  Deselects a given key from key capturing. Requires a S60 key code (TKeyCode).
       
   157  \param aKey A S60 key code (TKeyCode).
       
   158  \param aModifiersMask
       
   159  \param aModifier 
       
   160  \retval Returns true if aKey was succesfully removed from the capturing system, otherwise returns false.
       
   161  */
       
   162 bool XQKeyCapture::cancelCaptureKey(TUint aKey,
       
   163     Qt::KeyboardModifiers aModifiersMask, Qt::KeyboardModifiers aModifier)
       
   164 {
       
   165     return d->cancelCaptureKey(aKey, aModifiersMask, aModifier);
       
   166 }
       
   167 
       
   168 /*!
       
   169  Deselects a given key from capturing long pressing. Requires a Qt key code.
       
   170  \param aKey A Qt key.
       
   171  \param aModifiersMask
       
   172  \param aModifier 
       
   173  \retval Returns true if aKey was succesfully removed from the capturing system, otherwise returns false.
       
   174  */
       
   175 bool XQKeyCapture::cancelCaptureLongKey(Qt::Key aKey,
       
   176     Qt::KeyboardModifiers aModifiersMask, Qt::KeyboardModifiers aModifier,
       
   177     XQKeyCapture::LongFlags aLongType)
       
   178 {
       
   179     return d->cancelCaptureLongKey(aKey, aModifiersMask, aModifier,
       
   180         aLongType);
       
   181 }
       
   182 
       
   183 /*!
       
   184  Deselects a given key from capturing long pressing. Requires a S60 key code (TKeyCode).
       
   185  \param aKey A S60 key code (TKeyCode).
       
   186  \param aModifiersMask
       
   187  \param aModifier 
       
   188  \retval Returns true if aKey was succesfully removed from the capturing system, otherwise returns false.
       
   189  */
       
   190 bool XQKeyCapture::cancelCaptureLongKey(TUint aKey,
       
   191     Qt::KeyboardModifiers aModifiersMask, Qt::KeyboardModifiers aModifier,
       
   192     XQKeyCapture::LongFlags aLongType)
       
   193 {
       
   194     return d->cancelCaptureLongKey(aKey, aModifiersMask, aModifier,
       
   195         aLongType);
       
   196 }
       
   197 
       
   198 /*!
       
   199  Deselects a given key from capturing pressing up and down. Requires a Qt key code.
       
   200  \param aKey A Qt key.
       
   201  \param aModifiersMask
       
   202  \param aModifier 
       
   203  \retval Returns true if aKey was succesfully removed from the capturing system, otherwise returns false.
       
   204  */
       
   205 bool XQKeyCapture::cancelCaptureKeyUpAndDowns(Qt::Key aKey,
       
   206     Qt::KeyboardModifiers aModifiersMask, Qt::KeyboardModifiers aModifier)
       
   207 {
       
   208     return d->cancelCaptureKeyUpAndDowns(aKey, aModifiersMask, aModifier);
       
   209 }
       
   210 
       
   211 /*!
       
   212  Deselects a given key from capturing pressing up and down. Requires a S60 key scan code (TStdScanCode).
       
   213  \param aKey A S60 key scan code (TStdScanCode).
       
   214  \param aModifiersMask
       
   215  \param aModifier 
       
   216  \retval Returns true if aKey was succesfully removed from the capturing system, otherwise returns false.
       
   217  */
       
   218 bool XQKeyCapture::cancelCaptureKeyUpAndDowns(TUint aKey,
       
   219     Qt::KeyboardModifiers aModifiersMask, Qt::KeyboardModifiers aModifier)
       
   220 {
       
   221     return d->cancelCaptureKeyUpAndDowns(aKey, aModifiersMask, aModifier);
       
   222 }
       
   223 
       
   224 /*!
       
   225  Returns latest error string.
       
   226  \retval Latest error string.
       
   227  */
       
   228 QString XQKeyCapture::errorString() const
       
   229 {
       
   230     return d->errorString();
       
   231 }
       
   232 
       
   233 /*!
       
   234  Returns latest error id.
       
   235  \retval Latest error id.
       
   236  */
       
   237 int XQKeyCapture::errorId() const
       
   238 {
       
   239     return d->errorId();
       
   240 }
       
   241 
       
   242 /*!
       
   243  Selects a given keys for capturing key pressing. Requires a Qt key code.
       
   244  \param list A Qt keys list.
       
   245  \param aModifiersMask
       
   246  \param aModifier 
       
   247  \retval Returns true if aKey was succesfully added to the capturing system, otherwise returns false.
       
   248  */
       
   249 bool XQKeyCapture::captureKey(XQKeyCaptureKeyList list, 
       
   250         Qt::KeyboardModifiers aModifiersMask,
       
   251         Qt::KeyboardModifiers aModifier)
       
   252 {
       
   253     Qt::Key key;
       
   254     bool result = true;
       
   255     foreach (key, list) {
       
   256         bool result = result & d->captureKey(key, aModifiersMask, aModifier);
       
   257     }
       
   258     return result;
       
   259 }
       
   260 
       
   261 /*!
       
   262  Selects a given keys for capturing key pressing. Requires a S60 key code (TKeyCode).
       
   263  \param list A S60 list of keys (TKeyCode codes).
       
   264  \param aModifiersMask
       
   265  \param aModifier 
       
   266  \retval Returns true if aKey was succesfully added to the capturing system, otherwise returns false.
       
   267  */
       
   268 bool XQKeyCapture::captureKey(XQKeyCaptureNativeKeyList list, 
       
   269         Qt::KeyboardModifiers aModifiersMask,
       
   270         Qt::KeyboardModifiers aModifier)
       
   271 {
       
   272     TUint key;
       
   273     bool result = true;
       
   274     foreach (key, list) {
       
   275         bool result = result & d->captureKey(key, aModifiersMask, aModifier);
       
   276     }
       
   277     return result;
       
   278 }
       
   279 
       
   280 /*!
       
   281  Selects a given keys for capturing long pressing. Requires a Qt key code.
       
   282  \param aKey A Qt  list of keys.
       
   283  \param aModifiersMask
       
   284  \param aModifier 
       
   285  \retval Returns true if aKey was succesfully added to the capturing system, otherwise returns false.
       
   286  */
       
   287 bool XQKeyCapture::captureLongKey(XQKeyCaptureKeyList list, 
       
   288         Qt::KeyboardModifiers aModifiersMask,
       
   289         Qt::KeyboardModifiers aModifier,
       
   290         XQKeyCapture::LongFlags aLongType)
       
   291 {
       
   292     Qt::Key key;
       
   293     bool result = true;
       
   294     foreach (key, list) {
       
   295         bool result = result & d->captureLongKey(key, aModifiersMask, aModifier, aLongType);
       
   296     }
       
   297     return result;
       
   298 }
       
   299 
       
   300 /*!
       
   301  Selects a given keys for capturing long pressing. Requires a S60 key code (TKeyCode).
       
   302  \param list A S60 list of keys (TKeyCode codes).
       
   303  \param aModifiersMap
       
   304  \param aModifier 
       
   305  \retval Returns true if aKey was succesfully added to the capturing system, otherwise returns false.
       
   306  */
       
   307  bool XQKeyCapture::captureLongKey(XQKeyCaptureNativeKeyList list, 
       
   308         Qt::KeyboardModifiers aModifiersMask,
       
   309         Qt::KeyboardModifiers aModifier,
       
   310         XQKeyCapture::LongFlags aLongType)
       
   311 {
       
   312     TUint key;
       
   313     bool result = true;
       
   314     foreach (key, list) {
       
   315         bool result = result & d->captureLongKey(key, aModifiersMask, aModifier, aLongType);
       
   316     }
       
   317     return result;
       
   318 }
       
   319 
       
   320 /*!
       
   321  Selects a given keys for capturing pressing up and down. Requires a Qt key code.
       
   322  \param list A Qt list of keys.
       
   323  \param aModifiersMask
       
   324  \param aModifier 
       
   325  \retval Returns true if aKey was succesfully added to the capturing system, otherwise returns false.
       
   326  */
       
   327 bool XQKeyCapture::captureKeyUpAndDowns(XQKeyCaptureKeyList list, 
       
   328         Qt::KeyboardModifiers aModifiersMask,
       
   329         Qt::KeyboardModifiers aModifier)
       
   330 {
       
   331     Qt::Key key;
       
   332     bool result = true;
       
   333     foreach (key, list) {
       
   334         bool result = result & d->captureKeyUpAndDowns(key, aModifiersMask, aModifier);
       
   335     }
       
   336     return result;
       
   337 }
       
   338 
       
   339 /*!
       
   340  Selects a given keys for capturing pressing up and down. Requires a S60 key scan code (TStdScanCode).
       
   341  \param list A list of S60 key scan codes (TStdScanCode).
       
   342  \param aModifiersMask
       
   343  \param aModifier 
       
   344  \retval Returns true if aKey was succesfully added to the capturing system, otherwise returns false.
       
   345  */
       
   346 bool XQKeyCapture::captureKeyUpAndDowns(XQKeyCaptureNativeKeyList list, 
       
   347         Qt::KeyboardModifiers aModifiersMask,
       
   348         Qt::KeyboardModifiers aModifier)
       
   349 {
       
   350     TUint key;
       
   351     bool result = true;
       
   352     foreach (key, list) {
       
   353         bool result = result & d->captureKeyUpAndDowns(key, aModifiersMask, aModifier);
       
   354     }
       
   355     return result;
       
   356 }
       
   357 
       
   358 /*!
       
   359  Deselects a given list of keys from key capturing. Requires a Qt key code.
       
   360  \param list  A Qt list of keys.
       
   361  \param aModifiersMask
       
   362  \param aModifier 
       
   363  \retval Returns true if aKey was succesfully removed from the capturing system, otherwise returns false.
       
   364  */
       
   365 bool XQKeyCapture::cancelCaptureKey(XQKeyCaptureKeyList list, 
       
   366         Qt::KeyboardModifiers aModifiersMask,
       
   367         Qt::KeyboardModifiers aModifier)
       
   368 {
       
   369     Qt::Key key;
       
   370     bool result = true;
       
   371     foreach (key, list) {
       
   372         bool result = result & d->cancelCaptureKey(key, aModifiersMask, aModifier);
       
   373     }
       
   374     return result;
       
   375 }
       
   376 
       
   377 /*!
       
   378  Deselects a given list of keys from key capturing. Requires a S60 key code (TKeyCode).
       
   379  \param list  A S60 list of key codes (TKeyCode).
       
   380  \param aModifiersMask
       
   381  \param aModifier 
       
   382  \retval Returns true if aKey was succesfully removed from the capturing system, otherwise returns false.
       
   383  */
       
   384 bool XQKeyCapture::cancelCaptureKey(XQKeyCaptureNativeKeyList list, 
       
   385         Qt::KeyboardModifiers aModifiersMask,
       
   386         Qt::KeyboardModifiers aModifier)
       
   387 {
       
   388     TUint key;
       
   389     bool result = true;
       
   390     foreach (key, list) {
       
   391         bool result = result & d->cancelCaptureKey(key, aModifiersMask, aModifier);
       
   392     }
       
   393     return result;
       
   394 }
       
   395 
       
   396 /*!
       
   397  Deselects a given list of keys from capturing long pressing. Requires a Qt key code.
       
   398  \param list A list of Qt keys.
       
   399  \param aModifiersMask
       
   400  \param aModifier 
       
   401  \retval Returns true if aKey was succesfully removed from the capturing system, otherwise returns false.
       
   402  */
       
   403 bool XQKeyCapture::cancelCaptureLongKey(XQKeyCaptureKeyList list, 
       
   404         Qt::KeyboardModifiers aModifiersMask,
       
   405         Qt::KeyboardModifiers aModifier,
       
   406         XQKeyCapture::LongFlags aLongType)
       
   407 {
       
   408     Qt::Key key;
       
   409     bool result = true;
       
   410     foreach (key, list) {
       
   411         bool result = result & d->cancelCaptureLongKey(key, aModifiersMask, aModifier, aLongType);
       
   412     }
       
   413     return result;
       
   414 }
       
   415 
       
   416 /*!
       
   417  Deselects a given key from capturing long pressing. Requires a S60 key code (TKeyCode).
       
   418  \paramlist A list of S60 key codes (TKeyCode).
       
   419  \param aModifiersMask
       
   420  \param aModifier 
       
   421  \retval Returns true if aKey was succesfully removed from the capturing system, otherwise returns false.
       
   422  */
       
   423 bool XQKeyCapture::cancelCaptureLongKey(XQKeyCaptureNativeKeyList list, 
       
   424         Qt::KeyboardModifiers aModifiersMask,
       
   425         Qt::KeyboardModifiers aModifier,
       
   426         XQKeyCapture::LongFlags aLongType)
       
   427 {
       
   428     TUint key;
       
   429     bool result = true;
       
   430     foreach (key, list) {
       
   431         bool result = result & d->cancelCaptureLongKey(key, aModifiersMask, aModifier, aLongType);
       
   432     }
       
   433     return result;
       
   434 }
       
   435 
       
   436 /*!
       
   437  Deselects a list of given keys from capturing pressing up and down. Requires a Qt key codes.
       
   438  \param list A list of Qt keys.
       
   439  \param aModifiersMask
       
   440  \param aModifier 
       
   441  \retval Returns true if aKey was succesfully removed from the capturing system, otherwise returns false.
       
   442  */
       
   443 bool XQKeyCapture::cancelCaptureKeyUpAndDowns(XQKeyCaptureKeyList list, 
       
   444         Qt::KeyboardModifiers aModifiersMask,
       
   445         Qt::KeyboardModifiers aModifier)
       
   446 {
       
   447     Qt::Key key;
       
   448     bool result = true;
       
   449     foreach (key, list) {
       
   450         bool result = result & d->cancelCaptureKeyUpAndDowns(key, aModifiersMask, aModifier);
       
   451     }
       
   452     return result;
       
   453 }
       
   454 
       
   455 /*!
       
   456  Deselects a given list of keys from capturing pressing up and down. Requires a S60 key scan code (TStdScanCode).
       
   457  \param aKey A S60 key scan code (TStdScanCode).
       
   458  \param aModifiersMask
       
   459  \param aModifier 
       
   460  \retval Returns true if aKey was succesfully removed from the capturing system, otherwise returns false.
       
   461  */
       
   462  bool XQKeyCapture::cancelCaptureKeyUpAndDowns(XQKeyCaptureNativeKeyList list, 
       
   463         Qt::KeyboardModifiers aModifiersMask,
       
   464         Qt::KeyboardModifiers aModifier)
       
   465 {
       
   466     TUint key;
       
   467     bool result = true;
       
   468     foreach (key, list) {
       
   469         bool result = result & d->cancelCaptureKeyUpAndDowns(key, aModifiersMask, aModifier);
       
   470     }
       
   471     return result;
       
   472 }
       
   473 
       
   474 /*!
       
   475  Constructor.
       
   476 */
    30 XqKeyCapture::XqKeyCapture() :
   477 XqKeyCapture::XqKeyCapture() :
    31     d(new KeyCapturePrivate())
   478     d(new KeyCapturePrivate())
    32 {
   479 {
    33 
   480 
    34 }
   481 }
    76  */
   523  */
    77 bool XqKeyCapture::captureLongKey(Qt::Key aKey,
   524 bool XqKeyCapture::captureLongKey(Qt::Key aKey,
    78     Qt::KeyboardModifiers aModifiersMask, Qt::KeyboardModifiers aModifier,
   525     Qt::KeyboardModifiers aModifiersMask, Qt::KeyboardModifiers aModifier,
    79     XqKeyCapture::LongFlags aLongType)
   526     XqKeyCapture::LongFlags aLongType)
    80 {
   527 {
    81     return d->captureLongKey(aKey, aModifiersMask, aModifier, aLongType);
   528     return d->captureLongKey(aKey, aModifiersMask, aModifier, static_cast<XQKeyCapture::LongFlags>(aLongType));
    82 }
   529 }
    83 
   530 
    84 /*!
   531 /*!
    85  Selects a given key for capturing long pressing. Requires a S60 key code (TKeyCode).
   532  Selects a given key for capturing long pressing. Requires a S60 key code (TKeyCode).
    86  \param aKey A S60 key code (TKeyCode).
   533  \param aKey A S60 key code (TKeyCode).
    90  */
   537  */
    91 bool XqKeyCapture::captureLongKey(TUint aKey,
   538 bool XqKeyCapture::captureLongKey(TUint aKey,
    92     Qt::KeyboardModifiers aModifiersMap, Qt::KeyboardModifiers aModifier,
   539     Qt::KeyboardModifiers aModifiersMap, Qt::KeyboardModifiers aModifier,
    93     XqKeyCapture::LongFlags aLongType)
   540     XqKeyCapture::LongFlags aLongType)
    94 {
   541 {
    95     return d->captureLongKey(aKey, aModifiersMap, aModifier, aLongType);
   542     return d->captureLongKey(aKey, aModifiersMap, aModifier, static_cast<XQKeyCapture::LongFlags>(aLongType));
    96 }
   543 }
    97 
   544 
    98 /*!
   545 /*!
    99  Selects a given key for capturing pressing up and down. Requires a Qt key code.
   546  Selects a given key for capturing pressing up and down. Requires a Qt key code.
   100  \param aKey A Qt key.
   547  \param aKey A Qt key.
   157 bool XqKeyCapture::cancelCaptureLongKey(Qt::Key aKey,
   604 bool XqKeyCapture::cancelCaptureLongKey(Qt::Key aKey,
   158     Qt::KeyboardModifiers aModifiersMask, Qt::KeyboardModifiers aModifier,
   605     Qt::KeyboardModifiers aModifiersMask, Qt::KeyboardModifiers aModifier,
   159     XqKeyCapture::LongFlags aLongType)
   606     XqKeyCapture::LongFlags aLongType)
   160 {
   607 {
   161     return d->cancelCaptureLongKey(aKey, aModifiersMask, aModifier,
   608     return d->cancelCaptureLongKey(aKey, aModifiersMask, aModifier,
   162         aLongType);
   609         static_cast<XQKeyCapture::LongFlags>(aLongType));
   163 }
   610 }
   164 
   611 
   165 /*!
   612 /*!
   166  Deselects a given key from capturing long pressing. Requires a S60 key code (TKeyCode).
   613  Deselects a given key from capturing long pressing. Requires a S60 key code (TKeyCode).
   167  \param aKey A S60 key code (TKeyCode).
   614  \param aKey A S60 key code (TKeyCode).
   172 bool XqKeyCapture::cancelCaptureLongKey(TUint aKey,
   619 bool XqKeyCapture::cancelCaptureLongKey(TUint aKey,
   173     Qt::KeyboardModifiers aModifiersMask, Qt::KeyboardModifiers aModifier,
   620     Qt::KeyboardModifiers aModifiersMask, Qt::KeyboardModifiers aModifier,
   174     XqKeyCapture::LongFlags aLongType)
   621     XqKeyCapture::LongFlags aLongType)
   175 {
   622 {
   176     return d->cancelCaptureLongKey(aKey, aModifiersMask, aModifier,
   623     return d->cancelCaptureLongKey(aKey, aModifiersMask, aModifier,
   177         aLongType);
   624         static_cast<XQKeyCapture::LongFlags>(aLongType));
   178 }
   625 }
   179 
   626 
   180 /*!
   627 /*!
   181  Deselects a given key from capturing pressing up and down. Requires a Qt key code.
   628  Deselects a given key from capturing pressing up and down. Requires a Qt key code.
   182  \param aKey A Qt key.
   629  \param aKey A Qt key.
   272         XqKeyCapture::LongFlags aLongType)
   719         XqKeyCapture::LongFlags aLongType)
   273 {
   720 {
   274     Qt::Key key;
   721     Qt::Key key;
   275     bool result = true;
   722     bool result = true;
   276     foreach (key, list) {
   723     foreach (key, list) {
   277         bool result = result & d->captureLongKey(key, aModifiersMask, aModifier, aLongType);
   724         bool result = result & d->captureLongKey(key, aModifiersMask, aModifier, static_cast<XQKeyCapture::LongFlags>(aLongType));
   278     }
   725     }
   279     return result;
   726     return result;
   280 }
   727 }
   281 
   728 
   282 /*!
   729 /*!
   292         XqKeyCapture::LongFlags aLongType)
   739         XqKeyCapture::LongFlags aLongType)
   293 {
   740 {
   294     TUint key;
   741     TUint key;
   295     bool result = true;
   742     bool result = true;
   296     foreach (key, list) {
   743     foreach (key, list) {
   297         bool result = result & d->captureLongKey(key, aModifiersMask, aModifier, aLongType);
   744         bool result = result & d->captureLongKey(key, aModifiersMask, aModifier, static_cast<XQKeyCapture::LongFlags>(aLongType));
   298     }
   745     }
   299     return result;
   746     return result;
   300 }
   747 }
   301 
   748 
   302 /*!
   749 /*!
   388         XqKeyCapture::LongFlags aLongType)
   835         XqKeyCapture::LongFlags aLongType)
   389 {
   836 {
   390     Qt::Key key;
   837     Qt::Key key;
   391     bool result = true;
   838     bool result = true;
   392     foreach (key, list) {
   839     foreach (key, list) {
   393         bool result = result & d->cancelCaptureLongKey(key, aModifiersMask, aModifier, aLongType);
   840         bool result = result & d->cancelCaptureLongKey(key, aModifiersMask, aModifier, static_cast<XQKeyCapture::LongFlags>(aLongType));
   394     }
   841     }
   395     return result;
   842     return result;
   396 }
   843 }
   397 
   844 
   398 /*!
   845 /*!
   408         XqKeyCapture::LongFlags aLongType)
   855         XqKeyCapture::LongFlags aLongType)
   409 {
   856 {
   410     TUint key;
   857     TUint key;
   411     bool result = true;
   858     bool result = true;
   412     foreach (key, list) {
   859     foreach (key, list) {
   413         bool result = result & d->cancelCaptureLongKey(key, aModifiersMask, aModifier, aLongType);
   860         bool result = result & d->cancelCaptureLongKey(key, aModifiersMask, aModifier, static_cast<XQKeyCapture::LongFlags>(aLongType));
   414     }
   861     }
   415     return result;
   862     return result;
   416 }
   863 }
   417 
   864 
   418 /*!
   865 /*!