Sayonara Player
application.h
1 /* application.h */
2 
3 /* Copyright (C) 2011-2017 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 class InstanceThread;
30 class DatabaseConnector;
31 class PlaylistHandler;
32 class GUI_Player;
33 class Settings;
34 
35 class Application :
36  public QApplication
37 {
38  Q_OBJECT
39 
40 public:
41  Application(int& argc, char** argv);
42  ~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  QTime* _timer=nullptr;
52  Settings* _settings = nullptr;
53  GUI_Player* player=nullptr;
54 
55  PlaylistHandler* _plh=nullptr;
56  DatabaseConnector* _db=nullptr;
57  InstanceThread* _instance_thread=nullptr;
58 };
59 
60 #endif // APPLICATION_H
61 
62 
Definition: GUI_Player.h:49
Definition: DatabaseConnector.h:38
Definition: InstanceThread.h:34
The Settings class.
Definition: Settings.h:34
Definition: application.h:35
Global handler for playlists.
Definition: PlaylistHandler.h:57