29#ifndef PLAYLISTITEMMODEL_H
30#define PLAYLISTITEMMODEL_H
32#include "Gui/Utils/SearchableWidget/SearchableModel.h"
34#include "Utils/Library/Sortorder.h"
35#include "Utils/Pimpl.h"
36#include "Utils/Playlist/PlaylistFwd.h"
61 void sigCurrentTrackChanged(
int index);
62 void sigCurrentScannedFileChanged(
const QString& filename);
63 void sigBusyChanged(
bool b);
83 RatingRole = Qt::UserRole + 1,
84 DragIndexRole = Qt::UserRole + 2,
85 EntryLookRole = Qt::UserRole + 3,
86 CurrentPlayingRole = Qt::UserRole + 4
92 [[nodiscard]]
int playlistIndex()
const;
95 void removeTracks(
const IndexSet& rows);
96 void deleteTracks(
const IndexSet& rows);
98 void findTrack(
int index);
105 void insertTracks(
const QStringList& files,
int row);
107 [[nodiscard]]
int currentTrack()
const;
111 [[nodiscard]]
bool hasLocalMedia(
const IndexSet& rows)
const;
112 [[nodiscard]]
bool isLocked()
const;
113 void setLocked(
bool b);
114 void setDragIndex(
int dragIndex);
115 void changeRating(
const IndexSet& rows, Rating rating);
116 void changeTrack(
int trackIndex, Seconds seconds = 0);
118 void setBusy(
bool b);
120 [[nodiscard]] Qt::ItemFlags flags(
const QModelIndex& index = QModelIndex())
const override;
121 [[nodiscard]] QVariant data(
const QModelIndex& index,
int role = Qt::DisplayRole)
const override;
122 bool setData(
const QModelIndex& index,
const QVariant& value,
int role)
override;
123 [[nodiscard]]
int rowCount(
const QModelIndex& parent = QModelIndex())
const override;
124 [[nodiscard]]
int columnCount(
const QModelIndex& parent = QModelIndex())
const override;
127 [[nodiscard]] QMimeData* mimeData(
const QModelIndexList& indexes)
const override;
128 QModelIndexList searchResults(
const QString& searchString)
override;
132 void reverseTracks();
133 void randomizeTracks();
134 void sortTracks(Library::SortOrder sortorder);
135 void jumpToNextAlbum();
138 void playlistChanged(
int playlistIndex);
139 void currentTrackChanged(
int oldIndex,
int newIndex);
141 void coversChanged();
142 void coverFound(
const QPixmap& pixmap);
143 void coverLookupFinished(
bool success);
146 void startCoverLookup(
const MetaData& track)
const;
148 void refreshPlaylist(
int rowCount,
int columnCount);
Definition: LibraryManager.h:36
The PlaylistItemModel class.
Definition: PlaylistModel.h:53
Definition: org_mpris_media_player2_adaptor.h:21
Definition: SearchableModel.h:50
A set structure. Inherited from std::set with some useful methods. For integer and String this set is...
Definition: Set.h:37