LIDL Soundboard  1.9.0
A simple soundboard, yet better than EXP Soundboard forsenE
CustomListWidgetItem Class Reference

The CustomListWidgetItem class, inherits QListWidgetItem. More...

#include <CustomListWidgetItem.h>

Inheritance diagram for CustomListWidgetItem:
Inheritance graph
Collaboration diagram for CustomListWidgetItem:
Collaboration graph

Public Member Functions

 CustomListWidgetItem (const QString &text, float mainVolume=1.0, float vacVolume=1.0, unsigned long long size=0, QListWidget *parent=0, int type=Type)
 CustomListWidgetItem Overloaded constructor. Called when adding sound to a wrapper. More...
 
 CustomListWidgetItem (const QString &text, float mainVolume, float vacVolume, LIDL::SFX sfx, unsigned long long size=0, QListWidget *parent=0, int type=Type)
 CustomListWidgetItem Overloaded constructor. Called to show existing sounds when editing a wrapper. More...
 
void setMainVolume (float)
 setMainVolume Used to change the main output volume with the sliders once a CustomListWidgetItem has been created. More...
 
void setVacVolume (float)
 setVacVolume Used to change the vac output volume with the sliders once a CustomListWidgetItem has been created. More...
 
float getMainVolume ()
 getMainVolume Used by WrapperProperties to retrieve the main volume associated to the sound before creating (and sending the wrapper to the main ui). More...
 
float getVacVolume ()
 getVacVolume Used by WrapperProperties to retrieve the VAC volume associated to the sound before creating (and sending the wrapper to the main ui). More...
 
void setSFXDistortion (LIDL::SFX_DIST_PARAM param, int value)
 setSFXDistortion Used to set the parameters of the Distortion. More...
 
void setSFXChorus (LIDL::SFX_CHORUS_PARAM param, int value)
 setSFXChorud Used to set the parameters of the Chorus. More...
 
int getSFXChorus (LIDL::SFX_CHORUS_PARAM which) const
 getSFXChorus Get the value of the specified Chorus SFX parameter. More...
 
int getSFXDistortion (LIDL::SFX_DIST_PARAM which) const
 getSFXDistortion Get the value of the specified Distortion SFX parameter. More...
 
void SetSFXEnabled (LIDL::SFX_TYPE type, bool enabled)
 SetSFXEnabled Sets (or unsets) the _sfx.flags member. More...
 
LIDL::SFX getSFX ()
 getSFX More...
 
unsigned long long getSize () const
 getSize More...
 
void setSFXEcho (LIDL::SFX_ECHO_PARAM param, int value)
 setSFXEcho More...
 
int getSFXEcho (LIDL::SFX_ECHO_PARAM which) const
 
void setSFXCompressor (LIDL::SFX_COMPRESSOR_PARAM param, int value)
 setSFXCompressor More...
 
int getSFXCompressor (LIDL::SFX_COMPRESSOR_PARAM which)
 
void setSFXFlanger (LIDL::SFX_FLANGER_PARAM param, int value)
 
int getSFXFlanger (LIDL::SFX_FLANGER_PARAM param)
 
void setSFXGargle (LIDL::SFX_GARGLE_PARAM param, int value)
 
int getSFXGargle (LIDL::SFX_GARGLE_PARAM param)
 
template<class ParamType >
void setSFX (int specialValue, int value)
 
template<class ParamType >
int getSFXValue (int which)
 

Private Member Functions

 CustomListWidgetItem (QListWidget *parent=nullptr)
 CustomListWidgetItem Default constructor, not used. More...
 

Private Attributes

float _mainVolume
 
float _vacVolume
 
unsigned long long _size
 
LIDL::SFX _sfx
 

Detailed Description

The CustomListWidgetItem class, inherits QListWidgetItem.

Constructor & Destructor Documentation

◆ CustomListWidgetItem() [1/3]

CustomListWidgetItem::CustomListWidgetItem ( const QString &  text,
float  mainVolume = 1.0,
float  vacVolume = 1.0,
unsigned long long  size = 0,
QListWidget *  parent = 0,
int  type = Type 
)

