84 QString deviceAddr(parameters.value(QString::number(TBluetoothDeviceDialog::ELocalAddress)).toString()); |
85 QString deviceAddr(parameters.value(QString::number(TBluetoothDeviceDialog::ELocalAddress)).toString()); |
85 mMessageBox->setText(textStr.arg(deviceAddr)); |
86 mMessageBox->setText(textStr.arg(deviceAddr)); |
86 HbIcon icon(QString("qtg_large_bluetooth")); |
87 HbIcon icon(QString("qtg_large_bluetooth")); |
87 mMessageBox->setIcon(icon); |
88 mMessageBox->setIcon(icon); |
88 mMessageBox->setTimeout(timeOut); |
89 mMessageBox->setTimeout(timeOut); |
89 connect(mMessageBox, SIGNAL(finished(HbAction*)), this, SLOT(messageBoxClosed(HbAction*))); |
90 connect(mMessageBox, SIGNAL(finished(int)), this, SLOT(messageBoxClosed(int))); |
90 }break; |
91 }break; |
91 //TODO: Remove this piece of code if notifier is used in toggle |
92 //TODO: Remove this piece of code if notifier is used in toggle |
92 case TBluetoothDialogParams::EOfflineQuery: |
93 case TBluetoothDialogParams::EOfflineQuery: |
93 { |
94 { |
94 mMessageBox = new HbMessageBox(HbMessageBox::MessageTypeQuestion); |
95 mMessageBox = new HbMessageBox(HbMessageBox::MessageTypeQuestion); |
96 mMessageBox->setStandardButtons(HbMessageBox::Yes | HbMessageBox::No); |
97 mMessageBox->setStandardButtons(HbMessageBox::Yes | HbMessageBox::No); |
97 HbIcon icon(QString("qtg_large_bluetooth")); |
98 HbIcon icon(QString("qtg_large_bluetooth")); |
98 mMessageBox->setIcon(icon); |
99 mMessageBox->setIcon(icon); |
99 mMessageBox->setTimeout(timeOut); |
100 mMessageBox->setTimeout(timeOut); |
100 connect(mMessageBox, SIGNAL(finished(int)), this, SLOT(messageBoxClosed(int))); |
101 connect(mMessageBox, SIGNAL(finished(int)), this, SLOT(messageBoxClosed(int))); |
101 connect(mMessageBox, SIGNAL(finished(HbAction*)), this, SLOT(messageBoxClosed(HbAction*))); |
|
102 }break; |
102 }break; |
103 |
103 |
104 case TBluetoothDialogParams::ERecvFailed: |
104 case TBluetoothDialogParams::ERecvFailed: |
105 { |
105 { |
106 mMessageBox = new HbMessageBox(HbMessageBox::MessageTypeInformation); |
106 mMessageBox = new HbMessageBox(HbMessageBox::MessageTypeInformation); |
109 mMessageBox->setText(textStr.arg(devName)); |
109 mMessageBox->setText(textStr.arg(devName)); |
110 int classOfDevice = parameters.value(QString::number(TBluetoothDeviceDialog::EDeviceClass)).toDouble(); |
110 int classOfDevice = parameters.value(QString::number(TBluetoothDeviceDialog::EDeviceClass)).toDouble(); |
111 HbIcon icon = getBadgedDeviceTypeIcon(classOfDevice); |
111 HbIcon icon = getBadgedDeviceTypeIcon(classOfDevice); |
112 mMessageBox->setIcon(icon); |
112 mMessageBox->setIcon(icon); |
113 mMessageBox->setDismissPolicy(HbPopup::NoDismiss); |
113 mMessageBox->setDismissPolicy(HbPopup::NoDismiss); |
114 connect(mMessageBox, SIGNAL(finished(HbAction*)), this, SLOT(messageBoxClosed(HbAction*))); |
114 connect(mMessageBox, SIGNAL(finished(int)), this, SLOT(messageBoxClosed(int))); |
115 }break; |
115 }break; |
116 |
116 |
117 case TBluetoothDialogParams::ESendFailed: |
117 case TBluetoothDialogParams::ESendFailed: |
118 { |
118 { |
119 mMessageBox = new HbMessageBox(HbMessageBox::MessageTypeInformation); |
119 mMessageBox = new HbMessageBox(HbMessageBox::MessageTypeInformation); |
122 mMessageBox->setText(textStr.arg(devName)); |
122 mMessageBox->setText(textStr.arg(devName)); |
123 int classOfDevice = parameters.value(QString::number(TBluetoothDeviceDialog::EDeviceClass)).toDouble(); |
123 int classOfDevice = parameters.value(QString::number(TBluetoothDeviceDialog::EDeviceClass)).toDouble(); |
124 HbIcon icon = getBadgedDeviceTypeIcon(classOfDevice); |
124 HbIcon icon = getBadgedDeviceTypeIcon(classOfDevice); |
125 mMessageBox->setIcon(icon); |
125 mMessageBox->setIcon(icon); |
126 mMessageBox->setDismissPolicy(HbPopup::NoDismiss); |
126 mMessageBox->setDismissPolicy(HbPopup::NoDismiss); |
127 connect(mMessageBox, SIGNAL(finished(HbAction*)), this, SLOT(messageBoxClosed(HbAction*))); |
127 connect(mMessageBox, SIGNAL(finished(int)), this, SLOT(messageBoxClosed(int))); |
128 }break; |
128 }break; |
129 |
129 |
130 case TBluetoothDialogParams::EMemoryFull: |
130 case TBluetoothDialogParams::EMemoryFull: |
131 { |
131 { |
132 mMessageBox = new HbMessageBox(HbMessageBox::MessageTypeWarning); |
132 mMessageBox = new HbMessageBox(HbMessageBox::MessageTypeWarning); |
133 QString textStr(hbTrId("txt_error_info_memory_full_delete_data")); |
133 QString textStr(hbTrId("txt_error_info_memory_full_delete_data")); |
134 QString driveLetter(parameters.value(QString::number(TBluetoothDeviceDialog::EDriveLetter)).toChar()); |
134 QString driveLetter(parameters.value(QString::number(TBluetoothDeviceDialog::EDriveLetter)).toChar()); |
135 QString driveName(parameters.value(QString::number(TBluetoothDeviceDialog::EDriveName)).toString()); |
135 QString driveName(parameters.value(QString::number(TBluetoothDeviceDialog::EDriveName)).toString()); |
136 mMessageBox->setText(textStr.arg(driveLetter).arg(driveName)); |
136 mMessageBox->setText(textStr.arg(driveLetter).arg(driveName)); |
137 mMessageBox->setDismissPolicy(HbPopup::NoDismiss); |
137 mMessageBox->setDismissPolicy(HbPopup::NoDismiss); |
138 connect(mMessageBox, SIGNAL(finished(HbAction*)), this, SLOT(messageBoxClosed(HbAction*))); |
138 connect(mMessageBox, SIGNAL(finished(int)), this, SLOT(messageBoxClosed(int))); |
139 }break; |
139 }break; |
140 |
140 |
141 case TBluetoothDialogParams::EDriveNotFound: |
141 case TBluetoothDialogParams::EDriveNotFound: |
142 { |
142 { |
143 mMessageBox = new HbMessageBox(HbMessageBox::MessageTypeWarning); |
143 mMessageBox = new HbMessageBox(HbMessageBox::MessageTypeWarning); |
144 mMessageBox->setText(hbTrId("txt_bt_info_file_not_fould_memory_card_has_been_r")); |
144 mMessageBox->setText(hbTrId("txt_bt_info_file_not_fould_memory_card_has_been_r")); |
145 mMessageBox->setDismissPolicy(HbPopup::NoDismiss); |
145 mMessageBox->setDismissPolicy(HbPopup::NoDismiss); |
146 connect(mMessageBox, SIGNAL(finished(HbAction*)), this, SLOT(messageBoxClosed(HbAction*))); |
146 connect(mMessageBox, SIGNAL(finished(int)), this, SLOT(messageBoxClosed(int))); |
147 }break; |
147 }break; |
148 |
148 |
149 case TBluetoothDialogParams::EFileMoved: |
149 case TBluetoothDialogParams::EFileMoved: |
150 { |
150 { |
151 mMessageBox = new HbMessageBox(HbMessageBox::MessageTypeWarning); |
151 mMessageBox = new HbMessageBox(HbMessageBox::MessageTypeWarning); |
152 mMessageBox->setText(hbTrId("txt_bt_info_file_not_fould_it_may_be_removed_or_d")); |
152 mMessageBox->setText(hbTrId("txt_bt_info_file_not_fould_it_may_be_removed_or_d")); |
153 mMessageBox->setDismissPolicy(HbPopup::NoDismiss); |
153 mMessageBox->setDismissPolicy(HbPopup::NoDismiss); |
154 connect(mMessageBox, SIGNAL(finished(HbAction*)), this, SLOT(messageBoxClosed(HbAction*))); |
154 connect(mMessageBox, SIGNAL(finished(int)), this, SLOT(messageBoxClosed(int))); |
155 }break; |
155 }break; |
156 |
156 |
157 case TBluetoothDialogParams::EUnsupportedImages: |
157 case TBluetoothDialogParams::EUnsupportedImages: |
158 { |
158 { |
159 mMessageBox = new HbMessageBox(HbMessageBox::MessageTypeQuestion); |
159 mMessageBox = new HbMessageBox(HbMessageBox::MessageTypeQuestion); |
162 mMessageBox->setStandardButtons(HbMessageBox::Continue| HbMessageBox::Cancel); |
162 mMessageBox->setStandardButtons(HbMessageBox::Continue| HbMessageBox::Cancel); |
163 int classOfDevice = parameters.value(QString::number(TBluetoothDeviceDialog::EDeviceClass)).toDouble(); |
163 int classOfDevice = parameters.value(QString::number(TBluetoothDeviceDialog::EDeviceClass)).toDouble(); |
164 HbIcon icon = getBadgedDeviceTypeIcon(classOfDevice); |
164 HbIcon icon = getBadgedDeviceTypeIcon(classOfDevice); |
165 mMessageBox->setIcon(icon); |
165 mMessageBox->setIcon(icon); |
166 mMessageBox->setDismissPolicy(HbPopup::NoDismiss); |
166 mMessageBox->setDismissPolicy(HbPopup::NoDismiss); |
|
167 connect(mMessageBox, SIGNAL(finished(int)), this, SLOT(messageBoxClosed(int))); |
|
168 }break; |
|
169 |
|
170 case TBluetoothDialogParams::ECannotUseSAPTemporarily: |
|
171 { |
|
172 mMessageBox = new HbMessageBox(HbMessageBox::MessageTypeInformation); |
|
173 mMessageBox->setText(hbTrId("txt_bt_info_sim_access_profile_is_used_next_time_t")); |
|
174 mMessageBox->setDismissPolicy(HbPopup::TapOutside); |
|
175 mMessageBox->setTimeout(HbPopup::StandardTimeout); |
|
176 connect(mMessageBox, SIGNAL(finished(int)), this, SLOT(messageBoxClosed(int))); |
|
177 }break; |
|
178 |
|
179 case TBluetoothDialogParams::ENoSimInDevice: |
|
180 { |
|
181 mMessageBox = new HbMessageBox(HbMessageBox::MessageTypeQuestion); |
|
182 mMessageBox->setHeadingWidget(new HbLabel(hbTrId("txt_bt_title_no_sim_card_in_the_device"))); |
|
183 mMessageBox->setText(hbTrId("txt_bt_info_do_you_still_want_to_enable_sim_access")); |
|
184 mMessageBox->setStandardButtons(HbMessageBox::Yes | HbMessageBox::No); |
|
185 mMessageBox->setDismissPolicy(HbPopup::TapOutside); |
|
186 mMessageBox->setTimeout(HbPopup::StandardTimeout); |
|
187 connect(mMessageBox, SIGNAL(finished(int)), this, SLOT(messageBoxClosed(int))); |
|
188 }break; |
|
189 |
|
190 case TBluetoothDialogParams::EUnableToUseSAP: |
|
191 { |
|
192 mMessageBox = new HbMessageBox(HbMessageBox::MessageTypeQuestion); |
|
193 mMessageBox->setHeadingWidget(new HbLabel(hbTrId("txt_bt_title_unable_to_enter_sim_access_profile"))); |
|
194 mMessageBox->setText(hbTrId("txt_bt_info_try_entering_the_sim_access_profile_ag")); |
|
195 mMessageBox->setStandardButtons(HbMessageBox::Yes | HbMessageBox::No); |
|
196 mMessageBox->setDismissPolicy(HbPopup::TapOutside); |
|
197 mMessageBox->setTimeout(HbPopup::StandardTimeout); |
167 connect(mMessageBox, SIGNAL(finished(int)), this, SLOT(messageBoxClosed(int))); |
198 connect(mMessageBox, SIGNAL(finished(int)), this, SLOT(messageBoxClosed(int))); |
168 }break; |
199 }break; |
169 |
200 |
170 default: |
201 default: |
171 mLastError = UnknownDeviceDialogError; |
202 mLastError = UnknownDeviceDialogError; |
186 mMessageBox->setStandardButtons(HbMessageBox::Yes | HbMessageBox::No); |
217 mMessageBox->setStandardButtons(HbMessageBox::Yes | HbMessageBox::No); |
187 HbIcon icon(QString("qtg_large_bluetooth")); |
218 HbIcon icon(QString("qtg_large_bluetooth")); |
188 mMessageBox->setIcon(icon); |
219 mMessageBox->setIcon(icon); |
189 mMessageBox->setTimeout(timeOut); |
220 mMessageBox->setTimeout(timeOut); |
190 connect(mMessageBox, SIGNAL(finished(int)), this, SLOT(messageBoxClosed(int))); |
221 connect(mMessageBox, SIGNAL(finished(int)), this, SLOT(messageBoxClosed(int))); |
191 connect(mMessageBox, SIGNAL(finished(HbAction*)), this, SLOT(messageBoxClosed(HbAction*))); |
|
192 }break; |
222 }break; |
193 |
223 |
194 default: |
224 default: |
195 mLastError = UnknownDeviceDialogError; |
225 mLastError = UnknownDeviceDialogError; |
196 break; |
226 break; |