23 #include <hbtoolbar.h> |
23 #include <hbtoolbar.h> |
24 #include "btcpuibaseview.h" |
24 #include "btcpuibaseview.h" |
25 |
25 |
26 class HbGroupBox; |
26 class HbGroupBox; |
27 class HbLabel; |
27 class HbLabel; |
28 class HbTextEdit; |
28 class HbLineEdit; |
29 class HbPushButton; |
29 class HbPushButton; |
30 class HbIcon; |
30 class HbIcon; |
31 class HbDocumentLoader; |
31 class HbDocumentLoader; |
32 class HbListView; |
32 class HbDataForm; |
|
33 |
33 class HbDataFormModel; |
34 class HbDataFormModel; |
34 class HbDataFormModelItem; |
35 //class HbDataFormModelItem; |
35 class CpSettingFormItemData; |
36 class CpSettingFormItemData; |
36 class BtAbstractDelegate; |
37 class BtAbstractDelegate; |
37 |
38 class BtCpUiDeviceDetail; |
38 |
39 |
39 class BtCpUiDeviceView : public BtCpUiBaseView |
40 class BtCpUiDeviceView : public BtCpUiBaseView |
40 { |
41 { |
41 Q_OBJECT |
42 Q_OBJECT |
42 |
43 |
44 explicit BtCpUiDeviceView( |
45 explicit BtCpUiDeviceView( |
45 BtSettingModel &settingModel, |
46 BtSettingModel &settingModel, |
46 BtDeviceModel &deviceModel, |
47 BtDeviceModel &deviceModel, |
47 QGraphicsItem *parent = 0); |
48 QGraphicsItem *parent = 0); |
48 virtual ~BtCpUiDeviceView(); |
49 virtual ~BtCpUiDeviceView(); |
49 virtual void activateView( const QVariant& value, int cmdId ); |
50 virtual void activateView( const QVariant& value, bool fromBackButton ); |
50 virtual void deactivateView(); |
51 virtual void deactivateView(); |
51 virtual void setSoftkeyBack(); |
52 virtual void setSoftkeyBack(); |
52 |
53 |
53 public slots: |
54 public slots: |
54 |
55 |
55 virtual void switchToPreviousView(); |
56 virtual void switchToPreviousView(); |
|
57 void changeOrientation( Qt::Orientation orientation ); |
56 void updateDeviceData(); |
58 void updateDeviceData(); |
57 void changeBtDeviceName(); |
59 void changeBtDeviceName(); |
58 void pairUnpair(); |
60 void pairUnpair(); |
59 void connectDisconnect(); |
61 void connectDisconnect(); |
60 void pairDelegateCompleted(int status); |
62 void pairDelegateCompleted(int status); |
61 void unpairDelegateCompleted(int status); |
63 void unpairDelegateCompleted(int status); |
62 void connectDelegateCompleted(int status); |
64 void connectDelegateCompleted(int status); |
63 void disconnectDelegateCompleted(int status); |
65 void disconnectDelegateCompleted(int status); |
64 |
66 void changeDevNameDelegateCompleted(int status, QVariant param); |
|
67 void handleDeviceSetting(); |
|
68 void handleDeviceSettingsChange(bool status); |
|
69 |
65 private: |
70 private: |
66 void clearViewData(); |
71 void clearViewData(); |
67 void pairDevice(); |
72 void pairDevice(); |
68 void unpairDevice(); |
73 void unpairDevice(); |
69 void connectDevice(); |
74 void connectDevice(); |
70 void disconnectDevice(); |
75 void disconnectDevice(); |
71 void setDeviceCategory(int cod, int majorRole, int minorRole);//cod:class of device |
76 void setDeviceCategory(int cod, int majorRole);//cod:class of device |
72 void setDeviceStatus(int majorRole); |
77 void setDeviceStatus(int majorRole); |
|
78 void setConnectionCombobox(); |
73 void setTextAndVisibilityOfButtons(); |
79 void setTextAndVisibilityOfButtons(); |
|
80 void updateStatusVariables(int majorRole); |
74 |
81 |
75 private: |
82 private: |
76 HbDocumentLoader *mLoader; |
83 HbDocumentLoader *mLoader; |
77 HbGroupBox *mGroupBox; |
84 //HbGroupBox *mGroupBox; |
78 HbLabel *mDeviceIcon; |
85 HbLabel *mDeviceIcon; |
79 HbTextEdit *mDeviceName; |
86 HbLineEdit *mDeviceName; |
80 HbLabel *mDeviceCategory; |
87 HbLabel *mDeviceCategory; |
81 HbLabel *mDeviceStatus; |
88 HbLabel *mDeviceStatus; |
|
89 |
|
90 HbDataForm *mConnectionCombobox; |
|
91 HbDataFormModel *mConnectionComboboxModel; |
82 |
92 |
83 HbPushButton *mPair_Unpair; |
93 HbPushButton *mPair_Unpair; |
84 HbPushButton *mConnect_Disconnect; |
94 HbPushButton *mConnect_Disconnect; |
85 HbPushButton *mDeviceSetting; |
95 HbPushButton *mDeviceSetting; |
86 |
96 |
97 |
107 |
98 QModelIndex mDeviceIndex; |
108 QModelIndex mDeviceIndex; |
99 QVariant mDeviceBdAddr; |
109 QVariant mDeviceBdAddr; |
100 |
110 |
101 //true -> device is paired; false -> device is unpaired |
111 //true -> device is paired; false -> device is unpaired |
102 bool mPairStatus; |
112 bool mPairedStatus; |
103 |
113 |
104 //true-> device is connected; false -> device is disconnected |
114 //true-> device is connected; false -> device is disconnected |
105 bool mConnectStatus; |
115 bool mConnectedStatus; |
106 |
116 bool mTrustedStatus; |
107 //true -> device is connectable |
117 bool mBlockedStatus; |
|
118 |
|
119 //true -> device is connectable |
108 //e.g. not possible to connect to a phone, but possible to connect to a headset |
120 //e.g. not possible to connect to a phone, but possible to connect to a headset |
109 bool mConnectable; |
121 bool mConnectable; |
110 |
122 |
111 BtAbstractDelegate* mAbstractDelegate; |
123 BtAbstractDelegate* mAbstractDelegate; |
112 |
124 |
|
125 BtCpUiDeviceDetail* mDeviceDetail; |
113 |
126 |
114 }; |
127 }; |
115 |
128 |
116 #endif |
129 #endif |