]> git.sesse.net Git - vlc/blobdiff - modules/gui/qt4/components/playlist/playlist_item.hpp
Qt: remove the zoom slider and put it on the menu
[vlc] / modules / gui / qt4 / components / playlist / playlist_item.hpp
index c8cb2c65323ce56c9f2f20d645affc65ccff9bf9..d36b19c1a0967d778e71f14dfbd34abd10b4e846 100644 (file)
@@ -1,7 +1,7 @@
 /*****************************************************************************
  * playlist_item.hpp : Item for a playlist tree
  ****************************************************************************
- * Copyright (C) 2006 the VideoLAN team
+ * Copyright (C) 2006-2011 the VideoLAN team
  * $Id$
  *
  * Authors: ClĂ©ment Stenac <zorglub@videolan.org>
 # include "config.h"
 #endif
 
-#include "components/playlist/playlist_model.hpp"
-
-#include <QString>
 #include <QList>
 
-class QSettings;
-class PLModel;
-
 class PLItem
 {
     friend class PLModel;
 public:
-    PLItem( playlist_item_t *, PLItem *parent, PLModel * );
-    PLItem( playlist_item_t *, QSettings *, PLModel * );
+    PLItem( playlist_item_t *, PLItem *parent );
     ~PLItem();
 
     int row() const;
 
-    void insertChild( PLItem *, int p, bool signal = true );
-    void appendChild( PLItem *item, bool signal = true )
-    {
-        insertChild( item, children.count(), signal );
-    };
-
-    void remove( PLItem *removed );
+    void insertChild( PLItem *, int pos );
+    void appendChild( PLItem *item );
+    void removeChild( PLItem * );
+    void removeChildren();
+    void takeChildAt( int );
 
-    PLItem *child( int row ) { return children.value( row ); };
-    int childCount() const { return children.count(); };
+    PLItem *child( int row ) const { return children.value( row ); }
+    int childCount() const { return children.count(); }
 
-    PLItem *parent() { return parentItem; };
-
-    void update( playlist_item_t * );
+    PLItem *parent() { return parentItem; }
+    input_item_t *inputItem() const { return p_input; }
+    int id() { return i_id; }
+    bool operator< ( PLItem& );
 
 protected:
     QList<PLItem*> children;
-    int i_type;
+    PLItem *parentItem;
     int i_id;
-    int i_showflags;
-    bool b_is_node;
     input_item_t *p_input;
 
 private:
-    void init( playlist_item_t *, PLItem *, PLModel *, QSettings * );
-    PLItem *parentItem;
-    PLModel *model;
+    PLItem( playlist_item_t * );
+    void init( playlist_item_t *, PLItem * );
 };
 
 #endif