Miam-Player  0.8.0
A nice music player
treeview.h
Go to the documentation of this file.
1 #ifndef TREEVIEW_H
2 #define TREEVIEW_H
3 
4 #include <QMessageBox>
5 #include <QTreeView>
7 #include <model/trackdao.h>
8 
14 class MIAMCORE_LIBRARY TreeView : public QTreeView, public SelectedTracksModel
15 {
16  Q_OBJECT
17 public:
18  explicit TreeView(QWidget *parent = nullptr);
19 
20  virtual ~TreeView();
21 
23  virtual void findAll(const QModelIndex &index, QList<QUrl> *tracks) const = 0;
24 
25  virtual QList<QUrl> selectedTracks() override;
26 
27 protected:
29  virtual int countAll(const QModelIndexList &indexes) const = 0;
30 
32  virtual bool eventFilter(QObject *obj, QEvent *event) override;
33 
34  virtual void startDrag(Qt::DropActions supportedActions) override;
35 
36 private:
38  QMessageBox::StandardButton beforeSending(const QString &target, QList<QUrl> *tracks);
39 
40 public slots:
42  void appendToPlaylist();
43 
45  void openTagEditor();
46 
47 signals:
49  void aboutToInsertToPlaylist(int rowIndex, const QList<QUrl> &tracks);
50 
52  void aboutToSendToTagEditor(const QList<QUrl> &tracks);
53 };
54 
55 #endif // TREEVIEW_H
The TreeView class is the base class for displaying trees in the player.
Definition: treeview.h:14
The SelectedTracksModel class.
Definition: selectedtracksmodel.h:14
virtual QList< QUrl > selectedTracks()=0
#define MIAMCORE_LIBRARY
Definition: miamcore_global.h:11