bluetoothengine/btui/btcpplugin/btcpuisearchview.h
branchRCL_3
changeset 56 9386f31cc85b
parent 55 613943a21004
child 61 269724087bed
equal deleted inserted replaced
55:613943a21004 56:9386f31cc85b
     1 /*
       
     2  * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
       
     3  * All rights reserved.
       
     4  * This component and the accompanying materials are made available
       
     5  * under the terms of "Eclipse Public License v1.0""
       
     6  * which accompanies this distribution, and is available
       
     7  * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8  *
       
     9  * Initial Contributors:
       
    10  * Nokia Corporation - initial contribution.
       
    11  *
       
    12  * Contributors:
       
    13  *
       
    14  * Description:  
       
    15  *
       
    16  */
       
    17 
       
    18 #ifndef	BTCPUISEARCHVIEW_H
       
    19 #define	BTCPUISEARCHVIEW_H
       
    20 
       
    21 #include <cpbasesettingview.h>
       
    22 #include <hbaction.h>
       
    23 #include <hbtoolbar.h>
       
    24 #include "btcpuibaseview.h"
       
    25 #include "btuimodelsortfilter.h"
       
    26 
       
    27 class HbLabel;
       
    28 class HbPushButton;
       
    29 class HbIcon;
       
    30 class HbDocumentLoader;
       
    31 class HbListView;
       
    32 class BtAbstractDelegate;
       
    33 class HbSelectionDialog;
       
    34 class HbGroupBox;
       
    35 class HbDataForm;
       
    36 
       
    37 class BtCpUiSearchView : public BtCpUiBaseView
       
    38 {
       
    39     Q_OBJECT
       
    40     
       
    41 public:
       
    42 
       
    43     explicit BtCpUiSearchView(
       
    44             BtSettingModel &settingModel, 
       
    45             BtDeviceModel &deviceModel, 
       
    46             QGraphicsItem *parent = 0);
       
    47     virtual ~BtCpUiSearchView();
       
    48     virtual void activateView( const QVariant& value, bool fromBackButton );
       
    49     virtual void deactivateView();
       
    50     virtual void setSoftkeyBack();
       
    51     
       
    52 public slots:
       
    53     virtual void switchToPreviousView();
       
    54     void changeOrientation( Qt::Orientation orientation );
       
    55     void stopSearching();
       
    56     void retrySearch();
       
    57     void viewByDeviceTypeDialog();
       
    58     void viewByDialogClosed(HbAction* action);
       
    59     void searchDelegateCompleted(int error);
       
    60     void deviceSearchCompleted(int error);
       
    61     void deviceSelected(const QModelIndex& modelIndex);
       
    62     
       
    63 private:
       
    64     void startSearchDelegate();
       
    65     
       
    66 private:
       
    67     enum devTypeSelectionList {
       
    68         BtUiDevAudioDevice = 0,
       
    69         BtUiDevComputer,
       
    70         BtUiDevInputDevice,
       
    71         BtUiDevPhone,
       
    72         BtUiDevOtherDevice
       
    73     };
       
    74 private:
       
    75     HbDocumentLoader *mLoader;
       
    76     HbLabel *mDeviceIcon;
       
    77     HbDataForm *mDataForm;
       
    78     HbLabel *mLabelSearching;        
       
    79     HbListView *mDeviceList;
       
    80     QStringList mDevTypeList;
       
    81     HbSelectionDialog *mQuery;
       
    82     
       
    83     Qt::Orientation mOrientation;
       
    84     
       
    85     HbMainWindow*           mMainWindow;
       
    86     BtCpUiBaseView*         mMainView;
       
    87     HbAction *              mSoftKeyBackAction;
       
    88     HbAction*               mViewBy;
       
    89     HbAction*               mStop;
       
    90     HbAction*               mRetry;
       
    91 
       
    92     //pointer to abstract delegate, and it is instantiated at runtime
       
    93     BtAbstractDelegate*     mAbstractDelegate;
       
    94     BtuiModelSortFilter*    mBtuiModelSortFilter;
       
    95 };
       
    96 
       
    97 #endif//	BTCPUISEARCHVIEW_H