20 |
20 |
21 #include <cpbasesettingview.h> |
21 #include <cpbasesettingview.h> |
22 #include <hbaction.h> |
22 #include <hbaction.h> |
23 #include <hbtoolbar.h> |
23 #include <hbtoolbar.h> |
24 #include "btcpuibaseview.h" |
24 #include "btcpuibaseview.h" |
|
25 #include "btuimodelsortfilter.h" |
25 |
26 |
26 class HbLabel; |
27 class HbLabel; |
27 class HbPushButton; |
28 class HbPushButton; |
28 class HbIcon; |
29 class HbIcon; |
29 class HbDocumentLoader; |
30 class HbDocumentLoader; |
30 class HbListView; |
31 class HbListView; |
31 class HbDataFormModel; |
32 class BtAbstractDelegate; |
32 class HbDataFormModelItem; |
|
33 class CpSettingFormItemData; |
|
34 |
|
35 |
33 |
36 class BtCpUiSearchView : public BtCpUiBaseView |
34 class BtCpUiSearchView : public BtCpUiBaseView |
37 { |
35 { |
38 Q_OBJECT |
36 Q_OBJECT |
39 |
37 |
40 public: |
38 public: |
41 explicit BtCpUiSearchView(BtuiModel &model, QGraphicsItem *parent = 0); |
39 explicit BtCpUiSearchView( |
|
40 BtSettingModel &settingModel, |
|
41 BtDeviceModel &deviceModel, |
|
42 QGraphicsItem *parent = 0); |
42 virtual ~BtCpUiSearchView(); |
43 virtual ~BtCpUiSearchView(); |
43 virtual void activateView( const QVariant& value, int cmdId ); |
44 virtual void activateView( const QVariant& value, int cmdId ); |
44 virtual void deactivateView(); |
45 virtual void deactivateView(); |
45 virtual void setSoftkeyBack(); |
46 virtual void setSoftkeyBack(); |
46 |
47 |
47 public slots: |
48 public slots: |
|
49 virtual void switchToPreviousView(); |
|
50 void changeOrientation( Qt::Orientation orientation ); |
|
51 void stopSearching(); |
|
52 void retrySearch(); |
|
53 void searchDelegateCompleted(int error); |
|
54 void deviceSearchCompleted(int error); |
48 void deviceSelected(const QModelIndex& modelIndex); |
55 void deviceSelected(const QModelIndex& modelIndex); |
49 virtual void switchToPreviousView(); |
|
50 |
56 |
51 private: |
57 private: |
52 HbDocumentLoader *mLoader; |
58 HbDocumentLoader *mLoader; |
53 HbLabel *mDeviceIcon; |
59 HbLabel *mDeviceIcon; |
54 HbLabel *mDeviceName; |
60 HbLabel *mLabelFoundDevices; |
|
61 HbLabel *mLabelSearching; |
55 HbListView *mDeviceList; |
62 HbListView *mDeviceList; |
56 |
63 |
57 // data structures for switching between views |
64 // data structures for switching between views |
58 bool mEventFilterInstalled; |
65 bool mEventFilterInstalled; |
59 int mAutoCmdId; |
66 int mAutoCmdId; |
60 Qt::Orientation mOrientation; |
67 Qt::Orientation mOrientation; |
61 |
68 |
62 HbMainWindow* mMainWindow; |
69 HbMainWindow* mMainWindow; |
63 BtCpUiBaseView* mMainView; |
70 BtCpUiBaseView* mMainView; |
64 BtCpUiBaseView* mSearchView; |
71 BtCpUiBaseView* mDeviceView; |
65 HbAction *mSoftKeyBackAction; |
72 HbAction * mSoftKeyBackAction; |
66 // CpCustomLabelViewItem* mLabelItem; |
73 HbToolBar* mToolBar; |
67 // CpCustomListViewItem* mListItem; |
74 HbAction* mViewBy; |
68 HbToolBar* mToolBar; |
75 HbAction* mStop; |
69 HbAction* mViewBy; |
76 HbAction* mRetry; |
70 HbAction* mStop; |
77 HbAction* mExit; |
71 HbAction* mRetry; |
78 HbAction* mConnect; |
72 HbDataFormModel* mModel; |
79 |
|
80 //pointer to abstract delegate, and it is instantiated at runtime |
|
81 BtAbstractDelegate* mAbstractDelegate; |
|
82 QModelIndex* mParentIndex; |
|
83 int mNumOfRows; |
|
84 BtuiModelSortFilter* mBtuiModelSortFilter; |
73 }; |
85 }; |
74 |
86 |
75 #endif// BTCPUISEARCHVIEW_H |
87 #endif// BTCPUISEARCHVIEW_H |