LIDL Soundboard  1.9.0
A simple soundboard, yet better than EXP Soundboard forsenE
LIDL::Controller::SaveController Class Reference

#include <SaveController.h>

Inheritance diagram for LIDL::Controller::SaveController:
Inheritance graph
Collaboration diagram for LIDL::Controller::SaveController:
Collaboration graph

Signals

void Clear ()
 
void SetDevices (QString main, QString vac)
 
void SetStopShortcut (QKeySequence ks, int virtualKey)
 
void lidlJsonDetected (QFileInfo)
 

Public Member Functions

QJsonObject GenerateSaveFile () const
 GenerateSaveFile. More...
 
void SetMainOutputDevice (QString)
 SetMainOutputDevice Only used to remember which device was set, in order to save it to the JSON. More...
 
void SetVacOutputDevice (QString)
 SetVacOutputDevice Only used to remember which device was set, in order to save it to the JSON. More...
 
QString GetMainOutputDevice () const
 GetMainOutputDevice. More...
 
QString GetVacOutputDevice () const
 GetVacOutputDevice. More...
 
void SaveAs (QString fileName="")
 SaveAs. More...
 
void Save ()
 Save. More...
 
void SetStopKeyName (QString name)
 SetStopKeyName. More...
 
void SetStopVirtualKey (unsigned int vk)
 SetStopVirtualKey. More...
 
void OpenSaveFile (QString fileName="")
 OpenSaveFile. More...
 
int CheckAndPromptIfNeedsSaving ()
 CheckIfNeedsSaving Checks if the soundboard needs saving. IE is the previous stored snapshot equal to the new. More...
 
void SaveState ()
 SaveState Saves the soundboard in the _snapshot variable. More...
 
bool NeedsSaving ()
 
QString GetSaveName () const
 

Static Public Member Functions

static SaveControllerGetInstance ()
 

Private Member Functions

 SaveController ()
 
void ParseOldSave (QJsonObject json)
 

Private Attributes

QString _mainOutputDevice
 
QString _vacOutputDevice
 
QString _saveName
 
QString _stopKeyName
 
unsigned int _stopVirtualKey
 
QJsonObject _snapshot
 

Static Private Attributes

static SaveControllerself = nullptr
 

Constructor & Destructor Documentation

◆ SaveController()

LIDL::Controller::SaveController::SaveController ( )
private

References LIDL::Controller::SettingsController::addFileToRecent(), LIDL::Controller::SettingsController::GetInstance(), and lidlJsonDetected().

Referenced by GetInstance().

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

Member Function Documentation

◆ CheckAndPromptIfNeedsSaving()

int LIDL::Controller::SaveController::CheckAndPromptIfNeedsSaving ( )

CheckIfNeedsSaving Checks if the soundboard needs saving. IE is the previous stored snapshot equal to the new.

References _snapshot, GenerateSaveFile(), and Save().

Referenced by OpenSaveFile().

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

◆ Clear

void LIDL::Controller::SaveController::Clear ( )
signal

Referenced by OpenSaveFile(), and SoundboardMainUI::SoundboardMainUI().

Here is the caller graph for this function:

◆ GenerateSaveFile()

QJsonObject LIDL::Controller::SaveController::GenerateSaveFile ( ) const

GenerateSaveFile.

Returns

References _mainOutputDevice, _stopKeyName, _stopVirtualKey, _vacOutputDevice, LIDL::Controller::SettingsController::GetInstance(), and LIDL::Controller::ProfileController::GetInstance().

Referenced by CheckAndPromptIfNeedsSaving(), NeedsSaving(), OpenSaveFile(), SaveAs(), and SaveState().

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

◆ GetInstance()

◆ GetMainOutputDevice()

QString LIDL::Controller::SaveController::GetMainOutputDevice ( ) const

GetMainOutputDevice.

Returns

References _mainOutputDevice.

◆ GetSaveName()

QString LIDL::Controller::SaveController::GetSaveName ( ) const

References _saveName.

Referenced by SoundboardMainUI::SetStatusTextEditText().

Here is the caller graph for this function:

◆ GetVacOutputDevice()

QString LIDL::Controller::SaveController::GetVacOutputDevice ( ) const

GetVacOutputDevice.

Returns

References _vacOutputDevice.

◆ lidlJsonDetected

void LIDL::Controller::SaveController::lidlJsonDetected ( QFileInfo  )
signal

Referenced by OpenSaveFile(), SaveAs(), and SaveController().

Here is the caller graph for this function:

◆ NeedsSaving()

bool LIDL::Controller::SaveController::NeedsSaving ( )

References _snapshot, and GenerateSaveFile().

