Sayonara Player
application.h
1 /* application.h */
2 
3 /* Copyright (C) 2011-2016 Lucio Carreras
4  *
5  * This file is part of sayonara player
6  *
7  * This program is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11 
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16 
17  * You should have received a copy of the GNU General Public License
18  * along with this program. If not, see <http://www.gnu.org/licenses/>.
19  */
20 
21 #ifndef APPLICATION_H
22 #define APPLICATION_H
23 
24 #include <QApplication>
25 #include <QTranslator>
26 #include <QTime>
27 #include <QStringList>
28 
29 #include "Helper/Settings/SayonaraClass.h"
30 
31 class InstanceThread;
32 class DatabaseConnector;
33 class PlaylistHandler;
34 class GUI_Player;
35 
36 class Application : public QApplication, private SayonaraClass
37 {
38  Q_OBJECT
39 
40 public:
41  Application(int& argc, char** argv);
42  virtual ~Application();
43 
44  bool init(QTranslator* translator, const QStringList& files_to_play);
45 
46 
47 private:
48  void check_for_crash();
49  void init_single_instance_thread();
50 
51  GUI_Player* player=nullptr;
52  QTime* _timer=nullptr;
53 
54  PlaylistHandler* _plh=nullptr;
55  DatabaseConnector* _db=nullptr;
56  InstanceThread* _instance_thread=nullptr;
57 };
58 
59 
60 #endif // APPLICATION_H
61 
62 
Definition: GUI_Player.h:58
The SayonaraClass class provides access to Settings and notifications.
Definition: SayonaraClass.h:31
Definition: DatabaseConnector.h:40
Definition: InstanceThread.h:39
Definition: application.h:36
Global handler for playlists.
Definition: PlaylistHandler.h:47