![]() |
Mixxx
|
00001 #ifndef DLGTRIAGE_H 00002 #define DLGTRIAGE_H 00003 00004 #include <QItemSelection> 00005 #include "ui_dlgprepare.h" 00006 #include "configobject.h" 00007 #include "library/libraryview.h" 00008 #include "library/trackcollection.h" 00009 00010 class PrepareLibraryTableModel; 00011 class WPrepareCratesTableView; 00012 class WPrepareLibraryTableView; 00013 class QSqlTableModel; 00014 class CrateView; 00015 00016 class DlgPrepare : public QWidget, public Ui::DlgPrepare, public virtual LibraryView { 00017 Q_OBJECT 00018 public: 00019 DlgPrepare(QWidget *parent, 00020 ConfigObject<ConfigValue>* pConfig, 00021 TrackCollection* pTrackCollection); 00022 virtual ~DlgPrepare(); 00023 00024 virtual void setup(QDomNode node); 00025 virtual void onSearchStarting(); 00026 virtual void onSearchCleared(); 00027 virtual void onSearch(const QString& text); 00028 virtual void onShow(); 00029 virtual void loadSelectedTrack(); 00030 virtual void loadSelectedTrackToGroup(QString group); 00031 virtual void moveSelection(int delta); 00032 00033 public slots: 00034 void tableSelectionChanged(const QItemSelection& selected, 00035 const QItemSelection& deselected); 00036 void selectAll(); 00037 void analyze(); 00038 void trackAnalysisFinished(TrackPointer tio); 00039 void trackAnalysisProgress(TrackPointer tio, int progress); 00040 void showRecentSongs(); 00041 void showAllSongs(); 00042 void installEventFilter(QObject* pFilter); 00043 void analysisActive(bool bActive); 00044 00045 signals: 00046 void loadTrack(TrackPointer pTrack); 00047 void loadTrackToPlayer(TrackPointer pTrack, QString player); 00048 void analyzeTracks(QList<int> trackIds); 00049 void stopAnalysis(); 00050 00051 private: 00052 //Note m_pTrackTablePlaceholder is defined in the .ui file 00053 ConfigObject<ConfigValue>* m_pConfig; 00054 TrackCollection* m_pTrackCollection; 00055 bool m_bAnalysisActive; 00056 QButtonGroup m_songsButtonGroup; 00057 WPrepareLibraryTableView* m_pPrepareLibraryTableView; 00058 PrepareLibraryTableModel* m_pPrepareLibraryTableModel; 00059 WPrepareCratesTableView* m_pPrepareCratesTableView; 00060 CrateView* m_pCrateView; 00061 QSqlTableModel* m_pCratesTableModel; 00062 }; 00063 00064 #endif //DLGTRIAGE_H