![]() |
Just Intonation
Version 1.3.1 (19)
Explore key-independent dynamically adapting tuning in just intonation
|
Main application. More...
#include <application.h>
Public Slots | |
void | onClosedMidiLoopDetected () |
Slot: Closed Midi feedback loop discovered, inhibit converter. More... | |
void | onInputOutputStatusChanged () |
I/O configuration changed, cancel converter inhibition. More... | |
Signals | |
void | setQmlLocale (QVariant string) |
void | showDownloadDialog () |
void | getSettingsFromQml () |
void | sendMobileMessage (QVariant string) |
void | setQmlInstrumentNames (QVariant stringlist) |
void | setQmlSelectedInstrument (QVariant index) |
void | startLoadingInstrument (QString name) |
void | setAudioDeviceName (QVariant name) |
void | setAudioDeviceList (QVariant list, QVariant index) |
void | setAudioSampleRates (QVariant list, QVariant index) |
void | setAudioBufferSizes (QVariant buffer, QVariant packet) |
void | connectAudioDevice (bool active) |
void | signalCircularGauge (QVariant progression) |
void | setSelectedExample (QVariant number) |
Public Member Functions | |
Application (QApplication &app) | |
Application constructor. More... | |
void | init (QQmlApplicationEngine &engine) |
Initialization of the application. More... | |
void | start () |
Start the application and its components. More... | |
void | stop () |
Stop the application and its components. More... | |
void | exit () |
Exit from the application and all its components. More... | |
void | suspend () |
Suspend the application This function suspends the application and all modules. This is essential e.g. on mobile devices, when the application is sent to the background. More... | |
void | resume () |
resume More... | |
void | installTranslations () |
Install existing translations. More... | |
bool | restartRequested () |
Downloader * | getDownloader () |
bool | loadMidiFile (QString filename) |
Load a Midi file. More... | |
void | mobileMessage (QString msg) |
Show error message on mobile phone while it is connected to a keyboard. More... | |
void | setVerbosity (int verbosity) |
Set the verbosity level of the class-specific messages. More... | |
int | getVerbosity () |
Get the actual verbosity level. More... | |
Private Slots | |
void | handleApplicationStates (Qt::ApplicationState state) |
Function executed when application state changes (platform-dependent) Takes action if the state of the application changes. Needed for Android. More... | |
void | restartApplication () |
Restart the application by force. More... | |
void | changeLocale (QString locale) |
Slot: Change the language. More... | |
void | cancelLoading () |
Private slot: Cancel the loading process. More... | |
void | loadingFinished (bool success) |
Private slot: Loading finished. More... | |
void | loadInstrument (int selectedindex) |
Private slot: Load an instrument. More... | |
void | newInstrumentDownloaded (QString localpath) |
Private slot: New instrument downloaded. More... | |
void | allInstrumentsDownloaded () |
Private slot: All instrumenst downloaded. More... | |
void | startDownload (bool forced=false) |
Private slot: Start download. More... | |
void | selectAudioParameters (int devIndex, int srIndex, int buffersize, int packetsize) |
Private slot: Select audio parameters. More... | |
void | resetAudioParameters () |
Reset audio parameters. More... | |
void | playStartupSound () |
Play startup sound. More... | |
void | onAudioDevicesAdded (QStringList list) |
Private slot: New audio device added (test) More... | |
void | onAudioDevicesRemoved (QStringList list) |
Private slot: An audio device has been removed (test) More... | |
void | onChangeOfAvailableAudioDevices (QStringList list) |
Private slot: The list of availabel devices has changed (test) More... | |
void | onCurrentDeviceParametersChanged () |
Private slot: on current audio device parameters changed. More... | |
void | onConnectionSuccessfullyEstablished (bool success) |
Private slot: on audio connection established. More... | |
void | hearExample (int number) |
Private slot: Hear a Midi example. More... | |
void | emitAveragePitchProgression (double pitchProgression) |
Emit the newly calculated average pitch progression. More... | |
void | disableScreenSaver () |
void | enableScreenSaver () |
Private Member Functions | |
void | setInstrumentSelector (int index=0) |
Set the content of the instrument selector. More... | |
QStringList | updateShownInstrumentNames () |
Update the list of instruments in the Qml Combo box. More... | |
QString | shorten (const QString &device, int truncation=30) const |
Shorten very long device names. More... | |
Private Attributes | |
QApplication * | pApplication |
StartupSound | mStartupSound |
bool | mStarted |
QSettings | mSettings |
QString | mLocale |
bool | mRestartRequest |
QTranslator | mQtTranslator |
QTranslator | mAppTranslator |
Downloader | mDownloader |
FileHandler | mFileHandler |
MidiPlayer | mMidiPlayer |
Midi | mMidi |
MidiMicrotonal | mMidiMicrotonalConverter |
AudioOutput | mAudioOutput |
int | mNumberOfExample |
Instrument | mInstrument |
SoundGenerator | mSoundGenerator |
MidiHandler | mMidiHandler |
Tuner | mTuner |
LogFile | mTuningLog |
TouchscreenKeyboard | mKeyboard |
QStringList | mAvailableMidiDevices |
QStringList | mAvailableMidiOutputDevices |
QString | mCurrentMidiDevice |
bool | mMidiAutomaticRecognition |
bool | mMidiPlayerWasPlaying |
bool | mSuspended |
double | mLastEmittedPitchProgression |
Main application.
This class represents the main application which is the base QObject in the code. It manages the flow of init-start-supend-resume-stop-exit as well as certain system-related features. Moreover, it holds the instances of various modules. All signal-slot connections are channeled through this class.
Definition at line 60 of file application.h.
Application::Application | ( | QApplication & | app | ) |
Application constructor.
Definition at line 47 of file application.cpp.
|
privateslot |
Private slot: All instrumenst downloaded.
Definition at line 751 of file application.cpp.
|
privateslot |
Private slot: Cancel the loading process.
Definition at line 698 of file application.cpp.
|
privateslot |
Slot: Change the language.
locale | : Locale (e.g. en_US) of the selected language |
Changing the language at runtime is a difficult task. Therefore, this function simply terminates and restarts the application with the new locale.
Definition at line 509 of file application.cpp.
|
signal |
|
inlineprivateslot |
|
privateslot |
Emit the newly calculated average pitch progression.
This function restricted the displayed range of the pitch progression according to the range of the circular gauge
pitchProgression | : Value of the pitch progression in cents |
Definition at line 579 of file application.cpp.
|
inlineprivateslot |
void Application::exit | ( | ) |
Exit from the application and all its components.
Definition at line 367 of file application.cpp.
|
inline |
|
signal |
|
inherited |
|
privateslot |
Function executed when application state changes (platform-dependent) Takes action if the state of the application changes. Needed for Android.
Definition at line 442 of file application.cpp.
|
privateslot |
Private slot: Hear a Midi example.
number | : number of the Midi example to be played |
Definition at line 541 of file application.cpp.
void Application::init | ( | QQmlApplicationEngine & | engine | ) |
Initialization of the application.
This function initializes the application but it does not yet start the components. Moreover, the application is "wired" from here: For easy reference all signal-slot connections can be found here.
engine | : Reference to the QML application engine which handels the GUI |
Definition at line 103 of file application.cpp.
void Application::installTranslations | ( | ) |
Install existing translations.
This function installs the translation files for the application and for Qt.
Definition at line 465 of file application.cpp.
|
privateslot |
Private slot: Loading finished.
Definition at line 715 of file application.cpp.
|
privateslot |
Private slot: Load an instrument.
Definition at line 645 of file application.cpp.
bool Application::loadMidiFile | ( | QString | filename | ) |
Load a Midi file.
filename | : Name of the Midi file |
Definition at line 940 of file application.cpp.
void Application::mobileMessage | ( | QString | msg | ) |
Show error message on mobile phone while it is connected to a keyboard.
msg | : Message |
Definition at line 966 of file application.cpp.
|
privateslot |
Private slot: New instrument downloaded.
Definition at line 731 of file application.cpp.
|
privateslot |
Private slot: New audio device added (test)
list | : List of strings of the newly connected audio devices |
Definition at line 848 of file application.cpp.
|
privateslot |
Private slot: An audio device has been removed (test)
list | : List of strings of the removed audio devices |
Definition at line 862 of file application.cpp.
|
privateslot |
Private slot: The list of availabel devices has changed (test)
list | : List of strings of the available audio devices |
Definition at line 877 of file application.cpp.
|
slot |
Slot: Closed Midi feedback loop discovered, inhibit converter.
Definition at line 980 of file application.cpp.
|
privateslot |
Private slot: on audio connection established.
success | : True if connection was established successfully |
Definition at line 921 of file application.cpp.
|
privateslot |
Private slot: on current audio device parameters changed.
Definition at line 901 of file application.cpp.
|
slot |
I/O configuration changed, cancel converter inhibition.
Definition at line 995 of file application.cpp.
|
privateslot |
Play startup sound.
Definition at line 1036 of file application.cpp.
|
privateslot |
Reset audio parameters.
Definition at line 1008 of file application.cpp.
|
privateslot |
Restart the application by force.
Definition at line 490 of file application.cpp.
|
inline |
Definition at line 74 of file application.h.
void Application::resume | ( | ) |
|
privateslot |
Private slot: Select audio parameters.
devIndex | |
srIndex | |
buffersize | |
packetsize |
Definition at line 805 of file application.cpp.
|
signal |
|
signal |
|
signal |
|
signal |
|
signal |
|
private |
Set the content of the instrument selector.
Definition at line 628 of file application.cpp.
|
signal |
|
signal |
|
signal |
|
signal |
|
inherited |
|
private |
Shorten very long device names.
device | : String of the device name |
truncation | : Maximal number of characters |
Definition at line 770 of file application.cpp.
|
signal |
|
signal |
void Application::start | ( | ) |
Start the application and its components.
Definition at line 306 of file application.cpp.
|
privateslot |
Private slot: Start download.
Definition at line 525 of file application.cpp.
|
signal |
void Application::stop | ( | ) |
Stop the application and its components.
Definition at line 340 of file application.cpp.
void Application::suspend | ( | ) |
Suspend the application This function suspends the application and all modules. This is essential e.g. on mobile devices, when the application is sent to the background.
Definition at line 390 of file application.cpp.
|
private |
Update the list of instruments in the Qml Combo box.
Definition at line 597 of file application.cpp.
|
private |
Definition at line 157 of file application.h.
|
private |
Definition at line 164 of file application.h.
|
private |
Definition at line 172 of file application.h.
|
private |
Definition at line 173 of file application.h.
|
private |
Definition at line 174 of file application.h.
|
private |
Definition at line 158 of file application.h.
|
private |
Definition at line 159 of file application.h.
|
private |
Definition at line 166 of file application.h.
|
private |
Definition at line 171 of file application.h.
|
private |
Definition at line 178 of file application.h.
|
private |
Definition at line 154 of file application.h.
|
private |
Definition at line 162 of file application.h.
|
private |
Definition at line 175 of file application.h.
|
private |
Definition at line 168 of file application.h.
|
private |
Definition at line 163 of file application.h.
|
private |
Definition at line 161 of file application.h.
|
private |
Definition at line 176 of file application.h.
|
private |
Definition at line 165 of file application.h.
|
private |
Definition at line 156 of file application.h.
|
private |
Definition at line 155 of file application.h.
|
private |
Definition at line 153 of file application.h.
|
private |
Definition at line 167 of file application.h.
|
private |
Definition at line 152 of file application.h.
|
private |
Definition at line 151 of file application.h.
|
private |
Definition at line 177 of file application.h.
|
private |
Definition at line 169 of file application.h.
|
private |
Definition at line 170 of file application.h.
|
private |
Definition at line 150 of file application.h.