42 // ---------------------------------------------------------------------------- |
42 // ---------------------------------------------------------------------------- |
43 // |
43 // |
44 SifUiDialog::SifUiDialog(const QVariantMap ¶meters) : HbDialog(), |
44 SifUiDialog::SifUiDialog(const QVariantMap ¶meters) : HbDialog(), |
45 mCommonTranslator(0), mSifUITranslator(0), mLastDialogError(KErrNone), |
45 mCommonTranslator(0), mSifUITranslator(0), mLastDialogError(KErrNone), |
46 mShowEventReceived(false), mDialogType(SifUiUnspecifiedDialog), |
46 mShowEventReceived(false), mDialogType(SifUiUnspecifiedDialog), |
47 mTitle(0), mContent(0), mResultMap(), mPrimaryAction(0), |
47 mTitle(0), mContent(0), mPrimaryAction(0), mSecondaryAction(0), |
48 mSecondaryAction(0), mIndicator(0), mSubscriber(0) |
48 mResultMap(), mIndicator(0), mSubscriber(0) |
49 { |
49 { |
50 mCommonTranslator = new HbTranslator(KTranslationsPath, KCommonTranslationsFile); |
50 mCommonTranslator = new HbTranslator(KTranslationsPath, KCommonTranslationsFile); |
51 mSifUITranslator = new HbTranslator(KTranslationsPath, KSifUiTranslationsFile); |
51 mSifUITranslator = new HbTranslator(KTranslationsPath, KSifUiTranslationsFile); |
52 constructDialog(parameters); |
52 constructDialog(parameters); |
53 } |
53 } |
181 mTitle->constructFromParameters(parameters); |
181 mTitle->constructFromParameters(parameters); |
182 setHeadingWidget(mTitle); |
182 setHeadingWidget(mTitle); |
183 |
183 |
184 Q_ASSERT(mContent == 0); |
184 Q_ASSERT(mContent == 0); |
185 mContent = new SifUiDialogContentWidget(this); |
185 mContent = new SifUiDialogContentWidget(this); |
186 mContent->constructFromParameters(parameters); |
|
187 connect(mContent, SIGNAL(memorySelectionChanged(const QChar &)), |
186 connect(mContent, SIGNAL(memorySelectionChanged(const QChar &)), |
188 this, SLOT(handleMemorySelectionChanged(const QChar &))); |
187 this, SLOT(handleMemorySelectionChanged(const QChar &))); |
|
188 mContent->constructFromParameters(parameters); |
189 setContentWidget(mContent); |
189 setContentWidget(mContent); |
190 |
190 |
191 updateButtons(parameters); |
191 updateButtons(parameters); |
192 |
192 |
193 return true; |
193 return true; |
303 // SifUiDialog::sendResult() |
303 // SifUiDialog::sendResult() |
304 // ---------------------------------------------------------------------------- |
304 // ---------------------------------------------------------------------------- |
305 // |
305 // |
306 void SifUiDialog::sendResult(SifUiDeviceDialogReturnValue value) |
306 void SifUiDialog::sendResult(SifUiDeviceDialogReturnValue value) |
307 { |
307 { |
308 QVariant returnValue(value); |
308 mResultMap[KSifUiQueryReturnValue] = QVariant(value); |
309 mResultMap.insert(KSifUiQueryReturnValue, returnValue); |
|
310 emit deviceDialogData(mResultMap); |
309 emit deviceDialogData(mResultMap); |
311 } |
310 } |
312 |
311 |
313 // ---------------------------------------------------------------------------- |
312 // ---------------------------------------------------------------------------- |
314 // SifUiDialog::handleAccepted() |
313 // SifUiDialog::handleAccepted() |
334 // SifUiDialog::handleMemorySelectionChanged() |
333 // SifUiDialog::handleMemorySelectionChanged() |
335 // ---------------------------------------------------------------------------- |
334 // ---------------------------------------------------------------------------- |
336 // |
335 // |
337 void SifUiDialog::handleMemorySelectionChanged(const QChar &driveLetter) |
336 void SifUiDialog::handleMemorySelectionChanged(const QChar &driveLetter) |
338 { |
337 { |
339 QVariant memorySelection(driveLetter); |
338 mResultMap[KSifUiSelectedMemory] = QVariant(driveLetter); |
340 mResultMap.insert(KSifUiSelectedMemory, memorySelection); |
339 emit deviceDialogData(mResultMap); |
341 } |
340 } |
342 |
341 |
343 // ---------------------------------------------------------------------------- |
342 // ---------------------------------------------------------------------------- |
344 // SifUiDialog::handleHidePressed() |
343 // SifUiDialog::handleHidePressed() |
345 // ---------------------------------------------------------------------------- |
344 // ---------------------------------------------------------------------------- |