CurrentTrackPositionCommand

Stores the playback position of the current track.

Synopsis:

#include <qplayer/qplayer.h>

namespace QPlayer {

    class CurrentTrackPositionCommand : public BaseCommand
    {
        Q_OBJECT
    
    public:
    
        explicit CurrentTrackPositionCommand();
    
        inline int result()
        {
            return m_result;
        }
    
        inline void setResult( int result )
        {
            m_result = result;
        }
    
    signals:
    
        void complete( CurrentTrackPositionCommand *command );
    
        void error( CurrentTrackPositionCommand *command );
    
    };

}

Library:

libqplayer

Description:

Stores the playback position of the current track. When you create a CurrentTrackPositionCommand object and pass in its reference in a getCurrentTrackPosition() call, the library writes the playback position of the current track into the object. The object emits a complete signal to notify clients when the library finishes writing the playback position. Clients can then call the result() method to retrieve the position.

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