Table of contents:

  • Widgets (Chapter 11)
  • Signals and slots (Section 9.3.3)
  • QProcess (Section 12.1)

The minimal MP3 player view has the following features:

  • Buttons: play, stop, next, and previous
  • Sliders: volume control and song progress
  • Label: to display "now playing" information

An example Mp3Player class based on Figure 25.7 is supplied to you. This particular implementation works by creating QProcess objects, running command-line programs, passing options, parsing the output, and displaying information based on it. It uses mpg321[3](for MP3 decoding) and alsaplayer[4](for volume control). You can reuse this class if you are using Linux.



Figure 25.7. Mp3Player


Write another Mp3Player-derived class, better suited to your own platform or personal needs. It can be based on or, two open-source libraries for playing media files. Alternately, you can write it as a plugin for an already existing media player, such as xmms or Winamp.


Write a front-end to this Mp3Player class that allows you to load songs, start/stop, change volume, and see the play progress advance in the slider.


Enhance Mp3Player and PlayerView so that you can change the position of the song playing by manipulating the song progress slider.

Part I: Introduction to C++ and Qt 4

C++ Introduction


Introduction to Qt



Inheritance and Polymorphism

Part II: Higher-Level Programming


Introduction to Design Patterns


Generics and Containers

Qt GUI Widgets


Validation and Regular Expressions

Parsing XML

Meta Objects, Properties, and Reflective Programming

More Design Patterns

Models and Views

Qt SQL Classes

Part III: C++ Language Reference

Types and Expressions

Scope and Storage Class

Statements and Control Structures

Memory Access

Chapter Summary

Inheritance in Detail

Miscellaneous Topics

Part IV: Programming Assignments

MP3 Jukebox Assignments

Part V: Appendices

MP3 Jukebox Assignments


MP3 Jukebox Assignments

An Introduction to Design Patterns in C++ with Qt 4
An Introduction to Design Patterns in C++ with Qt 4
ISBN: 0131879057
EAN: 2147483647
Year: 2004
Pages: 268 © 2008-2020.
If you may any questions please contact us: