Entropy Piano Tuner  1.1.3 (documentation not yet complete)
An open-source experimental software for piano tuning by entropy minimization
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
VolumeControlLevel Class Reference

QProgressBar to display the current input level. More...

#include <volumecontrollevel.h>

+ Inheritance diagram for VolumeControlLevel:
+ Collaboration diagram for VolumeControlLevel:

Public Member Functions

 VolumeControlLevel (QWidget *parent)
 Default constructor. More...
 
virtual ~VolumeControlLevel ()
 Empty virtual destructor. More...
 
- Public Member Functions inherited from RecorderLevel
 RecorderLevel ()
 
 ~RecorderLevel ()
 
virtual void handleMessage (MessagePtr m) override
 Message handler. More...
 
- Public Member Functions inherited from MessageListener
 MessageListener (bool defaultActivation=true)
 
virtual ~MessageListener ()
 
bool isMessageListenerActive () const
 
void activateMessageListener ()
 
void deactivateMessageListener ()
 

Protected Member Functions

void levelChanged (double value) override
 Function that is called when the level has changed. More...
 

Private Slots

void updateValue ()
 Update the displayed value with the mValueBuffer. More...
 

Private Attributes

QTimer mUpdateTimer
 The timer that will handle the update of the QProgressBar. More...
 
double mValueBuffer
 The buffered value. More...
 

Detailed Description

QProgressBar to display the current input level.

It inheriated RecorderLevel to listen for the levelChanged message. Since it can happen that the rate of levelChanged(float) calls is very high, there is a timer that only will update the value with 24 fps.

Definition at line 34 of file volumecontrollevel.h.

Constructor & Destructor Documentation

VolumeControlLevel::VolumeControlLevel ( QWidget *  parent)
explicit

Default constructor.

Parameters
parent: The parent widget

Definition at line 25 of file volumecontrollevel.cpp.

+ Here is the call graph for this function:

VolumeControlLevel::~VolumeControlLevel ( )
virtual

Empty virtual destructor.

Definition at line 35 of file volumecontrollevel.cpp.

Member Function Documentation

void VolumeControlLevel::levelChanged ( double  value)
overrideprotectedvirtual

Function that is called when the level has changed.

Parameters
value: The new value in [0, 1]

This will change the value of mValueBuffer.

Implements RecorderLevel.

Definition at line 41 of file volumecontrollevel.cpp.

void VolumeControlLevel::updateValue ( )
privateslot

Update the displayed value with the mValueBuffer.

This function will be called by mUpdateTimer with 24 fps.

Definition at line 46 of file volumecontrollevel.cpp.

Member Data Documentation

QTimer VolumeControlLevel::mUpdateTimer
private

The timer that will handle the update of the QProgressBar.

Definition at line 72 of file volumecontrollevel.h.

double VolumeControlLevel::mValueBuffer
private

The buffered value.

It will be displayed by updateValue() and set by levelChanged(float).

Definition at line 79 of file volumecontrollevel.h.


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