57 virtual void setSoftkeyBack(); |
52 virtual void setSoftkeyBack(); |
58 virtual void activateView( const QVariant& value, int cmdId ); |
53 virtual void activateView( const QVariant& value, int cmdId ); |
59 virtual void deactivateView(); |
54 virtual void deactivateView(); |
60 |
55 |
61 public slots: |
56 public slots: |
62 void commandCompleted( int cmdId, int err, const QString &diagnostic ); |
|
63 void changeOrientation( Qt::Orientation orientation ); |
57 void changeOrientation( Qt::Orientation orientation ); |
64 void itemActivated(QModelIndex index); |
|
65 void changePowerState(); |
58 void changePowerState(); |
66 |
59 |
67 void updateSettingItems(const QModelIndex &topLeft, const QModelIndex &bottomRight); |
60 void updateSettingItems(const QModelIndex &topLeft, const QModelIndex &bottomRight); |
68 void deviceSelected(const QModelIndex& modelIndex); |
61 void deviceSelected(const QModelIndex& modelIndex); |
69 void goToDiscoveryView(); |
62 void goToDiscoveryView(); |
70 void goToDeviceView(const QModelIndex& modelIndex); |
63 void goToDeviceView(const QModelIndex& modelIndex); |
71 |
64 |
72 // from view manager |
65 // from view manager |
73 void changeView(int targetViewId, bool fromBackButton, int cmdId, const QVariant& value = 0 ); |
66 void changeView(int targetViewId, bool fromBackButton, int cmdId, const QVariant& value = 0 ); |
74 void switchToPreviousViewReally(); |
|
75 virtual void switchToPreviousView(); |
67 virtual void switchToPreviousView(); |
76 |
68 |
77 void visibilityChanged (int index); |
69 void visibilityChanged (int index); |
78 void changeBtLocalName(); |
70 void changeBtLocalName(); |
79 |
71 |
80 //from delegate classes |
72 //from delegate classes |
81 void powerDelegateCompleted(int status); |
73 void powerDelegateCompleted(int status); |
82 void visibilityDelegateCompleted(int status); |
74 void visibilityDelegateCompleted(int status); |
83 void btNameDelegateCompleted(int status, QVariant param); |
75 void btNameDelegateCompleted(int status, QVariant param); |
|
76 void allActionTriggered(); |
|
77 void pairActiontriggered(); |
84 |
78 |
85 protected: |
79 protected: |
86 |
80 |
|
81 private: |
|
82 enum filterType { |
|
83 BtuiAll = 0, |
|
84 BtuiPaired |
|
85 }; |
87 |
86 |
88 private: |
87 private: |
89 VisibilityMode indexToVisibilityMode(int index); |
88 VisibilityMode indexToVisibilityMode(int index); |
90 int visibilityModeToIndex(VisibilityMode mode); |
89 int visibilityModeToIndex(VisibilityMode mode); |
91 BtCpUiBaseView * idToView(int targetViewId); |
90 BtCpUiBaseView * idToView(int targetViewId); |
92 |
91 |
93 //Functions to set the Previous Local settings in case of error |
92 //Functions to set the Previous Local settings in case of error |
94 void setPrevBtLocalName(); |
93 void setPrevBtLocalName(); |
95 void setPrevVisibilityMode(); |
94 void setPrevVisibilityMode(); |
96 |
95 |
|
96 void updateDeviceListFilter(BtCpUiMainView::filterType filter); |
|
97 |
97 private: |
98 private: |
98 QAbstractItemModel* mSubModel; |
99 |
99 HbDocumentLoader *mLoader; |
100 HbDocumentLoader *mLoader; |
|
101 |
100 HbLineEdit *mDeviceNameEdit; |
102 HbLineEdit *mDeviceNameEdit; |
101 HbPushButton *mPowerButton; |
103 HbPushButton *mPowerButton; |
102 HbComboBox *mVisibilityMode; |
104 HbComboBox *mVisibilityMode; |
103 HbListView *mDeviceList; |
105 HbListView *mDeviceList; |
104 |
106 |
105 // data structures for switching between views |
|
106 bool mEventFilterInstalled; |
|
107 int mAutoCmdId; |
|
108 Qt::Orientation mOrientation; |
107 Qt::Orientation mOrientation; |
109 |
108 |
110 // from view manager |
109 // from view manager |
111 HbMainWindow* mMainWindow; |
110 HbMainWindow* mMainWindow; |
112 BtCpUiBaseView* mMainView; |
111 BtCpUiBaseView* mMainView; |
113 BtCpUiBaseView* mDeviceView; |
112 BtCpUiBaseView* mDeviceView; |
114 BtCpUiBaseView* mSearchView; |
113 BtCpUiBaseView* mSearchView; |
115 BtCpUiBaseView* mCurrentView; |
114 BtCpUiBaseView* mCurrentView; |
116 int mCurrentViewId; |
115 int mCurrentViewId; |
117 HbAction *mBackAction; |
|
118 QList<int> mPreviousViewIds; |
116 QList<int> mPreviousViewIds; |
119 |
117 |
120 //poiter to abstract delegate, and it is instantiated at runtime |
118 //poiter to abstract delegate, and it is instantiated at runtime |
121 BtAbstractDelegate* mAbstractDelegate; |
119 BtAbstractDelegate* mAbstractDelegate; |
122 BtuiModelSortFilter *mMainFilterModel; |
120 BtuiModelSortFilter *mMainFilterModel; |
123 |
121 |
|
122 HbAction *mAllAction; |
|
123 HbAction *mPairAction; |
|
124 HbGroupBox *mGroupBox; |
124 }; |
125 }; |
125 #endif // BTCPUIMAINVIEW_H |
126 #endif // BTCPUIMAINVIEW_H |