]> git.sesse.net Git - vlc/blob - modules/gui/qt4/dialogs/bookmarks.hpp
e8a168a3d7d082aacccfda0cf98a00cf5d3bd669
[vlc] / modules / gui / qt4 / dialogs / bookmarks.hpp
1 /*****************************************************************************
2  * bookmarks.hpp : bookmarks
3  ****************************************************************************
4  * Copyright (C) 2006 the VideoLAN team
5  * $Id: extended.hpp 23338 2007-11-26 08:10:01Z jb $
6  *
7  * Authors: Antoine Lejeune <phytos@via.ecp.fr>
8  *
9  * This program is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 2 of the License, or
12  * (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program; if not, write to the Free Software
21  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
22  *****************************************************************************/
23
24
25 #ifndef _BOOKMARKS_H_
26 #define _BOOKMARKS_H
27
28 #include "util/qvlcframe.hpp"
29 #include <QStandardItemModel>
30 #include <QTreeView>
31 #include <QTreeWidget>
32
33 class BookmarksDialog : public QVLCFrame
34 {
35     Q_OBJECT;
36 public:
37     static BookmarksDialog * getInstance( intf_thread_t *p_intf )
38     {
39         if( !instance )
40             instance = new BookmarksDialog( p_intf );
41         return instance;
42     }
43     virtual ~BookmarksDialog();
44     static bool exists() { return ( instance != NULL ) ; }
45 private:
46     BookmarksDialog( intf_thread_t * );
47     static BookmarksDialog *instance;
48     void update();
49     QTreeWidget *bookmarksList;
50 private slots:
51     void add();
52     void del();
53     void clear();
54     void edit( QTreeWidgetItem *item, int column );
55     void extract();
56     void activateItem( QModelIndex index );
57 };
58
59 #endif
60