![]() |
LIDL Soundboard
1.9.0
A simple soundboard, yet better than EXP Soundboard forsenE
|
The CustomListWidgetItem class, inherits QListWidgetItem. More...
#include <CustomListWidgetItem.h>
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 |
The CustomListWidgetItem class, inherits QListWidgetItem.
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).
text | The URI of the file (could be one of the following: file://, http://, or https://). |
mainVolume | The 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). |
vacVolume | The 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). |
size | The size of the file (bytes). Used to determine when to start holding ptt is sound is remote. |
parent | The display widget. |
type | The 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::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.
text | The URI of the file (could be one of the following: file://, http://, or https://). |
mainVolume | The Main volume of the sound in the existing collection. |
vacVolume | The VAC volume of the sound in the existing collection. |
sfx | The SFX of the sound in the existing collection. |
size | The size of the file (bytes). Used to determine when to start holding ptt is sound is remote. |
parent | The display widget. |
type | idk kev. Not used anyway. |
References _sfx.
|
explicitprivate |
CustomListWidgetItem Default constructor, not used.
parent |
References _mainVolume, _sfx, _vacVolume, LIDL::SFX::flags, and LIDL::NONE.
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).
References _mainVolume.
Referenced by WrapperProperties::ItemWasClicked(), and WrapperProperties::WrapperProperties().
LIDL::SFX CustomListWidgetItem::getSFX | ( | ) |
getSFX
References _sfx.
Referenced by WrapperProperties::setUpConnection(), and WrapperProperties::WrapperProperties().
int CustomListWidgetItem::getSFXChorus | ( | LIDL::SFX_CHORUS_PARAM | which | ) | const |
getSFXChorus Get the value of the specified Chorus SFX parameter.
which | Which paramater to get (enumeration, see EnumsAndStructs.h). |
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().
int CustomListWidgetItem::getSFXCompressor | ( | LIDL::SFX_COMPRESSOR_PARAM | which | ) |
References _sfx, LIDL::SFX::compressor, LIDL::fAttack, BASS_DX8_COMPRESSOR::fAttack, LIDL::fGain, BASS_DX8_COMPRESSOR::fGain, LIDL::fPredelay, BASS_DX8_COMPRESSOR::fPredelay, LIDL::fRatio, BASS_DX8_COMPRESSOR::fRatio, LIDL::fRelease, BASS_DX8_COMPRESSOR::fRelease, LIDL::fThreshold, and BASS_DX8_COMPRESSOR::fThreshold.
Referenced by getSFXValue().
int CustomListWidgetItem::getSFXDistortion | ( | LIDL::SFX_DIST_PARAM | which | ) | const |
getSFXDistortion Get the value of the specified Distortion SFX parameter.
which | Which paramater to get (enumeration, see EnumsAndStructs.h). |
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().
int CustomListWidgetItem::getSFXEcho | ( | LIDL::SFX_ECHO_PARAM | which | ) | const |
References _sfx, LIDL::SFX::echo, LIDL::fFeedback, BASS_DX8_ECHO::fFeedback, LIDL::fLeftDelay, BASS_DX8_ECHO::fLeftDelay, LIDL::fRightDelay, BASS_DX8_ECHO::fRightDelay, LIDL::fWetDryMix, BASS_DX8_ECHO::fWetDryMix, LIDL::lPanDelay, and BASS_DX8_ECHO::lPanDelay.
Referenced by getSFXValue().
int CustomListWidgetItem::getSFXFlanger | ( | LIDL::SFX_FLANGER_PARAM | param | ) |
References _sfx, LIDL::fDelay, BASS_DX8_FLANGER::fDelay, LIDL::fDepth, BASS_DX8_FLANGER::fDepth, LIDL::fFeedback, BASS_DX8_FLANGER::fFeedback, LIDL::fFrequency, BASS_DX8_FLANGER::fFrequency, LIDL::SFX::flanger, LIDL::fWetDryMix, BASS_DX8_FLANGER::fWetDryMix, LIDL::lPhase, BASS_DX8_FLANGER::lPhase, LIDL::lWaveform, and BASS_DX8_FLANGER::lWaveform.
Referenced by getSFXValue().
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().
int CustomListWidgetItem::getSFXValue | ( | int | which | ) |
References getSFXChorus(), getSFXCompressor(), getSFXDistortion(), getSFXEcho(), getSFXFlanger(), and getSFXGargle().
Referenced by WrapperProperties::setUpConnection().
unsigned long long CustomListWidgetItem::getSize | ( | ) | const |
getSize
References _size.
Referenced by WrapperProperties::WrapperProperties().
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).
References _vacVolume.
Referenced by WrapperProperties::ItemWasClicked(), and WrapperProperties::WrapperProperties().
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().
void CustomListWidgetItem::setSFX | ( | int | specialValue, |
int | value | ||
) |
References setSFXChorus(), setSFXCompressor(), setSFXDistortion(), setSFXEcho(), setSFXFlanger(), and setSFXGargle().
Referenced by WrapperProperties::setUpConnection().
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.
param | The parameter to change (enumeration, see EnumsAndStructs.h). |
value | The 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().
void CustomListWidgetItem::setSFXCompressor | ( | LIDL::SFX_COMPRESSOR_PARAM | param, |
int | value | ||
) |
setSFXCompressor
value |
References _sfx, LIDL::SFX::compressor, LIDL::fAttack, BASS_DX8_COMPRESSOR::fAttack, LIDL::fGain, BASS_DX8_COMPRESSOR::fGain, LIDL::fPredelay, BASS_DX8_COMPRESSOR::fPredelay, LIDL::fRatio, BASS_DX8_COMPRESSOR::fRatio, LIDL::fRelease, BASS_DX8_COMPRESSOR::fRelease, LIDL::fThreshold, and BASS_DX8_COMPRESSOR::fThreshold.
Referenced by setSFX().
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.
param | The parameter to change (enumeration, see EnumsAndStructs.h). |
value | The 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().
void CustomListWidgetItem::setSFXEcho | ( | LIDL::SFX_ECHO_PARAM | param, |
int | value | ||
) |
setSFXEcho
param | |
value |
References _sfx, LIDL::SFX::echo, LIDL::fFeedback, BASS_DX8_ECHO::fFeedback, LIDL::fLeftDelay, BASS_DX8_ECHO::fLeftDelay, LIDL::fRightDelay, BASS_DX8_ECHO::fRightDelay, LIDL::fWetDryMix, BASS_DX8_ECHO::fWetDryMix, LIDL::lPanDelay, and BASS_DX8_ECHO::lPanDelay.
Referenced by setSFX().
void CustomListWidgetItem::SetSFXEnabled | ( | LIDL::SFX_TYPE | type, |
bool | enabled | ||
) |
SetSFXEnabled Sets (or unsets) the _sfx.flags member.
type | On of the SFX_TYPE enumeration (see EnumsAndStrucs.h) This enumeration can be used as flags. (thanks to bitmask_operator.h). |
enabled | If the SFX flag should be added or removed from this->_sfx.flags |
References _sfx, and LIDL::SFX::flags.
Referenced by WrapperProperties::setUpConnection().
void CustomListWidgetItem::setSFXFlanger | ( | LIDL::SFX_FLANGER_PARAM | param, |
int | value | ||
) |
References _sfx, LIDL::fDelay, BASS_DX8_FLANGER::fDelay, LIDL::fDepth, BASS_DX8_FLANGER::fDepth, LIDL::fFeedback, BASS_DX8_FLANGER::fFeedback, LIDL::fFrequency, BASS_DX8_FLANGER::fFrequency, LIDL::SFX::flanger, LIDL::fWetDryMix, BASS_DX8_FLANGER::fWetDryMix, LIDL::lPhase, BASS_DX8_FLANGER::lPhase, LIDL::lWaveform, and BASS_DX8_FLANGER::lWaveform.
Referenced by setSFX().
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().
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().
|
private |
Temporary mainVolume variable, used to contruct the LIDL::Soundfile properly.
Referenced by CustomListWidgetItem(), getMainVolume(), and setMainVolume().
|
private |
Structure containing the flags corresponding to the enabled SFX, and the parameters of those SFX
Referenced by CustomListWidgetItem(), getSFX(), getSFXChorus(), getSFXCompressor(), getSFXDistortion(), getSFXEcho(), getSFXFlanger(), getSFXGargle(), setSFXChorus(), setSFXCompressor(), setSFXDistortion(), setSFXEcho(), SetSFXEnabled(), setSFXFlanger(), and setSFXGargle().
|
private |
Temporary size variable, used to contruct the LIDL::Soundfile properly if it is distant sound.
Referenced by CustomListWidgetItem(), and getSize().
|
private |
Temporary vacVolume variable, used to contruct the LIDL::Soundfile properly.
Referenced by CustomListWidgetItem(), getVacVolume(), and setVacVolume().