blob: fa8974bd8f9fbb4e1e09b41344650fe1038c6d7f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
|
// analysisfeature.h
// Created 8/23/2009 by RJ Ryan (rryan@mit.edu)
// Forked 11/11/2009 by Albert Santoni (alberts@mixxx.org)
#ifndef ANALYSISFEATURE_H
#define ANALYSISFEATURE_H
#include <QStringListModel>
#include <QUrl>
#include <QObject>
#include <QVariant>
#include <QIcon>
#include <QList>
#include "library/libraryfeature.h"
#include "preferences/usersettings.h"
#include "treeitemmodel.h"
#include "library/dlganalysis.h"
class AnalyzerQueue;
class TrackCollection;
class AnalysisFeature : public LibraryFeature {
Q_OBJECT
public:
AnalysisFeature(QObject* parent,
UserSettingsPointer pConfig,
TrackCollection* pTrackCollection);
virtual ~AnalysisFeature();
QVariant title();
QIcon getIcon();
bool dropAccept(QList<QUrl> urls, QObject* pSource);
bool dragMoveAccept(QUrl url);
void bindWidget(WLibrary* libraryWidget,
MixxxKeyboard* keyboard);
TreeItemModel* getChildModel();
void refreshLibraryModels();
signals:
void analysisActive(bool bActive);
void trackAnalysisStarted(int size);
public slots:
void activate();
void analyzeTracks(QList<TrackId> trackIds);
private slots:
void slotProgressUpdate(int num_left);
void stopAnalysis();
void cleanupAnalyzer();
private:
// Sets the title of this feature to the default name, given by
// m_sAnalysisTitleName
void setTitleDefault();
// Sets the title of this feature to the default name followed by (x / y)
// where x is the current track being analyzed and y is the total number of
// tracks in the job
void setTitleProgress(int trackNum, int totalNum);
UserSettingsPointer m_pConfig;
TrackCollection* m_pTrackCollection;
AnalyzerQueue* m_pAnalyzerQueue;
// Used to temporarily enable BPM detection in the prefs before we analyse
int m_iOldBpmEnabled;
// The title returned by title()
QVariant m_Title;
TreeItemModel m_childModel;
const static QString m_sAnalysisViewName;
QString m_analysisTitleName;
DlgAnalysis* m_pAnalysisView;
};
#endif /* ANALYSISFEATURE_H */
|