bluetoothengine/btui/btcpplugin/btcpuisearchview.h
changeset 42 b72428996822
parent 31 a0ea99b6fa53
child 47 9e2a905b887f
--- a/bluetoothengine/btui/btcpplugin/btcpuisearchview.h	Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothengine/btui/btcpplugin/btcpuisearchview.h	Mon Jul 12 18:51:05 2010 +0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
  * All rights reserved.
  * This component and the accompanying materials are made available
  * under the terms of "Eclipse Public License v1.0""
@@ -30,18 +30,20 @@
 class HbDocumentLoader;
 class HbListView;
 class BtAbstractDelegate;
+class HbSelectionDialog;
 
 class BtCpUiSearchView : public BtCpUiBaseView
 {
     Q_OBJECT
     
 public:
+
     explicit BtCpUiSearchView(
             BtSettingModel &settingModel, 
             BtDeviceModel &deviceModel, 
             QGraphicsItem *parent = 0);
     virtual ~BtCpUiSearchView();
-    virtual void activateView( const QVariant& value, int cmdId );
+    virtual void activateView( const QVariant& value, bool fromBackButton );
     virtual void deactivateView();
     virtual void setSoftkeyBack();
     
@@ -50,27 +52,37 @@
     void changeOrientation( Qt::Orientation orientation );
     void stopSearching();
     void retrySearch();
+    void viewByDeviceTypeDialog();
+    void viewByDialogClosed(HbAction* action);
     void searchDelegateCompleted(int error);
     void deviceSearchCompleted(int error);
     void deviceSelected(const QModelIndex& modelIndex);
-
+    
+private:
+    void startSearchDelegate();
+    
+private:
+    enum devTypeSelectionList {
+        BtUiDevAudioDevice = 0,
+        BtUiDevComputer,
+        BtUiDevInputDevice,
+        BtUiDevPhone,
+        BtUiDevOtherDevice
+    };
 private:
     HbDocumentLoader *mLoader;
     HbLabel *mDeviceIcon;
     HbLabel *mLabelFoundDevices;
     HbLabel *mLabelSearching;        
     HbListView *mDeviceList;
+    QStringList mDevTypeList;
+    HbSelectionDialog *mQuery;
     
-    // data structures for switching between views
-    bool mEventFilterInstalled;
-    int mAutoCmdId;
     Qt::Orientation mOrientation;
     
     HbMainWindow*           mMainWindow;
     BtCpUiBaseView*         mMainView;
-    BtCpUiBaseView*         mDeviceView;
     HbAction *              mSoftKeyBackAction;
-    HbToolBar*              mToolBar;
     HbAction*               mViewBy;
     HbAction*               mStop;
     HbAction*               mRetry;
@@ -79,8 +91,6 @@
 
     //pointer to abstract delegate, and it is instantiated at runtime
     BtAbstractDelegate*     mAbstractDelegate;
-    QModelIndex*            mParentIndex;
-    int                     mNumOfRows;
     BtuiModelSortFilter*    mBtuiModelSortFilter;
 };