locationpickerservice/src/locationpickersearchview.cpp
changeset 41 b3dd5ec3089d
parent 35 59575560d1e6
--- a/locationpickerservice/src/locationpickersearchview.cpp	Thu Sep 02 20:20:42 2010 +0300
+++ b/locationpickerservice/src/locationpickersearchview.cpp	Mon Oct 04 00:10:56 2010 +0300
@@ -43,8 +43,16 @@
     mVerticalLayout(NULL),
     mDocumentLoader(aLoader),
 	mLongPressMenu(NULL),
-	mSelectAction(NULL)
+	mSelectAction(NULL),
+	mBackAction(NULL)
 {
+    
+    // create back action
+    mBackAction = new HbAction(Hb::BackNaviAction);
+    // add back key action
+    setNavigationAction(mBackAction);
+    //connect to slots
+    connect(mBackAction, SIGNAL(triggered()), this,SLOT(backTriggered())); 
 
 }
 // ----------------------------------------------------
@@ -54,6 +62,7 @@
 {
     delete mProxyModel;
     delete mEmptyLabel;
+    delete mBackAction;
 }
 
 // ----------------------------------------------------
@@ -179,7 +188,7 @@
 {
     mLongPressMenu = new HbMenu();
     mLongPressMenu->setTimeout(HbMenu::NoTimeout);
-    mSelectAction  = mLongPressMenu->addAction(hbTrId("txt_lint_list_select"));
+    mSelectAction  = mLongPressMenu->addAction(hbTrId("txt_lint_menu_select"));
     mIndex = aItem->modelIndex();
     connect(mSelectAction, SIGNAL(triggered()),this, SLOT(handleLongPress()));
     mLongPressMenu->setPreferredPos(aPoint);
@@ -205,3 +214,15 @@
     mSelectAction->deleteLater();
     mSelectAction = NULL;
 }
+
+// ----------------------------------------------------------------------------
+// LocationPickerSearchView::backButtonTriggered()
+// ----------------------------------------------------------------------------
+void LocationPickerSearchView::backTriggered()
+{
+    
+   //complete the service
+    emit completeService();
+    
+    
+}