29#ifndef PLAYLISTITEMMODEL_H
30#define PLAYLISTITEMMODEL_H
32#include "Gui/Utils/SearchableWidget/SearchableModel.h"
34#include "Utils/Playlist/PlaylistFwd.h"
35#include "Utils/Pimpl.h"
57 void sigCurrentTrackChanged(
int index);
58 void sigCurrentScannedFileChanged(
const QString& filename);
59 void sigBusyChanged(
bool b);
79 RatingRole = Qt::UserRole + 1,
80 DragIndexRole = Qt::UserRole + 2,
81 EntryLookRole = Qt::UserRole + 3,
82 CurrentPlayingRole = Qt::UserRole + 4
88 [[nodiscard]]
int playlistIndex()
const;
91 void removeTracks(
const IndexSet& rows);
92 void deleteTracks(
const IndexSet& rows);
94 void findTrack(
int index);
101 void insertTracks(
const QStringList& files,
int row);
103 [[nodiscard]]
int currentTrack()
const;
105 [[nodiscard]]
const MetaData& metadata(
int row)
const;
108 [[nodiscard]]
bool hasLocalMedia(
const IndexSet& rows)
const;
109 void setDragIndex(
int dragIndex);
110 void changeRating(
const IndexSet& rows, Rating rating);
111 void changeTrack(
int trackIndex, Seconds seconds = 0);
113 void setBusy(
bool b);
115 [[nodiscard]] Qt::ItemFlags flags(
const QModelIndex& index = QModelIndex())
const override;
116 [[nodiscard]] QVariant data(
const QModelIndex& index,
int role = Qt::DisplayRole)
const override;
117 bool setData(
const QModelIndex& index,
const QVariant& value,
int role)
override;
118 [[nodiscard]]
int rowCount(
const QModelIndex& parent = QModelIndex())
const override;
119 [[nodiscard]]
int columnCount(
const QModelIndex& parent = QModelIndex())
const override;
122 [[nodiscard]] QMimeData* mimeData(
const QModelIndexList& indexes)
const override;
123 QModelIndexList searchResults(
const QString& searchString)
override;
127 void reverseTracks();
128 void randomizeTracks();
129 void jumpToNextAlbum();
132 void playlistChanged(
int playlistIndex);
133 void currentTrackChanged(
int oldIndex,
int newIndex);
135 void coversChanged();
136 void coverFound(
const QPixmap& pixmap);
137 void coverLookupFinished(
bool success);
140 void startCoverLookup(
const MetaData& track)
const;
142 void refreshPlaylist(
int rowCount,
int columnCount);
Definition: PlaylistInterface.h:56
The PlaylistItemModel class.
Definition: PlaylistModel.h:49
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