Here is the call graph for this function:

◆ OpenSaveFile()

void LIDL::Controller::SaveController::OpenSaveFile ( QString  fileName = "")

OpenSaveFile.

References _saveName, _snapshot, Profile::Builder::addExe(), LIDL::Controller::ProfileController::AddProfile(), LIDL::Controller::SettingsController::addShowFlag(), LIDL::Controller::ProfileController::AutomaticConfigurationChange(), Profile::Builder::Build(), CheckAndPromptIfNeedsSaving(), LIDL::SFX::chorus, Clear(), LIDL::SFX::compressor, LIDL::SFX::distortion, BASS_DX8_GARGLE::dwRateHz, BASS_DX8_GARGLE::dwWaveShape, LIDL::SFX::echo, BASS_DX8_COMPRESSOR::fAttack, BASS_DX8_CHORUS::fDelay, BASS_DX8_FLANGER::fDelay, BASS_DX8_CHORUS::fDepth, BASS_DX8_FLANGER::fDepth, BASS_DX8_DISTORTION::fEdge, BASS_DX8_CHORUS::fFeedback, BASS_DX8_ECHO::fFeedback, BASS_DX8_FLANGER::fFeedback, BASS_DX8_CHORUS::fFrequency, BASS_DX8_FLANGER::fFrequency, BASS_DX8_COMPRESSOR::fGain, BASS_DX8_DISTORTION::fGain, LIDL::SFX::flags, LIDL::SFX::flanger, BASS_DX8_ECHO::fLeftDelay, BASS_DX8_DISTORTION::fPostEQBandwidth, BASS_DX8_DISTORTION::fPostEQCenterFrequency, BASS_DX8_COMPRESSOR::fPredelay, BASS_DX8_DISTORTION::fPreLowpassCutoff, BASS_DX8_COMPRESSOR::fRatio, BASS_DX8_COMPRESSOR::fRelease, BASS_DX8_ECHO::fRightDelay, BASS_DX8_COMPRESSOR::fThreshold, BASS_DX8_CHORUS::fWetDryMix, BASS_DX8_ECHO::fWetDryMix, LIDL::SFX::gargle, GenerateSaveFile(), LIDL::Controller::SettingsController::GetDefaultMainVolume(), LIDL::Controller::SettingsController::GetDefaultVacVolume(), LIDL::Controller::SettingsController::GetInstance(), LIDL::Controller::ProfileController::GetInstance(), lidlJsonDetected(), BASS_DX8_ECHO::lPanDelay, BASS_DX8_CHORUS::lPhase, BASS_DX8_FLANGER::lPhase, BASS_DX8_CHORUS::lWaveform, BASS_DX8_FLANGER::lWaveform, ParseOldSave(), Save(), LIDL::Sequential, SetDevices(), Profile::Builder::setName(), Profile::Builder::setPttKeySequence(), Profile::Builder::setPttScanCode(), Profile::Builder::setPttVirtualKey(), Profile::Builder::setSounds(), SetStopShortcut(), LIDL::SHOW_SFX, LIDL::Singleton, and LIDL::WRAP_SONG_LIST.

Referenced by SoundboardMainUI::dropEvent(), SoundboardMainUI::OpenSlot(), SoundboardMainUI::PostConstruction(), and SoundboardMainUI::SetUpRecentMenu().

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

◆ ParseOldSave()

void LIDL::Controller::SaveController::ParseOldSave ( QJsonObject  json)
private

References LIDL::Controller::ProfileController::AddProfile(), Profile::Builder::Build(), LIDL::SFX::chorus, LIDL::SFX::compressor, LIDL::SFX::distortion, BASS_DX8_GARGLE::dwRateHz, BASS_DX8_GARGLE::dwWaveShape, LIDL::SFX::echo, BASS_DX8_COMPRESSOR::fAttack, BASS_DX8_CHORUS::fDelay, BASS_DX8_FLANGER::fDelay, BASS_DX8_CHORUS::fDepth, BASS_DX8_FLANGER::fDepth, BASS_DX8_DISTORTION::fEdge, BASS_DX8_CHORUS::fFeedback, BASS_DX8_ECHO::fFeedback, BASS_DX8_FLANGER::fFeedback, BASS_DX8_CHORUS::fFrequency, BASS_DX8_FLANGER::fFrequency, BASS_DX8_COMPRESSOR::fGain, BASS_DX8_DISTORTION::fGain, LIDL::SFX::flags, LIDL::SFX::flanger, BASS_DX8_ECHO::fLeftDelay, BASS_DX8_DISTORTION::fPostEQBandwidth, BASS_DX8_DISTORTION::fPostEQCenterFrequency, BASS_DX8_COMPRESSOR::fPredelay, BASS_DX8_DISTORTION::fPreLowpassCutoff, BASS_DX8_COMPRESSOR::fRatio, BASS_DX8_COMPRESSOR::fRelease, BASS_DX8_ECHO::fRightDelay, BASS_DX8_COMPRESSOR::fThreshold, BASS_DX8_CHORUS::fWetDryMix, BASS_DX8_ECHO::fWetDryMix, LIDL::SFX::gargle, LIDL::Controller::SettingsController::GetDefaultMainVolume(), LIDL::Controller::SettingsController::GetDefaultVacVolume(), LIDL::Controller::SettingsController::GetInstance(), LIDL::Controller::ProfileController::GetInstance(), BASS_DX8_ECHO::lPanDelay, BASS_DX8_CHORUS::lPhase, BASS_DX8_FLANGER::lPhase, BASS_DX8_CHORUS::lWaveform, BASS_DX8_FLANGER::lWaveform, LIDL::Sequential, Profile::Builder::setPttKeySequence(), Profile::Builder::setPttScanCode(), Profile::Builder::setPttVirtualKey(), Profile::Builder::setSounds(), and LIDL::Singleton.

Referenced by OpenSaveFile().

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

◆ Save()

void LIDL::Controller::SaveController::Save ( )

Save.

References _saveName, and SaveAs().

Referenced by CheckAndPromptIfNeedsSaving(), OpenSaveFile(), and SoundboardMainUI::Save().

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

◆ SaveAs()

void LIDL::Controller::SaveController::SaveAs ( QString  fileName = "")

SaveAs.

References _saveName, _snapshot, GenerateSaveFile(), LIDL::Controller::SettingsController::GetInstance(), and lidlJsonDetected().

Referenced by Save(), and SoundboardMainUI::SaveAs().

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

◆ SaveState()

void LIDL::Controller::SaveController::SaveState ( )

SaveState Saves the soundboard in the _snapshot variable.

References _snapshot, and GenerateSaveFile().

Referenced by SoundboardMainUI::PostConstruction(), and SoundboardMainUI::SoundboardMainUI().

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

◆ SetDevices

void LIDL::Controller::SaveController::SetDevices ( QString  main,
QString  vac 
)
signal

Referenced by OpenSaveFile(), and SoundboardMainUI::SoundboardMainUI().

Here is the caller graph for this function:

◆ SetMainOutputDevice()

void LIDL::Controller::SaveController::SetMainOutputDevice ( QString  device)

SetMainOutputDevice Only used to remember which device was set, in order to save it to the JSON.

References _mainOutputDevice.

Referenced by SoundboardMainUI::SoundboardMainUI().

Here is the caller graph for this function:

◆ SetStopKeyName()

void LIDL::Controller::SaveController::SetStopKeyName ( QString  name)

SetStopKeyName.

References _stopKeyName.

Referenced by SoundboardMainUI::setStopShortcut().

Here is the caller graph for this function:

◆ SetStopShortcut

void LIDL::Controller::SaveController::SetStopShortcut ( QKeySequence  ks,
int  virtualKey 
)
signal

Referenced by OpenSaveFile(), and SoundboardMainUI::SoundboardMainUI().

Here is the caller graph for this function:

◆ SetStopVirtualKey()

void LIDL::Controller::SaveController::SetStopVirtualKey ( unsigned int  vk)

SetStopVirtualKey.

Parameters
vk

References _stopVirtualKey.

Referenced by SoundboardMainUI::setStopShortcut().

Here is the caller graph for this function:

◆ SetVacOutputDevice()

void LIDL::Controller::SaveController::SetVacOutputDevice ( QString  device)

SetVacOutputDevice Only used to remember which device was set, in order to save it to the JSON.

References _vacOutputDevice.

Referenced by SoundboardMainUI::SoundboardMainUI().

Here is the caller graph for this function:

Member Data Documentation

◆ _mainOutputDevice

QString LIDL::Controller::SaveController::_mainOutputDevice
private

◆ _saveName

QString LIDL::Controller::SaveController::_saveName
private

◆ _snapshot

QJsonObject LIDL::Controller::SaveController::_snapshot
private

◆ _stopKeyName

QString LIDL::Controller::SaveController::_stopKeyName
private

Referenced by GenerateSaveFile(), and SetStopKeyName().

◆ _stopVirtualKey

unsigned int LIDL::Controller::SaveController::_stopVirtualKey
private

◆ _vacOutputDevice

QString LIDL::Controller::SaveController::_vacOutputDevice
private

◆ self

SaveController * LIDL::Controller::SaveController::self = nullptr
staticprivate

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