![]() |
Mixxx
|
00001 // mixxxlibraryfeature.h 00002 // Created 8/23/2009 by RJ Ryan (rryan@mit.edu) 00003 00004 #ifndef MIXXXLIBRARYFEATURE_H 00005 #define MIXXXLIBRARYFEATURE_H 00006 00007 #include <QStringListModel> 00008 00009 #include "library/libraryfeature.h" 00010 #include "treeitemmodel.h" 00011 00012 class BaseTrackCache; 00013 class LibraryTableModel; 00014 class MissingTableModel; 00015 class TrackCollection; 00016 00017 class MixxxLibraryFeature : public LibraryFeature { 00018 Q_OBJECT 00019 public: 00020 MixxxLibraryFeature(QObject* parent, 00021 TrackCollection* pTrackCollection); 00022 virtual ~MixxxLibraryFeature(); 00023 00024 QVariant title(); 00025 QIcon getIcon(); 00026 bool dropAccept(QUrl url); 00027 bool dropAcceptChild(const QModelIndex& index, QUrl url); 00028 bool dragMoveAccept(QUrl url); 00029 bool dragMoveAcceptChild(const QModelIndex& index, QUrl url); 00030 TreeItemModel* getChildModel(); 00031 00032 public slots: 00033 void activate(); 00034 void activateChild(const QModelIndex& index); 00035 void onRightClick(const QPoint& globalPos); 00036 void onRightClickChild(const QPoint& globalPos, QModelIndex index); 00037 void onLazyChildExpandation(const QModelIndex& index); 00038 void refreshLibraryModels(); 00039 00040 private: 00041 QSharedPointer<BaseTrackCache> m_pBaseTrackCache; 00042 LibraryTableModel* m_pLibraryTableModel; 00043 MissingTableModel* m_pMissingTableModel; 00044 TreeItemModel m_childModel; 00045 }; 00046 00047 #endif /* MIXXXLIBRARYFEATURE_H */