![]() |
LIDL Soundboard
1.9.0
A simple soundboard, yet better than EXP Soundboard forsenE
|
The Profile class Describe a profile: Name List of linked executable that will make this profile switched to when the executable is detected List of sounds as a QVector<shared_ptr<SoundWrapper>> The owner ship of those element is shared between the profile and the main ui. So reference count should be like this: More...
#include <Profile.h>

Classes | |
| class | Builder |
Public Member Functions | |
| QString | GetName () const |
| GetName. More... | |
| void | SetName (QString newName) |
| SetName. More... | |
| QSet< QString > | GetGameList () const |
| GetGameList. More... | |
| void | SwapGames (QSet< QString > newListHYPERBRUH) |
| SwapGames. More... | |
| QString | GetConfigAsString () const |
| GetConfig. More... | |
| bool | IsContainingExe (QString exe) const |
| IsExeHere Search for an executable in _exeList. More... | |
| QVector< std::shared_ptr< SoundWrapper > > | GetSounds () const |
| GetSounds. More... | |
| void | AddSound (std::shared_ptr< SoundWrapper > wrapper) |
| AddSound. More... | |
| void | RemoveSoundFromSharedPtr (std::shared_ptr< SoundWrapper > wrapper) |
| RemoveSoundFromSharedPtr. More... | |
| void | SwapSound (std::shared_ptr< SoundWrapper > oldWrapper, std::shared_ptr< SoundWrapper > newWrapper) |
| SwapSound. More... | |
| Profile * | GetParent () const |
| GetParent. More... | |
| void | ClearSounds () |
| ClearSounds Remove every sound from the array. More... | |
| void | SetPttScanCode (int sc) |
| SetPttScanCode. More... | |
| void | SetPttVirtualKey (int vk) |
| SetPttVirtualKey. More... | |
| int | GetPttScanCode () const |
| GetPttScanCode. More... | |
| int | GetPttVirtualKey () const |
| GetPttVirtualKey. More... | |
| void | SetPttKeySequence (QKeySequence sequence) |
| SetPttKeySequence. More... | |
| QKeySequence | GetPttKeySequence () const |
| SetPttKeySequence. More... | |
| QJsonObject | GetProfileAsObject () const |
| GetProfileAsObject. More... | |
| ~Profile () | |
Private Member Functions | |
| Profile (QString name, QSet< QString > exe, Profile *parent, QVector< std::shared_ptr< SoundWrapper >> wrappers, int PttVirtualKey, int PttScanCode, QKeySequence PttKeySequence) | |
Private Attributes | |
| QString | _name |
| QSet< QString > | _exeList |
| Profile * | _parent |
| QVector< std::shared_ptr< SoundWrapper > > | _sounds |
| int | _PTTVirtualKey = -1 |
| int | _PTTScanCode = -1 |
| QKeySequence | _PTTKeySequence |
The Profile class Describe a profile: Name List of linked executable that will make this profile switched to when the executable is detected List of sounds as a QVector<shared_ptr<SoundWrapper>> The owner ship of those element is shared between the profile and the main ui. So reference count should be like this:
|
private |
| void Profile::AddSound | ( | std::shared_ptr< SoundWrapper > | wrapper | ) |
AddSound.
| The | wrapper to append to _sounds |
References _sounds.
Referenced by LIDL::Controller::ProfileController::AddProfile(), and SoundboardMainUI::addSound().

| void Profile::ClearSounds | ( | ) |
ClearSounds Remove every sound from the array.
References _sounds.
Referenced by LIDL::Controller::ProfileController::AutomaticConfigurationChange(), and LIDL::Controller::ProfileController::ManualGameConfigurationChanged().

| QString Profile::GetConfigAsString | ( | ) | const |
GetConfig.
References _exeList, and _name.
Referenced by LIDL::Controller::ProfileController::AddProfile().

| QSet< QString > Profile::GetGameList | ( | ) | const |
GetGameList.
References _exeList.
Referenced by ProfileEdit::ProfileEdit().

| QString Profile::GetName | ( | ) | const |
GetName.
References _name.
Referenced by LIDL::Controller::ProfileController::AddProfile(), SoundboardMainUI::addSound(), LIDL::Controller::ProfileController::AutomaticConfigurationChange(), LIDL::Controller::ProfileController::DeleteActiveProfile(), GetProfileAsObject(), ProfileEdit::ProfileEdit(), GameSelector::RefreshProfiles(), LIDL::OverlayController::ShowGameOverlay(), and LIDL::Callback::ShowOverlay().

