mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 02:27:43 +00:00
SoundPlayer: Use an enum for PlaylistModel columns
Also correct some const-positioning.
This commit is contained in:
parent
32e5593ca9
commit
fae350be3f
2 changed files with 26 additions and 16 deletions
|
@ -19,11 +19,21 @@ enum class PlaylistModelCustomRole {
|
|||
|
||||
class PlaylistModel : public GUI::Model {
|
||||
public:
|
||||
enum Column {
|
||||
Title,
|
||||
Duration,
|
||||
Group,
|
||||
Album,
|
||||
Artist,
|
||||
Filesize,
|
||||
__Count
|
||||
};
|
||||
|
||||
~PlaylistModel() override = default;
|
||||
|
||||
int row_count(const GUI::ModelIndex&) const override { return m_playlist_items.size(); }
|
||||
int column_count(const GUI::ModelIndex&) const override { return 6; }
|
||||
GUI::Variant data(const GUI::ModelIndex&, GUI::ModelRole) const override;
|
||||
int row_count(GUI::ModelIndex const&) const override { return m_playlist_items.size(); }
|
||||
int column_count(GUI::ModelIndex const&) const override { return 6; }
|
||||
GUI::Variant data(GUI::ModelIndex const&, GUI::ModelRole) const override;
|
||||
ErrorOr<String> column_name(int column) const override;
|
||||
Vector<M3UEntry>& items() { return m_playlist_items; }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue