×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    May 2009
    Location
    Paraguay - Ciudad del Este
    Posts
    40

    Get list of all images using Qt for S60

    Hi devs,

    Is there any way to get the list of all images on the mobile phone using Qt? (or another way). Something like the Gallery, that list all the images inside the phone.

    The Qt demo applications "Desktop Services", lists the images on a specific folder, i'm looking a way to list in the "Desktop Services" all the images inside the phone.

    Thanks.

  2. #2
    Registered User
    Join Date
    Oct 2008
    Location
    Mexico
    Posts
    40

    Re: Get list of all images using Qt for S60

    You might use something like this (with some modifications to make it recursively along the phone tree structure):

    void QSimpleImageViewer::searchImagesFromDir(QString path)
    {
    // Read all .jpg image paths from the c:/data/images folder
    imageIndex = 0;

    QDir dir;
    dir.setFilter(QDir::Files | QDir:: Dirs);
    dir.setPath(path);

    QFileInfoList list = dir.entryInfoList();
    for (int i = 0; i < list.size(); ++i)
    {
    QFileInfo fileInfo = list.at(i);
    if (fileInfo.isFile())
    {
    QString s = fileInfo.filePath();
    if (s.indexOf(QString(".jpg"),0,Qt::CaseInsensitive)>0)
    {
    imageList.append(s); //imageLists is a QStringList

    }
    }
    }
    }


    See the complete example under http://www.forum.nokia.com/info/sw.n...r_Example.html

    Cheers!!

  3. #3
    Nokia Developer Moderator
    Join Date
    Jun 2008
    Location
    Tampere
    Posts
    833

    Re: Get list of all images using Qt for S60

    Hi,

    I don't know if such API exists, but at least you can get all the pictures from the gallery using mobile extension's Media API (XQMedia)

    Best regards,
    Ilkka

  4. #4
    Registered User
    Join Date
    May 2009
    Location
    Paraguay - Ciudad del Este
    Posts
    40

    Re: Get list of all images using Qt for S60

    Thanks.

    XQMedia did the trick easily.

Similar Threads

  1. Using the font from setting list in custom listbox
    By alav in forum Symbian User Interface
    Replies: 1
    Last Post: 2008-11-05, 17:17
  2. Problem with Skin enabling - disabling and Setting List in S60
    By sauvikds in forum Series 40 & S60 Platform Feedback Archive
    Replies: 6
    Last Post: 2008-08-23, 14:29
  3. Load file Images into a List!
    By sandro1972 in forum Mobile Java Media (Graphics & Sounds)
    Replies: 3
    Last Post: 2008-01-09, 23:16
  4. Enable Skin with Custom List Box
    By hmleung in forum Symbian User Interface
    Replies: 5
    Last Post: 2007-11-12, 09:55

Posting Permissions

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