| Profile * Profile::GetParent | ( | ) | const |
GetParent.
References _parent.
Referenced by LIDL::Controller::ProfileController::AutomaticConfigurationChange(), and LIDL::Controller::ProfileController::ManualGameConfigurationChanged().

| QJsonObject Profile::GetProfileAsObject | ( | ) | const |
GetProfileAsObject.
References _exeList, _name, _parent, _PTTKeySequence, _PTTScanCode, _PTTVirtualKey, _sounds, and GetName().

| QKeySequence Profile::GetPttKeySequence | ( | ) | const |
SetPttKeySequence.
| sequence | Gets this profile Push To Talk QKeySequence |
References _PTTKeySequence.
Referenced by LIDL::Controller::ProfileController::AddProfile().

| int Profile::GetPttScanCode | ( | ) | const |
GetPttScanCode.
References _PTTScanCode.
Referenced by LIDL::Controller::ProfileController::AddProfile(), and LIDL::Controller::SettingsController::holdPTT().

| int Profile::GetPttVirtualKey | ( | ) | const |
GetPttVirtualKey.
References _PTTVirtualKey.
Referenced by LIDL::Controller::ProfileController::AddProfile(), and LIDL::Controller::SettingsController::holdPTT().

| QVector< std::shared_ptr< SoundWrapper > > Profile::GetSounds | ( | ) | const |
GetSounds.
References _sounds.
Referenced by LIDL::Controller::ProfileController::AddProfile(), LIDL::Controller::ProfileController::AutomaticConfigurationChange(), and LIDL::Controller::ProfileController::ManualGameConfigurationChanged().

| bool Profile::IsContainingExe | ( | QString | exe | ) | const |
IsExeHere Search for an executable in _exeList.
References _exeList.
| void Profile::RemoveSoundFromSharedPtr | ( | std::shared_ptr< SoundWrapper > | wrapper | ) |
RemoveSoundFromSharedPtr.
| wrapper | a shared_ptr |
Will remove a shared_ptr from the QVector (when the sound was deleted or replaced in the main UI)
References _sounds.
Referenced by SoundboardMainUI::SoundboardMainUI().

| void Profile::SetName | ( | QString | newName | ) |
| void Profile::SetPttKeySequence | ( | QKeySequence | sequence | ) |
SetPttKeySequence.
| sequence | Sets this profile Push To Talk QKeySequence |
References _PTTKeySequence.
Referenced by LIDL::Controller::ProfileController::AddProfile(), and SoundboardMainUI::SoundboardMainUI().

| void Profile::SetPttScanCode | ( | int | sc | ) |
SetPttScanCode.
| sc | Sets this profile Push To Talk Scan Code |
References _PTTScanCode.
Referenced by LIDL::Controller::ProfileController::AddProfile(), and SoundboardMainUI::SoundboardMainUI().

| void Profile::SetPttVirtualKey | ( | int | vk | ) |
SetPttVirtualKey.
| vk | Set this profile Push To Talk Virtual Key |
References _PTTVirtualKey.
Referenced by LIDL::Controller::ProfileController::AddProfile(), and SoundboardMainUI::SoundboardMainUI().

| void Profile::SwapGames | ( | QSet< QString > | newListHYPERBRUH | ) |
SwapGames.
| newListHYPERBRUH | Swap the executable list by the new list, useful when edition profiles. |
References _exeList.
| void Profile::SwapSound | ( | std::shared_ptr< SoundWrapper > | oldWrapper, |
| std::shared_ptr< SoundWrapper > | newWrapper | ||
| ) |
SwapSound.
| oldWrapper | |
| newWrapper | Will swap oldWrapper by newWrapper using shared_ptr<>::reset() Decreasing ref count of oldWrapper in the proccess |
References _sounds.
Referenced by SoundboardMainUI::addSound().

|
private |
Array of executables
Referenced by GetConfigAsString(), GetGameList(), GetProfileAsObject(), IsContainingExe(), and SwapGames().
|
private |
Referenced by GetConfigAsString(), GetName(), GetProfileAsObject(), SetName(), and ~Profile().
|
private |
Referenced by GetParent(), and GetProfileAsObject().
|
private |
Referenced by GetProfileAsObject(), GetPttKeySequence(), and SetPttKeySequence().
|
private |
Referenced by GetProfileAsObject(), GetPttScanCode(), and SetPttScanCode().
|
private |
Referenced by GetProfileAsObject(), GetPttVirtualKey(), and SetPttVirtualKey().
|
private |
Referenced by AddSound(), ClearSounds(), GetProfileAsObject(), GetSounds(), RemoveSoundFromSharedPtr(), SwapSound(), and ~Profile().