src/hbinput/inputwidgets/hbinputsmileypicker.cpp
changeset 30 80e4d18b72f5
parent 28 b7da29130b0e
--- a/src/hbinput/inputwidgets/hbinputsmileypicker.cpp	Fri Sep 17 08:32:10 2010 +0300
+++ b/src/hbinput/inputwidgets/hbinputsmileypicker.cpp	Mon Oct 04 00:38:12 2010 +0300
@@ -35,7 +35,7 @@
 #include <HbMainWindow>
 #include <HbFrameItem>
 #include <HbFrameDrawer>
-#include <hbdialog_p.h>
+#include <hbinputpopupbase_p.h>
 #include <hbinputregioncollector_p.h>
 
 const int HbLandscapeRows = 3;
@@ -45,7 +45,7 @@
 
 /// @cond
 
-class HbInputSmileyPickerPrivate: public HbDialogPrivate
+class HbInputSmileyPickerPrivate: public HbInputPopupBasePrivate
 {
     Q_DECLARE_PUBLIC(HbInputSmileyPicker)
 
@@ -66,8 +66,6 @@
 {
     Q_UNUSED(rows);
     Q_UNUSED(columns);
-    // 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();
@@ -105,7 +103,7 @@
 /// @endcond
 
 /*!
-@proto
+@stable
 @hbinput
 \class HbInputSmileyPicker
 \brief Smiley picker widget
@@ -117,16 +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);
-    d->mActivePopup = false;
-    setActive(false);
-
     if (!rows || !columns) {
         if (mainWindow()->orientation() == Qt::Horizontal) {
             rows = HbLandscapeRows;
@@ -175,7 +168,7 @@
     if (item) {
         d->mView->scrollTo(item->index());
     }
-    HbDialog::showEvent(event);
+    HbInputPopupBase::showEvent(event);
 }
 
 #include "moc_hbinputsmileypicker.cpp"