![]() |
Mixxx
|
00001 /*************************************************************************** 00002 playerinfo.h - Helper class to have easy access 00003 to a lot of data (singleton) 00004 ------------------- 00005 copyright : (C) 2007 by Wesley Stessens 00006 ***************************************************************************/ 00007 00008 /*************************************************************************** 00009 * * 00010 * This program is free software; you can redistribute it and/or modify * 00011 * it under the terms of the GNU General Public License as published by * 00012 * the Free Software Foundation; either version 2 of the License, or * 00013 * (at your option) any later version. * 00014 * * 00015 ***************************************************************************/ 00016 00017 #ifndef PLAYERINFO_H 00018 #define PLAYERINFO_H 00019 00020 #include <QObject> 00021 #include <QMutex> 00022 #include <QMap> 00023 00024 00025 class ControlObjectThread; 00026 00027 #include "trackinfoobject.h" 00028 00029 class PlayerInfo : public QObject 00030 { 00031 Q_OBJECT 00032 public: 00033 static PlayerInfo &Instance(); 00034 TrackPointer getTrackInfo(QString group); 00035 void setTrackInfo(QString group, TrackPointer trackInfoObj); 00036 int getCurrentPlayingDeck(); 00037 TrackPointer getCurrentPlayingTrack(); 00038 private: 00039 PlayerInfo(); 00040 ~PlayerInfo(); 00041 PlayerInfo(PlayerInfo const&); 00042 PlayerInfo &operator= (PlayerInfo const&); 00043 QMutex m_mutex; 00044 int m_iNumDecks; 00045 ControlObjectThread* m_COxfader; 00046 QMap<QString, TrackPointer> m_loadedTrackMap; 00047 QMap<QString, ControlObjectThread*> m_listCOPlay; 00048 QMap<QString, ControlObjectThread*> m_listCOVolume; 00049 QMap<QString, ControlObjectThread*> m_listCOOrientation; 00050 QMap<QString, ControlObjectThread*> m_listCOpregain; 00051 }; 00052 00053 #endif