20 #ifndef TUNERAPPLICATION_H
21 #define TUNERAPPLICATION_H
23 #include <QApplication>
136 bool event(QEvent *e);
188 bool openFile(QString filePath,
bool cached);
226 #endif // TUNERAPPLICATION_H
bool notify(QObject *receiver, QEvent *event)
Reimplemented to catch exceptions.
static TunerApplication * mSingleton
The one and only instance.
int mMessageHandlerTimerId
Id of the timer that progresses the MessageHandler.
bool openFile(QString filePath, bool cached)
Open the given file.
QString mStartupFile
Absolute path to the startup file or an empty string.
AudioRecorderForQt mAudioRecorder
Instance of the Qt audio recorder.
Core * getCore()
Getter function for the core.
TunerApplication(int &argc, char **argv)
Constructor for the application.
std::shared_ptr< MainWindow > mMainWindow
Shared pointer of the MainWindow.
The main application singleton class.
void start()
Function to start the MainWindow and the Core.
static TunerApplication & getSingleton()
Getter for the singleton instance.
static TunerApplication * getSingletonPtr()
Getter for the singleton instance.
void playStartupSound()
Function to play the startup sound.
AudioPlayerForQt mAudioPlayer
Instance of the Qt audio player.
The AudioPlayerForQt class.
void exit()
Function called upon exitting the application.
std::shared_ptr< Core > mCore
Shared pointer of the Core.
void stop()
Function to stop the MainWindow and the Core.
int mLastExitCode
last exit code to detect if the application crashed
void stopCore()
Stop the core.
void initCore()
Initialising of the core.
void init()
Function to initialise the application.
CORE : Class managing the core.
void timerEvent(QTimerEvent *event)
Called when the internal timer was shot.
void startCore()
Start the core.
virtual ~TunerApplication()
Destructor of the application.
bool event(QEvent *e)
Handling of general events.
void exitCore()
Exit from the core.
static void setApplicationExitState(int errorcode=EXIT_SUCCESS)
This is sets the exit code if the app would be terminated now.
void onApplicationStateChanged(Qt::ApplicationState state)
Depending on the application state the core will be started or stopped.