diff -r 7516d6d86cf5 -r ed14f46c0e55 src/hbinput/inputwidgets/hbinputsmileypicker.cpp --- a/src/hbinput/inputwidgets/hbinputsmileypicker.cpp Mon Oct 04 17:49:30 2010 +0300 +++ b/src/hbinput/inputwidgets/hbinputsmileypicker.cpp Mon Oct 18 18:23:13 2010 +0300 @@ -35,7 +35,7 @@ #include #include #include -#include +#include #include const int HbLandscapeRows = 3; @@ -45,7 +45,7 @@ /// @cond -class HbInputSmileyPickerPrivate: public HbDialogPrivate +class HbInputSmileyPickerPrivate: public HbInputPopupBasePrivate { Q_DECLARE_PUBLIC(HbInputSmileyPicker) @@ -66,15 +66,12 @@ { Q_UNUSED(rows); Q_UNUSED(columns); - Q_Q(HbInputSmileyPicker); - // we should make sure that it comes above vkb - setPriority(HbPopupPrivate::VirtualKeyboard + 1); // create a view and set the rows and columns. - mView = new HbGridView(q); + mView = new HbGridView(); mView->setScrollDirections(Qt::Horizontal); mView->setHorizontalScrollBarPolicy(HbScrollArea::ScrollBarAsNeeded); - mModel = new QStandardItemModel(q); + mModel = new QStandardItemModel(mView); mView->setModel(mModel); } @@ -106,7 +103,7 @@ /// @endcond /*! -@proto +@stable @hbinput \class HbInputSmileyPicker \brief Smiley picker widget @@ -118,15 +115,11 @@ \sa HbGridView */ HbInputSmileyPicker::HbInputSmileyPicker(int rows, int columns, QGraphicsItem *parent, QStringList smileys) - : HbDialog(*new HbInputSmileyPickerPrivate(rows, columns), parent) + : HbInputPopupBase(*new HbInputSmileyPickerPrivate(rows, columns), parent) { Q_D(HbInputSmileyPicker); HbInputRegionCollector::instance()->attach(this); - // Make sure the smiley picker never steals focus. - setFlag(QGraphicsItem::ItemIsPanel, true); - setActive(false); - if (!rows || !columns) { if (mainWindow()->orientation() == Qt::Horizontal) { rows = HbLandscapeRows; @@ -145,7 +138,6 @@ setBackgroundFaded(false); setTimeout(NoTimeout); setContentWidget(d->mView); - d->mView->setLongPressEnabled(false); // extract smilies. d->getSmilies(smileys); @@ -176,7 +168,7 @@ if (item) { d->mView->scrollTo(item->index()); } - HbDialog::showEvent(event); + HbInputPopupBase::showEvent(event); } #include "moc_hbinputsmileypicker.cpp"