![]() |
LIDL Soundboard
1.9.0
A simple soundboard, yet better than EXP Soundboard forsenE
|
Inherits QWidget. More...
#include <wrapperproperties.h>
Public Slots | |
void | AddSound () |
AddSound method. More... | |
void | AddSoundFromUrl () |
AddSoundFromUrl method. More... | |
void | AddSoundFromDrop (QString) |
AddSoundFromDrop. More... | |
void | ItemWasClicked (QListWidgetItem *item) |
ItemWasClicked deals with connecting every slider and spinbox to the selected sound. More... | |
void | RadioPressed (int id) |
RadioPressed sets the wrapper playback mode whenever radio is pressed. More... | |
void | SetKeySequence (QKeySequence) |
SetKeySequence Sets the key sequence of the line edit. More... | |
void | SetItemMainVolume (int newValue) |
SetItemMainVolume Sets a sound item main volume. More... | |
void | SetItemVACVolume (int newValue) |
SetItemVACVolume Sets a sound item VAC volume. More... | |
Signals | |
void | signalAddDone (std::shared_ptr< SoundWrapper > sound) |
The signal that is sent when adding a new wrapper. More... | |
void | signalEditDone (std::shared_ptr< SoundWrapper > sound) |
The signal that is sent after editing an existing wrapper. More... | |
void | closed () |
This signal is emitted whenever the Sound Entry Editor window is closed. More... | |
Public Member Functions | |
WrapperProperties (int mainOutput, int VACOutput, SoundWrapper *sound=nullptr, QWidget *parent=nullptr) | |
Constructor of the "Sound Entry Editor" UI. More... | |
Private Member Functions | |
WrapperProperties (QWidget *parent=nullptr) | |
Default constructor, private because we only need the populated one. More... | |
void | closeEvent (QCloseEvent *event) |
Reimplemented to send a closed signal to the mainUI, so we can re-enable the widgets. More... | |
template<LIDL::SFX_TYPE Type, class Param > | |
void | setUpConnection (SfxSettingsWidget *widget) |
Set the connection of all the widgets (sliders,combo boxes etc), contained in the widget. More... | |
Inherits QWidget.
WrapperProperties class deals with displaying a soundwrapper's data in order to edit them. It displays a UI that allows to add local and remote files to a wrapper as well as delete them. Each sound can be assigned several sound effects, main output volume, and VAC output volume.
Removed pointers to main UI and replaced several functions and connections by lambdas in both this file and soundboardmainUI.
WrapperProperties::WrapperProperties | ( | int | mainOutput, |
int | VACOutput, | ||
SoundWrapper * | sound = nullptr , |
||
QWidget * | parent = nullptr |
||
) |
Constructor of the "Sound Entry Editor" UI.
Will construct a blank window, to be populated, or not, by a wrapper, by calling the private default constructor
The UI will either be blank or populated by the SoundWrapper to be edited. The function will check for SoundWrapper being nullptr. If it is, nothing is to be done, the Entry Editor will created a new wrapper. If it isn't, then we opened a wrapper. Several steps are then done: Iterating through the wrapper to display the files inside it, with their SFX and volume. Disconnect the "Done!" button from its connection, and connect it to the relevant function. (SendEditedWrapper)
mainOutput | The index of the main output device. |
VACOutput | The index of the VAC output device. |
sound | A pointer to the sound being edited. |
References _btnDone, _mainOutput, _playBackMode, _radioAuto, _radioAutoLoop, _radioCancer, _radioSequential, _shortcutEdit, _shortcutSequence, _soundListDisplay, _VACOutput, LIDL::Auto, LIDL::AutoLoop, LIDL::Cancer, SoundWrapper::getKeySequence(), CustomListWidgetItem::getMainVolume(), SoundWrapper::getPlayMode(), CustomListWidgetItem::getSFX(), SoundWrapper::getShortcutVirtualKey(), CustomListWidgetItem::getSize(), SoundWrapper::getSoundList(), CustomListWidgetItem::getVacVolume(), CustomShortcutEdit::getVirtualKey(), LIDL::Sequential, CustomShortcutEdit::setVirtualKey(), signalAddDone(), signalEditDone(), and LIDL::Singleton.
|
explicitprivate |
Default constructor, private because we only need the populated one.
Will construct a blank window, to be populated, or not, by a wrapper. This constructor is only called by the initialization list of the public constructor.
parent | A pointer to the parent (default is nullptr); |
References _btnAbort, _btnAdd, _btnAddFromURL, _btnDelete, _btnDone, _chorusWidget, _compressorWidget, _distortionWidget, _echoWidget, _flangerWidget, _gargleWidget, _gLayout, _playBackMode, _radioAuto, _radioAutoLoop, _radioCancer, _radioGroup, _radioGroupBox, _radioLayout, _radioSequential, _selectedItem, _sfxLayout, _sfxSpoiler, _sfxTabWidget, _shortcutEdit, _shortcutGroup, _shortcutHint, _shortcutLayout, _shortcutResetBtn, _shortcutSequence, _shortcutWarning, _sliderLabelMain, _sliderLabelVAC, _sliderLayout, _sliderMain, _sliderMainSpin, _sliderSpoiler, _sliderVAC, _sliderVACSpin, _soundListDisplay, _soundListHint, _vLayout, SfxSettingsWidget::addComboBox(), SfxSettingsWidget::addSlider(), AddSound(), AddSoundFromDrop(), AddSoundFromUrl(), LIDL::CHORUS, Spoiler::Close(), LIDL::COMPRESSOR, LIDL::DISTORTION, LIDL::dwRateHz, LIDL::dwWaveShape, LIDL::ECHO, LIDL::fAttack, LIDL::fDelay, LIDL::fDepth, LIDL::fEdge, LIDL::fFeedback, LIDL::fFrequency, LIDL::fGain, CustomListWidget::fileDragged(), LIDL::FLANGER, LIDL::fLeftDelay, LIDL::fPostEQBandwidth, LIDL::fPostEQCenterFrequency, LIDL::fPredelay, LIDL::fPreLowpassCutoff, LIDL::fRatio, LIDL::fRelease, LIDL::fRightDelay, LIDL::fThreshold, LIDL::fWetDryMix, LIDL::GARGLE, LIDL::Controller::SettingsController::GetInstance(), CustomShortcutEdit::getText(), ItemWasClicked(), CustomShortcutEdit::keyPressed(), LIDL::lPanDelay, LIDL::lPhase, LIDL::lWaveform, Spoiler::Opened(), RadioPressed(), LIDL::Sequential, Spoiler::setContentLayout(), LIDL::Controller::SettingsController::setEditing(), and SetKeySequence().
|
slot |
AddSound method.
Connected to the add button, it will open a prompt to select a file to add to the wrapper.
References _playBackMode, _radioCancer, _radioGroup, _radioSequential, _soundListDisplay, LIDL::Controller::SettingsController::GetInstance(), and LIDL::Sequential.
Referenced by WrapperProperties().
|
slot |
AddSoundFromDrop.
This method will deal with drag and dropped files. If they have the correct MIME type, it will add them.
References _playBackMode, _radioCancer, _radioGroup, _radioSequential, _soundListDisplay, LIDL::Controller::SettingsController::GetInstance(), and LIDL::Sequential.
Referenced by WrapperProperties().
|
slot |
AddSoundFromUrl method.
Connected to the Add from URL button, it will open a prompt to input a url pointing to a remote file. If the file has a valid MIME type, we add it to the soundboard.
References _soundListDisplay, LIDL::Controller::SettingsController::GetInstance(), and LIDL::Controller::SettingsController::GetSupportedMimeTypes().
Referenced by WrapperProperties().
|
signal |
This signal is emitted whenever the Sound Entry Editor window is closed.
Referenced by closeEvent(), SoundboardMainUI::editSoundDialog(), and SoundboardMainUI::SoundboardMainUI().
|
private |
Reimplemented to send a closed signal to the mainUI, so we can re-enable the widgets.
event | The QCloseEvent (used internally). |
References _soundListDisplay, closed(), LIDL::Controller::SettingsController::GetInstance(), and LIDL::Controller::SettingsController::setEditing().
|
slot |
ItemWasClicked deals with connecting every slider and spinbox to the selected sound.
item | The QListWidgetItem that was clicked (dynamic_cast from CustomListWidgetItem). |
References _btnDelete, _chorusWidget, _compressorWidget, _distortionWidget, _echoWidget, _flangerWidget, _gargleWidget, _selectedItem, _sfxSpoiler, _sliderMain, _sliderSpoiler, _sliderVAC, CustomListWidgetItem::getMainVolume(), CustomListWidgetItem::getVacVolume(), SetItemMainVolume(), and SetItemVACVolume().
Referenced by WrapperProperties().
|
slot |
RadioPressed sets the wrapper playback mode whenever radio is pressed.
id | The ID of the pressed button. |
References _btnAdd, _playBackMode, and _soundListDisplay.
Referenced by WrapperProperties().
|
slot |
SetItemMainVolume Sets a sound item main volume.
newValue | The new main volume. (CustomListWidgetItem isn't a Q_OBJECT and can't have slots of its own). |
References _selectedItem, and CustomListWidgetItem::setMainVolume().
Referenced by ItemWasClicked().
|
slot |
SetItemVACVolume Sets a sound item VAC volume.
newValue | The new VAC volume. (CustomListWidgetItem isn't a Q_OBJECT and can't have slots of its own). |
References _selectedItem, and CustomListWidgetItem::setVacVolume().
Referenced by ItemWasClicked().
|
slot |
SetKeySequence Sets the key sequence of the line edit.
References _shortcutSequence.
Referenced by WrapperProperties().
|
private |
Set the connection of all the widgets (sliders,combo boxes etc), contained in the widget.
Type | The type of the SFX. |
Param | The enum class containing the SFX settings, used to iterate. |
widget | The widget being connected. |
References _selectedItem, SfxSettingsWidget::checkBoxStateChanged(), SfxSettingsWidget::comboBoxValueChanged(), SfxSettingsWidget::deactivateAll(), LIDL::SFX::flags, CustomListWidgetItem::getSFX(), CustomListWidgetItem::getSFXValue(), SfxSettingsWidget::setCheckboxState(), CustomListWidgetItem::setSFX(), CustomListWidgetItem::SetSFXEnabled(), SfxSettingsWidget::setValueOfEnumParam(), and SfxSettingsWidget::sliderValueChanged().
|
signal |
The signal that is sent when adding a new wrapper.
This signal is connected to a lambda function in the mainUI when the New Wrapper button is clicked.
sound | The new soundwrapper to add. |
Referenced by SoundboardMainUI::SoundboardMainUI(), and WrapperProperties().
|
signal |
The signal that is sent after editing an existing wrapper.
This signal is connected to a lambda function in the mainUI when the Edit Wrapper button is clicked.
sound | The edited wrapper that will replace the old one. |
Referenced by SoundboardMainUI::editSoundDialog(), and WrapperProperties().
|
private |
The abort button.
Referenced by WrapperProperties().
|
private |
The add sound button.
Referenced by RadioPressed(), and WrapperProperties().
|
private |
The add sound from URL button.
Referenced by WrapperProperties().
|
private |
The delete sound button.
Referenced by ItemWasClicked(), and WrapperProperties().
|
private |
The done button.
Referenced by WrapperProperties().
|
private |
The widget responsible of the Chorus tab construction
Referenced by ItemWasClicked(), and WrapperProperties().
|
private |
The widget responsible of the Compressor tab construction
Referenced by ItemWasClicked(), and WrapperProperties().
|
private |
The widget responsible of the Distortion tab construction
Referenced by ItemWasClicked(), and WrapperProperties().
|
private |
The widget responsible of the Echo tab construction
Referenced by ItemWasClicked(), and WrapperProperties().
|
private |
The widget responsible of the Flanger tab construction
Referenced by ItemWasClicked(), and WrapperProperties().
|
private |
The widget responsible of the Gargle tab construction
Referenced by ItemWasClicked(), and WrapperProperties().
|
private |
Layout.
Referenced by WrapperProperties().
|
private |
The index of the main output device.
Referenced by WrapperProperties().
|
private |
The variable that holds the playbackmode.
Referenced by AddSound(), AddSoundFromDrop(), RadioPressed(), and WrapperProperties().
|
private |
The Sequential (auto) radio button.
Referenced by WrapperProperties().
|
private |
The Singleton Autoplay radio button.
Referenced by WrapperProperties().
|
private |
The Singleton (cancer) radio button.
Referenced by AddSound(), AddSoundFromDrop(), and WrapperProperties().
|
private |
The button holding together each radio button.
Referenced by AddSound(), AddSoundFromDrop(), and WrapperProperties().
|
private |
The groupbox for playback mode.
Referenced by WrapperProperties().
|
private |
The horizontal layout containing the radio buttons.
Referenced by WrapperProperties().
|
private |
The Sequential radio button.
Referenced by AddSound(), AddSoundFromDrop(), and WrapperProperties().
|
private |
A pointer to the selected item.
Referenced by ItemWasClicked(), SetItemMainVolume(), SetItemVACVolume(), setUpConnection(), and WrapperProperties().
|
private |
|
private |
The layout of the SFX spoiler group.
Referenced by WrapperProperties().
|
private |
The spoiler group containing the SFX settings.
Referenced by ItemWasClicked(), and WrapperProperties().
|
private |
Tab widget to sort all the available SFX.
Referenced by WrapperProperties().
|
private |
The specialized QKeySequenceEdit we use to get the shortcut.
Referenced by WrapperProperties().
|
private |
The groupbox for the shortcut settings.
Referenced by WrapperProperties().
|
private |
The instructions text.
Referenced by WrapperProperties().
|
private |
The layout of the shortcut groupbox.
Referenced by WrapperProperties().
|
private |
The reset button.
Referenced by WrapperProperties().
|
private |
The variable that will contain the sequence.
Referenced by SetKeySequence(), and WrapperProperties().
|
private |
The warning about using the same key twice.
Referenced by WrapperProperties().
|
private |
The groupbox containing the volume sliders.
|
private |
Label for the main volume.
Referenced by WrapperProperties().
|
private |
Label for the VAC volume.
Referenced by WrapperProperties().
|
private |
The layout of the slider groupbox.
Referenced by WrapperProperties().
|
private |
The main volume slider.
Referenced by ItemWasClicked(), and WrapperProperties().
|
private |
The main volume spinbox.
Referenced by WrapperProperties().
|
private |
The spoiler group containing the volume sliders
Referenced by ItemWasClicked(), and WrapperProperties().
|
private |
The VAC volume slider.
Referenced by ItemWasClicked(), and WrapperProperties().
|
private |
The VAC volume spinbox.
Referenced by WrapperProperties().
|
private |
The widget that will display the sound list. (check CustomListWidget class).
Referenced by AddSound(), AddSoundFromDrop(), AddSoundFromUrl(), closeEvent(), RadioPressed(), and WrapperProperties().
|
private |
The instructions/hints under the sound list.
Referenced by WrapperProperties().
|
private |
The index of the VAC output device.
Referenced by WrapperProperties().
|
private |
Layout.
Referenced by WrapperProperties().