Пример #1
0
void KobeMenu::initConnect()
{
    connect(help_action, SIGNAL(clicked()), this, SLOT(forumHelp()));
    connect(help_action, SIGNAL(clicked()), p_mainwindow, SLOT(newFeatures()));
    connect(help_action, SIGNAL(clicked()), p_mainwindow, SLOT(questionFeedback()));
    connect(help_action, SIGNAL(clicked()), p_mainwindow, SLOT(setupConfigure()));
    connect(help_action, SIGNAL(clicked()), p_mainwindow, SLOT(aboutUs()));
}
Пример #2
0
// -----------------------------------------------------------------------------
// ShowTypedQueryL
// Shows list query and returns the user selection.
// -----------------------------------------------------------------------------
//
TUid CSendUiImpl::ShowTypedQueryL(
    CSendUi::TSendUiMenuType    aMenuType,
    const CMessageData*         aMessageData,
    TSendingCapabilities        aRequiredCapabilities,
    CArrayFix<TUid>*            aServicesToDim,
    const TDesC&                aTitleText )
{
    // Implemented for CR # 401-1806 >>
    // This section to enable/disable features (supported by feature manager) at run time, is to be revised,
    // once an observer class is available from feature manager side to intimate about feature state

    CRepository* repository = CRepository::NewLC( KCRUidSendUi );
    TInt oldFeatures(0);
    TInt newFeatures(0);
    TBool updateNeeded( EFalse );

    if ( repository->Get( KKeySendUiFeatureManagerServices, oldFeatures ) != KErrNone )
    {
        updateNeeded = ETrue;
    }
    FeatureManager::InitializeLibL();
    FeatureStatus( KFeatureIdMmsPostcard, newFeatures, KSendUiPostcard );
    FeatureStatus( KFeatureIdAudioMessaging, newFeatures, KSendUiAudioMessage );
    FeatureStatus( KFeatureIdSenduiMmsUpload, newFeatures, KSendUiMmsUpload );
    FeatureManager::UnInitializeLib();
    if ( newFeatures != oldFeatures )
    {
        repository->Set( KKeySendUiFeatureManagerServices, newFeatures );
        updateNeeded = ETrue;
    }

    CleanupStack::PopAndDestroy( repository );

    RProperty propertyUpdateOperation;
    TRequestStatus status;
    if ( updateNeeded )
    {
        RProperty::Set(
            KPSUidSendUiProperty,
            KSendUiUpdateRequest,
            KSendUiUpdateRequested );
        User::LeaveIfError( propertyUpdateOperation.Attach( KPSUidSendUiProperty, KSendUiUpdateRequest ));
        propertyUpdateOperation.Subscribe( status );
        User::WaitForRequest(status);
        TInt value = KErrNone;
        if(propertyUpdateOperation.Get( value ) !=KErrNotFound && value == KSendUiUpdated )
        {
            TRAPD( err, GetServicesL() );
            if ( err )
            {
#ifdef _DEBUG
                TBuf<256> buf;
                buf.Format(_L("SendUi err"));
                User::InfoPrint(buf);
#endif
                TUid serviceId( KNullUid );
                return serviceId;
            }
        }
        propertyUpdateOperation.Close();
    }
    // Implemented for CR # 401-1806 <<
    // List items for list query.
    CDesCArrayFlat* listItems = new (ELeave) CDesCArrayFlat( KArrayGranularity );
    CleanupStack::PushL( listItems);

    // This array is used to map user selection to correct service.
    CArrayFix<TUid>* listItemUids =
        new ( ELeave ) CArrayFixFlat<TUid>( KArrayGranularity );
    CleanupStack::PushL( listItemUids );

    iServicesToDim->Reset();

    TInt i = 0;
    if ( aServicesToDim )
    {
        for ( i = 0; i < aServicesToDim->Count(); i++  )
        {
            iServicesToDim->AppendL( (*aServicesToDim)[i] );
        }
    }

    // Get and filter ECom based services.
    FilterServicesL(
        *listItems,
        *listItemUids,
        aRequiredCapabilities,
        aMessageData,
        aMenuType );

    TUid serviceId( KNullUid );
    if ( listItems->Count() > 0 )
    {
        // Show list query.
        SortListL( *listItems, *listItemUids );

        serviceId = ShowListQueryL(
                        listItems,
                        *listItemUids,
                        aTitleText,
                        aMenuType );
    }

    CleanupStack::PopAndDestroy( 2, listItems );  // listItemUids, listItems

    return serviceId;
}