Miam-Player  0.8.0
A nice music player
filesystemtreeview.h
Go to the documentation of this file.
1 #ifndef FILESYSTEMTREEVIEW_H
2 #define FILESYSTEMTREEVIEW_H
3 
4 #include <treeview.h>
5 
6 #include <QContextMenuEvent>
7 #include <QFileSystemModel>
8 #include <QMenu>
9 
11 
20 {
21  Q_OBJECT
22 private:
23  QString _toLibrary;
24  QString _toPlaylist;
25  QString _toTagEditor;
26  QModelIndex _theIndex;
27  QMenu *_properties;
28  QFileSystemModel *_fileSystemModel;
29 
30 public:
31  explicit FileSystemTreeView(QWidget *parent = nullptr);
32 
34  virtual void findAll(const QModelIndex &index, QList<QUrl> *tracks) const override;
35 
36  virtual void updateSelectedTracks() override;
37 
38 protected:
40  virtual void contextMenuEvent(QContextMenuEvent *event) override;
41 
43  virtual int countAll(const QModelIndexList &indexes) const override;
44 
45  virtual void keyPressEvent(QKeyEvent *event) override;
46 
47 private:
48  void scrollAndHighlight(const QChar &c);
49 
50 public slots:
52  void reloadWithNewPath(const QDir &path);
53 
54 private slots:
56  void convertIndex(const QModelIndex &index);
57 
58 signals:
60  void aboutToAddMusicLocations(const QList<QDir> &);
61 
62  void folderChanged(const QString &);
63 };
64 
65 #endif // FILESYSTEMTREEVIEW_H
virtual void updateSelectedTracks()=0
The TreeView class is the base class for displaying trees in the player.
Definition: treeview.h:14
The FileSystemTreeView class is displaying a standard file-system in a tree.
Definition: filesystemtreeview.h:19
virtual void findAll(const QModelIndex &index, QList< QUrl > *tracks) const =0
virtual int countAll(const QModelIndexList &indexes) const =0
#define MIAMTABPLAYLISTS_LIBRARY
Definition: miamtabplaylists_global.hpp:8