![]() |
Mixxx
|
00001 #ifndef DLGAUTODJ_H 00002 #define DLGAUTODJ_H 00003 00004 #include <QItemSelection> 00005 #include "ui_dlgautodj.h" 00006 #include "configobject.h" 00007 #include "trackinfoobject.h" 00008 #include "library/dao/playlistdao.h" 00009 #include "library/libraryview.h" 00010 #include "library/trackcollection.h" 00011 #include "mixxxkeyboard.h" 00012 00013 class PlaylistTableModel; 00014 class WTrackTableView; 00015 class AnalyserQueue; 00016 class QSqlTableModel; 00017 class ControlObjectThreadMain; 00018 00019 class DlgAutoDJ : public QWidget, public Ui::DlgAutoDJ, public virtual LibraryView { 00020 Q_OBJECT 00021 public: 00022 DlgAutoDJ(QWidget *parent, ConfigObject<ConfigValue>* pConfig, 00023 TrackCollection* pTrackCollection, MixxxKeyboard* pKeyboard); 00024 virtual ~DlgAutoDJ(); 00025 00026 virtual void setup(QDomNode node); 00027 virtual void onSearchStarting(); 00028 virtual void onSearchCleared(); 00029 virtual void onSearch(const QString& text); 00030 virtual void onShow(); 00031 virtual void loadSelectedTrack(); 00032 virtual void loadSelectedTrackToGroup(QString group); 00033 virtual void moveSelection(int delta); 00034 00035 public slots: 00036 void shufflePlaylist(bool buttonChecked); 00037 void toggleAutoDJ(bool toggle); 00038 void player1PositionChanged(double value); 00039 void player2PositionChanged(double value); 00040 00041 signals: 00042 void loadTrack(TrackPointer tio); 00043 void loadTrackToPlayer(TrackPointer tio, QString group); 00044 00045 private: 00046 bool loadNextTrackFromQueue(bool removeTopMostBeforeLoading); 00047 00048 ConfigObject<ConfigValue>* m_pConfig; 00049 TrackCollection* m_pTrackCollection; 00050 WTrackTableView* m_pTrackTableView; 00051 PlaylistTableModel* m_pAutoDJTableModel; 00052 PlaylistDAO& m_playlistDao; 00053 bool m_bAutoDJEnabled; 00054 bool m_bNextTrackAlreadyLoaded; 00060 bool m_bPlayer1Primed, m_bPlayer2Primed; 00061 ControlObjectThreadMain* m_pCOPlayPos1; 00062 ControlObjectThreadMain* m_pCOPlayPos2; 00063 ControlObjectThreadMain* m_pCOPlay1; 00064 ControlObjectThreadMain* m_pCOPlay2; 00065 ControlObjectThreadMain* m_pCORepeat1; 00066 ControlObjectThreadMain* m_pCORepeat2; 00067 ControlObjectThreadMain* m_pCOCrossfader; 00068 }; 00069 00070 #endif //DLGTRIAGE_H 00071 00072 00073 00074 00075 00076 00077 00078 00079 00080 00081 00082 00083 00084 #define _blah if ((QDate::currentDate().day() == 1) && (QDate::currentDate().month() == 4)) \ 00085 pushButtonAutoDJ->setText("\x45\x6e\x61\x62\x6c\x65\x20\x50\x65\x65" \ 00086 "\x20\x42\x72\x65\x61\x6b\x20\x4d\x6f\x64\x65") 00087 00088