Just Intonation  Version 1.3.1 (19)
Explore key-independent dynamically adapting tuning in just intonation
startupsound.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * Copyright 2016-2017 Karolin Stange, Christoph Wick, and Haye Hinrichsen
3  *
4  * This file is part of JustIntonation.
5  *
6  * JustIntonation is free software: you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by the
8  * Free Software Foundation, either version 3 of the License, or (at your
9  * option) any later version.
10  *
11  * JustIntonation is distributed in the hope that it will be useful, but
12  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13  * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14  * for more details.
15  *
16  * You should have received a copy of the GNU General Public License along
17  * with JustIntonation. If not, see http://www.gnu.org/licenses/.
18  *****************************************************************************/
19 
20 //=============================================================================
21 // Class for playing a startup sound
22 //=============================================================================
23 
24 #ifndef STARTUPSOUND_H
25 #define STARTUPSOUND_H
26 
27 #include <QObject>
28 #include <QMediaPlayer>
29 
30 #include "system/shared.h"
31 #include "system/log.h"
32 
45 
46 class StartupSound : public QObject , public Log
47 {
48  Q_OBJECT
49 public:
50  StartupSound(const QString& resourcefile);
51  bool isEnabled();
52 
53 public slots:
54  void enable (bool enabled);
55  void play (double volume);
56 
57 private:
58  QString mResourceFile;
59  QMediaPlayer mPlayer;
60 };
61 
62 #endif // STARTUPSOUND_H
QMediaPlayer mPlayer
Pointer to the player.
Definition: startupsound.h:59
QString mResourceFile
Resource file object.
Definition: startupsound.h:58
void play(double volume)
Play startup sound.
void enable(bool enabled)
Public slot: Enable / disable startup sound.
StartupSound(const QString &resourcefile)
Constructor.
bool isEnabled()
StartupSound::isEnabled.
Class for playing a startup soundThis module manages to play a short audio file at startup (welcome j...
Definition: startupsound.h:46
Base class for managing log messages.
Definition: log.h:83