]> git.sesse.net Git - vlc/blob - modules/gui/qt4/dialogs/bookmarks.hpp
Qt: includes barrier fix.
[vlc] / modules / gui / qt4 / dialogs / bookmarks.hpp
1 /*****************************************************************************
2  * bookmarks.hpp : bookmarks
3  ****************************************************************************
4  * Copyright (C) 2006 the VideoLAN team
5  * $Id$
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 QVLC_BOOKMARKS_H_
26 #define QVLC_BOOKMARKS_H_ 1
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     static void killInstance()
44     {
45         if( instance ) delete instance;
46         instance = NULL;
47     }
48     virtual ~BookmarksDialog();
49 private:
50     BookmarksDialog( intf_thread_t * );
51     static BookmarksDialog *instance;
52     void update();
53     QTreeWidget *bookmarksList;
54 private slots:
55     void add();
56     void del();
57     void clear();
58     void edit( QTreeWidgetItem *item, int column );
59     void extract();
60     void activateItem( QModelIndex index );
61 };
62
63 #endif
64