Chapter 23. MP3 Jukebox Assignments

Table of Contents

23.1. Phonon/MultiMediaKit Setup
23.2. Playlist
23.3. Playlists
23.4. Source Selector
23.5. Database Playlists
23.6. Star Delegates
23.7. Sorting, Filtering, Editing Playlists

[ fromfile: homework/mp3mgr.xml id: mp3mgr ]

Abstract

In the assignments in this chapter, you will write, in stages, a main window program that serves as an MP3 playlist generator and database manager. It will generate and play selections of MP3 songs, based on what it can find on your file system and it will permit filter-queries based on data stored in ID3v2 (meta) tag information.

Prerequisites: You can start on this once you have covered the material up to Chapter 13.

The features you will implement are inspired by open source programs such as amaroK and aTunes, and commercial programs such as iTunes and MusicMatch Jukebox. These programs all provide similar features, but very different user interfaces. There is a lot of creativity that can go into a player. Few of them are equally easy to use with a keyboard or a mouse. Try to make yours work with either.

You can find an example of a media player in $QTDIR/examples/phonon/qmusicplayer and use it as a starting point. Then you can add extra components to it as you work through the following assignments. As of this writing, qmusicplayer lets you add files to a playlist and play the list of songs on your computer.

Figure 23.1.  Example Screenshot

Example Screenshot

The simplest media player, shown in Figure 23.1 has two major components:

Each of these components is a view for displaying the data, and it is suggested you use separate classes to hold the actual data, maintaining a separation between model and view code.