TTKMusicPlayer  3.7.0.0
TTKMusicPlayer imitates Kugou UI, the music player uses of qmmp core library based on Qt for windows and linux
Public Types | Signals | Public Member Functions | Private Attributes | List of all members
Volume Class Referenceabstract

The Volume class provides asbtract volume interface. More...

#include <volume.h>

+ Inheritance diagram for Volume:

Public Types

enum  VolumeFlag { IsMuteSupported = 0x1, HasNotifySignal = 0x2 }
 

Signals

void changed ()
 

Public Member Functions

virtual ~Volume ()=default
 
virtual void setVolume (const VolumeSettings &volume)=0
 
virtual VolumeSettings volume () const =0
 
virtual bool isMuted () const
 
virtual void setMuted (bool mute)
 
virtual VolumeFlags flags () const
 

Private Attributes

bool m_mutedInternal = false
 

Detailed Description

The Volume class provides asbtract volume interface.

Author
Ilya Kotov forko.nosp@m.tov0.nosp@m.2@ya..nosp@m.ru

Definition at line 51 of file volume.h.

Member Enumeration Documentation

This enum describes volume capabilities.

Enumerator
IsMuteSupported 

Indicates the interface has feature to mute audio

HasNotifySignal 

Indicates the object supports change notification via emitting changed() signal so polling the volume is not needed

Definition at line 58 of file volume.h.

Constructor & Destructor Documentation

virtual Volume::~Volume ( )
virtualdefault

Destructor.

Member Function Documentation

void Volume::changed ( )
signal

Emitted if volume is changed.

virtual VolumeFlags Volume::flags ( ) const
virtual

Returns volume flags.

virtual bool Volume::isMuted ( ) const
virtual

Returns true if volume is disabled. Otherwise returns false.

virtual void Volume::setMuted ( bool  mute)
virtual

Mutes/Restores volume. Default implementation does nothing.

Parameters
mute- state of volume (true - mute, false - restore)
virtual void Volume::setVolume ( const VolumeSettings volume)
pure virtual

Setups volume levels. Subclass should reimplement this fucntion.

Parameters
volumeStructure with required volume levels.
virtual VolumeSettings Volume::volume ( ) const
pure virtual

Returns volume level of the channel.

Member Data Documentation

bool Volume::m_mutedInternal = false
private

Definition at line 102 of file volume.h.


The documentation for this class was generated from the following file: