Miam-Player  0.8.0
A nice music player
playlistitemdelegate.h
Go to the documentation of this file.
1 #ifndef PLAYLISTITEMDELEGATE_H
2 #define PLAYLISTITEMDELEGATE_H
3 
5 
6 #include "stareditor.h"
8 
9 class Playlist;
10 
17 {
18  Q_OBJECT
19 private:
20  Playlist *_playlist;
21 
22 public:
23  enum EditMode { Editable, NoStarsYet, ReadOnly };
24 
25  explicit PlaylistItemDelegate(Playlist *playlist);
26 
28  virtual QWidget* createEditor(QWidget *parent, const QStyleOptionViewItem &, const QModelIndex &index) const override;
29 
30  virtual bool eventFilter(QObject *object, QEvent *event) override;
31 
33  virtual void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const override;
34 
35 protected:
37  virtual void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override;
38 
39 private slots:
40  void commitAndClose();
41 };
42 
43 #endif // PLAYLISTITEMDELEGATE_H
The PlaylistItemDelegate class is a delegate used to display rows in a table.
Definition: playlistitemdelegate.h:16
The Playlist class is used to display tracks in the MainWindow class.
Definition: playlist.h:21
The MiamStyledItemDelegate class.
Definition: miamstyleditemdelegate.h:13
#define MIAMTABPLAYLISTS_LIBRARY
Definition: miamtabplaylists_global.hpp:8
virtual void paint(QPainter *p, const QStyleOptionViewItem &opt, const QModelIndex &index) const
Definition: miamstyleditemdelegate.cpp:20
EditMode
Definition: playlistitemdelegate.h:23