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

The HookController class. More...

#include <HookController.h>

Collaboration diagram for LIDL::Controller::HookController:
Collaboration graph

Public Member Functions

void SetHooks ()
 SetHooks Sets up the hooks. More...
 
void UnSetHooks ()
 UnSetHooks Unregister the hooks (before closing app, because if you don't unregister them close the app, and switch to another window fast it will trigger a "must construct QApplication before QPixMap" error and crash because of the overlay still trying to show. More...
 

Static Public Member Functions

static HookControllerGetInstance ()
 GetInstace. More...
 
static ProfileGetProfileForExe (HWND handle)
 GetProfileForExe. More...
 

Private Member Functions

 HookController ()
 

Private Attributes

QVector< HWINEVENTHOOK > _hookHandles
 

Static Private Attributes

static HookControllerself = nullptr
 

Detailed Description

The HookController class.

The singleton dealing with registering and unregistering the WinApi hooks

Constructor & Destructor Documentation

◆ HookController()

LIDL::Controller::HookController::HookController ( )
private

Referenced by GetInstance().

Here is the caller graph for this function:

Member Function Documentation

◆ GetInstance()

HookController * LIDL::Controller::HookController::GetInstance ( )
static

GetInstace.

Returns

References HookController().

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

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

◆ GetProfileForExe()

Profile * LIDL::Controller::HookController::GetProfileForExe ( HWND  handle)
static

GetProfileForExe.

Returns
A pointer to the correct profile, or nullptr if no profile was found !

Basically will: Get the full path to the executable linked to the window Transform it to linux style path with forward slash Search for it in the array of profile using the designated method in SettingsController

References FALSE, LIDL::Controller::ProfileController::GetInstance(), and LIDL::Controller::ProfileController::GetProfileForExe().

Referenced by LIDL::Callback::ShowOverlay().

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

◆ SetHooks()

void LIDL::Controller::HookController::SetHooks ( )

SetHooks Sets up the hooks.

References _hookHandles, LIDL::Callback::ResizeToWindow(), LIDL::Callback::ShowOverlay(), and UnSetHooks().

Referenced by SoundboardMainUI::SoundboardMainUI().

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

◆ UnSetHooks()

void LIDL::Controller::HookController::UnSetHooks ( )

UnSetHooks Unregister the hooks (before closing app, because if you don't unregister them close the app, and switch to another window fast it will trigger a "must construct QApplication before QPixMap" error and crash because of the overlay still trying to show.

References _hookHandles.

Referenced by SoundboardMainUI::closeEvent(), and SetHooks().

Here is the caller graph for this function:

Member Data Documentation

◆ _hookHandles

QVector<HWINEVENTHOOK> LIDL::Controller::HookController::_hookHandles
private

Referenced by SetHooks(), and UnSetHooks().

◆ self

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

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