21#ifndef DIRECTORYTREEVIEW_H
22#define DIRECTORYTREEVIEW_H
24#include "DirectoryModel.h"
25#include "Gui/InfoDialog/InfoDialogContainer.h"
27#include "Gui/Utils/SearchableWidget/SearchableView.h"
28#include "Gui/Utils/Widgets/WidgetTemplate.h"
29#include "Gui/Utils/Widgets/Dragable.h"
30#include "Utils/Pimpl.h"
33#include <QModelIndexList>
41 class LibraryContextMenu;
69 void sigDeleteClicked();
70 void sigPlayClicked();
71 void sigPlayNewTabClicked();
72 void sigPlayNextClicked();
73 void sigAppendClicked();
74 void sigDirectoryLoaded(
const QModelIndex& index);
75 void sigCurrentIndexChanged(
const QModelIndex& index);
77 void sigEnterPressed();
78 void sigImportRequested(LibraryId libraryId,
const QStringList& tracks,
const QString& targetDirectory);
80 void sigCopyRequested(
const QStringList& paths,
const QString& target);
81 void sigMoveRequested(
const QStringList& paths,
const QString& target);
82 void sigRenameRequested(
const QString& path,
const QString& target);
84 void sigCopyToLibraryRequested(LibraryId libraryId);
85 void sigMoveToLibraryRequested(LibraryId libraryId);
88 explicit TreeView(QWidget* parent =
nullptr);
93 QString directoryName(
const QModelIndex& index);
95 QModelIndexList selectedRows()
const;
96 QStringList selectedPaths()
const;
98 void setFilterTerm(
const QString& filter);
101 void setBusy(
bool b);
104 enum class DropAction
111 void initContextMenu();
112 DropAction showDropMenu(
const QPoint& pos);
113 void handleSayonaraDrop(
const Gui::CustomMimeData* mimedata,
const QString& targetDirectory);
116 void createDirectoryClicked();
117 void renameDirectoryClicked();
118 void viewInFileManagerClicked();
119 void dragTimerTimeout();
122 void skinChanged()
override;
124 void keyPressEvent(QKeyEvent* event)
override;
125 void contextMenuEvent(QContextMenuEvent* event)
override;
127 void dragEnterEvent(QDragEnterEvent* event)
override;
128 void dragLeaveEvent(QDragLeaveEvent* event)
override;
129 void dragMoveEvent(QDragMoveEvent* event)
override;
130 void dropEvent(QDropEvent* event)
override;
132 void selectionChanged(
const QItemSelection& selected,
const QItemSelection& deselected)
override;
139 QWidget* getParentWidget()
override;
The DirectoryTreeView class.
Definition: DirectoryTreeView.h:62
MD::Interpretation metadataInterpretation() const override
get the interpretation for the metadata. Maybe a list of metadata should be intrepeted as albums whil...
bool hasMetadata() const override
returns, if the widget can provide metadata instantly If false, the info dialog will the pathlist
MetaDataList infoDialogData() const override
get the metadata that should be used for the info dialog So for lists, the selected tracks are used h...
QStringList pathlist() const override
Returns a list of paths. This is only used if has_metadata() returns false.
Definition: CustomMimeData.h:35
The Dragable class.
Definition: Dragable.h:61
An interface used to abstract the usage of the info dialog. An implementing class has to return the i...
Definition: InfoDialogContainer.h:64
Definition: LibraryInfoAccessor.h:36
The Info class.
Definition: LibraryInfo.h:38
An interface class needed when implementing a library plugin.
Definition: LocalLibraryWatcher.h:31