Mixxx

/home/maxime/Projets/Mixxx/1.10/mixxx/src/library/autodjfeature.h

Go to the documentation of this file.
00001 // AutoDJfeature.h
00002 // FORK FORK FORK on 11/1/2009 by Albert Santoni (alberts@mixxx.org)
00003 // Created 8/23/2009 by RJ Ryan (rryan@mit.edu)
00004 
00005 #ifndef AUTODJFEATURE_H
00006 #define AUTODJFEATURE_H
00007 
00008 #include <QStringListModel>
00009 
00010 #include "library/libraryfeature.h"
00011 #include "library/dao/playlistdao.h"
00012 #include "configobject.h"
00013 #include "treeitemmodel.h"
00014 
00015 class PlaylistTableModel;
00016 class TrackCollection;
00017 
00018 class AutoDJFeature : public LibraryFeature {
00019     Q_OBJECT
00020     public:
00021     AutoDJFeature(QObject* parent,
00022                   ConfigObject<ConfigValue>* pConfig,
00023                   TrackCollection* pTrackCollection);
00024     virtual ~AutoDJFeature();
00025 
00026     QVariant title();
00027     QIcon getIcon();
00028 
00029     bool dropAccept(QUrl url);
00030     bool dropAcceptChild(const QModelIndex& index, QUrl url);
00031     bool dragMoveAccept(QUrl url);
00032     bool dragMoveAcceptChild(const QModelIndex& index, QUrl url);
00033 
00034     void bindWidget(WLibrarySidebar* sidebarWidget,
00035                     WLibrary* libraryWidget,
00036                     MixxxKeyboard* keyboard);
00037 
00038     TreeItemModel* getChildModel();
00039 
00040 public slots:
00041     void activate();
00042     void activateChild(const QModelIndex& index);
00043     void onRightClick(const QPoint& globalPos);
00044     void onRightClickChild(const QPoint& globalPos, QModelIndex index);
00045     void onLazyChildExpandation(const QModelIndex& index);
00046 
00047 private:
00048     ConfigObject<ConfigValue>* m_pConfig;
00049     TrackCollection* m_pTrackCollection;
00050     PlaylistDAO& m_playlistDao;
00051     const static QString m_sAutoDJViewName;
00052     TreeItemModel m_childModel;
00053 };
00054 
00055 
00056 #endif /* AUTODJFEATURE_H */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines