Commit de5baa43 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt: Remove PLPanel upper class

parent 23c3cf34
...@@ -43,42 +43,29 @@ class PLModel; ...@@ -43,42 +43,29 @@ class PLModel;
class QPushButton; class QPushButton;
class QKeyEvent; class QKeyEvent;
class PLPanel: public QWidget class StandardPLPanel: public QWidget
{ {
Q_OBJECT; Q_OBJECT
public:
PLPanel( PlaylistWidget *p, intf_thread_t *_p_intf ) : QWidget( p )
{
p_intf = _p_intf;
parent = p;
}
virtual ~PLPanel() {};
protected:
intf_thread_t *p_intf;
QFrame *parent;
public slots:
virtual void setRoot( playlist_item_t * ) = 0;
};
class StandardPLPanel: public PLPanel
{
Q_OBJECT;
public: public:
StandardPLPanel( PlaylistWidget *, intf_thread_t *, StandardPLPanel( PlaylistWidget *, intf_thread_t *,
playlist_t *,playlist_item_t * ); playlist_t *,playlist_item_t * );
virtual ~StandardPLPanel(); virtual ~StandardPLPanel();
protected: protected:
friend class PlaylistWidget;
virtual void keyPressEvent( QKeyEvent *e ); virtual void keyPressEvent( QKeyEvent *e );
protected:
PLModel *model; PLModel *model;
friend class PlaylistWidget;
private: private:
intf_thread_t *p_intf;
QWidget *parent;
QLabel *title; QLabel *title;
QTreeView *view; QTreeView *view;
QPushButton *repeatButton, *randomButton, *addButton, *gotoPlayingButton; QPushButton *repeatButton, *randomButton, *addButton, *gotoPlayingButton;
int currentRootId; int currentRootId;
QSignalMapper *selectColumnsSigMapper; QSignalMapper *selectColumnsSigMapper;
public slots: public slots:
void removeItem( int ); void removeItem( int );
virtual void setRoot( playlist_item_t * ); virtual void setRoot( playlist_item_t * );
......
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
#include <QLabel> #include <QLabel>
class PLSelector; class PLSelector;
class PLPanel; class StandardPLPanel;
class QPushButton; class QPushButton;
class CoverArtLabel; class CoverArtLabel;
class ArtLabel; class ArtLabel;
...@@ -53,7 +53,7 @@ public: ...@@ -53,7 +53,7 @@ public:
virtual ~PlaylistWidget(); virtual ~PlaylistWidget();
private: private:
PLSelector *selector; PLSelector *selector;
PLPanel *rightPanel; StandardPLPanel *rightPanel;
QPushButton *addButton; QPushButton *addButton;
ArtLabel *art; ArtLabel *art;
protected: protected:
......
...@@ -52,7 +52,7 @@ StandardPLPanel::StandardPLPanel( PlaylistWidget *_parent, ...@@ -52,7 +52,7 @@ StandardPLPanel::StandardPLPanel( PlaylistWidget *_parent,
intf_thread_t *_p_intf, intf_thread_t *_p_intf,
playlist_t *p_playlist, playlist_t *p_playlist,
playlist_item_t *p_root ): playlist_item_t *p_root ):
PLPanel( _parent, _p_intf ) QWidget( _parent ), p_intf( _p_intf )
{ {
model = new PLModel( p_playlist, p_intf, p_root, this ); model = new PLModel( p_playlist, p_intf, p_root, this );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment