CurrentTrackCommand

Stores information about a track.

Synopsis:

#include <qplayer/qplayer.h>

namespace QPlayer {

    class CurrentTrackCommand : public BaseCommand
    {
        Q_OBJECT

    public:

        explicit CurrentTrackCommand();
    
        inline Track result()
        {
            return m_result;
        }
    
        inline void setResult( Track result )
        {
            m_result = result;
        }
    
    signals:

        void complete( CurrentTrackCommand *command );
    
        void error( CurrentTrackCommand *command );
    
    };

}

Library:

libqplayer

Description:

Stores information about a track. When you create a CurrentTrackCommand object and pass in its reference in a getCurrentTrack() call, the library fills in this object with information on the track currently selected for playback. The object emits a complete signal to notify clients when the library finishes writing the track information. Clients can then call the result() method to retrieve the information.

If the getCurrentTrack() command fails, the object emits an error signal. You can then call errorMessage() to retrieve a QString describing the error.