32 #include "Gui/Utils/Widgets/Dragable.h" 33 #include "Gui/Utils/SearchableWidget/SearchableView.h" 35 #include "Gui/InfoDialog/InfoDialogContainer.h" 36 #include "Gui/Utils/ContextMenu/LibraryContextMenu.h" 38 #include "Utils/SetFwd.h" 39 #include "Utils/Pimpl.h" 63 void sig_all_selected();
64 void sig_delete_clicked();
65 void sig_play_clicked();
66 void sig_play_next_clicked();
67 void sig_play_new_tab_clicked();
68 void sig_append_clicked();
69 void sig_refresh_clicked();
70 void sig_reload_clicked();
71 void sig_import_files(
const QStringList& files);
72 void sig_sel_changed(
const IndexSet& indexes);
79 void show_context_menu_actions(Library::ContextMenu::Entries entries);
81 using SearchableTableView::set_model;
84 explicit ItemView(QWidget* parent=
nullptr);
89 virtual Library::ContextMenu::Entries context_menu_entries()
const;
93 QPixmap drag_pixmap()
const override;
95 void set_selection_type(SelectionViewInterface::SelectionType type)
override;
96 bool is_valid_drag_position(
const QPoint &p)
const override;
98 void show_clear_button(
bool visible);
99 void use_clear_button(
bool yesno);
101 void resize_rows_to_contents();
102 void resize_rows_to_contents(
int first_row,
int count);
106 virtual void mousePressEvent(QMouseEvent* event)
override;
107 virtual void mouseMoveEvent(QMouseEvent* event)
override;
108 virtual void contextMenuEvent(QContextMenuEvent* event)
override;
110 virtual void dragEnterEvent(QDragEnterEvent *event)
override;
111 virtual void dragMoveEvent(QDragMoveEvent *event)
override;
112 virtual void dropEvent(QDropEvent* event)
override;
113 virtual void changeEvent(QEvent* event)
override;
114 virtual void keyPressEvent(QKeyEvent* event)
override;
115 virtual void resizeEvent(QResizeEvent *event)
override;
117 virtual void selected_items_changed (
const QItemSelection& selected,
const QItemSelection& deselected );
119 virtual void init_context_menu();
137 virtual void selection_changed(
const IndexSet& indexes);
138 virtual void import_requested(
const QStringList& files);
142 int viewport_height()
const override;
146 virtual void show_context_menu(
const QPoint&);
147 virtual void merge_action_triggered();
148 virtual void play_clicked();
149 virtual void play_new_tab_clicked();
150 virtual void play_next_clicked();
151 virtual void delete_clicked();
152 virtual void append_clicked();
153 virtual void refresh_clicked();
154 virtual void reload_clicked();
155 virtual void cover_view_toggled();
156 virtual void album_artists_toggled();
157 virtual void filter_extensions_triggered(
const QString& extension,
bool b);
An interface used to abstract the usage of the info dialog. An implementing class has to return the i...
Definition: InfoDialogContainer.h:61
Changes all metadata containing one of the source ids and replaces it with the target id...
Definition: MergeData.h:38
Definition: AbstractLibrary.h:41
virtual bool is_mergeable() const =0
indicates if multiple ids can be merged into one. For example if the same artist is written in three ...
A set structure. Inherited from std::set with some useful methods. For integer and String this set is...
Definition: Set.h:35
The Dragable class.
Definition: Dragable.h:38
QMimeData * dragable_mimedata() const override
An interface class needed when implementing a library plugin.
Definition: LocalLibraryWatcher.h:32
The main task of the ItemView is to display a context menu for various selections. It also handles drag and drop events with a cover. It supports merging and imports.
Definition: ItemView.h:54
The ItemModel is intended to abstract the various views. It supports searching, selections and a libr...
Definition: ItemModel.h:46
MetaDataList info_dialog_data() const override
get the metadata that should be used for the info dialog So for lists, the selected tracks are used h...