Entropy Piano Tuner
1.1.3 (documentation not yet complete)
An open-source experimental software for piano tuning by entropy minimization
|
Core initialization adapter (singleton class). More...
#include <coreinitialisationadapter.h>
Public Member Functions | |
CoreInitialisationAdapter () | |
Singleton constructor. Resets the unique pointer to the only instance of the class. More... | |
virtual void | create ()=0 |
Create the initialization dialog box. More... | |
virtual void | destroy ()=0 |
Destroy the initialization dialog box. More... | |
virtual void | updateProgress (int percentage)=0 |
Show the current progress as a progress bar in the initialization message box. More... | |
Static Private Attributes | |
static std::unique_ptr < CoreInitialisationAdapter > | mSingleton |
CoreInitialisationAdapter::mSingleton. More... | |
Core initialization adapter (singleton class).
This adapter is part of the interface between the core and the GUI. The purpose of this adapter and its derived implementation in the GUI is to show a message box during the initialization process of the main application. Moreover, it informs about the progress of the initialization process in regular intervals by showing an advancing progress bar.
The class is reimplemented in Qt as QtCoreInitialisation (see initializediagol.h). It is instantiated in tunerapplication.cpp and passed via pointer to init(...) of the core. The core itself calls create(), performs the initialization and calls the function updateProgress between all the steps. Finally the core calls destroy().
Definition at line 49 of file coreinitialisationadapter.h.
CoreInitialisationAdapter::CoreInitialisationAdapter | ( | ) |
Singleton constructor. Resets the unique pointer to the only instance of the class.
Definition at line 46 of file coreinitialisationadapter.cpp.
|
pure virtual |
Create the initialization dialog box.
Implemented in QtCoreInitialisation.
|
pure virtual |
Destroy the initialization dialog box.
Implemented in QtCoreInitialisation.
|
pure virtual |
Show the current progress as a progress bar in the initialization message box.
percentage | : Percentage of progress between 0 and 100 |
Implemented in QtCoreInitialisation.
|
staticprivate |
CoreInitialisationAdapter::mSingleton.
This is a unique pointer belonging to the CoreInitializationAdapter and pointing onto itself. It holds the only instance of the CoreInitializationAdapter, which is defined as a singleton class.
Definition at line 52 of file coreinitialisationadapter.h.