#include <QModelIndex>
#include <QWidget>
#include <QString>
+#include <QToolBar>
#include <vlc_playlist.h>
class QPushButton;
class QKeyEvent;
class QWheelEvent;
+class PlIconView;
+class LocationBar;
class StandardPLPanel: public QWidget
{
virtual void keyPressEvent( QKeyEvent *e );
virtual void wheelEvent( QWheelEvent *e );
- bool eventFilter(QObject *obj, QEvent *event);
-
PLModel *model;
private:
intf_thread_t *p_intf;
QLabel *title;
QPushButton *addButton;
QGridLayout *layout;
+ LocationBar *locationBar;
- QTreeView *view;
- QListView *view2;
+ QTreeView *treeView;
+ PlIconView *iconView;
+ QAbstractItemView *currentView;
+ QAction *iconViewAction, *treeViewAction;
int currentRootId;
QSignalMapper *selectColumnsSigMapper;
+ QSignalMapper *viewSelectionMapper;
+
+ int last_activated_id;
+
+ enum {
+ TREE_VIEW = 0,
+ ICON_VIEW,
+ COVER_VIEW,
+ };
+
+ void createTreeView();
+ void createIconView();
- void doPopup( QModelIndex index, QPoint point );
public slots:
void removeItem( int );
virtual void setRoot( playlist_item_t * );
void search( const QString& searchText );
void popupAdd();
void popupSelectColumn( QPoint );
+ void popupPlView( const QPoint & );
void toggleColumnShown( int );
- void toggleView();
+ void showView( int );
+ void cycleViews();
+ void activate( const QModelIndex & );
+ void handleInputChange( input_thread_t * );
+};
+
+class LocationBar : public QToolBar
+{
+ Q_OBJECT;
+public:
+ LocationBar( PLModel * );
+ void setIndex( const QModelIndex & );
+signals:
+ void invoked( const QModelIndex & );
+private slots:
+ void invoke( int i_item_id );
+private:
+ PLModel *model;
+ QSignalMapper *mapper;
};
#endif