src/hbinput/inputwidgets/hbinputsmileypicker.cpp
changeset 5 627c4a0fd0e7
parent 0 16d8024aca5e
child 6 c3690ec91ef8
equal deleted inserted replaced
3:11d3954df52a 5:627c4a0fd0e7
    33 
    33 
    34 #include <HbMainWindow>
    34 #include <HbMainWindow>
    35 #include <HbFrameItem>
    35 #include <HbFrameItem>
    36 #include <HbFrameDrawer>
    36 #include <HbFrameDrawer>
    37 #include <hbdialog_p.h>
    37 #include <hbdialog_p.h>
       
    38 #include <hbinputregioncollector_p.h>
    38 
    39 
    39 #include "hbinputsmileypicker.h"
    40 #include "hbinputsmileypicker.h"
    40 
    41 
    41 /// @cond
    42 /// @cond
    42 
    43 
   114 */
   115 */
   115 HbInputSmileyPicker::HbInputSmileyPicker(int rows, int columns, QGraphicsItem *parent, QStringList smileys)
   116 HbInputSmileyPicker::HbInputSmileyPicker(int rows, int columns, QGraphicsItem *parent, QStringList smileys)
   116     : HbDialog(*new HbInputSmileyPickerPrivate(rows, columns), parent)
   117     : HbDialog(*new HbInputSmileyPickerPrivate(rows, columns), parent)
   117 {
   118 {
   118     Q_D(HbInputSmileyPicker);
   119     Q_D(HbInputSmileyPicker);
   119 
   120     HbInputRegionCollector::instance()->attach(this);
   120 #if QT_VERSION >= 0x040600
   121 #if QT_VERSION >= 0x040600
   121     // Make sure the smiley picker never steals focus.
   122     // Make sure the smiley picker never steals focus.
   122     setFlag(QGraphicsItem::ItemIsPanel, true);
   123     setFlag(QGraphicsItem::ItemIsPanel, true);
   123     setActive(false);
   124     setActive(false);
   124 #endif
   125 #endif
   127     setFocusPolicy(Qt::ClickFocus);
   128     setFocusPolicy(Qt::ClickFocus);
   128     setDismissPolicy(TapAnywhere);
   129     setDismissPolicy(TapAnywhere);
   129     setBackgroundFaded(false);
   130     setBackgroundFaded(false);
   130     setTimeout(NoTimeout);
   131     setTimeout(NoTimeout);
   131     setContentWidget(d->mView);
   132     setContentWidget(d->mView);
       
   133     d->mView->setLongPressEnabled(false);
   132 
   134 
   133     // extract smilies.
   135     // extract smilies.
   134     d->getSmilies(smileys);
   136     d->getSmilies(smileys);
   135 
   137 
   136     // connect signals
   138     // connect signals