* 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