]> git.sesse.net Git - vlc/blobdiff - modules/gui/qt4/dialogs/bookmarks.hpp
Qt: cosmetics
[vlc] / modules / gui / qt4 / dialogs / bookmarks.hpp
index f78ef6d65670ea32b0c15423045dcc2d18e5d5fb..119960c55329d8db27c884714ebd2cd42ba09dad 100644 (file)
@@ -2,7 +2,7 @@
  * bookmarks.hpp : bookmarks
  ****************************************************************************
  * Copyright (C) 2006 the VideoLAN team
- * $Id: extended.hpp 23338 2007-11-26 08:10:01Z jb $
+ * $Id$
  *
  * Authors: Antoine Lejeune <phytos@via.ecp.fr>
  *
  *****************************************************************************/
 
 
-#ifndef _BOOKMARKS_H_
-#define _BOOKMARKS_H
+#ifndef QVLC_BOOKMARKS_H_
+#define QVLC_BOOKMARKS_H_ 1
 
 #include "util/qvlcframe.hpp"
 #include <QStandardItemModel>
 #include <QTreeView>
 #include <QTreeWidget>
+#include "util/singleton.hpp"
 
-class BookmarksDialog : public QVLCFrame
+class BookmarksDialog : public QVLCFrame, public Singleton<BookmarksDialog>
 {
-    Q_OBJECT;
-public:
-    static BookmarksDialog * getInstance( intf_thread_t *p_intf )
-    {
-        if( !instance )
-            instance = new BookmarksDialog( p_intf );
-        return instance;
-    }
-    static void killInstance()
-    {
-        if( instance ) delete instance;
-        instance = NULL;
-    }
-    virtual ~BookmarksDialog();
+    Q_OBJECT
 private:
     BookmarksDialog( intf_thread_t * );
-    static BookmarksDialog *instance;
-    void update();
+    virtual ~BookmarksDialog();
+
     QTreeWidget *bookmarksList;
+
 private slots:
+    void update();
     void add();
     void del();
     void clear();
     void edit( QTreeWidgetItem *item, int column );
     void extract();
     void activateItem( QModelIndex index );
+
+    friend class    Singleton<BookmarksDialog>;
 };
 
 #endif