]> git.sesse.net Git - vlc/blobdiff - modules/gui/qt4/dialogs/bookmarks.hpp
Add build date/time in the version infos
[vlc] / modules / gui / qt4 / dialogs / bookmarks.hpp
index e8a168a3d7d082aacccfda0cf98a00cf5d3bd669..af55f4a1fde73db59f11355e8f42604a436ecdad 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;
-    }
-    virtual ~BookmarksDialog();
-    static bool exists() { return ( instance != NULL ) ; }
 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