src/hbinput/inputwidgets/hbinputsctportrait.cpp
changeset 2 06ff229162e9
parent 1 f7ac710697a9
child 3 11d3954df52a
child 4 ae1717029441
equal deleted inserted replaced
1:f7ac710697a9 2:06ff229162e9
     1 /****************************************************************************
       
     2 **
       
     3 ** Copyright (C) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
       
     4 ** All rights reserved.
       
     5 ** Contact: Nokia Corporation (developer.feedback@nokia.com)
       
     6 **
       
     7 ** This file is part of the HbInput module of the UI Extensions for Mobile.
       
     8 **
       
     9 ** GNU Lesser General Public License Usage
       
    10 ** This file may be used under the terms of the GNU Lesser General Public
       
    11 ** License version 2.1 as published by the Free Software Foundation and
       
    12 ** appearing in the file LICENSE.LGPL included in the packaging of this file.
       
    13 ** Please review the following information to ensure the GNU Lesser General
       
    14 ** Public License version 2.1 requirements will be met:
       
    15 ** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
       
    16 **
       
    17 ** In addition, as a special exception, Nokia gives you certain additional
       
    18 ** rights.  These rights are described in the Nokia Qt LGPL Exception
       
    19 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
       
    20 **
       
    21 ** If you have questions regarding the use of this file, please contact
       
    22 ** Nokia at developer.feedback@nokia.com.
       
    23 **
       
    24 ****************************************************************************/
       
    25 
       
    26 #include <hbapplication.h>
       
    27 #include <QGraphicsSceneMouseEvent>
       
    28 #include <QGraphicsLinearLayout>
       
    29 #include <QGraphicsGridLayout>
       
    30 #include <QVector>
       
    31 #include <QSignalMapper>
       
    32 #include <QKeyEvent>
       
    33 #include <QPointer>
       
    34 #include <math.h>
       
    35 
       
    36 #include <hbinstance.h>
       
    37 #include <hbinputmethod.h>
       
    38 #include <hbinputkeymap.h>
       
    39 #include <hbinputvkbhost.h>
       
    40 #include <hbinputsettingproxy.h>
       
    41 #include <hbabstractedit.h>
       
    42 #include "hbinputsctportrait.h"
       
    43 #include "hbinputtouchkeypadbutton.h"
       
    44 #include "hbinputvkbwidget.h"
       
    45 
       
    46 #include "hbinputsctportrait_p.h"
       
    47 #include "hbinputvkbwidget_p.h"
       
    48 
       
    49 /*!
       
    50     @proto
       
    51     @hbinput
       
    52     \class HbInputSctPortrait
       
    53     \deprecated class HbInputSctPortrait
       
    54     \brief A widget for displaying special character table in portrait mode.
       
    55     
       
    56     This widget displays special character table. Characters are organized in grid
       
    57     format. The widget inherits from touch keypad base class. When a character
       
    58     is selected it will emit signal sctCharacterSelected.
       
    59     
       
    60     \sa HbInputVkbWidget
       
    61     \sa HbInputTopSctLine
       
    62 */
       
    63 
       
    64 /// @cond
       
    65 
       
    66 const int HbSctGridColumns = 5;
       
    67 const int HbSctGridRows = 5;
       
    68 const int HbNumSctButtons = HbSctGridColumns*HbSctGridRows;
       
    69 const qreal HbSctButtonPreferredHeight = 56.0;
       
    70 const QSizeF HbSctInitialDimensions(90.0, HbSctButtonPreferredHeight);
       
    71 
       
    72 const int HbDelButtonId = HbSctGridColumns-1;
       
    73 const int HbAbcButtonId = 2*HbSctGridColumns-1;
       
    74 const int HbSpecialCharacterButtonId = 3*HbSctGridColumns-1;
       
    75 const int HbSmileyButtonId = 4*HbSctGridColumns-1;
       
    76 
       
    77 const QString HbDelButtonObjName = "SCT delete";
       
    78 const QString HbAbcButtonObjName = "SCT abc";
       
    79 const QString HbSpecialCharacterButtonObjName = "SCT special character";
       
    80 const QString HbSmileyButtonObjName = "SCT smiley";
       
    81 const QString HbCustomButtonObjName = "SCT custom button ";
       
    82 
       
    83 const QString HbSctPortraitButtonTextLayout = "_hb_sctp_button_text_layout";
       
    84 const QString HbSctPortraitButtonIconLayout = "_hb_sctp_button_icon_layout";
       
    85 
       
    86 HbInputSctPortraitPrivate::HbInputSctPortraitPrivate()
       
    87  : mActiveView(HbInputSctPortrait::HbSctViewSpecialCharacter),
       
    88     mClickMapper(0),
       
    89     mStartIndex(0),
       
    90     mCurrentPage(0),
       
    91     mSize(QSizeF())
       
    92 {
       
    93     mFlickAnimation = true;
       
    94 }
       
    95 
       
    96 /*
       
    97 This function defines the layout porperties for sct.
       
    98 */
       
    99 void HbInputSctPortraitPrivate::createSctButtons()
       
   100 {
       
   101     Q_Q(HbInputSctPortrait);
       
   102 
       
   103     q->setupToolCluster();
       
   104 
       
   105     if (mSctButtons.size() == 0) {
       
   106         for (int i = 0; i < HbNumSctButtons-1; ++i) {
       
   107             HbTouchKeypadButton *button = new HbTouchKeypadButton(q, QString(""), q);
       
   108             q->connect(button, SIGNAL(pressed()),mPressMapper, SLOT(map()));
       
   109             mPressMapper->setMapping(button, i);
       
   110             q->connect(button, SIGNAL(released()),mReleaseMapper, SLOT(map()));
       
   111             mReleaseMapper->setMapping(button, i);
       
   112             q->connect(button, SIGNAL(clicked()), mClickMapper, SLOT(map()));
       
   113             mClickMapper->setMapping(button, i);
       
   114             mSctButtons.append(button);
       
   115             button->setProperty(HbStyleRulesCacheId::hbStyleRulesForNodeCache, HbSctPortraitButtonTextLayout);
       
   116         }
       
   117 
       
   118         mSctButtons.append(mApplicationButton);
       
   119 
       
   120         for (int i = 0; i < HbNumSctButtons; ++i) {
       
   121             mButtonLayout->addItem(mSctButtons.at(i), i/HbSctGridColumns, i%HbSctGridColumns);
       
   122         }
       
   123     }
       
   124 }
       
   125 
       
   126 /*
       
   127 This function defines the layout porperties for sct.
       
   128 */
       
   129 void HbInputSctPortraitPrivate::setLayoutDimensions(QSizeF dimensions)
       
   130 {
       
   131     // only update the dimensions if they are not previously set
       
   132     if (mSize == dimensions) {
       
   133         return;
       
   134     }
       
   135     mSize = dimensions;
       
   136 
       
   137     mButtonLayout->setContentsMargins(0.0, 0.0, 0.0, 0.0);
       
   138 
       
   139     for (int i = 0; i < HbSctGridColumns; i++) {
       
   140         mButtonLayout->setColumnFixedWidth(i, dimensions.width());
       
   141     }
       
   142     for (int i = 0; i < HbSctGridRows; i++) {
       
   143         mButtonLayout->setRowFixedHeight(i, dimensions.height());
       
   144     }
       
   145 
       
   146     mButtonLayout->setHorizontalSpacing(0.0);
       
   147     mButtonLayout->setVerticalSpacing(0.0);
       
   148     foreach (HbTouchKeypadButton* button, mSctButtons) {
       
   149         if (button) {
       
   150             button->setInitialSize(dimensions);
       
   151         }
       
   152     }
       
   153 }
       
   154 
       
   155 
       
   156 void HbInputSctPortraitPrivate::initialize()
       
   157 {
       
   158     mSctButtons.at(HbDelButtonId)->setText("");
       
   159     mSctButtons.at(HbDelButtonId)->setIcon(HbIcon("qtg_mono_backspace2"));
       
   160     mSctButtons.at(HbDelButtonId)->setObjectName(HbDelButtonObjName);
       
   161     mSctButtons.at(HbDelButtonId)->setAutoRepeatDelay(HbRepeatTimeout);
       
   162     mSctButtons.at(HbDelButtonId)->setAutoRepeatInterval(HbRepeatTimeoutShort);
       
   163     mSctButtons.at(HbDelButtonId)->setAutoRepeat(true);
       
   164     mSctButtons.at(HbDelButtonId)->setProperty(HbStyleRulesCacheId::hbStyleRulesForNodeCache, HbSctPortraitButtonIconLayout);
       
   165 
       
   166     mSctButtons.at(HbAbcButtonId)->setIcon(HbIcon("qtg_mono_alpha_mode"));
       
   167     mSctButtons.at(HbAbcButtonId)->setObjectName(HbAbcButtonObjName); 
       
   168     mSctButtons.at(HbAbcButtonId)->setObjectName(HbAbcButtonObjName); 
       
   169     mSctButtons.at(HbAbcButtonId)->setProperty(HbStyleRulesCacheId::hbStyleRulesForNodeCache, HbSctPortraitButtonIconLayout);
       
   170 
       
   171     mSctButtons.at(HbSpecialCharacterButtonId)->setIcon(HbIcon("qtg_mono_special_characters_itut"));
       
   172     mSctButtons.at(HbSpecialCharacterButtonId)->setObjectName(HbSpecialCharacterButtonObjName); 
       
   173     mSctButtons.at(HbSpecialCharacterButtonId)->setProperty(HbStyleRulesCacheId::hbStyleRulesForNodeCache, HbSctPortraitButtonIconLayout);
       
   174 
       
   175     mSctButtons.at(HbSmileyButtonId)->setIcon(HbIcon("qtg_mono_smiley"));
       
   176     mSctButtons.at(HbSmileyButtonId)->setObjectName(HbSmileyButtonObjName); 
       
   177     mSctButtons.at(HbSmileyButtonId)->setProperty(HbStyleRulesCacheId::hbStyleRulesForNodeCache, HbSctPortraitButtonIconLayout);
       
   178 
       
   179     if (mApplicationButton) {
       
   180         mApplicationButton->setObjectName(HbCustomButtonObjName + QString::number(1));
       
   181     }
       
   182 
       
   183     for (int i = HbSctGridColumns-1; i < HbNumSctButtons-1; i+=HbSctGridColumns) {
       
   184         mSctButtons.at(i)->setButtonType(HbTouchKeypadButton::HbTouchButtonFunction);
       
   185         mSctButtons.at(i)->setBackgroundAttributes(HbTouchKeypadButton::HbTouchButtonReleased);
       
   186     }
       
   187 }
       
   188 
       
   189 /*
       
   190 apply editor constraints on buttons
       
   191 */
       
   192 void HbInputSctPortraitPrivate::applyEditorConstraints()
       
   193 {
       
   194     HbInputFocusObject *focusedObject = 0;
       
   195     if (mOwner) {
       
   196         focusedObject = mOwner->focusObject();
       
   197     }
       
   198 
       
   199     if(!focusedObject || isKeyboardDimmed()) {
       
   200     // dont need to apply constraints when keypad is dimmed.
       
   201     // applyEditorConstraints will be called from setKeyboardDimmed(false)
       
   202         return;
       
   203     }
       
   204 
       
   205     for (int i=0; i < mSctButtons.size()-1; ++i) {
       
   206         if (i%HbSctGridColumns != HbSctGridColumns-1) {
       
   207             QString buttonText = mSctButtons.at(i)->text();
       
   208             if (buttonText.isEmpty() || !focusedObject->characterAllowedInEditor(buttonText[0])) {
       
   209                 // if the data mapped to button is empty or the data mapped is not allowed to the editor 
       
   210                 mSctButtons.at(i)->setFade(true);
       
   211             } else {
       
   212                 mSctButtons.at(i)->setFade(false);
       
   213             }
       
   214         }
       
   215     }
       
   216 
       
   217     mSctButtons.at(HbSmileyButtonId)->setFade(focusedObject->editorInterface().isNumericEditor()
       
   218         || !focusedObject->editorInterface().editorClass() == HbInputEditorClassUnknown
       
   219         || !isSmileysEnabled());
       
   220 }
       
   221 
       
   222 void HbInputSctPortraitPrivate::setSctButtons(const QString &aCharSet)
       
   223 {
       
   224     Q_Q(HbInputSctPortrait);
       
   225     q->setupToolCluster();
       
   226 
       
   227     int i = 0;
       
   228     int j = 0;
       
   229     for (; i < mSctButtons.size()-1 && (j+mStartIndex) < aCharSet.size(); ++i) {
       
   230         if (i%HbSctGridColumns != HbSctGridColumns-1) {
       
   231             const QChar &character = aCharSet[j+mStartIndex];
       
   232             mSctButtons.at(i)->setText(character);
       
   233             mSctButtons.at(i)->setObjectName("Sct portrait " + QString(character));
       
   234             j++;
       
   235         }
       
   236     }
       
   237 
       
   238     for (; i < mSctButtons.size()-1; ++i) {
       
   239         if (i%HbSctGridColumns != HbSctGridColumns-1) {
       
   240             mSctButtons.at(i)->setText("");
       
   241         }
       
   242     }
       
   243 
       
   244     mCurrentPage = mStartIndex/(HbNumSctButtons-HbSctGridRows);
       
   245     mStartIndex += j;
       
   246     if (mStartIndex == aCharSet.size()) {
       
   247         // We have reached end of special character list, reset the mStartIndex to 0
       
   248         // so that we show first set of special characters next time
       
   249         mStartIndex = 0;
       
   250     }
       
   251     applyEditorConstraints();
       
   252 }
       
   253 
       
   254 
       
   255 void HbInputSctPortraitPrivate::setActiveView(HbInputVkbWidget::HbSctView view)
       
   256 {
       
   257     Q_Q(HbInputSctPortrait);
       
   258     mActiveView = view;
       
   259 
       
   260     switch (view) {
       
   261     case HbInputSctPortrait::HbSctViewSpecialCharacter:
       
   262         setSctButtons(mSpecialCharacterSet);
       
   263         mSctButtons.at(HbSpecialCharacterButtonId)->setLatch(true);
       
   264         mSctButtons.at(HbSmileyButtonId)->setLatch(false);
       
   265         break;
       
   266 
       
   267     case HbInputSctPortrait::HbSctViewSmiley:
       
   268         q->showSmileyPicker(HbSctGridRows, HbSctGridColumns);
       
   269         break;
       
   270 
       
   271     default:
       
   272         break;
       
   273     };
       
   274 }
       
   275 
       
   276 /*
       
   277 Gets the special character sets from set keymapping.
       
   278 */
       
   279 void HbInputSctPortraitPrivate::getSpecialCharacters()
       
   280 {
       
   281     mSpecialCharacterSet.clear();
       
   282     if (mKeymap) {
       
   283         const HbKeyboardMap* keyboardMap = mKeymap->keyboard(HbKeyboardSctPortrait);
       
   284         if (keyboardMap) {
       
   285             foreach (const HbMappedKey* mappedKey, keyboardMap->keys) {
       
   286                 mSpecialCharacterSet.append(mappedKey->characters(HbModifierNone));
       
   287             }
       
   288         }
       
   289     }
       
   290 }
       
   291 
       
   292 
       
   293 
       
   294 int HbInputSctPortraitPrivate::keyCode(int buttonId)
       
   295 {
       
   296     int code = 0;
       
   297     if (buttonId == HbDelButtonId) {
       
   298         code = Qt::Key_Delete;
       
   299     } else if (buttonId == HbAbcButtonId) {
       
   300 		code = Qt::Key_Control;
       
   301     } else if (buttonId == HbSpecialCharacterButtonId) {
       
   302         code = Qt::Key_F1;
       
   303     } else if (buttonId == HbSmileyButtonId) {
       
   304         code = Qt::Key_F2;
       
   305     }
       
   306     return code;
       
   307 }
       
   308 
       
   309 /*!
       
   310 
       
   311 */
       
   312 void HbInputSctPortraitPrivate::handleStandardButtonPress(int buttonId)
       
   313 {
       
   314     Q_UNUSED(buttonId);
       
   315     //dont need to do anything here
       
   316    
       
   317 }
       
   318 
       
   319 /*
       
   320 Handles button clicks.
       
   321 */
       
   322 void HbInputSctPortraitPrivate::handleStandardButtonClick(int buttonId)
       
   323 {
       
   324     Q_Q(HbInputSctPortrait);
       
   325 
       
   326     if (buttonId >= 0 && buttonId < HbNumSctButtons &&
       
   327 		buttonId%HbSctGridColumns != HbSctGridColumns-1) {
       
   328 			QString buttonText = mSctButtons.at(buttonId)->text();
       
   329 			if (mSctButtons.at(buttonId) && !mSctButtons.at(buttonId)->isFaded()) {
       
   330 				if (buttonText.length() > 0) {
       
   331 					emit q->sctCharacterSelected(buttonText.at(0));
       
   332 				}
       
   333 			}
       
   334 	} else if (keyCode(buttonId) == Qt::Key_F1) {
       
   335         if(mActiveView != HbInputVkbWidget::HbSctViewSpecialCharacter) {
       
   336             mStartIndex = 0;
       
   337         }
       
   338         setActiveView(HbInputVkbWidget::HbSctViewSpecialCharacter);
       
   339     } else if (keyCode(buttonId) == Qt::Key_F2) {
       
   340         if(mActiveView != HbInputVkbWidget::HbSctViewSmiley) {
       
   341             mStartIndex = 0;
       
   342         }
       
   343         // dont show the smiley picker, if the button is inactive
       
   344         if (!mSctButtons.at(HbSmileyButtonId)->isFaded()) {
       
   345             setActiveView(HbInputSctPortrait::HbSctViewSmiley);
       
   346         }
       
   347     } else {
       
   348         // we should pass both the press and release event. As mode handlers work according to
       
   349         // the press and release event.
       
   350         QKeyEvent pressEvent(QEvent::KeyPress, keyCode(buttonId), Qt::NoModifier);
       
   351         if (mOwner) {
       
   352             mOwner->filterEvent(&pressEvent);
       
   353             QKeyEvent releaseEvent(QEvent::KeyRelease, keyCode(buttonId), Qt::NoModifier);
       
   354             mOwner->filterEvent(&releaseEvent);
       
   355         }
       
   356     }
       
   357 }
       
   358 
       
   359 /*
       
   360 Handles the sct keypad button releas. Internally it hides character preview pane
       
   361 if visible.
       
   362 */
       
   363 void HbInputSctPortraitPrivate::handleStandardButtonRelease(int buttonId)
       
   364 {
       
   365     Q_UNUSED(buttonId);
       
   366     //dont need to do anything here
       
   367 }
       
   368 
       
   369 /*!
       
   370 Handles virtual key clicks
       
   371 */
       
   372 void HbInputSctPortraitPrivate::_q_mappedKeyClick(int buttonid)
       
   373 {
       
   374     handleStandardButtonClick(buttonid);
       
   375 }
       
   376 /// @endcond
       
   377 
       
   378 /*!
       
   379 \deprecated HbInputSctPortrait::HbInputSctPortrait(HbInputMethod*, const HbKeymap *, QGraphicsItem*)
       
   380     is deprecated.
       
   381 */
       
   382 HbInputSctPortrait::HbInputSctPortrait(HbInputMethod* owner, const HbKeymap *keymap, QGraphicsItem* parent)
       
   383                     : HbInputVkbWidget(*new HbInputSctPortraitPrivate, parent)
       
   384 {
       
   385     Q_D(HbInputSctPortrait);
       
   386     d->q_ptr = this;
       
   387     d->mOwner = owner;
       
   388 
       
   389     d->mButtonLayout = new QGraphicsGridLayout();
       
   390     d->mButtonLayout->setSpacing(0.0);
       
   391     d->mButtonLayout->setContentsMargins(0.0, 0.0, 0.0, 0.0); 
       
   392 
       
   393     d->mClickMapper = new QSignalMapper(this);
       
   394 
       
   395     // create buttons.
       
   396     d->createSctButtons();
       
   397 
       
   398     // connect mappers.
       
   399     connect(d->mPressMapper, SIGNAL(mapped(int)), this, SLOT(mappedKeyPress(int)));
       
   400     connect(d->mReleaseMapper, SIGNAL(mapped(int)), this, SLOT(mappedKeyRelease(int)));
       
   401     connect(d->mClickMapper, SIGNAL(mapped(int)), this, SLOT(_q_mappedKeyClick(int)));
       
   402 
       
   403     connect(this, SIGNAL(flickEvent(HbInputVkbWidget::HbFlickDirection)), this, SLOT(flickTriggered(HbInputVkbWidget::HbFlickDirection)));
       
   404 
       
   405     // now set the keymap data.
       
   406     setKeymap(keymap);
       
   407 }
       
   408 
       
   409 /*!
       
   410 \deprecated HbInputSctPortrait::HbInputSctPortrait(HbInputSctPortraitPrivate &, QGraphicsItem*)
       
   411     is deprecated.
       
   412 */
       
   413 HbInputSctPortrait::HbInputSctPortrait(HbInputSctPortraitPrivate &dd, QGraphicsItem* parent)
       
   414     : HbInputVkbWidget(dd, parent)
       
   415 {
       
   416 }
       
   417 
       
   418 /*!
       
   419 \deprecated HbInputSctPortrait::~HbInputSctPortrait()
       
   420     is deprecated.
       
   421 */
       
   422 HbInputSctPortrait::~HbInputSctPortrait()
       
   423 {
       
   424 }
       
   425 
       
   426 /*!
       
   427 \deprecated HbInputSctPortrait::keyboardType() const
       
   428     is deprecated.
       
   429 */
       
   430 HbKeyboardType HbInputSctPortrait::keyboardType() const
       
   431 {
       
   432     return HbKeyboardSctPortrait;
       
   433 }
       
   434 
       
   435 /*!
       
   436 \deprecated HbInputSctPortrait::setSct(HbSctView)
       
   437     is deprecated.
       
   438 */
       
   439 void HbInputSctPortrait::setSct(HbSctView view)
       
   440 {
       
   441     Q_D(HbInputSctPortrait);
       
   442 
       
   443     d->initialize();
       
   444 
       
   445     d->mStartIndex = 0;
       
   446     d->setActiveView(view);
       
   447 }
       
   448 
       
   449 /*!
       
   450 \deprecated HbInputSctPortrait::setKeymap(const HbKeymap*)
       
   451     is deprecated.
       
   452 */
       
   453 void HbInputSctPortrait::setKeymap(const HbKeymap* keymap)
       
   454 {
       
   455     Q_D(HbInputSctPortrait);
       
   456     HbInputVkbWidget::setKeymap(keymap);
       
   457     d->getSpecialCharacters();
       
   458 }
       
   459 
       
   460 /*!
       
   461 \deprecated HbInputSctPortrait::keypadLayout()
       
   462     is deprecated.
       
   463 */
       
   464 QGraphicsLayout *HbInputSctPortrait::keypadLayout()
       
   465 {
       
   466     Q_D(HbInputSctPortrait);
       
   467     return d->mButtonLayout;
       
   468 }
       
   469 
       
   470 /*!
       
   471 \deprecated HbInputSctPortrait::aboutToOpen(HbVkbHost*)
       
   472     is deprecated.
       
   473 */
       
   474 void HbInputSctPortrait::aboutToOpen(HbVkbHost *host)
       
   475 {
       
   476     Q_D(HbInputSctPortrait);
       
   477 
       
   478     HbInputVkbWidget::aboutToOpen(host);
       
   479 
       
   480     QSizeF keypadSize = keypadButtonAreaSize();
       
   481     keypadSize.setWidth(keypadSize.width() / (qreal)HbSctGridColumns);
       
   482     keypadSize.setHeight(keypadSize.height() / (qreal)HbSctGridRows);
       
   483     d->setLayoutDimensions(keypadSize);
       
   484 }
       
   485 
       
   486 /*!
       
   487 \deprecated HbInputSctPortrait::flickTriggered(HbInputVkbWidget::HbFlickDirection)
       
   488     is deprecated.
       
   489 */
       
   490 void HbInputSctPortrait::flickTriggered(HbInputVkbWidget::HbFlickDirection direction)
       
   491 {
       
   492     Q_D(HbInputSctPortrait);
       
   493 
       
   494     d->initialize();
       
   495     int iNumSctButtons = HbNumSctButtons - HbSctGridRows;
       
   496     if(direction == HbInputVkbWidget::HbFlickDirectionLeft) {
       
   497         d->mCurrentPage--;
       
   498         if(d->mCurrentPage<0) {
       
   499             if (d->mSpecialCharacterSet.size()) {
       
   500                 d->mCurrentPage = (int)ceil((float)d->mSpecialCharacterSet.size()/iNumSctButtons)-1;
       
   501             } else {
       
   502                 d->mCurrentPage = 0;
       
   503             }
       
   504         }
       
   505         d->mStartIndex = d->mCurrentPage*iNumSctButtons;
       
   506     }
       
   507     d->setActiveView(HbInputSctPortrait::HbSctViewSpecialCharacter);
       
   508 }
       
   509 
       
   510 #include "moc_hbinputsctportrait.cpp"
       
   511 
       
   512 // End of file