CustomListWidgetItem Overloaded constructor. Called when adding sound to a wrapper.

No need for SFX param since it will be blank (new sound).

Parameters
textThe URI of the file (could be one of the following: file://, http://, or https://).
mainVolumeThe main output volume. Default to 100%. But the value we send as a parameter is the SettingsController default value (which can be changed by the user).
vacVolumeThe VAC output volume. Default to 100%. But the value we send as a parameter is the SettingsController default value (which can be changed by the user).
sizeThe size of the file (bytes). Used to determine when to start holding ptt is sound is remote.
parentThe display widget.
typeThe type. idk wtf this is, and we don't use it

This constructor will attempt to deduct a valid URI scheme from the string. If it is local it will prepend file:///

References _mainVolume, _sfx, _size, _vacVolume, LIDL::SFX::flags, and LIDL::NONE.

◆ CustomListWidgetItem() [2/3]

CustomListWidgetItem::CustomListWidgetItem ( const QString &  text,
float  mainVolume,
float  vacVolume,
LIDL::SFX  sfx,
unsigned long long  size = 0,
QListWidget *  parent = 0,
int  type = Type 
)

CustomListWidgetItem Overloaded constructor. Called to show existing sounds when editing a wrapper.

Basically this constructor will be called whenever the edition of a wrapper is started. The WrapperProperty class constructor will iterate through the wrapper, for each LIDL::SoundFile found the the sound array, it will call this constructor to add the items to the view.

Parameters
textThe URI of the file (could be one of the following: file://, http://, or https://).
mainVolumeThe Main volume of the sound in the existing collection.
vacVolumeThe VAC volume of the sound in the existing collection.
sfxThe SFX of the sound in the existing collection.
sizeThe size of the file (bytes). Used to determine when to start holding ptt is sound is remote.
parentThe display widget.
typeidk kev. Not used anyway.

References _sfx.

◆ CustomListWidgetItem() [3/3]

CustomListWidgetItem::CustomListWidgetItem ( QListWidget *  parent = nullptr)
explicitprivate

CustomListWidgetItem Default constructor, not used.

Parameters
parent

References _mainVolume, _sfx, _vacVolume, LIDL::SFX::flags, and LIDL::NONE.

Member Function Documentation

◆ getMainVolume()

float CustomListWidgetItem::getMainVolume ( )

getMainVolume Used by WrapperProperties to retrieve the main volume associated to the sound before creating (and sending the wrapper to the main ui).

Returns

References _mainVolume.

Referenced by WrapperProperties::ItemWasClicked(), and WrapperProperties::WrapperProperties().

Here is the caller graph for this function:

◆ getSFX()

LIDL::SFX CustomListWidgetItem::getSFX ( )

getSFX

Returns
Returns a LIDL::SFX structure which contains a .flags member to know which SFX is enabled, and several BASS_DX8_<SFX> class.

References _sfx.

Referenced by WrapperProperties::setUpConnection(), and WrapperProperties::WrapperProperties().

Here is the caller graph for this function:

◆ getSFXChorus()

int CustomListWidgetItem::getSFXChorus ( LIDL::SFX_CHORUS_PARAM  which) const

getSFXChorus Get the value of the specified Chorus SFX parameter.

Parameters
whichWhich paramater to get (enumeration, see EnumsAndStructs.h).
Returns
The value of the parameter.

References _sfx, LIDL::SFX::chorus, LIDL::fDelay, BASS_DX8_CHORUS::fDelay, LIDL::fDepth, BASS_DX8_CHORUS::fDepth, LIDL::fFeedback, BASS_DX8_CHORUS::fFeedback, LIDL::fFrequency, BASS_DX8_CHORUS::fFrequency, LIDL::fWetDryMix, BASS_DX8_CHORUS::fWetDryMix, LIDL::lPhase, BASS_DX8_CHORUS::lPhase, LIDL::lWaveform, and BASS_DX8_CHORUS::lWaveform.

Referenced by getSFXValue().

Here is the caller graph for this function:

◆ getSFXCompressor()

◆ getSFXDistortion()

int CustomListWidgetItem::getSFXDistortion ( LIDL::SFX_DIST_PARAM  which) const

getSFXDistortion Get the value of the specified Distortion SFX parameter.

Parameters
whichWhich paramater to get (enumeration, see EnumsAndStructs.h).
Returns
The value of the parameter.

References _sfx, LIDL::SFX::distortion, LIDL::fEdge, BASS_DX8_DISTORTION::fEdge, LIDL::fGain, BASS_DX8_DISTORTION::fGain, LIDL::fPostEQBandwidth, BASS_DX8_DISTORTION::fPostEQBandwidth, LIDL::fPostEQCenterFrequency, BASS_DX8_DISTORTION::fPostEQCenterFrequency, LIDL::fPreLowpassCutoff, and BASS_DX8_DISTORTION::fPreLowpassCutoff.

Referenced by getSFXValue().

Here is the caller graph for this function:

◆ getSFXEcho()

◆ getSFXFlanger()

◆ getSFXGargle()

int CustomListWidgetItem::getSFXGargle ( LIDL::SFX_GARGLE_PARAM  param)

References _sfx, LIDL::dwRateHz, BASS_DX8_GARGLE::dwRateHz, LIDL::dwWaveShape, BASS_DX8_GARGLE::dwWaveShape, and LIDL::SFX::gargle.

Referenced by getSFXValue().

Here is the caller graph for this function:

◆ getSFXValue()

template<class ParamType >
int CustomListWidgetItem::getSFXValue ( int  which)

References getSFXChorus(), getSFXCompressor(), getSFXDistortion(), getSFXEcho(), getSFXFlanger(), and getSFXGargle().

Referenced by WrapperProperties::setUpConnection().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getSize()

unsigned long long CustomListWidgetItem::getSize ( ) const

getSize

Returns
The size of the sound (in bytes).

References _size.

Referenced by WrapperProperties::WrapperProperties().

Here is the caller graph for this function:

◆ getVacVolume()

float CustomListWidgetItem::getVacVolume ( )

getVacVolume Used by WrapperProperties to retrieve the VAC volume associated to the sound before creating (and sending the wrapper to the main ui).

Returns

References _vacVolume.

Referenced by WrapperProperties::ItemWasClicked(), and WrapperProperties::WrapperProperties().

Here is the caller graph for this function:

◆ setMainVolume()

void CustomListWidgetItem::setMainVolume ( float  newMainVolume)

setMainVolume Used to change the main output volume with the sliders once a CustomListWidgetItem has been created.

References _mainVolume.

Referenced by WrapperProperties::SetItemMainVolume().

Here is the caller graph for this function:

◆ setSFX()

template<class ParamType >
void CustomListWidgetItem::setSFX ( int  specialValue,
int  value 
)

References setSFXChorus(), setSFXCompressor(), setSFXDistortion(), setSFXEcho(), setSFXFlanger(), and setSFXGargle().

Referenced by WrapperProperties::setUpConnection().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setSFXChorus()

void CustomListWidgetItem::setSFXChorus ( LIDL::SFX_CHORUS_PARAM  param,
int  value 
)

setSFXChorud Used to set the parameters of the Chorus.

The Sound Entry Editor (WrapperProperties class) uses this method to set the parameters of Chorus SFX. It is used in conjuction with lambda function that are connected and disconnected everytime and item is clicked on. This accounts for any of the parameters through the EnumValue in the contructor of the SfxSettingsWidget. IF and only if the values of the enumerations are contiguous.

All the necessary casts are done through static_cast in this function.
Once the casts are done, the values are assigned to this->_sfx.BASS_DX8_CHORUS variable.

Parameters
paramThe parameter to change (enumeration, see EnumsAndStructs.h).
valueThe new value.

References _sfx, LIDL::SFX::chorus, LIDL::fDelay, BASS_DX8_CHORUS::fDelay, LIDL::fDepth, BASS_DX8_CHORUS::fDepth, LIDL::fFeedback, BASS_DX8_CHORUS::fFeedback, LIDL::fFrequency, BASS_DX8_CHORUS::fFrequency, LIDL::fWetDryMix, BASS_DX8_CHORUS::fWetDryMix, LIDL::lPhase, BASS_DX8_CHORUS::lPhase, LIDL::lWaveform, and BASS_DX8_CHORUS::lWaveform.

Referenced by setSFX().

Here is the caller graph for this function:

◆ setSFXCompressor()

◆ setSFXDistortion()

void CustomListWidgetItem::setSFXDistortion ( LIDL::SFX_DIST_PARAM  param,
int  value 
)

setSFXDistortion Used to set the parameters of the Distortion.

The Sound Entry Editor (WrapperProperties class) uses this method to set the parameters of Distortion SFX. It is used in conjuction with lambda function that are connected and disconnected everytime and item is clicked on. This accounts for any of the parameters through the EnumValue in the contructor of the SfxSettingsWidget IF and only if the values of the enumerations are contiguous.

All the necessary casts are done through static_cast in this function.
Once the casts are done, the values are assigned to this->_sfx.BASS_DX8_DISTORTION variable.

Parameters
paramThe parameter to change (enumeration, see EnumsAndStructs.h).
valueThe new value.

References _sfx, LIDL::SFX::distortion, LIDL::fEdge, BASS_DX8_DISTORTION::fEdge, LIDL::fGain, BASS_DX8_DISTORTION::fGain, LIDL::fPostEQBandwidth, BASS_DX8_DISTORTION::fPostEQBandwidth, LIDL::fPostEQCenterFrequency, BASS_DX8_DISTORTION::fPostEQCenterFrequency, LIDL::fPreLowpassCutoff, and BASS_DX8_DISTORTION::fPreLowpassCutoff.

Referenced by setSFX().

Here is the caller graph for this function:

◆ setSFXEcho()

void CustomListWidgetItem::setSFXEcho ( LIDL::SFX_ECHO_PARAM  param,
int  value 
)

◆ SetSFXEnabled()

void CustomListWidgetItem::SetSFXEnabled ( LIDL::SFX_TYPE  type,
bool  enabled 
)

SetSFXEnabled Sets (or unsets) the _sfx.flags member.

Parameters
typeOn of the SFX_TYPE enumeration (see EnumsAndStrucs.h) This enumeration can be used as flags. (thanks to bitmask_operator.h).
enabledIf the SFX flag should be added or removed from this->_sfx.flags

References _sfx, and LIDL::SFX::flags.

Referenced by WrapperProperties::setUpConnection().

Here is the caller graph for this function:

◆ setSFXFlanger()

◆ setSFXGargle()

void CustomListWidgetItem::setSFXGargle ( LIDL::SFX_GARGLE_PARAM  param,
int  value 
)

References _sfx, LIDL::dwRateHz, BASS_DX8_GARGLE::dwRateHz, LIDL::dwWaveShape, BASS_DX8_GARGLE::dwWaveShape, and LIDL::SFX::gargle.

Referenced by setSFX().

Here is the caller graph for this function:

◆ setVacVolume()

void CustomListWidgetItem::setVacVolume ( float  newVacVolume)

setVacVolume Used to change the vac output volume with the sliders once a CustomListWidgetItem has been created.

References _vacVolume.

Referenced by WrapperProperties::SetItemVACVolume().

Here is the caller graph for this function:

Member Data Documentation

◆ _mainVolume

float CustomListWidgetItem::_mainVolume
private

Temporary mainVolume variable, used to contruct the LIDL::Soundfile properly.

Referenced by CustomListWidgetItem(), getMainVolume(), and setMainVolume().

◆ _sfx

LIDL::SFX CustomListWidgetItem::_sfx
private

◆ _size

unsigned long long CustomListWidgetItem::_size
private

Temporary size variable, used to contruct the LIDL::Soundfile properly if it is distant sound.

Referenced by CustomListWidgetItem(), and getSize().

◆ _vacVolume

float CustomListWidgetItem::_vacVolume
private

Temporary vacVolume variable, used to contruct the LIDL::Soundfile properly.

Referenced by CustomListWidgetItem(), getVacVolume(), and setVacVolume().


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