Home · All Classes · Main Classes · Deprecated

Music Catalogue example application - fillOutData() implementation

/***************************************************************************
**
** Copyright (C) 2010, 2011 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (directui@nokia.com)
**
** This file is part of libmeegotouch.
**
** If you have questions regarding the use of this file, please contact
** Nokia at directui@nokia.com.
**
** This library is free software; you can redistribute it and/or
** modify it under the terms of the GNU Lesser General Public
** License version 2.1 as published by the Free Software Foundation
** and appearing in the file LICENSE.LGPL included in the packaging
** of this file.
**
****************************************************************************/
// Enters some hardcoded sample data
// Make sure you have a "album_cover.jpg" in the directory
// where you run your sample application.
void fillOutData(QList<Artist *> &artistList)
{
    Artist *artist;
    Album *album;

    artist = new Artist;
    artist->name = "The Beatles";

    album = new Album;
    album->title = "Sgt. Pepper's Lonely Hearts Club Band";
    album->artist = "The Beatles";
    album->coverArtFilename = "album_cover.jpg";
    album->songs << "Sgt. Pepper's Lonely Hearts Club Band";
    album->songs << "With a Little Help from My Friends";
    album->songs << "Lucy in the Sky with Diamonds";
    album->songs << "Getting Better";
    album->songs << "Fixing a Hole";
    album->songs << "She's Leaving Home";
    album->songs << "Being for the Benefit of Mr. Kite!";
    artist->albums << album;

    album = new Album;
    album->title = "Yellow Submarine";
    album->artist = "The Beatles";
    album->coverArtFilename = "album_cover.jpg";
    album->songs << "Yellow Submarine";
    album->songs << "Only a Northern Song";
    album->songs << "All Together Now";
    album->songs << "Hey Bulldog";
    album->songs << "It's All Too Much";
    album->songs << "All You Need Is Love";
    artist->albums << album;

    album = new Album;
    album->title = "Abbey Road";
    album->artist = "The Beatles";
    album->coverArtFilename = "album_cover.jpg";
    album->songs << "Come Together";
    album->songs << "Something";
    album->songs << "Maxwell's Silver Hammer";
    album->songs << "Oh! Darling";
    album->songs << "Octopus's Garden";
    album->songs << "I Want You (She's So Heavy)";
    artist->albums << album;

    artistList << artist;



    artist = new Artist;
    artist->name = "Led Zeppelin";

    album = new Album;
    album->title = "Physical Graffiti";
    album->artist = "Led Zeppelin";
    album->coverArtFilename = "album_cover.jpg";
    album->songs << "Custard Pie";
    album->songs << "The Rover";
    album->songs << "In My Time of Dying";
    album->songs << "Houses of the Holy";
    album->songs << "Trampled Under Foot";
    album->songs << "Kashmir";
    artist->albums << album;

    album = new Album;
    album->title = "Houses of the Holy";
    album->artist = "Led Zeppelin";
    album->coverArtFilename = "album_cover.jpg";
    album->songs << "The Song Remains the Same";
    album->songs << "The Rain Song";
    album->songs << "Over the Hills and Far Away";
    album->songs << "The Crunge";
    album->songs << "Dancing Days";
    album->songs << "D'yer Mak'er";
    album->songs << "No Quarter";
    album->songs << "The Ocean";
    artist->albums << album;

    album = new Album;
    album->title = "Presence";
    album->artist = "Led Zeppelin";
    album->coverArtFilename = "album_cover.jpg";
    album->songs << "Achilles Last Stand";
    album->songs << "For Your Life";
    album->songs << "Royal Orleans";
    album->songs << "Nobody's Fault but Mine";
    album->songs << "Candy Store Rock";
    album->songs << "Hots On for Nowhere";
    album->songs << "Tea for One";
    artist->albums << album;

    artistList << artist;
}

Copyright © 2010 Nokia Corporation
MeeGo Touch