×

Discussion Board

Results 1 to 10 of 10
  1. #1
    Registered User
    Join Date
    Nov 2010
    Posts
    79

    How to get list of all icon of installed application on symbian device in QT?

    Hello Friend,

    I am working with QT application in which i have to show icon of application which installed of device .

    can any one help me .How to get icon of application.

    I will be very thankful for replay
    amit sharma

  2. #2
    Regular Contributor
    Join Date
    May 2010
    Posts
    362

    Re: How to get list of all icon of installed application on symbian device in QT?

    You are trying to do a very complex application.

    I believe you would need AllFiles capability to read the icon files, and even then it might not be possible - I have not done this my self.
    Also the icons are stored in .MIF file format which you can't show in Qt by default.

    And if you are thinking of actually launching the application and showing the icon before that - that would be very difficult, if not impossible, to do as well.

  3. #3
    Regular Contributor
    Join Date
    May 2010
    Posts
    362

    Re: How to get list of all icon of installed application on symbian device in QT?

    And just to clarify; you can launch other applications. But showing the icons is most likely impossible.

    Please see:
    http://wiki.forum.nokia.com/index.ph...ications_in_Qt

    And also this deprecated example:
    http://wiki.forum.nokia.com/index.ph..._its_UID_in_Qt

  4. #4
    Super Contributor
    Join Date
    Oct 2007
    Location
    જુનાગઢ - India
    Posts
    3,034

    Re: How to get list of all icon of installed application on symbian device in QT?

    AFAIK no API is available in Qt for getting application icons of installed applications. But if i am not wrong then you can get it using Symbian API without AllFiles capability.

    1)Get UID's of installed applications.
    2)Using UID get icon of that application using RApaLsSession::GetAppIcon().

  5. #5
    Regular Contributor
    Join Date
    May 2010
    Posts
    362

    Re: How to get list of all icon of installed application on symbian device in QT?

    I stand corrected

    Still I believe showing the icon in Qt might be problematic?

  6. #6
    Nokia Developer Expert
    Join Date
    Feb 2008
    Posts
    183

    Re: How to get list of all icon of installed application on symbian device in QT?

    No, it should work fine. I'd prefer creating the app icon with AknsUtils::CreateAppIconLC to get CFbsBitmaps for mask and actual icon separately,
    then call QPixmap::fromSymbianCFbsBitmap to convert those to QPixmaps. AFAIK, there is no direct conversion method for CAknMaskedBitmaps.
    For example (un-tested code):

    Code:
    //here uid is the appUID you wish to have the icon from
    MAknsSkinInstance* skin = AknsUtils::SkinInstance();
    TSize targetSize(10,10);
    CFbsBitmap *icon = 0;
    CFbsBitmap *mask = 0;
    AknsUtils::CreateAppIconLC(skin, uid, EAknsAppIconTypeList , icon, mask);
    QPixmap pixmap = 0;
    if (icon) {
        AknIconUtils::DisableCompression(icon);
        TInt error = AknIconUtils::SetSize(icon, targetSize, EAspectRatioNotPreserved);
        if (!error)
            pixmap = QPixmap::fromSymbianCFbsBitmap(icon);
    }
    if (mask && !pixmap.isNull) {
        AknIconUtils::DisableCompression(mask);
        TInt error = AknIconUtils::SetSize(mask, targetSize, EAspectRatioNotPreserved);
        if (!error)
            pixmap.setAlphaChannel(QPixmap::fromSymbianCFbsBitmap(mask));
    }

  7. #7
    Registered User
    Join Date
    Nov 2010
    Posts
    79

    Re: How to get list of all icon of installed application on symbian device in QT?

    Thanks for reply....
    but given code having error like :
    "undefiend refference to AknIconUtils:isableCompression(icon)"

    do you have any solution of this error ?

    i will be very thankful for your reply...

  8. #8
    Super Contributor
    Join Date
    Mar 2004
    Location
    Singapore
    Posts
    9,968

    Re: How to get list of all icon of installed application on symbian device in QT?

    "undefiend refference to AknIconUtils:isableCompression(icon)"
    is liker error have you added the libs to pro file.

  9. #9
    Registered User
    Join Date
    Nov 2010
    Posts
    79

    Re: How to get list of all icon of installed application on symbian device in QT?

    thank you very much Fuzzbender. now i am getting icon of application.

  10. #10
    Registered User
    Join Date
    Nov 2010
    Posts
    79

    Re: How to get list of all icon of installed application on symbian device in QT?

    Thanks for reply ,
    now i am getting icon image of application.
    here is the code
    --------------------------------------

    //--------------new implementation-----------------
    TUid uid ={0xA89FA522};
    MAknsSkinInstance* skin = AknsUtils::SkinInstance();
    TSize targetSize(80,80);
    CFbsBitmap *icon = 0;
    CFbsBitmap *mask = 0;
    AknsUtils::CreateAppIconLC(skin, uid, EAknsAppIconTypeList , icon, mask);
    QPixmap pixmap = 0;
    if (icon) {
    AknIconUtils:isableCompression(icon);
    TInt error = AknIconUtils::SetSize(icon, targetSize, EAspectRatioNotPreserved);
    if (!error)
    pixmap = QPixmap::fromSymbianCFbsBitmap(icon);
    }
    if (mask && !pixmap.isNull()) {
    AknIconUtils:isableCompression(mask);
    TInt error = AknIconUtils::SetSize(mask, targetSize, EAspectRatioNotPreserved);
    if (!error)
    pixmap.setAlphaChannel(QPixmap::fromSymbianCFbsBitmap(mask));
    }
    label->setPixmap(pixmap);


    // here your icon is in pixmap and now you can put this pixmap into lable to show icon of application.

Similar Threads

  1. Replies: 1
    Last Post: 2011-04-25, 16:33
  2. Replies: 6
    Last Post: 2010-01-14, 16:41
  3. Replies: 1
    Last Post: 2009-01-14, 04:11
  4. How to get list of all bluetooth services provided by my device
    By vinaykk in forum Bluetooth Technology
    Replies: 1
    Last Post: 2008-05-22, 21:17
  5. Replies: 1
    Last Post: 2004-04-29, 20:44

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×