appinstaller/AppinstUi/sifuidevicedialogplugin/src/sifuidialog.cpp
changeset 29 26b6f0522fd8
parent 25 98b66e4fb0be
child 33 8110bf1194d1
equal deleted inserted replaced
25:98b66e4fb0be 29:26b6f0522fd8
    66 // ----------------------------------------------------------------------------
    66 // ----------------------------------------------------------------------------
    67 //
    67 //
    68 SifUiDeviceDialogType SifUiDialog::dialogType(const QVariantMap &parameters)
    68 SifUiDeviceDialogType SifUiDialog::dialogType(const QVariantMap &parameters)
    69 {
    69 {
    70     SifUiDeviceDialogType type = SifUiUnspecifiedDialog;
    70     SifUiDeviceDialogType type = SifUiUnspecifiedDialog;
    71     if (parameters.contains(KeySifUiDialogType)) {
    71     if (parameters.contains(KSifUiDialogType)) {
    72         type = static_cast<SifUiDeviceDialogType>(parameters.value(KeySifUiDialogType).toInt());
    72         type = static_cast<SifUiDeviceDialogType>(parameters.value(KSifUiDialogType).toInt());
    73         Q_ASSERT(type == SifUiConfirmationQuery || type == SifUiProgressNote ||
    73         Q_ASSERT(type == SifUiConfirmationQuery || type == SifUiProgressNote ||
    74             type == SifUiCompleteNote || type == SifUiErrorNote);
    74             type == SifUiCompleteNote || type == SifUiErrorNote);
    75     }
    75     }
    76     return type;
    76     return type;
    77 }
       
    78 
       
    79 // ----------------------------------------------------------------------------
       
    80 // SifUiDialog::dialogMode()
       
    81 // ----------------------------------------------------------------------------
       
    82 //
       
    83 SifUiDeviceDialogMode SifUiDialog::dialogMode(const QVariantMap &parameters)
       
    84 {
       
    85     SifUiDeviceDialogMode mode = SifUiUnspecified;
       
    86     if (parameters.contains(KSifUiDialogMode)) {
       
    87         mode = static_cast<SifUiDeviceDialogMode>(parameters.value(KSifUiDialogMode).toInt());
       
    88         Q_ASSERT(mode == SifUiInstalling || mode == SifUiUninstalling);
       
    89     }
       
    90     return mode;
       
    91 }
    77 }
    92 
    78 
    93 // ----------------------------------------------------------------------------
    79 // ----------------------------------------------------------------------------
    94 // SifUiDialog::setDeviceDialogParameters()
    80 // SifUiDialog::setDeviceDialogParameters()
    95 // ----------------------------------------------------------------------------
    81 // ----------------------------------------------------------------------------
   217 
   203 
   218     // Content
   204     // Content
   219     Q_ASSERT(mContent == 0);
   205     Q_ASSERT(mContent == 0);
   220     mContent = new SifUiDialogContentWidget(this);
   206     mContent = new SifUiDialogContentWidget(this);
   221     mContent->constructFromParameters(parameters);
   207     mContent->constructFromParameters(parameters);
   222     connect(mContent, SIGNAL(memorySelectionChanged(const QString &)),
   208     connect(mContent, SIGNAL(memorySelectionChanged(const QChar &)),
   223             this, SLOT(handleMemorySelectionChanged(const QString &)));
   209             this, SLOT(handleMemorySelectionChanged(const QChar &)));
   224     setContentWidget(mContent);
   210     setContentWidget(mContent);
   225 
   211 
   226     // Buttons
   212     // Buttons
   227     // build error in wk10: 
       
   228     // Error: #20: identifier "mConfirmInstallAction" is undefined
       
   229     //Q_ASSERT(mConfirmInstallAction == 0);
       
   230     updateButtons();
   213     updateButtons();
   231 
   214 
   232     return true;
   215     return true;
   233 }
   216 }
   234 
   217 
   373 
   356 
   374 // ----------------------------------------------------------------------------
   357 // ----------------------------------------------------------------------------
   375 // SifUiDialog::handleMemorySelectionChanged()
   358 // SifUiDialog::handleMemorySelectionChanged()
   376 // ----------------------------------------------------------------------------
   359 // ----------------------------------------------------------------------------
   377 //
   360 //
   378 void SifUiDialog::handleMemorySelectionChanged(const QString &text)
   361 void SifUiDialog::handleMemorySelectionChanged(const QChar &driveLetter)
   379 {
   362 {
   380     QVariant memorySelection(text);
   363     QVariant memorySelection(driveLetter);
   381     mResultMap.insert(KSifUiSelectedMemoryIndex, memorySelection);
   364     mResultMap.insert(KSifUiSelectedMemory, memorySelection);
   382 }
   365 }
   383 
   366 
   384 // ----------------------------------------------------------------------------
   367 // ----------------------------------------------------------------------------
   385 // SifUiDialog::handleDisplayCertificateDetails()
   368 // SifUiDialog::handleDisplayCertificateDetails()
   386 // ----------------------------------------------------------------------------
   369 // ----------------------------------------------------------------------------
   387 //
   370 //
   388 void SifUiDialog::handleDisplayCertificateDetails()
   371 void SifUiDialog::handleDisplayCertificateDetails()
   389 {
   372 {
   390     // TODO: display certificate details dialog
   373     // TODO: display certificate details, or the following note:
   391     HbMessageBox::warning(tr("Not implemented yet"));
   374     HbMessageBox::warning(tr("Application is not certified. It's origin and authenticity cannot be proved."));
   392 }
   375 }
   393 
   376 
   394 // ----------------------------------------------------------------------------
   377 // ----------------------------------------------------------------------------
   395 // SifUiDialog::handleHidePressed()
   378 // SifUiDialog::handleHidePressed()
   396 // ----------------------------------------------------------------------------
   379 // ----------------------------------------------------------------------------