×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Regular Contributor
    Join Date
    Apr 2008
    Posts
    445

    Show and select photo gallery

    Hi,

    How can I start the N9 photo gallery, let the user select a picture, and go back to my application? In Symbian there is the MGFetch api which works fine with Qt - is there some equivalent for Meego?

    Regards,

  2. #2
    Super Contributor
    Join Date
    Oct 2008
    Location
    INDIA
    Posts
    2,326

    Re: Show and select photo gallery

    What about media browser : PhotoView

    Photo Viewer using QML : Photo Viewer

    regards,
    rahul

  3. #3
    Registered User
    Join Date
    Dec 2011
    Posts
    3

    Re: Show and select photo gallery

    Here there is a good working example of how to embed Nokia's GalleryCore library widgets to invoke the pictures grid and select an item:
    https://meego.gitorious.org/meegotou...inesslogic.cpp
    https://meego.gitorious.org/meegotou...usinesslogic.h

    Basically, create an image content provider as in:
    https://meego.gitorious.org/meegotou...ntprovider.cpp
    https://meego.gitorious.org/meegotou...tentprovider.h
    https://meego.gitorious.org/meegotou...ntprovider_p.h

    And, then, create a GalleryModel feeded with this image content provider:
    Code:
    ...
        m_GalleryModel = new GalleryModel (this);
        m_ImageContentProvider = new ImageContentProvider (*m_GalleryModel);
        m_GalleryModel->addContentProvider (m_ImageContentProvider);
        m_GalleryGridPage = new GalleryGridPage (*m_GalleryModel);
        m_GalleryGridPage->setMemorySavingMode (true);
        m_GalleryGridPage->setStyleName(
                QLatin1String("CommonApplicationPageInverted"));
        m_GalleryGridPage->selectItem();
    ...
        connect (m_GalleryGridPage, SIGNAL(itemSelected(QUrl)), 
                this, SLOT(onGridPageItemSelected(QUrl)));
        connect (m_GalleryGridPage, SIGNAL(singleSelectionCancelled()), 
                this, SLOT(onGridPageCancelled()));
    ...
    Then, make the GalleryPage to appear in this way:
    Code:
    ...
        if (m_GalleryGridPage)
            m_GalleryGridPage->sheet().appear (
                    MApplication::instance()->activeWindow(), 
                    MSceneWindow::KeepWhenDone);
    ...
    Then, just handle the emitted signals:
    Code:
    ...
    void 
    MyObject::onGridPageItemSelected (
            QUrl    url)
    {
    
        // Whatever I want to do with the "url"
    
    }
    
    void 
    MyObject::onGridPageCancelled ()
    {
        if (m_GalleryGridPage)
            m_GalleryGridPage->sheet().disappear();
    }
    ...

Similar Threads

  1. Photo gallery application
    By rahulvala in forum [Archived] Qt Quick
    Replies: 4
    Last Post: 2011-07-29, 13:28
  2. Photo gallery picker possible ?
    By lxbach in forum Symbian Media (Closed)
    Replies: 7
    Last Post: 2011-02-02, 17:46
  3. Choose photo from gallery
    By sumeshchakra in forum Mobile Java General
    Replies: 4
    Last Post: 2010-04-20, 06:16
  4. Getting photo from Image gallery
    By nuker85 in forum Mobile Java Media (Graphics & Sounds)
    Replies: 3
    Last Post: 2009-07-28, 18:40
  5. Photo Gallery
    By whythetorment in forum [Archived] Flash Lite on Nokia Devices
    Replies: 4
    Last Post: 2009-01-15, 07:51

Posting Permissions

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